From dbc7db41c01ee7eb3c6654a7ee2f05201dc46a3b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 5 Mar 2024 22:10:56 +0700 Subject: [PATCH 001/305] fix(BridgeManager): disable update operator --- .../BridgeManager.sol | 26 +------------------ .../bridge-manager/BridgeManagerCRUD.t.sol | 1 + 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index e871e624..230f016d 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -118,31 +118,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac * their operator address blank null `address(0)`, consider add authorization check. */ function updateBridgeOperator(address newBridgeOperator) external onlyGovernor { - _requireNonZeroAddress(newBridgeOperator); - - // Queries the previous bridge operator - mapping(address => BridgeOperatorInfo) storage _gorvernorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo(); - address currentBridgeOperator = _gorvernorToBridgeOperatorInfo[msg.sender].addr; - if (currentBridgeOperator == newBridgeOperator) { - revert ErrBridgeOperatorAlreadyExisted(newBridgeOperator); - } - - // Tries replace the bridge operator - EnumerableSet.AddressSet storage _bridgeOperatorSet = _getBridgeOperatorSet(); - bool updated = _bridgeOperatorSet.remove(currentBridgeOperator) && _bridgeOperatorSet.add(newBridgeOperator); - if (!updated) revert ErrBridgeOperatorUpdateFailed(newBridgeOperator); - - mapping(address => address) storage _governorOf = _getGovernorOf(); - delete _governorOf[currentBridgeOperator]; - _governorOf[newBridgeOperator] = msg.sender; - _gorvernorToBridgeOperatorInfo[msg.sender].addr = newBridgeOperator; - - _notifyRegisters( - IBridgeManagerCallback.onBridgeOperatorUpdated.selector, - abi.encode(currentBridgeOperator, newBridgeOperator) - ); - - emit BridgeOperatorUpdated(msg.sender, currentBridgeOperator, newBridgeOperator); + revert("Not supported"); } /** diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol index 5f50b52e..e2febbaa 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol @@ -212,6 +212,7 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { uint256 r3, uint16 numBridgeOperators ) external virtual { + vm.skip(true); (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( r1, r2, From 0551e0599af6d2e2f87122c9c99e09258fb10828 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 5 Mar 2024 16:56:19 +0700 Subject: [PATCH 002/305] chore: fix formatter, add local testing profile --- foundry.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/foundry.toml b/foundry.toml index f72d3fc2..da2e032e 100644 --- a/foundry.toml +++ b/foundry.toml @@ -28,6 +28,11 @@ evm_version = 'shanghai' line_length = 120 tab_width = 2 bracket_spacing = true +int_types = 'preserve' +multiline_func_header = 'params_first' + +[profile.local.fuzz] +runs = 10 [profile.default.fuzz] runs = 256 From 534a3009189177d3ae5f039e7e464680346898ad Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 5 Mar 2024 16:54:57 +0700 Subject: [PATCH 003/305] test: enable update operator test --- .../updateOperator.RoninBridgeManager.t.sol | 1 - .../mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol | 1 - 2 files changed, 2 deletions(-) diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index 4b74f5f6..49a9b923 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -42,7 +42,6 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { } function test_updateOperator_and_wrapUpEpoch() public { - vm.skip(true); console.log("=============== Test Update Operator ==========="); _depositFor(); diff --git a/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol index b48f8d3b..9de95d9c 100644 --- a/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol @@ -111,7 +111,6 @@ contract RequestDepositFor_MainchainGatewayV3_Test is BaseIntegration_Test { // test deposit > should be able to unwrap and deposit native. function test_unwrapAndDepositNative() public { - vm.skip(true); vm.startPrank(_sender); _mainchainWeth.deposit{ value: _quantity }(); _mainchainWeth.approve(address(_mainchainGatewayV3), _quantity); From 586f262ee92a7e0da5d79cabb985bc2726f9cae9 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 5 Mar 2024 19:19:31 +0700 Subject: [PATCH 004/305] test: add test for track in tryBulkDeposit --- test/bridge/integration/BaseIntegration.t.sol | 30 +++++ .../bulkDepositAndRecord.Gateway.t.sol | 108 +++++++++++++++++ .../depositAndRecord.Gateway.t.sol | 112 ++++++++++++++++++ .../updateOperator.RoninBridgeManager.t.sol | 45 ++----- 4 files changed, 262 insertions(+), 33 deletions(-) create mode 100644 test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol create mode 100644 test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 8dbabc08..b9200abd 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -582,4 +582,34 @@ contract BaseIntegration_Test is Base_Test { vm.warp(nextDayTimestamp); vm.roll(epochEndingBlockNumber); } + + function logBridgeTracking() public view { + console.log(">> logBridgeTracking ...."); + uint256 currentPeriod = _validatorSet.currentPeriod(); + uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + console.log(" -> current period:", currentPeriod); + console.log(" -> total votes:", _bridgeTracking.totalVote(currentPeriod)); + console.log(" -> total ballot:", _bridgeTracking.totalBallot(currentPeriod)); + for (uint256 i; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + console.log(" -> total ballot of:", operator, _bridgeTracking.totalBallotOf(currentPeriod, operator)); + } + + console.log(" -> lastSynced period:", lastSyncedPeriod); + console.log(" -> total votes:", _bridgeTracking.totalVote(lastSyncedPeriod)); + console.log(" -> total ballot:", _bridgeTracking.totalBallot(lastSyncedPeriod)); + for (uint256 i; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + console.log(" -> total ballot of:", operator, _bridgeTracking.totalBallotOf(lastSyncedPeriod, operator)); + } + } + + function logBridgeSlash() public view { + console.log(">> logBridgeSlash ...."); + + uint256[] memory periods = _bridgeSlash.getSlashUntilPeriodOf(_param.roninBridgeManager.bridgeOperators); + for (uint256 i; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + console.log(" -> slash operator until:", _param.roninBridgeManager.bridgeOperators[i], periods[i]); + } + } } diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol b/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol new file mode 100644 index 00000000..1e75083f --- /dev/null +++ b/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import "../../BaseIntegration.t.sol"; + +contract BulkDepositAndRecord_Gateway_Test is BaseIntegration_Test { + using Transfer for Transfer.Receipt; + + address _newBridgeOperator; + uint256 _numOperatorsForVoteExecuted; + Transfer.Receipt _sampleReceipt; + Transfer.Receipt[] _bulkReceipts; + uint256 _id = 0; + + function setUp() public virtual override { + super.setUp(); + + vm.deal(address(_bridgeReward), 10 ether); + _sampleReceipt = Transfer.Receipt({ + id: 0, + kind: Transfer.Kind.Deposit, + ronin: Token.Owner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), + mainchain: Token.Owner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), + info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) + }); + + _numOperatorsForVoteExecuted = + _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; + } + + function test_bulkDepositFor_wrapUp_checkRewardAndSlash() public { + _depositFor(); + _moveToEndPeriodAndWrapUpEpoch(); + + console.log("=============== First 50 Receipts ==========="); + _bulkDepositFor(); + + _wrapUpEpoch(); + _wrapUpEpoch(); + + _moveToEndPeriodAndWrapUpEpoch(); + + console.log("=============== Check slash and reward behavior ==========="); + console.log("==== Check total ballot before new deposit ===="); + + logBridgeTracking(); + + uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), _id); + } + + for (uint256 i = _numOperatorsForVoteExecuted; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), 0); + } + + console.log("==== Check total ballot after new deposit ===="); + _depositFor(); + + logBridgeTracking(); + logBridgeSlash(); + + lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), 0); + } + + uint256[] memory toPeriodSlashArr = _bridgeSlash.getSlashUntilPeriodOf(_param.roninBridgeManager.bridgeOperators); + for (uint256 i = _numOperatorsForVoteExecuted; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + assertEq(toPeriodSlashArr[i], 7); + } + } + + function _depositFor() internal { + console.log(">> depositFor ...."); + _sampleReceipt.id = ++_id; + for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + console.log(" -> Operator vote:", _param.roninBridgeManager.bridgeOperators[i]); + vm.prank(_param.roninBridgeManager.bridgeOperators[i]); + _roninGatewayV3.depositFor(_sampleReceipt); + } + } + + function _bulkDepositFor() internal { + console.log(">> bulkDepositFor ...."); + _prepareBulkRequest(); + for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + console.log(" -> Operator vote:", _param.roninBridgeManager.bridgeOperators[i]); + vm.prank(_param.roninBridgeManager.bridgeOperators[i]); + _roninGatewayV3.tryBulkDepositFor(_bulkReceipts); + } + } + + function _prepareBulkRequest() internal { + delete _bulkReceipts; + + for (uint256 i; i < 50; i++) { + _sampleReceipt.id = ++_id; + _bulkReceipts.push(_sampleReceipt); + } + } +} diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol b/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol new file mode 100644 index 00000000..21ddda94 --- /dev/null +++ b/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import "../../BaseIntegration.t.sol"; + +contract DepositAndRecord_Gateway_Test is BaseIntegration_Test { + using Transfer for Transfer.Receipt; + + address _newBridgeOperator; + uint256 _numOperatorsForVoteExecuted; + Transfer.Receipt _sampleReceipt; + uint256 _id = 0; + + function setUp() public virtual override { + super.setUp(); + + vm.deal(address(_bridgeReward), 10 ether); + _sampleReceipt = Transfer.Receipt({ + id: 0, + kind: Transfer.Kind.Deposit, + ronin: Token.Owner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), + mainchain: Token.Owner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), + info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) + }); + + _numOperatorsForVoteExecuted = + _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; + } + + function test_depositFor_wrapUp_checkRewardAndSlash() public { + _depositFor(); + _moveToEndPeriodAndWrapUpEpoch(); + + console.log("=============== 50 Receipts with DepositFor ==========="); + + for (uint i; i < 50; i++) { + _depositFor(); + } + + _wrapUpEpoch(); + _wrapUpEpoch(); + + _moveToEndPeriodAndWrapUpEpoch(); + + console.log("=============== Check slash and reward behavior ==========="); + console.log("==== Check total ballot before new deposit ===="); + + logBridgeTracking(); + + uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), _id); + } + + for (uint256 i = _numOperatorsForVoteExecuted; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), 0); + } + + console.log("==== Check total ballot after new deposit ===="); + _depositFor(); + + logBridgeTracking(); + logBridgeSlash(); + + lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), 0); + } + + uint256[] memory toPeriodSlashArr = _bridgeSlash.getSlashUntilPeriodOf(_param.roninBridgeManager.bridgeOperators); + for (uint256 i = _numOperatorsForVoteExecuted; i < _param.roninBridgeManager.bridgeOperators.length; i++) { + assertEq(toPeriodSlashArr[i], 7); + } + } + + function _updateBridgeOperator() internal { + vm.prank(_param.roninBridgeManager.governors[0]); + address previousOperator = _param.roninBridgeManager.bridgeOperators[0]; + _roninBridgeManager.updateBridgeOperator(_newBridgeOperator); + _param.roninBridgeManager.bridgeOperators[0] = _newBridgeOperator; + + console.log( + "Update operator: ", + string(abi.encodePacked(vm.toString(previousOperator), " => ", vm.toString(_newBridgeOperator))) + ); + } + + function _depositFor() internal { + console.log(">> depositFor ...."); + _sampleReceipt.id = ++_id; + for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + console.log(" -> Operator vote:", _param.roninBridgeManager.bridgeOperators[i]); + vm.prank(_param.roninBridgeManager.bridgeOperators[i]); + _roninGatewayV3.depositFor(_sampleReceipt); + } + } + + function _bulkDepositFor(Transfer.Receipt[] memory receipts) internal { + console.log(">> bulkDepositFor ...."); + for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + console.log(" -> Operator vote:", _param.roninBridgeManager.bridgeOperators[i]); + vm.prank(_param.roninBridgeManager.bridgeOperators[i]); + _roninGatewayV3.tryBulkDepositFor(receipts); + } + } +} diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index 49a9b923..a5d73409 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -48,21 +48,30 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { _moveToEndPeriodAndWrapUpEpoch(); console.log("=============== First 50 Receipts ==========="); - _bulkDepositFor(first50Receipts); + // _bulkDepositFor(first50Receipts); + + for (uint i; i < 50; i++) { + _depositFor(); + } console.log("=============== Update bridge operator ==========="); _updateBridgeOperator(); console.log("=============== Second 50 Receipts ==========="); - _bulkDepositFor(second50Receipts); + // _bulkDepositFor(second50Receipts); + for (uint i; i < 50; i++) { + _depositFor(); + } + + _wrapUpEpoch(); _wrapUpEpoch(); _moveToEndPeriodAndWrapUpEpoch(); console.log("=============== Check slash and reward behavior ==========="); _depositFor(); - logBridgeTracking(); + logBridgeTracking(); logBridgeSlash(); } @@ -97,34 +106,4 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { _roninGatewayV3.tryBulkDepositFor(receipts); } } - - function logBridgeTracking() public { - console.log(">> logBridgeTracking ...."); - uint256 currentPeriod = _validatorSet.currentPeriod(); - uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); - console.log(" -> current period:", currentPeriod); - console.log(" -> total votes:", _bridgeTracking.totalVote(currentPeriod)); - console.log(" -> total ballot:", _bridgeTracking.totalBallot(currentPeriod)); - for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { - address operator = _param.roninBridgeManager.bridgeOperators[i]; - console.log(" -> total ballot of:", operator, _bridgeTracking.totalBallotOf(currentPeriod, operator)); - } - - console.log(" -> lastSynced period:", lastSyncedPeriod); - console.log(" -> total votes:", _bridgeTracking.totalVote(lastSyncedPeriod)); - console.log(" -> total ballot:", _bridgeTracking.totalBallot(lastSyncedPeriod)); - for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { - address operator = _param.roninBridgeManager.bridgeOperators[i]; - console.log(" -> total ballot of:", operator, _bridgeTracking.totalBallotOf(lastSyncedPeriod, operator)); - } - } - - function logBridgeSlash() public { - console.log(">> logBridgeSlash ...."); - - uint256[] memory periods = _bridgeSlash.getSlashUntilPeriodOf(_param.roninBridgeManager.bridgeOperators); - for (uint256 i; i < _param.roninBridgeManager.bridgeOperators.length; i++) { - console.log(" -> slash operator until:", _param.roninBridgeManager.bridgeOperators[i], periods[i]); - } - } } From ba7c8381e56db8f29fcc04bb2458b5917c31d522 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 5 Mar 2024 19:19:40 +0700 Subject: [PATCH 005/305] fix(RoninGateway): fix handle vote after processing deposit --- src/ronin/gateway/RoninGatewayV3.sol | 108 ++++++++++++--------------- 1 file changed, 48 insertions(+), 60 deletions(-) diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 6a11782c..2475fb04 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -75,8 +75,9 @@ contract RoninGatewayV3 is * @dev Reverts if the method caller is not bridge operator. */ function _requireBridgeOperator() internal view { - if (!IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).isBridgeOperator(msg.sender)) + if (!IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).isBridgeOperator(msg.sender)) { revert ErrUnauthorized(msg.sig, RoleAccess.__DEPRECATED_BRIDGE_OPERATOR); + } } /** @@ -88,7 +89,7 @@ contract RoninGatewayV3 is uint256 _denominator, uint256 _trustedNumerator, uint256 _trustedDenominator, - address[] calldata /* _withdrawalMigrators */, + address[] calldata, /* _withdrawalMigrators */ // _packedAddresses[0]: roninTokens // _packedAddresses[1]: mainchainTokens address[][2] calldata _packedAddresses, @@ -127,7 +128,7 @@ contract RoninGatewayV3 is address[] calldata operators ) external view returns (bytes[] memory _signatures) { _signatures = new bytes[](operators.length); - for (uint256 _i = 0; _i < operators.length; ) { + for (uint256 _i = 0; _i < operators.length;) { _signatures[_i] = _withdrawalSig[withdrawalId][operators[_i]]; unchecked { @@ -140,28 +141,24 @@ contract RoninGatewayV3 is * @inheritdoc IRoninGatewayV3 */ function depositFor(Transfer.Receipt calldata _receipt) external whenNotPaused onlyBridgeOperator { - address _sender = msg.sender; - _depositFor(_receipt, _sender, minimumVoteWeight()); - IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)).recordVote( - IBridgeTracking.VoteKind.Deposit, - _receipt.id, - _sender - ); + _depositFor(_receipt, msg.sender, minimumVoteWeight()); } /** * @inheritdoc IRoninGatewayV3 */ - function tryBulkAcknowledgeMainchainWithdrew( - uint256[] calldata _withdrawalIds - ) external onlyBridgeOperator returns (bool[] memory _executedReceipts) { + function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) + external + onlyBridgeOperator + returns (bool[] memory _executedReceipts) + { address _governor = msg.sender; uint256 _minVoteWeight = minimumVoteWeight(); uint256 _withdrawalId; _executedReceipts = new bool[](_withdrawalIds.length); IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 _i; _i < _withdrawalIds.length; ) { + for (uint256 _i; _i < _withdrawalIds.length;) { _withdrawalId = _withdrawalIds[_i]; _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId, _governor); if (mainchainWithdrew(_withdrawalId)) { @@ -187,26 +184,22 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function tryBulkDepositFor( - Transfer.Receipt[] calldata _receipts - ) external whenNotPaused onlyBridgeOperator returns (bool[] memory _executedReceipts) { - address _sender = msg.sender; - - Transfer.Receipt memory _receipt; - _executedReceipts = new bool[](_receipts.length); - uint256 _minVoteWeight = minimumVoteWeight(); - IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 _i; _i < _receipts.length; ) { - _receipt = _receipts[_i]; - _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, _receipt.id, _sender); - if (depositVote[_receipt.mainchain.chainId][_receipt.id].status == VoteStatus.Executed) { - _executedReceipts[_i] = true; + function tryBulkDepositFor(Transfer.Receipt[] calldata receipts) + external + whenNotPaused + onlyBridgeOperator + returns (bool[] memory _executedReceipts) + { + _executedReceipts = new bool[](receipts.length); + uint256 minVoteWeight = minimumVoteWeight(); + + Transfer.Receipt memory iReceipt; + for (uint i; i < receipts.length; ++i) { + iReceipt = receipts[i]; + if (depositVote[iReceipt.mainchain.chainId][iReceipt.id].status == VoteStatus.Executed) { + _executedReceipts[i] = true; } else { - _depositFor(_receipt, _sender, _minVoteWeight); - } - - unchecked { - ++_i; + _depositFor(iReceipt, msg.sender, minVoteWeight); } } } @@ -224,7 +217,7 @@ contract RoninGatewayV3 is function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external whenNotPaused { if (_requests.length == 0) revert ErrEmptyArray(); - for (uint256 _i; _i < _requests.length; ) { + for (uint256 _i; _i < _requests.length;) { _requestWithdrawalFor(_requests[_i], msg.sender, _chainId); unchecked { ++_i; @@ -263,7 +256,7 @@ contract RoninGatewayV3 is uint256 id; IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 _i; _i < withdrawals.length; ) { + for (uint256 _i; _i < withdrawals.length;) { id = withdrawals[_i]; _withdrawalSig[id][operator] = signatures[_i]; _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Withdrawal, id, operator); @@ -338,10 +331,11 @@ contract RoninGatewayV3 is uint256[] calldata _chainIds, Token.Standard[] calldata _standards ) internal { - if (!(_roninTokens.length == _mainchainTokens.length && _roninTokens.length == _chainIds.length)) + if (!(_roninTokens.length == _mainchainTokens.length && _roninTokens.length == _chainIds.length)) { revert ErrLengthMismatch(msg.sig); + } - for (uint256 _i; _i < _roninTokens.length; ) { + for (uint256 _i; _i < _roninTokens.length;) { _mainchainToken[_roninTokens[_i]][_chainIds[_i]].tokenAddr = _mainchainTokens[_i]; _mainchainToken[_roninTokens[_i]][_chainIds[_i]].erc = _standards[_i]; @@ -363,27 +357,30 @@ contract RoninGatewayV3 is uint256 id = receipt.id; receipt.info.validate(); if (receipt.kind != Transfer.Kind.Deposit) revert ErrInvalidReceiptKind(); - if (receipt.ronin.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, receipt.ronin.chainId, block.chainid); - MappedToken memory _token = getMainchainToken(receipt.ronin.tokenAddr, receipt.mainchain.chainId); + MappedToken memory token = getMainchainToken(receipt.ronin.tokenAddr, receipt.mainchain.chainId); - if (!(_token.erc == receipt.info.erc && _token.tokenAddr == receipt.mainchain.tokenAddr)) + if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.mainchain.tokenAddr)) { revert ErrInvalidReceipt(); + } IsolatedGovernance.Vote storage _proposal = depositVote[receipt.mainchain.chainId][id]; bytes32 _receiptHash = receipt.hash(); - VoteStatus _status = _castIsolatedVote(_proposal, operator, minVoteWeight, _receiptHash); + VoteStatus status = _castIsolatedVote(_proposal, operator, minVoteWeight, _receiptHash); emit DepositVoted(operator, id, receipt.mainchain.chainId, _receiptHash); - if (_status == VoteStatus.Approved) { + + // Transfer assets and handle when the vote is approved. + IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); + if (status == VoteStatus.Approved) { _proposal.status = VoteStatus.Executed; receipt.info.handleAssetTransfer(payable(receipt.ronin.addr), receipt.ronin.tokenAddr, IWETH(address(0))); - IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)).handleVoteApproved( - IBridgeTracking.VoteKind.Deposit, - receipt.id - ); + _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Deposit, receipt.id); emit Deposited(_receiptHash, receipt); } + + // Announce to BridgeTracking to record the vote, after marking the VoteStatus as Executed. + _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, receipt.id, operator); } /** @@ -418,12 +415,8 @@ contract RoninGatewayV3 is address _mainchainTokenAddr ) internal returns (uint256 _withdrawalId) { _withdrawalId = withdrawalCount++; - Transfer.Receipt memory _receipt = _request.into_withdrawal_receipt( - _requester, - _withdrawalId, - _mainchainTokenAddr, - _chainId - ); + Transfer.Receipt memory _receipt = + _request.into_withdrawal_receipt(_requester, _withdrawalId, _mainchainTokenAddr, _chainId); withdrawal[_withdrawalId] = _receipt; emit WithdrawalRequested(_receipt.hash(), _receipt); } @@ -468,9 +461,8 @@ contract RoninGatewayV3 is IsolatedGovernance.Vote storage _v, bytes32 _hash ) internal view returns (uint256 _totalWeight) { - (, address[] memory bridgeOperators, uint96[] memory weights) = IBridgeManager( - getContract(ContractType.BRIDGE_MANAGER) - ).getFullBridgeOperatorInfos(); + (, address[] memory bridgeOperators, uint96[] memory weights) = + IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getFullBridgeOperatorInfos(); uint256 length = bridgeOperators.length; unchecked { for (uint _i; _i < length; ++_i) { @@ -513,11 +505,7 @@ contract RoninGatewayV3 is _trustedDenom = _trustedDenominator; unchecked { emit TrustedThresholdUpdated( - nonce++, - _trustedNumerator, - _trustedDenominator, - _previousTrustedNum, - _previousTrustedDenom + nonce++, _trustedNumerator, _trustedDenominator, _previousTrustedNum, _previousTrustedDenom ); } } From 1274c9cadc0c6fa3b21e57b700b753473478a566 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 10:11:45 +0700 Subject: [PATCH 006/305] nit(RoninGateway): convention Co-authored-by: HuyHuynh <63286199+huyhuynh3103@users.noreply.github.com> Signed-off-by: Bao --- src/ronin/gateway/RoninGatewayV3.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 2475fb04..4c2f0b2d 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -157,10 +157,10 @@ contract RoninGatewayV3 is uint256 _withdrawalId; _executedReceipts = new bool[](_withdrawalIds.length); - IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); + IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); for (uint256 _i; _i < _withdrawalIds.length;) { _withdrawalId = _withdrawalIds[_i]; - _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId, _governor); + bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId, _governor); if (mainchainWithdrew(_withdrawalId)) { _executedReceipts[_i] = true; } else { @@ -170,7 +170,7 @@ contract RoninGatewayV3 is VoteStatus _status = _castIsolatedVote(_vote, _governor, _minVoteWeight, _hash); if (_status == VoteStatus.Approved) { _vote.status = VoteStatus.Executed; - _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId); + bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId); emit MainchainWithdrew(_hash, _withdrawal); } } @@ -371,16 +371,16 @@ contract RoninGatewayV3 is emit DepositVoted(operator, id, receipt.mainchain.chainId, _receiptHash); // Transfer assets and handle when the vote is approved. - IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); + IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); if (status == VoteStatus.Approved) { _proposal.status = VoteStatus.Executed; receipt.info.handleAssetTransfer(payable(receipt.ronin.addr), receipt.ronin.tokenAddr, IWETH(address(0))); - _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Deposit, receipt.id); + bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Deposit, receipt.id); emit Deposited(_receiptHash, receipt); } // Announce to BridgeTracking to record the vote, after marking the VoteStatus as Executed. - _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, receipt.id, operator); + bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, receipt.id, operator); } /** From 2cc5f8ed3c5003e8c1f9923eb5e347c6b014b4a4 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 10:23:22 +0700 Subject: [PATCH 007/305] fix(RoninGateway): cache calldata length, nit `_i` --- src/ronin/gateway/RoninGatewayV3.sol | 63 +++++++++++++--------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 4c2f0b2d..565e1f27 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -152,32 +152,31 @@ contract RoninGatewayV3 is onlyBridgeOperator returns (bool[] memory _executedReceipts) { - address _governor = msg.sender; - uint256 _minVoteWeight = minimumVoteWeight(); + address governor = msg.sender; + uint256 minVoteWeight = minimumVoteWeight(); - uint256 _withdrawalId; - _executedReceipts = new bool[](_withdrawalIds.length); + uint256 withdrawalId; + uint length = _withdrawalIds.length; + + _executedReceipts = new bool[](length); IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 _i; _i < _withdrawalIds.length;) { - _withdrawalId = _withdrawalIds[_i]; - bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId, _governor); - if (mainchainWithdrew(_withdrawalId)) { - _executedReceipts[_i] = true; + + for (uint256 i; i < length; i++) { + withdrawalId = _withdrawalIds[i]; + bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId, governor); + if (mainchainWithdrew(withdrawalId)) { + _executedReceipts[i] = true; } else { - IsolatedGovernance.Vote storage _vote = mainchainWithdrewVote[_withdrawalId]; - Transfer.Receipt memory _withdrawal = withdrawal[_withdrawalId]; + IsolatedGovernance.Vote storage _vote = mainchainWithdrewVote[withdrawalId]; + Transfer.Receipt memory _withdrawal = withdrawal[withdrawalId]; bytes32 _hash = _withdrawal.hash(); - VoteStatus _status = _castIsolatedVote(_vote, _governor, _minVoteWeight, _hash); + VoteStatus _status = _castIsolatedVote(_vote, governor, minVoteWeight, _hash); if (_status == VoteStatus.Approved) { _vote.status = VoteStatus.Executed; - bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId); + bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId); emit MainchainWithdrew(_hash, _withdrawal); } } - - unchecked { - ++_i; - } } } @@ -190,11 +189,12 @@ contract RoninGatewayV3 is onlyBridgeOperator returns (bool[] memory _executedReceipts) { - _executedReceipts = new bool[](receipts.length); + uint length = receipts.length; + _executedReceipts = new bool[](length); uint256 minVoteWeight = minimumVoteWeight(); Transfer.Receipt memory iReceipt; - for (uint i; i < receipts.length; ++i) { + for (uint i; i < length; ++i) { iReceipt = receipts[i]; if (depositVote[iReceipt.mainchain.chainId][iReceipt.id].status == VoteStatus.Executed) { _executedReceipts[i] = true; @@ -214,14 +214,12 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external whenNotPaused { - if (_requests.length == 0) revert ErrEmptyArray(); + function bulkRequestWithdrawalFor(Transfer.Request[] calldata requests, uint256 chainId) external whenNotPaused { + uint length = requests.length; + if (length == 0) revert ErrEmptyArray(); - for (uint256 _i; _i < _requests.length;) { - _requestWithdrawalFor(_requests[_i], msg.sender, _chainId); - unchecked { - ++_i; - } + for (uint i; i < length; ++i) { + _requestWithdrawalFor(requests[i], msg.sender, chainId); } } @@ -248,7 +246,8 @@ contract RoninGatewayV3 is ) external whenNotPaused onlyBridgeOperator { address operator = msg.sender; - if (!(withdrawals.length > 0 && withdrawals.length == signatures.length)) { + uint length = withdrawals.length; + if (!(length > 0 && length == signatures.length)) { revert ErrLengthMismatch(msg.sig); } @@ -256,9 +255,9 @@ contract RoninGatewayV3 is uint256 id; IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 _i; _i < withdrawals.length;) { - id = withdrawals[_i]; - _withdrawalSig[id][operator] = signatures[_i]; + for (uint i; i < length; ++i) { + id = withdrawals[i]; + _withdrawalSig[id][operator] = signatures[i]; _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Withdrawal, id, operator); IsolatedGovernance.Vote storage _proposal = withdrawalStatVote[id]; @@ -267,10 +266,6 @@ contract RoninGatewayV3 is _proposal.status = VoteStatus.Executed; _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Withdrawal, id); } - - unchecked { - ++_i; - } } } From a524543b615c7703693d1f0374e939d10c6169e6 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Jan 2024 15:35:30 +0700 Subject: [PATCH 008/305] fix(BridgeReward): clean up slot naming --- src/ronin/gateway/BridgeReward.sol | 84 +++++++++++------------------- 1 file changed, 30 insertions(+), 54 deletions(-) diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index edb10d0b..4a445ae0 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -17,19 +17,15 @@ import { ErrSyncTooFarPeriod, ErrInvalidArguments, ErrLengthMismatch, ErrUnautho contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONTransferHelper, Initializable { /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeReward.rewardInfo.slot") - 1 - bytes32 private constant REWARD_INFO_SLOT = 0x518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a; + bytes32 private constant $_REWARD_INFO = 0x518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a; /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeReward.rewardPerPeriod.slot") - 1 - TUint256Slot private constant REWARD_PER_PERIOD_SLOT = - TUint256Slot.wrap(0x90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910); + TUint256Slot private constant $_REWARD_PER_PERIOD = TUint256Slot.wrap(0x90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910); /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeReward.latestRewardedPeriod.slot") - 1 - TUint256Slot private constant LATEST_REWARDED_PERIOD_SLOT = - TUint256Slot.wrap(0x2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619); + TUint256Slot private constant $_LATEST_REWARDED_PERIOD = TUint256Slot.wrap(0x2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619); /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeReward.totalRewardToppedUp.slot") - 1 - TUint256Slot private constant TOTAL_REWARDS_TOPPED_UP_SLOT = - TUint256Slot.wrap(0x9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c64); + TUint256Slot private constant $_TOTAL_REWARDS_TOPPED_UP = TUint256Slot.wrap(0x9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c64); /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeReward.totalRewardScattered.slot") - 1 - TUint256Slot private constant TOTAL_REWARDS_SCATTERED_SLOT = - TUint256Slot.wrap(0x3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f4); + TUint256Slot private constant $_TOTAL_REWARDS_SCATTERED = TUint256Slot.wrap(0x3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f4); address private immutable _self; @@ -51,7 +47,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT _setContract(ContractType.BRIDGE_SLASH, bridgeSlashContract); _setContract(ContractType.VALIDATOR, validatorSetContract); _setContract(ContractType.GOVERNANCE_ADMIN, dposGA); - LATEST_REWARDED_PERIOD_SLOT.store(type(uint256).max); + $_LATEST_REWARDED_PERIOD.store(type(uint256).max); _setRewardPerPeriod(rewardPerPeriod); _receiveRON(); } @@ -62,7 +58,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT */ function initializeREP2() external onlyContract(ContractType.GOVERNANCE_ADMIN) { require(getLatestRewardedPeriod() == type(uint256).max, "already init rep 2"); - LATEST_REWARDED_PERIOD_SLOT.store(IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod() - 1); + $_LATEST_REWARDED_PERIOD.store(IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod() - 1); _setContract(ContractType.GOVERNANCE_ADMIN, address(0)); } @@ -85,23 +81,19 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT if (currentPeriod <= latestRewardedPeriod) revert ErrInvalidArguments(msg.sig); if (latestRewardedPeriod + periodLength > currentPeriod) revert ErrInvalidArguments(msg.sig); - LATEST_REWARDED_PERIOD_SLOT.addAssign(periodLength); + $_LATEST_REWARDED_PERIOD.addAssign(periodLength); address[] memory operators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators(); IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 i = 1; i <= periodLength; ) { - unchecked { - _syncReward({ - operators: operators, - ballots: bridgeTrackingContract.getManyTotalBallots(latestRewardedPeriod, operators), - totalBallot: bridgeTrackingContract.totalBallot(latestRewardedPeriod), - totalVote: bridgeTrackingContract.totalVote(latestRewardedPeriod), - period: latestRewardedPeriod += i - }); - - ++i; - } + for (uint256 i = 1; i <= periodLength; i++) { + _syncReward({ + operators: operators, + ballots: bridgeTrackingContract.getManyTotalBallots(latestRewardedPeriod, operators), + totalBallot: bridgeTrackingContract.totalBallot(latestRewardedPeriod), + totalVote: bridgeTrackingContract.totalVote(latestRewardedPeriod), + period: latestRewardedPeriod + i + }); } } @@ -126,29 +118,23 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT if (period < latestRewardedPeriod + 1) revert ErrInvalidArguments(msg.sig); else if (period > latestRewardedPeriod + 1) revert ErrSyncTooFarPeriod(period, latestRewardedPeriod); } - LATEST_REWARDED_PERIOD_SLOT.store(period); - - _syncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); + $_LATEST_REWARDED_PERIOD.store(period); + + _syncReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); } /** * @inheritdoc IBridgeReward */ function getTotalRewardToppedUp() external view returns (uint256) { - return TOTAL_REWARDS_TOPPED_UP_SLOT.load(); + return $_TOTAL_REWARDS_TOPPED_UP.load(); } /** * @inheritdoc IBridgeReward */ function getTotalRewardScattered() external view returns (uint256) { - return TOTAL_REWARDS_SCATTERED_SLOT.load(); + return $_TOTAL_REWARDS_SCATTERED.load(); } /** @@ -158,8 +144,8 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT // prevent transfer RON directly to logic contract if (address(this) == _self) revert ErrUnauthorizedCall(msg.sig); - emit SafeReceived(msg.sender, TOTAL_REWARDS_TOPPED_UP_SLOT.load(), msg.value); - TOTAL_REWARDS_TOPPED_UP_SLOT.addAssign(msg.value); + emit SafeReceived(msg.sender, $_TOTAL_REWARDS_TOPPED_UP.load(), msg.value); + $_TOTAL_REWARDS_TOPPED_UP.addAssign(msg.value); } /** @@ -170,13 +156,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT * @param totalVote The total number of votes recorded for the period. * @param period The period for which the rewards are being synchronized. */ - function _syncReward( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote, - uint256 period - ) internal { + function _syncReward(address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote, uint256 period) internal { uint256 numBridgeOperators = operators.length; uint256 rewardPerPeriod = getRewardPerPeriod(); uint256[] memory slashedDurationList = _getSlashInfo(operators); @@ -206,7 +186,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT } } - TOTAL_REWARDS_SCATTERED_SLOT.addAssign(sumRewards); + $_TOTAL_REWARDS_SCATTERED.addAssign(sumRewards); } /** @@ -215,11 +195,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT * * Emit a {BridgeTrackingIncorrectlyResponded} event when in case of incorrect data. */ - function _shouldShareEqually( - uint256 totalBallot, - uint256 totalVote, - uint256[] memory ballots - ) internal returns (bool shareEqually) { + function _shouldShareEqually(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) internal returns (bool shareEqually) { bool valid = _isValidBridgeTrackingResponse(totalBallot, totalVote, ballots); if (!valid) { emit BridgeTrackingIncorrectlyResponded(); @@ -308,14 +284,14 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT * @inheritdoc IBridgeReward */ function getRewardPerPeriod() public view returns (uint256) { - return REWARD_PER_PERIOD_SLOT.load(); + return $_REWARD_PER_PERIOD.load(); } /** * @inheritdoc IBridgeReward */ function getLatestRewardedPeriod() public view returns (uint256) { - return LATEST_REWARDED_PERIOD_SLOT.load(); + return $_LATEST_REWARDED_PERIOD.load(); } /** @@ -330,7 +306,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT * Emit an {UpdatedRewardPerPeriod} event after set. */ function _setRewardPerPeriod(uint256 rewardPerPeriod) internal { - REWARD_PER_PERIOD_SLOT.store(rewardPerPeriod); + $_REWARD_PER_PERIOD.store(rewardPerPeriod); emit UpdatedRewardPerPeriod(rewardPerPeriod); } @@ -354,7 +330,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT */ function _getRewardInfo() internal pure returns (mapping(address => BridgeRewardInfo) storage rewardInfo) { assembly ("memory-safe") { - rewardInfo.slot := REWARD_INFO_SLOT + rewardInfo.slot := $_REWARD_INFO } } } From 0e049752f6694432e7569041ac42896c3cdf2a3d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Jan 2024 15:36:34 +0700 Subject: [PATCH 009/305] chore: set compiler to 0.8.23 --- src/ronin/gateway/BridgeReward.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index 4a445ae0..a70fde37 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.9; +pragma solidity ^0.8.23; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { BridgeTrackingHelper } from "../../extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; From ac909cd05fa63fd6860980ead947d0022f8cdcb9 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Jan 2024 15:44:17 +0700 Subject: [PATCH 010/305] fix(MainchainGateway): clean up naming `_` --- src/mainchain/MainchainGatewayV3.sol | 173 +++++++++++---------------- 1 file changed, 72 insertions(+), 101 deletions(-) diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 68be6019..770ffef8 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity ^0.8.23; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; @@ -10,13 +10,7 @@ import "../extensions/WithdrawalLimitation.sol"; import "../libraries/Transfer.sol"; import "../interfaces/IMainchainGatewayV3.sol"; -contract MainchainGatewayV3 is - WithdrawalLimitation, - Initializable, - AccessControlEnumerable, - IMainchainGatewayV3, - HasContracts -{ +contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessControlEnumerable, IMainchainGatewayV3, HasContracts { using Token for Token.Info; using Transfer for Transfer.Request; using Transfer for Transfer.Receipt; @@ -30,7 +24,7 @@ contract MainchainGatewayV3 is uint256 public roninChainId; /// @dev Total deposit uint256 public depositCount; - /// @dev Domain seperator + /// @dev Domain separator bytes32 internal _domainSeparator; /// @dev Mapping from mainchain token => token address on Ronin network mapping(address => MappedToken) internal _roninToken; @@ -147,31 +141,31 @@ contract MainchainGatewayV3 is /** * @inheritdoc IMainchainGatewayV3 */ - function unlockWithdrawal(Transfer.Receipt calldata _receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) { - bytes32 _receiptHash = _receipt.hash(); - if (withdrawalHash[_receipt.id] != _receipt.hash()) { + function unlockWithdrawal(Transfer.Receipt calldata receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) { + bytes32 _receiptHash = receipt.hash(); + if (withdrawalHash[receipt.id] != receipt.hash()) { revert ErrInvalidReceipt(); } - if (!withdrawalLocked[_receipt.id]) { + if (!withdrawalLocked[receipt.id]) { revert ErrQueryForApprovedWithdrawal(); } - delete withdrawalLocked[_receipt.id]; - emit WithdrawalUnlocked(_receiptHash, _receipt); - - address _token = _receipt.mainchain.tokenAddr; - if (_receipt.info.erc == Token.Standard.ERC20) { - Token.Info memory _feeInfo = _receipt.info; - _feeInfo.quantity = _computeFeePercentage(_receipt.info.quantity, unlockFeePercentages[_token]); - Token.Info memory _withdrawInfo = _receipt.info; - _withdrawInfo.quantity = _receipt.info.quantity - _feeInfo.quantity; - - _feeInfo.handleAssetTransfer(payable(msg.sender), _token, wrappedNativeToken); - _withdrawInfo.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken); + delete withdrawalLocked[receipt.id]; + emit WithdrawalUnlocked(_receiptHash, receipt); + + address token = receipt.mainchain.tokenAddr; + if (receipt.info.erc == Token.Standard.ERC20) { + Token.Info memory feeInfo = receipt.info; + feeInfo.quantity = _computeFeePercentage(receipt.info.quantity, unlockFeePercentages[token]); + Token.Info memory withdrawInfo = receipt.info; + withdrawInfo.quantity = receipt.info.quantity - feeInfo.quantity; + + feeInfo.handleAssetTransfer(payable(msg.sender), token, wrappedNativeToken); + withdrawInfo.handleAssetTransfer(payable(receipt.mainchain.addr), token, wrappedNativeToken); } else { - _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken); + receipt.info.handleAssetTransfer(payable(receipt.mainchain.addr), token, wrappedNativeToken); } - emit Withdrew(_receiptHash, _receipt); + emit Withdrew(_receiptHash, receipt); } /** @@ -210,9 +204,9 @@ contract MainchainGatewayV3 is /** * @inheritdoc IMainchainGatewayV3 */ - function getRoninToken(address _mainchainToken) public view returns (MappedToken memory _token) { - _token = _roninToken[_mainchainToken]; - if (_token.tokenAddr == address(0)) revert ErrUnsupportedToken(); + function getRoninToken(address mainchainToken) public view returns (MappedToken memory token) { + token = _roninToken[mainchainToken]; + if (token.tokenAddr == address(0)) revert ErrUnsupportedToken(); } /** @@ -224,25 +218,15 @@ contract MainchainGatewayV3 is * Emits the `TokenMapped` event. * */ - function _mapTokens( - address[] calldata _mainchainTokens, - address[] calldata _roninTokens, - Token.Standard[] calldata _standards - ) internal virtual { - if (!(_mainchainTokens.length == _roninTokens.length && _mainchainTokens.length == _standards.length)) { - revert ErrLengthMismatch(msg.sig); - } + function _mapTokens(address[] calldata mainchainTokens, address[] calldata roninTokens, Token.Standard[] calldata standards) internal virtual { + if (!(mainchainTokens.length == roninTokens.length && mainchainTokens.length == standards.length)) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _mainchainTokens.length;) { - _roninToken[_mainchainTokens[_i]].tokenAddr = _roninTokens[_i]; - _roninToken[_mainchainTokens[_i]].erc = _standards[_i]; - - unchecked { - ++_i; - } + for (uint256 i; i < mainchainTokens.length; i++) { + _roninToken[mainchainTokens[i]].tokenAddr = roninTokens[i]; + _roninToken[mainchainTokens[i]].erc = standards[i]; } - emit TokenMapped(_mainchainTokens, _roninTokens, _standards); + emit TokenMapped(mainchainTokens, roninTokens, standards); } /** @@ -259,75 +243,67 @@ contract MainchainGatewayV3 is * Emits the `Withdrew` once the assets are released. * */ - function _submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] memory _signatures) - internal - virtual - returns (bool _locked) - { - uint256 _id = _receipt.id; - uint256 _quantity = _receipt.info.quantity; - address _tokenAddr = _receipt.mainchain.tokenAddr; + function _submitWithdrawal(Transfer.Receipt calldata receipt, Signature[] memory signatures) internal virtual returns (bool locked) { + uint256 id = receipt.id; + uint256 quantity = receipt.info.quantity; + address tokenAddr = receipt.mainchain.tokenAddr; - _receipt.info.validate(); - if (_receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind(); + receipt.info.validate(); + if (receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind(); - if (_receipt.mainchain.chainId != block.chainid) { - revert ErrInvalidChainId(msg.sig, _receipt.mainchain.chainId, block.chainid); + if (receipt.mainchain.chainId != block.chainid) { + revert ErrInvalidChainId(msg.sig, receipt.mainchain.chainId, block.chainid); } - MappedToken memory _token = getRoninToken(_receipt.mainchain.tokenAddr); + MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr); - if (!(_token.erc == _receipt.info.erc && _token.tokenAddr == _receipt.ronin.tokenAddr)) revert ErrInvalidReceipt(); + if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr)) revert ErrInvalidReceipt(); - if (withdrawalHash[_id] != 0) revert ErrQueryForProcessedWithdrawal(); + if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal(); - if (!(_receipt.info.erc == Token.Standard.ERC721 || !_reachedWithdrawalLimit(_tokenAddr, _quantity))) { + if (!(receipt.info.erc == Token.Standard.ERC721 || !_reachedWithdrawalLimit(tokenAddr, quantity))) { revert ErrReachedDailyWithdrawalLimit(); } - bytes32 _receiptHash = _receipt.hash(); - bytes32 _receiptDigest = Transfer.receiptDigest(_domainSeparator, _receiptHash); + bytes32 receiptHash = receipt.hash(); + bytes32 receiptDigest = Transfer.receiptDigest(_domainSeparator, receiptHash); - uint256 _minimumVoteWeight; - (_minimumVoteWeight, _locked) = _computeMinVoteWeight(_receipt.info.erc, _tokenAddr, _quantity); + uint256 minimumWeight; + (minimumWeight, locked) = _computeMinVoteWeight(receipt.info.erc, tokenAddr, quantity); { - bool _passed; - address _signer; - address _lastSigner; - Signature memory _sig; - uint256 _weight; - for (uint256 _i; _i < _signatures.length;) { - _sig = _signatures[_i]; - _signer = ecrecover(_receiptDigest, _sig.v, _sig.r, _sig.s); - if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig); - - _lastSigner = _signer; - - _weight += _getWeight(_signer); - if (_weight >= _minimumVoteWeight) { - _passed = true; + bool passed; + address signer; + address lastSigner; + Signature memory sig; + uint256 weight; + for (uint256 i; i < signatures.length; i++) { + sig = signatures[i]; + signer = ecrecover(receiptDigest, sig.v, sig.r, sig.s); + if (lastSigner >= signer) revert ErrInvalidOrder(msg.sig); + + lastSigner = signer; + + weight += _getWeight(signer); + if (weight >= minimumWeight) { + passed = true; break; } - - unchecked { - ++_i; - } } - if (!_passed) revert ErrQueryForInsufficientVoteWeight(); - withdrawalHash[_id] = _receiptHash; + if (!passed) revert ErrQueryForInsufficientVoteWeight(); + withdrawalHash[id] = receiptHash; } - if (_locked) { - withdrawalLocked[_id] = true; - emit WithdrawalLocked(_receiptHash, _receipt); - return _locked; + if (locked) { + withdrawalLocked[id] = true; + emit WithdrawalLocked(receiptHash, receipt); + return locked; } - _recordWithdrawal(_tokenAddr, _quantity); - _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _tokenAddr, wrappedNativeToken); - emit Withdrew(_receiptHash, _receipt); + _recordWithdrawal(tokenAddr, quantity); + receipt.info.handleAssetTransfer(payable(receipt.mainchain.addr), tokenAddr, wrappedNativeToken); + emit Withdrew(receiptHash, receipt); } /** @@ -367,8 +343,7 @@ contract MainchainGatewayV3 is } uint256 _depositId = depositCount++; - Transfer.Receipt memory _receipt = - _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId); + Transfer.Receipt memory _receipt = _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId); emit DepositRequested(_receipt.hash(), _receipt); } @@ -376,11 +351,7 @@ contract MainchainGatewayV3 is /** * @dev Returns the minimum vote weight for the token. */ - function _computeMinVoteWeight(Token.Standard _erc, address _token, uint256 _quantity) - internal - virtual - returns (uint256 _weight, bool _locked) - { + function _computeMinVoteWeight(Token.Standard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) { uint256 _totalWeight = _getTotalWeight(); _weight = _minimumVoteWeight(_totalWeight); if (_erc == Token.Standard.ERC20) { From f7ba362976ba337b2e037dcd414a53a622a5b053 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Jan 2024 16:19:32 +0700 Subject: [PATCH 011/305] fix(BridgeManager): prettier --- .../BridgeManager.sol | 51 +++++-------------- 1 file changed, 13 insertions(+), 38 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index e871e624..bd2ca0d6 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -16,43 +16,37 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac using EnumerableSet for EnumerableSet.AddressSet; /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.governorToBridgeOperatorInfo.slot") - 1 - bytes32 private constant GOVERNOR_TO_BRIDGE_OPERATOR_INFO_SLOT = - 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3; + bytes32 private constant GOVERNOR_TO_BRIDGE_OPERATOR_INFO_SLOT = 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3; /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.govenorOf.slot") - 1 bytes32 private constant GOVENOR_OF_SLOT = 0x8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3; /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.governors.slot") - 1 bytes32 private constant GOVERNOR_SET_SLOT = 0x546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c; /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.bridgeOperators.slot") - 1 - bytes32 private constant BRIDGE_OPERATOR_SET_SLOT = - 0xd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d; + bytes32 private constant BRIDGE_OPERATOR_SET_SLOT = 0xd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d; /** * @dev The numerator value used for calculations in the contract. * @notice value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.numerator.slot") - 1 */ - TUint256Slot internal constant NUMERATOR_SLOT = - TUint256Slot.wrap(0xc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f); + TUint256Slot internal constant NUMERATOR_SLOT = TUint256Slot.wrap(0xc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f); /** * @dev The denominator value used for calculations in the contract. * @notice value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.denominator.slot") - 1 */ - TUint256Slot internal constant DENOMINATOR_SLOT = - TUint256Slot.wrap(0xac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff); + TUint256Slot internal constant DENOMINATOR_SLOT = TUint256Slot.wrap(0xac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff); /** * @dev The nonce value used for tracking nonces in the contract. * @notice value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.nonce.slot") - 1 */ - TUint256Slot internal constant NONCE_SLOT = - TUint256Slot.wrap(0x92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d); + TUint256Slot internal constant NONCE_SLOT = TUint256Slot.wrap(0x92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d); /** * @dev The total weight value used for storing the cumulative weight in the contract. * @notice value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.totalWeights.slot") - 1 */ - TUint256Slot internal constant TOTAL_WEIGHTS_SLOT = - TUint256Slot.wrap(0x6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c); + TUint256Slot internal constant TOTAL_WEIGHTS_SLOT = TUint256Slot.wrap(0x6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c); /** * @inheritdoc IBridgeManager @@ -105,9 +99,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac /** * @inheritdoc IBridgeManager */ - function removeBridgeOperators( - address[] calldata bridgeOperators - ) external onlySelfCall returns (bool[] memory removeds) { + function removeBridgeOperators(address[] calldata bridgeOperators) external onlySelfCall returns (bool[] memory removeds) { removeds = _removeBridgeOperators(bridgeOperators); } @@ -137,10 +129,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac _governorOf[newBridgeOperator] = msg.sender; _gorvernorToBridgeOperatorInfo[msg.sender].addr = newBridgeOperator; - _notifyRegisters( - IBridgeManagerCallback.onBridgeOperatorUpdated.selector, - abi.encode(currentBridgeOperator, newBridgeOperator) - ); + _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorUpdated.selector, abi.encode(currentBridgeOperator, newBridgeOperator)); emit BridgeOperatorUpdated(msg.sender, currentBridgeOperator, newBridgeOperator); } @@ -156,10 +145,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac /** * @inheritdoc IQuorum */ - function setThreshold( - uint256 numerator, - uint256 denominator - ) external override onlySelfCall returns (uint256, uint256) { + function setThreshold(uint256 numerator, uint256 denominator) external override onlySelfCall returns (uint256, uint256) { return _setThreshold(numerator, denominator); } @@ -187,9 +173,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac /** * @inheritdoc IBridgeManager */ - function sumGovernorsWeight( - address[] calldata governors - ) external view nonDuplicate(governors) returns (uint256 sum) { + function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) { sum = _sumGovernorsWeight(governors); } @@ -375,9 +359,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac * @param bridgeOperators An array of addresses representing the bridge operators to be removed. * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed. */ - function _removeBridgeOperators( - address[] memory bridgeOperators - ) internal nonDuplicate(bridgeOperators) returns (bool[] memory removeds) { + function _removeBridgeOperators(address[] memory bridgeOperators) internal nonDuplicate(bridgeOperators) returns (bool[] memory removeds) { uint256 length = bridgeOperators.length; removeds = new bool[](length); // simply skip remove operations if inputs are empty. @@ -431,10 +413,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac * Emits the `ThresholdUpdated` event. * */ - function _setThreshold( - uint256 numerator, - uint256 denominator - ) internal virtual returns (uint256 previousNum, uint256 previousDenom) { + function _setThreshold(uint256 numerator, uint256 denominator) internal virtual returns (uint256 previousNum, uint256 previousDenom) { if (numerator > denominator) revert ErrInvalidThreshold(msg.sig); previousNum = NUMERATOR_SLOT.load(); @@ -540,11 +519,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac * @dev Internal function to access the mapping from governor => BridgeOperatorInfo. * @return governorToBridgeOperatorInfo the mapping from governor => BridgeOperatorInfo. */ - function _getGovernorToBridgeOperatorInfo() - internal - pure - returns (mapping(address => BridgeOperatorInfo) storage governorToBridgeOperatorInfo) - { + function _getGovernorToBridgeOperatorInfo() internal pure returns (mapping(address => BridgeOperatorInfo) storage governorToBridgeOperatorInfo) { assembly ("memory-safe") { governorToBridgeOperatorInfo.slot := GOVERNOR_TO_BRIDGE_OPERATOR_INFO_SLOT } From c7d79aeab6edf5d2ebf13ba35c2d859d1dae8001 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Jan 2024 15:01:16 +0700 Subject: [PATCH 012/305] BREAKING CHANGE(BridgeManager): rework to reduce tx gas --- .../BridgeManager.sol | 550 ++++++++---------- .../BridgeManagerQuorum.sol | 76 +++ src/interfaces/bridge/IBridgeManager.sol | 41 +- .../bridge/IBridgeManagerThreshold.sol | 13 + .../bridge/events/IBridgeManagerEvents.sol | 33 +- 5 files changed, 365 insertions(+), 348 deletions(-) create mode 100644 src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol create mode 100644 src/interfaces/bridge/IBridgeManagerThreshold.sol diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index bd2ca0d6..a15d0dfe 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -1,58 +1,49 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity ^0.8.23; -import { IBridgeManagerCallback, EnumerableSet, BridgeManagerCallbackRegister } from "./BridgeManagerCallbackRegister.sol"; +import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; +import { IBridgeManagerCallback, BridgeManagerCallbackRegister } from "./BridgeManagerCallbackRegister.sol"; import { IHasContracts, HasContracts } from "../../extensions/collections/HasContracts.sol"; -import { IQuorum } from "../../interfaces/IQuorum.sol"; + import { IBridgeManager } from "../../interfaces/bridge/IBridgeManager.sol"; import { AddressArrayUtils } from "../../libraries/AddressArrayUtils.sol"; import { ContractType } from "../../utils/ContractType.sol"; import { RoleAccess } from "../../utils/RoleAccess.sol"; import { TUint256Slot } from "../../types/Types.sol"; import "../../utils/CommonErrors.sol"; +import "./BridgeManagerQuorum.sol"; -abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbackRegister, HasContracts { +abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQuorum, BridgeManagerCallbackRegister { using AddressArrayUtils for address[]; using EnumerableSet for EnumerableSet.AddressSet; - /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.governorToBridgeOperatorInfo.slot") - 1 - bytes32 private constant GOVERNOR_TO_BRIDGE_OPERATOR_INFO_SLOT = 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3; - /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.govenorOf.slot") - 1 - bytes32 private constant GOVENOR_OF_SLOT = 0x8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3; - /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.governors.slot") - 1 - bytes32 private constant GOVERNOR_SET_SLOT = 0x546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c; - /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.bridgeOperators.slot") - 1 - bytes32 private constant BRIDGE_OPERATOR_SET_SLOT = 0xd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d; - - /** - * @dev The numerator value used for calculations in the contract. - * @notice value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.numerator.slot") - 1 - */ - TUint256Slot internal constant NUMERATOR_SLOT = TUint256Slot.wrap(0xc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f); - - /** - * @dev The denominator value used for calculations in the contract. - * @notice value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.denominator.slot") - 1 - */ - TUint256Slot internal constant DENOMINATOR_SLOT = TUint256Slot.wrap(0xac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff); - - /** - * @dev The nonce value used for tracking nonces in the contract. - * @notice value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.nonce.slot") - 1 - */ - TUint256Slot internal constant NONCE_SLOT = TUint256Slot.wrap(0x92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d); + struct BridgeManagerStorage { + /// @notice List of the governors. + /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping. + address[] _governors; + address[] _operators; + /// @dev Mapping from address to the governor weight + mapping(address governor => uint96 weight) _governorWeight; + /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`. + mapping(address operator => uint96 weight) _operatorWeight; + /// @dev Total weight of all governors / operators. + uint256 _totalWeight; + } - /** - * @dev The total weight value used for storing the cumulative weight in the contract. - * @notice value is equal to keccak256("@ronin.dpos.gateway.BridgeAdmin.totalWeights.slot") - 1 - */ - TUint256Slot internal constant TOTAL_WEIGHTS_SLOT = TUint256Slot.wrap(0x6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c); + // keccak256(abi.encode(uint256(keccak256("ronin.storage.BridgeManagerStorageLocation")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300; /** * @inheritdoc IBridgeManager */ bytes32 public immutable DOMAIN_SEPARATOR; + function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) { + assembly { + $.slot := $$_BridgeManagerStorageLocation + } + } + modifier onlyGovernor() virtual { _requireGovernor(msg.sender); _; @@ -67,10 +58,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights - ) payable BridgeManagerCallbackRegister(callbackRegisters) { - NONCE_SLOT.store(1); - - _setThreshold(num, denom); + ) payable BridgeManagerQuorum(num, denom) BridgeManagerCallbackRegister(callbackRegisters) { _setContract(ContractType.BRIDGE, bridgeContract); DOMAIN_SEPARATOR = keccak256( @@ -85,54 +73,7 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac _addBridgeOperators(voteWeights, governors, bridgeOperators); } - /** - * @inheritdoc IBridgeManager - */ - function addBridgeOperators( - uint96[] calldata voteWeights, - address[] calldata governors, - address[] calldata bridgeOperators - ) external onlySelfCall returns (bool[] memory addeds) { - addeds = _addBridgeOperators(voteWeights, governors, bridgeOperators); - } - - /** - * @inheritdoc IBridgeManager - */ - function removeBridgeOperators(address[] calldata bridgeOperators) external onlySelfCall returns (bool[] memory removeds) { - removeds = _removeBridgeOperators(bridgeOperators); - } - - /** - * @inheritdoc IBridgeManager - * @notice This method checks authorization by querying the corresponding operator of the msg.sender and then - * attempts to remove it from the `_bridgeOperatorSet` for gas optimization. In case we allow a governor can leave - * their operator address blank null `address(0)`, consider add authorization check. - */ - function updateBridgeOperator(address newBridgeOperator) external onlyGovernor { - _requireNonZeroAddress(newBridgeOperator); - - // Queries the previous bridge operator - mapping(address => BridgeOperatorInfo) storage _gorvernorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo(); - address currentBridgeOperator = _gorvernorToBridgeOperatorInfo[msg.sender].addr; - if (currentBridgeOperator == newBridgeOperator) { - revert ErrBridgeOperatorAlreadyExisted(newBridgeOperator); - } - - // Tries replace the bridge operator - EnumerableSet.AddressSet storage _bridgeOperatorSet = _getBridgeOperatorSet(); - bool updated = _bridgeOperatorSet.remove(currentBridgeOperator) && _bridgeOperatorSet.add(newBridgeOperator); - if (!updated) revert ErrBridgeOperatorUpdateFailed(newBridgeOperator); - - mapping(address => address) storage _governorOf = _getGovernorOf(); - delete _governorOf[currentBridgeOperator]; - _governorOf[newBridgeOperator] = msg.sender; - _gorvernorToBridgeOperatorInfo[msg.sender].addr = newBridgeOperator; - - _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorUpdated.selector, abi.encode(currentBridgeOperator, newBridgeOperator)); - - emit BridgeOperatorUpdated(msg.sender, currentBridgeOperator, newBridgeOperator); - } + // ===================== CONFIG ======================== /** * @inheritdoc IHasContracts @@ -143,17 +84,26 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac } /** - * @inheritdoc IQuorum + * @dev Internal function to require that the caller has governor role access. */ - function setThreshold(uint256 numerator, uint256 denominator) external override onlySelfCall returns (uint256, uint256) { - return _setThreshold(numerator, denominator); + function _requireGovernor(address addr) internal view { + if (_getGovernorWeight(addr) == 0) { + revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR); + } } + // ===================== WEIGHTS METHOD ======================== + /** * @inheritdoc IBridgeManager */ function getTotalWeight() public view returns (uint256) { - return TOTAL_WEIGHTS_SLOT.load(); + return _totalWeight(); + } + + function _totalWeight() internal view override returns (uint256) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + return $._totalWeight; } /** @@ -164,120 +114,114 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac } /** - * @inheritdoc IBridgeManager + * @dev Internal function to get the vote weights of a given array of governors. */ - function getGovernorWeight(address governor) external view returns (uint96 weight) { - weight = _getGovernorWeight(governor); + function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + uint256 length = governors.length; + weights = new uint96[](length); + + for (uint256 i; i < length; i++) { + weights[i] = $._governorWeight[governors[i]]; + } } /** * @inheritdoc IBridgeManager */ - function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) { - sum = _sumGovernorsWeight(governors); + function getGovernorWeight(address governor) external view returns (uint96 weight) { + weight = _getGovernorWeight(governor); } /** - * @inheritdoc IBridgeManager + * @dev Internal function to retrieve the vote weight of a specific governor. */ - function totalBridgeOperator() external view returns (uint256) { - return _getBridgeOperatorSet().length(); + function _getGovernorWeight(address governor) internal view returns (uint96) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + return $._governorWeight[governor]; } /** * @inheritdoc IBridgeManager */ - function isBridgeOperator(address addr) external view returns (bool) { - return _getBridgeOperatorSet().contains(addr); + function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) { + sum = _sumGovernorsWeight(governors); } /** - * @inheritdoc IBridgeManager + * @dev Internal function to calculate the sum of vote weights for a given array of governors. + * @param governors The non-duplicated input. */ - function getBridgeOperators() external view returns (address[] memory) { - return _getBridgeOperators(); + function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + + for (uint256 i; i < governors.length; i++) { + sum += $._governorWeight[governors[i]]; + } } /** * @inheritdoc IBridgeManager */ - function getGovernors() external view returns (address[] memory) { - return _getGovernors(); + function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + + return $._operatorWeight[bridgeOperator]; } /** - * @inheritdoc IBridgeManager + * @inheritdoc IQuorum */ - function getBridgeOperatorOf(address[] memory governors) public view returns (address[] memory bridgeOperators) { - uint256 length = governors.length; - bridgeOperators = new address[](length); + function minimumVoteWeight() public view virtual returns (uint256) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - mapping(address => BridgeOperatorInfo) storage _gorvernorToBridgeOperator = _getGovernorToBridgeOperatorInfo(); - for (uint256 i; i < length; ) { - bridgeOperators[i] = _gorvernorToBridgeOperator[governors[i]].addr; - unchecked { - ++i; - } - } + (uint256 numerator, uint256 denominator) = getThreshold(); + return (numerator * $._totalWeight + denominator - 1) / denominator; } + // ===================== MANAGER CRUD ======================== + /** * @inheritdoc IBridgeManager */ - function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors) { - uint256 length = bridgeOperators.length; - governors = new address[](length); - mapping(address => address) storage _governorOf = _getGovernorOf(); - - for (uint256 i; i < length; ) { - governors[i] = _governorOf[bridgeOperators[i]]; - unchecked { - ++i; - } - } + function addBridgeOperators( + uint96[] calldata voteWeights, + address[] calldata governors, + address[] calldata bridgeOperators + ) external onlySelfCall returns (bool[] memory addeds) { + addeds = _addBridgeOperators(voteWeights, governors, bridgeOperators); } /** * @inheritdoc IBridgeManager */ - function getFullBridgeOperatorInfos() - external - view - returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) - { - governors = _getGovernors(); - bridgeOperators = getBridgeOperatorOf(governors); - weights = _getGovernorWeights(governors); + function removeBridgeOperators(address[] calldata bridgeOperators) external onlySelfCall returns (bool[] memory removeds) { + removeds = _removeBridgeOperators(bridgeOperators); } /** * @inheritdoc IBridgeManager */ - function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) { - mapping(address => address) storage _governorOf = _getGovernorOf(); - mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo(); - weight = _governorToBridgeOperatorInfo[_governorOf[bridgeOperator]].voteWeight; - } + function updateBridgeOperator(address currOperator, address newOperator) external onlyGovernor { + _requireNonZeroAddress(newOperator); - /** - * @inheritdoc IQuorum - */ - function minimumVoteWeight() public view virtual returns (uint256) { - return (NUMERATOR_SLOT.mul(TOTAL_WEIGHTS_SLOT.load()) + DENOMINATOR_SLOT.load() - 1) / DENOMINATOR_SLOT.load(); - } + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + if (currOperator == newOperator || $._governorWeight[newOperator] > 0 || $._operatorWeight[newOperator] > 0) { + revert ErrBridgeOperatorAlreadyExisted(newOperator); + } - /** - * @inheritdoc IQuorum - */ - function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) { - return (NUMERATOR_SLOT.load(), DENOMINATOR_SLOT.load()); - } + // Query the index of the operator in the array + (address requiredGovernor, uint idx) = _getGovernorOf(currOperator); + if (requiredGovernor != msg.sender) revert ErrGovernorNotMatch(requiredGovernor, msg.sender); - /** - * @inheritdoc IQuorum - */ - function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) { - return _voteWeight * DENOMINATOR_SLOT.load() >= NUMERATOR_SLOT.mul(TOTAL_WEIGHTS_SLOT.load()); + // Replace the bridge operator: (1) change in the array, (2) update weight of two addresses, (3) notify register + $._operators[idx] = newOperator; + $._operatorWeight[newOperator] = $._operatorWeight[currOperator]; + delete $._operatorWeight[currOperator]; + + _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorUpdated.selector, abi.encode(currOperator, newOperator)); + + emit BridgeOperatorUpdated(msg.sender, currOperator, newOperator); } /** @@ -289,63 +233,59 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac * - The caller must have the necessary permission to add bridge operators. * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal. * - * @param voteWeights An array of uint256 values representing the vote weights for each bridge operator. - * @param governors An array of addresses representing the governors for each bridge operator. * @return addeds An array of boolean values indicating whether each bridge operator was successfully added. */ function _addBridgeOperators( uint96[] memory voteWeights, - address[] memory governors, - address[] memory bridgeOperators - ) internal nonDuplicate(governors.extend(bridgeOperators)) returns (bool[] memory addeds) { - uint256 length = bridgeOperators.length; - if (!(length == voteWeights.length && length == governors.length)) revert ErrLengthMismatch(msg.sig); + address[] memory newGovernors, + address[] memory newOperators + ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + + uint256 length = newOperators.length; + if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig); addeds = new bool[](length); + // simply skip add operations if inputs are empty. if (length == 0) return addeds; - EnumerableSet.AddressSet storage _governorSet = _getGovernorsSet(); - mapping(address => address) storage _governorOf = _getGovernorOf(); - EnumerableSet.AddressSet storage _bridgeOperatorSet = _getBridgeOperatorSet(); - mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo(); - - address governor; - address bridgeOperator; + address iGovernor; + address iOperator; + uint96 iVoteWeight; uint256 accumulatedWeight; - BridgeOperatorInfo memory bridgeOperatorInfo; - for (uint256 i; i < length; ) { - governor = governors[i]; - bridgeOperator = bridgeOperators[i]; + for (uint256 i; i < length; i++) { + iGovernor = newGovernors[i]; + iOperator = newOperators[i]; + iVoteWeight = voteWeights[i]; - _requireNonZeroAddress(governor); - _requireNonZeroAddress(bridgeOperator); - if (voteWeights[i] == 0) revert ErrInvalidVoteWeight(msg.sig); + // Check non-zero inputs + _requireNonZeroAddress(iGovernor); + _requireNonZeroAddress(iOperator); + if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig); - addeds[i] = !(_governorSet.contains(governor) || - _governorSet.contains(bridgeOperator) || - _bridgeOperatorSet.contains(governor) || - _bridgeOperatorSet.contains(bridgeOperator)); + // Check not yet added operators + addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0; + // Only add the valid operator if (addeds[i]) { - _governorSet.add(governor); - _bridgeOperatorSet.add(bridgeOperator); - _governorOf[bridgeOperator] = governor; - bridgeOperatorInfo.addr = bridgeOperator; - accumulatedWeight += bridgeOperatorInfo.voteWeight = voteWeights[i]; - _governorToBridgeOperatorInfo[governor] = bridgeOperatorInfo; - } + // Add governor to list, update governor weight + $._governors.push(iGovernor); + $._governorWeight[iGovernor] = iVoteWeight; - unchecked { - ++i; + // Add operator to list, update governor weight + $._operators.push(iOperator); + $._operatorWeight[iOperator] = iVoteWeight; + + accumulatedWeight += iVoteWeight; } } - TOTAL_WEIGHTS_SLOT.addAssign(accumulatedWeight); + $._totalWeight += accumulatedWeight; - _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(bridgeOperators, addeds)); + _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, addeds)); - emit BridgeOperatorsAdded(addeds, voteWeights, governors, bridgeOperators); + emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators); } /** @@ -356,182 +296,170 @@ abstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbac * Requirements: * - The caller must have the necessary permission to remove bridge operators. * - * @param bridgeOperators An array of addresses representing the bridge operators to be removed. + * @param removingOperators An array of addresses representing the bridge operators to be removed. * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed. */ - function _removeBridgeOperators(address[] memory bridgeOperators) internal nonDuplicate(bridgeOperators) returns (bool[] memory removeds) { - uint256 length = bridgeOperators.length; + function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + + uint256 length = removingOperators.length; removeds = new bool[](length); + // simply skip remove operations if inputs are empty. if (length == 0) return removeds; - mapping(address => address) storage _governorOf = _getGovernorOf(); - EnumerableSet.AddressSet storage _governorSet = _getGovernorsSet(); - EnumerableSet.AddressSet storage _bridgeOperatorSet = _getBridgeOperatorSet(); - mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo(); - - address governor; - address bridgeOperator; + address iGovernor; + address iOperator; uint256 accumulatedWeight; - BridgeOperatorInfo memory bridgeOperatorInfo; + uint idx; - for (uint256 i; i < length; ) { - bridgeOperator = bridgeOperators[i]; - governor = _governorOf[bridgeOperator]; + for (uint256 i; i < length; i++) { + iOperator = removingOperators[i]; - _requireNonZeroAddress(governor); - _requireNonZeroAddress(bridgeOperator); + // Check non-zero inputs + (iGovernor, idx) = _getGovernorOf(iOperator); + _requireNonZeroAddress(iGovernor); + _requireNonZeroAddress(iOperator); - bridgeOperatorInfo = _governorToBridgeOperatorInfo[governor]; - if (bridgeOperatorInfo.addr != bridgeOperator) revert ErrInvalidArguments(msg.sig); + // Check existing operators + removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0; - removeds[i] = _bridgeOperatorSet.contains(bridgeOperator) && _governorSet.contains(governor); + // Only remove the valid operator if (removeds[i]) { - _governorSet.remove(governor); - _bridgeOperatorSet.remove(bridgeOperator); + uint removingVoteWeight = $._governorWeight[iGovernor]; - delete _governorOf[bridgeOperator]; - delete _governorToBridgeOperatorInfo[governor]; - accumulatedWeight += bridgeOperatorInfo.voteWeight; - } + // Remove governor from list, update governor weight + uint lastIdx = $._governors.length - 1; + $._governors[idx] = $._governors[lastIdx]; + $._governors.pop(); + delete $._governorWeight[iGovernor]; + + // Remove operator from list, update operator weight + $._operators[idx] = $._operators[lastIdx]; + $._operators.pop(); + delete $._operatorWeight[iOperator]; - unchecked { - ++i; + accumulatedWeight += removingVoteWeight; } } - TOTAL_WEIGHTS_SLOT.subAssign(accumulatedWeight); + $._totalWeight -= accumulatedWeight; - _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(bridgeOperators, removeds)); + _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds)); - emit BridgeOperatorsRemoved(removeds, bridgeOperators); + emit BridgeOperatorsRemoved(removeds, removingOperators); } - /** - * @dev Sets threshold and returns the old one. - * - * Emits the `ThresholdUpdated` event. - * - */ - function _setThreshold(uint256 numerator, uint256 denominator) internal virtual returns (uint256 previousNum, uint256 previousDenom) { - if (numerator > denominator) revert ErrInvalidThreshold(msg.sig); + function _findOperatorInArray(address addr) internal view returns (bool found, uint idx) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - previousNum = NUMERATOR_SLOT.load(); - previousDenom = DENOMINATOR_SLOT.load(); - NUMERATOR_SLOT.store(numerator); - DENOMINATOR_SLOT.store(denominator); + for (uint i; i < $._operators.length; i++) { + if (addr == $._operators[i]) { + return (true, i); + } + } - emit ThresholdUpdated(NONCE_SLOT.postIncrement(), numerator, denominator, previousNum, previousDenom); + return (false, type(uint256).max); } - /** - * @dev Internal function to get all bridge operators. - * @return bridgeOperators An array containing all the registered bridge operator addresses. - */ - function _getBridgeOperators() internal view returns (address[] memory) { - return _getBridgeOperatorSet().values(); + function _findGovernorInArray(address addr) internal view returns (bool found, uint idx) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + + for (uint i; i < $._governors.length; i++) { + if (addr == $._governors[i]) { + return (true, i); + } + } + + return (false, type(uint256).max); } + // ================= MANAGER VIEW METHODS ============= + /** - * @dev Internal function to get all governors. - * @return governors An array containing all the registered governor addresses. + * @inheritdoc IBridgeManager */ - function _getGovernors() internal view returns (address[] memory) { - return _getGovernorsSet().values(); + function totalBridgeOperator() external view returns (uint256) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + return $._operators.length; } /** - * @dev Internal function to get the vote weights of a given array of governors. - * @param governors An array containing the addresses of governors. - * @return weights An array containing the vote weights of the corresponding governors. + * @inheritdoc IBridgeManager */ - function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) { - uint256 length = governors.length; - weights = new uint96[](length); - mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo(); - for (uint256 i; i < length; ) { - weights[i] = _governorToBridgeOperatorInfo[governors[i]].voteWeight; - unchecked { - ++i; - } - } + function isBridgeOperator(address addr) external view returns (bool) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + return $._operatorWeight[addr] > 0; } /** - * @dev Internal function to calculate the sum of vote weights for a given array of governors. - * @param governors An array containing the addresses of governors to calculate the sum of vote weights. - * @return sum The total sum of vote weights for the provided governors. - * @notice The input array `governors` must contain unique addresses to avoid duplicate calculations. + * @inheritdoc IBridgeManager */ - function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) { - mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo(); - - for (uint256 i; i < governors.length; ) { - sum += _governorToBridgeOperatorInfo[governors[i]].voteWeight; - - unchecked { - ++i; - } - } + function getBridgeOperators() external view returns (address[] memory) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + return $._operators; } /** - * @dev Internal function to require that the caller has governor role access. - * @param addr The address to check for governor role access. - * @dev If the address does not have governor role access (vote weight is zero), a revert with the corresponding error message is triggered. + * @inheritdoc IBridgeManager */ - function _requireGovernor(address addr) internal view { - if (_getGovernorWeight(addr) == 0) { - revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR); - } + function getGovernors() external view returns (address[] memory) { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + return $._governors; } /** - * @dev Internal function to retrieve the vote weight of a specific governor. - * @param governor The address of the governor to get the vote weight for. - * @return voteWeight The vote weight of the specified governor. + * @inheritdoc IBridgeManager + * @custom:deprecated Deprecated due to high gas consume in new design. */ - function _getGovernorWeight(address governor) internal view returns (uint96) { - return _getGovernorToBridgeOperatorInfo()[governor].voteWeight; + function getBridgeOperatorOf(address[] memory /*governors*/) external pure returns (address[] memory /*bridgeOperators*/) { + revert("Deprecated method"); } /** - * @dev Internal function to access the address set of bridge operators. - * @return bridgeOperators the storage address set. + * @inheritdoc IBridgeManager */ - function _getBridgeOperatorSet() internal pure returns (EnumerableSet.AddressSet storage bridgeOperators) { - assembly ("memory-safe") { - bridgeOperators.slot := BRIDGE_OPERATOR_SET_SLOT - } + function getOperatorOf(address governor) external view returns (address operator) { + (bool found, uint idx) = _findGovernorInArray(governor); + if (!found) revert ErrGovernorNotFound(governor); + + return _getBridgeManagerStorage()._operators[idx]; } /** - * @dev Internal function to access the address set of bridge operators. - * @return governors the storage address set. + * @inheritdoc IBridgeManager + * @custom:deprecated Deprecated due to high gas consume in new design. */ - function _getGovernorsSet() internal pure returns (EnumerableSet.AddressSet storage governors) { - assembly ("memory-safe") { - governors.slot := GOVERNOR_SET_SLOT - } + function getGovernorsOf(address[] calldata /*bridgeOperators*/) external pure returns (address[] memory /*governors*/) { + revert("Deprecated method"); } /** - * @dev Internal function to access the mapping from governor => BridgeOperatorInfo. - * @return governorToBridgeOperatorInfo the mapping from governor => BridgeOperatorInfo. + * @inheritdoc IBridgeManager */ - function _getGovernorToBridgeOperatorInfo() internal pure returns (mapping(address => BridgeOperatorInfo) storage governorToBridgeOperatorInfo) { - assembly ("memory-safe") { - governorToBridgeOperatorInfo.slot := GOVERNOR_TO_BRIDGE_OPERATOR_INFO_SLOT - } + function getGovernorOf(address operator) external view returns (address governor) { + (governor, ) = _getGovernorOf(operator); + } + + function _getGovernorOf(address operator) internal view returns (address governor, uint idx) { + (bool found, uint foundId) = _findOperatorInArray(operator); + if (!found) revert ErrOperatorNotFound(operator); + + return (_getBridgeManagerStorage()._governors[foundId], foundId); } /** - * @dev Internal function to access the mapping from bridge operator => governor. - * @return governorOf the mapping from bridge operator => governor. + * @inheritdoc IBridgeManager */ - function _getGovernorOf() internal pure returns (mapping(address => address) storage governorOf) { - assembly ("memory-safe") { - governorOf.slot := GOVENOR_OF_SLOT - } + function getFullBridgeOperatorInfos() + external + view + returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) + { + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + + governors = $._governors; + bridgeOperators = $._operators; + weights = _getGovernorWeights(governors); } } diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol new file mode 100644 index 00000000..e2cf4504 --- /dev/null +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { IQuorum } from "../../interfaces/IQuorum.sol"; +import { IdentityGuard } from "../../utils/IdentityGuard.sol"; +import "../../utils/CommonErrors.sol"; + +abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { + struct BridgeManagerConfigStorage { + uint256 _nonce; + uint256 _numerator; + uint256 _denominator; + } + + // keccak256(abi.encode(uint256(keccak256("ronin.storage.BridgeManagerConfigStorage")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant $$_BridgeManagerConfigStorage = 0xa284664d8adf7d69a916362ec8082a90fd7c59679617cbcde6ef7ac0ead56500; + + function _getBridgeManagerConfigStorage() private pure returns (BridgeManagerConfigStorage storage $) { + assembly { + $.slot := $$_BridgeManagerConfigStorage + } + } + + constructor(uint256 num, uint256 denom) { + BridgeManagerConfigStorage storage $ = _getBridgeManagerConfigStorage(); + $._nonce = 1; + + _setThreshold(num, denom); + } + + /** + * @inheritdoc IQuorum + */ + function setThreshold(uint256 numerator, uint256 denominator) external override onlySelfCall returns (uint256, uint256) { + return _setThreshold(numerator, denominator); + } + + /** + * @inheritdoc IQuorum + */ + function getThreshold() public view virtual returns (uint256 num, uint256 denom) { + BridgeManagerConfigStorage storage $ = _getBridgeManagerConfigStorage(); + return ($._numerator, $._denominator); + } + + /** + * @inheritdoc IQuorum + */ + function checkThreshold(uint256 voteWeight) external view virtual returns (bool) { + BridgeManagerConfigStorage storage $ = _getBridgeManagerConfigStorage(); + + return voteWeight * $._denominator >= $._numerator * _totalWeight(); + } + + /** + * @dev Sets threshold and returns the old one. + * + * Emits the `ThresholdUpdated` event. + * + */ + function _setThreshold(uint256 numerator, uint256 denominator) internal virtual returns (uint256 previousNum, uint256 previousDenom) { + if (numerator > denominator) revert ErrInvalidThreshold(msg.sig); + + BridgeManagerConfigStorage storage $ = _getBridgeManagerConfigStorage(); + + previousNum = $._numerator; + previousDenom = $._denominator; + + $._numerator = numerator; + $._denominator = denominator; + + emit ThresholdUpdated($._nonce++, numerator, denominator, previousNum, previousDenom); + } + + function _totalWeight() internal view virtual returns (uint256); +} diff --git a/src/interfaces/bridge/IBridgeManager.sol b/src/interfaces/bridge/IBridgeManager.sol index c6975b37..ccbe7d16 100644 --- a/src/interfaces/bridge/IBridgeManager.sol +++ b/src/interfaces/bridge/IBridgeManager.sol @@ -8,6 +8,13 @@ import { IBridgeManagerEvents } from "./events/IBridgeManagerEvents.sol"; * @dev The interface for managing bridge operators. */ interface IBridgeManager is IBridgeManagerEvents { + /// @notice Error indicating that cannot find the querying operator + error ErrOperatorNotFound(address operator); + /// @notice Error indicating that cannot find the querying governor + error ErrGovernorNotFound(address governor); + /// @notice Error indicating that the msg.sender is not match the required governor + error ErrGovernorNotMatch(address required, address sender); + /** * @dev The domain separator used for computing hash digests in the contract. */ @@ -51,10 +58,7 @@ interface IBridgeManager is IBridgeManagerEvents { * ``` * */ - function getFullBridgeOperatorInfos() - external - view - returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights); + function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights); /** * @dev Returns total weights of the governor list. @@ -73,20 +77,26 @@ interface IBridgeManager is IBridgeManagerEvents { function getBridgeOperators() external view returns (address[] memory); /** - * @dev Returns an array of bridge operators correspoding to governor addresses. - * @return bridgeOperators_ An array containing the addresses of all bridge operators. + * @dev Returns an array of bridge operators corresponding to governor addresses. */ function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_); + /** + * @dev Returns the corresponding `operator` of a `governor`. + */ + function getOperatorOf(address governor) external view returns (address operator); + /** * @dev Retrieves the governors corresponding to a given array of bridge operators. - * This external function allows external callers to obtain the governors associated with a given array of bridge operators. - * The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors. - * @param bridgeOperators An array of bridge operator addresses for which governors are to be retrieved. - * @return governors An array of addresses representing the governors corresponding to the provided bridge operators. */ function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors); + /** + * @dev Returns the corresponding `governor` of a `operator`. + */ + + function getGovernorOf(address operator) external view returns (address governor); + /** * @dev External function to retrieve the vote weight of a specific governor. * @param governor The address of the governor to get the vote weight for. @@ -168,10 +178,13 @@ interface IBridgeManager is IBridgeManagerEvents { function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds); /** - * @dev Governor updates their corresponding governor and/or operator address. + * @dev Governor updates their corresponding or operator address. + * * Requirements: - * - The caller must the governor of the operator that is requested changes. - * @param bridgeOperator The address of the bridge operator to update. + * - The caller must be the governor of the operator that is requested changes. + * + * @param currOperator The address of the operator to update. + * @param newOperator The new address of the operator. */ - function updateBridgeOperator(address bridgeOperator) external; + function updateBridgeOperator(address currOperator, address newOperator) external; } diff --git a/src/interfaces/bridge/IBridgeManagerThreshold.sol b/src/interfaces/bridge/IBridgeManagerThreshold.sol new file mode 100644 index 00000000..0238e9b0 --- /dev/null +++ b/src/interfaces/bridge/IBridgeManagerThreshold.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/** + * @title IBridgeManagerThreshold + */ +interface IBridgeManagerThreshold { + function setThreshold(uint256 num, uint256 denom) external; + + function getThreshold() external view returns (uint256 num, uint256 denom); + + function checkThreshold(uint256 voteWeight) external view returns (bool); +} diff --git a/src/interfaces/bridge/events/IBridgeManagerEvents.sol b/src/interfaces/bridge/events/IBridgeManagerEvents.sol index ef919303..163d5dea 100644 --- a/src/interfaces/bridge/events/IBridgeManagerEvents.sol +++ b/src/interfaces/bridge/events/IBridgeManagerEvents.sol @@ -3,40 +3,27 @@ pragma solidity ^0.8.0; interface IBridgeManagerEvents { /** - * @dev The structure representing information about a bridge operator. - * @param addr The address of the bridge operator. - * @param voteWeight The vote weight assigned to the bridge operator. + * @dev Emitted when new bridge operators are added. */ - struct BridgeOperatorInfo { - address addr; - uint96 voteWeight; - } + event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators); /** - * @dev Emitted when new bridge operators are added. - * @param statuses The array of boolean values represents whether the corresponding bridge operator is added successfully. - * @param voteWeights The array of vote weights assigned to the added bridge operators. - * @param governors The array of addresses representing the governors associated with the added bridge operators. - * @param bridgeOperators The array of addresses representing the added bridge operators. + * @dev Emitted when a bridge operator is failed to add. */ - event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators); + event BridgeOperatorAddingFailed(address indexed operator); /** * @dev Emitted when bridge operators are removed. - * @param statuses The array of boolean values representing the statuses of the removed bridge operators. - * @param bridgeOperators The array of addresses representing the removed bridge operators. */ event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators); + /** + * @dev Emitted when a bridge operator is failed to remove. + */ + event BridgeOperatorRemovingFailed(address indexed operator); + /** * @dev Emitted when a bridge operator is updated. - * @param governor The address of the governor initiating the update. - * @param fromBridgeOperator The address of the bridge operator being updated. - * @param toBridgeOperator The updated address of the bridge operator. */ - event BridgeOperatorUpdated( - address indexed governor, - address indexed fromBridgeOperator, - address indexed toBridgeOperator - ); + event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator); } From c603ca1dcaab950ab4b7dd452e713a0b58335fbf Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Jan 2024 15:07:56 +0700 Subject: [PATCH 013/305] test(BridgeManager): adapt test as new revert --- .../bridge-manager/BridgeManager.t.sol | 55 +++----- .../concrete/bridge-manager/add/add.t.sol | 100 +++---------- .../bridge-manager/remove/remove.t.sol | 69 ++++----- .../bridge-manager/update/update.t.sol | 26 ++-- .../bridge-manager/BridgeManagerCRUD.t.sol | 132 +++--------------- test/helpers/LibArrayUtils.t.sol | 30 ++++ test/mocks/MockBridgeManager.sol | 10 +- 7 files changed, 148 insertions(+), 274 deletions(-) diff --git a/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol b/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol index c7adddbb..78ed19fe 100644 --- a/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol @@ -16,20 +16,12 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { modifier assertStateNotChange() { // Get before test state - ( - address[] memory beforeBridgeOperators, - address[] memory beforeGovernors, - uint96[] memory beforeVoteWeights - ) = _getBridgeMembers(); + (address[] memory beforeBridgeOperators, address[] memory beforeGovernors, uint96[] memory beforeVoteWeights) = _getBridgeMembers(); _; // Compare after and before state - ( - address[] memory afterBridgeOperators, - address[] memory afterGovernors, - uint96[] memory afterVoteWeights - ) = _getBridgeMembers(); + (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembers(); _assertBridgeMembers({ comparingOperators: beforeBridgeOperators, @@ -70,11 +62,7 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { _bridgeManager = new MockBridgeManager(bridgeOperators, governors, voteWeights); } - function _generateNewOperators() - internal - pure - returns (address[] memory operators, address[] memory governors, uint96[] memory weights) - { + function _generateNewOperators() internal pure returns (address[] memory operators, address[] memory governors, uint96[] memory weights) { operators = new address[](1); operators[0] = address(0x10003); @@ -100,7 +88,7 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { ) { if (removingNumber > _totalOperator) { - revert(); + revert("_generateRemovingOperators: exceed number to remove"); } uint remainingNumber = _totalOperator - removingNumber; @@ -129,24 +117,23 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { return address(0x10010); } - function _getBridgeMembers() - internal - view - returns (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) - { - governors = _bridgeManager.getGovernors(); - bridgeOperators = _bridgeManager.getBridgeOperatorOf(governors); - voteWeights = _bridgeManager.getGovernorWeights(governors); - // (governors, bridgeOperators, voteWeights) = _bridgeManager.getFullBridgeOperatorInfos(); + function _getBridgeMembers() internal view returns (address[] memory operators, address[] memory governors, uint96[] memory weights) { + // (governors, operators, weights) = _bridgeManager.getFullBridgeOperatorInfos(); + address[] memory governors_ = _bridgeManager.getGovernors(); + return _getBridgeMembersByGovernors(governors_); } - function _getBridgeMembers( - address[] memory governors - ) internal view returns (address[] memory bridgeOperators, address[] memory governors_, uint96[] memory voteWeights) { - governors_ = governors; - bridgeOperators = _bridgeManager.getBridgeOperatorOf(governors); - voteWeights = _bridgeManager.getGovernorWeights(governors); - // (governors, bridgeOperators, voteWeights) = _bridgeManager.getFullBridgeOperatorInfos(); + function _getBridgeMembersByGovernors( + address[] memory queryingGovernors + ) internal view returns (address[] memory operators, address[] memory governors, uint96[] memory weights) { + governors = queryingGovernors; + + operators = new address[](queryingGovernors.length); + for (uint i; i < queryingGovernors.length; i++) { + operators[i] = _bridgeManager.getOperatorOf(queryingGovernors[i]); + } + + weights = _bridgeManager.getGovernorWeights(queryingGovernors); } function _assertBridgeMembers( @@ -157,6 +144,10 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { uint96[] memory comparingWeights, uint96[] memory expectingWeights ) internal { + assertEq(comparingOperators.length, expectingOperators.length, "wrong bridge operators length"); + assertEq(comparingGovernors.length, expectingGovernors.length, "wrong governors length"); + assertEq(comparingWeights.length, expectingWeights.length, "wrong weights length"); + assertEq(comparingOperators, expectingOperators, "wrong bridge operators"); assertEq(comparingGovernors, expectingGovernors, "wrong governors"); assertEq(comparingWeights, expectingWeights, "wrong weights"); diff --git a/test/bridge/unit/concrete/bridge-manager/add/add.t.sol b/test/bridge/unit/concrete/bridge-manager/add/add.t.sol index ec51cbcd..fe92ff02 100644 --- a/test/bridge/unit/concrete/bridge-manager/add/add.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/add/add.t.sol @@ -4,6 +4,8 @@ pragma solidity >=0.8.17 <0.9.0; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; +import { LibArrayUtils } from "@ronin/test/helpers/LibArrayUtils.t.sol"; + import "@ronin/contracts/utils/CommonErrors.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; @@ -17,11 +19,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function test_RevertWhen_NotSelfCall() external { // Prepare data - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); // Make the caller not self-call. changePrank({ msgSender: _bridgeOperators[0] }); @@ -33,11 +31,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function test_RevertWhen_ThreeInputArrayLengthMismatch() external { // Prepare data - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); uint length = addingOperators.length; @@ -64,11 +58,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function test_RevertWhen_VoteWeightIsZero() external { // Prepare data - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingWeights[0] = 0; vm.expectRevert(abi.encodeWithSelector(ErrInvalidVoteWeight.selector, IBridgeManager.addBridgeOperators.selector)); @@ -77,11 +67,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function test_RevertWhen_BridgeOperatorAddressIsZero() external { // Prepare data - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingOperators[0] = address(0); vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.addBridgeOperators.selector)); @@ -90,11 +76,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function test_RevertWhen_GovernorAddressIsZero() external { // Prepare data - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingGovernors[0] = address(0); vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.addBridgeOperators.selector)); @@ -102,11 +84,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_AddOperators_DuplicatedGovernor() external assertStateNotChange { - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingGovernors[0] = _governors[0]; bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); @@ -116,11 +94,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_AddOperators_DuplicatedBridgeOperator() external assertStateNotChange { - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingOperators[0] = _bridgeOperators[0]; bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); @@ -130,11 +104,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_AddOperators_DuplicatedGovernorWithExistedBridgeOperator() external assertStateNotChange { - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingGovernors[0] = _bridgeOperators[0]; bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); @@ -144,11 +114,7 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_AddOperators_DuplicatedBridgeOperatorWithExistedGovernor() external assertStateNotChange { - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingOperators[0] = _governors[0]; bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); @@ -159,17 +125,8 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function test_AddOperators_AllInfoIsValid() external { // Get before test state - ( - address[] memory beforeBridgeOperators, - address[] memory beforeGovernors, - uint96[] memory beforeVoteWeights - ) = _getBridgeMembers(); - - ( - address[] memory addingOperators, - address[] memory addingGovernors, - uint96[] memory addingWeights - ) = _generateNewOperators(); + (address[] memory beforeBridgeOperators, address[] memory beforeGovernors, uint96[] memory beforeVoteWeights) = _getBridgeMembers(); + (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); bool[] memory expectedAddeds = new bool[](1); @@ -177,31 +134,20 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { assertEq(addeds, expectedAddeds); // Compare after and before state - ( - address[] memory afterBridgeOperators, - address[] memory afterGovernors, - uint96[] memory afterVoteWeights - ) = _getBridgeMembers(); + (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembers(); _totalWeight += addingWeights[0]; - uint extendedLength = beforeBridgeOperators.length + 1; - assembly { - mstore(beforeBridgeOperators, extendedLength) - mstore(beforeGovernors, extendedLength) - mstore(beforeVoteWeights, extendedLength) - } - - beforeBridgeOperators[3] = addingOperators[0]; - beforeGovernors[3] = addingGovernors[0]; - beforeVoteWeights[3] = addingWeights[0]; + address[] memory expectingOperators = LibArrayUtils.concat(beforeBridgeOperators, addingOperators); + address[] memory expectingGovernors = LibArrayUtils.concat(beforeGovernors, addingGovernors); + uint96[] memory expectingWeights = LibArrayUtils.concat(beforeVoteWeights, addingWeights); _assertBridgeMembers({ - comparingOperators: beforeBridgeOperators, - comparingGovernors: beforeGovernors, - comparingWeights: beforeVoteWeights, - expectingOperators: afterBridgeOperators, - expectingGovernors: afterGovernors, - expectingWeights: afterVoteWeights + comparingOperators: afterBridgeOperators, + comparingGovernors: afterGovernors, + comparingWeights: afterVoteWeights, + expectingOperators: expectingOperators, + expectingGovernors: expectingGovernors, + expectingWeights: expectingWeights }); assertEq(_bridgeManager.getTotalWeight(), _totalWeight); } diff --git a/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol b/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol index 3b971574..96318586 100644 --- a/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol @@ -33,7 +33,7 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function test_RevertWhen_RemoveOperator_OneAddress_AddressNotOperator() external { address[] memory removingOperators = wrapAddress(_governors[0]); - vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.removeBridgeOperators.selector)); + vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrOperatorNotFound.selector, removingOperators[0])); _bridgeManager.removeBridgeOperators(removingOperators); } @@ -54,19 +54,17 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { assertEq(_bridgeManager.totalBridgeOperator(), _bridgeOperators.length - 1, "wrong total bridge operator"); assertEq(_bridgeManager.getTotalWeight(), _totalWeight - removingWeights[0], "wrong total total weight"); - assertEq( - _bridgeManager.getBridgeOperatorOf(removingGovernors), - wrapAddress(address(0)), - "wrong bridge operator of" - ); - assertEq(_bridgeManager.getGovernorsOf(removingOperators), wrapAddress(address(0)), "wrong governor of"); + + vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrGovernorNotFound.selector, removingGovernors[0])); + _bridgeManager.getOperatorOf(removingGovernors[0]); + + vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrOperatorNotFound.selector, removingOperators[0])); + _bridgeManager.getGovernorOf(removingOperators[0]); // Compare after and before state - ( - address[] memory afterBridgeOperators, - address[] memory afterGovernors, - uint96[] memory afterVoteWeights - ) = _getBridgeMembers(remainingGovernors); + (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembersByGovernors( + remainingGovernors + ); _assertBridgeMembers({ comparingOperators: afterBridgeOperators, @@ -79,27 +77,20 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_RevertWhen_TwoAddress_Duplicated() external { - ( - address[] memory removingOperators, - address[] memory removingGovernors, - uint96[] memory removingWeights, - , - , - - ) = _generateRemovingOperators(2); + (address[] memory removingOperators, address[] memory removingGovernors, uint96[] memory removingWeights, , , ) = _generateRemovingOperators(2); removingOperators[1] = removingOperators[0]; removingGovernors[1] = removingGovernors[0]; removingWeights[1] = removingWeights[0]; // Run the test. - vm.expectRevert( - abi.encodeWithSelector(AddressArrayUtils.ErrDuplicated.selector, IBridgeManager.removeBridgeOperators.selector) - ); + vm.expectRevert(abi.encodeWithSelector(AddressArrayUtils.ErrDuplicated.selector, IBridgeManager.removeBridgeOperators.selector)); _bridgeManager.removeBridgeOperators(removingOperators); } function test_RemoveOperators_TwoAddress_ThatValid() external { + uint TO_REMOVE_NUM = 2; + ( address[] memory removingOperators, address[] memory removingGovernors, @@ -107,33 +98,33 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { address[] memory remainingOperators, address[] memory remainingGovernors, uint96[] memory remainingWeights - ) = _generateRemovingOperators(2); + ) = _generateRemovingOperators(TO_REMOVE_NUM); bool[] memory removeds = _bridgeManager.removeBridgeOperators(removingOperators); - bool[] memory expectedRemoved = new bool[](2); + bool[] memory expectedRemoved = new bool[](TO_REMOVE_NUM); expectedRemoved[0] = true; expectedRemoved[1] = true; assertEq(removeds, expectedRemoved); - address[] memory zeroAddressArrays = new address[](2); + address[] memory zeroAddressArrays = new address[](TO_REMOVE_NUM); zeroAddressArrays[0] = address(0); zeroAddressArrays[1] = address(0); - assertEq(_bridgeManager.totalBridgeOperator(), _bridgeOperators.length - 2, "wrong total bridge operator"); - assertEq( - _bridgeManager.getTotalWeight(), - _totalWeight - (LibArrayUtils.sum(removingWeights)), - "wrong total total weight" - ); - assertEq(_bridgeManager.getBridgeOperatorOf(removingGovernors), zeroAddressArrays, "wrong bridge operator of"); - assertEq(_bridgeManager.getGovernorsOf(removingOperators), zeroAddressArrays, "wrong governor of"); + assertEq(_bridgeManager.totalBridgeOperator(), _bridgeOperators.length - TO_REMOVE_NUM, "wrong total bridge operator"); + assertEq(_bridgeManager.getTotalWeight(), _totalWeight - (LibArrayUtils.sum(removingWeights)), "wrong total total weight"); + + for (uint i; i < TO_REMOVE_NUM; i++) { + vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrGovernorNotFound.selector, removingGovernors[i])); + _bridgeManager.getOperatorOf(removingGovernors[i]); + + vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrOperatorNotFound.selector, removingOperators[i])); + _bridgeManager.getGovernorOf(removingOperators[i]); + } // Compare after and before state - ( - address[] memory afterBridgeOperators, - address[] memory afterGovernors, - uint96[] memory afterVoteWeights - ) = _getBridgeMembers(remainingGovernors); + (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembersByGovernors( + remainingGovernors + ); _assertBridgeMembers({ comparingOperators: afterBridgeOperators, diff --git a/test/bridge/unit/concrete/bridge-manager/update/update.t.sol b/test/bridge/unit/concrete/bridge-manager/update/update.t.sol index f188ef1e..4b425d79 100644 --- a/test/bridge/unit/concrete/bridge-manager/update/update.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/update/update.t.sol @@ -35,7 +35,7 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { RoleAccess.GOVERNOR ) ); - _bridgeManager.updateBridgeOperator(newOperator); + _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorAddressIsZero() external { @@ -43,15 +43,15 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { // Run the test. vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.updateBridgeOperator.selector)); - _bridgeManager.updateBridgeOperator(newOperator); + _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorIsExistedInCurrentOperatorList() external { address newOperator = _bridgeOperators[2]; // Run the test. - vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorUpdateFailed.selector, newOperator)); - _bridgeManager.updateBridgeOperator(newOperator); + vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorAlreadyExisted.selector, newOperator)); + _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorIsExistedInCurrentGovernorList() external { @@ -60,16 +60,16 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { // Run the test. vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.updateBridgeOperator.selector)); // TODO: fix error sig here - _bridgeManager.updateBridgeOperator(newOperator); + _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorIsTheSameWithPreviousOperator() external { - address prevOperator = unwrapAddress(_bridgeManager.getBridgeOperatorOf(wrapAddress(_caller))); + address prevOperator = _bridgeManager.getOperatorOf(_caller); address newOperator = prevOperator; // Run the test. vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorAlreadyExisted.selector, prevOperator)); - _bridgeManager.updateBridgeOperator(newOperator); + _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_UpdateOperators_NewOperatorIsValid() external { @@ -81,7 +81,7 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { ) = _getBridgeMembers(); // Prepare data. - address prevOperator = unwrapAddress(_bridgeManager.getBridgeOperatorOf(wrapAddress(_caller))); + address prevOperator = _bridgeManager.getOperatorOf(_caller); address newOperator = _generateBridgeOperatorAddressToUpdate(); // Run the test @@ -90,7 +90,7 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { vm.expectEmit({ emitter: address(_bridgeManager) }); emit BridgeOperatorUpdated(_caller, prevOperator, newOperator); - _bridgeManager.updateBridgeOperator(newOperator); + _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); // Get after test state ( @@ -111,8 +111,10 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { }); // it should remove the old operator - assertEq(_bridgeManager.getBridgeOperatorOf(wrapAddress(_caller)), wrapAddress(newOperator)); - assertEq(_bridgeManager.getGovernorsOf(wrapAddress(newOperator)), wrapAddress(_caller)); - assertEq(_bridgeManager.getGovernorsOf(wrapAddress(prevOperator)), wrapAddress(address(0))); + assertEq(_bridgeManager.getOperatorOf(_caller), newOperator); + assertEq(_bridgeManager.getGovernorOf(newOperator), _caller); + + vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrOperatorNotFound.selector, prevOperator)); + _bridgeManager.getGovernorOf(prevOperator); } } diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol index 5f50b52e..e8ed23f0 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol @@ -38,7 +38,7 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { for (uint256 i = 1; i < bridgeOperators.length; ++i) { lastOperator = bridgeOperators[i]; - bridgeManager.updateBridgeOperator(lastOperator); + bridgeManager.updateBridgeOperator(bridgeOperators[0], lastOperator); vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorUpdateFailed.selector, lastOperator)); } @@ -57,20 +57,10 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { ) external virtual { vm.assume(caller != _bridgeManager); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - r1, - r2, - r3, - numBridgeOperators - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); vm.expectRevert( - abi.encodeWithSelector( - ErrUnexpectedInternalCall.selector, - IBridgeManager.addBridgeOperators.selector, - ContractType.BRIDGE, - caller - ) + abi.encodeWithSelector(ErrUnexpectedInternalCall.selector, IBridgeManager.addBridgeOperators.selector, ContractType.BRIDGE, caller) ); _addBridgeOperators(caller, _bridgeManager, voteWeights, governors, bridgeOperators); @@ -79,26 +69,10 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { /** * @notice Checks whether bridge contract can add bridge operators. */ - function test_AddBridgeOperators_CallerIsBridgeAdminOperator( - uint256 r1, - uint256 r2, - uint256 r3, - uint256 numBridgeOperators - ) external virtual { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - r1, - r2, - r3, - numBridgeOperators - ); + function test_AddBridgeOperators_CallerIsBridgeAdminOperator(uint256 r1, uint256 r2, uint256 r3, uint256 numBridgeOperators) external virtual { + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); - IBridgeManager bridgeManager = _addBridgeOperators( - _bridgeManager, - _bridgeManager, - voteWeights, - governors, - bridgeOperators - ); + IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); _invariantTest(bridgeManager, voteWeights, governors, bridgeOperators); } @@ -107,12 +81,7 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { * @notice Checks whether bridge contract can add bridge operators * when governors, operators or vote weight contains null or duplicated. */ - function testFail_AddBridgeOperators_NullOrDuplicateInputs( - uint256 r1, - uint256 r2, - uint256 r3, - uint256 numBridgeOperators - ) external virtual { + function testFail_AddBridgeOperators_NullOrDuplicateInputs(uint256 r1, uint256 r2, uint256 r3, uint256 numBridgeOperators) external virtual { ( bool nullifyOrDuplicate, uint256 modifyTimes, @@ -125,16 +94,12 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { if (modifiedInputIdx == uint8(InputIndex.VoteWeights)) { // allow duplicate vote weights vm.assume(nullifyOrDuplicate); - vm.expectRevert( - abi.encodeWithSelector(ErrInvalidVoteWeight.selector, IBridgeManager.addBridgeOperators.selector) - ); + vm.expectRevert(abi.encodeWithSelector(ErrInvalidVoteWeight.selector, IBridgeManager.addBridgeOperators.selector)); } else { if (modifyTimes == 1) { vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.addBridgeOperators.selector)); } else { - vm.expectRevert( - abi.encodeWithSelector(AddressArrayUtils.ErrDuplicated.selector, IBridgeManager.addBridgeOperators.selector) - ); + vm.expectRevert(abi.encodeWithSelector(AddressArrayUtils.ErrDuplicated.selector, IBridgeManager.addBridgeOperators.selector)); } } @@ -144,26 +109,10 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { /** * @notice Checks whether bridge contract can remove bridge operators. */ - function test_RemoveBridgeOperators_CallerIsBridgeContract( - uint256 r1, - uint256 r2, - uint256 r3, - uint16 numBridgeOperators - ) external virtual { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - r1, - r2, - r3, - numBridgeOperators - ); + function test_RemoveBridgeOperators_CallerIsBridgeContract(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); - IBridgeManager bridgeManager = _addBridgeOperators( - _bridgeManager, - _bridgeManager, - voteWeights, - governors, - bridgeOperators - ); + IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); uint256 removeAmount = _randomize(voteWeights.length, 1, voteWeights.length); uint256 tailIdx = voteWeights.length - 1; @@ -206,28 +155,13 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { /** * @notice Checks whether governor can update their bridge operator address. */ - function test_UpdateBridgeOperator_CallerIsGovernor( - uint256 r1, - uint256 r2, - uint256 r3, - uint16 numBridgeOperators - ) external virtual { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - r1, - r2, - r3, - numBridgeOperators - ); - IBridgeManager bridgeManager = _addBridgeOperators( - _bridgeManager, - _bridgeManager, - voteWeights, - governors, - bridgeOperators - ); + function test_UpdateBridgeOperator_CallerIsGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); + IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); uint256 randomSeed = _randomize(_triShuffle(r1, r2, r3), 0, voteWeights.length - 1); address randomGovernor = governors[randomSeed]; + address correspondingOperator = bridgeOperators[randomSeed]; address newBridgeOperator = makeAddr("NEW_BRIDGE_OPERATOR"); vm.deal(newBridgeOperator, 1 ether); @@ -236,7 +170,7 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { bool[] memory statuses = new bool[](1); statuses[0] = true; emit BridgeOperatorUpdated(randomGovernor, bridgeOperators[randomSeed], newBridgeOperator); - bridgeManager.updateBridgeOperator(newBridgeOperator); + bridgeManager.updateBridgeOperator(correspondingOperator, newBridgeOperator); // swap and pop bridgeOperators[randomSeed] = bridgeOperators[bridgeOperators.length - 1]; @@ -248,25 +182,9 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { /** * @notice Checks whether unauthorized sender can update bridge operator address. */ - function testFail_UpdateBridgeOperator_CallerIsNotGovernor( - uint256 r1, - uint256 r2, - uint256 r3, - uint16 numBridgeOperators - ) external virtual { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - r1, - r2, - r3, - numBridgeOperators - ); - IBridgeManager bridgeManager = _addBridgeOperators( - _bridgeManager, - _bridgeManager, - voteWeights, - governors, - bridgeOperators - ); + function testFail_UpdateBridgeOperator_CallerIsNotGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); + IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); address unauthorizedCaller = makeAddr("UNAUTHORIZED_CALLER"); for (uint256 i; i < governors.length; ) { @@ -278,15 +196,9 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { address newBridgeOperator = makeAddr("NEW_BRIDGE_OPERATOR"); vm.prank(unauthorizedCaller); - bridgeManager.updateBridgeOperator(newBridgeOperator); + bridgeManager.updateBridgeOperator(bridgeOperators[0], newBridgeOperator); - vm.expectRevert( - abi.encodeWithSelector( - ErrUnauthorized.selector, - IBridgeManager.updateBridgeOperator.selector, - RoleAccess.GOVERNOR - ) - ); + vm.expectRevert(abi.encodeWithSelector(ErrUnauthorized.selector, IBridgeManager.updateBridgeOperator.selector, RoleAccess.GOVERNOR)); } function _setUp() internal virtual { diff --git a/test/helpers/LibArrayUtils.t.sol b/test/helpers/LibArrayUtils.t.sol index c27e74ad..8ca5451a 100644 --- a/test/helpers/LibArrayUtils.t.sol +++ b/test/helpers/LibArrayUtils.t.sol @@ -30,4 +30,34 @@ library LibArrayUtils { return sum(arr256); } + + function concat(uint96[] memory a, uint96[] memory b) internal pure returns (uint96[] memory c) { + c = new uint96[](a.length + b.length); + + uint i; + for (; i < a.length; i++) { + c[i] = a[i]; + } + + for (uint j; j < b.length; ) { + c[i] = b[j]; + ++i; + ++j; + } + } + + function concat(address[] memory a, address[] memory b) internal pure returns (address[] memory c) { + c = new address[](a.length + b.length); + + uint i; + for (; i < a.length; i++) { + c[i] = a[i]; + } + + for (uint j; j < b.length; ) { + c[i] = b[j]; + ++i; + ++j; + } + } } diff --git a/test/mocks/MockBridgeManager.sol b/test/mocks/MockBridgeManager.sol index 7f5f5546..8ff151d7 100644 --- a/test/mocks/MockBridgeManager.sol +++ b/test/mocks/MockBridgeManager.sol @@ -12,9 +12,9 @@ contract MockBridgeManager is IBridgeManager { address[] calldata bridgeOperators ) external returns (bool[] memory addeds) {} - function getBridgeOperatorOf( - address[] calldata gorvernors - ) external view returns (address[] memory bridgeOperators_) {} + function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_) {} + + function getOperatorOf(address governor) external view returns (address operator) {} function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {} @@ -34,6 +34,8 @@ contract MockBridgeManager is IBridgeManager { function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors) {} + function getGovernorOf(address operator) external view returns (address governor) {} + function getTotalWeight() external view returns (uint256) {} function isBridgeOperator(address addr) external view returns (bool) {} @@ -44,5 +46,5 @@ contract MockBridgeManager is IBridgeManager { function totalBridgeOperator() external view returns (uint256) {} - function updateBridgeOperator(address bridgeOperator) external {} + function updateBridgeOperator(address currOperator, address newOperator) external {} } From 564511b2e6875dec121604a4437f476792b4d392 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 5 Mar 2024 23:57:51 +0700 Subject: [PATCH 014/305] test: fix update operator test after require previous operator --- .../updateOperator.RoninBridgeManager.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index a5d73409..ea8b0e93 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -78,7 +78,7 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { function _updateBridgeOperator() internal { vm.prank(_param.roninBridgeManager.governors[0]); address previousOperator = _param.roninBridgeManager.bridgeOperators[0]; - _roninBridgeManager.updateBridgeOperator(_newBridgeOperator); + _roninBridgeManager.updateBridgeOperator(previousOperator, _newBridgeOperator); _param.roninBridgeManager.bridgeOperators[0] = _newBridgeOperator; console.log( From 137260176a0e191ee010bae7812666c9376d3b8d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Jan 2024 15:16:04 +0700 Subject: [PATCH 015/305] fix(BridgeManager): rename Config to Quorum --- .../BridgeManagerQuorum.sol | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol index e2cf4504..705656d9 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -6,23 +6,23 @@ import { IdentityGuard } from "../../utils/IdentityGuard.sol"; import "../../utils/CommonErrors.sol"; abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { - struct BridgeManagerConfigStorage { + struct BridgeManagerQuorumStorage { uint256 _nonce; uint256 _numerator; uint256 _denominator; } - // keccak256(abi.encode(uint256(keccak256("ronin.storage.BridgeManagerConfigStorage")) - 1)) & ~bytes32(uint256(0xff)) - bytes32 private constant $$_BridgeManagerConfigStorage = 0xa284664d8adf7d69a916362ec8082a90fd7c59679617cbcde6ef7ac0ead56500; + // keccak256(abi.encode(uint256(keccak256("ronin.storage.BridgeManagerQuorumStorage")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00; - function _getBridgeManagerConfigStorage() private pure returns (BridgeManagerConfigStorage storage $) { + function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) { assembly { - $.slot := $$_BridgeManagerConfigStorage + $.slot := $$_BridgeManagerQuorumStorage } } constructor(uint256 num, uint256 denom) { - BridgeManagerConfigStorage storage $ = _getBridgeManagerConfigStorage(); + BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); $._nonce = 1; _setThreshold(num, denom); @@ -39,7 +39,7 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { * @inheritdoc IQuorum */ function getThreshold() public view virtual returns (uint256 num, uint256 denom) { - BridgeManagerConfigStorage storage $ = _getBridgeManagerConfigStorage(); + BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); return ($._numerator, $._denominator); } @@ -47,7 +47,7 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { * @inheritdoc IQuorum */ function checkThreshold(uint256 voteWeight) external view virtual returns (bool) { - BridgeManagerConfigStorage storage $ = _getBridgeManagerConfigStorage(); + BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); return voteWeight * $._denominator >= $._numerator * _totalWeight(); } @@ -61,7 +61,7 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { function _setThreshold(uint256 numerator, uint256 denominator) internal virtual returns (uint256 previousNum, uint256 previousDenom) { if (numerator > denominator) revert ErrInvalidThreshold(msg.sig); - BridgeManagerConfigStorage storage $ = _getBridgeManagerConfigStorage(); + BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); previousNum = $._numerator; previousDenom = $._denominator; From 63b80c49a9b2ce94094ebde95fadedbafe3077ed Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 22 Jan 2024 13:41:25 +0700 Subject: [PATCH 016/305] test(MainchainGateway): first benchmark with actual config --- foundry.toml | 2 +- script/Migration.s.sol | 18 ++-- test/bridge/integration/BaseIntegration.t.sol | 55 ++++-------- ...l.MainchainGatewayV3.erc20.benchmark.t.sol | 55 ++++++++++++ ....MainchainGatewayV3.native.benchmark.t.sol | 53 ++++++++++++ .../submitWithdrawal.MainchainGatewayV3.t.sol | 86 +++++++++++++++++++ 6 files changed, 222 insertions(+), 47 deletions(-) create mode 100644 test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol create mode 100644 test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol create mode 100644 test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol diff --git a/foundry.toml b/foundry.toml index da2e032e..06eee488 100644 --- a/foundry.toml +++ b/foundry.toml @@ -25,7 +25,7 @@ evm_version = 'istanbul' evm_version = 'shanghai' [fmt] -line_length = 120 +line_length = 160 tab_width = 2 bracket_spacing = true int_types = 'preserve' diff --git a/script/Migration.s.sol b/script/Migration.s.sol index ecec4fa8..9aa39514 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -46,7 +46,7 @@ contract Migration is BaseMigrationV2, Utils { param.mockErc721.name = "Mock ERC721"; param.mockErc721.symbol = "M_ERC721"; - uint256 num = 6; + uint256 num = 22; address[] memory operatorAddrs = new address[](num); address[] memory governorAddrs = new address[](num); uint256[] memory operatorPKs = new uint256[](num); @@ -86,14 +86,14 @@ contract Migration is BaseMigrationV2, Utils { param.roninPauseEnforcer.sentries = wrapAddress(makeAddr("pause-enforcer-sentry")); // Ronin Gateway V3 - param.roninGatewayV3.numerator = 3; - param.roninGatewayV3.denominator = 6; - param.roninGatewayV3.trustedNumerator = 2; - param.roninGatewayV3.trustedDenominator = 3; + param.roninGatewayV3.numerator = 7; + param.roninGatewayV3.denominator = 10; + param.roninGatewayV3.trustedNumerator = 9; + param.roninGatewayV3.trustedDenominator = 10; // Ronin Bridge Manager - param.roninBridgeManager.num = 2; - param.roninBridgeManager.denom = 4; + param.roninBridgeManager.num = 7; + param.roninBridgeManager.denom = 10; param.roninBridgeManager.roninChainId = 0; param.roninBridgeManager.roninChainId = block.chainid; param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days @@ -114,8 +114,8 @@ contract Migration is BaseMigrationV2, Utils { param.mainchainGatewayV3.denominator = 10; // Mainchain Bridge Manager - param.mainchainBridgeManager.num = 2; - param.mainchainBridgeManager.denom = 4; + param.mainchainBridgeManager.num = 7; + param.mainchainBridgeManager.denom = 10; param.mainchainBridgeManager.roninChainId = 0; param.mainchainBridgeManager.roninChainId = block.chainid; param.mainchainBridgeManager.bridgeOperators = operatorAddrs; diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index b9200abd..37a2a0e0 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -26,6 +26,7 @@ import { Token } from "@ronin/contracts/libraries/Token.sol"; import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; import { GlobalCoreGovernance } from "@ronin/contracts/extensions/sequential-governance/GlobalCoreGovernance.sol"; import { IHasContracts } from "@ronin/contracts/interfaces/collections/IHasContracts.sol"; import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; @@ -58,6 +59,8 @@ import { RoninBridgeAdminUtils } from "test/helpers/RoninBridgeAdminUtils.t.sol" import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; contract BaseIntegration_Test is Base_Test { + using Transfer for Transfer.Receipt; + IGeneralConfig _config; ISharedArgument.SharedParameter _param; @@ -540,47 +543,25 @@ contract BaseIntegration_Test is Base_Test { _config = IGeneralConfig(LibSharedAddress.CONFIG); } - function _wrapUpEpochAndMine() internal { - _wrapUpEpoch(); - // mine a dummy block - vm.roll(block.number + 1); - } - - function _moveToEndPeriodAndWrapUpEpoch() internal { - console.log(">> Move to end period ... "); - uint256 prevPeriod = _validatorSet.currentPeriod(); - - _fastForwardToNextDay(); - _wrapUpEpoch(); - uint256 afterPeriod = _validatorSet.currentPeriod(); - - console.log( - " -> period changes: ", string(abi.encodePacked(vm.toString(prevPeriod), " => ", vm.toString(afterPeriod))) - ); - } - - function _wrapUpEpoch() internal { - console.log(">> Wrap up epoch ... "); - uint256 prevEpoch = _validatorSet.epochOf(block.number); + function _generateSignaturesFor( + Transfer.Receipt memory receipt, + uint256[] memory signerPKs, + bytes32 domainSeparator + ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { + sigs = new SignatureConsumer.Signature[](signerPKs.length); - _validatorSet.wrapUpEpoch(); - vm.roll(block.number + _validatorSet.numberOfBlocksInEpoch()); + for (uint256 i; i < signerPKs.length; i++) { + bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, receipt.hash())); - uint256 afterEpoch = _validatorSet.epochOf(block.number); - console.log( - " -> epoch changes: ", string(abi.encodePacked(vm.toString(prevEpoch), " => ", vm.toString(afterEpoch))) - ); + sigs[i] = _sign(signerPKs[i], digest); + } } - function _fastForwardToNextDay() internal { - uint256 numberOfBlocksInEpoch = _validatorSet.numberOfBlocksInEpoch(); - - uint256 epochEndingBlockNumber = block.number + (numberOfBlocksInEpoch - 1) - (block.number % numberOfBlocksInEpoch); - uint256 nextDayTimestamp = block.timestamp + 1 days; - - // fast forward to next day - vm.warp(nextDayTimestamp); - vm.roll(epochEndingBlockNumber); + function _sign(uint256 pk, bytes32 digest) internal pure returns (SignatureConsumer.Signature memory sig) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); + sig.v = v; + sig.r = r; + sig.s = s; } function logBridgeTracking() public view { diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol new file mode 100644 index 00000000..cf4311d7 --- /dev/null +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import "../../BaseIntegration.t.sol"; + +contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegration_Test { + using Transfer for Transfer.Receipt; + + Transfer.Receipt _withdrawalReceipt; + bytes32 _domainSeparator; + + SignatureConsumer.Signature[] _signatures; + + function setUp() public virtual override { + super.setUp(); + _config.switchTo(Network.EthLocal.key()); + + _domainSeparator = _mainchainGatewayV3.DOMAIN_SEPARATOR(); + + _withdrawalReceipt.id = 0; + _withdrawalReceipt.kind = Transfer.Kind.Withdrawal; + _withdrawalReceipt.ronin.addr = makeAddr("requester"); + _withdrawalReceipt.ronin.tokenAddr = address(_roninWeth); + _withdrawalReceipt.ronin.chainId = _param.test.roninChainId; + _withdrawalReceipt.mainchain.addr = makeAddr("recipient"); + _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); + _withdrawalReceipt.mainchain.chainId = _param.test.mainchainChainId; + _withdrawalReceipt.info.erc = Token.Standard.ERC20; + _withdrawalReceipt.info.id = 0; + _withdrawalReceipt.info.quantity = 0; + + vm.deal(address(_mainchainGatewayV3), 10 ether); + vm.prank(address(_mainchainGatewayV3)); + _mainchainWeth.deposit{ value: 10 ether }(); + + _withdrawalReceipt.info.quantity = 10; + _withdrawalReceipt.ronin.tokenAddr = address(_roninAxs); + _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainAxs); + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); + + for (uint i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + } + + function test_benchmark_submitWithdrawal_ERC20() public { + _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, _signatures); + } +} diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol new file mode 100644 index 00000000..334cfcf3 --- /dev/null +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import "../../BaseIntegration.t.sol"; + +contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegration_Test { + using Transfer for Transfer.Receipt; + + Transfer.Receipt _withdrawalReceipt; + bytes32 _domainSeparator; + + SignatureConsumer.Signature[] _signatures; + + function setUp() public virtual override { + super.setUp(); + _config.switchTo(Network.EthLocal.key()); + + _domainSeparator = _mainchainGatewayV3.DOMAIN_SEPARATOR(); + + _withdrawalReceipt.id = 0; + _withdrawalReceipt.kind = Transfer.Kind.Withdrawal; + _withdrawalReceipt.ronin.addr = makeAddr("requester"); + _withdrawalReceipt.ronin.tokenAddr = address(_roninWeth); + _withdrawalReceipt.ronin.chainId = _param.test.roninChainId; + _withdrawalReceipt.mainchain.addr = makeAddr("recipient"); + _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); + _withdrawalReceipt.mainchain.chainId = _param.test.mainchainChainId; + _withdrawalReceipt.info.erc = Token.Standard.ERC20; + _withdrawalReceipt.info.id = 0; + _withdrawalReceipt.info.quantity = 0; + + vm.deal(address(_mainchainGatewayV3), 10 ether); + vm.prank(address(_mainchainGatewayV3)); + _mainchainWeth.deposit{ value: 10 ether }(); + + _withdrawalReceipt.info.quantity = 10; + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); + + for (uint i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + } + + function test_benchmark_submitWithdrawal_Native() public { + _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, _signatures); + } +} diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol new file mode 100644 index 00000000..7cfbdf5d --- /dev/null +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import "../../BaseIntegration.t.sol"; + +contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { + using Transfer for Transfer.Receipt; + + Transfer.Receipt _withdrawalReceipt; + bytes32 _domainSeparator; + + function setUp() public virtual override { + super.setUp(); + + _domainSeparator = _mainchainGatewayV3.DOMAIN_SEPARATOR(); + + _withdrawalReceipt.id = 0; + _withdrawalReceipt.kind = Transfer.Kind.Withdrawal; + _withdrawalReceipt.ronin.addr = makeAddr("requester"); + _withdrawalReceipt.ronin.tokenAddr = address(_roninWeth); + _withdrawalReceipt.ronin.chainId = block.chainid; + _withdrawalReceipt.mainchain.addr = makeAddr("recipient"); + _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); + _withdrawalReceipt.mainchain.chainId = block.chainid; + _withdrawalReceipt.info.erc = Token.Standard.ERC20; + _withdrawalReceipt.info.id = 0; + _withdrawalReceipt.info.quantity = 0; + + vm.deal(address(_mainchainGatewayV3), 10 ether); + vm.prank(address(_mainchainGatewayV3)); + _mainchainWeth.deposit{ value: 10 ether }(); + } + + function test_submitWithdrawal_Native() public { + _withdrawalReceipt.info.quantity = 10; + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + + _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); + } + + function test_submitWithdrawal_ERC20() public { + _withdrawalReceipt.info.quantity = 10; + _withdrawalReceipt.ronin.tokenAddr = address(_roninAxs); + _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainAxs); + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + + _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); + } + + function testFuzz_submitWithdrawal_ERC20(uint seed) external { + _withdrawalReceipt.ronin.tokenAddr = address(_roninAxs); + _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainAxs); + _withdrawalReceipt.info.quantity = seed % 1_000_000; + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + + _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); + } + + function _generateSignaturesFor( + Transfer.Receipt memory receipt, + uint256[] memory signerPKs + ) internal view returns (SignatureConsumer.Signature[] memory sigs) { + sigs = new SignatureConsumer.Signature[](signerPKs.length); + + for (uint256 i; i < signerPKs.length; i++) { + bytes32 digest = keccak256(abi.encodePacked("\x19\x01", _domainSeparator, receipt.hash())); + + sigs[i] = _sign(signerPKs[i], digest); + } + } + + function _sign(uint256 pk, bytes32 digest) internal pure returns (SignatureConsumer.Signature memory sig) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); + sig.v = v; + sig.r = r; + sig.s = s; + } +} From dba72baed053e8ad261c0a062e4795c09b2ceacb Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 00:27:37 +0700 Subject: [PATCH 017/305] test: fix cherry-pick issue --- test/bridge/integration/BaseIntegration.t.sol | 105 ++++++++++-------- ...l.MainchainGatewayV3.erc20.benchmark.t.sol | 7 +- ....MainchainGatewayV3.native.benchmark.t.sol | 5 +- .../submitWithdrawal.MainchainGatewayV3.t.sol | 30 +---- .../submitWithdrawal.MainchainGatewayV3.t.sol | 48 ++------ 5 files changed, 78 insertions(+), 117 deletions(-) diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 37a2a0e0..b1169ab7 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -26,13 +26,12 @@ import { Token } from "@ronin/contracts/libraries/Token.sol"; import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; -import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; import { GlobalCoreGovernance } from "@ronin/contracts/extensions/sequential-governance/GlobalCoreGovernance.sol"; import { IHasContracts } from "@ronin/contracts/interfaces/collections/IHasContracts.sol"; import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; -import { MockValidatorContract_OnlyTiming_ForHardhatTest } from - "@ronin/contracts/mocks/ronin/MockValidatorContract_OnlyTiming_ForHardhatTest.sol"; +import { MockValidatorContract_OnlyTiming_ForHardhatTest } from "@ronin/contracts/mocks/ronin/MockValidatorContract_OnlyTiming_ForHardhatTest.sol"; import { PauseEnforcer } from "@ronin/contracts/ronin/gateway/PauseEnforcer.sol"; import { IPauseTarget } from "@ronin/contracts/interfaces/IPauseTarget.sol"; import { GatewayV3 } from "@ronin/contracts/extensions/GatewayV3.sol"; @@ -59,7 +58,7 @@ import { RoninBridgeAdminUtils } from "test/helpers/RoninBridgeAdminUtils.t.sol" import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; contract BaseIntegration_Test is Base_Test { - using Transfer for Transfer.Receipt; + using LibTransfer for LibTransfer.Receipt; IGeneralConfig _config; ISharedArgument.SharedParameter _param; @@ -127,8 +126,7 @@ contract BaseIntegration_Test is Base_Test { _roninMockERC721 = new MockERC721Deploy().run(); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); - _roninProposalUtils = - new RoninBridgeAdminUtils(_param.test.governorPKs, _roninBridgeManager, _param.roninBridgeManager.governors[0]); + _roninProposalUtils = new RoninBridgeAdminUtils(_param.test.governorPKs, _roninBridgeManager, _param.roninBridgeManager.governors[0]); _validatorSet = new MockValidatorContract_OnlyTiming_ForHardhatTest(_param.test.numberOfBlocksInEpoch); } @@ -144,9 +142,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainMockERC721 = new MockERC721Deploy().run(); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); - _mainchainProposalUtils = new MainchainBridgeAdminUtils( - _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] - ); + _mainchainProposalUtils = new MainchainBridgeAdminUtils(_param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0]); } function _initializeRonin() internal { @@ -178,12 +174,7 @@ contract BaseIntegration_Test is Base_Test { ISharedArgument.BridgeRewardParam memory param = _param.bridgeReward; _bridgeReward.initialize( - param.bridgeManagerContract, - param.bridgeTrackingContract, - param.bridgeSlashContract, - param.validatorSetContract, - param.dposGA, - param.rewardPerPeriod + param.bridgeManagerContract, param.bridgeTrackingContract, param.bridgeSlashContract, param.validatorSetContract, param.dposGA, param.rewardPerPeriod ); vm.prank(_param.test.dposGA); @@ -199,9 +190,7 @@ contract BaseIntegration_Test is Base_Test { _bridgeTracking.initialize(param.bridgeContract, param.validatorContract, param.startedAtBlock); // _bridgeTracking.initializeV2(); NOT INITIALIZE V2 - _bridgeTracking.initializeV3( - address(_roninBridgeManager), address(_bridgeSlash), address(_bridgeReward), _param.test.dposGA - ); + _bridgeTracking.initializeV3(address(_roninBridgeManager), address(_bridgeSlash), address(_bridgeReward), _param.test.dposGA); vm.prank(_param.test.dposGA); _bridgeTracking.initializeREP2(); } @@ -214,9 +203,7 @@ contract BaseIntegration_Test is Base_Test { ISharedArgument.BridgeSlashParam memory param = _param.bridgeSlash; - _bridgeSlash.initialize( - param.validatorContract, param.bridgeManagerContract, param.bridgeTrackingContract, param.dposGA - ); + _bridgeSlash.initialize(param.validatorContract, param.bridgeManagerContract, param.bridgeTrackingContract, param.dposGA); vm.prank(_param.test.dposGA); _bridgeSlash.initializeREP2(); @@ -308,8 +295,7 @@ contract BaseIntegration_Test is Base_Test { nonce: _roninBridgeManager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = - _roninProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); vm.prank(_param.roninBridgeManager.governors[0]); _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(globalProposal, supports_, signatures); @@ -325,8 +311,7 @@ contract BaseIntegration_Test is Base_Test { nonce: _roninBridgeManager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = - _roninProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); vm.prank(_param.roninBridgeManager.governors[0]); _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(globalProposal, supports_, signatures); @@ -334,8 +319,7 @@ contract BaseIntegration_Test is Base_Test { { // set callback register - bytes memory calldata_ = - abi.encodeCall(IBridgeManagerCallbackRegister.registerCallbacks, (param.callbackRegisters)); + bytes memory calldata_ = abi.encodeCall(IBridgeManagerCallbackRegister.registerCallbacks, (param.callbackRegisters)); GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, targetOption: GlobalProposal.TargetOption.BridgeManager, @@ -345,8 +329,7 @@ contract BaseIntegration_Test is Base_Test { nonce: _roninBridgeManager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = - _roninProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); vm.prank(_param.roninBridgeManager.governors[0]); _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(globalProposal, supports_, signatures); @@ -383,8 +366,7 @@ contract BaseIntegration_Test is Base_Test { nonce: _mainchainBridgeManager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = - _mainchainProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); vm.prank(_param.roninBridgeManager.governors[0]); _mainchainBridgeManager.relayGlobalProposal(globalProposal, supports_, signatures); @@ -400,8 +382,7 @@ contract BaseIntegration_Test is Base_Test { nonce: _mainchainBridgeManager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = - _mainchainProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); vm.prank(_param.roninBridgeManager.governors[0]); _mainchainBridgeManager.relayGlobalProposal(globalProposal, supports_, signatures); @@ -409,8 +390,7 @@ contract BaseIntegration_Test is Base_Test { { // set callback register - bytes memory calldata_ = - abi.encodeCall(IBridgeManagerCallbackRegister.registerCallbacks, (param.callbackRegisters)); + bytes memory calldata_ = abi.encodeCall(IBridgeManagerCallbackRegister.registerCallbacks, (param.callbackRegisters)); GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, targetOption: GlobalProposal.TargetOption.BridgeManager, @@ -420,8 +400,7 @@ contract BaseIntegration_Test is Base_Test { nonce: _mainchainBridgeManager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = - _mainchainProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); vm.prank(_param.roninBridgeManager.governors[0]); _mainchainBridgeManager.relayGlobalProposal(globalProposal, supports_, signatures); @@ -483,11 +462,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainPauseEnforcer.initialize(IPauseTarget(param.target), param.admin, param.sentries); } - function _getMainchainAndRoninTokens() - internal - view - returns (address[] memory mainchainTokens, address[] memory roninTokens) - { + function _getMainchainAndRoninTokens() internal view returns (address[] memory mainchainTokens, address[] memory roninTokens) { uint256 tokenNum = 5; mainchainTokens = new address[](tokenNum); roninTokens = new address[](tokenNum); @@ -531,8 +506,7 @@ contract BaseIntegration_Test is Base_Test { } function _configBridgeTrackingForRoninGateway() internal { - bytes memory calldata_ = - abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE_TRACKING, address(_bridgeTracking))); + bytes memory calldata_ = abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE_TRACKING, address(_bridgeTracking))); _roninProposalUtils.functionDelegateCall(address(_roninGatewayV3), calldata_); } @@ -543,11 +517,50 @@ contract BaseIntegration_Test is Base_Test { _config = IGeneralConfig(LibSharedAddress.CONFIG); } + function _wrapUpEpochAndMine() internal { + _wrapUpEpoch(); + // mine a dummy block + vm.roll(block.number + 1); + } + + function _moveToEndPeriodAndWrapUpEpoch() internal { + console.log(">> Move to end period ... "); + uint256 prevPeriod = _validatorSet.currentPeriod(); + + _fastForwardToNextDay(); + _wrapUpEpoch(); + uint256 afterPeriod = _validatorSet.currentPeriod(); + + console.log(" -> period changes: ", string(abi.encodePacked(vm.toString(prevPeriod), " => ", vm.toString(afterPeriod)))); + } + + function _wrapUpEpoch() internal { + console.log(">> Wrap up epoch ... "); + uint256 prevEpoch = _validatorSet.epochOf(block.number); + + _validatorSet.wrapUpEpoch(); + vm.roll(block.number + _validatorSet.numberOfBlocksInEpoch()); + + uint256 afterEpoch = _validatorSet.epochOf(block.number); + console.log(" -> epoch changes: ", string(abi.encodePacked(vm.toString(prevEpoch), " => ", vm.toString(afterEpoch)))); + } + + function _fastForwardToNextDay() internal { + uint256 numberOfBlocksInEpoch = _validatorSet.numberOfBlocksInEpoch(); + + uint256 epochEndingBlockNumber = block.number + (numberOfBlocksInEpoch - 1) - (block.number % numberOfBlocksInEpoch); + uint256 nextDayTimestamp = block.timestamp + 1 days; + + // fast forward to next day + vm.warp(nextDayTimestamp); + vm.roll(epochEndingBlockNumber); + } + function _generateSignaturesFor( - Transfer.Receipt memory receipt, + LibTransfer.Receipt memory receipt, uint256[] memory signerPKs, bytes32 domainSeparator - ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { + ) internal view returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol index cf4311d7..dc8d1906 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol @@ -8,7 +8,7 @@ import { Token } from "@ronin/contracts/libraries/Token.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import "../../BaseIntegration.t.sol"; -contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegration_Test { +contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegration_Test{ using Transfer for Transfer.Receipt; Transfer.Receipt _withdrawalReceipt; @@ -18,7 +18,6 @@ contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegr function setUp() public virtual override { super.setUp(); - _config.switchTo(Network.EthLocal.key()); _domainSeparator = _mainchainGatewayV3.DOMAIN_SEPARATOR(); @@ -26,10 +25,10 @@ contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegr _withdrawalReceipt.kind = Transfer.Kind.Withdrawal; _withdrawalReceipt.ronin.addr = makeAddr("requester"); _withdrawalReceipt.ronin.tokenAddr = address(_roninWeth); - _withdrawalReceipt.ronin.chainId = _param.test.roninChainId; + _withdrawalReceipt.ronin.chainId = block.chainid; _withdrawalReceipt.mainchain.addr = makeAddr("recipient"); _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); - _withdrawalReceipt.mainchain.chainId = _param.test.mainchainChainId; + _withdrawalReceipt.mainchain.chainId = block.chainid; _withdrawalReceipt.info.erc = Token.Standard.ERC20; _withdrawalReceipt.info.id = 0; _withdrawalReceipt.info.quantity = 0; diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol index 334cfcf3..bb547ed2 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol @@ -18,7 +18,6 @@ contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegr function setUp() public virtual override { super.setUp(); - _config.switchTo(Network.EthLocal.key()); _domainSeparator = _mainchainGatewayV3.DOMAIN_SEPARATOR(); @@ -26,10 +25,10 @@ contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegr _withdrawalReceipt.kind = Transfer.Kind.Withdrawal; _withdrawalReceipt.ronin.addr = makeAddr("requester"); _withdrawalReceipt.ronin.tokenAddr = address(_roninWeth); - _withdrawalReceipt.ronin.chainId = _param.test.roninChainId; + _withdrawalReceipt.ronin.chainId = block.chainid; _withdrawalReceipt.mainchain.addr = makeAddr("recipient"); _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); - _withdrawalReceipt.mainchain.chainId = _param.test.mainchainChainId; + _withdrawalReceipt.mainchain.chainId = block.chainid; _withdrawalReceipt.info.erc = Token.Standard.ERC20; _withdrawalReceipt.info.id = 0; _withdrawalReceipt.info.quantity = 0; diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol index 7cfbdf5d..4c30a518 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol @@ -8,7 +8,7 @@ import { Token } from "@ronin/contracts/libraries/Token.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import "../../BaseIntegration.t.sol"; -contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { +contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test{ using Transfer for Transfer.Receipt; Transfer.Receipt _withdrawalReceipt; @@ -39,7 +39,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { function test_submitWithdrawal_Native() public { _withdrawalReceipt.info.quantity = 10; - SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); } @@ -49,7 +49,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.ronin.tokenAddr = address(_roninAxs); _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainAxs); - SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); } @@ -59,28 +59,8 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainAxs); _withdrawalReceipt.info.quantity = seed % 1_000_000; - SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); } - - function _generateSignaturesFor( - Transfer.Receipt memory receipt, - uint256[] memory signerPKs - ) internal view returns (SignatureConsumer.Signature[] memory sigs) { - sigs = new SignatureConsumer.Signature[](signerPKs.length); - - for (uint256 i; i < signerPKs.length; i++) { - bytes32 digest = keccak256(abi.encodePacked("\x19\x01", _domainSeparator, receipt.hash())); - - sigs[i] = _sign(signerPKs[i], digest); - } - } - - function _sign(uint256 pk, bytes32 digest) internal pure returns (SignatureConsumer.Signature memory sig) { - (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); - sig.v = v; - sig.r = r; - sig.s = s; - } -} + } diff --git a/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol index fd18b7db..d9b1d03a 100644 --- a/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol @@ -52,8 +52,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { // test withdrawal > should not be able to withdraw without enough signature function test_RevertWhen_NotEnoughSignatures() public { - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, wrapUint(_param.test.operatorPKs[0])); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, wrapUint(_param.test.operatorPKs[0]), _domainSeparator); vm.expectRevert(ErrQueryForInsufficientVoteWeight.selector); @@ -69,8 +68,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _param.test.operatorPKs[0] = _param.test.operatorPKs[1]; _param.test.operatorPKs[1] = tempPK; - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); vm.expectRevert(abi.encodeWithSelector(ErrInvalidOrder.selector, IMainchainGatewayV3.submitWithdrawal.selector)); @@ -79,8 +77,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { // test withdrawal > should be able to withdraw eth function test_WithdrawNative_OnMainchain() public { - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); uint256 balanceBefore = _withdrawalReceipt.mainchain.addr.balance; @@ -97,8 +94,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { function test_RevertWhen_WithdrawWithSameId() public { test_WithdrawNative_OnMainchain(); - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); vm.expectRevert(ErrQueryForProcessedWithdrawal.selector); @@ -110,8 +106,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { address sender = makeAddr("sender"); _withdrawalReceipt.mainchain.addr = sender; - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); vm.expectEmit(address(_mainchainGatewayV3)); emit Withdrew(_withdrawalReceipt.hash(), _withdrawalReceipt); @@ -132,8 +127,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainAxs); _withdrawalReceipt.ronin.tokenAddr = address(_roninAxs); - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); vm.expectEmit(address(_mainchainAxs)); emit IERC20.Transfer(address(_mainchainGatewayV3), recipient, quantity); @@ -158,8 +152,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainSlp); _withdrawalReceipt.ronin.tokenAddr = address(_roninSlp); - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); vm.expectEmit(address(_mainchainSlp)); emit IERC20.Transfer(address(0), address(_mainchainGatewayV3), quantity); @@ -190,8 +183,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.info.erc = Token.Standard.ERC721; _withdrawalReceipt.info.quantity = 0; - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); vm.expectEmit(address(_mainchainMockERC721)); emit IERC721.Transfer(address(_mainchainGatewayV3), recipient, tokenId); @@ -218,8 +210,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.info.erc = Token.Standard.ERC721; _withdrawalReceipt.info.quantity = 0; - SignatureConsumer.Signature[] memory signatures = - _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); vm.expectEmit(address(_mainchainMockERC721)); emit IERC721.Transfer(address(0), recipient, tokenId); @@ -231,25 +222,4 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { assertEq(_mainchainMockERC721.ownerOf(tokenId), recipient); } - - function _generateSignaturesFor(LibTransfer.Receipt memory receipt, uint256[] memory signerPKs) - internal - view - returns (SignatureConsumer.Signature[] memory sigs) - { - sigs = new SignatureConsumer.Signature[](signerPKs.length); - - for (uint256 i; i < signerPKs.length; i++) { - bytes32 digest = keccak256(abi.encodePacked("\x19\x01", _domainSeparator, receipt.hash())); - - sigs[i] = _sign(signerPKs[i], digest); - } - } - - function _sign(uint256 pk, bytes32 digest) internal pure returns (SignatureConsumer.Signature memory sig) { - (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); - sig.v = v; - sig.r = r; - sig.s = s; - } } From 4285236afbad45c0f1af313add83911b11a6f51c Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 00:31:12 +0700 Subject: [PATCH 018/305] test(MainchainGateway): fix setup token in test, mostly threshold --- test/bridge/integration/BaseIntegration.t.sol | 48 +++++++++----- ...l.MainchainGatewayV3.erc20.benchmark.t.sol | 5 -- ....MainchainGatewayV3.native.benchmark.t.sol | 2 - ...al.MainchainGatewayV3.weth.benchmark.t.sol | 66 +++++++++++++++++++ 4 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index b1169ab7..dd6b3e95 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -164,6 +164,22 @@ contract BaseIntegration_Test is Base_Test { _mainchainGatewayV3Initialize(); } + function _getMainchainAndRoninTokens() internal view returns (address[] memory mainchainTokens, address[] memory roninTokens) { + uint256 tokenNum = 4; + mainchainTokens = new address[](tokenNum); + roninTokens = new address[](tokenNum); + + mainchainTokens[0] = address(_mainchainWeth); + mainchainTokens[1] = address(_mainchainAxs); + mainchainTokens[2] = address(_mainchainSlp); + mainchainTokens[3] = address(_mainchainUsdc); + + roninTokens[0] = address(_roninWeth); + roninTokens[1] = address(_roninAxs); + roninTokens[2] = address(_roninSlp); + roninTokens[3] = address(_roninUsdc); + } + function _bridgeRewardInitialize() internal { // Bridge rewards _param.bridgeReward.validatorSetContract = address(_validatorSet); @@ -193,6 +209,8 @@ contract BaseIntegration_Test is Base_Test { _bridgeTracking.initializeV3(address(_roninBridgeManager), address(_bridgeSlash), address(_bridgeReward), _param.test.dposGA); vm.prank(_param.test.dposGA); _bridgeTracking.initializeREP2(); + // _bridgeTracking.initializeV2(); + // _bridgeTracking.initializeV3(address(_roninBridgeManager), address(_bridgeSlash), address(_bridgeReward), _param.test.dposGA); } function _bridgeSlashInitialize() internal { @@ -414,6 +432,17 @@ contract BaseIntegration_Test is Base_Test { uint256[] memory lockedThreshold = new uint256[](tokenNum); uint256[] memory unlockFeePercentages = new uint256[](tokenNum); uint256[] memory dailyWithdrawalLimits = new uint256[](tokenNum); + + highTierThreshold[0] = 10 ether; + lockedThreshold[0] = 20 ether; + unlockFeePercentages[0] = 10_0000; // 10% + dailyWithdrawalLimits[0] = 12 ether; + + highTierThreshold[1] = highTierThreshold[2] = highTierThreshold[3] = 100_000_000; + lockedThreshold[1] = lockedThreshold[2] = lockedThreshold[3] = 200_000_000; + unlockFeePercentages[1] = unlockFeePercentages[2] = unlockFeePercentages[3] = 10_0000; // 10% + dailyWithdrawalLimits[1] = dailyWithdrawalLimits[2] = dailyWithdrawalLimits[3] = 120_000_000; + Token.Standard[] memory standards = new Token.Standard[](tokenNum); for (uint256 i; i < tokenNum; i++) { @@ -436,6 +465,7 @@ contract BaseIntegration_Test is Base_Test { _param.mainchainGatewayV3.thresholds[2] = unlockFeePercentages; _param.mainchainGatewayV3.thresholds[3] = dailyWithdrawalLimits; _param.mainchainGatewayV3.standards = standards; + _param.mainchainGatewayV3.wrappedToken = address(_mainchainWeth); ISharedArgument.MainchainGatewayV3Param memory param = _param.mainchainGatewayV3; @@ -462,24 +492,6 @@ contract BaseIntegration_Test is Base_Test { _mainchainPauseEnforcer.initialize(IPauseTarget(param.target), param.admin, param.sentries); } - function _getMainchainAndRoninTokens() internal view returns (address[] memory mainchainTokens, address[] memory roninTokens) { - uint256 tokenNum = 5; - mainchainTokens = new address[](tokenNum); - roninTokens = new address[](tokenNum); - - mainchainTokens[0] = address(_mainchainWeth); - mainchainTokens[1] = address(_mainchainAxs); - mainchainTokens[2] = address(_mainchainSlp); - mainchainTokens[3] = address(_mainchainUsdc); - mainchainTokens[4] = address(_mainchainMockERC721); - - roninTokens[0] = address(_roninWeth); - roninTokens[1] = address(_roninAxs); - roninTokens[2] = address(_roninSlp); - roninTokens[3] = address(_roninUsdc); - roninTokens[4] = address(_roninMockERC721); - } - function _changeAdminOnRonin() internal { vm.startPrank(_param.test.proxyAdmin); TransparentUpgradeableProxyV2(payable(address(_roninGatewayV3))).changeAdmin(address(_roninBridgeManager)); diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol index dc8d1906..04b549c9 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol @@ -31,11 +31,6 @@ contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegr _withdrawalReceipt.mainchain.chainId = block.chainid; _withdrawalReceipt.info.erc = Token.Standard.ERC20; _withdrawalReceipt.info.id = 0; - _withdrawalReceipt.info.quantity = 0; - - vm.deal(address(_mainchainGatewayV3), 10 ether); - vm.prank(address(_mainchainGatewayV3)); - _mainchainWeth.deposit{ value: 10 ether }(); _withdrawalReceipt.info.quantity = 10; _withdrawalReceipt.ronin.tokenAddr = address(_roninAxs); diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol index bb547ed2..12811230 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.native.benchmark.t.sol @@ -34,8 +34,6 @@ contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegr _withdrawalReceipt.info.quantity = 0; vm.deal(address(_mainchainGatewayV3), 10 ether); - vm.prank(address(_mainchainGatewayV3)); - _mainchainWeth.deposit{ value: 10 ether }(); _withdrawalReceipt.info.quantity = 10; diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol new file mode 100644 index 00000000..cf190f85 --- /dev/null +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import "../../BaseIntegration.t.sol"; + +contract SubmitWithdrawal_MainchainGatewayV3_Weth_Benchmark_Test is BaseIntegration_Test { + using Transfer for Transfer.Receipt; + + Transfer.Receipt _withdrawalReceipt; + bytes32 _domainSeparator; + + SignatureConsumer.Signature[] _signatures; + + function setUp() public virtual override { + super.setUp(); + + DiscardEther notReceiveEtherRecipient = new DiscardEther(); + + _domainSeparator = _mainchainGatewayV3.DOMAIN_SEPARATOR(); + + _withdrawalReceipt.id = 0; + _withdrawalReceipt.kind = Transfer.Kind.Withdrawal; + _withdrawalReceipt.ronin.addr = makeAddr("requester"); + _withdrawalReceipt.ronin.tokenAddr = address(_roninWeth); + _withdrawalReceipt.ronin.chainId =block.chainid; + _withdrawalReceipt.mainchain.addr = address(notReceiveEtherRecipient); + _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); + _withdrawalReceipt.mainchain.chainId =block.chainid; + _withdrawalReceipt.info.erc = Token.Standard.ERC20; + _withdrawalReceipt.info.id = 0; + _withdrawalReceipt.info.quantity = 0; + + vm.deal(address(_mainchainGatewayV3), 6 ether); + + _withdrawalReceipt.info.quantity = 2 ether; + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); + + for (uint i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + } + + function test_benchmark_submitWithdrawal_Weth() public { + _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, _signatures); + } +} + +contract DiscardEther { + fallback() external payable { + _fallback(); + } + + receive() external payable { + _fallback(); + } + + function _fallback() internal { + revert("Not receive ether"); + } +} \ No newline at end of file From 6b2a6c250edce6c7ffba5b162c71aadb0e1791a9 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 00:32:56 +0700 Subject: [PATCH 019/305] test(MainchainGateway): fix num and denom --- script/Migration.s.sol | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 9aa39514..0ca03767 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -94,7 +94,6 @@ contract Migration is BaseMigrationV2, Utils { // Ronin Bridge Manager param.roninBridgeManager.num = 7; param.roninBridgeManager.denom = 10; - param.roninBridgeManager.roninChainId = 0; param.roninBridgeManager.roninChainId = block.chainid; param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days param.roninBridgeManager.bridgeOperators = operatorAddrs; @@ -103,20 +102,15 @@ contract Migration is BaseMigrationV2, Utils { param.roninBridgeManager.targetOptions = options; param.roninBridgeManager.targets = targets; - // Mainchain Gateway Pause Enforcer - param.mainchainPauseEnforcer.admin = makeAddr("pause-enforcer-admin"); - param.mainchainPauseEnforcer.sentries = wrapAddress(makeAddr("pause-enforcer-sentry")); - // Mainchain Gateway V3 param.mainchainGatewayV3.roninChainId = block.chainid; - param.mainchainGatewayV3.numerator = 1; - param.mainchainGatewayV3.highTierVWNumerator = 10; + param.mainchainGatewayV3.numerator = 7; + param.mainchainGatewayV3.highTierVWNumerator = 9; param.mainchainGatewayV3.denominator = 10; // Mainchain Bridge Manager param.mainchainBridgeManager.num = 7; param.mainchainBridgeManager.denom = 10; - param.mainchainBridgeManager.roninChainId = 0; param.mainchainBridgeManager.roninChainId = block.chainid; param.mainchainBridgeManager.bridgeOperators = operatorAddrs; param.mainchainBridgeManager.governors = governorAddrs; From bff5c9e871f97bbf70500b1f40612296c71fa62e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 00:38:38 +0700 Subject: [PATCH 020/305] feat(MainchainGateway, MainchainBridgeMananger): clone operators to gateway --- .../bridge/IBridgeManagerCallback.sol | 1 + src/mainchain/MainchainGatewayV3.sol | 115 +++++++++++++++--- src/ronin/gateway/BridgeSlash.sol | 3 +- test/bridge/integration/BaseIntegration.t.sol | 2 + 4 files changed, 103 insertions(+), 18 deletions(-) diff --git a/src/interfaces/bridge/IBridgeManagerCallback.sol b/src/interfaces/bridge/IBridgeManagerCallback.sol index 8811bccd..2c879a5c 100644 --- a/src/interfaces/bridge/IBridgeManagerCallback.sol +++ b/src/interfaces/bridge/IBridgeManagerCallback.sol @@ -16,6 +16,7 @@ interface IBridgeManagerCallback is IERC165 { */ function onBridgeOperatorsAdded( address[] memory bridgeOperators, + uint96[] calldata weights, bool[] memory addeds ) external returns (bytes4 selector); diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 770ffef8..dd1fab10 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -10,7 +10,14 @@ import "../extensions/WithdrawalLimitation.sol"; import "../libraries/Transfer.sol"; import "../interfaces/IMainchainGatewayV3.sol"; -contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessControlEnumerable, IMainchainGatewayV3, HasContracts { +contract MainchainGatewayV3 is + WithdrawalLimitation, + Initializable, + AccessControlEnumerable, + IMainchainGatewayV3, + HasContracts, + IBridgeManagerCallback +{ using Token for Token.Info; using Transfer for Transfer.Request; using Transfer for Transfer.Receipt; @@ -38,6 +45,9 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro /// @custom:deprecated Previously `_bridgeOperators` (uint256[]) uint256 private ______deprecatedBridgeOperators; + uint96 private _totalOperatorWeight; + mapping(address operator => uint96 weight) private _operatorWeight; + fallback() external payable { _fallback(); } @@ -87,12 +97,8 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro } // Grant role for withdrawal unlocker - for (uint256 _i; _i < _addresses[2].length;) { - _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][_i]); - - unchecked { - ++_i; - } + for (uint256 i; i < _addresses[2].length; i++) { + _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][i]); } } @@ -100,10 +106,19 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract); } + function initializeV3(address[] calldata operators, uint96[] calldata weights) external reinitializer(3) { + uint96 totalWeight; + for (uint i; i < operators.length; i++) { + _operatorWeight[operators[i]] = weights[i]; + totalWeight += weights[i]; + } + _totalOperatorWeight = totalWeight; + } + /** * @dev Receives ether without doing anything. Use this function to topup native token. */ - function receiveEther() external payable { } + function receiveEther() external payable {} /** * @inheritdoc IMainchainGatewayV3 @@ -129,12 +144,10 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro /** * @inheritdoc IMainchainGatewayV3 */ - function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) - external - virtual - whenNotPaused - returns (bool _locked) - { + function submitWithdrawal( + Transfer.Receipt calldata _receipt, + Signature[] calldata _signatures + ) external virtual whenNotPaused returns (bool _locked) { return _submitWithdrawal(_receipt, _signatures); } @@ -418,13 +431,81 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro * @inheritdoc GatewayV3 */ function _getTotalWeight() internal view override returns (uint256) { - return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getTotalWeight(); + return _totalOperatorWeight; } /** * @dev Returns the weight of an address. */ - function _getWeight(address _addr) internal view returns (uint256) { - return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperatorWeight(_addr); + function _getWeight(address addr) internal view returns (uint256) { + return _operatorWeight[addr]; + } + + /////////////////////////////////////////////// + // CALLBACKS + /////////////////////////////////////////////// + + /** + * @inheritdoc IBridgeManagerCallback + */ + function onBridgeOperatorsAdded( + address[] calldata operators, + uint96[] calldata weights, + bool[] memory addeds + ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { + uint256 length = operators.length; + if (length != addeds.length || length != weights.length) revert ErrLengthMismatch(msg.sig); + if (length == 0) { + return IBridgeManagerCallback.onBridgeOperatorsAdded.selector; + } + + for (uint256 i; i < length; ++i) { + unchecked { + if (addeds[i]) { + _totalOperatorWeight += weights[i]; + _operatorWeight[operators[i]] = weights[i]; + } + } + } + + return IBridgeManagerCallback.onBridgeOperatorsAdded.selector; + } + + /** + * @inheritdoc IBridgeManagerCallback + */ + function onBridgeOperatorUpdated(address currOperator, address newOperator) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { + _operatorWeight[newOperator] = _operatorWeight[currOperator]; + delete _operatorWeight[currOperator]; + + return IBridgeManagerCallback.onBridgeOperatorUpdated.selector; + } + + /** + * @inheritdoc IBridgeManagerCallback + */ + function onBridgeOperatorsRemoved( + address[] calldata operators, + bool[] calldata removeds + ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { + uint length = operators.length; + if (length != removeds.length) revert ErrLengthMismatch(msg.sig); + if (length == 0) { + return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector; + } + + uint96 totalRemovingWeight; + for (uint i; i < length; ++i) { + unchecked { + if (removeds[i]) { + totalRemovingWeight += _operatorWeight[operators[i]]; + delete _operatorWeight[operators[i]]; + } + } + } + + _totalOperatorWeight -= totalRemovingWeight; + + return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector; } } diff --git a/src/ronin/gateway/BridgeSlash.sol b/src/ronin/gateway/BridgeSlash.sol index 3a39415b..5c43e32d 100644 --- a/src/ronin/gateway/BridgeSlash.sol +++ b/src/ronin/gateway/BridgeSlash.sol @@ -93,6 +93,7 @@ contract BridgeSlash is */ function onBridgeOperatorsAdded( address[] calldata bridgeOperators, + uint96[] calldata /* weights */, bool[] memory addeds ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { uint256 length = bridgeOperators.length; @@ -203,7 +204,7 @@ contract BridgeSlash is address[] calldata, bool[] calldata ) external view onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { - return IBridgeManagerCallback.onBridgeOperatorsAdded.selector; + return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector; } /** diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index dd6b3e95..fde203a4 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -29,6 +29,7 @@ import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; import { GlobalCoreGovernance } from "@ronin/contracts/extensions/sequential-governance/GlobalCoreGovernance.sol"; import { IHasContracts } from "@ronin/contracts/interfaces/collections/IHasContracts.sol"; +import { IBridgeManagerCallbackRegister } from "@ronin/contracts/interfaces/bridge/IBridgeManagerCallbackRegister.sol"; import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { MockValidatorContract_OnlyTiming_ForHardhatTest } from "@ronin/contracts/mocks/ronin/MockValidatorContract_OnlyTiming_ForHardhatTest.sol"; @@ -482,6 +483,7 @@ contract BaseIntegration_Test is Base_Test { ); _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); + _mainchainGatewayV3.initializeV3(_param.mainchainBridgeManager.bridgeOperators, _param.mainchainBridgeManager.voteWeights); } function _mainchainPauseEnforcerInitialize() internal { From e361e6ccfec15105d8ff5ca55a490aec4aa87f28 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 10:50:30 +0700 Subject: [PATCH 021/305] test: disable updateOperator test --- .../depositAndRecord.Gateway.t.sol | 12 ------ .../updateOperator.RoninBridgeManager.t.sol | 2 + .../bridge-manager/BridgeManagerCRUD.t.sol | 39 +++++++++---------- 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol b/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol index 21ddda94..7722a75a 100644 --- a/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol +++ b/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol @@ -79,18 +79,6 @@ contract DepositAndRecord_Gateway_Test is BaseIntegration_Test { } } - function _updateBridgeOperator() internal { - vm.prank(_param.roninBridgeManager.governors[0]); - address previousOperator = _param.roninBridgeManager.bridgeOperators[0]; - _roninBridgeManager.updateBridgeOperator(_newBridgeOperator); - _param.roninBridgeManager.bridgeOperators[0] = _newBridgeOperator; - - console.log( - "Update operator: ", - string(abi.encodePacked(vm.toString(previousOperator), " => ", vm.toString(_newBridgeOperator))) - ); - } - function _depositFor() internal { console.log(">> depositFor ...."); _sampleReceipt.id = ++_id; diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index ea8b0e93..07925eaa 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -42,6 +42,8 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { } function test_updateOperator_and_wrapUpEpoch() public { + // Disable test due to not supporting update operator + vm.skip(true); console.log("=============== Test Update Operator ==========="); _depositFor(); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol index e8ed23f0..74a35d36 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol @@ -5,7 +5,14 @@ import { console } from "forge-std/console.sol"; import { IBridgeManager, BridgeManagerUtils } from "../utils/BridgeManagerUtils.t.sol"; import { RoninGatewayV3 } from "@ronin/contracts/ronin/gateway/RoninGatewayV3.sol"; import { RoleAccess, ContractType, AddressArrayUtils, MockBridgeManager } from "@ronin/contracts/mocks/ronin/MockBridgeManager.sol"; -import { ErrBridgeOperatorUpdateFailed, ErrBridgeOperatorAlreadyExisted, ErrUnauthorized, ErrInvalidVoteWeight, ErrZeroAddress, ErrUnexpectedInternalCall } from "@ronin/contracts/utils/CommonErrors.sol"; +import { + ErrBridgeOperatorUpdateFailed, + ErrBridgeOperatorAlreadyExisted, + ErrUnauthorized, + ErrInvalidVoteWeight, + ErrZeroAddress, + ErrUnexpectedInternalCall +} from "@ronin/contracts/utils/CommonErrors.sol"; contract BridgeManagerCRUDTest is BridgeManagerUtils { using AddressArrayUtils for address[]; @@ -24,12 +31,8 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { } function testFail_MaliciousUpdateBridgeOperator() external { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - DEFAULT_R1, - DEFAULT_R2, - DEFAULT_R3, - DEFAULT_NUM_BRIDGE_OPERATORS - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); _bridgeManager = address(new MockBridgeManager(bridgeOperators, governors, voteWeights)); MockBridgeManager bridgeManager = MockBridgeManager(_bridgeManager); @@ -59,9 +62,7 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); - vm.expectRevert( - abi.encodeWithSelector(ErrUnexpectedInternalCall.selector, IBridgeManager.addBridgeOperators.selector, ContractType.BRIDGE, caller) - ); + vm.expectRevert(abi.encodeWithSelector(ErrUnexpectedInternalCall.selector, IBridgeManager.addBridgeOperators.selector, ContractType.BRIDGE, caller)); _addBridgeOperators(caller, _bridgeManager, voteWeights, governors, bridgeOperators); } @@ -118,7 +119,7 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { uint256 tailIdx = voteWeights.length - 1; uint256 r = _randomize(_triShuffle(r1, r2, r3), 0, tailIdx); address[] memory removeBridgeOperators = new address[](removeAmount); - for (uint256 i; i < removeAmount; ) { + for (uint256 i; i < removeAmount;) { r = _randomize(r, 0, tailIdx); governors[r] = governors[tailIdx]; @@ -155,7 +156,8 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { /** * @notice Checks whether governor can update their bridge operator address. */ - function test_UpdateBridgeOperator_CallerIsGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { + function testFuzz_UpdateBridgeOperator_CallerIsGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { + vm.skip(true); (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); @@ -182,12 +184,13 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { /** * @notice Checks whether unauthorized sender can update bridge operator address. */ - function testFail_UpdateBridgeOperator_CallerIsNotGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { + function test_UpdateBridgeOperator_CallerIsNotGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { + vm.skip(true); (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); address unauthorizedCaller = makeAddr("UNAUTHORIZED_CALLER"); - for (uint256 i; i < governors.length; ) { + for (uint256 i; i < governors.length;) { vm.assume(unauthorizedCaller != governors[i]); unchecked { ++i; @@ -202,12 +205,8 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { } function _setUp() internal virtual { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - DEFAULT_R1, - DEFAULT_R2, - DEFAULT_R3, - DEFAULT_NUM_BRIDGE_OPERATORS - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); _bridgeManager = address(new MockBridgeManager(bridgeOperators, governors, voteWeights)); // empty storage for testing From 8dbfb5ba8b205d771f61d6fc133e06b82142d51a Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 10:50:50 +0700 Subject: [PATCH 022/305] test: fix mockERC721 test --- test/bridge/integration/BaseIntegration.t.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index fde203a4..0672de1b 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -166,7 +166,7 @@ contract BaseIntegration_Test is Base_Test { } function _getMainchainAndRoninTokens() internal view returns (address[] memory mainchainTokens, address[] memory roninTokens) { - uint256 tokenNum = 4; + uint256 tokenNum = 5; mainchainTokens = new address[](tokenNum); roninTokens = new address[](tokenNum); @@ -174,11 +174,13 @@ contract BaseIntegration_Test is Base_Test { mainchainTokens[1] = address(_mainchainAxs); mainchainTokens[2] = address(_mainchainSlp); mainchainTokens[3] = address(_mainchainUsdc); + mainchainTokens[4] = address(_mainchainMockERC721); roninTokens[0] = address(_roninWeth); roninTokens[1] = address(_roninAxs); roninTokens[2] = address(_roninSlp); roninTokens[3] = address(_roninUsdc); + roninTokens[4] = address(_roninMockERC721); } function _bridgeRewardInitialize() internal { From f09c2211bb994c8931ddee8f06928545bbe2f02d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 11:50:40 +0700 Subject: [PATCH 023/305] test: fix minNumOperator --- .../bulkDepositAndRecord.Gateway.t.sol | 3 +-- .../depositAndRecord.Gateway.t.sol | 3 +-- .../updateOperator.RoninBridgeManager.t.sol | 3 +-- .../depositVote.RoninGatewayV3.t.sol | 21 +++++++++++++------ 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol b/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol index 1e75083f..c4a6f767 100644 --- a/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol +++ b/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol @@ -27,8 +27,7 @@ contract BulkDepositAndRecord_Gateway_Test is BaseIntegration_Test { info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) }); - _numOperatorsForVoteExecuted = - _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; + _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; } function test_bulkDepositFor_wrapUp_checkRewardAndSlash() public { diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol b/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol index 7722a75a..d505955b 100644 --- a/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol +++ b/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol @@ -26,8 +26,7 @@ contract DepositAndRecord_Gateway_Test is BaseIntegration_Test { info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) }); - _numOperatorsForVoteExecuted = - _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; + _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; } function test_depositFor_wrapUp_checkRewardAndSlash() public { diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index 07925eaa..8398e397 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -37,8 +37,7 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { id++; } - _numOperatorsForVoteExecuted = - _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; + _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; } function test_updateOperator_and_wrapUpEpoch() public { diff --git a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol index 055a1050..8a8b18b7 100644 --- a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol +++ b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol @@ -33,8 +33,8 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { receipt.id = 1; _depositReceipts.push(receipt); - _numOperatorsForVoteExecuted = - _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; + + _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; } // @dev Should be able to bulk deposits using bridge operator accounts @@ -45,8 +45,7 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { } for (uint256 i = 0; i < _depositReceipts.length; i++) { - (VoteStatusConsumer.VoteStatus status,,,) = - _roninGatewayV3.depositVote(_depositReceipts[i].mainchain.chainId, _depositReceipts[i].id); + (VoteStatusConsumer.VoteStatus status,,,) = _roninGatewayV3.depositVote(_depositReceipts[i].mainchain.chainId, _depositReceipts[i].id); assertEq(uint256(uint8(status)), uint256(uint8(VoteStatusConsumer.VoteStatus.Pending))); @@ -61,12 +60,22 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { function test_tryBulkDepositFor_Executed() public { test_tryBulkDepositFor_NotExecuted(); + console.log("_numOperatorsForVoteExecuted", _numOperatorsForVoteExecuted); + + console.log("vote #15"); + // Let the last operator to vote to execute vm.prank(_param.roninBridgeManager.bridgeOperators[_numOperatorsForVoteExecuted - 1]); _roninGatewayV3.tryBulkDepositFor(_depositReceipts); + // for (uint i; i < 7; i++) { + // console.log("vote #", 15 + i); + // vm.prank(_param.roninBridgeManager.bridgeOperators[_numOperatorsForVoteExecuted + i]); + // _roninGatewayV3.tryBulkDepositFor(_depositReceipts); + // } + for (uint256 i = 0; i < _depositReceipts.length; i++) { - (VoteStatusConsumer.VoteStatus status,,,) = - _roninGatewayV3.depositVote(_depositReceipts[i].mainchain.chainId, _depositReceipts[i].id); + // Let the pending operator to vote after executed to tracking + (VoteStatusConsumer.VoteStatus status,,,) = _roninGatewayV3.depositVote(_depositReceipts[i].mainchain.chainId, _depositReceipts[i].id); assertEq(uint256(uint8(status)), uint256(uint8(VoteStatusConsumer.VoteStatus.Executed))); From c38fe508d103609b2ec6b5436eb65d100d590f1e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 12:45:01 +0700 Subject: [PATCH 024/305] fix(BridgeManager): fix param in operator adding callback --- src/extensions/bridge-operator-governance/BridgeManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index a15d0dfe..e9eff37a 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -283,7 +283,7 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu $._totalWeight += accumulatedWeight; - _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, addeds)); + _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds)); emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators); } From 633c93298f439791b831b96aa9750858f95c55d3 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 13:03:27 +0700 Subject: [PATCH 025/305] fix(BridgeManager): nit deprecated method --- src/extensions/bridge-operator-governance/BridgeManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index 589d203b..a1541f33 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -202,7 +202,7 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu /** * @inheritdoc IBridgeManager */ - function updateBridgeOperator(address currOperator, address newOperator) external onlyGovernor { + function updateBridgeOperator(address, /* currOperator */ address /* newOperator */ ) external view onlyGovernor { revert("Not supported"); } From 1a8945671a6bad21ddc7b10944691e1ec2d680ea Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 13:03:53 +0700 Subject: [PATCH 026/305] test: disable more update operator test, nit test --- test/bridge/integration/BaseIntegration.t.sol | 2 +- .../submitWithdrawal.MainchainGatewayV3.t.sol | 4 +++- .../bridge-manager/update/update.t.sol | 24 ++++++------------- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 0672de1b..0be51cd2 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -576,7 +576,7 @@ contract BaseIntegration_Test is Base_Test { LibTransfer.Receipt memory receipt, uint256[] memory signerPKs, bytes32 domainSeparator - ) internal view returns (SignatureConsumer.Signature[] memory sigs) { + ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol index 4c30a518..49b71529 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol @@ -57,7 +57,9 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test{ function testFuzz_submitWithdrawal_ERC20(uint seed) external { _withdrawalReceipt.ronin.tokenAddr = address(_roninAxs); _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainAxs); - _withdrawalReceipt.info.quantity = seed % 1_000_000; + + // Make sure quantity > 0 + _withdrawalReceipt.info.quantity = seed % 1_000_000 + 1; SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); diff --git a/test/bridge/unit/concrete/bridge-manager/update/update.t.sol b/test/bridge/unit/concrete/bridge-manager/update/update.t.sol index 4b425d79..e5c62c6c 100644 --- a/test/bridge/unit/concrete/bridge-manager/update/update.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/update/update.t.sol @@ -28,17 +28,12 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { changePrank({ msgSender: _bridgeOperators[0] }); // Run the test. - vm.expectRevert( - abi.encodeWithSelector( - ErrUnauthorized.selector, - IBridgeManager.updateBridgeOperator.selector, - RoleAccess.GOVERNOR - ) - ); + vm.expectRevert(abi.encodeWithSelector(ErrUnauthorized.selector, IBridgeManager.updateBridgeOperator.selector, RoleAccess.GOVERNOR)); _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorAddressIsZero() external { + vm.skip(true); address newOperator = address(0); // Run the test. @@ -47,6 +42,7 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_RevertWhen_NewOperatorIsExistedInCurrentOperatorList() external { + vm.skip(true); address newOperator = _bridgeOperators[2]; // Run the test. @@ -64,6 +60,7 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_RevertWhen_NewOperatorIsTheSameWithPreviousOperator() external { + vm.skip(true); address prevOperator = _bridgeManager.getOperatorOf(_caller); address newOperator = prevOperator; @@ -73,12 +70,9 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_UpdateOperators_NewOperatorIsValid() external { + vm.skip(true); // Get before test state. - ( - address[] memory beforeBridgeOperators, - address[] memory beforeGovernors, - uint96[] memory beforeVoteWeights - ) = _getBridgeMembers(); + (address[] memory beforeBridgeOperators, address[] memory beforeGovernors, uint96[] memory beforeVoteWeights) = _getBridgeMembers(); // Prepare data. address prevOperator = _bridgeManager.getOperatorOf(_caller); @@ -93,11 +87,7 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); // Get after test state - ( - address[] memory afterBridgeOperators, - address[] memory afterGovernors, - uint96[] memory afterVoteWeights - ) = _getBridgeMembers(); + (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembers(); // it should modify the current operators list beforeBridgeOperators[0] = newOperator; From 81e7c3dde721e4fecc8926fa67e3c0fae63d6e21 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 15:19:29 +0700 Subject: [PATCH 027/305] fix(MainchainGateway): handle deposit out-of-gas with WETH --- src/extensions/WETHVault.sol | 44 +++++++++++++++++++ src/interfaces/IWETH.sol | 4 ++ src/mainchain/MainchainGatewayV3.sol | 66 ++++++++++++++-------------- 3 files changed, 82 insertions(+), 32 deletions(-) create mode 100644 src/extensions/WETHVault.sol diff --git a/src/extensions/WETHVault.sol b/src/extensions/WETHVault.sol new file mode 100644 index 00000000..8ce38ec0 --- /dev/null +++ b/src/extensions/WETHVault.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.9; + +import "@openzeppelin/contracts/access/Ownable.sol"; + +import "../interfaces/IWETH.sol"; + +contract WETHVault is Ownable { + IWETH public weth; + + error ErrInsufficientBalance(); + error ErrExternalCallFailed(address sender, bytes4 sig); + + constructor(address weth_, address owner_) { + weth = IWETH(weth_); + + if (owner_ != address(0)) { + _transferOwnership(owner_); + } + } + + fallback() external payable { } + receive() external payable { } + + function transferToVault(uint val) external { + weth.withdraw(val); + } + + function withdrawToOwner(uint val) external onlyOwner { + if (val > address(this).balance) { + revert ErrInsufficientBalance(); + } + + (bool success,) = payable(msg.sender).call{ value: val }(""); + if (!success) { + revert ErrExternalCallFailed(msg.sender, msg.sig); + } + } + + function setWeth(address weth_) external onlyOwner { + weth = IWETH(weth_); + } +} diff --git a/src/interfaces/IWETH.sol b/src/interfaces/IWETH.sol index 44871433..5c00275f 100644 --- a/src/interfaces/IWETH.sol +++ b/src/interfaces/IWETH.sol @@ -2,8 +2,12 @@ pragma solidity ^0.8.0; interface IWETH { + event Transfer(address indexed src, address indexed dst, uint wad); + function deposit() external payable; + function transfer(address dst, uint wad) external returns (bool); + function withdraw(uint256 _wad) external; function balanceOf(address) external view returns (uint256); diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index dd1fab10..c5e44709 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -6,18 +6,12 @@ import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { IBridgeManager } from "../interfaces/bridge/IBridgeManager.sol"; import { IBridgeManagerCallback } from "../interfaces/bridge/IBridgeManagerCallback.sol"; import { HasContracts, ContractType } from "../extensions/collections/HasContracts.sol"; +import "../extensions/WETHVault.sol"; import "../extensions/WithdrawalLimitation.sol"; import "../libraries/Transfer.sol"; import "../interfaces/IMainchainGatewayV3.sol"; -contract MainchainGatewayV3 is - WithdrawalLimitation, - Initializable, - AccessControlEnumerable, - IMainchainGatewayV3, - HasContracts, - IBridgeManagerCallback -{ +contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessControlEnumerable, IMainchainGatewayV3, HasContracts, IBridgeManagerCallback { using Token for Token.Info; using Transfer for Transfer.Request; using Transfer for Transfer.Receipt; @@ -47,13 +41,14 @@ contract MainchainGatewayV3 is uint96 private _totalOperatorWeight; mapping(address operator => uint96 weight) private _operatorWeight; + WETHVault public wethVault; fallback() external payable { - _fallback(); + // _fallback(); } receive() external payable { - _fallback(); + // _fallback(); } /** @@ -115,10 +110,14 @@ contract MainchainGatewayV3 is _totalOperatorWeight = totalWeight; } + function initializeV4(address payable wethVault_) external reinitializer(4) { + wethVault = WETHVault(wethVault_); + } + /** * @dev Receives ether without doing anything. Use this function to topup native token. */ - function receiveEther() external payable {} + function receiveEther() external payable { } /** * @inheritdoc IMainchainGatewayV3 @@ -144,10 +143,7 @@ contract MainchainGatewayV3 is /** * @inheritdoc IMainchainGatewayV3 */ - function submitWithdrawal( - Transfer.Receipt calldata _receipt, - Signature[] calldata _signatures - ) external virtual whenNotPaused returns (bool _locked) { + function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) { return _submitWithdrawal(_receipt, _signatures); } @@ -184,11 +180,7 @@ contract MainchainGatewayV3 is /** * @inheritdoc IMainchainGatewayV3 */ - function mapTokens( - address[] calldata _mainchainTokens, - address[] calldata _roninTokens, - Token.Standard[] calldata _standards - ) external virtual onlyAdmin { + function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, Token.Standard[] calldata _standards) external virtual onlyAdmin { if (_mainchainTokens.length == 0) revert ErrEmptyArray(); _mapTokens(_mainchainTokens, _roninTokens, _standards); } @@ -349,9 +341,13 @@ contract MainchainGatewayV3 is if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard(); _request.info.transferFrom(_requester, address(this), _request.tokenAddr); + // Withdraw if token is WETH + // The withdraw of WETH must go via `WethVault`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy. if (_roninWeth == _request.tokenAddr) { - IWETH(_roninWeth).withdraw(_request.info.quantity); + IWETH(_roninWeth).transfer(address(wethVault), _request.info.quantity); + wethVault.transferToVault(_request.info.quantity); + wethVault.withdrawToOwner(_request.info.quantity); } } @@ -416,15 +412,24 @@ contract MainchainGatewayV3 is } /** - * @dev Receives ETH from WETH or creates deposit request. + * @dev Receives ETH from WETH or creates deposit request if sender is not WETH. */ - function _fallback() internal virtual whenNotPaused { - if (msg.sender != address(wrappedNativeToken)) { - Transfer.Request memory _request; - _request.recipientAddr = msg.sender; - _request.info.quantity = msg.value; - _requestDepositFor(_request, _request.recipientAddr); + function _fallback() internal virtual { + if (msg.sender == address(wrappedNativeToken)) { + return; } + + _createDepositOnFallback(); + } + + /** + * @dev Creates deposit request. + */ + function _createDepositOnFallback() internal virtual whenNotPaused { + Transfer.Request memory _request; + _request.recipientAddr = msg.sender; + _request.info.quantity = msg.value; + _requestDepositFor(_request, _request.recipientAddr); } /** @@ -484,10 +489,7 @@ contract MainchainGatewayV3 is /** * @inheritdoc IBridgeManagerCallback */ - function onBridgeOperatorsRemoved( - address[] calldata operators, - bool[] calldata removeds - ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { + function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { uint length = operators.length; if (length != removeds.length) revert ErrLengthMismatch(msg.sig); if (length == 0) { From 1c1435a04f4c62cdad7666b68413c9fe5fb8fde3 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 15:19:53 +0700 Subject: [PATCH 028/305] test: config for wethVault and fix test --- script/GeneralConfig.sol | 2 ++ .../contracts/MainchainWethVaultDeploy.s.sol | 23 +++++++++++++++++ script/interfaces/ISharedArgument.sol | 6 +++++ script/utils/Contract.sol | 4 ++- test/bridge/integration/BaseIntegration.t.sol | 16 ++++++++++-- .../submitWithdrawal.MainchainGatewayV3.t.sol | 25 ++++++++++++++----- ...al.MainchainGatewayV3.weth.benchmark.t.sol | 21 +++------------- test/mocks/MockDiscardEther.sol | 16 ++++++++++++ 8 files changed, 87 insertions(+), 26 deletions(-) create mode 100644 script/contracts/MainchainWethVaultDeploy.s.sol create mode 100644 test/mocks/MockDiscardEther.sol diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 2651f1f0..da6b26bb 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -57,6 +57,8 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _contractNameMap[Contract.RoninPauseEnforcer.key()] = "PauseEnforcer"; _contractNameMap[Contract.MainchainPauseEnforcer.key()] = "PauseEnforcer"; + + _contractNameMap[Contract.MainchainWETHVault.key()] = "WETHVault"; } function _mapContractName(Contract contractEnum) internal { diff --git a/script/contracts/MainchainWethVaultDeploy.s.sol b/script/contracts/MainchainWethVaultDeploy.s.sol new file mode 100644 index 00000000..bdbaecfa --- /dev/null +++ b/script/contracts/MainchainWethVaultDeploy.s.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { WETHVault } from "@ronin/contracts/extensions/WETHVault.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; + + +contract MainchainWethVaultDeploy is Migration { + function _defaultArguments() internal virtual override returns (bytes memory args) { + ISharedArgument.WETHVaultParam memory param = config.sharedArguments().mainchainWethVault; + + args = abi.encode( + param.weth, + param.owner + ); + } + + function run() public virtual returns (WETHVault) { + return WETHVault(_deployImmutable(Contract.MainchainWETHVault.key())); + } +} diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index 37971d4d..6c5b0719 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -106,11 +106,17 @@ interface ISharedArgument is IGeneralConfig { uint256[] governorPKs; } + struct WETHVaultParam { + address weth; + address owner; + } + struct SharedParameter { // mainchain BridgeManagerParam mainchainBridgeManager; MainchainGatewayV3Param mainchainGatewayV3; PauseEnforcerParam mainchainPauseEnforcer; + WETHVaultParam mainchainWethVault; // ronin BridgeManagerParam roninBridgeManager; RoninGatewayV3Param roninGatewayV3; diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index e94823f6..2cfecfe7 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -18,7 +18,8 @@ enum Contract { RoninBridgeManager, MainchainPauseEnforcer, MainchainGatewayV3, - MainchainBridgeManager + MainchainBridgeManager, + MainchainWETHVault } using { key, name } for Contract global; @@ -45,6 +46,7 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.MainchainPauseEnforcer) return "PauseEnforcer"; if (contractEnum == Contract.MainchainGatewayV3) return "MainchainGatewayV3"; if (contractEnum == Contract.MainchainBridgeManager) return "MainchainBridgeManager"; + if (contractEnum == Contract.MainchainWETHVault) return "WETHVault"; revert("Contract: Unknown contract"); } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 0be51cd2..105fe476 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -16,6 +16,7 @@ import { BridgeSlash } from "@ronin/contracts/ronin/gateway/BridgeSlash.sol"; import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { WETHVault } from "@ronin/contracts/extensions/WETHVault.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; @@ -48,6 +49,7 @@ import { RoninPauseEnforcerDeploy } from "@ronin/script/contracts/RoninPauseEnfo import { MainchainGatewayV3Deploy } from "@ronin/script/contracts/MainchainGatewayV3Deploy.s.sol"; import { MainchainBridgeManagerDeploy } from "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import { MainchainPauseEnforcerDeploy } from "@ronin/script/contracts/MainchainPauseEnforcerDeploy.s.sol"; +import { MainchainWethVaultDeploy } from "@ronin/script/contracts/MainchainWethVaultDeploy.s.sol"; import { WETHDeploy } from "@ronin/script/contracts/token/WETHDeploy.s.sol"; import { WRONDeploy } from "@ronin/script/contracts/token/WRONDeploy.s.sol"; import { AXSDeploy } from "@ronin/script/contracts/token/AXSDeploy.s.sol"; @@ -74,6 +76,7 @@ contract BaseIntegration_Test is Base_Test { PauseEnforcer _mainchainPauseEnforcer; MainchainGatewayV3 _mainchainGatewayV3; MainchainBridgeManager _mainchainBridgeManager; + WETHVault _mainchainWethVault; MockWrappedToken _roninWeth; MockWrappedToken _roninWron; @@ -135,6 +138,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainPauseEnforcer = new MainchainPauseEnforcerDeploy().run(); _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); + _mainchainWethVault = new MainchainWethVaultDeploy().run(); _mainchainWeth = new WETHDeploy().run(); _mainchainAxs = new AXSDeploy().run(); @@ -163,6 +167,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainPauseEnforcerInitialize(); _constructForMainchainBridgeManager(); _mainchainGatewayV3Initialize(); + _constructForMainchainWethVault(); } function _getMainchainAndRoninTokens() internal view returns (address[] memory mainchainTokens, address[] memory roninTokens) { @@ -428,6 +433,13 @@ contract BaseIntegration_Test is Base_Test { } } + function _constructForMainchainWethVault() internal { + vm.startPrank(_config.getSender()); + _mainchainWethVault.setWeth(address(_mainchainWeth)); + _mainchainWethVault.transferOwnership(address(_mainchainGatewayV3)); + vm.stopPrank(); + } + function _mainchainGatewayV3Initialize() internal { (address[] memory mainchainTokens, address[] memory roninTokens) = _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; @@ -486,13 +498,13 @@ contract BaseIntegration_Test is Base_Test { _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); _mainchainGatewayV3.initializeV3(_param.mainchainBridgeManager.bridgeOperators, _param.mainchainBridgeManager.voteWeights); + _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethVault))); } function _mainchainPauseEnforcerInitialize() internal { _param.mainchainPauseEnforcer.target = address(_mainchainGatewayV3); ISharedArgument.PauseEnforcerParam memory param = _param.mainchainPauseEnforcer; - _mainchainPauseEnforcer.initialize(IPauseTarget(param.target), param.admin, param.sentries); } @@ -576,7 +588,7 @@ contract BaseIntegration_Test is Base_Test { LibTransfer.Receipt memory receipt, uint256[] memory signerPKs, bytes32 domainSeparator - ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { + ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol index 49b71529..4c84f393 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.t.sol @@ -6,9 +6,10 @@ import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { MockDiscardEther } from "@ronin/test/mocks/MockDiscardEther.sol"; import "../../BaseIntegration.t.sol"; -contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test{ +contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { using Transfer for Transfer.Receipt; Transfer.Receipt _withdrawalReceipt; @@ -30,10 +31,6 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test{ _withdrawalReceipt.info.erc = Token.Standard.ERC20; _withdrawalReceipt.info.id = 0; _withdrawalReceipt.info.quantity = 0; - - vm.deal(address(_mainchainGatewayV3), 10 ether); - vm.prank(address(_mainchainGatewayV3)); - _mainchainWeth.deposit{ value: 10 ether }(); } function test_submitWithdrawal_Native() public { @@ -41,6 +38,22 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test{ SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); + vm.deal(address(_mainchainGatewayV3), 10 ether); + _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); + } + + function test_submitWithdrawal_WETH() public { + MockDiscardEther notReceiveEtherRecipient = new MockDiscardEther(); + + _withdrawalReceipt.mainchain.addr = address(notReceiveEtherRecipient); + + vm.deal(address(_mainchainGatewayV3), 10 ether); + + _withdrawalReceipt.info.quantity = 10; + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(_withdrawalReceipt, _param.test.operatorPKs, _domainSeparator); + + vm.expectEmit(address(_mainchainWeth)); + emit IWETH.Transfer(address(_mainchainGatewayV3), address(notReceiveEtherRecipient), _withdrawalReceipt.info.quantity); _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); } @@ -65,4 +78,4 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test{ _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, signatures); } - } +} diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol index cf190f85..fc5cd777 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol @@ -6,6 +6,7 @@ import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { MockDiscardEther } from "@ronin/test/mocks/MockDiscardEther.sol"; import "../../BaseIntegration.t.sol"; contract SubmitWithdrawal_MainchainGatewayV3_Weth_Benchmark_Test is BaseIntegration_Test { @@ -19,7 +20,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Weth_Benchmark_Test is BaseIntegrat function setUp() public virtual override { super.setUp(); - DiscardEther notReceiveEtherRecipient = new DiscardEther(); + MockDiscardEther notReceiveEtherRecipient = new MockDiscardEther(); _domainSeparator = _mainchainGatewayV3.DOMAIN_SEPARATOR(); @@ -27,10 +28,10 @@ contract SubmitWithdrawal_MainchainGatewayV3_Weth_Benchmark_Test is BaseIntegrat _withdrawalReceipt.kind = Transfer.Kind.Withdrawal; _withdrawalReceipt.ronin.addr = makeAddr("requester"); _withdrawalReceipt.ronin.tokenAddr = address(_roninWeth); - _withdrawalReceipt.ronin.chainId =block.chainid; + _withdrawalReceipt.ronin.chainId = block.chainid; _withdrawalReceipt.mainchain.addr = address(notReceiveEtherRecipient); _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); - _withdrawalReceipt.mainchain.chainId =block.chainid; + _withdrawalReceipt.mainchain.chainId = block.chainid; _withdrawalReceipt.info.erc = Token.Standard.ERC20; _withdrawalReceipt.info.id = 0; _withdrawalReceipt.info.quantity = 0; @@ -50,17 +51,3 @@ contract SubmitWithdrawal_MainchainGatewayV3_Weth_Benchmark_Test is BaseIntegrat _mainchainGatewayV3.submitWithdrawal(_withdrawalReceipt, _signatures); } } - -contract DiscardEther { - fallback() external payable { - _fallback(); - } - - receive() external payable { - _fallback(); - } - - function _fallback() internal { - revert("Not receive ether"); - } -} \ No newline at end of file diff --git a/test/mocks/MockDiscardEther.sol b/test/mocks/MockDiscardEther.sol new file mode 100644 index 00000000..6e7c11f6 --- /dev/null +++ b/test/mocks/MockDiscardEther.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract MockDiscardEther { + fallback() external payable { + _fallback(); + } + + receive() external payable { + _fallback(); + } + + function _fallback() internal view { + revert("Not receive ether"); + } +} From 0f1dc4790e761f6121f6c121051f295da58ab5e2 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 15:22:57 +0700 Subject: [PATCH 029/305] nit: rename WETHVault to WethMediator --- script/GeneralConfig.sol | 2 +- ...s.sol => MainchainWethMediatorDeploy.s.sol} | 10 +++++----- script/interfaces/ISharedArgument.sol | 4 ++-- script/utils/Contract.sol | 4 ++-- .../{WETHVault.sol => WethMediator.sol} | 2 +- src/mainchain/MainchainGatewayV3.sol | 16 ++++++++-------- test/bridge/integration/BaseIntegration.t.sol | 18 +++++++++--------- 7 files changed, 28 insertions(+), 28 deletions(-) rename script/contracts/{MainchainWethVaultDeploy.s.sol => MainchainWethMediatorDeploy.s.sol} (51%) rename src/extensions/{WETHVault.sol => WethMediator.sol} (96%) diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index da6b26bb..8b6a4f16 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -58,7 +58,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _contractNameMap[Contract.RoninPauseEnforcer.key()] = "PauseEnforcer"; _contractNameMap[Contract.MainchainPauseEnforcer.key()] = "PauseEnforcer"; - _contractNameMap[Contract.MainchainWETHVault.key()] = "WETHVault"; + _contractNameMap[Contract.MainchainWethMediator.key()] = "WethMediator"; } function _mapContractName(Contract contractEnum) internal { diff --git a/script/contracts/MainchainWethVaultDeploy.s.sol b/script/contracts/MainchainWethMediatorDeploy.s.sol similarity index 51% rename from script/contracts/MainchainWethVaultDeploy.s.sol rename to script/contracts/MainchainWethMediatorDeploy.s.sol index bdbaecfa..65d15b9b 100644 --- a/script/contracts/MainchainWethVaultDeploy.s.sol +++ b/script/contracts/MainchainWethMediatorDeploy.s.sol @@ -1,15 +1,15 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { WETHVault } from "@ronin/contracts/extensions/WETHVault.sol"; +import { WethMediator } from "@ronin/contracts/extensions/WethMediator.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import { Migration } from "../Migration.s.sol"; -contract MainchainWethVaultDeploy is Migration { +contract MainchainWethMediatorDeploy is Migration { function _defaultArguments() internal virtual override returns (bytes memory args) { - ISharedArgument.WETHVaultParam memory param = config.sharedArguments().mainchainWethVault; + ISharedArgument.WethMediatorParam memory param = config.sharedArguments().mainchainWethMediator; args = abi.encode( param.weth, @@ -17,7 +17,7 @@ contract MainchainWethVaultDeploy is Migration { ); } - function run() public virtual returns (WETHVault) { - return WETHVault(_deployImmutable(Contract.MainchainWETHVault.key())); + function run() public virtual returns (WethMediator) { + return WethMediator(_deployImmutable(Contract.MainchainWethMediator.key())); } } diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index 6c5b0719..dc2e8090 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -106,7 +106,7 @@ interface ISharedArgument is IGeneralConfig { uint256[] governorPKs; } - struct WETHVaultParam { + struct WethMediatorParam { address weth; address owner; } @@ -116,7 +116,7 @@ interface ISharedArgument is IGeneralConfig { BridgeManagerParam mainchainBridgeManager; MainchainGatewayV3Param mainchainGatewayV3; PauseEnforcerParam mainchainPauseEnforcer; - WETHVaultParam mainchainWethVault; + WethMediatorParam mainchainWethMediator; // ronin BridgeManagerParam roninBridgeManager; RoninGatewayV3Param roninGatewayV3; diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index 2cfecfe7..a1c8e9c4 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -19,7 +19,7 @@ enum Contract { MainchainPauseEnforcer, MainchainGatewayV3, MainchainBridgeManager, - MainchainWETHVault + MainchainWethMediator } using { key, name } for Contract global; @@ -46,7 +46,7 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.MainchainPauseEnforcer) return "PauseEnforcer"; if (contractEnum == Contract.MainchainGatewayV3) return "MainchainGatewayV3"; if (contractEnum == Contract.MainchainBridgeManager) return "MainchainBridgeManager"; - if (contractEnum == Contract.MainchainWETHVault) return "WETHVault"; + if (contractEnum == Contract.MainchainWethMediator) return "WethMediator"; revert("Contract: Unknown contract"); } diff --git a/src/extensions/WETHVault.sol b/src/extensions/WethMediator.sol similarity index 96% rename from src/extensions/WETHVault.sol rename to src/extensions/WethMediator.sol index 8ce38ec0..6cc6ee00 100644 --- a/src/extensions/WETHVault.sol +++ b/src/extensions/WethMediator.sol @@ -6,7 +6,7 @@ import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/IWETH.sol"; -contract WETHVault is Ownable { +contract WethMediator is Ownable { IWETH public weth; error ErrInsufficientBalance(); diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index c5e44709..f51333f7 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -6,7 +6,7 @@ import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { IBridgeManager } from "../interfaces/bridge/IBridgeManager.sol"; import { IBridgeManagerCallback } from "../interfaces/bridge/IBridgeManagerCallback.sol"; import { HasContracts, ContractType } from "../extensions/collections/HasContracts.sol"; -import "../extensions/WETHVault.sol"; +import "../extensions/WethMediator.sol"; import "../extensions/WithdrawalLimitation.sol"; import "../libraries/Transfer.sol"; import "../interfaces/IMainchainGatewayV3.sol"; @@ -41,7 +41,7 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro uint96 private _totalOperatorWeight; mapping(address operator => uint96 weight) private _operatorWeight; - WETHVault public wethVault; + WethMediator public wethMediator; fallback() external payable { // _fallback(); @@ -110,8 +110,8 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro _totalOperatorWeight = totalWeight; } - function initializeV4(address payable wethVault_) external reinitializer(4) { - wethVault = WETHVault(wethVault_); + function initializeV4(address payable wethMediator_) external reinitializer(4) { + wethMediator = WethMediator(wethMediator_); } /** @@ -343,11 +343,11 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro _request.info.transferFrom(_requester, address(this), _request.tokenAddr); // Withdraw if token is WETH - // The withdraw of WETH must go via `WethVault`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy. + // The withdraw of WETH must go via `WethMediator`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy. if (_roninWeth == _request.tokenAddr) { - IWETH(_roninWeth).transfer(address(wethVault), _request.info.quantity); - wethVault.transferToVault(_request.info.quantity); - wethVault.withdrawToOwner(_request.info.quantity); + IWETH(_roninWeth).transfer(address(wethMediator), _request.info.quantity); + wethMediator.transferToVault(_request.info.quantity); + wethMediator.withdrawToOwner(_request.info.quantity); } } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 105fe476..e87e2293 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -16,7 +16,7 @@ import { BridgeSlash } from "@ronin/contracts/ronin/gateway/BridgeSlash.sol"; import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; -import { WETHVault } from "@ronin/contracts/extensions/WETHVault.sol"; +import { WethMediator } from "@ronin/contracts/extensions/WethMediator.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; @@ -49,7 +49,7 @@ import { RoninPauseEnforcerDeploy } from "@ronin/script/contracts/RoninPauseEnfo import { MainchainGatewayV3Deploy } from "@ronin/script/contracts/MainchainGatewayV3Deploy.s.sol"; import { MainchainBridgeManagerDeploy } from "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import { MainchainPauseEnforcerDeploy } from "@ronin/script/contracts/MainchainPauseEnforcerDeploy.s.sol"; -import { MainchainWethVaultDeploy } from "@ronin/script/contracts/MainchainWethVaultDeploy.s.sol"; +import { MainchainWethMediatorDeploy } from "@ronin/script/contracts/MainchainWethMediatorDeploy.s.sol"; import { WETHDeploy } from "@ronin/script/contracts/token/WETHDeploy.s.sol"; import { WRONDeploy } from "@ronin/script/contracts/token/WRONDeploy.s.sol"; import { AXSDeploy } from "@ronin/script/contracts/token/AXSDeploy.s.sol"; @@ -76,7 +76,7 @@ contract BaseIntegration_Test is Base_Test { PauseEnforcer _mainchainPauseEnforcer; MainchainGatewayV3 _mainchainGatewayV3; MainchainBridgeManager _mainchainBridgeManager; - WETHVault _mainchainWethVault; + WethMediator _mainchainWethMediator; MockWrappedToken _roninWeth; MockWrappedToken _roninWron; @@ -138,7 +138,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainPauseEnforcer = new MainchainPauseEnforcerDeploy().run(); _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); - _mainchainWethVault = new MainchainWethVaultDeploy().run(); + _mainchainWethMediator = new MainchainWethMediatorDeploy().run(); _mainchainWeth = new WETHDeploy().run(); _mainchainAxs = new AXSDeploy().run(); @@ -167,7 +167,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainPauseEnforcerInitialize(); _constructForMainchainBridgeManager(); _mainchainGatewayV3Initialize(); - _constructForMainchainWethVault(); + _constructForMainchainWethMediator(); } function _getMainchainAndRoninTokens() internal view returns (address[] memory mainchainTokens, address[] memory roninTokens) { @@ -433,10 +433,10 @@ contract BaseIntegration_Test is Base_Test { } } - function _constructForMainchainWethVault() internal { + function _constructForMainchainWethMediator() internal { vm.startPrank(_config.getSender()); - _mainchainWethVault.setWeth(address(_mainchainWeth)); - _mainchainWethVault.transferOwnership(address(_mainchainGatewayV3)); + _mainchainWethMediator.setWeth(address(_mainchainWeth)); + _mainchainWethMediator.transferOwnership(address(_mainchainGatewayV3)); vm.stopPrank(); } @@ -498,7 +498,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); _mainchainGatewayV3.initializeV3(_param.mainchainBridgeManager.bridgeOperators, _param.mainchainBridgeManager.voteWeights); - _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethVault))); + _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethMediator))); } function _mainchainPauseEnforcerInitialize() internal { From 60409395369c72e76716f52d1f989c123bed68c0 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 15:25:11 +0700 Subject: [PATCH 030/305] nit: fix mock --- test/mocks/MockDiscardEther.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mocks/MockDiscardEther.sol b/test/mocks/MockDiscardEther.sol index 6e7c11f6..bbf4befb 100644 --- a/test/mocks/MockDiscardEther.sol +++ b/test/mocks/MockDiscardEther.sol @@ -10,7 +10,7 @@ contract MockDiscardEther { _fallback(); } - function _fallback() internal view { + function _fallback() internal pure { revert("Not receive ether"); } } From 5dfec58379bbb2f670e533cdd3fea8d351925ce6 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 5 Mar 2024 23:01:29 +0700 Subject: [PATCH 031/305] feat(BridgeReward, BridgeTracking): allow syncReward multiple periods --- src/interfaces/bridge/IBridgeReward.sol | 12 ++--- src/ronin/gateway/BridgeReward.sol | 60 ++++++++++++------------ src/ronin/gateway/BridgeTracking.sol | 61 ++++++------------------- 3 files changed, 46 insertions(+), 87 deletions(-) diff --git a/src/interfaces/bridge/IBridgeReward.sol b/src/interfaces/bridge/IBridgeReward.sol index 404d5d9e..6569eb54 100644 --- a/src/interfaces/bridge/IBridgeReward.sol +++ b/src/interfaces/bridge/IBridgeReward.sol @@ -21,15 +21,9 @@ interface IBridgeReward is IBridgeRewardEvents { * * Requirements: * - This method is only called once each period. - * - The caller must be the bridge tracking contract or a bridge operator. - */ - function execSyncReward( - address[] calldata operators, - uint256[] calldata ballots, - uint256 totalBallot, - uint256 totalVote, - uint256 period - ) external; + * - The caller must be the bridge tracking contract + */ + function execSyncReward() external; /** * @dev Retrieve the total amount of rewards that have been topped up in the contract. diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index a70fde37..1da2b2d4 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -26,6 +26,8 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT TUint256Slot private constant $_TOTAL_REWARDS_TOPPED_UP = TUint256Slot.wrap(0x9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c64); /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeReward.totalRewardScattered.slot") - 1 TUint256Slot private constant $_TOTAL_REWARDS_SCATTERED = TUint256Slot.wrap(0x3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f4); + /// @dev value is equal to keccak256("@ronin.dpos.gateway.BridgeReward.maxRewardingPeriodCount.slot") - 1 + TUint256Slot private constant $_MAX_REWARDING_PERIOD_COUNT = TUint256Slot.wrap(0xaf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c); address private immutable _self; @@ -62,6 +64,10 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT _setContract(ContractType.GOVERNANCE_ADMIN, address(0)); } + function initializeV2() external reinitializer(2) { + $_MAX_REWARDING_PERIOD_COUNT.store(5); + } + /** * @inheritdoc IBridgeReward */ @@ -72,21 +78,39 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT /** * @inheritdoc IBridgeReward */ - function syncReward(uint256 periodLength) external { + function syncReward(uint256 periodCount) external { if (!_isBridgeOperator(msg.sender)) revert ErrUnauthorizedCall(msg.sig); + uint256 latestRewardedPeriod = getLatestRewardedPeriod(); + uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); + if (latestRewardedPeriod + periodCount > currentPeriod) revert ErrInvalidArguments(msg.sig); + if (currentPeriod <= latestRewardedPeriod) revert ErrInvalidArguments(msg.sig); + + _syncRewardBatch(latestRewardedPeriod, periodCount); + } + + /** + * @inheritdoc IBridgeReward + */ + function execSyncReward() external onlyContract(ContractType.BRIDGE_TRACKING) { uint256 latestRewardedPeriod = getLatestRewardedPeriod(); uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); if (currentPeriod <= latestRewardedPeriod) revert ErrInvalidArguments(msg.sig); - if (latestRewardedPeriod + periodLength > currentPeriod) revert ErrInvalidArguments(msg.sig); - $_LATEST_REWARDED_PERIOD.addAssign(periodLength); + // Restrict number of period to reward in a transaction, to avoid consume too much gas + uint toRewardPeriodCount = currentPeriod - latestRewardedPeriod; + toRewardPeriodCount = Math.min(toRewardPeriodCount, $_MAX_REWARDING_PERIOD_COUNT); + _syncRewardBatch(latestRewardedPeriod, toRewardPeriodCount); + } + + function _syncRewardBatch(uint256 latestRewardedPeriod, uint256 periodCount) internal { address[] memory operators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators(); IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 i = 1; i <= periodLength; i++) { + for (uint256 i = 1; i <= periodCount; i++) { + $_LATEST_REWARDED_PERIOD.addAssign(1); _syncReward({ operators: operators, ballots: bridgeTrackingContract.getManyTotalBallots(latestRewardedPeriod, operators), @@ -97,32 +121,6 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT } } - /** - * @inheritdoc IBridgeReward - * - * @dev The `period` a.k.a. `latestSyncedPeriod` must equal to `latestRewardedPeriod` + 1. - */ - function execSyncReward( - address[] calldata operators, - uint256[] calldata ballots, - uint256 totalBallot, - uint256 totalVote, - uint256 period - ) external onlyContract(ContractType.BRIDGE_TRACKING) { - if (operators.length != ballots.length) revert ErrLengthMismatch(msg.sig); - if (operators.length == 0) return; - - // Only sync the period that is after the latest rewarded period, i.e. `latestSyncedPeriod == latestRewardedPeriod + 1`. - unchecked { - uint256 latestRewardedPeriod = getLatestRewardedPeriod(); - if (period < latestRewardedPeriod + 1) revert ErrInvalidArguments(msg.sig); - else if (period > latestRewardedPeriod + 1) revert ErrSyncTooFarPeriod(period, latestRewardedPeriod); - } - $_LATEST_REWARDED_PERIOD.store(period); - - _syncReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); - } - /** * @inheritdoc IBridgeReward */ @@ -167,7 +165,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT bool shouldSlash; uint256 sumRewards; - for (uint256 i; i < numBridgeOperators; ) { + for (uint256 i; i < numBridgeOperators;) { (reward, shouldSlash) = _calcRewardAndCheckSlashedStatus({ shouldShareEqually: shouldShareEqually, numBridgeOperators: numBridgeOperators, diff --git a/src/ronin/gateway/BridgeTracking.sol b/src/ronin/gateway/BridgeTracking.sol index c55ffa1b..f52a0f19 100644 --- a/src/ronin/gateway/BridgeTracking.sol +++ b/src/ronin/gateway/BridgeTracking.sol @@ -86,12 +86,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr delete ______deprecatedValidator; } - function initializeV3( - address bridgeManager, - address bridgeSlash, - address bridgeReward, - address dposGA - ) external reinitializer(3) { + function initializeV3(address bridgeManager, address bridgeSlash, address bridgeReward, address dposGA) external reinitializer(3) { _setContract(ContractType.BRIDGE_MANAGER, bridgeManager); _setContract(ContractType.BRIDGE_SLASH, bridgeSlash); _setContract(ContractType.BRIDGE_REWARD, bridgeReward); @@ -143,21 +138,15 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr /** * @inheritdoc IBridgeTracking */ - function getManyTotalBallots( - uint256 period, - address[] calldata operators - ) external view override returns (uint256[] memory _res) { + function getManyTotalBallots(uint256 period, address[] calldata operators) external view override returns (uint256[] memory _res) { _res = _getManyTotalBallots(period, operators); } - function _getManyTotalBallots( - uint256 period, - address[] memory operators - ) internal view returns (uint256[] memory res) { + function _getManyTotalBallots(uint256 period, address[] memory operators) internal view returns (uint256[] memory res) { uint256 length = operators.length; res = new uint256[](length); bool isBufferCounted = _isBufferCountedForPeriod(period); - for (uint i = 0; i < length; ) { + for (uint i = 0; i < length;) { res[i] = _totalBallotOf(period, operators[i], isBufferCounted); unchecked { @@ -176,10 +165,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr /** * @inheritdoc IBridgeTracking */ - function handleVoteApproved( - VoteKind kind, - uint256 requestId - ) external override onlyContract(ContractType.BRIDGE) skipOnNotStarted { + function handleVoteApproved(VoteKind kind, uint256 requestId) external override onlyContract(ContractType.BRIDGE) skipOnNotStarted { ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId]; // Only records for the receipt which not approved @@ -193,7 +179,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr _bufferRequest.id = requestId; address[] storage _voters = _receiptInfo.voters; - for (uint i = 0; i < _voters.length; ) { + for (uint i = 0; i < _voters.length;) { _increaseBallot(kind, requestId, _voters[i], currentPeriod); unchecked { @@ -208,11 +194,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr /** * @inheritdoc IBridgeTracking */ - function recordVote( - VoteKind kind, - uint256 requestId, - address operator - ) external override onlyContract(ContractType.BRIDGE) skipOnNotStarted { + function recordVote(VoteKind kind, uint256 requestId, address operator) external override onlyContract(ContractType.BRIDGE) skipOnNotStarted { uint256 period = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); _trySyncBuffer(); ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId]; @@ -239,23 +221,14 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr address bridgeSlashContract = getContract(ContractType.BRIDGE_SLASH); (bool success, bytes memory returnOrRevertData) = bridgeSlashContract.call( - abi.encodeCall( - IBridgeSlash.execSlashBridgeOperators, - (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod) - ) + abi.encodeCall(IBridgeSlash.execSlashBridgeOperators, (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod)) ); if (!success) { - emit ExternalCallFailed( - bridgeSlashContract, - IBridgeSlash.execSlashBridgeOperators.selector, - returnOrRevertData - ); + emit ExternalCallFailed(bridgeSlashContract, IBridgeSlash.execSlashBridgeOperators.selector, returnOrRevertData); } address bridgeRewardContract = getContract(ContractType.BRIDGE_REWARD); - (success, returnOrRevertData) = bridgeRewardContract.call( - abi.encodeCall(IBridgeReward.execSyncReward, (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod)) - ); + (success, returnOrRevertData) = bridgeRewardContract.call(abi.encodeCall(IBridgeReward.execSyncReward, ())); if (!success) { emit ExternalCallFailed(bridgeRewardContract, IBridgeReward.execSyncReward.selector, returnOrRevertData); } @@ -297,11 +270,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr /** * @dev See `totalBallotOf`. */ - function _totalBallotOf( - uint256 period, - address operator, - bool mustCountLastStats - ) internal view returns (uint256 _totalBallot) { + function _totalBallotOf(uint256 period, address operator, bool mustCountLastStats) internal view returns (uint256 _totalBallot) { _totalBallot = _periodMetric[period].totalBallotOf[operator]; if (mustCountLastStats) { _totalBallot += _bufferMetric.data.totalBallotOf[operator]; @@ -327,7 +296,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr _metric.totalBallot += _bufferMetric.data.totalBallot; // Copy voters info and voters' ballot - for (uint i = 0; i < _bufferMetric.data.voters.length; ) { + for (uint i = 0; i < _bufferMetric.data.voters.length;) { address voter = _bufferMetric.data.voters[i]; _metric.totalBallotOf[voter] += _bufferMetric.data.totalBallotOf[voter]; delete _bufferMetric.data.totalBallotOf[voter]; // need to manually delete each element, due to mapping @@ -338,7 +307,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr } // Mark all receipts in the buffer as tracked. Keep total number of receipts and delete receipt details. - for (uint i = 0; i < _bufferMetric.requests.length; ) { + for (uint i = 0; i < _bufferMetric.requests.length;) { Request storage _bufferRequest = _bufferMetric.requests[i]; ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[_bufferRequest.kind][_bufferRequest.id]; _receiptInfo.trackedPeriod = trackedPeriod; @@ -359,9 +328,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr function _isBufferCountedForPeriod(uint256 queriedPeriod) internal view returns (bool) { IRoninValidatorSet validatorContract = IRoninValidatorSet(getContract(ContractType.VALIDATOR)); uint256 currentEpoch = validatorContract.epochOf(block.number); - (bool filled, uint256 periodOfNextTemporaryEpoch) = validatorContract.tryGetPeriodOfEpoch( - _bufferMetric.lastEpoch + 1 - ); + (bool filled, uint256 periodOfNextTemporaryEpoch) = validatorContract.tryGetPeriodOfEpoch(_bufferMetric.lastEpoch + 1); return filled && queriedPeriod == periodOfNextTemporaryEpoch && _bufferMetric.lastEpoch < currentEpoch; } } From 561dafd99376756564dcb21962e62e4f658fa3bd Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 15:44:35 +0700 Subject: [PATCH 032/305] feat(Gateway): rename `Slashed` event to `BridgeSlashed` --- src/interfaces/bridge/events/IBridgeSlashEvents.sol | 2 +- src/ronin/gateway/BridgeSlash.sol | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interfaces/bridge/events/IBridgeSlashEvents.sol b/src/interfaces/bridge/events/IBridgeSlashEvents.sol index 5e1bbd6e..2822b884 100644 --- a/src/interfaces/bridge/events/IBridgeSlashEvents.sol +++ b/src/interfaces/bridge/events/IBridgeSlashEvents.sol @@ -26,7 +26,7 @@ interface IBridgeSlashEvents { * @param period The period in which the operator is slashed. * @param slashUntilPeriod The period until which the operator is penalized. */ - event Slashed(Tier indexed tier, address indexed bridgeOperator, uint256 indexed period, uint256 slashUntilPeriod); + event BridgeSlashed(Tier indexed tier, address indexed bridgeOperator, uint256 indexed period, uint256 slashUntilPeriod); /** * @dev Emitted when a removal request is made for a bridge operator. diff --git a/src/ronin/gateway/BridgeSlash.sol b/src/ronin/gateway/BridgeSlash.sol index 3a39415b..e0f5374a 100644 --- a/src/ronin/gateway/BridgeSlash.sol +++ b/src/ronin/gateway/BridgeSlash.sol @@ -178,11 +178,11 @@ contract BridgeSlash is emit RemovalRequested(period, bridgeOperator); } - // Emit the Slashed event if the tier is not Tier 0 and bridge operator will not be removed. + // Emit the {BridgeSlashed} event if the tier is not Tier 0 and bridge operator will not be removed. // Update the slash until period number for the bridge operator if the tier is not Tier 0. if (tier != Tier.Tier0) { if (slashUntilPeriod != SLASH_PERMANENT_DURATION) { - emit Slashed(tier, bridgeOperator, period, slashUntilPeriod); + emit BridgeSlashed(tier, bridgeOperator, period, slashUntilPeriod); } // Store updated slash until period From 9f685a2858ee21736abe1f42a83351d3551c3fb5 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 17:48:36 +0700 Subject: [PATCH 033/305] feat(BridgeManager): restrict min governors to exist --- .../BridgeManager.sol | 20 ++++++++++++++ src/interfaces/bridge/IBridgeManager.sol | 10 +++++++ .../bridge/events/IBridgeManagerEvents.sol | 5 ++++ src/libraries/AddressArrayUtils.sol | 4 +-- src/libraries/Uint96ArrayUtils.sol | 27 +++++++++++++++++++ src/mainchain/MainchainBridgeManager.sol | 10 ++----- src/ronin/gateway/RoninBridgeManager.sol | 26 +++++++----------- 7 files changed, 75 insertions(+), 27 deletions(-) create mode 100644 src/libraries/Uint96ArrayUtils.sol diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index a1541f33..f6bbb8ff 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -28,6 +28,8 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu mapping(address operator => uint96 weight) _operatorWeight; /// @dev Total weight of all governors / operators. uint256 _totalWeight; + /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible. + uint256 _minRequiredGovernor; } // keccak256(abi.encode(uint256(keccak256("ronin.storage.BridgeManagerStorageLocation")) - 1)) & ~bytes32(uint256(0xff)) @@ -71,6 +73,7 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu ); _addBridgeOperators(voteWeights, governors, bridgeOperators); + _setMinRequiredGovernor(3); } // ===================== CONFIG ======================== @@ -83,6 +86,20 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu _setContract(contractType, addr); } + /** + * @inheritdoc IBridgeManager + */ + function setMinRequiredGovernor(uint min) external override onlySelfCall { + _setMinRequiredGovernor(min); + } + + function _setMinRequiredGovernor(uint min) internal { + if (min < 3) revert ErrInvalidInput(); + BridgeManagerStorage storage $ = _getBridgeManagerStorage(); + $._minRequiredGovernor = min; + emit MinRequiredGovernorUpdated(min); + } + /** * @dev Internal function to require that the caller has governor role access. */ @@ -289,6 +306,9 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu // simply skip remove operations if inputs are empty. if (length == 0) return removeds; + if ($._governors.length - length < $._minRequiredGovernor) { + revert ErrBelowMinRequiredGovernors(); + } address iGovernor; address iOperator; diff --git a/src/interfaces/bridge/IBridgeManager.sol b/src/interfaces/bridge/IBridgeManager.sol index ccbe7d16..aa057dac 100644 --- a/src/interfaces/bridge/IBridgeManager.sol +++ b/src/interfaces/bridge/IBridgeManager.sol @@ -14,6 +14,10 @@ interface IBridgeManager is IBridgeManagerEvents { error ErrGovernorNotFound(address governor); /// @notice Error indicating that the msg.sender is not match the required governor error ErrGovernorNotMatch(address required, address sender); + /// @notice Error indicating that the governors list will go below minimum number of required governor. + error ErrBelowMinRequiredGovernors(); + /// @notice Common invalid input error + error ErrInvalidInput(); /** * @dev The domain separator used for computing hash digests in the contract. @@ -187,4 +191,10 @@ interface IBridgeManager is IBridgeManagerEvents { * @param newOperator The new address of the operator. */ function updateBridgeOperator(address currOperator, address newOperator) external; + + /** + * @dev Self-call to update the minimum required governor. + * @param min The minimum number, this must not less than 3. + */ + function setMinRequiredGovernor(uint min) external; } diff --git a/src/interfaces/bridge/events/IBridgeManagerEvents.sol b/src/interfaces/bridge/events/IBridgeManagerEvents.sol index 163d5dea..75748f6a 100644 --- a/src/interfaces/bridge/events/IBridgeManagerEvents.sol +++ b/src/interfaces/bridge/events/IBridgeManagerEvents.sol @@ -26,4 +26,9 @@ interface IBridgeManagerEvents { * @dev Emitted when a bridge operator is updated. */ event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator); + + /** + * @dev Emitted when the minimum number of required governors is updated. + */ + event MinRequiredGovernorUpdated(uint min); } diff --git a/src/libraries/AddressArrayUtils.sol b/src/libraries/AddressArrayUtils.sol index 9def728d..60aa7089 100644 --- a/src/libraries/AddressArrayUtils.sol +++ b/src/libraries/AddressArrayUtils.sol @@ -52,13 +52,13 @@ library AddressArrayUtils { c = new address[](lengthA + lengthB); } uint256 i; - for (; i < lengthA; ) { + for (; i < lengthA;) { c[i] = a[i]; unchecked { ++i; } } - for (uint256 j; j < lengthB; ) { + for (uint256 j; j < lengthB;) { c[i] = b[j]; unchecked { ++i; diff --git a/src/libraries/Uint96ArrayUtils.sol b/src/libraries/Uint96ArrayUtils.sol new file mode 100644 index 00000000..18f8d639 --- /dev/null +++ b/src/libraries/Uint96ArrayUtils.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: UNLICENSED + +pragma solidity ^0.8.0; + +library Uint96ArrayUtils { + function extend(uint96[] memory a, uint96[] memory b) internal pure returns (uint96[] memory c) { + uint256 lengthA = a.length; + uint256 lengthB = b.length; + unchecked { + c = new uint96[](lengthA + lengthB); + } + uint256 i; + for (; i < lengthA;) { + c[i] = a[i]; + unchecked { + ++i; + } + } + for (uint256 j; j < lengthB;) { + c[i] = b[j]; + unchecked { + ++i; + ++j; + } + } + } +} diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index ff9934d5..fbd2c526 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -29,7 +29,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna CoreGovernance(DEFAULT_EXPIRY_DURATION) GlobalCoreGovernance(targetOptions, targets) BridgeManager(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights) - {} + { } /** * @dev See `GovernanceRelay-_relayProposal`. @@ -56,13 +56,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna Ballot.VoteType[] calldata supports_, Signature[] calldata signatures ) external onlyGovernor { - _relayGlobalProposal({ - globalProposal: globalProposal, - supports_: supports_, - signatures: signatures, - domainSeparator: DOMAIN_SEPARATOR, - creator: msg.sender - }); + _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, domainSeparator: DOMAIN_SEPARATOR, creator: msg.sender }); } /** diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 7c4084c7..3e1452bf 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -3,7 +3,11 @@ pragma solidity ^0.8.0; import { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from "../../extensions/bridge-operator-governance/BridgeManager.sol"; import { Ballot, GlobalProposal, Proposal, GovernanceProposal } from "../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol"; -import { CoreGovernance, GlobalCoreGovernance, GlobalGovernanceProposal } from "../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol"; +import { + CoreGovernance, + GlobalCoreGovernance, + GlobalGovernanceProposal +} from "../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol"; import { VoteStatusConsumer } from "../../interfaces/consumers/VoteStatusConsumer.sol"; import { ErrQueryForEmptyVote } from "../../utils/CommonErrors.sol"; @@ -25,7 +29,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan CoreGovernance(expiryDuration) GlobalCoreGovernance(targetOptions, targets) BridgeManager(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights) - {} + { } /** * CURRENT NETWORK @@ -101,21 +105,14 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan * - The method caller is governor. * */ - function castProposalVoteForCurrentNetwork( - Proposal.ProposalDetail calldata proposal, - Ballot.VoteType support - ) external onlyGovernor { + function castProposalVoteForCurrentNetwork(Proposal.ProposalDetail calldata proposal, Ballot.VoteType support) external onlyGovernor { _castProposalVoteForCurrentNetwork(msg.sender, proposal, support); } /** * @dev See `GovernanceProposal-_castProposalBySignatures`. */ - function castProposalBySignatures( - Proposal.ProposalDetail calldata proposal, - Ballot.VoteType[] calldata supports_, - Signature[] calldata signatures - ) external { + function castProposalBySignatures(Proposal.ProposalDetail calldata proposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures) external { _castProposalBySignatures(proposal, supports_, signatures, DOMAIN_SEPARATOR); } @@ -176,12 +173,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan Ballot.VoteType[] calldata supports_, Signature[] calldata signatures ) external { - _castGlobalProposalBySignatures({ - globalProposal: globalProposal, - supports_: supports_, - signatures: signatures, - domainSeparator: DOMAIN_SEPARATOR - }); + _castGlobalProposalBySignatures({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, domainSeparator: DOMAIN_SEPARATOR }); } /** From 93e10d02452828494a5501d1c7c02ef947c63e2a Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 6 Mar 2024 17:49:07 +0700 Subject: [PATCH 034/305] test: add test of below min required governors, fix other tests --- script/interfaces/ISharedArgument.sol | 1 + test/bridge/integration/BaseIntegration.t.sol | 39 ++++++++++++++++- .../bridge-manager/BridgeManager.t.sol | 20 +++++---- .../concrete/bridge-manager/constructor.t.sol | 2 +- .../bridge-manager/remove/remove.t.sol | 24 +++++++---- .../bridge-manager/BridgeManagerCRUD.t.sol | 41 +++++++++++++----- .../fuzz/bridge-manager/BridgeSlash.t.sol | 3 -- .../unit/fuzz/utils/BridgeManagerUtils.t.sol | 41 +++++++++++------- test/mocks/MockBridgeManager.sol | 42 +++++++++---------- 9 files changed, 147 insertions(+), 66 deletions(-) diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index 37971d4d..2d4e7374 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -18,6 +18,7 @@ interface ISharedArgument is IGeneralConfig { uint96[] voteWeights; GlobalProposal.TargetOption[] targetOptions; address[] targets; + uint256 minRequiredGovernor; } struct MainchainGatewayV3Param { diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 0be51cd2..858140dd 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -28,6 +28,7 @@ import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/Signatu import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; import { GlobalCoreGovernance } from "@ronin/contracts/extensions/sequential-governance/GlobalCoreGovernance.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { IHasContracts } from "@ronin/contracts/interfaces/collections/IHasContracts.sol"; import { IBridgeManagerCallbackRegister } from "@ronin/contracts/interfaces/bridge/IBridgeManagerCallbackRegister.sol"; import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; @@ -298,6 +299,7 @@ contract BaseIntegration_Test is Base_Test { _param.roninBridgeManager.callbackRegisters = wrapAddress(address(_bridgeSlash)); _param.roninBridgeManager.targetOptions = options; _param.roninBridgeManager.targets = targets; + _param.roninBridgeManager.minRequiredGovernor = 3; ISharedArgument.BridgeManagerParam memory param = _param.roninBridgeManager; uint256 length = param.governors.length; @@ -355,6 +357,23 @@ contract BaseIntegration_Test is Base_Test { vm.prank(_param.roninBridgeManager.governors[0]); _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(globalProposal, supports_, signatures); } + + { + // set min governors + GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ + expiryTimestamp: block.timestamp + 10, + targetOption: GlobalProposal.TargetOption.BridgeManager, + value: 0, + calldata_: abi.encodeCall(IBridgeManager.setMinRequiredGovernor, (_param.roninBridgeManager.minRequiredGovernor)), + gasAmount: 500_000, + nonce: _roninBridgeManager.round(0) + 1 + }); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(globalProposal, supports_, signatures); + } } function _constructForMainchainBridgeManager() internal { @@ -369,6 +388,7 @@ contract BaseIntegration_Test is Base_Test { _param.mainchainBridgeManager.callbackRegisters = getEmptyAddressArray(); _param.mainchainBridgeManager.targetOptions = options; _param.mainchainBridgeManager.targets = targets; + _param.mainchainBridgeManager.minRequiredGovernor = 3; ISharedArgument.BridgeManagerParam memory param = _param.mainchainBridgeManager; uint256 length = param.governors.length; @@ -426,6 +446,23 @@ contract BaseIntegration_Test is Base_Test { vm.prank(_param.roninBridgeManager.governors[0]); _mainchainBridgeManager.relayGlobalProposal(globalProposal, supports_, signatures); } + + { + // set min governors + GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ + expiryTimestamp: block.timestamp + 10, + targetOption: GlobalProposal.TargetOption.BridgeManager, + value: 0, + calldata_: abi.encodeCall(IBridgeManager.setMinRequiredGovernor, (_param.roninBridgeManager.minRequiredGovernor)), + gasAmount: 500_000, + nonce: _mainchainBridgeManager.round(0) + 1 + }); + + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignaturesGlobal(globalProposal, _param.test.governorPKs); + + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(globalProposal, supports_, signatures); + } } function _mainchainGatewayV3Initialize() internal { @@ -576,7 +613,7 @@ contract BaseIntegration_Test is Base_Test { LibTransfer.Receipt memory receipt, uint256[] memory signerPKs, bytes32 domainSeparator - ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { + ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { diff --git a/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol b/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol index 78ed19fe..25498fb2 100644 --- a/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol @@ -35,20 +35,26 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { } function setUp() public virtual { - address[] memory bridgeOperators = new address[](3); + address[] memory bridgeOperators = new address[](5); bridgeOperators[0] = address(0x10000); bridgeOperators[1] = address(0x10001); bridgeOperators[2] = address(0x10002); + bridgeOperators[3] = address(0x10003); + bridgeOperators[4] = address(0x10004); - address[] memory governors = new address[](3); + address[] memory governors = new address[](5); governors[0] = address(0x20000); governors[1] = address(0x20001); governors[2] = address(0x20002); + governors[3] = address(0x20003); + governors[4] = address(0x20004); - uint96[] memory voteWeights = new uint96[](3); + uint96[] memory voteWeights = new uint96[](5); voteWeights[0] = 100; voteWeights[1] = 100; voteWeights[2] = 100; + voteWeights[3] = 100; + voteWeights[4] = 100; for (uint i; i < bridgeOperators.length; i++) { _bridgeOperators.push(bridgeOperators[i]); @@ -56,18 +62,18 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { _voteWeights.push(voteWeights[i]); } - _totalWeight = 300; - _totalOperator = 3; + _totalWeight = 500; + _totalOperator = 5; _bridgeManager = new MockBridgeManager(bridgeOperators, governors, voteWeights); } function _generateNewOperators() internal pure returns (address[] memory operators, address[] memory governors, uint96[] memory weights) { operators = new address[](1); - operators[0] = address(0x10003); + operators[0] = address(0x10099); governors = new address[](1); - governors[0] = address(0x20003); + governors[0] = address(0x20099); weights = new uint96[](1); weights[0] = 100; diff --git a/test/bridge/unit/concrete/bridge-manager/constructor.t.sol b/test/bridge/unit/concrete/bridge-manager/constructor.t.sol index 06e48220..16dd066f 100644 --- a/test/bridge/unit/concrete/bridge-manager/constructor.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/constructor.t.sol @@ -33,7 +33,7 @@ contract Constructor_BridgeManager_Unit_Concrete_Test is BridgeManager_Unit_Conc comparingWeights: _voteWeights, expectingWeights: voteWeights }); - assertEq(_bridgeManager.totalBridgeOperator(), 3); + assertEq(_bridgeManager.totalBridgeOperator(), 5); assertEq(_bridgeManager.getTotalWeight(), _totalWeight); } diff --git a/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol b/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol index 96318586..a37ea153 100644 --- a/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol @@ -20,7 +20,7 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function test_RevertWhen_NotSelfCall() external { // Prepare data - (address[] memory removingOperators, , , , , ) = _generateRemovingOperators(1); + (address[] memory removingOperators,,,,,) = _generateRemovingOperators(1); // Make the caller not self-call. changePrank({ msgSender: _bridgeOperators[0] }); @@ -62,9 +62,8 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { _bridgeManager.getGovernorOf(removingOperators[0]); // Compare after and before state - (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembersByGovernors( - remainingGovernors - ); + (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = + _getBridgeMembersByGovernors(remainingGovernors); _assertBridgeMembers({ comparingOperators: afterBridgeOperators, @@ -77,7 +76,7 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_RevertWhen_TwoAddress_Duplicated() external { - (address[] memory removingOperators, address[] memory removingGovernors, uint96[] memory removingWeights, , , ) = _generateRemovingOperators(2); + (address[] memory removingOperators, address[] memory removingGovernors, uint96[] memory removingWeights,,,) = _generateRemovingOperators(2); removingOperators[1] = removingOperators[0]; removingGovernors[1] = removingGovernors[0]; @@ -122,9 +121,8 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } // Compare after and before state - (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembersByGovernors( - remainingGovernors - ); + (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = + _getBridgeMembersByGovernors(remainingGovernors); _assertBridgeMembers({ comparingOperators: afterBridgeOperators, @@ -135,4 +133,14 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { expectingWeights: remainingWeights }); } + + function test_RevertWhen_ThreeAddress_BelowMinRequiredGovernor() external { + uint TO_REMOVE_NUM = 3; + + (address[] memory removingOperators,,,,,) = _generateRemovingOperators(TO_REMOVE_NUM); + + // Run the test. + vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrBelowMinRequiredGovernors.selector)); + _bridgeManager.removeBridgeOperators(removingOperators); + } } diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol index 74a35d36..18380c80 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol @@ -4,7 +4,9 @@ pragma solidity ^0.8.0; import { console } from "forge-std/console.sol"; import { IBridgeManager, BridgeManagerUtils } from "../utils/BridgeManagerUtils.t.sol"; import { RoninGatewayV3 } from "@ronin/contracts/ronin/gateway/RoninGatewayV3.sol"; -import { RoleAccess, ContractType, AddressArrayUtils, MockBridgeManager } from "@ronin/contracts/mocks/ronin/MockBridgeManager.sol"; +import { RoleAccess, ContractType, MockBridgeManager } from "@ronin/contracts/mocks/ronin/MockBridgeManager.sol"; +import "@ronin/contracts/libraries/Uint96ArrayUtils.sol"; +import "@ronin/contracts/libraries/AddressArrayUtils.sol"; import { ErrBridgeOperatorUpdateFailed, ErrBridgeOperatorAlreadyExisted, @@ -16,6 +18,7 @@ import { contract BridgeManagerCRUDTest is BridgeManagerUtils { using AddressArrayUtils for address[]; + using Uint96ArrayUtils for uint96[]; enum InputIndex { VoteWeights, @@ -30,6 +33,10 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { _label(); } + address[] private _initOperators; + address[] private _initGovernors; + uint96[] private _initWeights; + function testFail_MaliciousUpdateBridgeOperator() external { (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); @@ -60,7 +67,8 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { ) external virtual { vm.assume(caller != _bridgeManager); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); vm.expectRevert(abi.encodeWithSelector(ErrUnexpectedInternalCall.selector, IBridgeManager.addBridgeOperators.selector, ContractType.BRIDGE, caller)); @@ -71,11 +79,13 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { * @notice Checks whether bridge contract can add bridge operators. */ function test_AddBridgeOperators_CallerIsBridgeAdminOperator(uint256 r1, uint256 r2, uint256 r3, uint256 numBridgeOperators) external virtual { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); - _invariantTest(bridgeManager, voteWeights, governors, bridgeOperators); + _invariantTest(bridgeManager, _initWeights.extend(voteWeights), _initGovernors.extend(governors), _initOperators.extend(bridgeOperators)); + // _invariantTest(bridgeManager, voteWeights, governors, bridgeOperators); } /** @@ -111,10 +121,16 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { * @notice Checks whether bridge contract can remove bridge operators. */ function test_RemoveBridgeOperators_CallerIsBridgeContract(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); - uint256 removeAmount = _randomize(voteWeights.length, 1, voteWeights.length); + + bridgeOperators = _initOperators.extend(bridgeOperators); + governors = _initGovernors.extend(governors); + voteWeights = _initWeights.extend(voteWeights); + + uint256 removeAmount = _randomize(voteWeights.length, 1, voteWeights.length - 3); // Keep at least 3 governors uint256 tailIdx = voteWeights.length - 1; uint256 r = _randomize(_triShuffle(r1, r2, r3), 0, tailIdx); @@ -158,7 +174,8 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { */ function testFuzz_UpdateBridgeOperator_CallerIsGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { vm.skip(true); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); uint256 randomSeed = _randomize(_triShuffle(r1, r2, r3), 0, voteWeights.length - 1); @@ -186,7 +203,8 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { */ function test_UpdateBridgeOperator_CallerIsNotGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { vm.skip(true); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); address unauthorizedCaller = makeAddr("UNAUTHORIZED_CALLER"); @@ -210,8 +228,11 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { _bridgeManager = address(new MockBridgeManager(bridgeOperators, governors, voteWeights)); // empty storage for testing - vm.prank(_bridgeManager); - IBridgeManager(_bridgeManager).removeBridgeOperators(bridgeOperators); + // vm.prank(_bridgeManager); + // IBridgeManager(_bridgeManager).removeBridgeOperators(bridgeOperators); + _initOperators = bridgeOperators; + _initGovernors = governors; + _initWeights = voteWeights; } function _label() internal virtual { diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol index b166af7b..cef140fd 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol @@ -110,9 +110,6 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { uint256 numBridgeOperators, uint256 period ) external { - address[] memory currentOperators = IBridgeManager(_bridgeManagerContract).getBridgeOperators(); - vm.prank(_bridgeManagerContract, _bridgeManagerContract); - IBridgeManager(_bridgeManagerContract).removeBridgeOperators(currentOperators); // Assume the input values are not equal to the default values vm.assume(r1 != DEFAULT_R1 && r2 != DEFAULT_R2 && r3 != DEFAULT_R3); // Bound the period between 1 and the maximum value of uint64 diff --git a/test/bridge/unit/fuzz/utils/BridgeManagerUtils.t.sol b/test/bridge/unit/fuzz/utils/BridgeManagerUtils.t.sol index 6fae02cd..fb0c5de2 100644 --- a/test/bridge/unit/fuzz/utils/BridgeManagerUtils.t.sol +++ b/test/bridge/unit/fuzz/utils/BridgeManagerUtils.t.sol @@ -40,6 +40,17 @@ abstract contract BridgeManagerUtils is Randomizer { bridgeManager.addBridgeOperators(voteWeights, governors, bridgeOperators); } + function getValidAndNonExistingInputs( + address bridgeManager, + uint256 r1, + uint256 r2, + uint256 r3, + uint256 numBridgeOperators + ) public virtual returns (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) { + (bridgeOperators, governors, voteWeights) = getValidInputs(r1, r2, r3, numBridgeOperators); + _ensureNonExistingInputs(bridgeManager, bridgeOperators.extend(governors)); + } + function getValidInputs( uint256 r1, uint256 r2, @@ -104,20 +115,14 @@ abstract contract BridgeManagerUtils is Randomizer { modifiedInputIdx == 0 ? uintVoteWeights : modifiedInputIdx == 1 ? uintGovernors : uintBridgeOperators ) ); - (outputs, ) = abi.decode(returnData, (uint256[], uint256[])); + (outputs,) = abi.decode(returnData, (uint256[], uint256[])); } // point outputs to modified inputs assembly { - if iszero(modifiedInputIdx) { - voteWeights := outputs - } - if eq(modifiedInputIdx, 1) { - governors := outputs - } - if eq(modifiedInputIdx, 2) { - bridgeOperators := outputs - } + if iszero(modifiedInputIdx) { voteWeights := outputs } + if eq(modifiedInputIdx, 1) { governors := outputs } + if eq(modifiedInputIdx, 2) { bridgeOperators := outputs } } } @@ -137,7 +142,7 @@ abstract contract BridgeManagerUtils is Randomizer { // bound index to range [0, inputLength - 1] inputLength--; - for (uint256 i; i < duplicateAmount; ) { + for (uint256 i; i < duplicateAmount;) { r1 = _randomize(seed, 0, inputLength); r2 = _randomize(r1, 0, inputLength); vm.assume(r1 != r2); @@ -171,7 +176,7 @@ abstract contract BridgeManagerUtils is Randomizer { uint256 r; nullifyIndices = new uint256[](nullAmount); - for (uint256 i; i < nullAmount; ) { + for (uint256 i; i < nullAmount;) { r = _randomize(seed, 0, inputLength); delete inputs[r]; nullifyIndices[i] = r; @@ -211,12 +216,13 @@ abstract contract BridgeManagerUtils is Randomizer { _ensureNonZero(uintBridgeOperators); _ensureNonDuplicated(governors.extend(bridgeOperators)); + // _ensureNotExisted(governors.extend(bridgeOperators)); } function _ensureNonZero(uint256[] memory arr) internal pure { uint256 length = arr.length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { vm.assume(arr[i] != 0); unchecked { ++i; @@ -232,6 +238,13 @@ abstract contract BridgeManagerUtils is Randomizer { vm.assume(!addrs.hasDuplicate()); } + function _ensureNonExistingInputs(address bridgeManager, address[] memory addrs) internal view { + for (uint i; i < addrs.length; i++) { + vm.assume(!IBridgeManager(bridgeManager).isBridgeOperator(addrs[i])); + vm.assume(IBridgeManager(bridgeManager).getGovernorWeight(addrs[i]) == 0); + } + } + function _invariantTest( IBridgeManager bridgeManager, uint96[] memory voteWeights, @@ -244,7 +257,7 @@ abstract contract BridgeManagerUtils is Randomizer { assertEq(bridgeOperators.length, bridgeManager.totalBridgeOperator()); uint256 totalWeight; - for (uint256 i; i < voteWeights.length; ) { + for (uint256 i; i < voteWeights.length;) { totalWeight += voteWeights[i]; unchecked { ++i; diff --git a/test/mocks/MockBridgeManager.sol b/test/mocks/MockBridgeManager.sol index 8ff151d7..3fa77340 100644 --- a/test/mocks/MockBridgeManager.sol +++ b/test/mocks/MockBridgeManager.sol @@ -4,47 +4,45 @@ pragma solidity >=0.8.17 <0.9.0; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; contract MockBridgeManager is IBridgeManager { - function DOMAIN_SEPARATOR() external view returns (bytes32) {} + function DOMAIN_SEPARATOR() external view returns (bytes32) { } function addBridgeOperators( uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators - ) external returns (bool[] memory addeds) {} + ) external returns (bool[] memory addeds) { } - function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_) {} + function setMinRequiredGovernor(uint min) external { } - function getOperatorOf(address governor) external view returns (address operator) {} + function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_) { } - function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {} + function getOperatorOf(address governor) external view returns (address operator) { } - function getBridgeOperators() external view returns (address[] memory) {} + function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) { } - function getFullBridgeOperatorInfos() - external - view - returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) - {} + function getBridgeOperators() external view returns (address[] memory) { } - function getGovernorWeight(address governor) external view returns (uint96) {} + function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) { } - function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {} + function getGovernorWeight(address governor) external view returns (uint96) { } - function getGovernors() external view returns (address[] memory) {} + function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) { } - function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors) {} + function getGovernors() external view returns (address[] memory) { } - function getGovernorOf(address operator) external view returns (address governor) {} + function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors) { } - function getTotalWeight() external view returns (uint256) {} + function getGovernorOf(address operator) external view returns (address governor) { } - function isBridgeOperator(address addr) external view returns (bool) {} + function getTotalWeight() external view returns (uint256) { } - function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds) {} + function isBridgeOperator(address addr) external view returns (bool) { } - function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum) {} + function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds) { } - function totalBridgeOperator() external view returns (uint256) {} + function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum) { } - function updateBridgeOperator(address currOperator, address newOperator) external {} + function totalBridgeOperator() external view returns (uint256) { } + + function updateBridgeOperator(address currOperator, address newOperator) external { } } From 00181e4a37bb9071b5c9191cd10d52cfec3807a9 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 7 Mar 2024 13:25:44 +0700 Subject: [PATCH 035/305] test: fix getValidInputs in fuzz --- test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol index cef140fd..3f40d9fc 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol @@ -125,7 +125,8 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { MockBridgeManager(payable(_bridgeManagerContract)).registerCallbacks(registers); // Generate valid inputs for bridge operators - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidAndNonExistingInputs( + _bridgeManagerContract, r1, r2, r3, @@ -285,7 +286,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { } function _setUp() internal virtual { - _admin = vm.addr(1); + _admin = makeAddr("central-admin"); _validatorContract = address(new MockValidatorSet_ForFoundryTest()); (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( DEFAULT_R1, From bc22560f1322259ce623a4759cb7b0ccc4d7ee8f Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 24 Jan 2024 18:23:47 +0700 Subject: [PATCH 036/305] feat(BridgeManager): cherry-pick proxylize --- .../MainchainBridgeManagerDeploy.s.sol | 32 +++++------ .../BridgeManager.sol | 33 ++++++++++-- .../BridgeManagerCallbackRegister.sol | 18 +++---- .../BridgeManagerQuorum.sol | 8 ++- .../sequential-governance/CoreGovernance.sol | 7 ++- .../GlobalCoreGovernance.sol | 7 ++- src/mainchain/MainchainBridgeManager.sol | 36 ++++++++++--- src/mocks/ronin/MockBridgeManager.sol | 10 ++-- src/mocks/ronin/MockRoninBridgeManager.sol | 54 +++++++++---------- src/ronin/gateway/RoninBridgeManager.sol | 16 +++--- test/bridge/integration/BaseIntegration.t.sol | 23 +++++++- 11 files changed, 162 insertions(+), 82 deletions(-) diff --git a/script/contracts/MainchainBridgeManagerDeploy.s.sol b/script/contracts/MainchainBridgeManagerDeploy.s.sol index 31cc13f3..de06f374 100644 --- a/script/contracts/MainchainBridgeManagerDeploy.s.sol +++ b/script/contracts/MainchainBridgeManagerDeploy.s.sol @@ -9,24 +9,24 @@ import { Migration } from "../Migration.s.sol"; import { MainchainGatewayV3Deploy } from "./MainchainGatewayV3Deploy.s.sol"; contract MainchainBridgeManagerDeploy is Migration { - function _defaultArguments() internal virtual override returns (bytes memory args) { - ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; + // function _defaultArguments() internal virtual override returns (bytes memory args) { + // ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; - args = abi.encode( - param.num, - param.denom, - param.roninChainId, - param.bridgeContract, - param.callbackRegisters, - param.bridgeOperators, - param.governors, - param.voteWeights, - param.targetOptions, - param.targets - ); - } + // args = abi.encode( + // param.num, + // param.denom, + // param.roninChainId, + // param.bridgeContract, + // param.callbackRegisters, + // param.bridgeOperators, + // param.governors, + // param.voteWeights, + // param.targetOptions, + // param.targets + // ); + // } function run() public virtual returns (MainchainBridgeManager) { - return MainchainBridgeManager(_deployImmutable(Contract.MainchainBridgeManager.key())); + return MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key(), EMPTY_ARGS)); } } diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index f6bbb8ff..4041df46 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -38,7 +38,7 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu /** * @inheritdoc IBridgeManager */ - bytes32 public immutable DOMAIN_SEPARATOR; + bytes32 public DOMAIN_SEPARATOR; function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) { assembly { @@ -51,7 +51,31 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu _; } - constructor( + // constructor( + // uint256 num, + // uint256 denom, + // uint256 roninChainId, + // address bridgeContract, + // address[] memory callbackRegisters, + // address[] memory bridgeOperators, + // address[] memory governors, + // uint96[] memory voteWeights + // ) payable BridgeManagerQuorum(num, denom) BridgeManagerCallbackRegister(callbackRegisters) { + // // _setContract(ContractType.BRIDGE, bridgeContract); + + // // DOMAIN_SEPARATOR = keccak256( + // // abi.encode( + // // keccak256("EIP712Domain(string name,string version,bytes32 salt)"), + // // keccak256("BridgeAdmin"), // name hash + // // keccak256("2"), // version hash + // // keccak256(abi.encode("BRIDGE_ADMIN", roninChainId)) // salt + // // ) + // // ); + + // // _addBridgeOperators(voteWeights, governors, bridgeOperators); + // } + + function __init( uint256 num, uint256 denom, uint256 roninChainId, @@ -60,7 +84,10 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights - ) payable BridgeManagerQuorum(num, denom) BridgeManagerCallbackRegister(callbackRegisters) { + ) internal { + BridgeManagerQuorum.__init(num, denom); + BridgeManagerCallbackRegister.__init(callbackRegisters); + _setContract(ContractType.BRIDGE, bridgeContract); DOMAIN_SEPARATOR = keccak256( diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index 32efcef6..f17f6daa 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -19,7 +19,11 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager */ bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240; - constructor(address[] memory callbackRegisters) payable { + // constructor(address[] memory callbackRegisters) payable { + // // _registerCallbacks(callbackRegisters); + // } + + function __init(address[] memory callbackRegisters) internal { _registerCallbacks(callbackRegisters); } @@ -33,9 +37,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager /** * @inheritdoc IBridgeManagerCallbackRegister */ - function unregisterCallbacks( - address[] calldata registers - ) external onlySelfCall returns (bool[] memory unregistereds) { + function unregisterCallbacks(address[] calldata registers) external onlySelfCall returns (bool[] memory unregistereds) { unregistereds = _unregisterCallbacks(registers); } @@ -51,9 +53,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager * @param registers The array of callback addresses to register. * @return registereds An array indicating the success status of each registration. */ - function _registerCallbacks( - address[] memory registers - ) internal nonDuplicate(registers) returns (bool[] memory registereds) { + function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) returns (bool[] memory registereds) { uint256 length = registers.length; registereds = new bool[](length); if (length == 0) return registereds; @@ -81,9 +81,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager * @param registers The array of callback addresses to unregister. * @return unregistereds An array indicating the success status of each unregistration. */ - function _unregisterCallbacks( - address[] memory registers - ) internal nonDuplicate(registers) returns (bool[] memory unregistereds) { + function _unregisterCallbacks(address[] memory registers) internal nonDuplicate(registers) returns (bool[] memory unregistereds) { uint256 length = registers.length; unregistereds = new bool[](length); EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters(); diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol index 705656d9..bc7864c9 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -21,7 +21,13 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { } } - constructor(uint256 num, uint256 denom) { + // constructor(uint256 num, uint256 denom) { + // // BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); + // // $._nonce = 1; + // // _setThreshold(num, denom); + // } + + function __init(uint256 num, uint256 denom) internal { BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); $._nonce = 1; diff --git a/src/extensions/sequential-governance/CoreGovernance.sol b/src/extensions/sequential-governance/CoreGovernance.sol index 93e03c2f..4c7529b1 100644 --- a/src/extensions/sequential-governance/CoreGovernance.sol +++ b/src/extensions/sequential-governance/CoreGovernance.sol @@ -63,10 +63,15 @@ abstract contract CoreGovernance is SignatureConsumer, VoteStatusConsumer, Chain uint256 internal _proposalExpiryDuration; - constructor(uint256 _expiryDuration) { + // constructor(uint256 _expiryDuration) { + // // _setProposalExpiryDuration(_expiryDuration); + // } + +function __init(uint256 _expiryDuration) internal { _setProposalExpiryDuration(_expiryDuration); } + /** * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`. * Increases the `_round` number if the previous one is not expired. Delete the previous proposal diff --git a/src/extensions/sequential-governance/GlobalCoreGovernance.sol b/src/extensions/sequential-governance/GlobalCoreGovernance.sol index 73e1fbeb..b6a2acad 100644 --- a/src/extensions/sequential-governance/GlobalCoreGovernance.sol +++ b/src/extensions/sequential-governance/GlobalCoreGovernance.sol @@ -24,7 +24,12 @@ abstract contract GlobalCoreGovernance is CoreGovernance { /// @dev Emitted when the target options are updated event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr); - constructor(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) { + // constructor(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) { + // // _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this)); + // // _updateManyTargetOption(targetOptions, addrs); + // } + + function __init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal { _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this)); _updateManyTargetOption(targetOptions, addrs); } diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index fbd2c526..a4ec2b8c 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { CoreGovernance } from "../extensions/sequential-governance/CoreGovernance.sol"; import { GlobalCoreGovernance, GlobalGovernanceRelay } from "../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol"; import { GovernanceRelay } from "../extensions/sequential-governance/governance-relay/GovernanceRelay.sol"; @@ -10,10 +11,30 @@ import { Proposal } from "../libraries/Proposal.sol"; import { GlobalProposal } from "../libraries/GlobalProposal.sol"; import "../utils/CommonErrors.sol"; -contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGovernanceRelay { +contract MainchainBridgeManager is Initializable, BridgeManager, GovernanceRelay, GlobalGovernanceRelay { uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255; - constructor( + constructor() + // uint256 num, + // uint256 denom, + // uint256 roninChainId, + // address bridgeContract, + // address[] memory callbackRegisters, + // address[] memory bridgeOperators, + // address[] memory governors, + // uint96[] memory voteWeights, + // GlobalProposal.TargetOption[] memory targetOptions, + // address[] memory targets + // ) + // payable + // CoreGovernance(DEFAULT_EXPIRY_DURATION) + // GlobalCoreGovernance(targetOptions, targets) + // BridgeManager(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights) + { + _disableInitializers(); + } + + function initialize( uint256 num, uint256 denom, uint256 roninChainId, @@ -24,12 +45,11 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna uint96[] memory voteWeights, GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets - ) - payable - CoreGovernance(DEFAULT_EXPIRY_DURATION) - GlobalCoreGovernance(targetOptions, targets) - BridgeManager(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights) - { } + ) external initializer { + CoreGovernance.__init(DEFAULT_EXPIRY_DURATION); + GlobalCoreGovernance.__init(targetOptions, targets); + BridgeManager.__init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); + } /** * @dev See `GovernanceRelay-_relayProposal`. diff --git a/src/mocks/ronin/MockBridgeManager.sol b/src/mocks/ronin/MockBridgeManager.sol index a7dbe01a..84345bb7 100644 --- a/src/mocks/ronin/MockBridgeManager.sol +++ b/src/mocks/ronin/MockBridgeManager.sol @@ -4,11 +4,11 @@ pragma solidity ^0.8.0; import { RoleAccess, ContractType, AddressArrayUtils, IBridgeManager, BridgeManager } from "../../extensions/bridge-operator-governance/BridgeManager.sol"; contract MockBridgeManager is BridgeManager { - constructor( - address[] memory bridgeOperators, - address[] memory governors, - uint96[] memory voteWeights - ) payable BridgeManager(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights) {} + // constructor( + // address[] memory bridgeOperators, + // address[] memory governors, + // uint96[] memory voteWeights + // ) payable BridgeManager(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights) {} function _getEmptyAddressArray() internal pure returns (address[] memory arr) {} } diff --git a/src/mocks/ronin/MockRoninBridgeManager.sol b/src/mocks/ronin/MockRoninBridgeManager.sol index 4d7daa76..867caa19 100644 --- a/src/mocks/ronin/MockRoninBridgeManager.sol +++ b/src/mocks/ronin/MockRoninBridgeManager.sol @@ -5,31 +5,31 @@ import { RoninBridgeManager } from "../../ronin/gateway/RoninBridgeManager.sol"; import { GlobalProposal } from "../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol"; contract MockRoninBridgeManager is RoninBridgeManager { - constructor( - uint256 num, - uint256 denom, - uint256 roninChainId, - uint256 expiryDuration, - address bridgeContract, - address[] memory callbackRegisters, - address[] memory bridgeOperators, - address[] memory governors, - uint96[] memory voteWeights, - GlobalProposal.TargetOption[] memory targetOptions, - address[] memory targets - ) - RoninBridgeManager( - num, - denom, - roninChainId, - expiryDuration, - bridgeContract, - callbackRegisters, - bridgeOperators, - governors, - voteWeights, - targetOptions, - targets - ) - {} + // constructor( + // uint256 num, + // uint256 denom, + // uint256 roninChainId, + // uint256 expiryDuration, + // address bridgeContract, + // address[] memory callbackRegisters, + // address[] memory bridgeOperators, + // address[] memory governors, + // uint96[] memory voteWeights, + // GlobalProposal.TargetOption[] memory targetOptions, + // address[] memory targets + // ) + // RoninBridgeManager( + // num, + // denom, + // roninChainId, + // expiryDuration, + // bridgeContract, + // callbackRegisters, + // bridgeOperators, + // governors, + // voteWeights, + // targetOptions, + // targets + // ) + // {} } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 3e1452bf..f171a489 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -12,7 +12,8 @@ import { VoteStatusConsumer } from "../../interfaces/consumers/VoteStatusConsume import { ErrQueryForEmptyVote } from "../../utils/CommonErrors.sol"; contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal { - constructor( + + function initialize( uint256 num, uint256 denom, uint256 roninChainId, @@ -23,13 +24,12 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan address[] memory governors, uint96[] memory voteWeights, GlobalProposal.TargetOption[] memory targetOptions, - address[] memory targets - ) - payable - CoreGovernance(expiryDuration) - GlobalCoreGovernance(targetOptions, targets) - BridgeManager(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights) - { } + address[] memory targets) external + { + CoreGovernance.__init(expiryDuration); + GlobalCoreGovernance.__init(targetOptions, targets); + BridgeManager.__init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); + } /** * CURRENT NETWORK diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 858140dd..faad52fa 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -100,7 +100,7 @@ contract BaseIntegration_Test is Base_Test { _deployContractsOnRonin(); _deployContractsOnMainchain(); - _initializeRonin(); + // _initializeRonin(); _initializeMainchain(); _changeAdminOnRonin(); @@ -161,7 +161,9 @@ contract BaseIntegration_Test is Base_Test { } function _initializeMainchain() internal { - _mainchainPauseEnforcerInitialize(); + _config.switchTo(Network.EthLocal.key()); + + _mainchainBridgeManagerInitialize(); _constructForMainchainBridgeManager(); _mainchainGatewayV3Initialize(); } @@ -465,6 +467,23 @@ contract BaseIntegration_Test is Base_Test { } } + function _mainchainBridgeManagerInitialize() internal { + ISharedArgument.BridgeManagerParam memory param = _param.mainchainBridgeManager; + + _mainchainBridgeManager.initialize( + param.num, + param.denom, + param.roninChainId, + param.bridgeContract, + param.callbackRegisters, + param.bridgeOperators, + param.governors, + param.voteWeights, + param.targetOptions, + param.targets + ); + } + function _mainchainGatewayV3Initialize() internal { (address[] memory mainchainTokens, address[] memory roninTokens) = _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; From ca87b383fe31e82f20e10d5975277f54703dbfaa Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 7 Mar 2024 11:19:30 +0700 Subject: [PATCH 037/305] test: fix test compiler errors --- src/mocks/ronin/MockBridgeManager.sol | 6 ++++- test/bridge/integration/BaseIntegration.t.sol | 5 ++--- .../bridge-manager/BridgeManager.t.sol | 22 +++++++++++++------ .../bridge-manager/BridgeManagerCRUD.t.sol | 14 +++++++----- .../fuzz/bridge-manager/BridgeReward.t.sol | 5 ++++- .../fuzz/bridge-manager/BridgeSlash.t.sol | 6 ++++- 6 files changed, 40 insertions(+), 18 deletions(-) diff --git a/src/mocks/ronin/MockBridgeManager.sol b/src/mocks/ronin/MockBridgeManager.sol index 84345bb7..3da4a740 100644 --- a/src/mocks/ronin/MockBridgeManager.sol +++ b/src/mocks/ronin/MockBridgeManager.sol @@ -10,5 +10,9 @@ contract MockBridgeManager is BridgeManager { // uint96[] memory voteWeights // ) payable BridgeManager(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights) {} - function _getEmptyAddressArray() internal pure returns (address[] memory arr) {} + function initialize(address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) external { + BridgeManager.__init(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights); + } + + function _getEmptyAddressArray() internal pure returns (address[] memory arr) { } } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index faad52fa..de403190 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -100,7 +100,7 @@ contract BaseIntegration_Test is Base_Test { _deployContractsOnRonin(); _deployContractsOnMainchain(); - // _initializeRonin(); + _initializeRonin(); _initializeMainchain(); _changeAdminOnRonin(); @@ -161,8 +161,7 @@ contract BaseIntegration_Test is Base_Test { } function _initializeMainchain() internal { - _config.switchTo(Network.EthLocal.key()); - + _mainchainPauseEnforcerInitialize(); _mainchainBridgeManagerInitialize(); _constructForMainchainBridgeManager(); _mainchainGatewayV3Initialize(); diff --git a/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol b/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol index 25498fb2..f11f5dd0 100644 --- a/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/BridgeManager.t.sol @@ -5,6 +5,7 @@ import { Base_Test } from "@ronin/test/Base.t.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { MockBridgeManager } from "@ronin/contracts/mocks/ronin/MockBridgeManager.sol"; +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; contract BridgeManager_Unit_Concrete_Test is Base_Test { IBridgeManager internal _bridgeManager; @@ -13,6 +14,7 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { uint96[] internal _voteWeights; uint256 internal _totalWeight; uint256 internal _totalOperator; + address internal _admin; modifier assertStateNotChange() { // Get before test state @@ -65,7 +67,13 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { _totalWeight = 500; _totalOperator = 5; - _bridgeManager = new MockBridgeManager(bridgeOperators, governors, voteWeights); + _admin = makeAddr("bridgeManagerAdmin"); + address bridgeManagerLogic = address(new MockBridgeManager()); + _bridgeManager = MockBridgeManager( + address( + new TransparentUpgradeableProxyV2(bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) + ) + ); } function _generateNewOperators() internal pure returns (address[] memory operators, address[] memory governors, uint96[] memory weights) { @@ -79,9 +87,7 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { weights[0] = 100; } - function _generateRemovingOperators( - uint removingNumber - ) + function _generateRemovingOperators(uint removingNumber) internal view returns ( @@ -129,9 +135,11 @@ contract BridgeManager_Unit_Concrete_Test is Base_Test { return _getBridgeMembersByGovernors(governors_); } - function _getBridgeMembersByGovernors( - address[] memory queryingGovernors - ) internal view returns (address[] memory operators, address[] memory governors, uint96[] memory weights) { + function _getBridgeMembersByGovernors(address[] memory queryingGovernors) + internal + view + returns (address[] memory operators, address[] memory governors, uint96[] memory weights) + { governors = queryingGovernors; operators = new address[](queryingGovernors.length); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol index 18380c80..e0bbf0cc 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol @@ -5,6 +5,7 @@ import { console } from "forge-std/console.sol"; import { IBridgeManager, BridgeManagerUtils } from "../utils/BridgeManagerUtils.t.sol"; import { RoninGatewayV3 } from "@ronin/contracts/ronin/gateway/RoninGatewayV3.sol"; import { RoleAccess, ContractType, MockBridgeManager } from "@ronin/contracts/mocks/ronin/MockBridgeManager.sol"; +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import "@ronin/contracts/libraries/Uint96ArrayUtils.sol"; import "@ronin/contracts/libraries/AddressArrayUtils.sol"; import { @@ -38,17 +39,15 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { uint96[] private _initWeights; function testFail_MaliciousUpdateBridgeOperator() external { - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + (address[] memory bridgeOperators, address[] memory governors, ) = getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); - _bridgeManager = address(new MockBridgeManager(bridgeOperators, governors, voteWeights)); - MockBridgeManager bridgeManager = MockBridgeManager(_bridgeManager); vm.startPrank(governors[0]); address lastOperator; for (uint256 i = 1; i < bridgeOperators.length; ++i) { lastOperator = bridgeOperators[i]; - bridgeManager.updateBridgeOperator(bridgeOperators[0], lastOperator); + MockBridgeManager(_bridgeManager).updateBridgeOperator(bridgeOperators[0], lastOperator); vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorUpdateFailed.selector, lastOperator)); } @@ -225,7 +224,12 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { function _setUp() internal virtual { (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); - _bridgeManager = address(new MockBridgeManager(bridgeOperators, governors, voteWeights)); + + address admin = makeAddr("bridgeManagerAdmin"); + address bridgeManagerLogic = address(new MockBridgeManager()); + _bridgeManager = address( + new TransparentUpgradeableProxyV2(bridgeManagerLogic, admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) + ); // empty storage for testing // vm.prank(_bridgeManager); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol index 95f33eb3..3c6c1120 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol @@ -223,7 +223,10 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils _defaultBridgeManagerInputs = abi.encode(bridgeOperators, governors, voteWeights); - _bridgeManagerContract = address(new MockBridgeManager(bridgeOperators, governors, voteWeights)); + address bridgeManagerLogic = address(new MockBridgeManager()); + _bridgeManagerContract = address( + new TransparentUpgradeableProxy(bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) + ); _bridgeTrackingLogic = address(new BridgeTracking()); _bridgeTrackingContract = address(new TransparentUpgradeableProxy(_bridgeTrackingLogic, _admin, "")); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol index 3f40d9fc..ec6d8b1a 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol @@ -295,7 +295,11 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { DEFAULT_NUM_BRIDGE_OPERATORS ); _defaultBridgeManagerInputs = abi.encode(bridgeOperators, governors, voteWeights); - _bridgeManagerContract = address(new MockBridgeManager(bridgeOperators, governors, voteWeights)); + + address bridgeManagerLogic = address(new MockBridgeManager()); + _bridgeManagerContract = address( + new TransparentUpgradeableProxyV2(bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) + ); _gatewayLogic = address(new RoninGatewayV3()); _gatewayContract = address(new TransparentUpgradeableProxyV2(_gatewayLogic, _admin, "")); From 7d3c52ff0fda89ecdfc40bcaebd65bd3d9691426 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 7 Mar 2024 12:58:04 +0700 Subject: [PATCH 038/305] test: handle setup manager as proxy --- .../MainchainBridgeManagerDeploy.s.sol | 35 ++++++++++--------- .../contracts/RoninBridgeManagerDeploy.s.sol | 29 ++++++++------- src/mocks/ronin/MockBridgeManager.sol | 6 ---- test/bridge/integration/BaseIntegration.t.sol | 1 - .../bridge-manager/BridgeManagerCRUD.t.sol | 3 -- .../fuzz/bridge-manager/BridgeReward.t.sol | 5 +-- .../fuzz/bridge-manager/BridgeSlash.t.sol | 5 +-- 7 files changed, 41 insertions(+), 43 deletions(-) diff --git a/script/contracts/MainchainBridgeManagerDeploy.s.sol b/script/contracts/MainchainBridgeManagerDeploy.s.sol index de06f374..c91bb2e9 100644 --- a/script/contracts/MainchainBridgeManagerDeploy.s.sol +++ b/script/contracts/MainchainBridgeManagerDeploy.s.sol @@ -9,24 +9,27 @@ import { Migration } from "../Migration.s.sol"; import { MainchainGatewayV3Deploy } from "./MainchainGatewayV3Deploy.s.sol"; contract MainchainBridgeManagerDeploy is Migration { - // function _defaultArguments() internal virtual override returns (bytes memory args) { - // ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; + function _defaultArguments() internal virtual override returns (bytes memory args) { + ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; - // args = abi.encode( - // param.num, - // param.denom, - // param.roninChainId, - // param.bridgeContract, - // param.callbackRegisters, - // param.bridgeOperators, - // param.governors, - // param.voteWeights, - // param.targetOptions, - // param.targets - // ); - // } + args = abi.encodeCall( + MainchainBridgeManager.initialize, + ( + param.num, + param.denom, + param.roninChainId, + param.bridgeContract, + param.callbackRegisters, + param.bridgeOperators, + param.governors, + param.voteWeights, + param.targetOptions, + param.targets + ) + ); + } function run() public virtual returns (MainchainBridgeManager) { - return MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key(), EMPTY_ARGS)); + return MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key())); } } diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index b53aa864..6666dc38 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -13,22 +13,25 @@ contract RoninBridgeManagerDeploy is Migration { function _defaultArguments() internal virtual override returns (bytes memory args) { ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; - args = abi.encode( - param.num, - param.denom, - param.roninChainId, - param.expiryDuration, - param.bridgeContract, - param.callbackRegisters, - param.bridgeOperators, - param.governors, - param.voteWeights, - param.targetOptions, - param.targets + args = abi.encodeCall( + RoninBridgeManager.initialize, + ( + param.num, + param.denom, + param.roninChainId, + param.expiryDuration, + param.bridgeContract, + param.callbackRegisters, + param.bridgeOperators, + param.governors, + param.voteWeights, + param.targetOptions, + param.targets + ) ); } function run() public virtual returns (RoninBridgeManager) { - return RoninBridgeManager(_deployImmutable(Contract.RoninBridgeManager.key())); + return RoninBridgeManager(_deployProxy(Contract.RoninBridgeManager.key())); } } diff --git a/src/mocks/ronin/MockBridgeManager.sol b/src/mocks/ronin/MockBridgeManager.sol index 3da4a740..7febb328 100644 --- a/src/mocks/ronin/MockBridgeManager.sol +++ b/src/mocks/ronin/MockBridgeManager.sol @@ -4,12 +4,6 @@ pragma solidity ^0.8.0; import { RoleAccess, ContractType, AddressArrayUtils, IBridgeManager, BridgeManager } from "../../extensions/bridge-operator-governance/BridgeManager.sol"; contract MockBridgeManager is BridgeManager { - // constructor( - // address[] memory bridgeOperators, - // address[] memory governors, - // uint96[] memory voteWeights - // ) payable BridgeManager(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights) {} - function initialize(address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) external { BridgeManager.__init(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights); } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index de403190..3e26bf44 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -162,7 +162,6 @@ contract BaseIntegration_Test is Base_Test { function _initializeMainchain() internal { _mainchainPauseEnforcerInitialize(); - _mainchainBridgeManagerInitialize(); _constructForMainchainBridgeManager(); _mainchainGatewayV3Initialize(); } diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol index e0bbf0cc..ea79881f 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol @@ -231,9 +231,6 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { new TransparentUpgradeableProxyV2(bridgeManagerLogic, admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) ); - // empty storage for testing - // vm.prank(_bridgeManager); - // IBridgeManager(_bridgeManager).removeBridgeOperators(bridgeOperators); _initOperators = bridgeOperators; _initGovernors = governors; _initWeights = voteWeights; diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol index 3c6c1120..9514e0fb 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol @@ -22,6 +22,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils address internal _admin; address internal _validatorContract; address internal _bridgeRewardLogic; + address internal _bridgeManagerLogic; address internal _bridgeManagerContract; address internal _bridgeRewardContract; address internal _bridgeSlashLogic; @@ -223,9 +224,9 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils _defaultBridgeManagerInputs = abi.encode(bridgeOperators, governors, voteWeights); - address bridgeManagerLogic = address(new MockBridgeManager()); + _bridgeManagerLogic = address(new MockBridgeManager()); _bridgeManagerContract = address( - new TransparentUpgradeableProxy(bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) + new TransparentUpgradeableProxy(_bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) ); _bridgeTrackingLogic = address(new BridgeTracking()); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol index ec6d8b1a..995cb5b1 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol @@ -27,6 +27,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { /// @dev immutable contracts address internal _admin; address internal _validatorContract; + address internal _bridgeManagerLogic; address internal _bridgeManagerContract; /// @dev proxy contracts address internal _gatewayLogic; @@ -296,9 +297,9 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { ); _defaultBridgeManagerInputs = abi.encode(bridgeOperators, governors, voteWeights); - address bridgeManagerLogic = address(new MockBridgeManager()); + _bridgeManagerLogic = address(new MockBridgeManager()); _bridgeManagerContract = address( - new TransparentUpgradeableProxyV2(bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) + new TransparentUpgradeableProxyV2(_bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) ); _gatewayLogic = address(new RoninGatewayV3()); From 995e6e05eb716356baf1d280716ce5cf6e479c53 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 7 Mar 2024 13:13:31 +0700 Subject: [PATCH 039/305] fix(BridgeManager): fix convention of init --- .../BridgeManager.sol | 43 +++++---------- .../BridgeManagerCallbackRegister.sol | 6 +-- .../BridgeManagerQuorum.sol | 8 +-- .../sequential-governance/CoreGovernance.sol | 37 +++++-------- .../GlobalCoreGovernance.sol | 53 ++++++------------- src/mainchain/MainchainBridgeManager.sol | 24 ++------- src/mocks/ronin/MockBridgeManager.sol | 2 +- src/mocks/ronin/MockRoninBridgeManager.sol | 30 +---------- src/ronin/gateway/RoninBridgeManager.sol | 6 +-- 9 files changed, 54 insertions(+), 155 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index 4041df46..243505da 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -38,7 +38,7 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu /** * @inheritdoc IBridgeManager */ - bytes32 public DOMAIN_SEPARATOR; + bytes32 public DOMAIN_SEPARATOR; function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) { assembly { @@ -51,31 +51,7 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu _; } - // constructor( - // uint256 num, - // uint256 denom, - // uint256 roninChainId, - // address bridgeContract, - // address[] memory callbackRegisters, - // address[] memory bridgeOperators, - // address[] memory governors, - // uint96[] memory voteWeights - // ) payable BridgeManagerQuorum(num, denom) BridgeManagerCallbackRegister(callbackRegisters) { - // // _setContract(ContractType.BRIDGE, bridgeContract); - - // // DOMAIN_SEPARATOR = keccak256( - // // abi.encode( - // // keccak256("EIP712Domain(string name,string version,bytes32 salt)"), - // // keccak256("BridgeAdmin"), // name hash - // // keccak256("2"), // version hash - // // keccak256(abi.encode("BRIDGE_ADMIN", roninChainId)) // salt - // // ) - // // ); - - // // _addBridgeOperators(voteWeights, governors, bridgeOperators); - // } - - function __init( + function __BridgeManager_init( uint256 num, uint256 denom, uint256 roninChainId, @@ -84,10 +60,19 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights - ) internal { - BridgeManagerQuorum.__init(num, denom); - BridgeManagerCallbackRegister.__init(callbackRegisters); + ) internal { + __BridgeManagerQuorum_init_unchained(num, denom); + __BridgeManagerCallbackRegister_init_unchained(callbackRegisters); + __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights); + } + function __BridgeManager_init_unchained( + uint256 roninChainId, + address bridgeContract, + address[] memory bridgeOperators, + address[] memory governors, + uint96[] memory voteWeights + ) internal { _setContract(ContractType.BRIDGE, bridgeContract); DOMAIN_SEPARATOR = keccak256( diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index f17f6daa..a7daf6e7 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -19,11 +19,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager */ bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240; - // constructor(address[] memory callbackRegisters) payable { - // // _registerCallbacks(callbackRegisters); - // } - - function __init(address[] memory callbackRegisters) internal { + function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal { _registerCallbacks(callbackRegisters); } diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol index bc7864c9..689e3c6b 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -21,13 +21,7 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { } } - // constructor(uint256 num, uint256 denom) { - // // BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); - // // $._nonce = 1; - // // _setThreshold(num, denom); - // } - - function __init(uint256 num, uint256 denom) internal { + function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal { BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); $._nonce = 1; diff --git a/src/extensions/sequential-governance/CoreGovernance.sol b/src/extensions/sequential-governance/CoreGovernance.sol index 4c7529b1..e268b69e 100644 --- a/src/extensions/sequential-governance/CoreGovernance.sol +++ b/src/extensions/sequential-governance/CoreGovernance.sol @@ -35,13 +35,7 @@ abstract contract CoreGovernance is SignatureConsumer, VoteStatusConsumer, Chain } /// @dev Emitted when a proposal is created - event ProposalCreated( - uint256 indexed chainId, - uint256 indexed round, - bytes32 indexed proposalHash, - Proposal.ProposalDetail proposal, - address creator - ); + event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator); /// @dev Emitted when the proposal is voted event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); /// @dev Emitted when the proposal is approved @@ -63,14 +57,13 @@ abstract contract CoreGovernance is SignatureConsumer, VoteStatusConsumer, Chain uint256 internal _proposalExpiryDuration; - // constructor(uint256 _expiryDuration) { - // // _setProposalExpiryDuration(_expiryDuration); - // } - -function __init(uint256 _expiryDuration) internal { - _setProposalExpiryDuration(_expiryDuration); + function __CoreGovernance_init(uint256 expiryDuration) internal { + __CoreGovernance_init_unchained(expiryDuration); } + function __CoreGovernance_init_unchained(uint256 expiryDuration) internal { + _setProposalExpiryDuration(expiryDuration); + } /** * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`. @@ -142,10 +135,7 @@ function __init(uint256 _expiryDuration) internal { * Emits the `ProposalCreated` event. * */ - function _proposeProposalStruct( - Proposal.ProposalDetail memory proposal, - address creator - ) internal virtual returns (uint256 round_) { + function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) { uint256 chainId = proposal.chainId; if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid); proposal.validate(_proposalExpiryDuration); @@ -205,7 +195,9 @@ function __init(uint256 _expiryDuration) internal { } else if (support == Ballot.VoteType.Against) { _vote.againstVoteds.push(voter); _againstVoteWeight = _vote.againstVoteWeight += voterWeight; - } else revert ErrUnsupportedVoteType(msg.sig); + } else { + revert ErrUnsupportedVoteType(msg.sig); + } if (_forVoteWeight >= minimumForVoteWeight) { done = true; @@ -228,15 +220,12 @@ function __init(uint256 _expiryDuration) internal { * before or it will emit an unexpected event of `ProposalExpired`. */ function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) { - isExpired = - _getChainType() == ChainType.RoninChain && - proposalVote.status == VoteStatus.Pending && - proposalVote.expiryTimestamp <= block.timestamp; + isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp; if (isExpired) { emit ProposalExpired(proposalVote.hash); - for (uint256 _i; _i < proposalVote.forVoteds.length; ) { + for (uint256 _i; _i < proposalVote.forVoteds.length;) { delete proposalVote.voted[proposalVote.forVoteds[_i]]; delete proposalVote.sig[proposalVote.forVoteds[_i]]; @@ -244,7 +233,7 @@ function __init(uint256 _expiryDuration) internal { ++_i; } } - for (uint256 _i; _i < proposalVote.againstVoteds.length; ) { + for (uint256 _i; _i < proposalVote.againstVoteds.length;) { delete proposalVote.voted[proposalVote.againstVoteds[_i]]; delete proposalVote.sig[proposalVote.againstVoteds[_i]]; diff --git a/src/extensions/sequential-governance/GlobalCoreGovernance.sol b/src/extensions/sequential-governance/GlobalCoreGovernance.sol index b6a2acad..1b43eca7 100644 --- a/src/extensions/sequential-governance/GlobalCoreGovernance.sol +++ b/src/extensions/sequential-governance/GlobalCoreGovernance.sol @@ -24,12 +24,11 @@ abstract contract GlobalCoreGovernance is CoreGovernance { /// @dev Emitted when the target options are updated event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr); - // constructor(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) { - // // _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this)); - // // _updateManyTargetOption(targetOptions, addrs); - // } + function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal { + __GlobalCoreGovernance_init_unchained(targetOptions, addrs); + } - function __init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal { + function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal { _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this)); _updateManyTargetOption(targetOptions, addrs); } @@ -49,17 +48,9 @@ abstract contract GlobalCoreGovernance is CoreGovernance { address creator ) internal virtual { uint256 round_ = _createVotingRound(0); - GlobalProposal.GlobalProposalDetail memory globalProposal = GlobalProposal.GlobalProposalDetail( - round_, - expiryTimestamp, - targetOptions, - values, - calldatas, - gasAmounts - ); - Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail( - _resolveTargets({ targetOptions: targetOptions, strict: true }) - ); + GlobalProposal.GlobalProposalDetail memory globalProposal = + GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, targetOptions, values, calldatas, gasAmounts); + Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true })); proposal.validate(_proposalExpiryDuration); bytes32 proposalHash = proposal.hash(); @@ -80,9 +71,7 @@ abstract contract GlobalCoreGovernance is CoreGovernance { GlobalProposal.GlobalProposalDetail memory globalProposal, address creator ) internal virtual returns (Proposal.ProposalDetail memory proposal) { - proposal = globalProposal.intoProposalDetail( - _resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }) - ); + proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })); proposal.validate(_proposalExpiryDuration); bytes32 proposalHash = proposal.hash(); @@ -96,9 +85,7 @@ abstract contract GlobalCoreGovernance is CoreGovernance { /** * @dev Returns corresponding address of target options. Return address(0) on non-existent target. */ - function resolveTargets( - GlobalProposal.TargetOption[] calldata targetOptions - ) external view returns (address[] memory targets) { + function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) { return _resolveTargets({ targetOptions: targetOptions, strict: false }); } @@ -107,13 +94,10 @@ abstract contract GlobalCoreGovernance is CoreGovernance { * * @param strict When the param is set to `true`, revert on non-existent target. */ - function _resolveTargets( - GlobalProposal.TargetOption[] memory targetOptions, - bool strict - ) internal view returns (address[] memory targets) { + function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) { targets = new address[](targetOptions.length); - for (uint256 i; i < targetOptions.length; ) { + for (uint256 i; i < targetOptions.length;) { targets[i] = _targetOptionsMap[targetOptions[i]]; if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig); unchecked { @@ -127,11 +111,9 @@ abstract contract GlobalCoreGovernance is CoreGovernance { * * Requirement: * - Only allow self-call through proposal. - * */ - function updateManyTargetOption( - GlobalProposal.TargetOption[] memory targetOptions, - address[] memory targets - ) external { + * + */ + function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external { // HACK: Cannot reuse the existing library due to too deep stack if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig); _updateManyTargetOption(targetOptions, targets); @@ -140,11 +122,8 @@ abstract contract GlobalCoreGovernance is CoreGovernance { /** * @dev Updates list of `targetOptions` to `targets`. */ - function _updateManyTargetOption( - GlobalProposal.TargetOption[] memory targetOptions, - address[] memory targets - ) internal { - for (uint256 i; i < targetOptions.length; ) { + function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal { + for (uint256 i; i < targetOptions.length;) { if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig); _updateTargetOption(targetOptions[i], targets[i]); unchecked { diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index a4ec2b8c..de640d37 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -14,23 +14,7 @@ import "../utils/CommonErrors.sol"; contract MainchainBridgeManager is Initializable, BridgeManager, GovernanceRelay, GlobalGovernanceRelay { uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255; - constructor() - // uint256 num, - // uint256 denom, - // uint256 roninChainId, - // address bridgeContract, - // address[] memory callbackRegisters, - // address[] memory bridgeOperators, - // address[] memory governors, - // uint96[] memory voteWeights, - // GlobalProposal.TargetOption[] memory targetOptions, - // address[] memory targets - // ) - // payable - // CoreGovernance(DEFAULT_EXPIRY_DURATION) - // GlobalCoreGovernance(targetOptions, targets) - // BridgeManager(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights) - { + constructor() { _disableInitializers(); } @@ -46,9 +30,9 @@ contract MainchainBridgeManager is Initializable, BridgeManager, GovernanceRelay GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets ) external initializer { - CoreGovernance.__init(DEFAULT_EXPIRY_DURATION); - GlobalCoreGovernance.__init(targetOptions, targets); - BridgeManager.__init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); + __CoreGovernance_init(DEFAULT_EXPIRY_DURATION); + __GlobalCoreGovernance_init(targetOptions, targets); + __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); } /** diff --git a/src/mocks/ronin/MockBridgeManager.sol b/src/mocks/ronin/MockBridgeManager.sol index 7febb328..a021eb0e 100644 --- a/src/mocks/ronin/MockBridgeManager.sol +++ b/src/mocks/ronin/MockBridgeManager.sol @@ -5,7 +5,7 @@ import { RoleAccess, ContractType, AddressArrayUtils, IBridgeManager, BridgeMana contract MockBridgeManager is BridgeManager { function initialize(address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) external { - BridgeManager.__init(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights); + __BridgeManager_init(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights); } function _getEmptyAddressArray() internal pure returns (address[] memory arr) { } diff --git a/src/mocks/ronin/MockRoninBridgeManager.sol b/src/mocks/ronin/MockRoninBridgeManager.sol index 867caa19..f4084af6 100644 --- a/src/mocks/ronin/MockRoninBridgeManager.sol +++ b/src/mocks/ronin/MockRoninBridgeManager.sol @@ -4,32 +4,4 @@ pragma solidity ^0.8.0; import { RoninBridgeManager } from "../../ronin/gateway/RoninBridgeManager.sol"; import { GlobalProposal } from "../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol"; -contract MockRoninBridgeManager is RoninBridgeManager { - // constructor( - // uint256 num, - // uint256 denom, - // uint256 roninChainId, - // uint256 expiryDuration, - // address bridgeContract, - // address[] memory callbackRegisters, - // address[] memory bridgeOperators, - // address[] memory governors, - // uint96[] memory voteWeights, - // GlobalProposal.TargetOption[] memory targetOptions, - // address[] memory targets - // ) - // RoninBridgeManager( - // num, - // denom, - // roninChainId, - // expiryDuration, - // bridgeContract, - // callbackRegisters, - // bridgeOperators, - // governors, - // voteWeights, - // targetOptions, - // targets - // ) - // {} -} +contract MockRoninBridgeManager is RoninBridgeManager { } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index f171a489..38d135da 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -26,9 +26,9 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external { - CoreGovernance.__init(expiryDuration); - GlobalCoreGovernance.__init(targetOptions, targets); - BridgeManager.__init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); + __CoreGovernance_init(expiryDuration); + __GlobalCoreGovernance_init(targetOptions, targets); + __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); } /** From 03936f2593b80b048fd15f19e2a7b286e16b08e8 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 7 Mar 2024 13:41:29 +0700 Subject: [PATCH 040/305] fix(BridgeManager): add `onlyInitializing` modifier --- .../BridgeManager.sol | 23 +++++++++++-------- .../BridgeManagerCallbackRegister.sol | 5 ++-- .../BridgeManagerQuorum.sol | 17 +++++++------- .../sequential-governance/CoreGovernance.sol | 7 +++--- .../GlobalCoreGovernance.sol | 4 ++-- src/mainchain/MainchainBridgeManager.sol | 7 +----- src/mocks/ronin/MockBridgeManager.sol | 2 +- 7 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index 243505da..2335b023 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { IBridgeManagerCallback, BridgeManagerCallbackRegister } from "./BridgeManagerCallbackRegister.sol"; import { IHasContracts, HasContracts } from "../../extensions/collections/HasContracts.sol"; @@ -13,7 +14,7 @@ import { TUint256Slot } from "../../types/Types.sol"; import "../../utils/CommonErrors.sol"; import "./BridgeManagerQuorum.sol"; -abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQuorum, BridgeManagerCallbackRegister { +abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, BridgeManagerQuorum, BridgeManagerCallbackRegister { using AddressArrayUtils for address[]; using EnumerableSet for EnumerableSet.AddressSet; @@ -40,17 +41,15 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu */ bytes32 public DOMAIN_SEPARATOR; - function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) { - assembly { - $.slot := $$_BridgeManagerStorageLocation - } - } - modifier onlyGovernor() virtual { _requireGovernor(msg.sender); _; } + constructor() { + _disableInitializers(); + } + function __BridgeManager_init( uint256 num, uint256 denom, @@ -60,7 +59,7 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights - ) internal { + ) internal onlyInitializing { __BridgeManagerQuorum_init_unchained(num, denom); __BridgeManagerCallbackRegister_init_unchained(callbackRegisters); __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights); @@ -72,7 +71,7 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights - ) internal { + ) internal onlyInitializing { _setContract(ContractType.BRIDGE, bridgeContract); DOMAIN_SEPARATOR = keccak256( @@ -88,6 +87,12 @@ abstract contract BridgeManager is IBridgeManager, HasContracts, BridgeManagerQu _setMinRequiredGovernor(3); } + function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) { + assembly { + $.slot := $$_BridgeManagerStorageLocation + } + } + // ===================== CONFIG ======================== /** diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index a7daf6e7..a2145129 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { IBridgeManagerCallbackRegister } from "../../interfaces/bridge/IBridgeManagerCallbackRegister.sol"; import { IBridgeManagerCallback } from "../../interfaces/bridge/IBridgeManagerCallback.sol"; @@ -10,7 +11,7 @@ import { TransparentUpgradeableProxyV2, IdentityGuard } from "../../utils/Identi * @title BridgeManagerCallbackRegister * @dev A contract that manages callback registrations and execution for a bridge. */ -abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManagerCallbackRegister { +abstract contract BridgeManagerCallbackRegister is Initializable, IdentityGuard, IBridgeManagerCallbackRegister { using EnumerableSet for EnumerableSet.AddressSet; /** @@ -19,7 +20,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager */ bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240; - function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal { + function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing { _registerCallbacks(callbackRegisters); } diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol index 689e3c6b..ba92ddb9 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -1,11 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { IQuorum } from "../../interfaces/IQuorum.sol"; import { IdentityGuard } from "../../utils/IdentityGuard.sol"; import "../../utils/CommonErrors.sol"; -abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { +abstract contract BridgeManagerQuorum is IQuorum, Initializable, IdentityGuard { struct BridgeManagerQuorumStorage { uint256 _nonce; uint256 _numerator; @@ -15,19 +16,19 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { // keccak256(abi.encode(uint256(keccak256("ronin.storage.BridgeManagerQuorumStorage")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00; - function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) { - assembly { - $.slot := $$_BridgeManagerQuorumStorage - } - } - - function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal { + function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing { BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); $._nonce = 1; _setThreshold(num, denom); } + function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) { + assembly { + $.slot := $$_BridgeManagerQuorumStorage + } + } + /** * @inheritdoc IQuorum */ diff --git a/src/extensions/sequential-governance/CoreGovernance.sol b/src/extensions/sequential-governance/CoreGovernance.sol index e268b69e..944905f7 100644 --- a/src/extensions/sequential-governance/CoreGovernance.sol +++ b/src/extensions/sequential-governance/CoreGovernance.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "../../libraries/Proposal.sol"; import "../../libraries/GlobalProposal.sol"; import "../../utils/CommonErrors.sol"; @@ -9,7 +10,7 @@ import "../../interfaces/consumers/ChainTypeConsumer.sol"; import "../../interfaces/consumers/SignatureConsumer.sol"; import "../../interfaces/consumers/VoteStatusConsumer.sol"; -abstract contract CoreGovernance is SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer { +abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer { using Proposal for Proposal.ProposalDetail; /** @@ -57,11 +58,11 @@ abstract contract CoreGovernance is SignatureConsumer, VoteStatusConsumer, Chain uint256 internal _proposalExpiryDuration; - function __CoreGovernance_init(uint256 expiryDuration) internal { + function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing { __CoreGovernance_init_unchained(expiryDuration); } - function __CoreGovernance_init_unchained(uint256 expiryDuration) internal { + function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing { _setProposalExpiryDuration(expiryDuration); } diff --git a/src/extensions/sequential-governance/GlobalCoreGovernance.sol b/src/extensions/sequential-governance/GlobalCoreGovernance.sol index 1b43eca7..b5ead07b 100644 --- a/src/extensions/sequential-governance/GlobalCoreGovernance.sol +++ b/src/extensions/sequential-governance/GlobalCoreGovernance.sol @@ -24,11 +24,11 @@ abstract contract GlobalCoreGovernance is CoreGovernance { /// @dev Emitted when the target options are updated event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr); - function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal { + function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing { __GlobalCoreGovernance_init_unchained(targetOptions, addrs); } - function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal { + function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing { _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this)); _updateManyTargetOption(targetOptions, addrs); } diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index de640d37..7c63d831 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { CoreGovernance } from "../extensions/sequential-governance/CoreGovernance.sol"; import { GlobalCoreGovernance, GlobalGovernanceRelay } from "../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol"; import { GovernanceRelay } from "../extensions/sequential-governance/governance-relay/GovernanceRelay.sol"; @@ -11,13 +10,9 @@ import { Proposal } from "../libraries/Proposal.sol"; import { GlobalProposal } from "../libraries/GlobalProposal.sol"; import "../utils/CommonErrors.sol"; -contract MainchainBridgeManager is Initializable, BridgeManager, GovernanceRelay, GlobalGovernanceRelay { +contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGovernanceRelay { uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255; - constructor() { - _disableInitializers(); - } - function initialize( uint256 num, uint256 denom, diff --git a/src/mocks/ronin/MockBridgeManager.sol b/src/mocks/ronin/MockBridgeManager.sol index a021eb0e..6c0e746d 100644 --- a/src/mocks/ronin/MockBridgeManager.sol +++ b/src/mocks/ronin/MockBridgeManager.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.0; import { RoleAccess, ContractType, AddressArrayUtils, IBridgeManager, BridgeManager } from "../../extensions/bridge-operator-governance/BridgeManager.sol"; contract MockBridgeManager is BridgeManager { - function initialize(address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) external { + function initialize(address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) external initializer { __BridgeManager_init(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights); } From 8e91d621586f4ff22eab3aef88dfe3f01f075ebf Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 11 Mar 2024 13:57:53 +0700 Subject: [PATCH 041/305] fix(BridgeReward): fix syntax error --- src/ronin/gateway/BridgeReward.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index 1da2b2d4..702daedc 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -100,7 +100,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT // Restrict number of period to reward in a transaction, to avoid consume too much gas uint toRewardPeriodCount = currentPeriod - latestRewardedPeriod; - toRewardPeriodCount = Math.min(toRewardPeriodCount, $_MAX_REWARDING_PERIOD_COUNT); + toRewardPeriodCount = Math.min(toRewardPeriodCount, $_MAX_REWARDING_PERIOD_COUNT.load()); _syncRewardBatch(latestRewardedPeriod, toRewardPeriodCount); } From eab45382a6ef45c687da07f83b4db73731bccafe Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 11 Mar 2024 13:59:37 +0700 Subject: [PATCH 042/305] feat(BridgeReward): rename public methods --- lib/foundry-deployment-kit | 2 +- src/interfaces/bridge/IBridgeReward.sol | 4 ++-- src/ronin/gateway/BridgeReward.sol | 4 ++-- src/ronin/gateway/BridgeTracking.sol | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index 3aa1ca23..8c728424 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit 3aa1ca23adaa55a2e04818b0dced14947e4e5c28 +Subproject commit 8c728424858f8c8358f2e0f9374a6ea581f46486 diff --git a/src/interfaces/bridge/IBridgeReward.sol b/src/interfaces/bridge/IBridgeReward.sol index 6569eb54..9d5e314d 100644 --- a/src/interfaces/bridge/IBridgeReward.sol +++ b/src/interfaces/bridge/IBridgeReward.sol @@ -9,7 +9,7 @@ interface IBridgeReward is IBridgeRewardEvents { * @dev This function allows bridge operators to manually synchronize the reward for a given period length. * @param periodLength The length of the reward period for which synchronization is requested. */ - function syncReward(uint256 periodLength) external; + function syncRewardManual(uint256 periodLength) external; /** * @dev Receives RON from any address. @@ -23,7 +23,7 @@ interface IBridgeReward is IBridgeRewardEvents { * - This method is only called once each period. * - The caller must be the bridge tracking contract */ - function execSyncReward() external; + function execSyncRewardAuto() external; /** * @dev Retrieve the total amount of rewards that have been topped up in the contract. diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index 702daedc..39e1a115 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -78,7 +78,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT /** * @inheritdoc IBridgeReward */ - function syncReward(uint256 periodCount) external { + function syncRewardManual(uint256 periodCount) external { if (!_isBridgeOperator(msg.sender)) revert ErrUnauthorizedCall(msg.sig); uint256 latestRewardedPeriod = getLatestRewardedPeriod(); @@ -92,7 +92,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT /** * @inheritdoc IBridgeReward */ - function execSyncReward() external onlyContract(ContractType.BRIDGE_TRACKING) { + function execSyncRewardAuto() external onlyContract(ContractType.BRIDGE_TRACKING) { uint256 latestRewardedPeriod = getLatestRewardedPeriod(); uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); diff --git a/src/ronin/gateway/BridgeTracking.sol b/src/ronin/gateway/BridgeTracking.sol index f52a0f19..b446c21a 100644 --- a/src/ronin/gateway/BridgeTracking.sol +++ b/src/ronin/gateway/BridgeTracking.sol @@ -228,9 +228,9 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr } address bridgeRewardContract = getContract(ContractType.BRIDGE_REWARD); - (success, returnOrRevertData) = bridgeRewardContract.call(abi.encodeCall(IBridgeReward.execSyncReward, ())); + (success, returnOrRevertData) = bridgeRewardContract.call(abi.encodeCall(IBridgeReward.execSyncRewardAuto, ())); if (!success) { - emit ExternalCallFailed(bridgeRewardContract, IBridgeReward.execSyncReward.selector, returnOrRevertData); + emit ExternalCallFailed(bridgeRewardContract, IBridgeReward.execSyncRewardAuto.selector, returnOrRevertData); } } } From 3d137ae35abead94e9721c32c180b4fd1a98c0dd Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 11 Mar 2024 17:25:13 +0700 Subject: [PATCH 043/305] feat(BridgeReward): rework the reward methods, reduce duplication --- src/interfaces/bridge/IBridgeReward.sol | 6 +- .../bridge/events/IBridgeRewardEvents.sol | 3 + src/ronin/gateway/BridgeReward.sol | 60 +++++++++++-------- src/ronin/gateway/BridgeTracking.sol | 10 ++-- 4 files changed, 46 insertions(+), 33 deletions(-) diff --git a/src/interfaces/bridge/IBridgeReward.sol b/src/interfaces/bridge/IBridgeReward.sol index 9d5e314d..f3668fc9 100644 --- a/src/interfaces/bridge/IBridgeReward.sol +++ b/src/interfaces/bridge/IBridgeReward.sol @@ -7,9 +7,9 @@ import { IBridgeRewardEvents } from "./events/IBridgeRewardEvents.sol"; interface IBridgeReward is IBridgeRewardEvents { /** * @dev This function allows bridge operators to manually synchronize the reward for a given period length. - * @param periodLength The length of the reward period for which synchronization is requested. + * @param periodCount The length of the reward period for which synchronization is requested. */ - function syncRewardManual(uint256 periodLength) external; + function syncRewardManual(uint256 periodCount) external; /** * @dev Receives RON from any address. @@ -23,7 +23,7 @@ interface IBridgeReward is IBridgeRewardEvents { * - This method is only called once each period. * - The caller must be the bridge tracking contract */ - function execSyncRewardAuto() external; + function execSyncRewardAuto(uint256 currentPeriod) external; /** * @dev Retrieve the total amount of rewards that have been topped up in the contract. diff --git a/src/interfaces/bridge/events/IBridgeRewardEvents.sol b/src/interfaces/bridge/events/IBridgeRewardEvents.sol index 5179e071..ea737cc2 100644 --- a/src/interfaces/bridge/events/IBridgeRewardEvents.sol +++ b/src/interfaces/bridge/events/IBridgeRewardEvents.sol @@ -29,4 +29,7 @@ interface IBridgeRewardEvents { event BridgeRewardScatterFailed(uint256 indexed period, address operator, uint256 amount); /// @dev Event emitted when the requesting period to sync is too far. event BridgeRewardSyncTooFarPeriod(uint256 requestingPeriod, uint256 latestPeriod); + + error ErrPeriodNotHappen(bytes4 msgSig, uint256 currentPeriod, uint256 latestRewardedPeriod, uint256 periodCount); + error ErrPeriodAlreadyRewarded(bytes4 msgSig, uint256 currentPeriod, uint256 latestRewardedPeriod); } diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index 39e1a115..42a90678 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -80,47 +80,57 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT */ function syncRewardManual(uint256 periodCount) external { if (!_isBridgeOperator(msg.sender)) revert ErrUnauthorizedCall(msg.sig); + uint256 currPd = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); - uint256 latestRewardedPeriod = getLatestRewardedPeriod(); - uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); - if (latestRewardedPeriod + periodCount > currentPeriod) revert ErrInvalidArguments(msg.sig); - if (currentPeriod <= latestRewardedPeriod) revert ErrInvalidArguments(msg.sig); - - _syncRewardBatch(latestRewardedPeriod, periodCount); + _syncRewardBatch({ currPd: currPd, pdCount: periodCount }); } /** * @inheritdoc IBridgeReward */ - function execSyncRewardAuto() external onlyContract(ContractType.BRIDGE_TRACKING) { - uint256 latestRewardedPeriod = getLatestRewardedPeriod(); - uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); - - if (currentPeriod <= latestRewardedPeriod) revert ErrInvalidArguments(msg.sig); - - // Restrict number of period to reward in a transaction, to avoid consume too much gas - uint toRewardPeriodCount = currentPeriod - latestRewardedPeriod; - toRewardPeriodCount = Math.min(toRewardPeriodCount, $_MAX_REWARDING_PERIOD_COUNT.load()); - - _syncRewardBatch(latestRewardedPeriod, toRewardPeriodCount); + function execSyncRewardAuto(uint256 currentPeriod) external onlyContract(ContractType.BRIDGE_TRACKING) { + _syncRewardBatch({ currPd: currentPeriod, pdCount: 0 }); } - function _syncRewardBatch(uint256 latestRewardedPeriod, uint256 periodCount) internal { + /** + * @dev Sync bridge reward for multiple periods, always assert `latestRewardedPeriod + periodCount <= currentPeriod`. + * @param pdCount Number of periods to settle reward. Leave this as 0 to calculate. + */ + function _syncRewardBatch(uint256 currPd, uint256 pdCount) internal { + uint256 lastRewardPd = getLatestRewardedPeriod(); + if (pdCount == 0) { + // Unchecked the subtraction to avoid underflow. The result will be checked in the next assertion. + unchecked { + // Restrict number of period to reward in a transaction, to avoid consume too much gas + uint toSettlePdCount = currPd - lastRewardPd; + pdCount = Math.min(toSettlePdCount, $_MAX_REWARDING_PERIOD_COUNT.load()); + } + } + _assertPeriod({ currPd: currPd, pdCount: pdCount, lastRewardPd: lastRewardPd }); + address[] memory operators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators(); IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 i = 1; i <= periodCount; i++) { + for (uint256 i = 1; i <= pdCount; i++) { $_LATEST_REWARDED_PERIOD.addAssign(1); - _syncReward({ + _settleReward({ operators: operators, - ballots: bridgeTrackingContract.getManyTotalBallots(latestRewardedPeriod, operators), - totalBallot: bridgeTrackingContract.totalBallot(latestRewardedPeriod), - totalVote: bridgeTrackingContract.totalVote(latestRewardedPeriod), - period: latestRewardedPeriod + i + ballots: bridgeTrackingContract.getManyTotalBallots(lastRewardPd, operators), + totalBallot: bridgeTrackingContract.totalBallot(lastRewardPd), + totalVote: bridgeTrackingContract.totalVote(lastRewardPd), + period: lastRewardPd + i }); } } + function _assertPeriod(uint256 currPd, uint256 pdCount, uint256 lastRewardPd) internal { + // Not settle the periods that not happen yet. + if (currPd < lastRewardPd + pdCount) revert ErrPeriodNotHappen(msg.sig, currPd, lastRewardPd, pdCount); + + // Not settle the period that already rewarded. + if (currPd <= lastRewardPd) revert ErrPeriodAlreadyRewarded(msg.sig, currPd, lastRewardPd); + } + /** * @inheritdoc IBridgeReward */ @@ -154,7 +164,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT * @param totalVote The total number of votes recorded for the period. * @param period The period for which the rewards are being synchronized. */ - function _syncReward(address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote, uint256 period) internal { + function _settleReward(address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote, uint256 period) internal { uint256 numBridgeOperators = operators.length; uint256 rewardPerPeriod = getRewardPerPeriod(); uint256[] memory slashedDurationList = _getSlashInfo(operators); diff --git a/src/ronin/gateway/BridgeTracking.sol b/src/ronin/gateway/BridgeTracking.sol index b446c21a..7dd21a1f 100644 --- a/src/ronin/gateway/BridgeTracking.sol +++ b/src/ronin/gateway/BridgeTracking.sol @@ -195,7 +195,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr * @inheritdoc IBridgeTracking */ function recordVote(VoteKind kind, uint256 requestId, address operator) external override onlyContract(ContractType.BRIDGE) skipOnNotStarted { - uint256 period = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); + uint256 currPd = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); _trySyncBuffer(); ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId]; @@ -206,12 +206,12 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr return; } - _increaseBallot(kind, requestId, operator, period); + _increaseBallot(kind, requestId, operator, currPd); uint256 lastSyncPeriod = _lastSyncPeriod; // When switching to new period, wrap up vote info, then slash and distribute reward accordingly. - if (lastSyncPeriod < period) { - _lastSyncPeriod = period; + if (lastSyncPeriod < currPd) { + _lastSyncPeriod = currPd; address[] memory allOperators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators(); uint256[] memory ballots = _getManyTotalBallots(lastSyncPeriod, allOperators); @@ -228,7 +228,7 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr } address bridgeRewardContract = getContract(ContractType.BRIDGE_REWARD); - (success, returnOrRevertData) = bridgeRewardContract.call(abi.encodeCall(IBridgeReward.execSyncRewardAuto, ())); + (success, returnOrRevertData) = bridgeRewardContract.call(abi.encodeCall(IBridgeReward.execSyncRewardAuto, (currPd))); if (!success) { emit ExternalCallFailed(bridgeRewardContract, IBridgeReward.execSyncRewardAuto.selector, returnOrRevertData); } From 71214907694cba92e068312c0785001304bb6780 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 12 Mar 2024 16:35:38 +0700 Subject: [PATCH 044/305] fix(BridgeReward): rework the emitted period num --- .../bridge/events/IBridgeRewardEvents.sol | 5 +- src/ronin/gateway/BridgeReward.sol | 71 ++++++++++++------- 2 files changed, 49 insertions(+), 27 deletions(-) diff --git a/src/interfaces/bridge/events/IBridgeRewardEvents.sol b/src/interfaces/bridge/events/IBridgeRewardEvents.sol index ea737cc2..440a44e3 100644 --- a/src/interfaces/bridge/events/IBridgeRewardEvents.sol +++ b/src/interfaces/bridge/events/IBridgeRewardEvents.sol @@ -30,6 +30,7 @@ interface IBridgeRewardEvents { /// @dev Event emitted when the requesting period to sync is too far. event BridgeRewardSyncTooFarPeriod(uint256 requestingPeriod, uint256 latestPeriod); - error ErrPeriodNotHappen(bytes4 msgSig, uint256 currentPeriod, uint256 latestRewardedPeriod, uint256 periodCount); - error ErrPeriodAlreadyRewarded(bytes4 msgSig, uint256 currentPeriod, uint256 latestRewardedPeriod); + error ErrPeriodNotHappen(uint256 currentPeriod, uint256 latestRewardedPeriod, uint256 periodCount); + error ErrPeriodAlreadyRewarded(uint256 currentPeriod, uint256 latestRewardedPeriod); + error ErrPeriodCountIsZero(); } diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index 42a90678..52d42093 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -56,7 +56,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT /** * @dev Helper for running upgrade script, required to only revoked once by the DPoS's governance admin. - * The following must be assured after initializing REP2: `_lastSyncPeriod` == `{BridgeReward}.latestRewardedPeriod` == `currentPeriod()` + * The following must be assured after initializing REP2: `{BridgeTracking}._lastSyncPeriod` == `{BridgeReward}.latestRewardedPeriod` == `currentPeriod()` */ function initializeREP2() external onlyContract(ContractType.GOVERNANCE_ADMIN) { require(getLatestRewardedPeriod() == type(uint256).max, "already init rep 2"); @@ -66,6 +66,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT function initializeV2() external reinitializer(2) { $_MAX_REWARDING_PERIOD_COUNT.store(5); + $_LATEST_REWARDED_PERIOD.store(getLatestRewardedPeriod() - 1); } /** @@ -94,41 +95,66 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT /** * @dev Sync bridge reward for multiple periods, always assert `latestRewardedPeriod + periodCount <= currentPeriod`. - * @param pdCount Number of periods to settle reward. Leave this as 0 to calculate. + * @param pdCount Number of periods to settle reward. Leave this as 0 to auto calculate. */ function _syncRewardBatch(uint256 currPd, uint256 pdCount) internal { uint256 lastRewardPd = getLatestRewardedPeriod(); if (pdCount == 0) { - // Unchecked the subtraction to avoid underflow. The result will be checked in the next assertion. - unchecked { - // Restrict number of period to reward in a transaction, to avoid consume too much gas - uint toSettlePdCount = currPd - lastRewardPd; - pdCount = Math.min(toSettlePdCount, $_MAX_REWARDING_PERIOD_COUNT.load()); + uint toSettlePdCount; + if (currPd > lastRewardPd) { + toSettlePdCount = currPd - lastRewardPd - 1; } + + // Restrict number of period to reward in a transaction, to avoid consume too much gas + pdCount = Math.min(toSettlePdCount, $_MAX_REWARDING_PERIOD_COUNT.load()); } + _assertPeriod({ currPd: currPd, pdCount: pdCount, lastRewardPd: lastRewardPd }); address[] memory operators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators(); IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 i = 1; i <= pdCount; i++) { - $_LATEST_REWARDED_PERIOD.addAssign(1); + for (uint256 i = 0; i < pdCount; i++) { + ++lastRewardPd; _settleReward({ operators: operators, ballots: bridgeTrackingContract.getManyTotalBallots(lastRewardPd, operators), totalBallot: bridgeTrackingContract.totalBallot(lastRewardPd), totalVote: bridgeTrackingContract.totalVote(lastRewardPd), - period: lastRewardPd + i + period: lastRewardPd }); } } - function _assertPeriod(uint256 currPd, uint256 pdCount, uint256 lastRewardPd) internal { - // Not settle the periods that not happen yet. - if (currPd < lastRewardPd + pdCount) revert ErrPeriodNotHappen(msg.sig, currPd, lastRewardPd, pdCount); + /** + * @dev + * Before the last valid rewarding: + * |----------|------------------|------------------------------|-----------------| + * ^ ^ ^ + * Validator.current + * Reward.lastReward + * Tracking.lastSync + * Tracking.ballotInfo + * Slash.slashInfo + * + * + * After the last valid rewarding, the lastRewardedPeriod always slower than currentPeriod: + * |----------|------------------|------------------------------|-----------------| + * ^ ^ + * Validator.current + * Reward.lastReward + * Tracking.lastSync + * Tracking.ballotInfo + * Slash.slashInfo + */ + function _assertPeriod(uint256 currPd, uint256 pdCount, uint256 lastRewardPd) internal pure { + if (pdCount == 0) revert ErrPeriodCountIsZero(); // Not settle the period that already rewarded. - if (currPd <= lastRewardPd) revert ErrPeriodAlreadyRewarded(msg.sig, currPd, lastRewardPd); + if (currPd <= lastRewardPd + 1) revert ErrPeriodAlreadyRewarded(currPd, lastRewardPd); + + // Not settle the periods that not happen yet. + if (currPd <= lastRewardPd + pdCount) revert ErrPeriodNotHappen(currPd, lastRewardPd, pdCount); } /** @@ -166,6 +192,8 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT */ function _settleReward(address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote, uint256 period) internal { uint256 numBridgeOperators = operators.length; + if (numBridgeOperators != ballots.length) revert ErrLengthMismatch(msg.sig); + uint256 rewardPerPeriod = getRewardPerPeriod(); uint256[] memory slashedDurationList = _getSlashInfo(operators); // Validate should share the reward equally @@ -175,7 +203,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT bool shouldSlash; uint256 sumRewards; - for (uint256 i; i < numBridgeOperators;) { + for (uint256 i; i < numBridgeOperators; i++) { (reward, shouldSlash) = _calcRewardAndCheckSlashedStatus({ shouldShareEqually: shouldShareEqually, numBridgeOperators: numBridgeOperators, @@ -188,13 +216,10 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT sumRewards += shouldSlash ? 0 : reward; _updateRewardAndTransfer({ period: period, operator: operators[i], reward: reward, shouldSlash: shouldSlash }); - - unchecked { - ++i; - } } $_TOTAL_REWARDS_SCATTERED.addAssign(sumRewards); + $_LATEST_REWARDED_PERIOD.store(period); } /** @@ -239,13 +264,9 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT /** * @dev Internal function to check if a specific period should be considered as slashed based on the slash duration. - * @param period The period to check if it should be slashed. - * @param slashDuration The duration until which periods should be considered as slashed. - * @return shouldSlashed A boolean indicating whether the specified period should be slashed. - * @notice This function is used internally to determine if a particular period should be marked as slashed based on the slash duration. */ - function _shouldSlashedThisPeriod(uint256 period, uint256 slashDuration) internal pure returns (bool) { - return period <= slashDuration; + function _shouldSlashedThisPeriod(uint256 period, uint256 slashUntil) internal pure returns (bool) { + return period <= slashUntil; } /** From ad79b6ff4fa012ff243a882487fd08258ce92f37 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 12 Mar 2024 16:36:02 +0700 Subject: [PATCH 045/305] test(BridgeReward): rework the whole test suite of bridge reward --- .../concrete/bridge-reward/BridgeReward.t.sol | 46 +++- .../concrete/bridge-reward/assertPeriod.t.sol | 76 ++++++ .../execSyncReward/execSyncReward.t.sol | 238 ++---------------- .../bridge-reward/execSyncRewardAuto.t.sol | 125 +++++++++ .../bridge-reward/syncRewardManual.t.sol | 60 +++++ test/harness/BridgeRewardHarness.sol | 19 ++ test/mocks/MockBridgeManager.sol | 86 +++++-- test/mocks/MockBridgeSlash.sol | 2 +- test/mocks/MockBridgeTracking.sol | 4 +- 9 files changed, 403 insertions(+), 253 deletions(-) create mode 100644 test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol create mode 100644 test/bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol create mode 100644 test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol create mode 100644 test/harness/BridgeRewardHarness.sol diff --git a/test/bridge/unit/concrete/bridge-reward/BridgeReward.t.sol b/test/bridge/unit/concrete/bridge-reward/BridgeReward.t.sol index 529ae34f..c1cb817e 100644 --- a/test/bridge/unit/concrete/bridge-reward/BridgeReward.t.sol +++ b/test/bridge/unit/concrete/bridge-reward/BridgeReward.t.sol @@ -17,33 +17,37 @@ import { MockBridgeSlash } from "@ronin/test/mocks/MockBridgeSlash.sol"; import { MockValidatorSet_ForFoundryTest } from "@ronin/test/mocks/MockValidatorSet_ForFoundryTest.sol"; import { Users } from "@ronin/test/utils/Types.sol"; +import "@ronin/test/harness/BridgeRewardHarness.sol"; + contract BridgeReward_Unit_Concrete_Test is Base_Test { - BridgeReward internal _bridgeReward; + BridgeRewardHarness internal _bridgeReward; address internal _proxyAdmin; uint256 internal _rewardPerPeriod; - IBridgeTracking internal _bridgeTracking; - IBridgeManager internal _bridgeManager; - IBridgeSlash internal _bridgeSlash; + MockBridgeTracking internal _bridgeTracking; + MockBridgeManager internal _bridgeManager; + MockBridgeSlash internal _bridgeSlash; MockValidatorSet_ForFoundryTest internal _validatorSetContract; Users internal _users; + address _operator; + address _governor; + uint96 _weight; + function setUp() public virtual { // Create users for testing. _users = Users({ alice: createUser("Alice") }); + _operator = makeAddr("operator"); + _governor = makeAddr("governor"); _proxyAdmin = vm.addr(1); _rewardPerPeriod = 50_000; - address bridgeRewardImpl = address(new BridgeReward()); + address bridgeRewardImpl = address(new BridgeRewardHarness()); // Deploy the dependencies and mocks for testing contract - _bridgeReward = BridgeReward( - address( - new TransparentUpgradeableProxyV2{ value: _rewardPerPeriod * 1_000_000 }(bridgeRewardImpl, _proxyAdmin, "") - ) - ); + _bridgeReward = BridgeRewardHarness(address(new TransparentUpgradeableProxyV2{ value: _rewardPerPeriod * 1_000_000 }(bridgeRewardImpl, _proxyAdmin, ""))); _bridgeTracking = new MockBridgeTracking(); _bridgeManager = new MockBridgeManager(); _bridgeSlash = new MockBridgeSlash(); @@ -63,6 +67,7 @@ contract BridgeReward_Unit_Concrete_Test is Base_Test { vm.prank(makeAccount("dposGA").addr); _bridgeReward.initializeREP2(); + _bridgeReward.initializeV2(); // Label the base test contracts. vm.label({ account: address(_bridgeReward), newLabel: "Bridge Reward" }); @@ -79,4 +84,25 @@ contract BridgeReward_Unit_Concrete_Test is Base_Test { vm.deal({ account: user, newBalance: 100 ether }); return user; } + + function _generateInput_shareRewardProportionally() + internal + pure + returns (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) + { + operators = new address[](4); + operators[0] = address(0x10000); + operators[1] = address(0x10001); + operators[2] = address(0x10002); + operators[3] = address(0x10003); + + ballots = new uint256[](4); + ballots[0] = 10; + ballots[1] = 20; + ballots[2] = 30; + ballots[3] = 40; + + totalBallot = 100; + totalVote = 40; + } } diff --git a/test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol b/test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol new file mode 100644 index 00000000..f9edb682 --- /dev/null +++ b/test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity >=0.8.17 <0.9.0; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; + +import "@ronin/contracts/utils/CommonErrors.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeReward } from "@ronin/contracts/interfaces/bridge/IBridgeReward.sol"; +import { IBridgeRewardEvents } from "@ronin/contracts/interfaces/bridge/events/IBridgeRewardEvents.sol"; +import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; +import { BridgeTrackingHelper } from "@ronin/contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; + +import "./BridgeReward.t.sol"; + +contract AssertPeriod_Unit_Concrete_Test is + BridgeReward_Unit_Concrete_Test, + IBridgeRewardEvents, + BridgeTrackingHelper // Need to inherits this to access event +{ + function setUp() public virtual override { + BridgeReward_Unit_Concrete_Test.setUp(); + vm.startPrank({ msgSender: address(_bridgeTracking) }); + } + + function test_RevertWhen_assertPeriod_PeriodCountIsZero() external { + vm.expectRevert(abi.encodeWithSelector(ErrPeriodCountIsZero.selector)); + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 1, pdCount: 0, currPd: 1 }); + } + + function test_RevertWhen_assertPeriod_PeriodIsAlreadyRewarded() external { + vm.expectRevert(abi.encodeWithSelector(ErrPeriodAlreadyRewarded.selector, 38, 37)); + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 37, pdCount: 1, currPd: 38 }); + } + + function test_RevertWhen_assertPeriod_PeriodIsAlreadyRewarded_Multi() external { + vm.expectRevert(abi.encodeWithSelector(ErrPeriodAlreadyRewarded.selector, 37, 37)); + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 37, pdCount: 2, currPd: 37 }); + } + + function test_RevertWhen_assertPeriod_PeriodIsAlreadyRewarded_LongAgo() external { + vm.expectRevert(abi.encodeWithSelector(ErrPeriodAlreadyRewarded.selector, 30, 37)); + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 37, pdCount: 2, currPd: 30 }); + } + + function test_RevertWhen_assertPeriod_PeriodNotHappen_1() external { + vm.expectRevert(abi.encodeWithSelector(ErrPeriodNotHappen.selector, 37, 35, 2)); + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 35, pdCount: 2, currPd: 37 }); + } + + function test_RevertWhen_assertPeriod_PeriodNotHappen_2() external { + vm.expectRevert(abi.encodeWithSelector(ErrPeriodNotHappen.selector, 37, 34, 3)); + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 34, pdCount: 3, currPd: 37 }); + } + + function test_RevertWhen_assertPeriod_PeriodNotHappen_CountTooBig() external { + vm.expectRevert(abi.encodeWithSelector(ErrPeriodNotHappen.selector, 37, 34, 3000000)); + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 34, pdCount: 3000000, currPd: 37 }); + } + + function test_assertPeriod_Passed_WhenRequest1CurrentPeriod_UpToCurrent() external view { + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 35, pdCount: 1, currPd: 37 }); + } + + function test_assertPeriod_Passed_WhenRequest2CurrentPeriod_UpToCurrent() external view { + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 34, pdCount: 2, currPd: 37 }); + } + + function test_assertPeriod_Passed_WhenRequest1CurrentPeriod_NotUpToCurrent() external view { + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 34, pdCount: 1, currPd: 37 }); + } + + function test_assertPeriod_Passed_WhenRequest3CurrentPeriod_NotUpToCurrent() external view { + _bridgeReward.exposed_assertPeriod({ lastRewardPd: 33, pdCount: 3, currPd: 37 }); + } +} diff --git a/test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.t.sol b/test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.t.sol index c6e5794a..2464b4af 100644 --- a/test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.t.sol +++ b/test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.t.sol @@ -11,9 +11,9 @@ import { IBridgeRewardEvents } from "@ronin/contracts/interfaces/bridge/events/I import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { BridgeTrackingHelper } from "@ronin/contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; -import { BridgeReward_Unit_Concrete_Test } from "../BridgeReward.t.sol"; +import "../BridgeReward.t.sol"; -contract Add_Unit_Concrete_Test is +contract SettleReward_Unit_Concrete_Test is BridgeReward_Unit_Concrete_Test, IBridgeRewardEvents, BridgeTrackingHelper // Need to inherits this to access event @@ -23,41 +23,8 @@ contract Add_Unit_Concrete_Test is vm.startPrank({ msgSender: address(_bridgeTracking) }); } - function test_RevertWhen_NotCalledByBridgeTracking() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); - - uint256 period = _validatorSetContract.currentPeriod() + 1; - - changePrank(_users.alice); - vm.expectRevert( - abi.encodeWithSelector( - ErrUnexpectedInternalCall.selector, - IBridgeReward.execSyncReward.selector, - ContractType.BRIDGE_TRACKING, - _users.alice - ) - ); - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); - } - function test_RevertWhen_OperatorsLengthIsZero() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); uint256 period = _validatorSetContract.currentPeriod() + 1; assembly ("memory-safe") { @@ -66,96 +33,30 @@ contract Add_Unit_Concrete_Test is } // TODO: test tx not emit event - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); } function test_RevertWhen_TwoInputArraysLengthsDiffer() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); uint256 period = _validatorSetContract.currentPeriod() + 1; assembly ("memory-safe") { mstore(operators, 1) } - vm.expectRevert(abi.encodeWithSelector(ErrLengthMismatch.selector, IBridgeReward.execSyncReward.selector)); - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); + vm.expectRevert(abi.encodeWithSelector(ErrLengthMismatch.selector, BridgeRewardHarness.exposed_settleReward.selector)); + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); assembly ("memory-safe") { mstore(operators, 0) } - vm.expectRevert(abi.encodeWithSelector(ErrLengthMismatch.selector, IBridgeReward.execSyncReward.selector)); - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); - } - - function test_RevertWhen_AlreadyRewardedPeriod() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); - uint256 period = _validatorSetContract.currentPeriod() - 1; - - vm.expectRevert(abi.encodeWithSelector(ErrInvalidArguments.selector, IBridgeReward.execSyncReward.selector)); - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); - } - function test_RevertWhen_PeriodTooFar() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); - uint256 latestPeriod = _validatorSetContract.currentPeriod() - 1; - uint256 requestingPeriod = latestPeriod + 10; - - vm.expectRevert(abi.encodeWithSelector(ErrSyncTooFarPeriod.selector, requestingPeriod, latestPeriod)); - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: requestingPeriod - }); + vm.expectRevert(abi.encodeWithSelector(ErrLengthMismatch.selector, BridgeRewardHarness.exposed_settleReward.selector)); + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); } - function test_execSyncReward_ShareEqually_WhenDataCorrupts_NotTopUpFund() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); + function test_settleReward_ShareEqually_WhenDataCorrupts_NotTopUpFund() external { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); uint256 period = _validatorSetContract.currentPeriod(); ballots[0] = 100_000; @@ -170,24 +71,13 @@ contract Add_Unit_Concrete_Test is emit BridgeRewardScatterFailed(period, operators[i], _rewardPerPeriod / operators.length); } - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); assertEq(_bridgeReward.getLatestRewardedPeriod(), period); } - function test_execSyncReward_ShareEqually_WhenDataCorrupts_HaveEnoughFund_OneAbnormalBallot() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); + function test_settleReward_ShareEqually_WhenDataCorrupts_HaveEnoughFund_OneAbnormalBallot() external { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); uint256 period = _validatorSetContract.currentPeriod(); ballots[0] = 100_000; @@ -199,23 +89,12 @@ contract Add_Unit_Concrete_Test is emit BridgeRewardScattered(period, operators[i], _rewardPerPeriod / operators.length); } - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); assertEq(_bridgeReward.getLatestRewardedPeriod(), period); } - function test_execSyncReward_ShareEqually_WhenDataCorrupts_HaveEnoughFund_AbnormalTotalBallot() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); + function test_settleReward_ShareEqually_WhenDataCorrupts_HaveEnoughFund_AbnormalTotalBallot() external { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); uint256 period = _validatorSetContract.currentPeriod(); // Reduce number of total ballot @@ -228,22 +107,11 @@ contract Add_Unit_Concrete_Test is emit BridgeRewardScattered(period, operators[i], _rewardPerPeriod / operators.length); } - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); } - function test_execSyncReward_ShareEqually_WhenNoVote() external { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); + function test_settleReward_ShareEqually_WhenNoVote() external { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); uint256 period = _validatorSetContract.currentPeriod(); ballots[0] = 0; @@ -258,23 +126,12 @@ contract Add_Unit_Concrete_Test is emit BridgeRewardScattered(period, operators[i], _rewardPerPeriod / operators.length); } - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); assertEq(_bridgeReward.getLatestRewardedPeriod(), period); } - function test_execSyncReward_SharePropotionally() public { - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); + function test_settleReward_SharePropotionally() public { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); uint256 period = _validatorSetContract.currentPeriod(); for (uint i; i < operators.length; i++) { @@ -282,54 +139,7 @@ contract Add_Unit_Concrete_Test is emit BridgeRewardScattered(period, operators[i], (_rewardPerPeriod * ballots[i]) / totalBallot); } - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); assertEq(_bridgeReward.getLatestRewardedPeriod(), period); } - - function test_RevertWhen_SharePropotionally_ThenShareAgain() external { - test_execSyncReward_SharePropotionally(); - - ( - address[] memory operators, - uint256[] memory ballots, - uint256 totalBallot, - uint256 totalVote - ) = _generateInput_execSyncReward(); - uint256 period = _validatorSetContract.currentPeriod(); - vm.expectRevert(abi.encodeWithSelector(ErrInvalidArguments.selector, IBridgeReward.execSyncReward.selector)); - _bridgeReward.execSyncReward({ - operators: operators, - ballots: ballots, - totalBallot: totalBallot, - totalVote: totalVote, - period: period - }); - } - - function _generateInput_execSyncReward() - internal - pure - returns (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) - { - operators = new address[](4); - operators[0] = address(0x10000); - operators[1] = address(0x10001); - operators[2] = address(0x10002); - operators[3] = address(0x10003); - - ballots = new uint256[](4); - ballots[0] = 10; - ballots[1] = 20; - ballots[2] = 30; - ballots[3] = 40; - - totalBallot = 100; - totalVote = 40; - } } diff --git a/test/bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol b/test/bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol new file mode 100644 index 00000000..02a4548f --- /dev/null +++ b/test/bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol @@ -0,0 +1,125 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity >=0.8.17 <0.9.0; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; + +import "@ronin/contracts/utils/CommonErrors.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeReward } from "@ronin/contracts/interfaces/bridge/IBridgeReward.sol"; +import { IBridgeRewardEvents } from "@ronin/contracts/interfaces/bridge/events/IBridgeRewardEvents.sol"; +import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; +import { BridgeTrackingHelper } from "@ronin/contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; + +import { BridgeReward_Unit_Concrete_Test } from "./BridgeReward.t.sol"; + +contract ExecSyncRewardAuto_Unit_Concrete_Test is + BridgeReward_Unit_Concrete_Test, + IBridgeRewardEvents, + BridgeTrackingHelper // Need to inherits this to access event +{ + function setUp() public virtual override { + BridgeReward_Unit_Concrete_Test.setUp(); + vm.startPrank({ msgSender: address(_bridgeTracking) }); + } + + function test_RevertWhen_NotCalledByBridgeTracking() external { + uint256 period = _validatorSetContract.currentPeriod() + 1; + + changePrank(_users.alice); + vm.expectRevert( + abi.encodeWithSelector(ErrUnexpectedInternalCall.selector, IBridgeReward.execSyncRewardAuto.selector, ContractType.BRIDGE_TRACKING, _users.alice) + ); + _bridgeReward.execSyncRewardAuto({ currentPeriod: period }); + } + + function test_syncRewardAuto_1Period_ShareProportionally() public { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); + uint256 nowPd = _validatorSetContract.currentPeriod(); + uint256 settlePd = nowPd - 1; + + _bridgeManager.cheat_setOperators(operators); + _bridgeTracking.cheat_setPeriodTracking(settlePd, operators, ballots, totalVote); + _bridgeSlash.cheat_setSlash(operators, new uint256[](operators.length)); + + for (uint i; i < operators.length; i++) { + vm.expectEmit({ emitter: address(_bridgeReward) }); + emit BridgeRewardScattered(settlePd, operators[i], (_rewardPerPeriod * ballots[i]) / totalBallot); + } + + _bridgeReward.execSyncRewardAuto({ currentPeriod: nowPd }); + assertEq(_bridgeReward.getLatestRewardedPeriod(), settlePd); + } + + function test_syncRewardAuto_3Period_ShareProportionally() public { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); + uint256 pdGap = 3; + uint256 pdCount = pdGap; + + uint256 period = _validatorSetContract.currentPeriod(); + uint256 nowPd = period + pdCount - 1; + uint256 settlePd = period - 1; + _validatorSetContract.setCurrentPeriod(nowPd); + + _bridgeManager.cheat_setOperators(operators); + _bridgeSlash.cheat_setSlash(operators, new uint256[](operators.length)); + + for (uint i; i < pdCount; i++) { + _bridgeTracking.cheat_setPeriodTracking(settlePd + i, operators, ballots, totalVote); + } + + for (uint i; i < pdCount; i++) { + for (uint k; k < operators.length; k++) { + vm.expectEmit({ emitter: address(_bridgeReward) }); + emit BridgeRewardScattered(settlePd + i, operators[k], (_rewardPerPeriod * ballots[k]) / totalBallot); + } + } + + _bridgeReward.execSyncRewardAuto({ currentPeriod: nowPd }); + assertEq(_bridgeReward.getLatestRewardedPeriod(), settlePd + pdCount - 1); + } + + function test_syncRewardAuto_MoreThan5Period_ShareProportionally() public { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); + uint256 pdGap = 7; + uint256 pdCount = 5; + + uint256 period = _validatorSetContract.currentPeriod(); + uint256 nowPd = period + pdGap - 1; + uint256 settlePd = period - 1; + _validatorSetContract.setCurrentPeriod(nowPd); + + _bridgeManager.cheat_setOperators(operators); + _bridgeSlash.cheat_setSlash(operators, new uint256[](operators.length)); + + for (uint i; i < pdGap; i++) { + _bridgeTracking.cheat_setPeriodTracking(settlePd + i, operators, ballots, totalVote); + } + + // Settle reward for first 5 periods + for (uint i = 0; i < pdCount; i++) { + for (uint k; k < operators.length; k++) { + vm.expectEmit({ emitter: address(_bridgeReward) }); + emit BridgeRewardScattered(settlePd + i, operators[k], (_rewardPerPeriod * ballots[k]) / totalBallot); + } + } + + _bridgeReward.execSyncRewardAuto({ currentPeriod: nowPd }); + settlePd = settlePd + pdCount - 1; + assertEq(_bridgeReward.getLatestRewardedPeriod(), settlePd); + + // Settle reward for the remaining periods + pdGap -= pdCount; + pdCount = pdGap; + settlePd += 1; + for (uint i; i < pdCount; i++) { + for (uint k; k < operators.length; k++) { + vm.expectEmit({ emitter: address(_bridgeReward) }); + emit BridgeRewardScattered(settlePd + i, operators[k], (_rewardPerPeriod * ballots[k]) / totalBallot); + } + } + + _bridgeReward.execSyncRewardAuto({ currentPeriod: nowPd }); + assertEq(_bridgeReward.getLatestRewardedPeriod(), nowPd - 1); + } +} diff --git a/test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol b/test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol new file mode 100644 index 00000000..7ead6e3c --- /dev/null +++ b/test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity >=0.8.17 <0.9.0; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; + +import "@ronin/contracts/utils/CommonErrors.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeReward } from "@ronin/contracts/interfaces/bridge/IBridgeReward.sol"; +import { IBridgeRewardEvents } from "@ronin/contracts/interfaces/bridge/events/IBridgeRewardEvents.sol"; +import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; +import { BridgeTrackingHelper } from "@ronin/contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; +import { MockBridgeManager } from "@ronin/test/mocks/MockBridgeManager.sol"; + +import { BridgeReward_Unit_Concrete_Test } from "./BridgeReward.t.sol"; + +contract SyncRewardManual_Unit_Concrete_Test is + BridgeReward_Unit_Concrete_Test, + IBridgeRewardEvents, + BridgeTrackingHelper // Need to inherits this to access event +{ + function setUp() public virtual override { + BridgeReward_Unit_Concrete_Test.setUp(); + MockBridgeManager(address(_bridgeManager)).addOperator({ governor: _governor, operator: _operator, weight: 100 }); + vm.startPrank({ msgSender: address(_operator) }); + } + + function test_RevertWhen_NotCalledByBridgeOperator() external { + vm.stopPrank(); + vm.startPrank(_users.alice); + vm.expectRevert(abi.encodeWithSelector(ErrUnauthorizedCall.selector, IBridgeReward.syncRewardManual.selector)); + _bridgeReward.syncRewardManual({ periodCount: 1 }); + } + + function test_RevertWhen_PeriodTooFar() public { + uint256 currPd = _validatorSetContract.currentPeriod(); + uint256 lastRewardPd = currPd - 2; + + vm.expectRevert(abi.encodeWithSelector(ErrPeriodNotHappen.selector, currPd, lastRewardPd, 2)); + _bridgeReward.syncRewardManual({ periodCount: 2 }); + } + + function test_syncRewardManual_ShareProportionally() public { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); + uint256 nowPd = _validatorSetContract.currentPeriod(); + uint256 settlePd = nowPd - 1; + + _bridgeManager.cheat_setOperators(operators); + _bridgeTracking.cheat_setPeriodTracking(settlePd, operators, ballots, totalVote); + _bridgeSlash.cheat_setSlash(operators, new uint256[](operators.length)); + + for (uint i; i < operators.length; i++) { + vm.expectEmit({ emitter: address(_bridgeReward) }); + emit BridgeRewardScattered(settlePd, operators[i], (_rewardPerPeriod * ballots[i]) / totalBallot); + } + + _bridgeReward.syncRewardManual({ periodCount: 1 }); + assertEq(_bridgeReward.getLatestRewardedPeriod(), settlePd); + } +} diff --git a/test/harness/BridgeRewardHarness.sol b/test/harness/BridgeRewardHarness.sol new file mode 100644 index 00000000..034304fd --- /dev/null +++ b/test/harness/BridgeRewardHarness.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.23; + +import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; + +contract BridgeRewardHarness is BridgeReward { + function exposed_syncRewardBatch(uint256 currPd, uint256 pdCount) external { + _syncRewardBatch(currPd, pdCount); + } + + function exposed_assertPeriod(uint256 currPd, uint256 pdCount, uint256 lastRewardPd) external pure { + _assertPeriod(currPd, pdCount, lastRewardPd); + } + + function exposed_settleReward(address[] calldata operators, uint256[] calldata ballots, uint256 totalBallot, uint256 totalVote, uint256 period) external { + _settleReward(operators, ballots, totalBallot, totalVote, period); + } +} diff --git a/test/mocks/MockBridgeManager.sol b/test/mocks/MockBridgeManager.sol index 8ff151d7..dfb00a31 100644 --- a/test/mocks/MockBridgeManager.sol +++ b/test/mocks/MockBridgeManager.sol @@ -4,47 +4,81 @@ pragma solidity >=0.8.17 <0.9.0; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; contract MockBridgeManager is IBridgeManager { - function DOMAIN_SEPARATOR() external view returns (bytes32) {} + mapping(address => bool) private _governors; + mapping(address => bool) private _operators; + mapping(address => uint96) private _weights; + address[] private _operatorList; - function addBridgeOperators( - uint96[] calldata voteWeights, - address[] calldata governors, - address[] calldata bridgeOperators - ) external returns (bool[] memory addeds) {} + function DOMAIN_SEPARATOR() external view returns (bytes32) { } - function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_) {} + function cheat_setOperators(address[] calldata operators) external { + for (uint i; i < _operatorList.length; i++) { + address iOperator = _operatorList[i]; + delete _operators[iOperator]; + delete _governors[iOperator]; + delete _weights[iOperator]; + } + delete _operatorList; - function getOperatorOf(address governor) external view returns (address operator) {} + for (uint i; i < operators.length; i++) { + address iOperator = operators[i]; + _operatorList.push(iOperator); + _operators[iOperator] = true; + _governors[iOperator] = true; + _weights[iOperator] = 100; + } + } - function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {} + function addBridgeOperators(uint96[] calldata weights, address[] calldata governors, address[] calldata operators) external returns (bool[] memory addeds) { + for (uint i; i < weights.length; i++) { + _governors[governors[i]] = true; + _operators[operators[i]] = true; + _weights[governors[i]] = weights[i]; + _weights[operators[i]] = weights[i]; + addeds[i] = true; + } + } - function getBridgeOperators() external view returns (address[] memory) {} + function addOperator(uint96 weight, address governor, address operator) external { + _governors[governor] = true; + _operators[operator] = true; + _weights[governor] = weight; + _weights[operator] = weight; + } - function getFullBridgeOperatorInfos() - external - view - returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) - {} + function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_) { } - function getGovernorWeight(address governor) external view returns (uint96) {} + function getOperatorOf(address governor) external view returns (address operator) { } - function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {} + function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) { } - function getGovernors() external view returns (address[] memory) {} + function getBridgeOperators() external view returns (address[] memory) { + return _operatorList; + } - function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors) {} + function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) { } - function getGovernorOf(address operator) external view returns (address governor) {} + function getGovernorWeight(address governor) external view returns (uint96) { } - function getTotalWeight() external view returns (uint256) {} + function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) { } - function isBridgeOperator(address addr) external view returns (bool) {} + function getGovernors() external view returns (address[] memory) { } - function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds) {} + function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors) { } - function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum) {} + function getGovernorOf(address operator) external view returns (address governor) { } - function totalBridgeOperator() external view returns (uint256) {} + function getTotalWeight() external view returns (uint256) { } - function updateBridgeOperator(address currOperator, address newOperator) external {} + function isBridgeOperator(address addr) external view returns (bool) { + return _weights[addr] > 0; + } + + function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds) { } + + function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum) { } + + function totalBridgeOperator() external view returns (uint256) { } + + function updateBridgeOperator(address currOperator, address newOperator) external { } } diff --git a/test/mocks/MockBridgeSlash.sol b/test/mocks/MockBridgeSlash.sol index af48554e..462aa12f 100644 --- a/test/mocks/MockBridgeSlash.sol +++ b/test/mocks/MockBridgeSlash.sol @@ -36,7 +36,7 @@ contract MockBridgeSlash is IBridgeSlash { } function cheat_setSlash(address[] calldata operators, uint256[] calldata untilPeriods) external { - require(operators.length != untilPeriods.length, "invalid length"); + require(operators.length == untilPeriods.length, "invalid length"); for (uint i; i < operators.length; i++) { _slashMap[operators[i]] = untilPeriods[i]; diff --git a/test/mocks/MockBridgeTracking.sol b/test/mocks/MockBridgeTracking.sol index 96f7ec4f..e279d409 100644 --- a/test/mocks/MockBridgeTracking.sol +++ b/test/mocks/MockBridgeTracking.sol @@ -13,13 +13,13 @@ contract MockBridgeTracking is IBridgeTracking { // Mapping from period number => period tracking mapping(uint256 => PeriodTracking) _tracks; - function setPeriodTracking( + function cheat_setPeriodTracking( uint256 period, address[] memory operators, uint256[] calldata ballots, uint256 totalVote_ ) external { - require(operators.length != ballots.length, "mismatch length"); + require(operators.length == ballots.length, "mismatch length"); PeriodTracking storage _sTrack = _tracks[period]; _sTrack.operators = operators; _sTrack.totalVote = totalVote_; From fe5b9bb4c0a240960561be9169014819d9759f70 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 12 Mar 2024 16:38:18 +0700 Subject: [PATCH 046/305] test: rename file --- .../{BridgeReward.t.sol => BridgeReward_Unit_Concrete.t.sol} | 0 test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol | 2 +- .../bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol | 2 +- .../execSyncReward.t.sol => settleReward/settleReward.t.sol} | 2 +- .../execSyncReward.tree => settleReward/settleReward.tree} | 0 test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename test/bridge/unit/concrete/bridge-reward/{BridgeReward.t.sol => BridgeReward_Unit_Concrete.t.sol} (100%) rename test/bridge/unit/concrete/bridge-reward/{execSyncReward/execSyncReward.t.sol => settleReward/settleReward.t.sol} (99%) rename test/bridge/unit/concrete/bridge-reward/{execSyncReward/execSyncReward.tree => settleReward/settleReward.tree} (100%) diff --git a/test/bridge/unit/concrete/bridge-reward/BridgeReward.t.sol b/test/bridge/unit/concrete/bridge-reward/BridgeReward_Unit_Concrete.t.sol similarity index 100% rename from test/bridge/unit/concrete/bridge-reward/BridgeReward.t.sol rename to test/bridge/unit/concrete/bridge-reward/BridgeReward_Unit_Concrete.t.sol diff --git a/test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol b/test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol index f9edb682..49b53ca4 100644 --- a/test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol +++ b/test/bridge/unit/concrete/bridge-reward/assertPeriod.t.sol @@ -11,7 +11,7 @@ import { IBridgeRewardEvents } from "@ronin/contracts/interfaces/bridge/events/I import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { BridgeTrackingHelper } from "@ronin/contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; -import "./BridgeReward.t.sol"; +import "./BridgeReward_Unit_Concrete.t.sol"; contract AssertPeriod_Unit_Concrete_Test is BridgeReward_Unit_Concrete_Test, diff --git a/test/bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol b/test/bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol index 02a4548f..a11acc7c 100644 --- a/test/bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol +++ b/test/bridge/unit/concrete/bridge-reward/execSyncRewardAuto.t.sol @@ -11,7 +11,7 @@ import { IBridgeRewardEvents } from "@ronin/contracts/interfaces/bridge/events/I import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { BridgeTrackingHelper } from "@ronin/contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; -import { BridgeReward_Unit_Concrete_Test } from "./BridgeReward.t.sol"; +import { BridgeReward_Unit_Concrete_Test } from "./BridgeReward_Unit_Concrete.t.sol"; contract ExecSyncRewardAuto_Unit_Concrete_Test is BridgeReward_Unit_Concrete_Test, diff --git a/test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.t.sol b/test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.t.sol similarity index 99% rename from test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.t.sol rename to test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.t.sol index 2464b4af..cc5feddc 100644 --- a/test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.t.sol +++ b/test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.t.sol @@ -11,7 +11,7 @@ import { IBridgeRewardEvents } from "@ronin/contracts/interfaces/bridge/events/I import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { BridgeTrackingHelper } from "@ronin/contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; -import "../BridgeReward.t.sol"; +import "../BridgeReward_Unit_Concrete.t.sol"; contract SettleReward_Unit_Concrete_Test is BridgeReward_Unit_Concrete_Test, diff --git a/test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.tree b/test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.tree similarity index 100% rename from test/bridge/unit/concrete/bridge-reward/execSyncReward/execSyncReward.tree rename to test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.tree diff --git a/test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol b/test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol index 7ead6e3c..cb5479f7 100644 --- a/test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol +++ b/test/bridge/unit/concrete/bridge-reward/syncRewardManual.t.sol @@ -12,7 +12,7 @@ import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { BridgeTrackingHelper } from "@ronin/contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol"; import { MockBridgeManager } from "@ronin/test/mocks/MockBridgeManager.sol"; -import { BridgeReward_Unit_Concrete_Test } from "./BridgeReward.t.sol"; +import { BridgeReward_Unit_Concrete_Test } from "./BridgeReward_Unit_Concrete.t.sol"; contract SyncRewardManual_Unit_Concrete_Test is BridgeReward_Unit_Concrete_Test, From 7af74901648553fa77cf85309eb400add86e1053 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 12 Mar 2024 16:49:01 +0700 Subject: [PATCH 047/305] fix(BridgeReward): fix specs --- src/ronin/gateway/BridgeReward.sol | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index 52d42093..9798bcc0 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -56,7 +56,12 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT /** * @dev Helper for running upgrade script, required to only revoked once by the DPoS's governance admin. - * The following must be assured after initializing REP2: `{BridgeTracking}._lastSyncPeriod` == `{BridgeReward}.latestRewardedPeriod` == `currentPeriod()` + * The following must be assured after initializing REP2: + * ``` + * {BridgeTracking}._lastSyncPeriod + * == {BridgeReward}.latestRewardedPeriod + * == {RoninValidatorSet}.currentPeriod() + * ``` */ function initializeREP2() external onlyContract(ContractType.GOVERNANCE_ADMIN) { require(getLatestRewardedPeriod() == type(uint256).max, "already init rep 2"); @@ -64,6 +69,14 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT _setContract(ContractType.GOVERNANCE_ADMIN, address(0)); } + /** + @dev The following must be assured after initializing V2: + * ``` + * {BridgeTracking}._lastSyncPeriod + * == {RoninValidatorSet}.currentPeriod() + * == {BridgeReward}.latestRewardedPeriod + 1 + * ``` + */ function initializeV2() external reinitializer(2) { $_MAX_REWARDING_PERIOD_COUNT.store(5); $_LATEST_REWARDED_PERIOD.store(getLatestRewardedPeriod() - 1); @@ -94,7 +107,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT } /** - * @dev Sync bridge reward for multiple periods, always assert `latestRewardedPeriod + periodCount <= currentPeriod`. + * @dev Sync bridge reward for multiple periods, always assert `latestRewardedPeriod + periodCount < currentPeriod`. * @param pdCount Number of periods to settle reward. Leave this as 0 to auto calculate. */ function _syncRewardBatch(uint256 currPd, uint256 pdCount) internal { From 5078d3ecf92bfa4315dfe32720715eb878dbc59b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 11:52:25 +0700 Subject: [PATCH 048/305] fix(Token): nit prettier Token lib --- src/libraries/Token.sol | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/libraries/Token.sol b/src/libraries/Token.sol index 49e2fa77..c8cb6b57 100644 --- a/src/libraries/Token.sol +++ b/src/libraries/Token.sol @@ -71,8 +71,10 @@ library Token { */ function validate(Info memory _info) internal pure { if ( - !((_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) || - (_info.erc == Standard.ERC721 && _info.quantity == 0)) + !( + (_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) + || (_info.erc == Standard.ERC721 && _info.quantity == 0) + ) ) revert ErrInvalidInfo(); } @@ -91,8 +93,10 @@ library Token { _success = _success && (_data.length == 0 || abi.decode(_data, (bool))); } else if (_info.erc == Standard.ERC721) { // bytes4(keccak256("transferFrom(address,address,uint256)")) - (_success, ) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id)); - } else revert ErrUnsupportedStandard(); + (_success,) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id)); + } else { + revert ErrUnsupportedStandard(); + } if (!_success) revert ErrTokenCouldNotTransferFrom(_info, _from, _to, _token); } @@ -101,7 +105,7 @@ library Token { * @dev Transfers ERC721 token and returns the result. */ function tryTransferERC721(address _token, address _to, uint256 _id) internal returns (bool _success) { - (_success, ) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id)); + (_success,) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id)); } /** @@ -122,7 +126,9 @@ library Token { _success = tryTransferERC20(_token, _to, _info.quantity); } else if (_info.erc == Standard.ERC721) { _success = tryTransferERC721(_token, _to, _info.id); - } else revert ErrUnsupportedStandard(); + } else { + revert ErrUnsupportedStandard(); + } if (!_success) revert ErrTokenCouldNotTransfer(_info, _to, _token); } @@ -133,12 +139,9 @@ library Token { * @notice Prioritizes transfer native token if the token is wrapped. * */ - function handleAssetTransfer( - Info memory _info, - address payable _to, - address _token, - IWETH _wrappedNativeToken - ) internal { + function handleAssetTransfer(Info memory _info, address payable _to, address _token, IWETH _wrappedNativeToken) + internal + { bool _success; if (_token == address(_wrappedNativeToken)) { // Try sending the native token before transferring the wrapped token @@ -151,7 +154,7 @@ library Token { if (_balance < _info.quantity) { // bytes4(keccak256("mint(address,uint256)")) - (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance)); + (_success,) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance)); if (!_success) revert ErrERC20MintingFailed(); } @@ -159,10 +162,12 @@ library Token { } else if (_info.erc == Token.Standard.ERC721) { if (!tryTransferERC721(_token, _to, _info.id)) { // bytes4(keccak256("mint(address,uint256)")) - (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id)); + (_success,) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id)); if (!_success) revert ErrERC721MintingFailed(); } - } else revert ErrUnsupportedStandard(); + } else { + revert ErrUnsupportedStandard(); + } } struct Owner { From cb1706fc99eab7cbcf871974c4e61466ec98e68d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 12:08:12 +0700 Subject: [PATCH 049/305] fix(Token): rename `_` for internal lib --- src/libraries/Token.sol | 98 ++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/src/libraries/Token.sol b/src/libraries/Token.sol index c8cb6b57..5a0c4b33 100644 --- a/src/libraries/Token.sol +++ b/src/libraries/Token.sol @@ -54,14 +54,14 @@ library Token { /** * @dev Returns token info struct hash. */ - function hash(Info memory _info) internal pure returns (bytes32 digest) { + function hash(Info memory self) internal pure returns (bytes32 digest) { // keccak256(abi.encode(INFO_TYPE_HASH, _info.erc, _info.id, _info.quantity)) assembly { let ptr := mload(0x40) mstore(ptr, INFO_TYPE_HASH) - mstore(add(ptr, 0x20), mload(_info)) // _info.erc - mstore(add(ptr, 0x40), mload(add(_info, 0x20))) // _info.id - mstore(add(ptr, 0x60), mload(add(_info, 0x40))) // _info.quantity + mstore(add(ptr, 0x20), mload(self)) // _info.erc + mstore(add(ptr, 0x40), mload(add(self, 0x20))) // _info.id + mstore(add(ptr, 0x60), mload(add(self, 0x40))) // _info.quantity digest := keccak256(ptr, 0x80) } } @@ -69,11 +69,11 @@ library Token { /** * @dev Validates the token info. */ - function validate(Info memory _info) internal pure { + function validate(Info memory self) internal pure { if ( !( - (_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) - || (_info.erc == Standard.ERC721 && _info.quantity == 0) + (self.erc == Standard.ERC20 && self.quantity > 0 && self.id == 0) + || (self.erc == Standard.ERC721 && self.quantity == 0) ) ) revert ErrInvalidInfo(); } @@ -85,52 +85,52 @@ library Token { * - The `_from` address must approve for the contract using this library. * */ - function transferFrom(Info memory _info, address _from, address _to, address _token) internal { - bool _success; - bytes memory _data; - if (_info.erc == Standard.ERC20) { - (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, _from, _to, _info.quantity)); - _success = _success && (_data.length == 0 || abi.decode(_data, (bool))); - } else if (_info.erc == Standard.ERC721) { + function transferFrom(Info memory self, address from, address to, address token) internal { + bool success; + bytes memory data; + if (self.erc == Standard.ERC20) { + (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, self.quantity)); + success = success && (data.length == 0 || abi.decode(data, (bool))); + } else if (self.erc == Standard.ERC721) { // bytes4(keccak256("transferFrom(address,address,uint256)")) - (_success,) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id)); + (success,) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, self.id)); } else { revert ErrUnsupportedStandard(); } - if (!_success) revert ErrTokenCouldNotTransferFrom(_info, _from, _to, _token); + if (!success) revert ErrTokenCouldNotTransferFrom(self, from, to, token); } /** * @dev Transfers ERC721 token and returns the result. */ - function tryTransferERC721(address _token, address _to, uint256 _id) internal returns (bool _success) { - (_success,) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id)); + function tryTransferERC721(address token, address to, uint256 id) internal returns (bool success) { + (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), to, id)); } /** * @dev Transfers ERC20 token and returns the result. */ - function tryTransferERC20(address _token, address _to, uint256 _quantity) internal returns (bool _success) { - bytes memory _data; - (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transfer.selector, _to, _quantity)); - _success = _success && (_data.length == 0 || abi.decode(_data, (bool))); + function tryTransferERC20(address token, address to, uint256 quantity) internal returns (bool success) { + bytes memory data; + (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity)); + success = success && (data.length == 0 || abi.decode(data, (bool))); } /** * @dev Transfer assets from current address to `_to` address. */ - function transfer(Info memory _info, address _to, address _token) internal { - bool _success; - if (_info.erc == Standard.ERC20) { - _success = tryTransferERC20(_token, _to, _info.quantity); - } else if (_info.erc == Standard.ERC721) { - _success = tryTransferERC721(_token, _to, _info.id); + function transfer(Info memory self, address to, address token) internal { + bool success; + if (self.erc == Standard.ERC20) { + success = tryTransferERC20(token, to, self.quantity); + } else if (self.erc == Standard.ERC721) { + success = tryTransferERC721(token, to, self.id); } else { revert ErrUnsupportedStandard(); } - if (!_success) revert ErrTokenCouldNotTransfer(_info, _to, _token); + if (!success) revert ErrTokenCouldNotTransfer(self, to, token); } /** @@ -139,31 +139,31 @@ library Token { * @notice Prioritizes transfer native token if the token is wrapped. * */ - function handleAssetTransfer(Info memory _info, address payable _to, address _token, IWETH _wrappedNativeToken) + function handleAssetTransfer(Info memory self, address payable to, address token, IWETH wrappedNativeToken) internal { - bool _success; - if (_token == address(_wrappedNativeToken)) { + bool success; + if (token == address(wrappedNativeToken)) { // Try sending the native token before transferring the wrapped token - if (!_to.send(_info.quantity)) { - _wrappedNativeToken.deposit{ value: _info.quantity }(); - transfer(_info, _to, _token); + if (!to.send(self.quantity)) { + wrappedNativeToken.deposit{ value: self.quantity }(); + transfer(self, to, token); } - } else if (_info.erc == Token.Standard.ERC20) { - uint256 _balance = IERC20(_token).balanceOf(address(this)); + } else if (self.erc == Token.Standard.ERC20) { + uint256 _balance = IERC20(token).balanceOf(address(this)); - if (_balance < _info.quantity) { + if (_balance < self.quantity) { // bytes4(keccak256("mint(address,uint256)")) - (_success,) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance)); - if (!_success) revert ErrERC20MintingFailed(); + (success,) = token.call(abi.encodeWithSelector(0x40c10f19, address(this), self.quantity - _balance)); + if (!success) revert ErrERC20MintingFailed(); } - transfer(_info, _to, _token); - } else if (_info.erc == Token.Standard.ERC721) { - if (!tryTransferERC721(_token, _to, _info.id)) { + transfer(self, to, token); + } else if (self.erc == Token.Standard.ERC721) { + if (!tryTransferERC721(token, to, self.id)) { // bytes4(keccak256("mint(address,uint256)")) - (_success,) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id)); - if (!_success) revert ErrERC721MintingFailed(); + (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, self.id)); + if (!success) revert ErrERC721MintingFailed(); } } else { revert ErrUnsupportedStandard(); @@ -182,14 +182,14 @@ library Token { /** * @dev Returns ownership struct hash. */ - function hash(Owner memory _owner) internal pure returns (bytes32 digest) { + function hash(Owner memory owner) internal pure returns (bytes32 digest) { // keccak256(abi.encode(OWNER_TYPE_HASH, _owner.addr, _owner.tokenAddr, _owner.chainId)) assembly { let ptr := mload(0x40) mstore(ptr, OWNER_TYPE_HASH) - mstore(add(ptr, 0x20), mload(_owner)) // _owner.addr - mstore(add(ptr, 0x40), mload(add(_owner, 0x20))) // _owner.tokenAddr - mstore(add(ptr, 0x60), mload(add(_owner, 0x40))) // _owner.chainId + mstore(add(ptr, 0x20), mload(owner)) // _owner.addr + mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // _owner.tokenAddr + mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // _owner.chainId digest := keccak256(ptr, 0x80) } } From 079fa6171f13cc9d46e8a2bb7234683eb901fdf3 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 12:17:19 +0700 Subject: [PATCH 050/305] fix(Owner): move TokenOwner to a separate lib --- src/libraries/LibTokenOwner.sol | 28 +++++++++++++++++++ src/libraries/Token.sol | 24 ---------------- src/libraries/Transfer.sol | 13 +++++---- .../updateOperator.RoninBridgeManager.t.sol | 5 ++-- .../emergencyAction.PauseEnforcer.t.sol | 9 +++--- .../depositVote.RoninGatewayV3.t.sol | 5 ++-- 6 files changed, 47 insertions(+), 37 deletions(-) create mode 100644 src/libraries/LibTokenOwner.sol diff --git a/src/libraries/LibTokenOwner.sol b/src/libraries/LibTokenOwner.sol new file mode 100644 index 00000000..7f47b9b9 --- /dev/null +++ b/src/libraries/LibTokenOwner.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +struct TokenOwner { + address addr; + address tokenAddr; + uint256 chainId; +} + +library LibTokenOwner { + // keccak256("TokenOwner(address addr,address tokenAddr,uint256 chainId)"); + bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764; + + /** + * @dev Returns ownership struct hash. + */ + function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) { + // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId)) + assembly { + let ptr := mload(0x40) + mstore(ptr, OWNER_TYPE_HASH) + mstore(add(ptr, 0x20), mload(owner)) // owner.addr + mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr + mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId + digest := keccak256(ptr, 0x80) + } + } +} diff --git a/src/libraries/Token.sol b/src/libraries/Token.sol index 5a0c4b33..7f1a379b 100644 --- a/src/libraries/Token.sol +++ b/src/libraries/Token.sol @@ -169,28 +169,4 @@ library Token { revert ErrUnsupportedStandard(); } } - - struct Owner { - address addr; - address tokenAddr; - uint256 chainId; - } - - // keccak256("TokenOwner(address addr,address tokenAddr,uint256 chainId)"); - bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764; - - /** - * @dev Returns ownership struct hash. - */ - function hash(Owner memory owner) internal pure returns (bytes32 digest) { - // keccak256(abi.encode(OWNER_TYPE_HASH, _owner.addr, _owner.tokenAddr, _owner.chainId)) - assembly { - let ptr := mload(0x40) - mstore(ptr, OWNER_TYPE_HASH) - mstore(add(ptr, 0x20), mload(owner)) // _owner.addr - mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // _owner.tokenAddr - mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // _owner.chainId - digest := keccak256(ptr, 0x80) - } - } } diff --git a/src/libraries/Transfer.sol b/src/libraries/Transfer.sol index 5c77c9d6..8dcaea36 100644 --- a/src/libraries/Transfer.sol +++ b/src/libraries/Transfer.sol @@ -4,9 +4,12 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./Token.sol"; +import "./LibTokenOwner.sol"; library Transfer { using ECDSA for bytes32; + using LibTokenOwner for TokenOwner; + using Token for Token.Info; enum Kind { Deposit, @@ -68,8 +71,8 @@ library Transfer { struct Receipt { uint256 id; Kind kind; - Token.Owner mainchain; - Token.Owner ronin; + TokenOwner mainchain; + TokenOwner ronin; Token.Info info; } @@ -80,9 +83,9 @@ library Transfer { * @dev Returns token info struct hash. */ function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) { - bytes32 hashedReceiptMainchain = Token.hash(_receipt.mainchain); - bytes32 hashedReceiptRonin = Token.hash(_receipt.ronin); - bytes32 hashedReceiptInfo = Token.hash(_receipt.info); + bytes32 hashedReceiptMainchain = _receipt.mainchain.hash(); + bytes32 hashedReceiptRonin = _receipt.ronin.hash(); + bytes32 hashedReceiptInfo = _receipt.info.hash(); /* * return diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index 4b74f5f6..f24f50c4 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.19; import { console2 as console } from "forge-std/console2.sol"; import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenOwner, TokenOwner } from "@ronin/contracts/libraries/LibTokenOwner.sol"; import "../../BaseIntegration.t.sol"; contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { @@ -23,8 +24,8 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { Transfer.Receipt memory sampleReceipt = Transfer.Receipt({ id: 0, kind: Transfer.Kind.Deposit, - ronin: Token.Owner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), - mainchain: Token.Owner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), + ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), + mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) }); diff --git a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol index fec87e77..46fce001 100644 --- a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol +++ b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.19; import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; import { GatewayV3 } from "@ronin/contracts/extensions/GatewayV3.sol"; +import { LibTokenOwner, TokenOwner } from "@ronin/contracts/libraries/LibTokenOwner.sol"; import "../BaseIntegration.t.sol"; contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { @@ -27,8 +28,8 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { Transfer.Receipt memory receipt = Transfer.Receipt({ id: 0, kind: Transfer.Kind.Deposit, - ronin: Token.Owner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), - mainchain: Token.Owner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), + ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), + mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) }); @@ -64,8 +65,8 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { Transfer.Receipt memory receipt = Transfer.Receipt({ id: 0, kind: Transfer.Kind.Deposit, - ronin: Token.Owner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), - mainchain: Token.Owner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), + ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), + mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) }); diff --git a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol index 055a1050..6daaa4c2 100644 --- a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol +++ b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol @@ -8,6 +8,7 @@ import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; import { IsolatedGovernance } from "@ronin/contracts/libraries/IsolatedGovernance.sol"; import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; import { MockRoninGatewayV3Extended } from "@ronin/contracts/mocks/ronin/MockRoninGatewayV3Extended.sol"; +import { LibTokenOwner, TokenOwner } from "@ronin/contracts/libraries/LibTokenOwner.sol"; import "../BaseIntegration.t.sol"; contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { @@ -24,8 +25,8 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { Transfer.Receipt memory receipt = Transfer.Receipt({ id: 0, kind: Transfer.Kind.Deposit, - ronin: Token.Owner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), - mainchain: Token.Owner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), + ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), + mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) }); From c7751f5a991cd9d23c76663df9e758c7cc59d34c Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 12:33:10 +0700 Subject: [PATCH 051/305] fix(Info): move to LibTokenInfo --- lib/foundry-deployment-kit | 2 +- .../20231218-maptoken-mainchain.s.sol | 8 +-- .../20231218-maptoken-roninchain.s.sol | 8 +-- .../20240115-maptoken-mainchain.s.sol | 14 ++--- .../20240115-maptoken-roninchain.s.sol | 10 ++-- .../20240131-maptoken-pixel-mainchain.s.sol | 12 ++-- .../20240131-maptoken-pixel-roninchain.s.sol | 10 ++-- .../20240206-maptoken-banana-mainchain.s.sol | 16 ++--- .../20240206-maptoken-banana-roninchain.s.sol | 14 ++--- script/Migration.s.sol | 2 +- script/interfaces/ISharedArgument.sol | 6 +- src/extensions/MinimumWithdrawal.sol | 2 +- src/interfaces/IMainchainGatewayV3.sol | 6 +- src/interfaces/IRoninGatewayV3.sol | 4 +- .../consumers/MappedTokenConsumer.sol | 4 +- src/libraries/{Token.sol => LibTokenInfo.sol} | 58 +++++++++---------- src/libraries/Transfer.sol | 8 +-- src/mainchain/MainchainGatewayV3.sol | 22 +++---- src/ronin/gateway/RoninGatewayV3.sol | 8 +-- test/bridge/integration/BaseIntegration.t.sol | 10 ++-- .../updateOperator.RoninBridgeManager.t.sol | 4 +- ...requestDepositFor.MainchainGatewayV3.t.sol | 6 +- .../submitWithdrawal.MainchainGatewayV3.t.sol | 8 +-- .../emergencyAction.PauseEnforcer.t.sol | 4 +- .../depositVote.RoninGatewayV3.t.sol | 4 +- test/helpers/ProposalUtils.t.sol | 2 +- 26 files changed, 126 insertions(+), 126 deletions(-) rename src/libraries/{Token.sol => LibTokenInfo.sol} (78%) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index 3aa1ca23..8c728424 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit 3aa1ca23adaa55a2e04818b0dced14947e4e5c28 +Subproject commit 8c728424858f8c8358f2e0f9374a6ea581f46486 diff --git a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol index e7a72225..18e251ff 100644 --- a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol @@ -7,7 +7,7 @@ import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; import { BridgeMigration } from "../BridgeMigration.sol"; import { Network } from "../utils/Network.sol"; @@ -41,8 +41,8 @@ contract Migration__20231215_MapTokenMainchain is BridgeMigration { mainchainTokens[0] = _aggMainchainToken; address[] memory roninTokens = new address[](1); roninTokens[0] = _aggRoninToken; - Token.Standard[] memory standards = new Token.Standard[](1); - standards[0] = Token.Standard.ERC20; + TokenStandard[] memory standards = new TokenStandard[](1); + standards[0] = TokenStandard.ERC20; uint256[][4] memory thresholds; // highTierThreshold thresholds[0] = new uint256[](1); @@ -60,7 +60,7 @@ contract Migration__20231215_MapTokenMainchain is BridgeMigration { // function mapTokensAndThresholds( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, - // Token.Standard[] calldata _standards, + // TokenStandard[] calldata _standards, // uint256[][4] calldata _thresholds // ) diff --git a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol index 5621946c..f0330137 100644 --- a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol @@ -6,7 +6,7 @@ import { StdStyle } from "forge-std/StdStyle.sol"; import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; import { BridgeMigration } from "../BridgeMigration.sol"; import { Network } from "../utils/Network.sol"; @@ -32,14 +32,14 @@ contract Migration__20231215_MapTokenRoninchain is BridgeMigration { mainchainTokens[0] = _aggMainchainToken; uint256[] memory chainIds = new uint256[](1); chainIds[0] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); - Token.Standard[] memory standards = new Token.Standard[](1); - standards[0] = Token.Standard.ERC20; + TokenStandard[] memory standards = new TokenStandard[](1); + standards[0] = TokenStandard.ERC20; // function mapTokens( // address[] calldata _roninTokens, // address[] calldata _mainchainTokens, // uint256[] calldata chainIds, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index 649d8e6a..8d97b4f3 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -8,7 +8,7 @@ import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeMa import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; import { BridgeMigration } from "../BridgeMigration.sol"; import { Network } from "../utils/Network.sol"; @@ -56,16 +56,16 @@ contract Migration__MapTokenMainchain is BridgeMigration { function _mapFarmlandToken() internal pure returns (bytes memory) { address[] memory mainchainTokens = new address[](1); address[] memory roninTokens = new address[](1); - Token.Standard[] memory standards = new Token.Standard[](1); + TokenStandard[] memory standards = new TokenStandard[](1); mainchainTokens[0] = _farmlandMainchainToken; roninTokens[0] = _farmlandRoninToken; - standards[0] = Token.Standard.ERC721; + standards[0] = TokenStandard.ERC721; // function mapTokens( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, ( @@ -79,7 +79,7 @@ contract Migration__MapTokenMainchain is BridgeMigration { function _mapPixelToken() internal pure returns (bytes memory) { address[] memory mainchainTokens = new address[](1); address[] memory roninTokens = new address[](1); - Token.Standard[] memory standards = new Token.Standard[](1); + TokenStandard[] memory standards = new TokenStandard[](1); uint256[][4] memory thresholds; // highTierThreshold @@ -97,12 +97,12 @@ contract Migration__MapTokenMainchain is BridgeMigration { mainchainTokens[0] = _farmlandMainchainToken; roninTokens[0] = _farmlandRoninToken; - standards[0] = Token.Standard.ERC20; + standards[0] = TokenStandard.ERC20; // function mapTokensAndThresholds( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, - // Token.Standard[] calldata _standards, + // TokenStandard[] calldata _standards, // uint256[][4] calldata _thresholds // ) diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index 3b7d548b..ad5e1bd4 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -7,7 +7,7 @@ import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; import { BridgeMigration } from "../BridgeMigration.sol"; import { Network } from "../utils/Network.sol"; @@ -40,23 +40,23 @@ contract Migration__MapTokenRoninchain is BridgeMigration { address[] memory mainchainTokens = new address[](2); address[] memory roninTokens = new address[](2); uint256[] memory chainIds = new uint256[](2); - Token.Standard[] memory standards = new Token.Standard[](2); + TokenStandard[] memory standards = new TokenStandard[](2); mainchainTokens[0] = _farmlandMainchainToken; roninTokens[0] = _farmlandRoninToken; chainIds[0] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); - standards[0] = Token.Standard.ERC721; + standards[0] = TokenStandard.ERC721; mainchainTokens[1] = _pixelMainchainToken; roninTokens[1] = _pixelRoninToken; chainIds[1] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); - standards[1] = Token.Standard.ERC20; + standards[1] = TokenStandard.ERC20; // function mapTokens( // address[] calldata _roninTokens, // address[] calldata _mainchainTokens, // uint256[] calldata chainIds, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, ( diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol index 1101126e..afa5e744 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol @@ -7,7 +7,7 @@ import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; import { BridgeMigration } from "../BridgeMigration.sol"; import { Network } from "../utils/Network.sol"; @@ -39,7 +39,7 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio function run() public { address[] memory mainchainTokens = new address[](1); address[] memory roninTokens = new address[](1); - Token.Standard[] memory standards = new Token.Standard[](1); + TokenStandard[] memory standards = new TokenStandard[](1); uint256[][4] memory thresholds; uint256 expiredTime = block.timestamp + 10 days; @@ -52,7 +52,7 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio mainchainTokens[0] = _pixelMainchainToken; roninTokens[0] = _pixelRoninToken; - standards[0] = Token.Standard.ERC20; + standards[0] = TokenStandard.ERC20; // highTierThreshold thresholds[0] = new uint256[](1); thresholds[0][0] = _highTierThreshold; @@ -69,7 +69,7 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio // function mapTokensAndThresholds( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, - // Token.Standard[] calldata _standards, + // TokenStandard[] calldata _standards, // uint256[][4] calldata _thresholds // ) @@ -91,12 +91,12 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio mainchainTokens[0] = _farmlandMainchainToken; roninTokens[0] = _farmlandRoninToken; - standards[0] = Token.Standard.ERC721; + standards[0] = TokenStandard.ERC721; // function mapTokens( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) external; innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, ( diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol index 607a728f..548ee6e3 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol @@ -8,7 +8,7 @@ import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -48,7 +48,7 @@ contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migrati address[] memory roninTokens = new address[](2); address[] memory mainchainTokens = new address[](2); uint256[] memory chainIds = new uint256[](2); - Token.Standard[] memory standards = new Token.Standard[](2); + TokenStandard[] memory standards = new TokenStandard[](2); uint256 expiredTime = block.timestamp + 10 days; address[] memory targets = new address[](4); @@ -61,18 +61,18 @@ contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migrati roninTokens[0] = _pixelRoninToken; mainchainTokens[0] = _pixelMainchainToken; chainIds[0] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); - standards[0] = Token.Standard.ERC20; + standards[0] = TokenStandard.ERC20; roninTokens[1] = _farmlandRoninToken; mainchainTokens[1] = _farmlandMainchainToken; chainIds[1] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); - standards[1] = Token.Standard.ERC721; + standards[1] = TokenStandard.ERC721; // function mapTokens( // address[] calldata _roninTokens, // address[] calldata _mainchainTokens, // uint256[] calldata chainIds, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, ( roninTokens, diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index 4a7da82a..d1d2c8a0 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -7,7 +7,7 @@ import {BaseMigration} from "foundry-deployment-kit/BaseMigration.s.sol"; import {RoninBridgeManager} from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import {IMainchainGatewayV3} from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import {GlobalProposal} from "@ronin/contracts/libraries/GlobalProposal.sol"; -import {Token} from "@ronin/contracts/libraries/Token.sol"; +import {LibTokenInfo, TokenStandard} from "@ronin/contracts/libraries/LibTokenInfo.sol"; import {Contract} from "../utils/Contract.sol"; import {BridgeMigration} from "../BridgeMigration.sol"; import {Network} from "../utils/Network.sol"; @@ -43,7 +43,7 @@ contract Migration__20240206_MapTokenBananaMainchain is function run() public onlyOn(DefaultNetwork.RoninMainnet.key()) { address[] memory mainchainTokens = new address[](1); address[] memory roninTokens = new address[](1); - Token.Standard[] memory standards = new Token.Standard[](1); + TokenStandard[] memory standards = new TokenStandard[](1); uint256[][4] memory thresholds; uint256 expiredTime = block.timestamp + 10 days; @@ -56,7 +56,7 @@ contract Migration__20240206_MapTokenBananaMainchain is mainchainTokens[0] = _bananaMainchainToken; roninTokens[0] = _bananaRoninToken; - standards[0] = Token.Standard.ERC20; + standards[0] = TokenStandard.ERC20; // highTierThreshold thresholds[0] = new uint256[](1); thresholds[0][0] = _highTierThreshold; @@ -73,7 +73,7 @@ contract Migration__20240206_MapTokenBananaMainchain is // function mapTokens( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); @@ -89,12 +89,12 @@ contract Migration__20240206_MapTokenBananaMainchain is mainchainTokens[0] = _genkaiMainchainToken; roninTokens[0] = _genkaiRoninToken; - standards[0] = Token.Standard.ERC721; + standards[0] = TokenStandard.ERC721; // function mapTokens( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) external; innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, (mainchainTokens, roninTokens, standards)); @@ -110,12 +110,12 @@ contract Migration__20240206_MapTokenBananaMainchain is mainchainTokens[0] = _VxMainchainToken; roninTokens[0] = _VxRoninToken; - standards[0] = Token.Standard.ERC721; + standards[0] = TokenStandard.ERC721; // function mapTokens( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) external; innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, (mainchainTokens, roninTokens, standards)); diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index 375fc17b..398640d0 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -9,7 +9,7 @@ import {DefaultNetwork} from "foundry-deployment-kit/utils/DefaultNetwork.sol"; import {RoninBridgeManager} from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import {IRoninGatewayV3} from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import {MinimumWithdrawal} from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; -import {Token} from "@ronin/contracts/libraries/Token.sol"; +import {LibTokenInfo, TokenStandard} from "@ronin/contracts/libraries/LibTokenInfo.sol"; import {Ballot} from "@ronin/contracts/libraries/Ballot.sol"; import {GlobalProposal} from "@ronin/contracts/libraries/GlobalProposal.sol"; import {Proposal} from "@ronin/contracts/libraries/Proposal.sol"; @@ -64,7 +64,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is address[] memory roninTokens = new address[](3); address[] memory mainchainTokens = new address[](3); uint256[] memory chainIds = new uint256[](3); - Token.Standard[] memory standards = new Token.Standard[](3); + TokenStandard[] memory standards = new TokenStandard[](3); uint256 expiredTime = block.timestamp + 10 days; address[] memory targets = new address[](4); @@ -77,23 +77,23 @@ contract Migration__20240206_MapTokenBananaRoninChain is roninTokens[0] = _bananaRoninToken; mainchainTokens[0] = _bananaMainchainToken; chainIds[0] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); - standards[0] = Token.Standard.ERC20; + standards[0] = TokenStandard.ERC20; roninTokens[1] = _VxRoninToken; mainchainTokens[1] = _VxMainchainToken; chainIds[1] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); - standards[1] = Token.Standard.ERC721; + standards[1] = TokenStandard.ERC721; roninTokens[2] = _genkaiRoninToken; mainchainTokens[2] = _genkaiMainchainToken; chainIds[2] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); - standards[2] = Token.Standard.ERC721; + standards[2] = TokenStandard.ERC721; // function mapTokens( // address[] calldata _roninTokens, // address[] calldata _mainchainTokens, // uint256[] calldata chainIds, - // Token.Standard[] calldata _standards + // TokenStandard[] calldata _standards // ) bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); @@ -117,7 +117,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is roninTokensToSetMinThreshold[1] = pixelRoninToken; minThresholds[1] = pixelMinThreshold; - + roninTokensToSetMinThreshold[2] = pixelMainchainToken; minThresholds[2] = 0; diff --git a/script/Migration.s.sol b/script/Migration.s.sol index ecec4fa8..fdd1b1ad 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -9,7 +9,7 @@ import { Network } from "./utils/Network.sol"; import { Utils } from "./utils/Utils.sol"; import { Contract } from "./utils/Contract.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { LibArray } from "./libraries/LibArray.sol"; contract Migration is BaseMigrationV2, Utils { diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index 37971d4d..f8f9f806 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.23; import { IGeneralConfig } from "foundry-deployment-kit/interfaces/IGeneralConfig.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; interface ISharedArgument is IGeneralConfig { struct BridgeManagerParam { @@ -36,7 +36,7 @@ interface ISharedArgument is IGeneralConfig { // thresholds[2]: unlockFeePercentages // thresholds[3]: dailyWithdrawalLimit uint256[][4] thresholds; - Token.Standard[] standards; + TokenStandard[] standards; } struct RoninGatewayV3Param { @@ -52,7 +52,7 @@ interface ISharedArgument is IGeneralConfig { // packedNumbers[0]: chainIds // packedNumbers[1]: minimumThresholds uint256[][2] packedNumbers; - Token.Standard[] standards; + TokenStandard[] standards; } struct BridgeSlashParam { diff --git a/src/extensions/MinimumWithdrawal.sol b/src/extensions/MinimumWithdrawal.sol index fa717926..9b0cc4dd 100644 --- a/src/extensions/MinimumWithdrawal.sol +++ b/src/extensions/MinimumWithdrawal.sol @@ -61,7 +61,7 @@ abstract contract MinimumWithdrawal is HasProxyAdmin { * @dev Checks whether the request is larger than or equal to the minimum threshold. */ function _checkWithdrawal(Transfer.Request calldata _request) internal view { - if (_request.info.erc == Token.Standard.ERC20 && _request.info.quantity < minimumThreshold[_request.tokenAddr]) { + if (_request.info.erc == TokenStandard.ERC20 && _request.info.quantity < minimumThreshold[_request.tokenAddr]) { revert ErrQueryForTooSmallQuantity(); } } diff --git a/src/interfaces/IMainchainGatewayV3.sol b/src/interfaces/IMainchainGatewayV3.sol index 5613d096..41b0b87d 100644 --- a/src/interfaces/IMainchainGatewayV3.sol +++ b/src/interfaces/IMainchainGatewayV3.sol @@ -32,7 +32,7 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { /// @dev Emitted when the assets are withdrawn event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt); /// @dev Emitted when the tokens are mapped - event TokenMapped(address[] mainchainTokens, address[] roninTokens, Token.Standard[] standards); + event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards); /// @dev Emitted when the wrapped native token contract is updated event WrappedNativeTokenContractUpdated(IWETH weth); /// @dev Emitted when the withdrawal is locked @@ -112,7 +112,7 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { function mapTokens( address[] calldata _mainchainTokens, address[] calldata _roninTokens, - Token.Standard[] calldata _standards + TokenStandard[] calldata _standards ) external; /** @@ -128,7 +128,7 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { function mapTokensAndThresholds( address[] calldata _mainchainTokens, address[] calldata _roninTokens, - Token.Standard[] calldata _standards, + TokenStandard[] calldata _standards, uint256[][4] calldata _thresholds ) external; diff --git a/src/interfaces/IRoninGatewayV3.sol b/src/interfaces/IRoninGatewayV3.sol index 7e72bcfa..7e6d6fa9 100644 --- a/src/interfaces/IRoninGatewayV3.sol +++ b/src/interfaces/IRoninGatewayV3.sol @@ -29,7 +29,7 @@ interface IRoninGatewayV3 is MappedTokenConsumer { /// @dev Emitted when the withdrawal signatures is requested event WithdrawalSignaturesRequested(bytes32 receiptHash, Transfer.Receipt); /// @dev Emitted when the tokens are mapped - event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, Token.Standard[] standards); + event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, TokenStandard[] standards); /// @dev Emitted when the threshold is updated event TrustedThresholdUpdated( uint256 indexed nonce, @@ -144,7 +144,7 @@ interface IRoninGatewayV3 is MappedTokenConsumer { address[] calldata _roninTokens, address[] calldata _mainchainTokens, uint256[] calldata chainIds, - Token.Standard[] calldata _standards + TokenStandard[] calldata _standards ) external; /** diff --git a/src/interfaces/consumers/MappedTokenConsumer.sol b/src/interfaces/consumers/MappedTokenConsumer.sol index ca0f57eb..c83d96c7 100644 --- a/src/interfaces/consumers/MappedTokenConsumer.sol +++ b/src/interfaces/consumers/MappedTokenConsumer.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "../../libraries/Token.sol"; +import "../../libraries/LibTokenInfo.sol"; interface MappedTokenConsumer { struct MappedToken { - Token.Standard erc; + TokenStandard erc; address tokenAddr; } } diff --git a/src/libraries/Token.sol b/src/libraries/LibTokenInfo.sol similarity index 78% rename from src/libraries/Token.sol rename to src/libraries/LibTokenInfo.sol index 7f1a379b..a5a1da17 100644 --- a/src/libraries/Token.sol +++ b/src/libraries/LibTokenInfo.sol @@ -5,7 +5,20 @@ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "../interfaces/IWETH.sol"; -library Token { +enum TokenStandard { + ERC20, + ERC721 +} + +struct TokenInfo { + TokenStandard erc; + // For ERC20: the id must be 0 and the quantity is larger than 0. + // For ERC721: the quantity must be 0. + uint256 id; + uint256 quantity; +} + +library LibTokenInfo { /// @dev Error indicating that the provided information is invalid. error ErrInvalidInfo(); @@ -24,7 +37,7 @@ library Token { * @param to Receiver of the token value. * @param token Address of the token. */ - error ErrTokenCouldNotTransfer(Info tokenInfo, address to, address token); + error ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token); /** * @dev Error indicating that the `transferFrom` has failed. @@ -33,20 +46,7 @@ library Token { * @param to Receiver of the token value. * @param token Address of the token. */ - error ErrTokenCouldNotTransferFrom(Info tokenInfo, address from, address to, address token); - - enum Standard { - ERC20, - ERC721 - } - - struct Info { - Standard erc; - // For ERC20: the id must be 0 and the quantity is larger than 0. - // For ERC721: the quantity must be 0. - uint256 id; - uint256 quantity; - } + error ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token); // keccak256("TokenInfo(uint8 erc,uint256 id,uint256 quantity)"); bytes32 public constant INFO_TYPE_HASH = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d; @@ -54,7 +54,7 @@ library Token { /** * @dev Returns token info struct hash. */ - function hash(Info memory self) internal pure returns (bytes32 digest) { + function hash(TokenInfo memory self) internal pure returns (bytes32 digest) { // keccak256(abi.encode(INFO_TYPE_HASH, _info.erc, _info.id, _info.quantity)) assembly { let ptr := mload(0x40) @@ -69,11 +69,11 @@ library Token { /** * @dev Validates the token info. */ - function validate(Info memory self) internal pure { + function validate(TokenInfo memory self) internal pure { if ( !( - (self.erc == Standard.ERC20 && self.quantity > 0 && self.id == 0) - || (self.erc == Standard.ERC721 && self.quantity == 0) + (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0) + || (self.erc == TokenStandard.ERC721 && self.quantity == 0) ) ) revert ErrInvalidInfo(); } @@ -85,13 +85,13 @@ library Token { * - The `_from` address must approve for the contract using this library. * */ - function transferFrom(Info memory self, address from, address to, address token) internal { + function transferFrom(TokenInfo memory self, address from, address to, address token) internal { bool success; bytes memory data; - if (self.erc == Standard.ERC20) { + if (self.erc == TokenStandard.ERC20) { (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, self.quantity)); success = success && (data.length == 0 || abi.decode(data, (bool))); - } else if (self.erc == Standard.ERC721) { + } else if (self.erc == TokenStandard.ERC721) { // bytes4(keccak256("transferFrom(address,address,uint256)")) (success,) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, self.id)); } else { @@ -120,11 +120,11 @@ library Token { /** * @dev Transfer assets from current address to `_to` address. */ - function transfer(Info memory self, address to, address token) internal { + function transfer(TokenInfo memory self, address to, address token) internal { bool success; - if (self.erc == Standard.ERC20) { + if (self.erc == TokenStandard.ERC20) { success = tryTransferERC20(token, to, self.quantity); - } else if (self.erc == Standard.ERC721) { + } else if (self.erc == TokenStandard.ERC721) { success = tryTransferERC721(token, to, self.id); } else { revert ErrUnsupportedStandard(); @@ -139,7 +139,7 @@ library Token { * @notice Prioritizes transfer native token if the token is wrapped. * */ - function handleAssetTransfer(Info memory self, address payable to, address token, IWETH wrappedNativeToken) + function handleAssetTransfer(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal { bool success; @@ -149,7 +149,7 @@ library Token { wrappedNativeToken.deposit{ value: self.quantity }(); transfer(self, to, token); } - } else if (self.erc == Token.Standard.ERC20) { + } else if (self.erc == TokenStandard.ERC20) { uint256 _balance = IERC20(token).balanceOf(address(this)); if (_balance < self.quantity) { @@ -159,7 +159,7 @@ library Token { } transfer(self, to, token); - } else if (self.erc == Token.Standard.ERC721) { + } else if (self.erc == TokenStandard.ERC721) { if (!tryTransferERC721(token, to, self.id)) { // bytes4(keccak256("mint(address,uint256)")) (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, self.id)); diff --git a/src/libraries/Transfer.sol b/src/libraries/Transfer.sol index 8dcaea36..b4d6dc83 100644 --- a/src/libraries/Transfer.sol +++ b/src/libraries/Transfer.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "./Token.sol"; +import "./LibTokenInfo.sol"; import "./LibTokenOwner.sol"; library Transfer { using ECDSA for bytes32; using LibTokenOwner for TokenOwner; - using Token for Token.Info; + using LibTokenInfo for TokenInfo; enum Kind { Deposit, @@ -23,7 +23,7 @@ library Transfer { // Token address to deposit/withdraw // Value 0: native token address tokenAddr; - Token.Info info; + TokenInfo info; } /** @@ -73,7 +73,7 @@ library Transfer { Kind kind; TokenOwner mainchain; TokenOwner ronin; - Token.Info info; + TokenInfo info; } // keccak256("Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)"); diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 68be6019..8ff6b3ea 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -17,7 +17,7 @@ contract MainchainGatewayV3 is IMainchainGatewayV3, HasContracts { - using Token for Token.Info; + using LibTokenInfo for TokenInfo; using Transfer for Transfer.Request; using Transfer for Transfer.Receipt; @@ -71,7 +71,7 @@ contract MainchainGatewayV3 is // _thresholds[2]: unlockFeePercentages // _thresholds[3]: dailyWithdrawalLimit uint256[][4] calldata _thresholds, - Token.Standard[] calldata _standards + TokenStandard[] calldata _standards ) external payable virtual initializer { _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter); roninChainId = _roninChainId; @@ -159,10 +159,10 @@ contract MainchainGatewayV3 is emit WithdrawalUnlocked(_receiptHash, _receipt); address _token = _receipt.mainchain.tokenAddr; - if (_receipt.info.erc == Token.Standard.ERC20) { - Token.Info memory _feeInfo = _receipt.info; + if (_receipt.info.erc == TokenStandard.ERC20) { + TokenInfo memory _feeInfo = _receipt.info; _feeInfo.quantity = _computeFeePercentage(_receipt.info.quantity, unlockFeePercentages[_token]); - Token.Info memory _withdrawInfo = _receipt.info; + TokenInfo memory _withdrawInfo = _receipt.info; _withdrawInfo.quantity = _receipt.info.quantity - _feeInfo.quantity; _feeInfo.handleAssetTransfer(payable(msg.sender), _token, wrappedNativeToken); @@ -180,7 +180,7 @@ contract MainchainGatewayV3 is function mapTokens( address[] calldata _mainchainTokens, address[] calldata _roninTokens, - Token.Standard[] calldata _standards + TokenStandard[] calldata _standards ) external virtual onlyAdmin { if (_mainchainTokens.length == 0) revert ErrEmptyArray(); _mapTokens(_mainchainTokens, _roninTokens, _standards); @@ -192,7 +192,7 @@ contract MainchainGatewayV3 is function mapTokensAndThresholds( address[] calldata _mainchainTokens, address[] calldata _roninTokens, - Token.Standard[] calldata _standards, + TokenStandard[] calldata _standards, // _thresholds[0]: highTierThreshold // _thresholds[1]: lockedThreshold // _thresholds[2]: unlockFeePercentages @@ -227,7 +227,7 @@ contract MainchainGatewayV3 is function _mapTokens( address[] calldata _mainchainTokens, address[] calldata _roninTokens, - Token.Standard[] calldata _standards + TokenStandard[] calldata _standards ) internal virtual { if (!(_mainchainTokens.length == _roninTokens.length && _mainchainTokens.length == _standards.length)) { revert ErrLengthMismatch(msg.sig); @@ -281,7 +281,7 @@ contract MainchainGatewayV3 is if (withdrawalHash[_id] != 0) revert ErrQueryForProcessedWithdrawal(); - if (!(_receipt.info.erc == Token.Standard.ERC721 || !_reachedWithdrawalLimit(_tokenAddr, _quantity))) { + if (!(_receipt.info.erc == TokenStandard.ERC721 || !_reachedWithdrawalLimit(_tokenAddr, _quantity))) { revert ErrReachedDailyWithdrawalLimit(); } @@ -376,14 +376,14 @@ contract MainchainGatewayV3 is /** * @dev Returns the minimum vote weight for the token. */ - function _computeMinVoteWeight(Token.Standard _erc, address _token, uint256 _quantity) + function _computeMinVoteWeight(TokenStandard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) { uint256 _totalWeight = _getTotalWeight(); _weight = _minimumVoteWeight(_totalWeight); - if (_erc == Token.Standard.ERC20) { + if (_erc == TokenStandard.ERC20) { if (highTierThreshold[_token] <= _quantity) { _weight = _highTierVoteWeight(_totalWeight); } diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 6a11782c..d3eed9a1 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -24,7 +24,7 @@ contract RoninGatewayV3 is IRoninGatewayV3, HasContracts { - using Token for Token.Info; + using LibTokenInfo for TokenInfo; using Transfer for Transfer.Request; using Transfer for Transfer.Receipt; using IsolatedGovernance for IsolatedGovernance.Vote; @@ -95,7 +95,7 @@ contract RoninGatewayV3 is // _packedNumbers[0]: chainIds // _packedNumbers[1]: minimumThresholds uint256[][2] calldata _packedNumbers, - Token.Standard[] calldata _standards + TokenStandard[] calldata _standards ) external virtual initializer { _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter); _setThreshold(_numerator, _denominator); @@ -288,7 +288,7 @@ contract RoninGatewayV3 is address[] calldata _roninTokens, address[] calldata _mainchainTokens, uint256[] calldata _chainIds, - Token.Standard[] calldata _standards + TokenStandard[] calldata _standards ) external onlyAdmin { if (_roninTokens.length == 0) revert ErrLengthMismatch(msg.sig); _mapTokens(_roninTokens, _mainchainTokens, _chainIds, _standards); @@ -336,7 +336,7 @@ contract RoninGatewayV3 is address[] calldata _roninTokens, address[] calldata _mainchainTokens, uint256[] calldata _chainIds, - Token.Standard[] calldata _standards + TokenStandard[] calldata _standards ) internal { if (!(_roninTokens.length == _mainchainTokens.length && _roninTokens.length == _chainIds.length)) revert ErrLengthMismatch(msg.sig); diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 8dbabc08..862e6c88 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -22,7 +22,7 @@ import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; import { MockWrappedToken } from "@ronin/contracts/mocks/token/MockWrappedToken.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; @@ -232,13 +232,13 @@ contract BaseIntegration_Test is Base_Test { uint256 tokenNum = mainchainTokens.length; // reserve slot for ERC721Tokens uint256[] memory minimumThreshold = new uint256[](tokenNum); uint256[] memory chainIds = new uint256[](tokenNum); - Token.Standard[] memory standards = new Token.Standard[](tokenNum); + TokenStandard[] memory standards = new TokenStandard[](tokenNum); for (uint256 i; i < tokenNum; i++) { bool isERC721 = i == mainchainTokens.length - 1; // last item is ERC721 minimumThreshold[i] = 20; chainIds[i] = block.chainid; - standards[i] = isERC721 ? Token.Standard.ERC721 : Token.Standard.ERC20; + standards[i] = isERC721 ? TokenStandard.ERC721 : TokenStandard.ERC20; } // Ronin Gateway V3 @@ -432,7 +432,7 @@ contract BaseIntegration_Test is Base_Test { uint256[] memory lockedThreshold = new uint256[](tokenNum); uint256[] memory unlockFeePercentages = new uint256[](tokenNum); uint256[] memory dailyWithdrawalLimits = new uint256[](tokenNum); - Token.Standard[] memory standards = new Token.Standard[](tokenNum); + TokenStandard[] memory standards = new TokenStandard[](tokenNum); for (uint256 i; i < tokenNum; i++) { bool isERC721 = i == mainchainTokens.length - 1; // last item is ERC721 @@ -441,7 +441,7 @@ contract BaseIntegration_Test is Base_Test { lockedThreshold[i] = 20; unlockFeePercentages[i] = 100_000; dailyWithdrawalLimits[i] = 12; - standards[i] = isERC721 ? Token.Standard.ERC721 : Token.Standard.ERC20; + standards[i] = isERC721 ? TokenStandard.ERC721 : TokenStandard.ERC20; } // Mainchain Gateway V3 diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index f24f50c4..bcabe4ea 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console2 as console } from "forge-std/console2.sol"; import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { LibTokenOwner, TokenOwner } from "@ronin/contracts/libraries/LibTokenOwner.sol"; import "../../BaseIntegration.t.sol"; @@ -26,7 +26,7 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) + info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) }); for (uint256 i; i < 50; i++) { diff --git a/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol index b48f8d3b..8c48cf6d 100644 --- a/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console2 as console } from "forge-std/console2.sol"; import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import "../BaseIntegration.t.sol"; @@ -34,7 +34,7 @@ contract RequestDepositFor_MainchainGatewayV3_Test is BaseIntegration_Test { _depositRequest.recipientAddr = makeAddr("recipient"); _depositRequest.tokenAddr = address(0); - _depositRequest.info.erc = Token.Standard.ERC20; + _depositRequest.info.erc = TokenStandard.ERC20; _depositRequest.info.id = 0; _depositRequest.info.quantity = _quantity; @@ -90,7 +90,7 @@ contract RequestDepositFor_MainchainGatewayV3_Test is BaseIntegration_Test { _mainchainMockERC721.approve(address(_mainchainGatewayV3), tokenId); _depositRequest.tokenAddr = address(_mainchainMockERC721); - _depositRequest.info.erc = Token.Standard.ERC721; + _depositRequest.info.erc = TokenStandard.ERC721; _depositRequest.info.id = tokenId; _depositRequest.info.quantity = 0; diff --git a/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol index fd18b7db..e00d6486 100644 --- a/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console2 as console } from "forge-std/console2.sol"; import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import "../BaseIntegration.t.sol"; @@ -43,7 +43,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.mainchain.addr = makeAddr("recipient"); _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); _withdrawalReceipt.mainchain.chainId = block.chainid; - _withdrawalReceipt.info.erc = Token.Standard.ERC20; + _withdrawalReceipt.info.erc = TokenStandard.ERC20; _withdrawalReceipt.info.id = 0; _withdrawalReceipt.info.quantity = 10; @@ -187,7 +187,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainMockERC721); _withdrawalReceipt.ronin.tokenAddr = address(_roninMockERC721); _withdrawalReceipt.info.id = tokenId; - _withdrawalReceipt.info.erc = Token.Standard.ERC721; + _withdrawalReceipt.info.erc = TokenStandard.ERC721; _withdrawalReceipt.info.quantity = 0; SignatureConsumer.Signature[] memory signatures = @@ -215,7 +215,7 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainMockERC721); _withdrawalReceipt.ronin.tokenAddr = address(_roninMockERC721); _withdrawalReceipt.info.id = tokenId; - _withdrawalReceipt.info.erc = Token.Standard.ERC721; + _withdrawalReceipt.info.erc = TokenStandard.ERC721; _withdrawalReceipt.info.quantity = 0; SignatureConsumer.Signature[] memory signatures = diff --git a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol index 46fce001..d73a68b1 100644 --- a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol +++ b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol @@ -30,7 +30,7 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) + info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) }); vm.expectRevert("Pausable: paused"); @@ -67,7 +67,7 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) + info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) }); uint256 numOperatorsForVoteExecuted = diff --git a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol index 6daaa4c2..fa9288c7 100644 --- a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol +++ b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console2 as console } from "forge-std/console2.sol"; import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; import { IsolatedGovernance } from "@ronin/contracts/libraries/IsolatedGovernance.sol"; import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; @@ -27,7 +27,7 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) + info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) }); _depositReceipts.push(receipt); diff --git a/test/helpers/ProposalUtils.t.sol b/test/helpers/ProposalUtils.t.sol index 4e06b0b5..f7e3e145 100644 --- a/test/helpers/ProposalUtils.t.sol +++ b/test/helpers/ProposalUtils.t.sol @@ -5,7 +5,7 @@ import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { Test } from "forge-std/Test.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; -import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { Utils } from "script/utils/Utils.sol"; From d4c7a9b36c4ffc4fab2c6ab46b0f6af140dc9213 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 12:42:14 +0700 Subject: [PATCH 052/305] fix(Info): add two array fields for info --- src/libraries/LibTokenInfo.sol | 2 ++ .../updateOperator.RoninBridgeManager.t.sol | 8 +++++++- .../emergencyAction.PauseEnforcer.t.sol | 16 ++++++++++++++-- .../depositVote.RoninGatewayV3.t.sol | 8 +++++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index a5a1da17..edf2c50f 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -16,6 +16,8 @@ struct TokenInfo { // For ERC721: the quantity must be 0. uint256 id; uint256 quantity; + uint256[] ids; + uint256[] quantities; } library LibTokenInfo { diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index bcabe4ea..785f517c 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -26,7 +26,13 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) + info: TokenInfo({ + erc: TokenStandard.ERC20, + id: 0, + quantity: 100, + ids: new uint256[](0), + quantities: new uint256[](0) + }) }); for (uint256 i; i < 50; i++) { diff --git a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol index d73a68b1..84d8da3c 100644 --- a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol +++ b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol @@ -30,7 +30,13 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) + info: TokenInfo({ + erc: TokenStandard.ERC20, + id: 0, + quantity: 100, + ids: new uint256[](0), + quantities: new uint256[](0) + }) }); vm.expectRevert("Pausable: paused"); @@ -67,7 +73,13 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) + info: TokenInfo({ + erc: TokenStandard.ERC20, + id: 0, + quantity: 100, + ids: new uint256[](0), + quantities: new uint256[](0) + }) }); uint256 numOperatorsForVoteExecuted = diff --git a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol index fa9288c7..14af2f15 100644 --- a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol +++ b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol @@ -27,7 +27,13 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) + info: TokenInfo({ + erc: TokenStandard.ERC20, + id: 0, + quantity: 100, + ids: new uint256[](0), + quantities: new uint256[](0) + }) }); _depositReceipts.push(receipt); From 77396ac98027439e8d5e0a23691ed2c80d45d81f Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 12:54:55 +0700 Subject: [PATCH 053/305] fix(Info): validate erc1155 and erc721 batch --- src/libraries/LibTokenInfo.sol | 61 ++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index edf2c50f..516ac971 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -7,7 +7,9 @@ import "../interfaces/IWETH.sol"; enum TokenStandard { ERC20, - ERC721 + ERC721, + ERC721Batch, + ERC1155 } struct TokenInfo { @@ -68,18 +70,63 @@ library LibTokenInfo { } } + /** + * + * VALIDATE + * + */ + /** * @dev Validates the token info. */ function validate(TokenInfo memory self) internal pure { - if ( - !( - (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0) - || (self.erc == TokenStandard.ERC721 && self.quantity == 0) - ) - ) revert ErrInvalidInfo(); + if (!(_validateERC20(self) || _validateERC721(self)) || _validateERC721Batch(self) || _validateERC1155(self)) { + revert ErrInvalidInfo(); + } + } + + function _validateERC20(TokenInfo memory self) private pure returns (bool) { + return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0); + } + + function _validateERC721(TokenInfo memory self) private pure returns (bool) { + return (self.erc == TokenStandard.ERC721 && self.quantity == 0); + } + + function _validateERC721Batch(TokenInfo memory self) private pure returns (bool res) { + uint256 length = self.ids.length; + + res = self.erc == TokenStandard.ERC721Batch && _validateBatch(self); + + for (uint256 i; i < length; ++i) { + if (self.quantities[i] != 0) { + return false; + } + } + } + + function _validateERC1155(TokenInfo memory self) private pure returns (bool res) { + uint256 length = self.ids.length; + res = self.erc == TokenStandard.ERC1155 && _validateBatch(self); + + for (uint256 i; i < length; ++i) { + if (self.quantities[i] == 0) { + return false; + } + } } + function _validateBatch(TokenInfo memory self) private pure returns (bool res) { + return self.quantity == 0 && self.id == 0 && self.ids.length > 0 && self.quantities.length > 0 + && self.ids.length == self.quantities.length; + } + + /** + * + * TRANSFER + * + */ + /** * @dev Transfer asset from. * From 8d0becbb62d6a4060d59bacd20162ffc05664b96 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 13:07:28 +0700 Subject: [PATCH 054/305] fix(Info): add router --- src/libraries/LibTokenInfo.sol | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 516ac971..e474dfd4 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -55,6 +55,25 @@ library LibTokenInfo { // keccak256("TokenInfo(uint8 erc,uint256 id,uint256 quantity)"); bytes32 public constant INFO_TYPE_HASH = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d; + /** + * + * ROUTER + * + */ + function _isStandardSingle(TokenStandard standard) private pure returns (bool) { + return standard == TokenStandard.ERC20 || standard == TokenStandard.ERC721; + } + + function _isStandardBatch(TokenStandard standard) private pure returns (bool) { + return standard == TokenStandard.ERC721Batch || standard == TokenStandard.ERC1155; + } + + /** + * + * HASH + * + */ + /** * @dev Returns token info struct hash. */ From 68b9c8650cc240388750d19d55b3002555500a05 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 13:07:49 +0700 Subject: [PATCH 055/305] fix(Info): restrict scope of tryTransfer to private --- src/libraries/LibTokenInfo.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index e474dfd4..32b3a165 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -172,14 +172,14 @@ library LibTokenInfo { /** * @dev Transfers ERC721 token and returns the result. */ - function tryTransferERC721(address token, address to, uint256 id) internal returns (bool success) { + function _tryTransferERC721(address token, address to, uint256 id) private returns (bool success) { (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), to, id)); } /** * @dev Transfers ERC20 token and returns the result. */ - function tryTransferERC20(address token, address to, uint256 quantity) internal returns (bool success) { + function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) { bytes memory data; (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity)); success = success && (data.length == 0 || abi.decode(data, (bool))); @@ -191,9 +191,9 @@ library LibTokenInfo { function transfer(TokenInfo memory self, address to, address token) internal { bool success; if (self.erc == TokenStandard.ERC20) { - success = tryTransferERC20(token, to, self.quantity); + success = _tryTransferERC20(token, to, self.quantity); } else if (self.erc == TokenStandard.ERC721) { - success = tryTransferERC721(token, to, self.id); + success = _tryTransferERC721(token, to, self.id); } else { revert ErrUnsupportedStandard(); } @@ -228,7 +228,7 @@ library LibTokenInfo { transfer(self, to, token); } else if (self.erc == TokenStandard.ERC721) { - if (!tryTransferERC721(token, to, self.id)) { + if (!_tryTransferERC721(token, to, self.id)) { // bytes4(keccak256("mint(address,uint256)")) (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, self.id)); if (!success) revert ErrERC721MintingFailed(); From 6efc05aa6c3cabfd18abc09b23851fc33a60b04e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 13:39:22 +0700 Subject: [PATCH 056/305] feat(Info): support hash batch --- src/libraries/LibTokenInfo.sol | 44 +++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 32b3a165..6ef51ad7 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -52,9 +52,6 @@ library LibTokenInfo { */ error ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token); - // keccak256("TokenInfo(uint8 erc,uint256 id,uint256 quantity)"); - bytes32 public constant INFO_TYPE_HASH = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d; - /** * * ROUTER @@ -74,17 +71,48 @@ library LibTokenInfo { * */ + // keccak256("TokenInfo(uint8 erc,uint256 id,uint256 quantity)"); + bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d; + + // keccak256("TokenInfo(uint8 erc,uint256[] id,uint256[] quantity)"); + bytes32 public constant INFO_TYPE_HASH_BATCH = 0xe0d9a8bb18cfc29aa6e46b1293275ca79aeaaf28ac63b66dcb6ebce2f127f5a0; + /** * @dev Returns token info struct hash. */ function hash(TokenInfo memory self) internal pure returns (bytes32 digest) { - // keccak256(abi.encode(INFO_TYPE_HASH, _info.erc, _info.id, _info.quantity)) + if (_isStandardSingle(self.erc)) return _hashSingle(self); + if (_isStandardBatch(self.erc)) return _hashBatch(self); + revert ErrUnsupportedStandard(); + } + + function _hashSingle(TokenInfo memory self) internal pure returns (bytes32 digest) { + // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity)) + assembly { + let ptr := mload(0x40) + mstore(ptr, INFO_TYPE_HASH_SINGLE) + mstore(add(ptr, 0x20), mload(self)) // info.erc + mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id + mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity + digest := keccak256(ptr, 0x80) + } + } + + function _hashBatch(TokenInfo memory self) internal pure returns (bytes32 digest) { + // keccak256(abi.encode(INFO_TYPE_HASH_BATCH, info.erc, info.ids, info.quantities)) assembly { let ptr := mload(0x40) - mstore(ptr, INFO_TYPE_HASH) - mstore(add(ptr, 0x20), mload(self)) // _info.erc - mstore(add(ptr, 0x40), mload(add(self, 0x20))) // _info.id - mstore(add(ptr, 0x60), mload(add(self, 0x40))) // _info.quantity + mstore(ptr, INFO_TYPE_HASH_SINGLE) + mstore(add(ptr, 0x20), mload(self)) // info.erc + + let ids := mload(add(self, 0x20)) // info.ids + let idsHash := keccak256(add(ids, 32), mul(mload(ids), 32)) // keccak256(info.ids) + mstore(add(ptr, 0x40), idsHash) + + let qtys := mload(add(self, 0x40)) // info.quantities + let qtysHash := keccak256(add(qtys, 32), mul(mload(qtys), 32)) // keccak256(info.quantities) + mstore(add(ptr, 0x60), qtysHash) + digest := keccak256(ptr, 0x80) } } From 66b166ad1c546020422a46580dd2ab88efc64cad Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 13:43:50 +0700 Subject: [PATCH 057/305] fix(Info): move helpers to EoF --- src/libraries/LibTokenInfo.sol | 38 ++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 6ef51ad7..ab379ec9 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -197,22 +197,6 @@ library LibTokenInfo { if (!success) revert ErrTokenCouldNotTransferFrom(self, from, to, token); } - /** - * @dev Transfers ERC721 token and returns the result. - */ - function _tryTransferERC721(address token, address to, uint256 id) private returns (bool success) { - (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), to, id)); - } - - /** - * @dev Transfers ERC20 token and returns the result. - */ - function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) { - bytes memory data; - (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity)); - success = success && (data.length == 0 || abi.decode(data, (bool))); - } - /** * @dev Transfer assets from current address to `_to` address. */ @@ -265,4 +249,26 @@ library LibTokenInfo { revert ErrUnsupportedStandard(); } } + + /** + * + * TRANSFER HELPERS + * + */ + + /** + * @dev Transfers ERC721 token and returns the result. + */ + function _tryTransferERC721(address token, address to, uint256 id) private returns (bool success) { + (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), to, id)); + } + + /** + * @dev Transfers ERC20 token and returns the result. + */ + function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) { + bytes memory data; + (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity)); + success = success && (data.length == 0 || abi.decode(data, (bool))); + } } From eb9a888b507254f442058e612c9bc71fd1187d73 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 13:56:50 +0700 Subject: [PATCH 058/305] fix(Info): refactor `handleAssetTransfer` --- src/libraries/LibTokenInfo.sol | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index ab379ec9..3dfd656b 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -233,17 +233,13 @@ library LibTokenInfo { uint256 _balance = IERC20(token).balanceOf(address(this)); if (_balance < self.quantity) { - // bytes4(keccak256("mint(address,uint256)")) - (success,) = token.call(abi.encodeWithSelector(0x40c10f19, address(this), self.quantity - _balance)); - if (!success) revert ErrERC20MintingFailed(); + if (!_tryMintERC20(token, address(this), self.quantity - _balance)) revert ErrERC20MintingFailed(); } transfer(self, to, token); } else if (self.erc == TokenStandard.ERC721) { if (!_tryTransferERC721(token, to, self.id)) { - // bytes4(keccak256("mint(address,uint256)")) - (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, self.id)); - if (!success) revert ErrERC721MintingFailed(); + if (!_tryMintERC721(token, to, self.id)) revert ErrERC721MintingFailed(); } } else { revert ErrUnsupportedStandard(); @@ -256,6 +252,23 @@ library LibTokenInfo { * */ + /** + * @dev Transfers ERC20 token and returns the result. + */ + function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) { + bytes memory data; + (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity)); + success = success && (data.length == 0 || abi.decode(data, (bool))); + } + + /** + * @dev Mints ERC20 token and returns the result. + */ + function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) { + // bytes4(keccak256("mint(address,uint256)")) + (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity)); + } + /** * @dev Transfers ERC721 token and returns the result. */ @@ -264,11 +277,10 @@ library LibTokenInfo { } /** - * @dev Transfers ERC20 token and returns the result. + * @dev Mints ERC721 token and returns the result. */ - function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) { - bytes memory data; - (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity)); - success = success && (data.length == 0 || abi.decode(data, (bool))); + function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) { + // bytes4(keccak256("mint(address,uint256)")) + (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id)); } } From fe51f399af47cf2c8b4dbc0f3dadacdffb644902 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 14:57:36 +0700 Subject: [PATCH 059/305] feat(Info): rename `transferFrom` to `handleTransferFrom` --- src/libraries/LibTokenInfo.sol | 41 ++++++++++++++-------------- src/mainchain/MainchainGatewayV3.sol | 2 +- src/ronin/gateway/RoninGatewayV3.sol | 2 +- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 3dfd656b..ea668bbf 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -44,7 +44,7 @@ library LibTokenInfo { error ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token); /** - * @dev Error indicating that the `transferFrom` has failed. + * @dev Error indicating that the `handleTransferFrom` has failed. * @param tokenInfo Info of the token including ERC standard, id or quantity. * @param from Owner of the token value. * @param to Receiver of the token value. @@ -181,7 +181,7 @@ library LibTokenInfo { * - The `_from` address must approve for the contract using this library. * */ - function transferFrom(TokenInfo memory self, address from, address to, address token) internal { + function handleTransferFrom(TokenInfo memory self, address from, address to, address token) internal { bool success; bytes memory data; if (self.erc == TokenStandard.ERC20) { @@ -197,22 +197,6 @@ library LibTokenInfo { if (!success) revert ErrTokenCouldNotTransferFrom(self, from, to, token); } - /** - * @dev Transfer assets from current address to `_to` address. - */ - function transfer(TokenInfo memory self, address to, address token) internal { - bool success; - if (self.erc == TokenStandard.ERC20) { - success = _tryTransferERC20(token, to, self.quantity); - } else if (self.erc == TokenStandard.ERC721) { - success = _tryTransferERC721(token, to, self.id); - } else { - revert ErrUnsupportedStandard(); - } - - if (!success) revert ErrTokenCouldNotTransfer(self, to, token); - } - /** * @dev Tries minting and transfering assets. * @@ -222,12 +206,11 @@ library LibTokenInfo { function handleAssetTransfer(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal { - bool success; if (token == address(wrappedNativeToken)) { // Try sending the native token before transferring the wrapped token if (!to.send(self.quantity)) { wrappedNativeToken.deposit{ value: self.quantity }(); - transfer(self, to, token); + _transfer(self, to, token); } } else if (self.erc == TokenStandard.ERC20) { uint256 _balance = IERC20(token).balanceOf(address(this)); @@ -236,7 +219,7 @@ library LibTokenInfo { if (!_tryMintERC20(token, address(this), self.quantity - _balance)) revert ErrERC20MintingFailed(); } - transfer(self, to, token); + _transfer(self, to, token); } else if (self.erc == TokenStandard.ERC721) { if (!_tryTransferERC721(token, to, self.id)) { if (!_tryMintERC721(token, to, self.id)) revert ErrERC721MintingFailed(); @@ -252,6 +235,22 @@ library LibTokenInfo { * */ + /** + * @dev Transfer assets from current address to `_to` address. + */ + function _transfer(TokenInfo memory self, address to, address token) private { + bool success; + if (self.erc == TokenStandard.ERC20) { + success = _tryTransferERC20(token, to, self.quantity); + } else if (self.erc == TokenStandard.ERC721) { + success = _tryTransferERC721(token, to, self.id); + } else { + revert ErrUnsupportedStandard(); + } + + if (!success) revert ErrTokenCouldNotTransfer(self, to, token); + } + /** * @dev Transfers ERC20 token and returns the result. */ diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 8ff6b3ea..7b372112 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -359,7 +359,7 @@ contract MainchainGatewayV3 is _token = getRoninToken(_request.tokenAddr); if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard(); - _request.info.transferFrom(_requester, address(this), _request.tokenAddr); + _request.info.handleTransferFrom(_requester, address(this), _request.tokenAddr); // Withdraw if token is WETH if (_roninWeth == _request.tokenAddr) { IWETH(_roninWeth).withdraw(_request.info.quantity); diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index d3eed9a1..52a45f7d 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -401,7 +401,7 @@ contract RoninGatewayV3 is MappedToken memory _token = getMainchainToken(_request.tokenAddr, _chainId); if (_request.info.erc != _token.erc) revert ErrInvalidTokenStandard(); - _request.info.transferFrom(_requester, address(this), _request.tokenAddr); + _request.info.handleTransferFrom(_requester, address(this), _request.tokenAddr); _storeAsReceipt(_request, _chainId, _requester, _token.tokenAddr); } From f65c25d7d7863ed3c89b500f6dedcfc1f46f67f2 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 15:01:49 +0700 Subject: [PATCH 060/305] fix(Info): rename to ERC1155Batch --- src/libraries/LibTokenInfo.sol | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index ea668bbf..4eb3e7a6 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -3,13 +3,14 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; +import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "../interfaces/IWETH.sol"; enum TokenStandard { ERC20, ERC721, ERC721Batch, - ERC1155 + ERC1155Batch } struct TokenInfo { @@ -62,7 +63,7 @@ library LibTokenInfo { } function _isStandardBatch(TokenStandard standard) private pure returns (bool) { - return standard == TokenStandard.ERC721Batch || standard == TokenStandard.ERC1155; + return standard == TokenStandard.ERC721Batch || standard == TokenStandard.ERC1155Batch; } /** @@ -127,7 +128,7 @@ library LibTokenInfo { * @dev Validates the token info. */ function validate(TokenInfo memory self) internal pure { - if (!(_validateERC20(self) || _validateERC721(self)) || _validateERC721Batch(self) || _validateERC1155(self)) { + if (!(_validateERC20(self) || _validateERC721(self)) || _validateERC721Batch(self) || _validateERC1155Batch(self)) { revert ErrInvalidInfo(); } } @@ -152,9 +153,9 @@ library LibTokenInfo { } } - function _validateERC1155(TokenInfo memory self) private pure returns (bool res) { + function _validateERC1155Batch(TokenInfo memory self) private pure returns (bool res) { uint256 length = self.ids.length; - res = self.erc == TokenStandard.ERC1155 && _validateBatch(self); + res = self.erc == TokenStandard.ERC1155Batch && _validateBatch(self); for (uint256 i; i < length; ++i) { if (self.quantities[i] == 0) { From 509026270b70175c66333c4f0b8960255e27bc46 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 15:17:13 +0700 Subject: [PATCH 061/305] fix(Info): return instead of nested if-else --- src/libraries/LibTokenInfo.sol | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 4eb3e7a6..e4a0969d 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -213,21 +213,30 @@ library LibTokenInfo { wrappedNativeToken.deposit{ value: self.quantity }(); _transfer(self, to, token); } - } else if (self.erc == TokenStandard.ERC20) { - uint256 _balance = IERC20(token).balanceOf(address(this)); - if (_balance < self.quantity) { - if (!_tryMintERC20(token, address(this), self.quantity - _balance)) revert ErrERC20MintingFailed(); + return; + } + + if (self.erc == TokenStandard.ERC20) { + uint256 balance = IERC20(token).balanceOf(address(this)); + if (balance < self.quantity) { + if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed(); } _transfer(self, to, token); - } else if (self.erc == TokenStandard.ERC721) { + + return; + } + + if (self.erc == TokenStandard.ERC721) { if (!_tryTransferERC721(token, to, self.id)) { if (!_tryMintERC721(token, to, self.id)) revert ErrERC721MintingFailed(); } - } else { - revert ErrUnsupportedStandard(); + + return; } + + revert ErrUnsupportedStandard(); } /** From ec8adaca0cf720254ba42d46f4a775dee0ebf59f Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 15:39:01 +0700 Subject: [PATCH 062/305] feat(Info): impl transfer1155 --- src/libraries/LibTokenInfo.sol | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index e4a0969d..0ef98070 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -33,6 +33,9 @@ library LibTokenInfo { /// @dev Error indicating that the minting of ERC721 tokens has failed. error ErrERC721MintingFailed(); + /// @dev Error indicating that the transfer of ERC1155 tokens in batch has failed. + error ErrERC1155TransferFailed(); + /// @dev Error indicating that an unsupported standard is encountered. error ErrUnsupportedStandard(); @@ -236,6 +239,14 @@ library LibTokenInfo { return; } + if (self.erc == TokenStandard.ERC1155Batch) { + if (!_tryTransferERC1155Batch(token, to, self.ids, self.quantities)) { + revert ErrERC1155TransferFailed(); + } + + return; + } + revert ErrUnsupportedStandard(); } @@ -292,4 +303,16 @@ library LibTokenInfo { // bytes4(keccak256("mint(address,uint256)")) (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id)); } + + /** + * @dev Transfers ERC1155 token in batch and returns the result. + */ + function _tryTransferERC1155Batch(address token, address to, uint256[] memory ids, uint256[] memory amounts) + private + returns (bool success) + { + (success,) = token.call( + abi.encodeCall(IERC1155.safeBatchTransferFrom, (address(this), to, ids, amounts, new bytes(0))) + ); + } } From 87c1c1568042e976660f8125aef5392f13e2d157 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 16:43:32 +0700 Subject: [PATCH 063/305] feat(Info): mint and transfer 1155 in batch --- src/libraries/LibTokenInfo.sol | 83 +++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 0ef98070..7fade250 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; +import "@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol"; import "../interfaces/IWETH.sol"; enum TokenStandard { @@ -35,6 +36,7 @@ library LibTokenInfo { /// @dev Error indicating that the transfer of ERC1155 tokens in batch has failed. error ErrERC1155TransferFailed(); + error ErrERC1155MintBatchFailed(); /// @dev Error indicating that an unsupported standard is encountered. error ErrUnsupportedStandard(); @@ -194,6 +196,8 @@ library LibTokenInfo { } else if (self.erc == TokenStandard.ERC721) { // bytes4(keccak256("transferFrom(address,address,uint256)")) (success,) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, self.id)); + } else if (self.erc == TokenStandard.ERC1155Batch) { + success = _tryTransferERC1155Batch(token, from, to, self.ids, self.quantities); } else { revert ErrUnsupportedStandard(); } @@ -240,7 +244,14 @@ library LibTokenInfo { } if (self.erc == TokenStandard.ERC1155Batch) { - if (!_tryTransferERC1155Batch(token, to, self.ids, self.quantities)) { + (uint256[] memory toMintIds, uint256[] memory toMintAmounts) = + _calcLackBalancesERC1155(address(this), token, self.ids, self.quantities); + + if (toMintIds.length > 0) { + if (!_tryMintERC1155Batch(token, address(this), toMintIds, toMintAmounts)) revert ErrERC1155MintBatchFailed(); + } + + if (!_tryTransferERC1155Batch(token, address(this), to, self.ids, self.quantities)) { revert ErrERC1155TransferFailed(); } @@ -305,14 +316,74 @@ library LibTokenInfo { } /** - * @dev Transfers ERC1155 token in batch and returns the result. + * @dev Transfers ERC1155 token in and returns the result. + */ + function _tryTransferERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) { + (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (address(this), to, id, amount, new bytes(0)))); + } + + /** + * @dev Transfers ERC1155 token in and returns the result. + */ + function _tryTransferERC1155Batch( + address token, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts + ) private returns (bool success) { + (success,) = token.call(abi.encodeCall(IERC1155.safeBatchTransferFrom, (from, to, ids, amounts, new bytes(0)))); + } + + /** + * @dev Mints ERC1155 token in batch and returns the result. */ - function _tryTransferERC1155Batch(address token, address to, uint256[] memory ids, uint256[] memory amounts) + function _tryMintERC1155Batch(address token, address to, uint256[] memory ids, uint256[] memory amounts) private returns (bool success) { - (success,) = token.call( - abi.encodeCall(IERC1155.safeBatchTransferFrom, (address(this), to, ids, amounts, new bytes(0))) - ); + (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mintBatch, (to, ids, amounts, new bytes(0)))); + } + + /** + * + * OTHER HELPERS + * + */ + + /** + * @dev Gets ERC1155 balance of token `ids` for user `who`, then compare with the `requiredAmounts`. Returns list of `ids_` that have `lackAmounts_` at least 1. + */ + function _calcLackBalancesERC1155(address who, address token, uint256[] memory ids, uint256[] memory requiredAmounts) + private + view + returns (uint256[] memory ids_, uint256[] memory lackAmounts_) + { + uint256 length = ids.length; + address[] memory whos = new address[](length); + ids_ = new uint256[](length); + lackAmounts_ = new uint256[](length); + + for (uint256 i; i < length; i++) { + whos[i] = address(who); + } + + // Get balance of all ids belongs to `who` + uint256[] memory balances = IERC1155(token).balanceOfBatch(whos, ids); + + uint256 count = 0; + + // Find the ids that lack of balance + for (uint256 i; i < length; i++) { + if (requiredAmounts[i] > balances[i]) { + lackAmounts_[count] = requiredAmounts[i] - balances[i]; + ids_[count++] = ids[i]; + } + } + + assembly { + mstore(ids_, count) + mstore(lackAmounts_, count) + } } } From a9649a58a95ef0563d91172c3afb3945ad9e6366 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 16:46:54 +0700 Subject: [PATCH 064/305] fix(Gateway): rename tranferFrom to `handleAssetIn` --- src/libraries/LibTokenInfo.sol | 13 +++++++------ src/mainchain/MainchainGatewayV3.sol | 2 +- src/ronin/gateway/RoninGatewayV3.sol | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 7fade250..747afb44 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -50,7 +50,7 @@ library LibTokenInfo { error ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token); /** - * @dev Error indicating that the `handleTransferFrom` has failed. + * @dev Error indicating that the `handleAssetIn` has failed. * @param tokenInfo Info of the token including ERC standard, id or quantity. * @param from Owner of the token value. * @param to Receiver of the token value. @@ -187,22 +187,23 @@ library LibTokenInfo { * - The `_from` address must approve for the contract using this library. * */ - function handleTransferFrom(TokenInfo memory self, address from, address to, address token) internal { + function handleAssetIn(TokenInfo memory self, address from, address token) internal { bool success; bytes memory data; if (self.erc == TokenStandard.ERC20) { - (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, self.quantity)); + (success, data) = + token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity)); success = success && (data.length == 0 || abi.decode(data, (bool))); } else if (self.erc == TokenStandard.ERC721) { // bytes4(keccak256("transferFrom(address,address,uint256)")) - (success,) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, self.id)); + (success,) = token.call(abi.encodeWithSelector(0x23b872dd, from, address(this), self.id)); } else if (self.erc == TokenStandard.ERC1155Batch) { - success = _tryTransferERC1155Batch(token, from, to, self.ids, self.quantities); + success = _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); } else { revert ErrUnsupportedStandard(); } - if (!success) revert ErrTokenCouldNotTransferFrom(self, from, to, token); + if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token); } /** diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 7b372112..e124d8b7 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -359,7 +359,7 @@ contract MainchainGatewayV3 is _token = getRoninToken(_request.tokenAddr); if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard(); - _request.info.handleTransferFrom(_requester, address(this), _request.tokenAddr); + _request.info.handleAssetIn(_requester, _request.tokenAddr); // Withdraw if token is WETH if (_roninWeth == _request.tokenAddr) { IWETH(_roninWeth).withdraw(_request.info.quantity); diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 52a45f7d..edce528e 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -401,7 +401,7 @@ contract RoninGatewayV3 is MappedToken memory _token = getMainchainToken(_request.tokenAddr, _chainId); if (_request.info.erc != _token.erc) revert ErrInvalidTokenStandard(); - _request.info.handleTransferFrom(_requester, address(this), _request.tokenAddr); + _request.info.handleAssetIn(_requester, _request.tokenAddr); _storeAsReceipt(_request, _chainId, _requester, _token.tokenAddr); } From f722a9c6c158651992f9acd807403f94b4e64c27 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 16:51:06 +0700 Subject: [PATCH 065/305] fix((Info): rework the `transfer` methods --- src/libraries/LibTokenInfo.sol | 18 ++++++++---------- src/mainchain/MainchainGatewayV3.sol | 8 ++++---- src/ronin/gateway/RoninGatewayV3.sol | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 747afb44..cc1032ac 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -212,14 +212,12 @@ library LibTokenInfo { * @notice Prioritizes transfer native token if the token is wrapped. * */ - function handleAssetTransfer(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) - internal - { + function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal { if (token == address(wrappedNativeToken)) { // Try sending the native token before transferring the wrapped token if (!to.send(self.quantity)) { wrappedNativeToken.deposit{ value: self.quantity }(); - _transfer(self, to, token); + _transferTokenOut(self, to, token); } return; @@ -231,13 +229,13 @@ library LibTokenInfo { if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed(); } - _transfer(self, to, token); + _transferTokenOut(self, to, token); return; } if (self.erc == TokenStandard.ERC721) { - if (!_tryTransferERC721(token, to, self.id)) { + if (!_tryTransferFromERC721(token, address(this), to, self.id)) { if (!_tryMintERC721(token, to, self.id)) revert ErrERC721MintingFailed(); } @@ -271,12 +269,12 @@ library LibTokenInfo { /** * @dev Transfer assets from current address to `_to` address. */ - function _transfer(TokenInfo memory self, address to, address token) private { + function _transferTokenOut(TokenInfo memory self, address to, address token) private { bool success; if (self.erc == TokenStandard.ERC20) { success = _tryTransferERC20(token, to, self.quantity); } else if (self.erc == TokenStandard.ERC721) { - success = _tryTransferERC721(token, to, self.id); + success = _tryTransferFromERC721(token, address(this), to, self.id); } else { revert ErrUnsupportedStandard(); } @@ -304,8 +302,8 @@ library LibTokenInfo { /** * @dev Transfers ERC721 token and returns the result. */ - function _tryTransferERC721(address token, address to, uint256 id) private returns (bool success) { - (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), to, id)); + function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) { + (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id)); } /** diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index e124d8b7..4e48cd3c 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -165,10 +165,10 @@ contract MainchainGatewayV3 is TokenInfo memory _withdrawInfo = _receipt.info; _withdrawInfo.quantity = _receipt.info.quantity - _feeInfo.quantity; - _feeInfo.handleAssetTransfer(payable(msg.sender), _token, wrappedNativeToken); - _withdrawInfo.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken); + _feeInfo.handleAssetOut(payable(msg.sender), _token, wrappedNativeToken); + _withdrawInfo.handleAssetOut(payable(_receipt.mainchain.addr), _token, wrappedNativeToken); } else { - _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken); + _receipt.info.handleAssetOut(payable(_receipt.mainchain.addr), _token, wrappedNativeToken); } emit Withdrew(_receiptHash, _receipt); @@ -326,7 +326,7 @@ contract MainchainGatewayV3 is } _recordWithdrawal(_tokenAddr, _quantity); - _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _tokenAddr, wrappedNativeToken); + _receipt.info.handleAssetOut(payable(_receipt.mainchain.addr), _tokenAddr, wrappedNativeToken); emit Withdrew(_receiptHash, _receipt); } diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index edce528e..b0812b46 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -377,7 +377,7 @@ contract RoninGatewayV3 is emit DepositVoted(operator, id, receipt.mainchain.chainId, _receiptHash); if (_status == VoteStatus.Approved) { _proposal.status = VoteStatus.Executed; - receipt.info.handleAssetTransfer(payable(receipt.ronin.addr), receipt.ronin.tokenAddr, IWETH(address(0))); + receipt.info.handleAssetOut(payable(receipt.ronin.addr), receipt.ronin.tokenAddr, IWETH(address(0))); IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)).handleVoteApproved( IBridgeTracking.VoteKind.Deposit, receipt.id From bb4d8b956ec2c070f3ae55d6460796ad28d30732 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 17:01:28 +0700 Subject: [PATCH 066/305] fix(Info): transfer in ERC721 by private method --- src/libraries/LibTokenInfo.sol | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index cc1032ac..d9e99a09 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -195,8 +195,7 @@ library LibTokenInfo { token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity)); success = success && (data.length == 0 || abi.decode(data, (bool))); } else if (self.erc == TokenStandard.ERC721) { - // bytes4(keccak256("transferFrom(address,address,uint256)")) - (success,) = token.call(abi.encodeWithSelector(0x23b872dd, from, address(this), self.id)); + success = _tryTransferFromERC721(token, from, address(this), self.id); } else if (self.erc == TokenStandard.ERC1155Batch) { success = _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); } else { From 69df3094238ae9e4c62c3a0540c075cb7b0ffc06 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 17:24:42 +0700 Subject: [PATCH 067/305] fix(Info): support ERC721Batch --- src/libraries/LibTokenInfo.sol | 45 ++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index d9e99a09..2462534c 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -196,6 +196,8 @@ library LibTokenInfo { success = success && (data.length == 0 || abi.decode(data, (bool))); } else if (self.erc == TokenStandard.ERC721) { success = _tryTransferFromERC721(token, from, address(this), self.id); + } else if (self.erc == TokenStandard.ERC721Batch) { + success = _tryTransferFromERC721Loop(token, from, address(this), self.ids); } else if (self.erc == TokenStandard.ERC1155Batch) { success = _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); } else { @@ -234,8 +236,17 @@ library LibTokenInfo { } if (self.erc == TokenStandard.ERC721) { - if (!_tryTransferFromERC721(token, address(this), to, self.id)) { - if (!_tryMintERC721(token, to, self.id)) revert ErrERC721MintingFailed(); + if (!_tryTransferOutOrMintERC721(token, to, self.id)) { + revert ErrERC721MintingFailed(); + } + + return; + } + + if (self.erc == TokenStandard.ERC721Batch) { + for (uint256 i; i < self.ids.length; ++i) { + uint256 id = self.ids[i]; + if (!_tryTransferOutOrMintERC721(token, to, id)) revert ErrERC721MintingFailed(); } return; @@ -298,6 +309,17 @@ library LibTokenInfo { (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity)); } + /** + * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721. + * @return success Returns `false` if both transfer and mint are failed. + */ + function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) { + success = _tryTransferFromERC721(token, address(this), to, id); + if (!success) { + return _tryMintERC721(token, to, id); + } + } + /** * @dev Transfers ERC721 token and returns the result. */ @@ -305,6 +327,25 @@ library LibTokenInfo { (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id)); } + /** + * @dev Transfers ERC721 token in a loop and returns the result. + * + * If there is fail when transfer one `id`, the loop will break early to save gas. + * Consumer of this method should revert the transaction if receive `false` success status. + */ + function _tryTransferFromERC721Loop(address token, address from, address to, uint256[] memory ids) + private + returns (bool success) + { + for (uint256 i; i < ids.length; ++i) { + if (!_tryTransferFromERC721(token, from, to, ids[i])) { + return false; // Break early if send fails + } + } + + return true; + } + /** * @dev Mints ERC721 token and returns the result. */ From 3d39232c2e8e9e76c6433c401fe40708b1244a56 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 13 Mar 2024 17:26:23 +0700 Subject: [PATCH 068/305] fix(Info): chore: update docs --- src/libraries/LibTokenInfo.sol | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 2462534c..bb27ab52 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -34,8 +34,10 @@ library LibTokenInfo { /// @dev Error indicating that the minting of ERC721 tokens has failed. error ErrERC721MintingFailed(); - /// @dev Error indicating that the transfer of ERC1155 tokens in batch has failed. + /// @dev Error indicating that the transfer of ERC1155 tokens has failed. error ErrERC1155TransferFailed(); + + /// @dev Error indicating that the mint of ERC1155 tokens in batch has failed. error ErrERC1155MintBatchFailed(); /// @dev Error indicating that an unsupported standard is encountered. @@ -80,7 +82,7 @@ library LibTokenInfo { // keccak256("TokenInfo(uint8 erc,uint256 id,uint256 quantity)"); bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d; - // keccak256("TokenInfo(uint8 erc,uint256[] id,uint256[] quantity)"); + // keccak256("TokenInfo(uint8 erc,uint256[] ids,uint256[] quantities)"); bytes32 public constant INFO_TYPE_HASH_BATCH = 0xe0d9a8bb18cfc29aa6e46b1293275ca79aeaaf28ac63b66dcb6ebce2f127f5a0; /** @@ -176,12 +178,12 @@ library LibTokenInfo { /** * - * TRANSFER + * TRANSFER IN/OUT METHOD * */ /** - * @dev Transfer asset from. + * @dev Transfer asset in. * * Requirements: * - The `_from` address must approve for the contract using this library. @@ -208,7 +210,7 @@ library LibTokenInfo { } /** - * @dev Tries minting and transfering assets. + * @dev Tries transfer assets out, or mint the assets if cannot transfer. * * @notice Prioritizes transfer native token if the token is wrapped. * From e9d643502b577a4b6f045dfd4a9e1d4d27465b18 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 14 Mar 2024 11:59:44 +0700 Subject: [PATCH 069/305] fix(Info): fix validation --- src/libraries/LibTokenInfo.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index bb27ab52..0c094ffc 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -135,7 +135,7 @@ library LibTokenInfo { * @dev Validates the token info. */ function validate(TokenInfo memory self) internal pure { - if (!(_validateERC20(self) || _validateERC721(self)) || _validateERC721Batch(self) || _validateERC1155Batch(self)) { + if (!(_validateERC20(self) || _validateERC721(self) || _validateERC721Batch(self) || _validateERC1155Batch(self))) { revert ErrInvalidInfo(); } } From db9277df4ce074629908659c20cf425ae04eacda Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 14 Mar 2024 17:01:34 +0700 Subject: [PATCH 070/305] fix(MainchainGateway): enable fallback --- src/mainchain/MainchainGatewayV3.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index f51333f7..6b0cbb79 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -44,11 +44,11 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro WethMediator public wethMediator; fallback() external payable { - // _fallback(); + _fallback(); } receive() external payable { - // _fallback(); + _fallback(); } /** From 532a9c89bf6548b8b70d093bd29b338551e9c6c0 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 14 Mar 2024 18:11:09 +0700 Subject: [PATCH 071/305] fix(MainchainGateway): change logic of WethMediator to WethUnwrapper --- script/BridgeMigration.sol | 2 +- script/GeneralConfig.sol | 2 +- .../MainchainWethMediatorDeploy.s.sol | 23 -------- .../MainchainWethUnwrapperDeploy.s.sol | 23 ++++++++ script/interfaces/ISharedArgument.sol | 4 +- script/utils/Contract.sol | 4 +- src/extensions/WethMediator.sol | 44 --------------- src/extensions/WethUnwrapper.sol | 54 +++++++++++++++++++ src/interfaces/IWETH.sol | 4 ++ src/mainchain/MainchainGatewayV3.sol | 15 +++--- test/bridge/integration/BaseIntegration.t.sol | 20 +++---- 11 files changed, 101 insertions(+), 94 deletions(-) delete mode 100644 script/contracts/MainchainWethMediatorDeploy.s.sol create mode 100644 script/contracts/MainchainWethUnwrapperDeploy.s.sol delete mode 100644 src/extensions/WethMediator.sol create mode 100644 src/extensions/WethUnwrapper.sol diff --git a/script/BridgeMigration.sol b/script/BridgeMigration.sol index 17612c72..4cde39f8 100644 --- a/script/BridgeMigration.sol +++ b/script/BridgeMigration.sol @@ -139,4 +139,4 @@ contract BridgeMigration is BaseMigration { } } } -} +} \ No newline at end of file diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 8b6a4f16..3d5de15f 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -58,7 +58,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _contractNameMap[Contract.RoninPauseEnforcer.key()] = "PauseEnforcer"; _contractNameMap[Contract.MainchainPauseEnforcer.key()] = "PauseEnforcer"; - _contractNameMap[Contract.MainchainWethMediator.key()] = "WethMediator"; + _contractNameMap[Contract.MainchainWethUnwrapper.key()] = "WethUnwrapper"; } function _mapContractName(Contract contractEnum) internal { diff --git a/script/contracts/MainchainWethMediatorDeploy.s.sol b/script/contracts/MainchainWethMediatorDeploy.s.sol deleted file mode 100644 index 65d15b9b..00000000 --- a/script/contracts/MainchainWethMediatorDeploy.s.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import { WethMediator } from "@ronin/contracts/extensions/WethMediator.sol"; -import { Contract } from "../utils/Contract.sol"; -import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import { Migration } from "../Migration.s.sol"; - - -contract MainchainWethMediatorDeploy is Migration { - function _defaultArguments() internal virtual override returns (bytes memory args) { - ISharedArgument.WethMediatorParam memory param = config.sharedArguments().mainchainWethMediator; - - args = abi.encode( - param.weth, - param.owner - ); - } - - function run() public virtual returns (WethMediator) { - return WethMediator(_deployImmutable(Contract.MainchainWethMediator.key())); - } -} diff --git a/script/contracts/MainchainWethUnwrapperDeploy.s.sol b/script/contracts/MainchainWethUnwrapperDeploy.s.sol new file mode 100644 index 00000000..bdce4293 --- /dev/null +++ b/script/contracts/MainchainWethUnwrapperDeploy.s.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { WethUnwrapper } from "@ronin/contracts/extensions/WethUnwrapper.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; + +contract MainchainWethUnwrapperDeploy is Migration { + function _defaultArguments() internal virtual override returns (bytes memory args) { + ISharedArgument.WethUnwrapperParam memory param = config.sharedArguments().mainchainWethUnwrapper; + + args = abi.encode(param.weth); + } + + function run() public virtual returns (WethUnwrapper) { + return WethUnwrapper(_deployImmutable(Contract.MainchainWethUnwrapper.key())); + } + + function runWithArgs(bytes memory args) public virtual returns (WethUnwrapper) { + return WethUnwrapper(_deployImmutable(Contract.MainchainWethUnwrapper.key(), args)); + } +} diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index dc2e8090..a736e615 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -106,7 +106,7 @@ interface ISharedArgument is IGeneralConfig { uint256[] governorPKs; } - struct WethMediatorParam { + struct WethUnwrapperParam { address weth; address owner; } @@ -116,7 +116,7 @@ interface ISharedArgument is IGeneralConfig { BridgeManagerParam mainchainBridgeManager; MainchainGatewayV3Param mainchainGatewayV3; PauseEnforcerParam mainchainPauseEnforcer; - WethMediatorParam mainchainWethMediator; + WethUnwrapperParam mainchainWethUnwrapper; // ronin BridgeManagerParam roninBridgeManager; RoninGatewayV3Param roninGatewayV3; diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index a1c8e9c4..3442649f 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -19,7 +19,7 @@ enum Contract { MainchainPauseEnforcer, MainchainGatewayV3, MainchainBridgeManager, - MainchainWethMediator + MainchainWethUnwrapper } using { key, name } for Contract global; @@ -46,7 +46,7 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.MainchainPauseEnforcer) return "PauseEnforcer"; if (contractEnum == Contract.MainchainGatewayV3) return "MainchainGatewayV3"; if (contractEnum == Contract.MainchainBridgeManager) return "MainchainBridgeManager"; - if (contractEnum == Contract.MainchainWethMediator) return "WethMediator"; + if (contractEnum == Contract.MainchainWethUnwrapper) return "WethUnwrapper"; revert("Contract: Unknown contract"); } diff --git a/src/extensions/WethMediator.sol b/src/extensions/WethMediator.sol deleted file mode 100644 index 6cc6ee00..00000000 --- a/src/extensions/WethMediator.sol +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.9; - -import "@openzeppelin/contracts/access/Ownable.sol"; - -import "../interfaces/IWETH.sol"; - -contract WethMediator is Ownable { - IWETH public weth; - - error ErrInsufficientBalance(); - error ErrExternalCallFailed(address sender, bytes4 sig); - - constructor(address weth_, address owner_) { - weth = IWETH(weth_); - - if (owner_ != address(0)) { - _transferOwnership(owner_); - } - } - - fallback() external payable { } - receive() external payable { } - - function transferToVault(uint val) external { - weth.withdraw(val); - } - - function withdrawToOwner(uint val) external onlyOwner { - if (val > address(this).balance) { - revert ErrInsufficientBalance(); - } - - (bool success,) = payable(msg.sender).call{ value: val }(""); - if (!success) { - revert ErrExternalCallFailed(msg.sender, msg.sig); - } - } - - function setWeth(address weth_) external onlyOwner { - weth = IWETH(weth_); - } -} diff --git a/src/extensions/WethUnwrapper.sol b/src/extensions/WethUnwrapper.sol new file mode 100644 index 00000000..b86b3f88 --- /dev/null +++ b/src/extensions/WethUnwrapper.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; +import "../interfaces/IWETH.sol"; + +contract WethUnwrapper is ReentrancyGuard { + IWETH public immutable weth; + + error ErrCannotTransferFrom(); + error ErrNotWrappedContract(); + error ErrExternalCallFailed(address sender, bytes4 sig); + + constructor(address weth_) { + if (address(weth_).code.length == 0) revert ErrNotWrappedContract(); + weth = IWETH(weth_); + } + + fallback() external payable { + _fallback(); + } + + receive() external payable { + _fallback(); + } + + function unwrap(uint256 amount) external nonReentrant { + _deductWrappedAndWithdraw(amount); + _sendNativeTo(payable(msg.sender), amount); + } + + function unwrapTo(uint256 amount, address payable to) external nonReentrant { + _deductWrappedAndWithdraw(amount); + _sendNativeTo(payable(to), amount); + } + + function _deductWrappedAndWithdraw(uint256 amount) internal { + (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount))); + if (!success) revert ErrCannotTransferFrom(); + + weth.withdraw(amount); + } + + function _sendNativeTo(address payable to, uint256 val) internal { + (bool success,) = to.call{ value: val }(""); + if (!success) { + revert ErrExternalCallFailed(to, msg.sig); + } + } + + function _fallback() internal view { + if (msg.sender != address(weth)) revert ErrNotWrappedContract(); + } +} diff --git a/src/interfaces/IWETH.sol b/src/interfaces/IWETH.sol index 5c00275f..67588c49 100644 --- a/src/interfaces/IWETH.sol +++ b/src/interfaces/IWETH.sol @@ -8,6 +8,10 @@ interface IWETH { function transfer(address dst, uint wad) external returns (bool); + function approve(address guy, uint wad) external returns (bool); + + function transferFrom(address src, address dst, uint wad) external returns (bool); + function withdraw(uint256 _wad) external; function balanceOf(address) external view returns (uint256); diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 6b0cbb79..98ac1ca6 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -6,7 +6,7 @@ import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { IBridgeManager } from "../interfaces/bridge/IBridgeManager.sol"; import { IBridgeManagerCallback } from "../interfaces/bridge/IBridgeManagerCallback.sol"; import { HasContracts, ContractType } from "../extensions/collections/HasContracts.sol"; -import "../extensions/WethMediator.sol"; +import "../extensions/WethUnwrapper.sol"; import "../extensions/WithdrawalLimitation.sol"; import "../libraries/Transfer.sol"; import "../interfaces/IMainchainGatewayV3.sol"; @@ -41,7 +41,7 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro uint96 private _totalOperatorWeight; mapping(address operator => uint96 weight) private _operatorWeight; - WethMediator public wethMediator; + WethUnwrapper public wethUnwrapper; fallback() external payable { _fallback(); @@ -110,8 +110,8 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro _totalOperatorWeight = totalWeight; } - function initializeV4(address payable wethMediator_) external reinitializer(4) { - wethMediator = WethMediator(wethMediator_); + function initializeV4(address payable wethUnwrapper_) external reinitializer(4) { + wethUnwrapper = WethUnwrapper(wethUnwrapper_); } /** @@ -343,11 +343,10 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro _request.info.transferFrom(_requester, address(this), _request.tokenAddr); // Withdraw if token is WETH - // The withdraw of WETH must go via `WethMediator`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy. + // The withdraw of WETH must go via `WethUnwrapper`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy. if (_roninWeth == _request.tokenAddr) { - IWETH(_roninWeth).transfer(address(wethMediator), _request.info.quantity); - wethMediator.transferToVault(_request.info.quantity); - wethMediator.withdrawToOwner(_request.info.quantity); + wrappedNativeToken.approve(address(wethUnwrapper), _request.info.quantity); + wethUnwrapper.unwrap(_request.info.quantity); } } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index e87e2293..d2cabd9c 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -16,7 +16,7 @@ import { BridgeSlash } from "@ronin/contracts/ronin/gateway/BridgeSlash.sol"; import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; -import { WethMediator } from "@ronin/contracts/extensions/WethMediator.sol"; +import { WethUnwrapper } from "@ronin/contracts/extensions/WethUnwrapper.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; @@ -49,7 +49,7 @@ import { RoninPauseEnforcerDeploy } from "@ronin/script/contracts/RoninPauseEnfo import { MainchainGatewayV3Deploy } from "@ronin/script/contracts/MainchainGatewayV3Deploy.s.sol"; import { MainchainBridgeManagerDeploy } from "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import { MainchainPauseEnforcerDeploy } from "@ronin/script/contracts/MainchainPauseEnforcerDeploy.s.sol"; -import { MainchainWethMediatorDeploy } from "@ronin/script/contracts/MainchainWethMediatorDeploy.s.sol"; +import { MainchainWethUnwrapperDeploy } from "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; import { WETHDeploy } from "@ronin/script/contracts/token/WETHDeploy.s.sol"; import { WRONDeploy } from "@ronin/script/contracts/token/WRONDeploy.s.sol"; import { AXSDeploy } from "@ronin/script/contracts/token/AXSDeploy.s.sol"; @@ -76,7 +76,7 @@ contract BaseIntegration_Test is Base_Test { PauseEnforcer _mainchainPauseEnforcer; MainchainGatewayV3 _mainchainGatewayV3; MainchainBridgeManager _mainchainBridgeManager; - WethMediator _mainchainWethMediator; + WethUnwrapper _mainchainWethUnwrapper; MockWrappedToken _roninWeth; MockWrappedToken _roninWron; @@ -138,7 +138,6 @@ contract BaseIntegration_Test is Base_Test { _mainchainPauseEnforcer = new MainchainPauseEnforcerDeploy().run(); _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); - _mainchainWethMediator = new MainchainWethMediatorDeploy().run(); _mainchainWeth = new WETHDeploy().run(); _mainchainAxs = new AXSDeploy().run(); @@ -146,6 +145,9 @@ contract BaseIntegration_Test is Base_Test { _mainchainUsdc = new USDCDeploy().run(); _mainchainMockERC721 = new MockERC721Deploy().run(); + bytes memory args = abi.encode(_mainchainWeth); + _mainchainWethUnwrapper = new MainchainWethUnwrapperDeploy().runWithArgs(args); + _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); _mainchainProposalUtils = new MainchainBridgeAdminUtils(_param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0]); } @@ -167,7 +169,6 @@ contract BaseIntegration_Test is Base_Test { _mainchainPauseEnforcerInitialize(); _constructForMainchainBridgeManager(); _mainchainGatewayV3Initialize(); - _constructForMainchainWethMediator(); } function _getMainchainAndRoninTokens() internal view returns (address[] memory mainchainTokens, address[] memory roninTokens) { @@ -433,13 +434,6 @@ contract BaseIntegration_Test is Base_Test { } } - function _constructForMainchainWethMediator() internal { - vm.startPrank(_config.getSender()); - _mainchainWethMediator.setWeth(address(_mainchainWeth)); - _mainchainWethMediator.transferOwnership(address(_mainchainGatewayV3)); - vm.stopPrank(); - } - function _mainchainGatewayV3Initialize() internal { (address[] memory mainchainTokens, address[] memory roninTokens) = _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; @@ -498,7 +492,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); _mainchainGatewayV3.initializeV3(_param.mainchainBridgeManager.bridgeOperators, _param.mainchainBridgeManager.voteWeights); - _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethMediator))); + _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethUnwrapper))); } function _mainchainPauseEnforcerInitialize() internal { From 2ca888ef675ce8e1f9eff355548c35952c111b1d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 15 Mar 2024 16:34:11 +0700 Subject: [PATCH 072/305] test: add test for ERC721 Batch --- ...tDepositFor.Batch.MainchainGatewayV3.t.sol | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol diff --git a/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol new file mode 100644 index 00000000..5e65a080 --- /dev/null +++ b/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; + +import "../BaseIntegration.t.sol"; + +interface IERC721 { + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); +} + +interface IERC20 { + event Transfer(address indexed from, address indexed to, uint256 value); +} + +contract RequestDepositFor_Batch_MainchainGatewayV3_Test is BaseIntegration_Test { + event DepositRequested(bytes32 receiptHash, LibTransfer.Receipt receipt); + + using LibTransfer for LibTransfer.Request; + using LibTransfer for LibTransfer.Receipt; + + LibTransfer.Request _depositRequest; + + address _sender; + uint256 _quantity; + + function setUp() public virtual override { + super.setUp(); + + _sender = makeAddr("sender"); + _quantity = 10; + + _depositRequest.recipientAddr = makeAddr("recipient"); + _depositRequest.tokenAddr = address(0); + _depositRequest.info.erc = TokenStandard.ERC20; + _depositRequest.info.id = 0; + _depositRequest.info.quantity = _quantity; + + vm.deal(_sender, 10 ether); + } + + // deposit erc721 in batch (2 ids), both success + function test_depositERC721Batch_Success() public { + uint256 tokenId1 = 22; + uint256 tokenId2 = 23; + _mainchainMockERC721.mint(_sender, tokenId1); + _mainchainMockERC721.mint(_sender, tokenId2); + vm.startPrank(_sender); + _mainchainMockERC721.approve(address(_mainchainGatewayV3), tokenId1); + _mainchainMockERC721.approve(address(_mainchainGatewayV3), tokenId2); + vm.stopPrank(); + + _depositRequest.tokenAddr = address(_mainchainMockERC721); + _depositRequest.info.erc = TokenStandard.ERC721Batch; + _depositRequest.info.id = 0; + _depositRequest.info.quantity = 0; + _depositRequest.info.ids = new uint256[](2); + _depositRequest.info.ids[0] = tokenId1; + _depositRequest.info.ids[1] = tokenId2; + _depositRequest.info.quantities = new uint256[](2); + + LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt( + _sender, _mainchainGatewayV3.depositCount(), address(_roninMockERC721), block.chainid + ); + vm.expectEmit(address(_mainchainGatewayV3)); + emit DepositRequested(receipt.hash(), receipt); + + assertEq(_mainchainMockERC721.ownerOf(tokenId1), _sender); + assertEq(_mainchainMockERC721.ownerOf(tokenId2), _sender); + + vm.prank(_sender); + _mainchainGatewayV3.requestDepositFor(_depositRequest); + + assertEq(_mainchainMockERC721.ownerOf(tokenId1), address(_mainchainGatewayV3)); + assertEq(_mainchainMockERC721.ownerOf(tokenId2), address(_mainchainGatewayV3)); + assertEq(_mainchainGatewayV3.depositCount(), 1); + } +} From 4e044622a838dbf2caa8ca3b07ba2647dbce8c8d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 18 Mar 2024 13:56:46 +0700 Subject: [PATCH 073/305] fea(GatewayBatcher): init commit --- script/GeneralConfig.sol | 1 + .../MainchainGatewayBatcherDeploy.s.sol | 17 ++ script/utils/Contract.sol | 2 + src/libraries/LibTokenInfo.sol | 141 ++++++++-------- src/libraries/LibTokenInfoBatch.sol | 150 ++++++++++++++++++ src/mainchain/MainchainGatewayBatcher.sol | 107 +++++++++++++ test/bridge/integration/BaseIntegration.t.sol | 7 + .../updateOperator.RoninBridgeManager.t.sol | 6 +- ...tDepositFor.Batch.MainchainGatewayV3.t.sol | 98 +++++++----- .../emergencyAction.PauseEnforcer.t.sol | 12 +- .../depositVote.RoninGatewayV3.t.sol | 6 +- 11 files changed, 427 insertions(+), 120 deletions(-) create mode 100644 script/contracts/MainchainGatewayBatcherDeploy.s.sol create mode 100644 src/libraries/LibTokenInfoBatch.sol create mode 100644 src/mainchain/MainchainGatewayBatcher.sol diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 2651f1f0..e74e2520 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -46,6 +46,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _mapContractName(Contract.RoninGatewayV3); _mapContractName(Contract.RoninBridgeManager); _mapContractName(Contract.MainchainGatewayV3); + _mapContractName(Contract.MainchainGatewayBatcher); _mapContractName(Contract.MainchainBridgeManager); _mapContractName(Contract.MockERC721); diff --git a/script/contracts/MainchainGatewayBatcherDeploy.s.sol b/script/contracts/MainchainGatewayBatcherDeploy.s.sol new file mode 100644 index 00000000..9758e0e9 --- /dev/null +++ b/script/contracts/MainchainGatewayBatcherDeploy.s.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { MainchainGatewayBatcher } from "@ronin/contracts/mainchain/MainchainGatewayBatcher.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; + +contract MainchainGatewayBatcherDeploy is Migration { + function run() public virtual returns (MainchainGatewayBatcher) { + return MainchainGatewayBatcher(_deployProxy(Contract.MainchainGatewayBatcher.key(), EMPTY_ARGS)); + } + + function runWithArgs(bytes memory args) public virtual returns (MainchainGatewayBatcher) { + return MainchainGatewayBatcher(_deployProxy(Contract.MainchainGatewayBatcher.key(), args)); + } +} diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index e94823f6..d9ccc2ca 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -18,6 +18,7 @@ enum Contract { RoninBridgeManager, MainchainPauseEnforcer, MainchainGatewayV3, + MainchainGatewayBatcher, MainchainBridgeManager } @@ -44,6 +45,7 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.MainchainPauseEnforcer) return "PauseEnforcer"; if (contractEnum == Contract.MainchainGatewayV3) return "MainchainGatewayV3"; + if (contractEnum == Contract.MainchainGatewayBatcher) return "MainchainGatewayBatcher"; if (contractEnum == Contract.MainchainBridgeManager) return "MainchainBridgeManager"; revert("Contract: Unknown contract"); diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 0c094ffc..3aeda7e3 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -10,8 +10,7 @@ import "../interfaces/IWETH.sol"; enum TokenStandard { ERC20, ERC721, - ERC721Batch, - ERC1155Batch + ERC1155 } struct TokenInfo { @@ -20,46 +19,44 @@ struct TokenInfo { // For ERC721: the quantity must be 0. uint256 id; uint256 quantity; - uint256[] ids; - uint256[] quantities; } -library LibTokenInfo { - /// @dev Error indicating that the provided information is invalid. - error ErrInvalidInfo(); +/** + * @dev Error indicating that the `transfer` has failed. + * @param tokenInfo Info of the token including ERC standard, id or quantity. + * @param to Receiver of the token value. + * @param token Address of the token. + */ +error ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token); - /// @dev Error indicating that the minting of ERC20 tokens has failed. - error ErrERC20MintingFailed(); +/** + * @dev Error indicating that the `handleAssetIn` has failed. + * @param tokenInfo Info of the token including ERC standard, id or quantity. + * @param from Owner of the token value. + * @param to Receiver of the token value. + * @param token Address of the token. + */ +error ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token); - /// @dev Error indicating that the minting of ERC721 tokens has failed. - error ErrERC721MintingFailed(); +/// @dev Error indicating that the provided information is invalid. +error ErrInvalidInfo(); - /// @dev Error indicating that the transfer of ERC1155 tokens has failed. - error ErrERC1155TransferFailed(); +/// @dev Error indicating that the minting of ERC20 tokens has failed. +error ErrERC20MintingFailed(); - /// @dev Error indicating that the mint of ERC1155 tokens in batch has failed. - error ErrERC1155MintBatchFailed(); +/// @dev Error indicating that the minting of ERC721 tokens has failed. +error ErrERC721MintingFailed(); - /// @dev Error indicating that an unsupported standard is encountered. - error ErrUnsupportedStandard(); +/// @dev Error indicating that the transfer of ERC1155 tokens has failed. +error ErrERC1155TransferFailed(); - /** - * @dev Error indicating that the `transfer` has failed. - * @param tokenInfo Info of the token including ERC standard, id or quantity. - * @param to Receiver of the token value. - * @param token Address of the token. - */ - error ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token); +/// @dev Error indicating that the mint of ERC1155 tokens in batch has failed. +error ErrERC1155MintBatchFailed(); - /** - * @dev Error indicating that the `handleAssetIn` has failed. - * @param tokenInfo Info of the token including ERC standard, id or quantity. - * @param from Owner of the token value. - * @param to Receiver of the token value. - * @param token Address of the token. - */ - error ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token); +/// @dev Error indicating that an unsupported standard is encountered. +error ErrUnsupportedStandard(); +library LibTokenInfo { /** * * ROUTER @@ -70,7 +67,7 @@ library LibTokenInfo { } function _isStandardBatch(TokenStandard standard) private pure returns (bool) { - return standard == TokenStandard.ERC721Batch || standard == TokenStandard.ERC1155Batch; + // return standard == TokenStandard.ERC721Batch || standard == TokenStandard.ERC1155Batch; } /** @@ -149,31 +146,31 @@ library LibTokenInfo { } function _validateERC721Batch(TokenInfo memory self) private pure returns (bool res) { - uint256 length = self.ids.length; + // uint256 length = self.ids.length; - res = self.erc == TokenStandard.ERC721Batch && _validateBatch(self); + // res = self.erc == TokenStandard.ERC721Batch && _validateBatch(self); - for (uint256 i; i < length; ++i) { - if (self.quantities[i] != 0) { - return false; - } - } + // for (uint256 i; i < length; ++i) { + // if (self.quantities[i] != 0) { + // return false; + // } + // } } function _validateERC1155Batch(TokenInfo memory self) private pure returns (bool res) { - uint256 length = self.ids.length; - res = self.erc == TokenStandard.ERC1155Batch && _validateBatch(self); - - for (uint256 i; i < length; ++i) { - if (self.quantities[i] == 0) { - return false; - } - } + // uint256 length = self.ids.length; + // res = self.erc == TokenStandard.ERC1155Batch && _validateBatch(self); + + // for (uint256 i; i < length; ++i) { + // if (self.quantities[i] == 0) { + // return false; + // } + // } } function _validateBatch(TokenInfo memory self) private pure returns (bool res) { - return self.quantity == 0 && self.id == 0 && self.ids.length > 0 && self.quantities.length > 0 - && self.ids.length == self.quantities.length; + // return self.quantity == 0 && self.id == 0 && self.ids.length > 0 && self.quantities.length > 0 + // && self.ids.length == self.quantities.length; } /** @@ -198,10 +195,10 @@ library LibTokenInfo { success = success && (data.length == 0 || abi.decode(data, (bool))); } else if (self.erc == TokenStandard.ERC721) { success = _tryTransferFromERC721(token, from, address(this), self.id); - } else if (self.erc == TokenStandard.ERC721Batch) { - success = _tryTransferFromERC721Loop(token, from, address(this), self.ids); - } else if (self.erc == TokenStandard.ERC1155Batch) { - success = _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); + // } else if (self.erc == TokenStandard.ERC721Batch) { + // success = _tryTransferFromERC721Loop(token, from, address(this), self.ids); + // } else if (self.erc == TokenStandard.ERC1155Batch) { + // success = _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); } else { revert ErrUnsupportedStandard(); } @@ -245,29 +242,29 @@ library LibTokenInfo { return; } - if (self.erc == TokenStandard.ERC721Batch) { - for (uint256 i; i < self.ids.length; ++i) { - uint256 id = self.ids[i]; - if (!_tryTransferOutOrMintERC721(token, to, id)) revert ErrERC721MintingFailed(); - } + // if (self.erc == TokenStandard.ERC721Batch) { + // for (uint256 i; i < self.ids.length; ++i) { + // uint256 id = self.ids[i]; + // if (!_tryTransferOutOrMintERC721(token, to, id)) revert ErrERC721MintingFailed(); + // } - return; - } + // return; + // } - if (self.erc == TokenStandard.ERC1155Batch) { - (uint256[] memory toMintIds, uint256[] memory toMintAmounts) = - _calcLackBalancesERC1155(address(this), token, self.ids, self.quantities); + // if (self.erc == TokenStandard.ERC1155Batch) { + // (uint256[] memory toMintIds, uint256[] memory toMintAmounts) = + // _calcLackBalancesERC1155(address(this), token, self.ids, self.quantities); - if (toMintIds.length > 0) { - if (!_tryMintERC1155Batch(token, address(this), toMintIds, toMintAmounts)) revert ErrERC1155MintBatchFailed(); - } + // if (toMintIds.length > 0) { + // if (!_tryMintERC1155Batch(token, address(this), toMintIds, toMintAmounts)) revert ErrERC1155MintBatchFailed(); + // } - if (!_tryTransferERC1155Batch(token, address(this), to, self.ids, self.quantities)) { - revert ErrERC1155TransferFailed(); - } + // if (!_tryTransferERC1155Batch(token, address(this), to, self.ids, self.quantities)) { + // revert ErrERC1155TransferFailed(); + // } - return; - } + // return; + // } revert ErrUnsupportedStandard(); } diff --git a/src/libraries/LibTokenInfoBatch.sol b/src/libraries/LibTokenInfoBatch.sol new file mode 100644 index 00000000..7370e817 --- /dev/null +++ b/src/libraries/LibTokenInfoBatch.sol @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; +import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; + +import "./LibTokenInfo.sol"; + +struct TokenInfoBatch { + TokenStandard erc; + uint256[] ids; + uint256[] quantities; +} + +/** + * @dev Error indicating that the `transfer` has failed. + * @param tokenInfo Info of the token including ERC standard, id or quantity. + * @param to Receiver of the token value. + * @param token Address of the token. + */ +error ErrTokenBatchCouldNotTransfer(TokenInfoBatch tokenInfo, address to, address token); + +/** + * @dev Error indicating that the `handleAssetIn` has failed. + * @param tokenInfo Info of the token including ERC standard, id or quantity. + * @param from Owner of the token value. + * @param to Receiver of the token value. + * @param token Address of the token. + */ +error ErrTokenBatchCouldNotTransferFrom(TokenInfoBatch tokenInfo, address from, address to, address token); + +library LibTokenInfoBatch { + /** + * + * VALIDATE + * + */ + + /** + * @dev Validates the token info. + */ + function validate(TokenInfoBatch memory self) internal pure { + if (!(_validateERC721Batch(self) || _validateERC1155Batch(self))) { + revert ErrInvalidInfo(); + } + } + + function _validateERC721Batch(TokenInfoBatch memory self) private pure returns (bool res) { + uint256 length = self.ids.length; + + res = self.erc == TokenStandard.ERC721; + + for (uint256 i; i < length; ++i) { + if (self.quantities[i] != 0) { + return false; + } + } + } + + function _validateERC1155Batch(TokenInfoBatch memory self) private pure returns (bool res) { + uint256 length = self.ids.length; + res = self.erc == TokenStandard.ERC1155; + + for (uint256 i; i < length; ++i) { + if (self.quantities[i] == 0) { + return false; + } + } + } + + /** + * + * TRANSFER IN/OUT METHOD + * + */ + + /** + * @dev Transfer asset in. + * + * Requirements: + * - The `_from` address must approve for the contract using this library. + * + */ + function handleAssetIn(TokenInfoBatch memory self, address from, address token) internal { + bool success; + bytes memory data; + if (self.erc == TokenStandard.ERC721) { + success = _tryTransferFromERC721Loop(token, from, address(this), self.ids); + } else if (self.erc == TokenStandard.ERC1155) { + success = _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); + } else { + revert ErrUnsupportedStandard(); + } + + if (!success) revert ErrTokenBatchCouldNotTransferFrom(self, from, address(this), token); + } + + /** + * + * TRANSFER HELPERS + * + */ + + /** + * @dev Transfers ERC721 token and returns the result. + */ + function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) { + (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id)); + } + + /** + * @dev Transfers ERC721 token in a loop and returns the result. + * + * If there is fail when transfer one `id`, the loop will break early to save gas. + * Consumer of this method should revert the transaction if receive `false` success status. + */ + function _tryTransferFromERC721Loop(address token, address from, address to, uint256[] memory ids) + private + returns (bool success) + { + for (uint256 i; i < ids.length; ++i) { + if (!_tryTransferFromERC721(token, from, to, ids[i])) { + return false; // Break early if send fails + } + } + + return true; + } + + /** + * @dev Mints ERC721 token and returns the result. + */ + function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) { + // bytes4(keccak256("mint(address,uint256)")) + (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id)); + } + + /** + * @dev Transfers ERC1155 token in and returns the result. + */ + function _tryTransferERC1155Batch( + address token, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts + ) private returns (bool success) { + (success,) = token.call(abi.encodeCall(IERC1155.safeBatchTransferFrom, (from, to, ids, amounts, new bytes(0)))); + } +} diff --git a/src/mainchain/MainchainGatewayBatcher.sol b/src/mainchain/MainchainGatewayBatcher.sol new file mode 100644 index 00000000..784f5079 --- /dev/null +++ b/src/mainchain/MainchainGatewayBatcher.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +import "../libraries/LibTokenInfoBatch.sol"; +import "./MainchainGatewayV3.sol"; + +contract MainchainGatewayBatcher is Initializable { + MainchainGatewayV3 internal _mainchainGateway; + + constructor() { + _disableInitializers(); + } + + struct RequestBatch { + address recipient; + address tokenAddr; + TokenInfoBatch info; + } + + function initialize(MainchainGatewayV3 gateway) external initializer { + _mainchainGateway = gateway; + } + + /** + * @notice Batch transfer token from user to this Batcher, then sequentially request deposit for to gateway on behalf of user. + * + * @dev This method is a workaround that mostly reduce UX for user when deposit token in batch, meanwhile require zero change on the current Gateway code. + * + * Logic: + * - Validate the RequestBatch + * - `transferFrom` all tokens to this Batcher from user + * - `requestDepositFor` in the loop for each token, in which: + * - each token will be `transferFrom` this Batcher to the Gateway + * - `requester` field in the `Request` struct is this Batcher + * + * Requirement: + * - User must `approveAll` tokens for this Batcher + * - Emit an event that include information of the {RequestBatch} + */ + function requestDepositForBatch(RequestBatch calldata request) external { + _validateRequestBatchERC721(request); + _handleAssetInBatchERC721(request); + + IERC721(request.tokenAddr).setApprovalForAll(address(_mainchainGateway), true); + _forwardRequestToGatewayERC721(request); + } + + function _validateRequestBatchERC721(RequestBatch memory request) internal pure { + if (request.info.erc != TokenStandard.ERC721) { + revert ErrUnsupportedToken(); + } + + if ( + request.info.ids.length == 0 // Request must contain valid array of ids + || request.info.quantities.length != 0 // Quantity of each ERC721 alway is 1, no input to save gas + ) { + revert ErrInvalidRequest(); + } + } + + function _handleAssetInBatchERC721(RequestBatch memory request) internal returns (bool success) { + success = _tryTransferFromERC721Loop(request.tokenAddr, msg.sender, address(this), request.info.ids); + if (!success) { + revert("Transfer Failed"); + } + } + + /** + * @dev Transfers ERC721 token in a loop and returns the result. + * + * If there is fail when transfer one `id`, the loop will break early to save gas. + * Consumer of this method should revert the transaction if receive `false` success status. + */ + function _tryTransferFromERC721Loop(address token, address from, address to, uint256[] memory ids) + private + returns (bool success) + { + for (uint256 i; i < ids.length; ++i) { + if (!_tryTransferFromERC721(token, from, to, ids[i])) { + return false; // Break early if send fails + } + } + + return true; + } + + /** + * @dev Transfers ERC721 token and returns the result. + */ + function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) { + (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id)); + } + + function _forwardRequestToGatewayERC721(RequestBatch memory req) internal { + for (uint256 i; i < req.info.ids.length; i++) { + _mainchainGateway.requestDepositFor( + Transfer.Request({ + recipientAddr: req.recipient, + tokenAddr: req.tokenAddr, + info: TokenInfo({ erc: req.info.erc, id: req.info.ids[i], quantity: 0 }) + }) + ); + } + } +} diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 862e6c88..2eebf35b 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -15,6 +15,7 @@ import { BridgeTracking } from "@ronin/contracts/ronin/gateway/BridgeTracking.so import { BridgeSlash } from "@ronin/contracts/ronin/gateway/BridgeSlash.sol"; import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import { MainchainGatewayBatcher } from "@ronin/contracts/mainchain/MainchainGatewayBatcher.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; @@ -45,6 +46,7 @@ import { BridgeRewardDeploy } from "@ronin/script/contracts/BridgeRewardDeploy.s import { RoninPauseEnforcerDeploy } from "@ronin/script/contracts/RoninPauseEnforcerDeploy.s.sol"; import { MainchainGatewayV3Deploy } from "@ronin/script/contracts/MainchainGatewayV3Deploy.s.sol"; +import { MainchainGatewayBatcherDeploy } from "@ronin/script/contracts/MainchainGatewayBatcherDeploy.s.sol"; import { MainchainBridgeManagerDeploy } from "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import { MainchainPauseEnforcerDeploy } from "@ronin/script/contracts/MainchainPauseEnforcerDeploy.s.sol"; import { WETHDeploy } from "@ronin/script/contracts/token/WETHDeploy.s.sol"; @@ -70,6 +72,7 @@ contract BaseIntegration_Test is Base_Test { PauseEnforcer _mainchainPauseEnforcer; MainchainGatewayV3 _mainchainGatewayV3; + MainchainGatewayBatcher _mainchainGatewayBatcher; MainchainBridgeManager _mainchainBridgeManager; MockWrappedToken _roninWeth; @@ -144,6 +147,10 @@ contract BaseIntegration_Test is Base_Test { _mainchainProposalUtils = new MainchainBridgeAdminUtils( _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] ); + + _mainchainGatewayBatcher = new MainchainGatewayBatcherDeploy().runWithArgs( + abi.encodeCall(MainchainGatewayBatcher.initialize, (_mainchainGatewayV3)) + ); } function _initializeRonin() internal { diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index 785f517c..681386f9 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -29,9 +29,9 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, - quantity: 100, - ids: new uint256[](0), - quantities: new uint256[](0) + quantity: 100 + // ids: new uint256[](0), + // quantities: new uint256[](0) }) }); diff --git a/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol index 5e65a080..2a94541e 100644 --- a/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol @@ -3,25 +3,17 @@ pragma solidity ^0.8.19; import { console2 as console } from "forge-std/console2.sol"; import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; -import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import "@ronin/contracts/libraries/LibTokenInfoBatch.sol"; import "../BaseIntegration.t.sol"; -interface IERC721 { - event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); -} - -interface IERC20 { - event Transfer(address indexed from, address indexed to, uint256 value); -} - contract RequestDepositFor_Batch_MainchainGatewayV3_Test is BaseIntegration_Test { event DepositRequested(bytes32 receiptHash, LibTransfer.Receipt receipt); using LibTransfer for LibTransfer.Request; using LibTransfer for LibTransfer.Receipt; - LibTransfer.Request _depositRequest; + // LibTransfer.Request _depositRequest; address _sender; uint256 _quantity; @@ -32,49 +24,83 @@ contract RequestDepositFor_Batch_MainchainGatewayV3_Test is BaseIntegration_Test _sender = makeAddr("sender"); _quantity = 10; - _depositRequest.recipientAddr = makeAddr("recipient"); - _depositRequest.tokenAddr = address(0); - _depositRequest.info.erc = TokenStandard.ERC20; - _depositRequest.info.id = 0; - _depositRequest.info.quantity = _quantity; + // _depositRequest.recipientAddr = makeAddr("recipient"); + // _depositRequest.tokenAddr = address(0); + // _depositRequest.info.erc = TokenStandard.ERC20; + // _depositRequest.info.id = 0; + // _depositRequest.info.quantity = _quantity; vm.deal(_sender, 10 ether); } // deposit erc721 in batch (2 ids), both success + // function test_depositERC721Batch_Success() public { + // uint256 tokenId1 = 22; + // uint256 tokenId2 = 23; + // _mainchainMockERC721.mint(_sender, tokenId1); + // _mainchainMockERC721.mint(_sender, tokenId2); + // vm.startPrank(_sender); + // _mainchainMockERC721.approve(address(_mainchainGatewayV3), tokenId1); + // _mainchainMockERC721.approve(address(_mainchainGatewayV3), tokenId2); + // vm.stopPrank(); + + // _depositRequest.tokenAddr = address(_mainchainMockERC721); + // _depositRequest.info.erc = TokenStandard.ERC721; + // _depositRequest.info.id = 0; + // _depositRequest.info.quantity = 0; + // _depositRequest.info.ids = new uint256[](2); + // _depositRequest.info.ids[0] = tokenId1; + // _depositRequest.info.ids[1] = tokenId2; + // _depositRequest.info.quantities = new uint256[](2); + + // LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt( + // _sender, _mainchainGatewayV3.depositCount(), address(_roninMockERC721), block.chainid + // ); + // vm.expectEmit(address(_mainchainGatewayV3)); + // emit DepositRequested(receipt.hash(), receipt); + + // assertEq(_mainchainMockERC721.ownerOf(tokenId1), _sender); + // assertEq(_mainchainMockERC721.ownerOf(tokenId2), _sender); + + // vm.prank(_sender); + // _mainchainGatewayV3.requestDepositFor(_depositRequest); + + // assertEq(_mainchainMockERC721.ownerOf(tokenId1), address(_mainchainGatewayV3)); + // assertEq(_mainchainMockERC721.ownerOf(tokenId2), address(_mainchainGatewayV3)); + // assertEq(_mainchainGatewayV3.depositCount(), 1); + // } + function test_depositERC721Batch_Success() public { uint256 tokenId1 = 22; uint256 tokenId2 = 23; _mainchainMockERC721.mint(_sender, tokenId1); _mainchainMockERC721.mint(_sender, tokenId2); + vm.startPrank(_sender); - _mainchainMockERC721.approve(address(_mainchainGatewayV3), tokenId1); - _mainchainMockERC721.approve(address(_mainchainGatewayV3), tokenId2); - vm.stopPrank(); - - _depositRequest.tokenAddr = address(_mainchainMockERC721); - _depositRequest.info.erc = TokenStandard.ERC721Batch; - _depositRequest.info.id = 0; - _depositRequest.info.quantity = 0; - _depositRequest.info.ids = new uint256[](2); - _depositRequest.info.ids[0] = tokenId1; - _depositRequest.info.ids[1] = tokenId2; - _depositRequest.info.quantities = new uint256[](2); - - LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt( - _sender, _mainchainGatewayV3.depositCount(), address(_roninMockERC721), block.chainid - ); - vm.expectEmit(address(_mainchainGatewayV3)); - emit DepositRequested(receipt.hash(), receipt); + _mainchainMockERC721.approve(address(_mainchainGatewayBatcher), tokenId1); + _mainchainMockERC721.approve(address(_mainchainGatewayBatcher), tokenId2); + + MainchainGatewayBatcher.RequestBatch memory req; + req.recipient = makeAddr("recipient"); + req.tokenAddr = address(_mainchainMockERC721); + req.info.erc = TokenStandard.ERC721; + req.info.ids = new uint256[](2); + req.info.ids[0] = tokenId1; + req.info.ids[1] = tokenId2; assertEq(_mainchainMockERC721.ownerOf(tokenId1), _sender); assertEq(_mainchainMockERC721.ownerOf(tokenId2), _sender); - vm.prank(_sender); - _mainchainGatewayV3.requestDepositFor(_depositRequest); + _mainchainGatewayBatcher.requestDepositForBatch(req); + + // LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt( + // _sender, _mainchainGatewayV3.depositCount(), address(_roninMockERC721), block.chainid + // ); + // vm.expectEmit(address(_mainchainGatewayV3)); + // emit DepositRequested(receipt.hash(), receipt); assertEq(_mainchainMockERC721.ownerOf(tokenId1), address(_mainchainGatewayV3)); assertEq(_mainchainMockERC721.ownerOf(tokenId2), address(_mainchainGatewayV3)); - assertEq(_mainchainGatewayV3.depositCount(), 1); + assertEq(_mainchainGatewayV3.depositCount(), 2); } } diff --git a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol index 84d8da3c..4c795f50 100644 --- a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol +++ b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol @@ -33,9 +33,9 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, - quantity: 100, - ids: new uint256[](0), - quantities: new uint256[](0) + quantity: 100 + // ids: new uint256[](0), + // quantities: new uint256[](0) }) }); @@ -76,9 +76,9 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, - quantity: 100, - ids: new uint256[](0), - quantities: new uint256[](0) + quantity: 100 + // ids: new uint256[](0), + // quantities: new uint256[](0) }) }); diff --git a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol index 14af2f15..67166440 100644 --- a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol +++ b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol @@ -30,9 +30,9 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, - quantity: 100, - ids: new uint256[](0), - quantities: new uint256[](0) + quantity: 100 + // ids: new uint256[](0), + // quantities: new uint256[](0) }) }); From 7d7c5d59abaa85566829b8db9001fe572b3b4468 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 18 Mar 2024 14:26:25 +0700 Subject: [PATCH 074/305] feat(GatewayBatcher): separate to two `-Batch` lib --- src/libraries/LibRequestBatch.sol | 47 ++++++++++++ src/libraries/LibTokenInfoBatch.sol | 19 +++-- src/mainchain/MainchainGatewayBatcher.sol | 74 ++----------------- ...tDepositFor.Batch.MainchainGatewayV3.t.sol | 3 +- 4 files changed, 67 insertions(+), 76 deletions(-) create mode 100644 src/libraries/LibRequestBatch.sol diff --git a/src/libraries/LibRequestBatch.sol b/src/libraries/LibRequestBatch.sol new file mode 100644 index 00000000..5d309bdb --- /dev/null +++ b/src/libraries/LibRequestBatch.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "../interfaces/IMainchainGatewayV3.sol"; +import { TokenInfoBatch, ErrUnsupportedStandard } from "./LibTokenInfoBatch.sol"; + +struct RequestBatch { + address recipient; + address tokenAddr; + TokenInfoBatch info; +} + +library LibRequestBatch { + function forwardRequestToGateway(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { + if (req.info.erc == TokenStandard.ERC721) { + _forwardRequestToGatewayERC721(req, mainchainGateway); + } else if (req.info.erc == TokenStandard.ERC1155) { + _forwardRequestToGatewayERC1155(req, mainchainGateway); + } else { + revert ErrUnsupportedStandard(); + } + } + + function _forwardRequestToGatewayERC721(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { + for (uint256 i; i < req.info.ids.length; i++) { + mainchainGateway.requestDepositFor( + Transfer.Request({ + recipientAddr: req.recipient, + tokenAddr: req.tokenAddr, + info: TokenInfo({ erc: req.info.erc, id: req.info.ids[i], quantity: 0 }) + }) + ); + } + } + + function _forwardRequestToGatewayERC1155(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { + for (uint256 i; i < req.info.ids.length; i++) { + mainchainGateway.requestDepositFor( + Transfer.Request({ + recipientAddr: req.recipient, + tokenAddr: req.tokenAddr, + info: TokenInfo({ erc: req.info.erc, id: req.info.ids[i], quantity: req.info.quantities[i] }) + }) + ); + } + } +} diff --git a/src/libraries/LibTokenInfoBatch.sol b/src/libraries/LibTokenInfoBatch.sol index 7370e817..0570bc86 100644 --- a/src/libraries/LibTokenInfoBatch.sol +++ b/src/libraries/LibTokenInfoBatch.sol @@ -48,24 +48,27 @@ library LibTokenInfoBatch { function _validateERC721Batch(TokenInfoBatch memory self) private pure returns (bool res) { uint256 length = self.ids.length; - res = self.erc == TokenStandard.ERC721; - - for (uint256 i; i < length; ++i) { - if (self.quantities[i] != 0) { - return false; - } - } + return self.erc == TokenStandard.ERC721 // Check ERC721 + && self.ids.length != 0 // Info must contain valid array of ids + && self.quantities.length == 0; // Quantity of each ERC721 alway is 1, no input to save gas } function _validateERC1155Batch(TokenInfoBatch memory self) private pure returns (bool res) { uint256 length = self.ids.length; - res = self.erc == TokenStandard.ERC1155; + // Info must have same length for each token id + if (self.erc == TokenStandard.ERC1155 || length != self.quantities.length) { + return false; + } + + // Each token id must have quantity for (uint256 i; i < length; ++i) { if (self.quantities[i] == 0) { return false; } } + + return true; } /** diff --git a/src/mainchain/MainchainGatewayBatcher.sol b/src/mainchain/MainchainGatewayBatcher.sol index 784f5079..dab743ec 100644 --- a/src/mainchain/MainchainGatewayBatcher.sol +++ b/src/mainchain/MainchainGatewayBatcher.sol @@ -3,22 +3,20 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import "../libraries/LibRequestBatch.sol"; import "../libraries/LibTokenInfoBatch.sol"; import "./MainchainGatewayV3.sol"; contract MainchainGatewayBatcher is Initializable { + using LibRequestBatch for RequestBatch; + using LibTokenInfoBatch for TokenInfoBatch; + MainchainGatewayV3 internal _mainchainGateway; constructor() { _disableInitializers(); } - struct RequestBatch { - address recipient; - address tokenAddr; - TokenInfoBatch info; - } - function initialize(MainchainGatewayV3 gateway) external initializer { _mainchainGateway = gateway; } @@ -40,68 +38,10 @@ contract MainchainGatewayBatcher is Initializable { * - Emit an event that include information of the {RequestBatch} */ function requestDepositForBatch(RequestBatch calldata request) external { - _validateRequestBatchERC721(request); - _handleAssetInBatchERC721(request); + request.info.validate(); + request.info.handleAssetIn(msg.sender, request.tokenAddr); IERC721(request.tokenAddr).setApprovalForAll(address(_mainchainGateway), true); - _forwardRequestToGatewayERC721(request); - } - - function _validateRequestBatchERC721(RequestBatch memory request) internal pure { - if (request.info.erc != TokenStandard.ERC721) { - revert ErrUnsupportedToken(); - } - - if ( - request.info.ids.length == 0 // Request must contain valid array of ids - || request.info.quantities.length != 0 // Quantity of each ERC721 alway is 1, no input to save gas - ) { - revert ErrInvalidRequest(); - } - } - - function _handleAssetInBatchERC721(RequestBatch memory request) internal returns (bool success) { - success = _tryTransferFromERC721Loop(request.tokenAddr, msg.sender, address(this), request.info.ids); - if (!success) { - revert("Transfer Failed"); - } - } - - /** - * @dev Transfers ERC721 token in a loop and returns the result. - * - * If there is fail when transfer one `id`, the loop will break early to save gas. - * Consumer of this method should revert the transaction if receive `false` success status. - */ - function _tryTransferFromERC721Loop(address token, address from, address to, uint256[] memory ids) - private - returns (bool success) - { - for (uint256 i; i < ids.length; ++i) { - if (!_tryTransferFromERC721(token, from, to, ids[i])) { - return false; // Break early if send fails - } - } - - return true; - } - - /** - * @dev Transfers ERC721 token and returns the result. - */ - function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) { - (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id)); - } - - function _forwardRequestToGatewayERC721(RequestBatch memory req) internal { - for (uint256 i; i < req.info.ids.length; i++) { - _mainchainGateway.requestDepositFor( - Transfer.Request({ - recipientAddr: req.recipient, - tokenAddr: req.tokenAddr, - info: TokenInfo({ erc: req.info.erc, id: req.info.ids[i], quantity: 0 }) - }) - ); - } + request.forwardRequestToGateway(_mainchainGateway); } } diff --git a/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol index 2a94541e..35d0611a 100644 --- a/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.19; import { console2 as console } from "forge-std/console2.sol"; import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; +import "@ronin/contracts/libraries/LibRequestBatch.sol"; import "@ronin/contracts/libraries/LibTokenInfoBatch.sol"; import "../BaseIntegration.t.sol"; @@ -80,7 +81,7 @@ contract RequestDepositFor_Batch_MainchainGatewayV3_Test is BaseIntegration_Test _mainchainMockERC721.approve(address(_mainchainGatewayBatcher), tokenId1); _mainchainMockERC721.approve(address(_mainchainGatewayBatcher), tokenId2); - MainchainGatewayBatcher.RequestBatch memory req; + RequestBatch memory req; req.recipient = makeAddr("recipient"); req.tokenAddr = address(_mainchainMockERC721); req.info.erc = TokenStandard.ERC721; From 65bbf4c1cc85cfca9797501f46f76cc2681a8b14 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 18 Mar 2024 15:47:41 +0700 Subject: [PATCH 075/305] feat(GatewayBatcher): refactor by dispatcher --- src/libraries/LibRequestBatch.sol | 14 +------ src/libraries/LibTokenInfo.sol | 6 +-- src/libraries/LibTokenInfoBatch.sol | 44 ++++++++++--------- src/mainchain/MainchainGatewayBatcher.sol | 51 +++++++++++++++++++++-- 4 files changed, 78 insertions(+), 37 deletions(-) diff --git a/src/libraries/LibRequestBatch.sol b/src/libraries/LibRequestBatch.sol index 5d309bdb..dc04e2a2 100644 --- a/src/libraries/LibRequestBatch.sol +++ b/src/libraries/LibRequestBatch.sol @@ -11,17 +11,7 @@ struct RequestBatch { } library LibRequestBatch { - function forwardRequestToGateway(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { - if (req.info.erc == TokenStandard.ERC721) { - _forwardRequestToGatewayERC721(req, mainchainGateway); - } else if (req.info.erc == TokenStandard.ERC1155) { - _forwardRequestToGatewayERC1155(req, mainchainGateway); - } else { - revert ErrUnsupportedStandard(); - } - } - - function _forwardRequestToGatewayERC721(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { + function forwardRequestToGatewayERC721(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { for (uint256 i; i < req.info.ids.length; i++) { mainchainGateway.requestDepositFor( Transfer.Request({ @@ -33,7 +23,7 @@ library LibRequestBatch { } } - function _forwardRequestToGatewayERC1155(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { + function forwardRequestToGatewayERC1155(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { for (uint256 i; i < req.info.ids.length; i++) { mainchainGateway.requestDepositFor( Transfer.Request({ diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 3aeda7e3..469f4ca9 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -132,7 +132,7 @@ library LibTokenInfo { * @dev Validates the token info. */ function validate(TokenInfo memory self) internal pure { - if (!(_validateERC20(self) || _validateERC721(self) || _validateERC721Batch(self) || _validateERC1155Batch(self))) { + if (!(_validateERC20(self) || _validateERC721(self) || _checkERC721Batch(self) || _checkERC1155Batch(self))) { revert ErrInvalidInfo(); } } @@ -145,7 +145,7 @@ library LibTokenInfo { return (self.erc == TokenStandard.ERC721 && self.quantity == 0); } - function _validateERC721Batch(TokenInfo memory self) private pure returns (bool res) { + function _checkERC721Batch(TokenInfo memory self) private pure returns (bool res) { // uint256 length = self.ids.length; // res = self.erc == TokenStandard.ERC721Batch && _validateBatch(self); @@ -157,7 +157,7 @@ library LibTokenInfo { // } } - function _validateERC1155Batch(TokenInfo memory self) private pure returns (bool res) { + function _checkERC1155Batch(TokenInfo memory self) private pure returns (bool res) { // uint256 length = self.ids.length; // res = self.erc == TokenStandard.ERC1155Batch && _validateBatch(self); diff --git a/src/libraries/LibTokenInfoBatch.sol b/src/libraries/LibTokenInfoBatch.sol index 0570bc86..fa68add9 100644 --- a/src/libraries/LibTokenInfoBatch.sol +++ b/src/libraries/LibTokenInfoBatch.sol @@ -39,25 +39,28 @@ library LibTokenInfoBatch { /** * @dev Validates the token info. */ - function validate(TokenInfoBatch memory self) internal pure { - if (!(_validateERC721Batch(self) || _validateERC1155Batch(self))) { + function validate(TokenInfoBatch memory self, function (TokenInfoBatch memory) pure returns (bool) fCheck) + internal + pure + { + if (!fCheck(self)) { revert ErrInvalidInfo(); } } - function _validateERC721Batch(TokenInfoBatch memory self) private pure returns (bool res) { - uint256 length = self.ids.length; - + function checkERC721Batch(TokenInfoBatch memory self) internal pure returns (bool res) { return self.erc == TokenStandard.ERC721 // Check ERC721 && self.ids.length != 0 // Info must contain valid array of ids && self.quantities.length == 0; // Quantity of each ERC721 alway is 1, no input to save gas } - function _validateERC1155Batch(TokenInfoBatch memory self) private pure returns (bool res) { + function checkERC1155Batch(TokenInfoBatch memory self) internal pure returns (bool res) { uint256 length = self.ids.length; - // Info must have same length for each token id - if (self.erc == TokenStandard.ERC1155 || length != self.quantities.length) { + if ( + self.erc == TokenStandard.ERC1155 // Check ERC1155 + || length != self.quantities.length // Info must have same length for each token id + ) { return false; } @@ -84,18 +87,21 @@ library LibTokenInfoBatch { * - The `_from` address must approve for the contract using this library. * */ - function handleAssetIn(TokenInfoBatch memory self, address from, address token) internal { - bool success; - bytes memory data; - if (self.erc == TokenStandard.ERC721) { - success = _tryTransferFromERC721Loop(token, from, address(this), self.ids); - } else if (self.erc == TokenStandard.ERC1155) { - success = _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); - } else { - revert ErrUnsupportedStandard(); - } + function handleAssetIn( + TokenInfoBatch memory self, + address from, + address token, + function (TokenInfoBatch memory, address, address) returns (bool) fHandleAssetIn + ) internal { + if (!fHandleAssetIn(self, from, token)) revert ErrTokenBatchCouldNotTransferFrom(self, from, address(this), token); + } + + function tryHandleAssetInERC721(TokenInfoBatch memory self, address from, address token) internal returns (bool) { + return _tryTransferFromERC721Loop(token, from, address(this), self.ids); + } - if (!success) revert ErrTokenBatchCouldNotTransferFrom(self, from, address(this), token); + function tryHandleAssetInERC1155(TokenInfoBatch memory self, address from, address token) internal returns (bool) { + return _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); } /** diff --git a/src/mainchain/MainchainGatewayBatcher.sol b/src/mainchain/MainchainGatewayBatcher.sol index dab743ec..add22028 100644 --- a/src/mainchain/MainchainGatewayBatcher.sol +++ b/src/mainchain/MainchainGatewayBatcher.sol @@ -21,6 +21,8 @@ contract MainchainGatewayBatcher is Initializable { _mainchainGateway = gateway; } + event BatchDepositRequested(address indexed requested); + /** * @notice Batch transfer token from user to this Batcher, then sequentially request deposit for to gateway on behalf of user. * @@ -38,10 +40,53 @@ contract MainchainGatewayBatcher is Initializable { * - Emit an event that include information of the {RequestBatch} */ function requestDepositForBatch(RequestBatch calldata request) external { - request.info.validate(); - request.info.handleAssetIn(msg.sender, request.tokenAddr); + // Dispatch the corresponding internal methods for each type of ERC + ( + function (TokenInfoBatch memory) pure returns (bool) fCheck, + function (TokenInfoBatch memory, address, address) returns (bool) fHandleAssetIn, + function (RequestBatch memory, IMainchainGatewayV3) fForwardRequestToGateway + ) = _dispatcher(request.info.erc); + + // Revert if validate fails + request.info.validate(fCheck); + + // Revert if cannot transfer all tokens to this Batcher + request.info.handleAssetIn(msg.sender, request.tokenAddr, fHandleAssetIn); + // Approve all tokens from this Batcher to the actual Gateway IERC721(request.tokenAddr).setApprovalForAll(address(_mainchainGateway), true); - request.forwardRequestToGateway(_mainchainGateway); + + // Loop over all token ids and make a deposit request for each + fForwardRequestToGateway(request, _mainchainGateway); + + emit BatchDepositRequested(msg.sender); + } + + function _dispatcher(TokenStandard erc) + private + pure + returns ( + function (TokenInfoBatch memory) pure returns (bool) fValidate, + function (TokenInfoBatch memory, address, address) returns (bool) fHandleAsset, + function (RequestBatch memory, IMainchainGatewayV3) fForwardRequestToGateway + ) + { + if (erc == TokenStandard.ERC721) { + return ( + LibTokenInfoBatch.checkERC721Batch, + LibTokenInfoBatch.tryHandleAssetInERC721, + LibRequestBatch.forwardRequestToGatewayERC721 + ); + } + + if (erc == TokenStandard.ERC1155) { + return ( + LibTokenInfoBatch.checkERC1155Batch, + LibTokenInfoBatch.tryHandleAssetInERC1155, + LibRequestBatch.forwardRequestToGatewayERC1155 + ); + } + + revert ErrUnsupportedStandard(); } } From a0e0e367c5bbfa7b8b0aacf10782f75701ad3096 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 18 Mar 2024 16:32:51 +0700 Subject: [PATCH 076/305] feat(TokenInfo): remove batch action in legacy TokenInfo --- src/libraries/LibTokenInfo.sol | 215 +++++++-------------------------- 1 file changed, 41 insertions(+), 174 deletions(-) diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 469f4ca9..6fd30422 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -50,26 +50,13 @@ error ErrERC721MintingFailed(); /// @dev Error indicating that the transfer of ERC1155 tokens has failed. error ErrERC1155TransferFailed(); -/// @dev Error indicating that the mint of ERC1155 tokens in batch has failed. -error ErrERC1155MintBatchFailed(); +/// @dev Error indicating that the mint of ERC1155 tokens has failed. +error ErrERC1155MintingFailed(); /// @dev Error indicating that an unsupported standard is encountered. error ErrUnsupportedStandard(); library LibTokenInfo { - /** - * - * ROUTER - * - */ - function _isStandardSingle(TokenStandard standard) private pure returns (bool) { - return standard == TokenStandard.ERC20 || standard == TokenStandard.ERC721; - } - - function _isStandardBatch(TokenStandard standard) private pure returns (bool) { - // return standard == TokenStandard.ERC721Batch || standard == TokenStandard.ERC1155Batch; - } - /** * * HASH @@ -79,19 +66,10 @@ library LibTokenInfo { // keccak256("TokenInfo(uint8 erc,uint256 id,uint256 quantity)"); bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d; - // keccak256("TokenInfo(uint8 erc,uint256[] ids,uint256[] quantities)"); - bytes32 public constant INFO_TYPE_HASH_BATCH = 0xe0d9a8bb18cfc29aa6e46b1293275ca79aeaaf28ac63b66dcb6ebce2f127f5a0; - /** * @dev Returns token info struct hash. */ function hash(TokenInfo memory self) internal pure returns (bytes32 digest) { - if (_isStandardSingle(self.erc)) return _hashSingle(self); - if (_isStandardBatch(self.erc)) return _hashBatch(self); - revert ErrUnsupportedStandard(); - } - - function _hashSingle(TokenInfo memory self) internal pure returns (bytes32 digest) { // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity)) assembly { let ptr := mload(0x40) @@ -103,25 +81,6 @@ library LibTokenInfo { } } - function _hashBatch(TokenInfo memory self) internal pure returns (bytes32 digest) { - // keccak256(abi.encode(INFO_TYPE_HASH_BATCH, info.erc, info.ids, info.quantities)) - assembly { - let ptr := mload(0x40) - mstore(ptr, INFO_TYPE_HASH_SINGLE) - mstore(add(ptr, 0x20), mload(self)) // info.erc - - let ids := mload(add(self, 0x20)) // info.ids - let idsHash := keccak256(add(ids, 32), mul(mload(ids), 32)) // keccak256(info.ids) - mstore(add(ptr, 0x40), idsHash) - - let qtys := mload(add(self, 0x40)) // info.quantities - let qtysHash := keccak256(add(qtys, 32), mul(mload(qtys), 32)) // keccak256(info.quantities) - mstore(add(ptr, 0x60), qtysHash) - - digest := keccak256(ptr, 0x80) - } - } - /** * * VALIDATE @@ -132,45 +91,22 @@ library LibTokenInfo { * @dev Validates the token info. */ function validate(TokenInfo memory self) internal pure { - if (!(_validateERC20(self) || _validateERC721(self) || _checkERC721Batch(self) || _checkERC1155Batch(self))) { + if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) { revert ErrInvalidInfo(); } } - function _validateERC20(TokenInfo memory self) private pure returns (bool) { + function _checkERC20(TokenInfo memory self) private pure returns (bool) { return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0); } - function _validateERC721(TokenInfo memory self) private pure returns (bool) { + function _checkERC721(TokenInfo memory self) private pure returns (bool) { return (self.erc == TokenStandard.ERC721 && self.quantity == 0); } - function _checkERC721Batch(TokenInfo memory self) private pure returns (bool res) { - // uint256 length = self.ids.length; - - // res = self.erc == TokenStandard.ERC721Batch && _validateBatch(self); - - // for (uint256 i; i < length; ++i) { - // if (self.quantities[i] != 0) { - // return false; - // } - // } - } - - function _checkERC1155Batch(TokenInfo memory self) private pure returns (bool res) { - // uint256 length = self.ids.length; - // res = self.erc == TokenStandard.ERC1155Batch && _validateBatch(self); - - // for (uint256 i; i < length; ++i) { - // if (self.quantities[i] == 0) { - // return false; - // } - // } - } - - function _validateBatch(TokenInfo memory self) private pure returns (bool res) { - // return self.quantity == 0 && self.id == 0 && self.ids.length > 0 && self.quantities.length > 0 - // && self.ids.length == self.quantities.length; + function _checkERC1155(TokenInfo memory self) private pure returns (bool res) { + // Only validate the quantity, because id of ERC-1155 can be 0. + return (self.erc == TokenStandard.ERC1155 && self.quantity > 0); } /** @@ -195,10 +131,8 @@ library LibTokenInfo { success = success && (data.length == 0 || abi.decode(data, (bool))); } else if (self.erc == TokenStandard.ERC721) { success = _tryTransferFromERC721(token, from, address(this), self.id); - // } else if (self.erc == TokenStandard.ERC721Batch) { - // success = _tryTransferFromERC721Loop(token, from, address(this), self.ids); - // } else if (self.erc == TokenStandard.ERC1155Batch) { - // success = _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities); + } else if (self.erc == TokenStandard.ERC1155) { + success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity); } else { revert ErrUnsupportedStandard(); } @@ -230,7 +164,6 @@ library LibTokenInfo { } _transferTokenOut(self, to, token); - return; } @@ -238,33 +171,15 @@ library LibTokenInfo { if (!_tryTransferOutOrMintERC721(token, to, self.id)) { revert ErrERC721MintingFailed(); } - return; } - // if (self.erc == TokenStandard.ERC721Batch) { - // for (uint256 i; i < self.ids.length; ++i) { - // uint256 id = self.ids[i]; - // if (!_tryTransferOutOrMintERC721(token, to, id)) revert ErrERC721MintingFailed(); - // } - - // return; - // } - - // if (self.erc == TokenStandard.ERC1155Batch) { - // (uint256[] memory toMintIds, uint256[] memory toMintAmounts) = - // _calcLackBalancesERC1155(address(this), token, self.ids, self.quantities); - - // if (toMintIds.length > 0) { - // if (!_tryMintERC1155Batch(token, address(this), toMintIds, toMintAmounts)) revert ErrERC1155MintBatchFailed(); - // } - - // if (!_tryTransferERC1155Batch(token, address(this), to, self.ids, self.quantities)) { - // revert ErrERC1155TransferFailed(); - // } - - // return; - // } + if (self.erc == TokenStandard.ERC1155) { + if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) { + revert ErrERC1155MintingFailed(); + } + return; + } revert ErrUnsupportedStandard(); } @@ -291,6 +206,10 @@ library LibTokenInfo { if (!success) revert ErrTokenCouldNotTransfer(self, to, token); } + /** + * TRANSFER ERC-20 + */ + /** * @dev Transfers ERC20 token and returns the result. */ @@ -308,6 +227,10 @@ library LibTokenInfo { (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity)); } + /** + * TRANSFER ERC-721 + */ + /** * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721. * @return success Returns `false` if both transfer and mint are failed. @@ -326,25 +249,6 @@ library LibTokenInfo { (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id)); } - /** - * @dev Transfers ERC721 token in a loop and returns the result. - * - * If there is fail when transfer one `id`, the loop will break early to save gas. - * Consumer of this method should revert the transaction if receive `false` success status. - */ - function _tryTransferFromERC721Loop(address token, address from, address to, uint256[] memory ids) - private - returns (bool success) - { - for (uint256 i; i < ids.length; ++i) { - if (!_tryTransferFromERC721(token, from, to, ids[i])) { - return false; // Break early if send fails - } - } - - return true; - } - /** * @dev Mints ERC721 token and returns the result. */ @@ -354,74 +258,37 @@ library LibTokenInfo { } /** - * @dev Transfers ERC1155 token in and returns the result. + * TRANSFER ERC-1155 */ - function _tryTransferERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) { - (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (address(this), to, id, amount, new bytes(0)))); - } /** - * @dev Transfers ERC1155 token in and returns the result. + * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555. + * @return success Returns `false` if both transfer and mint are failed. */ - function _tryTransferERC1155Batch( - address token, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts - ) private returns (bool success) { - (success,) = token.call(abi.encodeCall(IERC1155.safeBatchTransferFrom, (from, to, ids, amounts, new bytes(0)))); + function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) + private + returns (bool success) + { + success = _tryTransferFromERC1155(token, address(this), to, id, amount); + if (!success) { + return _tryMintERC1155(token, to, id, amount); + } } /** - * @dev Mints ERC1155 token in batch and returns the result. + * @dev Transfers ERC1155 token and returns the result. */ - function _tryMintERC1155Batch(address token, address to, uint256[] memory ids, uint256[] memory amounts) + function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) { - (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mintBatch, (to, ids, amounts, new bytes(0)))); + (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0)))); } /** - * - * OTHER HELPERS - * - */ - - /** - * @dev Gets ERC1155 balance of token `ids` for user `who`, then compare with the `requiredAmounts`. Returns list of `ids_` that have `lackAmounts_` at least 1. + * @dev Mints ERC1155 token and returns the result. */ - function _calcLackBalancesERC1155(address who, address token, uint256[] memory ids, uint256[] memory requiredAmounts) - private - view - returns (uint256[] memory ids_, uint256[] memory lackAmounts_) - { - uint256 length = ids.length; - address[] memory whos = new address[](length); - ids_ = new uint256[](length); - lackAmounts_ = new uint256[](length); - - for (uint256 i; i < length; i++) { - whos[i] = address(who); - } - - // Get balance of all ids belongs to `who` - uint256[] memory balances = IERC1155(token).balanceOfBatch(whos, ids); - - uint256 count = 0; - - // Find the ids that lack of balance - for (uint256 i; i < length; i++) { - if (requiredAmounts[i] > balances[i]) { - lackAmounts_[count] = requiredAmounts[i] - balances[i]; - ids_[count++] = ids[i]; - } - } - - assembly { - mstore(ids_, count) - mstore(lackAmounts_, count) - } + function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) { + (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0)))); } } From 7a8e1ef4ed04ed24c79482c2798972e3e70941af Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 18 Mar 2024 17:44:53 +0700 Subject: [PATCH 077/305] feat(GatewayBatcher): fix validation erc1155 --- src/libraries/LibRequestBatch.sol | 2 +- src/libraries/LibTokenInfoBatch.sol | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libraries/LibRequestBatch.sol b/src/libraries/LibRequestBatch.sol index dc04e2a2..976ea148 100644 --- a/src/libraries/LibRequestBatch.sol +++ b/src/libraries/LibRequestBatch.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.0; import "../interfaces/IMainchainGatewayV3.sol"; -import { TokenInfoBatch, ErrUnsupportedStandard } from "./LibTokenInfoBatch.sol"; +import { TokenInfoBatch } from "./LibTokenInfoBatch.sol"; struct RequestBatch { address recipient; diff --git a/src/libraries/LibTokenInfoBatch.sol b/src/libraries/LibTokenInfoBatch.sol index fa68add9..14d72cb4 100644 --- a/src/libraries/LibTokenInfoBatch.sol +++ b/src/libraries/LibTokenInfoBatch.sol @@ -29,6 +29,8 @@ error ErrTokenBatchCouldNotTransfer(TokenInfoBatch tokenInfo, address to, addres */ error ErrTokenBatchCouldNotTransferFrom(TokenInfoBatch tokenInfo, address from, address to, address token); +error ErrInvalidInfoWithStandard(TokenStandard); + library LibTokenInfoBatch { /** * @@ -44,7 +46,7 @@ library LibTokenInfoBatch { pure { if (!fCheck(self)) { - revert ErrInvalidInfo(); + revert ErrInvalidInfoWithStandard(self.erc); } } @@ -58,7 +60,7 @@ library LibTokenInfoBatch { uint256 length = self.ids.length; if ( - self.erc == TokenStandard.ERC1155 // Check ERC1155 + self.erc != TokenStandard.ERC1155 // Check ERC1155 || length != self.quantities.length // Info must have same length for each token id ) { return false; From d5aca7089f19ed5db9ff7d89df4daf1e21675f7c Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 18 Mar 2024 17:45:52 +0700 Subject: [PATCH 078/305] test(GatewayBatcher): init first 1155 batch test --- script/GeneralConfig.sol | 1 + script/Migration.s.sol | 2 + .../contracts/token/MockERC1155Deploy.s.sol | 19 ++++++++ script/interfaces/ISharedArgument.sol | 5 +++ script/utils/Contract.sol | 2 + src/mocks/token/MockERC1155.sol | 12 +++++ test/bridge/integration/BaseIntegration.t.sol | 4 ++ ...tDepositFor.Batch.MainchainGatewayV3.t.sol | 44 ++++++++++++++++++- 8 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 script/contracts/token/MockERC1155Deploy.s.sol create mode 100644 src/mocks/token/MockERC1155.sol diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index e74e2520..28dd0071 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -49,6 +49,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _mapContractName(Contract.MainchainGatewayBatcher); _mapContractName(Contract.MainchainBridgeManager); _mapContractName(Contract.MockERC721); + _mapContractName(Contract.MockERC1155); _contractNameMap[Contract.WETH.key()] = "MockWrappedToken"; _contractNameMap[Contract.WRON.key()] = "MockWrappedToken"; diff --git a/script/Migration.s.sol b/script/Migration.s.sol index fdd1b1ad..02c0ee3e 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -46,6 +46,8 @@ contract Migration is BaseMigrationV2, Utils { param.mockErc721.name = "Mock ERC721"; param.mockErc721.symbol = "M_ERC721"; + param.mockErc1155.uri = "mock://erc1155/"; + uint256 num = 6; address[] memory operatorAddrs = new address[](num); address[] memory governorAddrs = new address[](num); diff --git a/script/contracts/token/MockERC1155Deploy.s.sol b/script/contracts/token/MockERC1155Deploy.s.sol new file mode 100644 index 00000000..ec82026f --- /dev/null +++ b/script/contracts/token/MockERC1155Deploy.s.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { MockERC1155 } from "@ronin/contracts/mocks/token/MockERC1155.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { ISharedArgument } from "../../interfaces/ISharedArgument.sol"; +import { Migration } from "../../Migration.s.sol"; + +contract MockERC1155Deploy is Migration { + function _defaultArguments() internal virtual override returns (bytes memory args) { + ISharedArgument.MockERC1155Param memory param = config.sharedArguments().mockErc1155; + + args = abi.encode(param.uri); + } + + function run() public virtual returns (MockERC1155) { + return MockERC1155(_deployImmutable(Contract.MockERC1155.key())); + } +} diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index f8f9f806..d75ed517 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -98,6 +98,10 @@ interface ISharedArgument is IGeneralConfig { string symbol; } + struct MockERC1155Param { + string uri; + } + struct UnitTestParam { address proxyAdmin; uint256 numberOfBlocksInEpoch; @@ -125,6 +129,7 @@ interface ISharedArgument is IGeneralConfig { MockERC20Param slp; MockERC20Param usdc; MockERC721Param mockErc721; + MockERC1155Param mockErc1155; UnitTestParam test; } diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index d9ccc2ca..8257f539 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -10,6 +10,7 @@ enum Contract { SLP, USDC, MockERC721, + MockERC1155, BridgeTracking, BridgeSlash, BridgeReward, @@ -35,6 +36,7 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.SLP) return "SLP"; if (contractEnum == Contract.USDC) return "USDC"; if (contractEnum == Contract.MockERC721) return "MockERC721"; + if (contractEnum == Contract.MockERC1155) return "MockERC1155"; if (contractEnum == Contract.BridgeTracking) return "BridgeTracking"; if (contractEnum == Contract.BridgeSlash) return "BridgeSlash"; diff --git a/src/mocks/token/MockERC1155.sol b/src/mocks/token/MockERC1155.sol new file mode 100644 index 00000000..1a5e7292 --- /dev/null +++ b/src/mocks/token/MockERC1155.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; + +contract MockERC1155 is ERC1155 { + constructor(string memory uri_) ERC1155(uri_) { } + + function mint(address to, uint256 id, uint256 amount) external { + _mint(to, id, amount, ""); + } +} diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 2eebf35b..368e533a 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -19,6 +19,7 @@ import { MainchainGatewayBatcher } from "@ronin/contracts/mainchain/MainchainGat import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; +import { MockERC1155 } from "@ronin/contracts/mocks/token/MockERC1155.sol"; import { MockWrappedToken } from "@ronin/contracts/mocks/token/MockWrappedToken.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -55,6 +56,7 @@ import { AXSDeploy } from "@ronin/script/contracts/token/AXSDeploy.s.sol"; import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; import { MockERC721Deploy } from "@ronin/script/contracts/token/MockERC721Deploy.s.sol"; +import { MockERC1155Deploy } from "@ronin/script/contracts/token/MockERC1155Deploy.s.sol"; import { RoninBridgeAdminUtils } from "test/helpers/RoninBridgeAdminUtils.t.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; @@ -87,6 +89,7 @@ contract BaseIntegration_Test is Base_Test { MockERC20 _mainchainSlp; MockERC20 _mainchainUsdc; MockERC721 _mainchainMockERC721; + MockERC1155 _mainchainMockERC1155; MockValidatorContract_OnlyTiming_ForHardhatTest _validatorSet; @@ -142,6 +145,7 @@ contract BaseIntegration_Test is Base_Test { _mainchainSlp = new SLPDeploy().run(); _mainchainUsdc = new USDCDeploy().run(); _mainchainMockERC721 = new MockERC721Deploy().run(); + _mainchainMockERC1155 = new MockERC1155Deploy().run(); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); _mainchainProposalUtils = new MainchainBridgeAdminUtils( diff --git a/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol index 35d0611a..cde5da43 100644 --- a/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/requestDepositFor.Batch.MainchainGatewayV3.t.sol @@ -72,8 +72,8 @@ contract RequestDepositFor_Batch_MainchainGatewayV3_Test is BaseIntegration_Test // } function test_depositERC721Batch_Success() public { - uint256 tokenId1 = 22; - uint256 tokenId2 = 23; + uint256 tokenId1 = 721_22; + uint256 tokenId2 = 721_23; _mainchainMockERC721.mint(_sender, tokenId1); _mainchainMockERC721.mint(_sender, tokenId2); @@ -104,4 +104,44 @@ contract RequestDepositFor_Batch_MainchainGatewayV3_Test is BaseIntegration_Test assertEq(_mainchainMockERC721.ownerOf(tokenId2), address(_mainchainGatewayV3)); assertEq(_mainchainGatewayV3.depositCount(), 2); } + + function test_depositERC1155Batch_Success() public { + uint256 tokenId1 = 1155_33; + uint256 tokenId2 = 1155_34; + uint256 tokenId1Amount = 50; + uint256 tokenId2Amount = 100; + + _mainchainMockERC1155.mint(_sender, tokenId1, tokenId1Amount); + _mainchainMockERC1155.mint(_sender, tokenId2, tokenId2Amount); + + vm.startPrank(_sender); + _mainchainMockERC1155.setApprovalForAll(address(_mainchainGatewayBatcher), true); + + RequestBatch memory req; + req.recipient = makeAddr("recipient"); + req.tokenAddr = address(_mainchainMockERC1155); + req.info.erc = TokenStandard.ERC1155; + req.info.ids = new uint256[](2); + req.info.ids[0] = tokenId1; + req.info.ids[1] = tokenId2; + req.info.quantities = new uint256[](2); + req.info.quantities[0] = tokenId1Amount; + req.info.quantities[1] = tokenId2Amount; + + assertEq(_mainchainMockERC1155.balanceOf(_sender, tokenId1), tokenId1Amount); + assertEq(_mainchainMockERC1155.balanceOf(_sender, tokenId2), tokenId2Amount); + + _mainchainGatewayBatcher.requestDepositForBatch(req); + + // LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt( + // _sender, _mainchainGatewayV3.depositCount(), address(_roninMockERC721), block.chainid + // ); + // vm.expectEmit(address(_mainchainGatewayV3)); + // emit DepositRequested(receipt.hash(), receipt); + + assertEq(_mainchainMockERC1155.balanceOf(address(_mainchainGatewayV3), tokenId1), tokenId1Amount); + assertEq(_mainchainMockERC1155.balanceOf(address(_mainchainGatewayV3), tokenId2), tokenId2Amount); + + assertEq(_mainchainGatewayV3.depositCount(), 2); + } } From a8ca9eee2b8ca8c2c0a1b301ab5be0edab69c4dc Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 18 Mar 2024 18:07:56 +0700 Subject: [PATCH 079/305] feat(*Gateway): inherit ERC1155Holder --- src/extensions/GatewayV3.sol | 16 +++++++--------- src/mainchain/MainchainGatewayBatcher.sol | 3 ++- src/mainchain/MainchainGatewayV3.sol | 10 ++++++++++ src/ronin/gateway/RoninGatewayV3.sol | 10 ++++++++++ 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/extensions/GatewayV3.sol b/src/extensions/GatewayV3.sol index 6b10b19e..b76c96c2 100644 --- a/src/extensions/GatewayV3.sol +++ b/src/extensions/GatewayV3.sol @@ -5,7 +5,7 @@ import "@openzeppelin/contracts/security/Pausable.sol"; import "../interfaces/IQuorum.sol"; import "./collections/HasProxyAdmin.sol"; -abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { +abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { uint256 internal _num; uint256 internal _denom; @@ -44,10 +44,7 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { /** * @inheritdoc IQuorum */ - function setThreshold( - uint256 _numerator, - uint256 _denominator - ) external virtual onlyAdmin returns (uint256, uint256) { + function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyAdmin returns (uint256, uint256) { return _setThreshold(_numerator, _denominator); } @@ -80,10 +77,11 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { * Emits the `ThresholdUpdated` event. * */ - function _setThreshold( - uint256 _numerator, - uint256 _denominator - ) internal virtual returns (uint256 _previousNum, uint256 _previousDenom) { + function _setThreshold(uint256 _numerator, uint256 _denominator) + internal + virtual + returns (uint256 _previousNum, uint256 _previousDenom) + { if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig); _previousNum = _num; _previousDenom = _denom; diff --git a/src/mainchain/MainchainGatewayBatcher.sol b/src/mainchain/MainchainGatewayBatcher.sol index add22028..2d02a006 100644 --- a/src/mainchain/MainchainGatewayBatcher.sol +++ b/src/mainchain/MainchainGatewayBatcher.sol @@ -2,12 +2,13 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "../libraries/LibRequestBatch.sol"; import "../libraries/LibTokenInfoBatch.sol"; import "./MainchainGatewayV3.sol"; -contract MainchainGatewayBatcher is Initializable { +contract MainchainGatewayBatcher is Initializable, ERC1155Holder { using LibRequestBatch for RequestBatch; using LibTokenInfoBatch for TokenInfoBatch; diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 4e48cd3c..b13a11f0 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import { IBridgeManager } from "../interfaces/bridge/IBridgeManager.sol"; import { IBridgeManagerCallback } from "../interfaces/bridge/IBridgeManagerCallback.sol"; import { HasContracts, ContractType } from "../extensions/collections/HasContracts.sol"; @@ -14,6 +15,7 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessControlEnumerable, + ERC1155Holder, IMainchainGatewayV3, HasContracts { @@ -456,4 +458,12 @@ contract MainchainGatewayV3 is function _getWeight(address _addr) internal view returns (uint256) { return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperatorWeight(_addr); } + + function supportsInterface(bytes4 interfaceId) + public + view + override(AccessControlEnumerable, ERC1155Receiver) returns (bool) + { + return AccessControlEnumerable.supportsInterface(interfaceId) || ERC1155Receiver.supportsInterface(interfaceId); + } } diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index b0812b46..f39bec8b 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "../../extensions/GatewayV3.sol"; import "../../extensions/collections/HasContracts.sol"; import "../../extensions/MinimumWithdrawal.sol"; @@ -20,6 +21,7 @@ contract RoninGatewayV3 is Initializable, MinimumWithdrawal, AccessControlEnumerable, + ERC1155Holder, VoteStatusConsumer, IRoninGatewayV3, HasContracts @@ -528,4 +530,12 @@ contract RoninGatewayV3 is function _minimumTrustedVoteWeight(uint256 _totalTrustedWeight) internal view virtual returns (uint256) { return (_trustedNum * _totalTrustedWeight + _trustedDenom - 1) / _trustedDenom; } + + function supportsInterface(bytes4 interfaceId) + public + view + override(AccessControlEnumerable, ERC1155Receiver) returns (bool) + { + return AccessControlEnumerable.supportsInterface(interfaceId) || ERC1155Receiver.supportsInterface(interfaceId); + } } From 9b8fc4a63e1cb7fe3ba7b43109b7f4fc565fc132 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 18 Mar 2024 18:17:26 +0700 Subject: [PATCH 080/305] test(ERC1155): fix the first test --- test/bridge/integration/BaseIntegration.t.sol | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 368e533a..27b6e5fb 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -83,6 +83,7 @@ contract BaseIntegration_Test is Base_Test { MockERC20 _roninSlp; MockERC20 _roninUsdc; MockERC721 _roninMockERC721; + MockERC1155 _roninMockERC1155; MockWrappedToken _mainchainWeth; MockERC20 _mainchainAxs; @@ -128,6 +129,7 @@ contract BaseIntegration_Test is Base_Test { _roninSlp = new SLPDeploy().run(); _roninUsdc = new USDCDeploy().run(); _roninMockERC721 = new MockERC721Deploy().run(); + _roninMockERC1155 = new MockERC1155Deploy().run(); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); _roninProposalUtils = @@ -239,17 +241,14 @@ contract BaseIntegration_Test is Base_Test { } function _roninGatewayV3Initialize() internal { - (address[] memory mainchainTokens, address[] memory roninTokens) = _getMainchainAndRoninTokens(); + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; // reserve slot for ERC721Tokens uint256[] memory minimumThreshold = new uint256[](tokenNum); uint256[] memory chainIds = new uint256[](tokenNum); - TokenStandard[] memory standards = new TokenStandard[](tokenNum); - for (uint256 i; i < tokenNum; i++) { - bool isERC721 = i == mainchainTokens.length - 1; // last item is ERC721 + for (uint256 i; i < tokenNum; i++) { minimumThreshold[i] = 20; chainIds[i] = block.chainid; - standards[i] = isERC721 ? TokenStandard.ERC721 : TokenStandard.ERC20; } // Ronin Gateway V3 @@ -437,28 +436,24 @@ contract BaseIntegration_Test is Base_Test { } function _mainchainGatewayV3Initialize() internal { - (address[] memory mainchainTokens, address[] memory roninTokens) = _getMainchainAndRoninTokens(); + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; uint256[] memory highTierThreshold = new uint256[](tokenNum); uint256[] memory lockedThreshold = new uint256[](tokenNum); uint256[] memory unlockFeePercentages = new uint256[](tokenNum); uint256[] memory dailyWithdrawalLimits = new uint256[](tokenNum); - TokenStandard[] memory standards = new TokenStandard[](tokenNum); for (uint256 i; i < tokenNum; i++) { - bool isERC721 = i == mainchainTokens.length - 1; // last item is ERC721 - highTierThreshold[i] = 10; lockedThreshold[i] = 20; unlockFeePercentages[i] = 100_000; dailyWithdrawalLimits[i] = 12; - standards[i] = isERC721 ? TokenStandard.ERC721 : TokenStandard.ERC20; } // Mainchain Gateway V3 _param.mainchainGatewayV3.wrappedToken = address(_mainchainWeth); - _param.mainchainGatewayV3.addresses[0] = mainchainTokens; // (ERC20 + ERC721) - _param.mainchainGatewayV3.addresses[1] = roninTokens; // (ERC20 + ERC721) + _param.mainchainGatewayV3.addresses[0] = mainchainTokens; // (ERC20 + ERC721 + ERC1155) + _param.mainchainGatewayV3.addresses[1] = roninTokens; // (ERC20 + ERC721 + ERC1155) _param.mainchainGatewayV3.addresses[2] = getEmptyAddressArray(); _param.mainchainGatewayV3.thresholds[0] = highTierThreshold; _param.mainchainGatewayV3.thresholds[1] = lockedThreshold; @@ -494,23 +489,33 @@ contract BaseIntegration_Test is Base_Test { function _getMainchainAndRoninTokens() internal view - returns (address[] memory mainchainTokens, address[] memory roninTokens) + returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) { - uint256 tokenNum = 5; + uint256 tokenNum = 6; mainchainTokens = new address[](tokenNum); roninTokens = new address[](tokenNum); + standards = new TokenStandard[](tokenNum); mainchainTokens[0] = address(_mainchainWeth); mainchainTokens[1] = address(_mainchainAxs); mainchainTokens[2] = address(_mainchainSlp); mainchainTokens[3] = address(_mainchainUsdc); mainchainTokens[4] = address(_mainchainMockERC721); + mainchainTokens[5] = address(_mainchainMockERC1155); roninTokens[0] = address(_roninWeth); roninTokens[1] = address(_roninAxs); roninTokens[2] = address(_roninSlp); roninTokens[3] = address(_roninUsdc); roninTokens[4] = address(_roninMockERC721); + roninTokens[5] = address(_roninMockERC1155); + + standards[0] = TokenStandard.ERC20; + standards[1] = TokenStandard.ERC20; + standards[2] = TokenStandard.ERC20; + standards[3] = TokenStandard.ERC20; + standards[4] = TokenStandard.ERC721; + standards[5] = TokenStandard.ERC1155; } function _changeAdminOnRonin() internal { From ceb797952aa060c07173b07400f19fc552a09341 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 10:49:03 +0700 Subject: [PATCH 081/305] fix(RoninGateway): add initializer --- src/ronin/gateway/RoninBridgeManager.sol | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 38d135da..5ca59ab1 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -12,7 +12,6 @@ import { VoteStatusConsumer } from "../../interfaces/consumers/VoteStatusConsume import { ErrQueryForEmptyVote } from "../../utils/CommonErrors.sol"; contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal { - function initialize( uint256 num, uint256 denom, @@ -24,8 +23,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan address[] memory governors, uint96[] memory voteWeights, GlobalProposal.TargetOption[] memory targetOptions, - address[] memory targets) external - { + address[] memory targets + ) external initializer { __CoreGovernance_init(expiryDuration); __GlobalCoreGovernance_init(targetOptions, targets); __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); From 7eb813a58fa1225229c0d1fc866bd6f051babc3e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 10:53:35 +0700 Subject: [PATCH 082/305] fix(*BridgeManager): fix assertion in threshold --- .../bridge-operator-governance/BridgeManagerQuorum.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol index 705656d9..51f50a8a 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -59,7 +59,10 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { * */ function _setThreshold(uint256 numerator, uint256 denominator) internal virtual returns (uint256 previousNum, uint256 previousDenom) { - if (numerator > denominator) revert ErrInvalidThreshold(msg.sig); + if ( + numerator > denominator // Assert valid fraction + || denominator < 2 // Avoid divide by zero, and avoid only require 1 manager + ) revert ErrInvalidThreshold(msg.sig); BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); From 7f00621a67623588da26baf693bd2d03db788f0e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 10:55:33 +0700 Subject: [PATCH 083/305] fix(MainchainGateway): assert chainId in withdrawal --- src/mainchain/MainchainGatewayV3.sol | 31 +++++++--------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index dd1fab10..0fedfc7d 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -10,14 +10,7 @@ import "../extensions/WithdrawalLimitation.sol"; import "../libraries/Transfer.sol"; import "../interfaces/IMainchainGatewayV3.sol"; -contract MainchainGatewayV3 is - WithdrawalLimitation, - Initializable, - AccessControlEnumerable, - IMainchainGatewayV3, - HasContracts, - IBridgeManagerCallback -{ +contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessControlEnumerable, IMainchainGatewayV3, HasContracts, IBridgeManagerCallback { using Token for Token.Info; using Transfer for Transfer.Request; using Transfer for Transfer.Receipt; @@ -118,7 +111,7 @@ contract MainchainGatewayV3 is /** * @dev Receives ether without doing anything. Use this function to topup native token. */ - function receiveEther() external payable {} + function receiveEther() external payable { } /** * @inheritdoc IMainchainGatewayV3 @@ -144,10 +137,7 @@ contract MainchainGatewayV3 is /** * @inheritdoc IMainchainGatewayV3 */ - function submitWithdrawal( - Transfer.Receipt calldata _receipt, - Signature[] calldata _signatures - ) external virtual whenNotPaused returns (bool _locked) { + function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) { return _submitWithdrawal(_receipt, _signatures); } @@ -184,11 +174,7 @@ contract MainchainGatewayV3 is /** * @inheritdoc IMainchainGatewayV3 */ - function mapTokens( - address[] calldata _mainchainTokens, - address[] calldata _roninTokens, - Token.Standard[] calldata _standards - ) external virtual onlyAdmin { + function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, Token.Standard[] calldata _standards) external virtual onlyAdmin { if (_mainchainTokens.length == 0) revert ErrEmptyArray(); _mapTokens(_mainchainTokens, _roninTokens, _standards); } @@ -270,7 +256,9 @@ contract MainchainGatewayV3 is MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr); - if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr)) revert ErrInvalidReceipt(); + if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr && receipt.ronin.chainId == roninChainId)) { + revert ErrInvalidReceipt(); + } if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal(); @@ -484,10 +472,7 @@ contract MainchainGatewayV3 is /** * @inheritdoc IBridgeManagerCallback */ - function onBridgeOperatorsRemoved( - address[] calldata operators, - bool[] calldata removeds - ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { + function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { uint length = operators.length; if (length != removeds.length) revert ErrLengthMismatch(msg.sig); if (length == 0) { From d10f739618a594535671ef843b08446e55ba3146 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 10:57:21 +0700 Subject: [PATCH 084/305] feat(Gateway, Slash): remove onBridgeOperatorUpdated method --- lib/foundry-deployment-kit | 2 +- src/interfaces/bridge/IBridgeManagerCallback.sol | 11 ----------- src/mainchain/MainchainGatewayV3.sol | 10 ---------- src/ronin/gateway/BridgeSlash.sol | 15 --------------- 4 files changed, 1 insertion(+), 37 deletions(-) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index 3aa1ca23..8c728424 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit 3aa1ca23adaa55a2e04818b0dced14947e4e5c28 +Subproject commit 8c728424858f8c8358f2e0f9374a6ea581f46486 diff --git a/src/interfaces/bridge/IBridgeManagerCallback.sol b/src/interfaces/bridge/IBridgeManagerCallback.sol index 2c879a5c..9d63f0f8 100644 --- a/src/interfaces/bridge/IBridgeManagerCallback.sol +++ b/src/interfaces/bridge/IBridgeManagerCallback.sol @@ -30,15 +30,4 @@ interface IBridgeManagerCallback is IERC165 { address[] memory bridgeOperators, bool[] memory removeds ) external returns (bytes4 selector); - - /** - * @dev Handles the event when a bridge operator is updated. - * @param currentBridgeOperator The address of the current bridge operator. - * @param newbridgeOperator The new address of the bridge operator. - * @return selector The selector of the function being called. - */ - function onBridgeOperatorUpdated( - address currentBridgeOperator, - address newbridgeOperator - ) external returns (bytes4 selector); } diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 0fedfc7d..6a0f367d 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -459,16 +459,6 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro return IBridgeManagerCallback.onBridgeOperatorsAdded.selector; } - /** - * @inheritdoc IBridgeManagerCallback - */ - function onBridgeOperatorUpdated(address currOperator, address newOperator) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { - _operatorWeight[newOperator] = _operatorWeight[currOperator]; - delete _operatorWeight[currOperator]; - - return IBridgeManagerCallback.onBridgeOperatorUpdated.selector; - } - /** * @inheritdoc IBridgeManagerCallback */ diff --git a/src/ronin/gateway/BridgeSlash.sol b/src/ronin/gateway/BridgeSlash.sol index 5c43e32d..ae0a9739 100644 --- a/src/ronin/gateway/BridgeSlash.sol +++ b/src/ronin/gateway/BridgeSlash.sol @@ -118,21 +118,6 @@ contract BridgeSlash is return IBridgeManagerCallback.onBridgeOperatorsAdded.selector; } - /** - * @inheritdoc IBridgeManagerCallback - */ - function onBridgeOperatorUpdated( - address currentBridgeOperator, - address newBridgeOperator - ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { - mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos(); - - _bridgeSlashInfos[newBridgeOperator] = _bridgeSlashInfos[currentBridgeOperator]; - delete _bridgeSlashInfos[currentBridgeOperator]; - - return IBridgeManagerCallback.onBridgeOperatorUpdated.selector; - } - /** * @inheritdoc IBridgeSlash */ From 5fe83ca8fc18a88bedaea1caa8a36b71c762b527 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 11:49:12 +0700 Subject: [PATCH 085/305] fix(Manager,MainchainGateway): revert on register fail --- .../BridgeManagerCallbackRegister.sol | 42 +++++++++++-------- .../bridge/IBridgeManagerCallbackRegister.sol | 2 + src/mainchain/MainchainGatewayV3.sol | 4 ++ ...al.MainchainGatewayV3.weth.benchmark.t.sol | 8 ++-- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index 32efcef6..87d975ab 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -33,9 +33,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager /** * @inheritdoc IBridgeManagerCallbackRegister */ - function unregisterCallbacks( - address[] calldata registers - ) external onlySelfCall returns (bool[] memory unregistereds) { + function unregisterCallbacks(address[] calldata registers) external onlySelfCall returns (bool[] memory unregistereds) { unregistereds = _unregisterCallbacks(registers); } @@ -51,9 +49,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager * @param registers The array of callback addresses to register. * @return registereds An array indicating the success status of each registration. */ - function _registerCallbacks( - address[] memory registers - ) internal nonDuplicate(registers) returns (bool[] memory registereds) { + function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) returns (bool[] memory registereds) { uint256 length = registers.length; registereds = new bool[](length); if (length == 0) return registereds; @@ -62,7 +58,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager address register; bytes4 callbackInterface = type(IBridgeManagerCallback).interfaceId; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { register = registers[i]; _requireHasCode(register); @@ -81,14 +77,12 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager * @param registers The array of callback addresses to unregister. * @return unregistereds An array indicating the success status of each unregistration. */ - function _unregisterCallbacks( - address[] memory registers - ) internal nonDuplicate(registers) returns (bool[] memory unregistereds) { + function _unregisterCallbacks(address[] memory registers) internal nonDuplicate(registers) returns (bool[] memory unregistereds) { uint256 length = registers.length; unregistereds = new bool[](length); EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters(); - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { unregistereds[i] = _callbackRegisters.remove(registers[i]); unchecked { @@ -97,29 +91,41 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager } } + /** + * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call. + */ + function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal { + if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) { + // revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs); + } + } + /** * @dev Internal function to notify all registered callbacks with the provided function signature and data. * @param callbackFnSig The function signature of the callback method. * @param inputs The data to pass to the callback method. + * @return allSuccess Return true if all internal calls are success */ - function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal { + function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) { + allSuccess = true; + address[] memory registers = _getCallbackRegisters().values(); uint256 length = registers.length; - if (length == 0) return; + if (length == 0) return allSuccess; bool[] memory successes = new bool[](length); bytes[] memory returnDatas = new bytes[](length); bytes memory callData = abi.encodePacked(callbackFnSig, inputs); bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData)); - for (uint256 i; i < length; ) { + for (uint256 i; i < length; i++) { + // First, attempt to call normally (successes[i], returnDatas[i]) = registers[i].call(callData); + + // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin. if (!successes[i]) { (successes[i], returnDatas[i]) = registers[i].call(proxyCallData); - } - - unchecked { - ++i; + allSuccess = allSuccess && successes[i]; } } diff --git a/src/interfaces/bridge/IBridgeManagerCallbackRegister.sol b/src/interfaces/bridge/IBridgeManagerCallbackRegister.sol index 2eea55ad..85177ad0 100644 --- a/src/interfaces/bridge/IBridgeManagerCallbackRegister.sol +++ b/src/interfaces/bridge/IBridgeManagerCallbackRegister.sol @@ -2,6 +2,8 @@ pragma solidity ^0.8.0; interface IBridgeManagerCallbackRegister { + error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData); + /** * @dev Emitted when the contract notifies multiple registers with statuses and return data. */ diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 6a0f367d..8281b8c7 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -433,6 +433,10 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro // CALLBACKS /////////////////////////////////////////////// + function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165) returns (bool) { + return interfaceId == type(IMainchainGatewayV3).interfaceId || super.supportsInterface(interfaceId); + } + /** * @inheritdoc IBridgeManagerCallback */ diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol index cf190f85..12360a3f 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.weth.benchmark.t.sol @@ -27,10 +27,10 @@ contract SubmitWithdrawal_MainchainGatewayV3_Weth_Benchmark_Test is BaseIntegrat _withdrawalReceipt.kind = Transfer.Kind.Withdrawal; _withdrawalReceipt.ronin.addr = makeAddr("requester"); _withdrawalReceipt.ronin.tokenAddr = address(_roninWeth); - _withdrawalReceipt.ronin.chainId =block.chainid; + _withdrawalReceipt.ronin.chainId = block.chainid; _withdrawalReceipt.mainchain.addr = address(notReceiveEtherRecipient); _withdrawalReceipt.mainchain.tokenAddr = address(_mainchainWeth); - _withdrawalReceipt.mainchain.chainId =block.chainid; + _withdrawalReceipt.mainchain.chainId = block.chainid; _withdrawalReceipt.info.erc = Token.Standard.ERC20; _withdrawalReceipt.info.id = 0; _withdrawalReceipt.info.quantity = 0; @@ -60,7 +60,7 @@ contract DiscardEther { _fallback(); } - function _fallback() internal { + function _fallback() internal pure { revert("Not receive ether"); } -} \ No newline at end of file +} From 7c4f5ec9b48a322da10dff3022976ec9d3550123 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 13:50:06 +0700 Subject: [PATCH 086/305] Revert "fix(*BridgeManager): fix assertion in threshold" This reverts commit 7eb813a58fa1225229c0d1fc866bd6f051babc3e. --- .../bridge-operator-governance/BridgeManagerQuorum.sol | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol index 51f50a8a..705656d9 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -59,10 +59,7 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { * */ function _setThreshold(uint256 numerator, uint256 denominator) internal virtual returns (uint256 previousNum, uint256 previousDenom) { - if ( - numerator > denominator // Assert valid fraction - || denominator < 2 // Avoid divide by zero, and avoid only require 1 manager - ) revert ErrInvalidThreshold(msg.sig); + if (numerator > denominator) revert ErrInvalidThreshold(msg.sig); BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); From 82cba08d1b018183b77e0c64641b5a3a01f0bd4e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 14:04:57 +0700 Subject: [PATCH 087/305] fix(MainchainGateway): fix initV3 by call to bridge manager --- src/mainchain/MainchainGatewayV3.sol | 5 ++++- test/bridge/integration/BaseIntegration.t.sol | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 8281b8c7..bf618c91 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -99,7 +99,10 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract); } - function initializeV3(address[] calldata operators, uint96[] calldata weights) external reinitializer(3) { + function initializeV3() external reinitializer(3) { + IBridgeManager mainchainBridgeManager = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)); + (, address[] memory operators, uint96[] memory weights) = mainchainBridgeManager.getFullBridgeOperatorInfos(); + uint96 totalWeight; for (uint i; i < operators.length; i++) { _operatorWeight[operators[i]] = weights[i]; diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 0be51cd2..8d983235 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -485,7 +485,7 @@ contract BaseIntegration_Test is Base_Test { ); _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); - _mainchainGatewayV3.initializeV3(_param.mainchainBridgeManager.bridgeOperators, _param.mainchainBridgeManager.voteWeights); + _mainchainGatewayV3.initializeV3(); } function _mainchainPauseEnforcerInitialize() internal { @@ -576,7 +576,7 @@ contract BaseIntegration_Test is Base_Test { LibTransfer.Receipt memory receipt, uint256[] memory signerPKs, bytes32 domainSeparator - ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { + ) internal pure returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { From 71c0f1c3395f47919238406bf57a528b683df861 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 14:17:58 +0700 Subject: [PATCH 088/305] fix(BridgeReward): chore: add comment --- src/ronin/gateway/BridgeReward.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index 9798bcc0..cedd09c8 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -163,7 +163,8 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT function _assertPeriod(uint256 currPd, uint256 pdCount, uint256 lastRewardPd) internal pure { if (pdCount == 0) revert ErrPeriodCountIsZero(); - // Not settle the period that already rewarded. + // Not settle the period that already rewarded. This check may redundant as in the following assertion. + // However, not increase much in gas, this is kept for obvious in error handling. if (currPd <= lastRewardPd + 1) revert ErrPeriodAlreadyRewarded(currPd, lastRewardPd); // Not settle the periods that not happen yet. From d252469305a2115a6d584ce83c174dd7800aba33 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 20 Mar 2024 15:01:41 +0700 Subject: [PATCH 089/305] fix(BridgeReward): correct the claimed and total scattered --- src/interfaces/bridge/IBridgeReward.sol | 12 +++-- src/ronin/gateway/BridgeReward.sol | 30 ++++++++---- .../settleReward/settleReward.t.sol | 46 +++++++++++++++++++ 3 files changed, 73 insertions(+), 15 deletions(-) diff --git a/src/interfaces/bridge/IBridgeReward.sol b/src/interfaces/bridge/IBridgeReward.sol index f3668fc9..7287064a 100644 --- a/src/interfaces/bridge/IBridgeReward.sol +++ b/src/interfaces/bridge/IBridgeReward.sol @@ -26,14 +26,12 @@ interface IBridgeReward is IBridgeRewardEvents { function execSyncRewardAuto(uint256 currentPeriod) external; /** - * @dev Retrieve the total amount of rewards that have been topped up in the contract. - * @return totalRewardToppedUp The total rewards topped up value. + * @dev Returns the total amount of rewards that have been topped up in the contract. */ function getTotalRewardToppedUp() external view returns (uint256); /** - * @dev Retrieve the total amount of rewards that have been scattered to bridge operators in the contract. - * @return totalRewardScattered The total rewards scattered value. + * @dev Returns the total reward amount scattered to the operators, excluding the slashed reward and failed-to-transfer reward. */ function getTotalRewardScattered() external view returns (uint256); @@ -44,10 +42,14 @@ interface IBridgeReward is IBridgeRewardEvents { /** * @dev External function to retrieve the latest rewarded period in the contract. - * @return latestRewardedPeriod The latest rewarded period value. */ function getLatestRewardedPeriod() external view returns (uint256); + /** + * @dev Returns the claimed and slashed reward amount of the `operator`. + */ + function getRewardInfo(address operator) external view returns (BridgeRewardInfo memory rewardInfo); + /** * @dev Setter for all bridge operators per period. */ diff --git a/src/ronin/gateway/BridgeReward.sol b/src/ronin/gateway/BridgeReward.sol index cedd09c8..e1719d98 100644 --- a/src/ronin/gateway/BridgeReward.sol +++ b/src/ronin/gateway/BridgeReward.sol @@ -70,7 +70,7 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT } /** - @dev The following must be assured after initializing V2: + * @dev The following must be assured after initializing V2: * ``` * {BridgeTracking}._lastSyncPeriod * == {RoninValidatorSet}.currentPeriod() @@ -228,8 +228,8 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT slashUntilPeriod: slashedDurationList[i] }); - sumRewards += shouldSlash ? 0 : reward; - _updateRewardAndTransfer({ period: period, operator: operators[i], reward: reward, shouldSlash: shouldSlash }); + bool scattered = _updateRewardAndTransfer({ period: period, operator: operators[i], reward: reward, shouldSlash: shouldSlash }); + sumRewards += (shouldSlash || !scattered) ? 0 : reward; } $_TOTAL_REWARDS_SCATTERED.addAssign(sumRewards); @@ -307,19 +307,22 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT /** * @dev Transfer `reward` to a `operator` or only emit event based on the operator `slashed` status. */ - function _updateRewardAndTransfer(uint256 period, address operator, uint256 reward, bool shouldSlash) private { + function _updateRewardAndTransfer(uint256 period, address operator, uint256 reward, bool shouldSlash) private returns (bool scattered) { BridgeRewardInfo storage _iRewardInfo = _getRewardInfo()[operator]; if (shouldSlash) { _iRewardInfo.slashed += reward; emit BridgeRewardSlashed(period, operator, reward); - } else { + return false; + } + + if (_unsafeSendRONLimitGas({ recipient: payable(operator), amount: reward, gas: 0 })) { _iRewardInfo.claimed += reward; - if (_unsafeSendRONLimitGas({ recipient: payable(operator), amount: reward, gas: 0 })) { - emit BridgeRewardScattered(period, operator, reward); - } else { - emit BridgeRewardScatterFailed(period, operator, reward); - } + emit BridgeRewardScattered(period, operator, reward); + return true; + } else { + emit BridgeRewardScatterFailed(period, operator, reward); + return false; } } @@ -337,6 +340,13 @@ contract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONT return $_LATEST_REWARDED_PERIOD.load(); } + /** + * @inheritdoc IBridgeReward + */ + function getRewardInfo(address operator) external view returns (BridgeRewardInfo memory rewardInfo) { + return _getRewardInfo()[operator]; + } + /** * @inheritdoc IBridgeReward */ diff --git a/test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.t.sol b/test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.t.sol index cc5feddc..82f41c31 100644 --- a/test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.t.sol +++ b/test/bridge/unit/concrete/bridge-reward/settleReward/settleReward.t.sol @@ -128,6 +128,52 @@ contract SettleReward_Unit_Concrete_Test is _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); assertEq(_bridgeReward.getLatestRewardedPeriod(), period); + + BridgeRewardInfo memory rewardInfo; + for (uint i; i < operators.length; i++) { + rewardInfo = _bridgeReward.getRewardInfo(operators[i]); + assertEq(rewardInfo.claimed, _rewardPerPeriod / operators.length); + } + assertEq(_bridgeReward.getTotalRewardScattered(), _rewardPerPeriod); + } + + function test_settleReward_ShareEqually_WhenNoVote_ButFundIsLackForOneOperator() external { + (address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote) = _generateInput_shareRewardProportionally(); + uint256 period = _validatorSetContract.currentPeriod(); + + uint nOperator = operators.length; + uint rewardShared = _rewardPerPeriod / nOperator; + + ballots[0] = 0; + ballots[1] = 0; + ballots[2] = 0; + ballots[3] = 0; + totalBallot = 0; + totalVote = 100; + + uint cheatBalance = rewardShared * (nOperator - 1); + vm.deal(address(_bridgeReward), cheatBalance); + + for (uint i; i < nOperator - 1; i++) { + vm.expectEmit({ emitter: address(_bridgeReward) }); + emit BridgeRewardScattered(period, operators[i], _rewardPerPeriod / nOperator); + } + + vm.expectEmit({ emitter: address(_bridgeReward) }); + emit BridgeRewardScatterFailed(period, operators[nOperator - 1], _rewardPerPeriod / nOperator); + + _bridgeReward.exposed_settleReward({ operators: operators, ballots: ballots, totalBallot: totalBallot, totalVote: totalVote, period: period }); + assertEq(_bridgeReward.getLatestRewardedPeriod(), period); + + BridgeRewardInfo memory rewardInfo; + for (uint i; i < nOperator - 1; i++) { + rewardInfo = _bridgeReward.getRewardInfo(operators[i]); + assertEq(rewardInfo.claimed, rewardShared); + } + + rewardInfo = _bridgeReward.getRewardInfo(operators[nOperator - 1]); + assertEq(rewardInfo.claimed, 0); + assertEq(_bridgeReward.getTotalRewardScattered(), cheatBalance); } function test_settleReward_SharePropotionally() public { From 59df650be9e8e092ed2d6cacbd080faebe67acc8 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 21 Mar 2024 10:59:10 +0700 Subject: [PATCH 090/305] fix(*BridgeManager): assert threshold --- .../bridge-operator-governance/BridgeManagerQuorum.sol | 2 +- src/mocks/ronin/MockBridgeManager.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol index 705656d9..26b7bbc6 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -59,7 +59,7 @@ abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard { * */ function _setThreshold(uint256 numerator, uint256 denominator) internal virtual returns (uint256 previousNum, uint256 previousDenom) { - if (numerator > denominator) revert ErrInvalidThreshold(msg.sig); + if (numerator > denominator || denominator <= 1) revert ErrInvalidThreshold(msg.sig); BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); diff --git a/src/mocks/ronin/MockBridgeManager.sol b/src/mocks/ronin/MockBridgeManager.sol index a7dbe01a..a1e0eeb6 100644 --- a/src/mocks/ronin/MockBridgeManager.sol +++ b/src/mocks/ronin/MockBridgeManager.sol @@ -8,7 +8,7 @@ contract MockBridgeManager is BridgeManager { address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights - ) payable BridgeManager(0, 0, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights) {} + ) payable BridgeManager(0, 2, 0, address(0), _getEmptyAddressArray(), bridgeOperators, governors, voteWeights) {} function _getEmptyAddressArray() internal pure returns (address[] memory arr) {} } From 5e7ed806b8e679d4c2ceb038a0aca1f7bd8cd7c5 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 22 Mar 2024 10:50:51 +0700 Subject: [PATCH 091/305] fix(BridgeManagerCallback): uncomment temp disabled check --- .../BridgeManagerCallbackRegister.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index 87d975ab..28879c63 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -96,7 +96,7 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager */ function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal { if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) { - // revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs); + revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs); } } From 584ad07fe3b4459b3ceeb216021349357b396ae8 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 22 Mar 2024 10:52:18 +0700 Subject: [PATCH 092/305] fix(BridgeManagerCallback): clean up unchecked `for` --- .../BridgeManagerCallbackRegister.sol | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index 28879c63..ae0ec6f4 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -58,17 +58,13 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager address register; bytes4 callbackInterface = type(IBridgeManagerCallback).interfaceId; - for (uint256 i; i < length;) { + for (uint256 i; i < length; i++) { register = registers[i]; _requireHasCode(register); _requireSupportsInterface(register, callbackInterface); registereds[i] = _callbackRegisters.add(register); - - unchecked { - ++i; - } } } @@ -82,12 +78,8 @@ abstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManager unregistereds = new bool[](length); EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters(); - for (uint256 i; i < length;) { + for (uint256 i; i < length; i++) { unregistereds[i] = _callbackRegisters.remove(registers[i]); - - unchecked { - ++i; - } } } From 515692c9648ddeb550f9aca44c59195c994b5a9e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 25 Mar 2024 10:58:45 +0700 Subject: [PATCH 093/305] fix(MainchainGateway): not createDepositAllFallback with WETHWrapper --- src/mainchain/MainchainGatewayV3.sol | 4 ++-- ...requestDepositFor.MainchainGatewayV3.t.sol | 19 ++++++------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index c5eb4a23..20cfa732 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -416,10 +416,10 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro } /** - * @dev Receives ETH from WETH or creates deposit request if sender is not WETH. + * @dev Receives ETH from WETH or creates deposit request if sender is not WETH or WETHUnwrapper. */ function _fallback() internal virtual { - if (msg.sender == address(wrappedNativeToken)) { + if (msg.sender == address(wrappedNativeToken) || msg.sender == address(wethUnwrapper)) { return; } diff --git a/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol index 9de95d9c..ac941c5e 100644 --- a/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/requestDepositFor.MainchainGatewayV3.t.sol @@ -49,9 +49,7 @@ contract RequestDepositFor_MainchainGatewayV3_Test is BaseIntegration_Test { cachedRequest.tokenAddr = address(_mainchainWeth); vm.expectEmit(address(_mainchainGatewayV3)); - LibTransfer.Receipt memory receipt = cachedRequest.into_deposit_receipt( - _sender, _mainchainGatewayV3.depositCount(), address(_roninWeth), block.chainid - ); + LibTransfer.Receipt memory receipt = cachedRequest.into_deposit_receipt(_sender, _mainchainGatewayV3.depositCount(), address(_roninWeth), block.chainid); emit DepositRequested(receipt.hash(), receipt); vm.prank(_sender); @@ -70,9 +68,7 @@ contract RequestDepositFor_MainchainGatewayV3_Test is BaseIntegration_Test { _depositRequest.tokenAddr = address(_mainchainAxs); vm.expectEmit(address(_mainchainGatewayV3)); - LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt( - _sender, _mainchainGatewayV3.depositCount(), address(_roninAxs), block.chainid - ); + LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt(_sender, _mainchainGatewayV3.depositCount(), address(_roninAxs), block.chainid); emit DepositRequested(receipt.hash(), receipt); vm.prank(_sender); @@ -94,9 +90,8 @@ contract RequestDepositFor_MainchainGatewayV3_Test is BaseIntegration_Test { _depositRequest.info.id = tokenId; _depositRequest.info.quantity = 0; - LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt( - _sender, _mainchainGatewayV3.depositCount(), address(_roninMockERC721), block.chainid - ); + LibTransfer.Receipt memory receipt = + _depositRequest.into_deposit_receipt(_sender, _mainchainGatewayV3.depositCount(), address(_roninMockERC721), block.chainid); vm.expectEmit(address(_mainchainGatewayV3)); emit DepositRequested(receipt.hash(), receipt); @@ -118,15 +113,13 @@ contract RequestDepositFor_MainchainGatewayV3_Test is BaseIntegration_Test { _depositRequest.tokenAddr = address(_mainchainWeth); - LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt( - _sender, _mainchainGatewayV3.depositCount(), address(_roninWeth), block.chainid - ); + LibTransfer.Receipt memory receipt = _depositRequest.into_deposit_receipt(_sender, _mainchainGatewayV3.depositCount(), address(_roninWeth), block.chainid); vm.expectEmit(address(_mainchainGatewayV3)); emit DepositRequested(receipt.hash(), receipt); assertEq(address(_mainchainWeth).balance, _quantity); - vm.prank(_sender); + vm.startPrank(_sender); _mainchainGatewayV3.requestDepositFor(_depositRequest); assertEq(address(_mainchainGatewayV3).balance, _quantity); From 3b0dd2d98574da89d71d397b16b30ef94140c393 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 25 Mar 2024 16:09:55 +0700 Subject: [PATCH 094/305] fix(*Gateway): add `_disableInitializers` --- src/mainchain/MainchainGatewayV3.sol | 4 ++++ src/ronin/gateway/RoninGatewayV3.sol | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 68be6019..f2883d27 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -44,6 +44,10 @@ contract MainchainGatewayV3 is /// @custom:deprecated Previously `_bridgeOperators` (uint256[]) uint256 private ______deprecatedBridgeOperators; + constructor() { + _disableInitializers(); + } + fallback() external payable { _fallback(); } diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 6a11782c..47442df9 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -58,6 +58,10 @@ contract RoninGatewayV3 is uint256 internal _trustedNum; uint256 internal _trustedDenom; + constructor () { + _disableInitializers(); + } + fallback() external payable { _fallback(); } From e8fb8fdac9d207f915ee67899e49444f7234926b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 10:39:53 +0700 Subject: [PATCH 095/305] feat(BridgeManager): change domain separator --- src/extensions/bridge-operator-governance/BridgeManager.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index 2335b023..f3fa0c9c 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -77,9 +77,9 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,bytes32 salt)"), - keccak256("BridgeAdmin"), // name hash - keccak256("2"), // version hash - keccak256(abi.encode("BRIDGE_ADMIN", roninChainId)) // salt + keccak256("BridgeManager"), // name hash + keccak256("3"), // version hash + keccak256(abi.encode("BRIDGE_MANAGER", roninChainId)) // salt ) ); From 5a93e6c525156c70d5ea351fd5b77a5bd6015a31 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 10:52:37 +0700 Subject: [PATCH 096/305] feat(BridgeManager): add `executer` and `loose` to the proposal --- src/libraries/Proposal.sol | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index 06e36db3..599fa0b0 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -21,14 +21,20 @@ library Proposal { // Other values: only specifc chain has to execute uint256 chainId; uint256 expiryTimestamp; + // The address that execute the proposal after the proposal passes. + // Leave this address as address(0) to auto-execute by the last valid vote. + address executer; + // A `loose` proposal will revert the whole proposal if encounter one internal failed. + // A non-`loose` proposal will ignore the failed internal calls. + bool loose; address[] targets; uint256[] values; bytes[] calldatas; uint256[] gasAmounts; } - // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); - bytes32 public constant TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a; + // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executer,bool loose,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); + bytes32 public constant TYPE_HASH = 0x98e2bc443e89d620038081eb862bc4dd7a26e2eba7a2a87201642f9419340a57; /** * @dev Validates the proposal. From 7132d72eb28684a3464f34162f7bc5a8cef3bf7a Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 10:53:43 +0700 Subject: [PATCH 097/305] fix(BridgeManager): rename for consistence --- src/libraries/Proposal.sol | 73 ++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 43 deletions(-) diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index 599fa0b0..55d4db9c 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -39,17 +39,17 @@ library Proposal { /** * @dev Validates the proposal. */ - function validate(ProposalDetail memory _proposal, uint256 _maxExpiryDuration) internal view { + function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view { if ( - !(_proposal.targets.length > 0 && - _proposal.targets.length == _proposal.values.length && - _proposal.targets.length == _proposal.calldatas.length && - _proposal.targets.length == _proposal.gasAmounts.length) + !( + proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length + && proposal.targets.length == proposal.gasAmounts.length + ) ) { revert ErrLengthMismatch(msg.sig); } - if (_proposal.expiryTimestamp > block.timestamp + _maxExpiryDuration) { + if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) { revert ErrInvalidExpiryTimestamp(); } } @@ -57,18 +57,14 @@ library Proposal { /** * @dev Returns struct hash of the proposal. */ - function hash(ProposalDetail memory _proposal) internal pure returns (bytes32 digest_) { - uint256[] memory _values = _proposal.values; - address[] memory _targets = _proposal.targets; - bytes32[] memory _calldataHashList = new bytes32[](_proposal.calldatas.length); - uint256[] memory _gasAmounts = _proposal.gasAmounts; - - for (uint256 _i; _i < _calldataHashList.length; ) { - _calldataHashList[_i] = keccak256(_proposal.calldatas[_i]); - - unchecked { - ++_i; - } + function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) { + uint256[] memory values = proposal.values; + address[] memory targets = proposal.targets; + bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length); + uint256[] memory gasAmounts = proposal.gasAmounts; + + for (uint256 i; i < calldataHashList.length; ++i) { + calldataHashList[i] = keccak256(proposal.calldatas[i]); } // return @@ -87,18 +83,18 @@ library Proposal { assembly { let ptr := mload(0x40) mstore(ptr, TYPE_HASH) - mstore(add(ptr, 0x20), mload(_proposal)) // _proposal.nonce - mstore(add(ptr, 0x40), mload(add(_proposal, 0x20))) // _proposal.chainId - mstore(add(ptr, 0x60), mload(add(_proposal, 0x40))) // expiry timestamp + mstore(add(ptr, 0x20), mload(proposal)) // _proposal.nonce + mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // _proposal.chainId + mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // expiry timestamp let arrayHashed - arrayHashed := keccak256(add(_targets, 32), mul(mload(_targets), 32)) // targetsHash + arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash mstore(add(ptr, 0x80), arrayHashed) - arrayHashed := keccak256(add(_values, 32), mul(mload(_values), 32)) // _valuesHash + arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // _valuesHash mstore(add(ptr, 0xa0), arrayHashed) - arrayHashed := keccak256(add(_calldataHashList, 32), mul(mload(_calldataHashList), 32)) // _calldatasHash + arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // _calldatasHash mstore(add(ptr, 0xc0), arrayHashed) - arrayHashed := keccak256(add(_gasAmounts, 32), mul(mload(_gasAmounts), 32)) // _gasAmountsHash + arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // _gasAmountsHash mstore(add(ptr, 0xe0), arrayHashed) digest_ := keccak256(ptr, 0x100) } @@ -110,31 +106,22 @@ library Proposal { * @notice Does not check whether the call result is successful or not. Please use `execute` instead. * */ - function executable(ProposalDetail memory _proposal) internal view returns (bool _result) { - return _proposal.chainId == 0 || _proposal.chainId == block.chainid; + function executable(ProposalDetail memory proposal) internal view returns (bool result) { + return proposal.chainId == 0 || proposal.chainId == block.chainid; } /** * @dev Executes the proposal. */ - function execute( - ProposalDetail memory _proposal - ) internal returns (bool[] memory _successCalls, bytes[] memory _returnDatas) { - if (!executable(_proposal)) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid); - - _successCalls = new bool[](_proposal.targets.length); - _returnDatas = new bytes[](_proposal.targets.length); - for (uint256 _i = 0; _i < _proposal.targets.length; ) { - if (gasleft() <= _proposal.gasAmounts[_i]) revert ErrInsufficientGas(hash(_proposal)); + function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) { + if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid); - (_successCalls[_i], _returnDatas[_i]) = _proposal.targets[_i].call{ - value: _proposal.values[_i], - gas: _proposal.gasAmounts[_i] - }(_proposal.calldatas[_i]); + successCalls = new bool[](proposal.targets.length); + returnDatas = new bytes[](proposal.targets.length); + for (uint256 i = 0; i < proposal.targets.length; ++i) { + if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal)); - unchecked { - ++_i; - } + (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]); } } } From 21c4ee8d215a8087703546c92c74cae2591d65ae Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 13:10:00 +0700 Subject: [PATCH 098/305] feat(BridgeManager): require executer and loose in the external methods --- .../sequential-governance/CoreGovernance.sol | 25 ++++++++- .../GlobalCoreGovernance.sol | 4 +- .../CommonGovernanceProposal.sol | 7 --- src/libraries/GlobalProposal.sol | 55 ++++++++++--------- src/libraries/Proposal.sol | 53 ++++++++++++------ src/ronin/gateway/RoninBridgeManager.sol | 35 +++++++++--- src/utils/CommonErrors.sol | 17 ++++++ 7 files changed, 136 insertions(+), 60 deletions(-) diff --git a/src/extensions/sequential-governance/CoreGovernance.sol b/src/extensions/sequential-governance/CoreGovernance.sol index 944905f7..c2a58fb2 100644 --- a/src/extensions/sequential-governance/CoreGovernance.sol +++ b/src/extensions/sequential-governance/CoreGovernance.sol @@ -109,6 +109,8 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus function _proposeProposal( uint256 chainId, uint256 expiryTimestamp, + address executer, + bool loose, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, @@ -118,7 +120,7 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid); uint256 round_ = _createVotingRound(chainId); - proposal = Proposal.ProposalDetail(round_, chainId, expiryTimestamp, targets, values, calldatas, gasAmounts); + proposal = Proposal.ProposalDetail(round_, chainId, expiryTimestamp, executer, loose, targets, values, calldatas, gasAmounts); proposal.validate(_proposalExpiryDuration); bytes32 proposalHash = proposal.hash(); @@ -204,7 +206,9 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus done = true; _vote.status = VoteStatus.Approved; emit ProposalApproved(_vote.hash); - _tryExecute(_vote, proposal); + if (proposal.isAutoExecute()) { + _tryExecute(_vote, proposal); + } } else if (_againstVoteWeight >= minimumAgainstVoteWeight) { done = true; _vote.status = VoteStatus.Rejected; @@ -212,6 +216,23 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus } } + /** + * @dev The specified executer executes the proposal on an approved proposal. + */ + function _executeWithCaller(Proposal.ProposalDetail calldata proposal, address caller) internal { + bytes32 proposalHash = proposal.hash(); + ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce]; + + if (_vote.hash != proposalHash) { + revert ErrInvalidProposal(proposalHash, _vote.hash); + } + + if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved(); + if (caller != proposal.executer) revert ErrInvalidExecuter(); + + _tryExecute(_vote, proposal); + } + /** * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired. * diff --git a/src/extensions/sequential-governance/GlobalCoreGovernance.sol b/src/extensions/sequential-governance/GlobalCoreGovernance.sol index b5ead07b..7c118ca0 100644 --- a/src/extensions/sequential-governance/GlobalCoreGovernance.sol +++ b/src/extensions/sequential-governance/GlobalCoreGovernance.sol @@ -42,6 +42,8 @@ abstract contract GlobalCoreGovernance is CoreGovernance { function _proposeGlobal( uint256 expiryTimestamp, GlobalProposal.TargetOption[] calldata targetOptions, + address executer, + bool loose, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts, @@ -49,7 +51,7 @@ abstract contract GlobalCoreGovernance is CoreGovernance { ) internal virtual { uint256 round_ = _createVotingRound(0); GlobalProposal.GlobalProposalDetail memory globalProposal = - GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, targetOptions, values, calldatas, gasAmounts); + GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executer, loose, targetOptions, values, calldatas, gasAmounts); Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true })); proposal.validate(_proposalExpiryDuration); diff --git a/src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol b/src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol index bfa07fd7..469391f1 100644 --- a/src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol +++ b/src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol @@ -6,13 +6,6 @@ import "../CoreGovernance.sol"; abstract contract CommonGovernanceProposal is CoreGovernance { using Proposal for Proposal.ProposalDetail; - /** - * @dev Error thrown when an invalid proposal is encountered. - * @param actual The actual value of the proposal. - * @param expected The expected value of the proposal. - */ - error ErrInvalidProposal(bytes32 actual, bytes32 expected); - /** * @dev Casts votes by signatures. * diff --git a/src/libraries/GlobalProposal.sol b/src/libraries/GlobalProposal.sol index 5fd9dd3e..ef67cbff 100644 --- a/src/libraries/GlobalProposal.sol +++ b/src/libraries/GlobalProposal.sol @@ -21,14 +21,16 @@ library GlobalProposal { // Nonce to make sure proposals are executed in order uint256 nonce; uint256 expiryTimestamp; + address executer; + bool loose; TargetOption[] targetOptions; uint256[] values; bytes[] calldatas; uint256[] gasAmounts; } - // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); - bytes32 public constant TYPE_HASH = 0x1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee91141350; + // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executer,bool loose,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); + bytes32 public constant TYPE_HASH = 0x8fdb3bc7211cb44f39a2cae84127672c4570a00720dfbf2bb58285070faa28da; /** * @dev Returns struct hash of the proposal. @@ -39,7 +41,7 @@ library GlobalProposal { bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length); uint256[] memory gasAmounts = self.gasAmounts; - for (uint256 i; i < calldataHashList.length; ) { + for (uint256 i; i < calldataHashList.length;) { calldataHashList[i] = keccak256(self.calldatas[i]); unchecked { @@ -52,54 +54,55 @@ library GlobalProposal { * keccak256( * abi.encode( * TYPE_HASH, - * _proposal.nonce, - * _proposal.expiryTimestamp, - * _targetsHash, - * _valuesHash, - * _calldatasHash, - * _gasAmountsHash + * proposal.nonce, + * proposal.expiryTimestamp, + * proposal.executer, + * proposal.loose, + * targetsHash, + * valuesHash, + * calldatasHash, + * gasAmountsHash * ) * ); */ assembly { let ptr := mload(0x40) mstore(ptr, TYPE_HASH) - mstore(add(ptr, 0x20), mload(self)) // _proposal.nonce - mstore(add(ptr, 0x40), mload(add(self, 0x20))) // _proposal.expiryTimestamp + mstore(add(ptr, 0x20), mload(self)) // proposal.nonce + mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp + mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executer + mstore(add(ptr, 0x80), mload(add(self, 0x60))) // proposal.loose let arrayHashed arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash - mstore(add(ptr, 0x60), arrayHashed) - arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // _valuesHash - mstore(add(ptr, 0x80), arrayHashed) - arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // _calldatasHash mstore(add(ptr, 0xa0), arrayHashed) - arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // _gasAmountsHash + arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash mstore(add(ptr, 0xc0), arrayHashed) - digest_ := keccak256(ptr, 0xe0) + arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash + mstore(add(ptr, 0xe0), arrayHashed) + arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash + mstore(add(ptr, 0x100), arrayHashed) + digest_ := keccak256(ptr, 0x120) } } /** * @dev Converts into the normal proposal. */ - function intoProposalDetail( - GlobalProposalDetail memory self, - address[] memory targets - ) internal pure returns (Proposal.ProposalDetail memory detail_) { + function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) { detail_.nonce = self.nonce; - detail_.expiryTimestamp = self.expiryTimestamp; detail_.chainId = 0; + detail_.expiryTimestamp = self.expiryTimestamp; + detail_.executer = self.executer; + detail_.loose = self.loose; + detail_.targets = new address[](self.targetOptions.length); detail_.values = self.values; detail_.calldatas = self.calldatas; detail_.gasAmounts = self.gasAmounts; - for (uint256 i; i < self.targetOptions.length; ) { + for (uint256 i; i < self.targetOptions.length; ++i) { detail_.targets[i] = targets[i]; - unchecked { - ++i; - } } } } diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index 55d4db9c..37586608 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -14,11 +14,16 @@ library Proposal { */ error ErrInvalidExpiryTimestamp(); + /** + * @dev Error thrown when the loose proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`. + */ + error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg); + struct ProposalDetail { // Nonce to make sure proposals are executed in order uint256 nonce; // Value 0: all chain should run this proposal - // Other values: only specifc chain has to execute + // Other values: only specific chain has to execute uint256 chainId; uint256 expiryTimestamp; // The address that execute the proposal after the proposal passes. @@ -71,35 +76,47 @@ library Proposal { // keccak256( // abi.encode( // TYPE_HASH, - // _proposal.nonce, - // _proposal.chainId, - // _targetsHash, - // _valuesHash, - // _calldatasHash, - // _gasAmountsHash + // proposal.nonce, + // proposal.chainId, + // proposal.expiryTimestamp + // proposal.executer + // proposal.loose + // targetsHash, + // valuesHash, + // calldatasHash, + // gasAmountsHash // ) // ); // / assembly { let ptr := mload(0x40) mstore(ptr, TYPE_HASH) - mstore(add(ptr, 0x20), mload(proposal)) // _proposal.nonce - mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // _proposal.chainId - mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // expiry timestamp + mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce + mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId + mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp + mstore(add(ptr, 0x80), mload(add(proposal, 0x80))) // proposal.executer + mstore(add(ptr, 0xa0), mload(add(proposal, 0x80))) // proposal.loose let arrayHashed arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash - mstore(add(ptr, 0x80), arrayHashed) - arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // _valuesHash - mstore(add(ptr, 0xa0), arrayHashed) - arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // _calldatasHash mstore(add(ptr, 0xc0), arrayHashed) - arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // _gasAmountsHash + arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash mstore(add(ptr, 0xe0), arrayHashed) - digest_ := keccak256(ptr, 0x100) + arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash + mstore(add(ptr, 0x100), arrayHashed) + arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash + mstore(add(ptr, 0x120), arrayHashed) + digest_ := keccak256(ptr, 0x140) } } + /** + * @dev Returns whether the proposal is auto-executed on the last valid vote. + */ + function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) { + return proposal.executer == address(0); + } + /** * @dev Returns whether the proposal is executable for the current chain. * @@ -122,6 +139,10 @@ library Proposal { if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal)); (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]); + + if (!successCalls[i]) { + revert ErrLooseProposalInternallyRevert(i, returnDatas[i]); + } } } } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 5ca59ab1..a95f7fae 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -9,9 +9,11 @@ import { GlobalGovernanceProposal } from "../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol"; import { VoteStatusConsumer } from "../../interfaces/consumers/VoteStatusConsumer.sol"; -import { ErrQueryForEmptyVote } from "../../utils/CommonErrors.sol"; +import "../../utils/CommonErrors.sol"; contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal { + using Proposal for Proposal.ProposalDetail; + function initialize( uint256 num, uint256 denom, @@ -42,14 +44,16 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan * */ function propose( - uint256 _chainId, - uint256 _expiryTimestamp, - address[] calldata _targets, - uint256[] calldata _values, - bytes[] calldata _calldatas, - uint256[] calldata _gasAmounts + uint256 chainId, + uint256 expiryTimestamp, + address executer, + bool loose, + address[] calldata targets, + uint256[] calldata values, + bytes[] calldata calldatas, + uint256[] calldata gasAmounts ) external onlyGovernor { - _proposeProposal(_chainId, _expiryTimestamp, _targets, _values, _calldatas, _gasAmounts, msg.sender); + _proposeProposal(chainId, expiryTimestamp, executer, loose, targets, values, calldatas, gasAmounts, msg.sender); } /** @@ -78,6 +82,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan */ function proposeProposalForCurrentNetwork( uint256 expiryTimestamp, + address executer, + bool loose, address[] calldata targets, uint256[] calldata values, bytes[] calldata calldatas, @@ -88,6 +94,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan Proposal.ProposalDetail memory _proposal = _proposeProposal({ chainId: block.chainid, expiryTimestamp: expiryTimestamp, + executer: executer, + loose: loose, targets: targets, values: values, calldatas: calldatas, @@ -128,6 +136,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan */ function proposeGlobal( uint256 expiryTimestamp, + address executer, + bool loose, GlobalProposal.TargetOption[] calldata targetOptions, uint256[] calldata values, bytes[] calldata calldatas, @@ -135,6 +145,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan ) external onlyGovernor { _proposeGlobal({ expiryTimestamp: expiryTimestamp, + executer: executer, + loose: loose, targetOptions: targetOptions, values: values, calldatas: calldatas, @@ -179,6 +191,13 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan * COMMON METHODS */ + /** + * @dev See {CoreGovernance-_executeWithCaller}. + */ + function execute(Proposal.ProposalDetail calldata proposal) external { + _executeWithCaller(proposal, msg.sender); + } + /** * @dev Deletes the expired proposal by its chainId and nonce, without creating a new proposal. * diff --git a/src/utils/CommonErrors.sol b/src/utils/CommonErrors.sol index 0dd843f5..dc7a4050 100644 --- a/src/utils/CommonErrors.sol +++ b/src/utils/CommonErrors.sol @@ -226,3 +226,20 @@ error ErrOncePerBlock(); * @dev Error of method caller must be coinbase */ error ErrCallerMustBeCoinbase(); + +/** + * @dev Error thrown when an invalid proposal is encountered. + * @param actual The actual value of the proposal. + * @param expected The expected value of the proposal. + */ +error ErrInvalidProposal(bytes32 actual, bytes32 expected); + +/** + * @dev Error of proposal is not approved for executing. + */ +error ErrProposalNotApproved(); + +/** + * @dev Error of the caller is not the specified executer. + */ +error ErrInvalidExecuter(); From 84d546ad9dbf9e3881e26cb12988c887eed59c30 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 13:10:12 +0700 Subject: [PATCH 099/305] test: adapt test --- .../20231218-maptoken-mainchain.s.sol | 2 +- .../20231218-maptoken-roninchain.s.sol | 2 +- .../20240115-maptoken-mainchain.s.sol | 2 + .../20240115-maptoken-roninchain.s.sol | 2 + .../20240131-maptoken-pixel-mainchain.s.sol | 2 + .../20240131-maptoken-pixel-roninchain.s.sol | 2 + .../20240206-maptoken-banana-mainchain.s.sol | 2 +- .../20240206-maptoken-banana-roninchain.s.sol | 4 +- test/bridge/integration/BaseIntegration.t.sol | 16 ++++++ ...oteBridgeOperator.RoninBridgeManager.t.sol | 4 ++ test/helpers/MainchainBridgeAdminUtils.t.sol | 8 +++ test/helpers/ProposalUtils.t.sol | 54 +++++++++---------- test/helpers/RoninBridgeAdminUtils.t.sol | 8 +++ 13 files changed, 75 insertions(+), 33 deletions(-) diff --git a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol index e7a72225..abc8901e 100644 --- a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol @@ -83,6 +83,6 @@ contract Migration__20231215_MapTokenMainchain is BridgeMigration { uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); vm.broadcast(sender()); - _roninBridgeManager.propose(chainId, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(chainId, expiredTime, address(0), false, targets, values, calldatas, gasAmounts); } } diff --git a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol index 5621946c..4e3b9150 100644 --- a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol @@ -58,6 +58,6 @@ contract Migration__20231215_MapTokenRoninchain is BridgeMigration { _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); vm.broadcast(sender()); - _roninBridgeManager.propose(block.chainid, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), false, targets, values, calldatas, gasAmounts); } } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index 649d8e6a..f433067c 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -175,6 +175,8 @@ contract Migration__MapTokenMainchain is BridgeMigration { _roninBridgeManager.propose( chainId, expiredTime, + address(0), + false, targets, values, calldatas, diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index 3b7d548b..ffd75cf7 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -131,6 +131,8 @@ contract Migration__MapTokenRoninchain is BridgeMigration { _roninBridgeManager.propose( block.chainid, expiredTime, + address(0), + false, targets, values, calldatas, diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol index 1101126e..0603d4a2 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol @@ -133,6 +133,8 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio _roninBridgeManager.propose( chainId, expiredTime, + address(0), + false, targets, values, calldatas, diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol index 607a728f..129f589b 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol @@ -131,6 +131,8 @@ contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migrati _roninBridgeManager.propose( block.chainid, expiredTime, + address(0), + false, targets, values, calldatas, diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index 4a7da82a..9714c9bd 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -146,7 +146,7 @@ contract Migration__20240206_MapTokenBananaMainchain is console2.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); - _roninBridgeManager.propose(chainId, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(chainId, expiredTime, address(0), false, targets, values, calldatas, gasAmounts); } } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index 375fc17b..2e6ab1dc 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -117,7 +117,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is roninTokensToSetMinThreshold[1] = pixelRoninToken; minThresholds[1] = pixelMinThreshold; - + roninTokensToSetMinThreshold[2] = pixelMainchainToken; minThresholds[2] = 0; @@ -152,7 +152,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is console2.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); - _roninBridgeManager.propose(block.chainid, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), false, targets, values, calldatas, gasAmounts); // ============= LOCAL SIMULATION ================== _cheatWeightOperator(_governor); diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 79bb2828..41454d06 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -317,6 +317,8 @@ contract BaseIntegration_Test is Base_Test { // set targets GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(GlobalCoreGovernance.updateManyTargetOption, (param.targetOptions, param.targets)), @@ -333,6 +335,8 @@ contract BaseIntegration_Test is Base_Test { // set bridge contract GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, param.bridgeContract)), @@ -351,6 +355,8 @@ contract BaseIntegration_Test is Base_Test { bytes memory calldata_ = abi.encodeCall(IBridgeManagerCallbackRegister.registerCallbacks, (param.callbackRegisters)); GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: calldata_, @@ -368,6 +374,8 @@ contract BaseIntegration_Test is Base_Test { // set min governors GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IBridgeManager.setMinRequiredGovernor, (_param.roninBridgeManager.minRequiredGovernor)), @@ -406,6 +414,8 @@ contract BaseIntegration_Test is Base_Test { // set targets GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(GlobalCoreGovernance.updateManyTargetOption, (param.targetOptions, param.targets)), @@ -422,6 +432,8 @@ contract BaseIntegration_Test is Base_Test { // set bridge contract GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, param.bridgeContract)), @@ -440,6 +452,8 @@ contract BaseIntegration_Test is Base_Test { bytes memory calldata_ = abi.encodeCall(IBridgeManagerCallbackRegister.registerCallbacks, (param.callbackRegisters)); GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: calldata_, @@ -457,6 +471,8 @@ contract BaseIntegration_Test is Base_Test { // set min governors GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IBridgeManager.setMinRequiredGovernor, (_param.roninBridgeManager.minRequiredGovernor)), diff --git a/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol index 5d45e546..5589b253 100644 --- a/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol @@ -58,6 +58,8 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { function test_voteAddBridgeOperatorsProposal() public { _globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + _proposalExpiryDuration, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)), @@ -119,6 +121,8 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { _globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + _proposalExpiryDuration, + executer: address(0), + loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)), diff --git a/test/helpers/MainchainBridgeAdminUtils.t.sol b/test/helpers/MainchainBridgeAdminUtils.t.sol index 55c534d0..aad2f32f 100644 --- a/test/helpers/MainchainBridgeAdminUtils.t.sol +++ b/test/helpers/MainchainBridgeAdminUtils.t.sol @@ -20,6 +20,8 @@ contract MainchainBridgeAdminUtils is ProposalUtils { function functionDelegateCall(address to, bytes memory data) public { Proposal.ProposalDetail memory proposal = this.createProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), + executer: address(0), + loose: false, target: to, value: 0, calldata_: abi.encodeWithSignature("functionDelegateCall(bytes)", data), @@ -40,6 +42,8 @@ contract MainchainBridgeAdminUtils is ProposalUtils { function functionDelegateCallGlobal(GlobalProposal.TargetOption target, bytes memory data) public { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), + executer: address(0), + loose: false, targetOption: target, value: 0, calldata_: abi.encodeWithSignature("functionDelegateCall(bytes)", data), @@ -73,6 +77,8 @@ contract MainchainBridgeAdminUtils is ProposalUtils { GlobalProposal.GlobalProposalDetail memory proposal = GlobalProposal.GlobalProposalDetail({ nonce: _contract.round(0) + 1, expiryTimestamp: this.defaultExpiryTimestamp(), + executer: address(0), + loose: false, targetOptions: targetOptions, values: values, calldatas: calldatas, @@ -92,6 +98,8 @@ contract MainchainBridgeAdminUtils is ProposalUtils { function upgradeGlobal(GlobalProposal.TargetOption targetOption, uint256 nonce, bytes memory data) public { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), + executer: address(0), + loose: false, targetOption: targetOption, value: 0, calldata_: abi.encodeWithSignature("upgradeTo(bytes)", data), diff --git a/test/helpers/ProposalUtils.t.sol b/test/helpers/ProposalUtils.t.sol index 4e06b0b5..04395331 100644 --- a/test/helpers/ProposalUtils.t.sol +++ b/test/helpers/ProposalUtils.t.sol @@ -28,6 +28,8 @@ contract ProposalUtils is Utils, Test { function createProposal( uint256 expiryTimestamp, + address executer, + bool loose, address target, uint256 value, bytes memory calldata_, @@ -37,6 +39,8 @@ contract ProposalUtils is Utils, Test { proposal = Proposal.ProposalDetail({ nonce: nonce, chainId: block.chainid, + executer: executer, + loose: loose, expiryTimestamp: expiryTimestamp, targets: wrapAddress(target), values: wrapUint(value), @@ -47,6 +51,8 @@ contract ProposalUtils is Utils, Test { function createGlobalProposal( uint256 expiryTimestamp, + address executer, + bool loose, GlobalProposal.TargetOption targetOption, uint256 value, bytes memory calldata_, @@ -59,6 +65,8 @@ contract ProposalUtils is Utils, Test { proposal = GlobalProposal.GlobalProposalDetail({ nonce: nonce, expiryTimestamp: expiryTimestamp, + executer: executer, + loose: loose, targetOptions: targetOptions, values: wrapUint(value), calldatas: wrapBytes(calldata_), @@ -75,19 +83,14 @@ contract ProposalUtils is Utils, Test { return generateSignaturesFor(proposalHash, signerPKs, support); } - function generateSignatures(Proposal.ProposalDetail memory proposal, uint256[] memory signerPKs) - public - view - returns (SignatureConsumer.Signature[] memory sigs) - { + function generateSignatures( + Proposal.ProposalDetail memory proposal, + uint256[] memory signerPKs + ) public view returns (SignatureConsumer.Signature[] memory sigs) { return generateSignatures(proposal, signerPKs, Ballot.VoteType.For); } - function generateSignatures(Proposal.ProposalDetail memory proposal) - public - view - returns (SignatureConsumer.Signature[] memory sigs) - { + function generateSignatures(Proposal.ProposalDetail memory proposal) public view returns (SignatureConsumer.Signature[] memory sigs) { return generateSignatures(proposal, _signerPKs, Ballot.VoteType.For); } @@ -100,19 +103,14 @@ contract ProposalUtils is Utils, Test { return generateSignaturesFor(proposalHash, signerPKs, support); } - function generateSignaturesGlobal(GlobalProposal.GlobalProposalDetail memory proposal, uint256[] memory signerPKs) - public - view - returns (SignatureConsumer.Signature[] memory sigs) - { + function generateSignaturesGlobal( + GlobalProposal.GlobalProposalDetail memory proposal, + uint256[] memory signerPKs + ) public view returns (SignatureConsumer.Signature[] memory sigs) { return generateSignaturesGlobal(proposal, signerPKs, Ballot.VoteType.For); } - function generateSignaturesGlobal(GlobalProposal.GlobalProposalDetail memory proposal) - public - view - returns (SignatureConsumer.Signature[] memory sigs) - { + function generateSignaturesGlobal(GlobalProposal.GlobalProposalDetail memory proposal) public view returns (SignatureConsumer.Signature[] memory sigs) { return generateSignaturesGlobal(proposal, _signerPKs, Ballot.VoteType.For); } @@ -120,18 +118,18 @@ contract ProposalUtils is Utils, Test { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,bytes32 salt)"), - keccak256("BridgeAdmin"), // name hash - keccak256("2"), // version hash - keccak256(abi.encode("BRIDGE_ADMIN", block.chainid)) // salt + keccak256("BridgeManager"), // name hash + keccak256("3"), // version hash + keccak256(abi.encode("BRIDGE_MANAGER", block.chainid)) // salt ) ); } - function generateSignaturesFor(bytes32 proposalHash, uint256[] memory signerPKs, Ballot.VoteType support) - public - view - returns (SignatureConsumer.Signature[] memory sigs) - { + function generateSignaturesFor( + bytes32 proposalHash, + uint256[] memory signerPKs, + Ballot.VoteType support + ) public view returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { diff --git a/test/helpers/RoninBridgeAdminUtils.t.sol b/test/helpers/RoninBridgeAdminUtils.t.sol index 1b65257d..0292ea53 100644 --- a/test/helpers/RoninBridgeAdminUtils.t.sol +++ b/test/helpers/RoninBridgeAdminUtils.t.sol @@ -20,6 +20,8 @@ contract RoninBridgeAdminUtils is ProposalUtils { function functionDelegateCall(address to, bytes memory data) public { Proposal.ProposalDetail memory proposal = this.createProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), + executer: address(0), + loose: false, target: to, value: 0, calldata_: abi.encodeWithSignature("functionDelegateCall(bytes)", data), @@ -40,6 +42,8 @@ contract RoninBridgeAdminUtils is ProposalUtils { function functionDelegateCallGlobal(GlobalProposal.TargetOption target, bytes memory data) public { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), + executer: address(0), + loose: false, targetOption: target, value: 0, calldata_: abi.encodeWithSignature("functionDelegateCall(bytes)", data), @@ -73,6 +77,8 @@ contract RoninBridgeAdminUtils is ProposalUtils { GlobalProposal.GlobalProposalDetail memory proposal = GlobalProposal.GlobalProposalDetail({ nonce: _contract.round(0) + 1, expiryTimestamp: this.defaultExpiryTimestamp(), + executer: address(0), + loose: false, targetOptions: targetOptions, values: values, calldatas: calldatas, @@ -92,6 +98,8 @@ contract RoninBridgeAdminUtils is ProposalUtils { function upgradeGlobal(GlobalProposal.TargetOption targetOption, uint256 nonce, bytes memory data) public { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), + executer: address(0), + loose: false, targetOption: targetOption, value: 0, calldata_: abi.encodeWithSignature("upgradeTo(bytes)", data), From 4dfe941ef7374a8e66937573e18f9f038bcdd281 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 14:56:39 +0700 Subject: [PATCH 100/305] fix(BridgeManager): fix loose proposal check --- src/libraries/Proposal.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index 37586608..b0ef091f 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -140,7 +140,7 @@ library Proposal { (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]); - if (!successCalls[i]) { + if (!proposal.loose && !successCalls[i]) { revert ErrLooseProposalInternallyRevert(i, returnDatas[i]); } } From 4d76453aa7f6e7af5907403940ad6b54865d826e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 16:20:45 +0700 Subject: [PATCH 101/305] test: add `loose` proposal test --- .../proposeCurrent.RoninBridgeManager.t.sol | 172 +++++++++++++++++ ...proposeGlobal.MainchainBridgeManager.t.sol | 177 ++++++++++++++++++ .../proposeGlobal.RoninBridgeManager.t.sol | 169 +++++++++++++++++ 3 files changed, 518 insertions(+) create mode 100644 test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol create mode 100644 test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.MainchainBridgeManager.t.sol create mode 100644 test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol new file mode 100644 index 00000000..662db5bc --- /dev/null +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibSort } from "solady/utils/LibSort.sol"; + +import "../../BaseIntegration.t.sol"; + +contract LooseProposal_CurrentNetworkProposal_RoninBridgeManager_Test is BaseIntegration_Test { + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + + error ErrInvalidProposalNonce(bytes4 sig); + error ErrLooseProposalInternallyRevert(uint, bytes); + + using LibSort for address[]; + + uint256 _proposalExpiryDuration; + uint256 _addingOperatorNum; + address[] _addingOperators; + address[] _addingGovernors; + uint96[] _voteWeights; + + address[] _beforeRelayedOperators; + address[] _beforeRelayedGovernors; + + address[] _afterRelayedOperators; + address[] _afterRelayedGovernors; + + Ballot.VoteType[] _supports; + + GlobalProposal.GlobalProposalDetail _globalProposal; + SignatureConsumer.Signature[] _signatures; + + Proposal.ProposalDetail _proposal; + + bytes32 _anyValue; + + function setUp() public virtual override { + super.setUp(); + + _proposalExpiryDuration = 60; + _addingOperatorNum = 3; + + _beforeRelayedOperators = _param.roninBridgeManager.bridgeOperators; + _beforeRelayedGovernors = _param.roninBridgeManager.governors; + + _supports = new Ballot.VoteType[](_beforeRelayedOperators.length); + for (uint256 i; i < _beforeRelayedGovernors.length; i++) { + _supports[i] = Ballot.VoteType.For; + } + + _generateAddingOperators(_addingOperatorNum); + + _proposal.nonce = _roninBridgeManager.round(block.chainid) + 1; + _proposal.chainId = block.chainid; + _proposal.executer = address(0); + _proposal.loose = false; + _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; + + _proposal.targets.push(address(_roninBridgeManager)); + _proposal.values.push(0); + _proposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _proposal.gasAmounts.push(1_000_000); + + // Duplicate the internal call + _proposal.targets.push(address(_roninBridgeManager)); + _proposal.values.push(0); + _proposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _proposal.gasAmounts.push(1_000_000); + } + + // Should the strict proposal failed when containing one failed internal call + function test_strictProposal_revertWhen_containingOneFailedInternalCall() external { + _proposal.loose = false; + _proposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.expectRevert(abi.encodeWithSelector(ErrLooseProposalInternallyRevert.selector, 1, "")); + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + } + + // Should the strict proposal passes when all internal calls are valid + function test_strictProposal_WhenAllInternalCallsPass() external { + _proposal.loose = false; + _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should the loose proposal passes when containing one failed internal call + function test_looseProposal_WhenContainsOneInternalCallFailed() external { + _proposal.loose = true; + _proposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should the loose proposal passes when all internal calls are valid + function test_looseProposal_WhenAllInternalCallsPass() external { + _proposal.loose = true; + _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + function _generateAddingOperators(uint256 num) internal { + delete _addingOperators; + delete _addingGovernors; + delete _voteWeights; + + _afterRelayedOperators = _beforeRelayedOperators; + _afterRelayedGovernors = _beforeRelayedGovernors; + + for (uint256 i; i < num; i++) { + _addingOperators.push(makeAddr(string.concat("adding-operator", vm.toString(i)))); + _addingGovernors.push(makeAddr(string.concat("adding-governor", vm.toString(i)))); + _voteWeights.push(uint96(uint256(100))); + + _afterRelayedOperators.push(_addingOperators[i]); + _afterRelayedGovernors.push(_addingGovernors[i]); + } + } +} diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.MainchainBridgeManager.t.sol new file mode 100644 index 00000000..084d5d65 --- /dev/null +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.MainchainBridgeManager.t.sol @@ -0,0 +1,177 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibSort } from "solady/utils/LibSort.sol"; + +import "../../BaseIntegration.t.sol"; + +contract LooseProposal_GlobalProposal_MainchainBridgeManager_Test is BaseIntegration_Test { + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + event ProposalApproved(bytes32 indexed proposalHash); + event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); + + error ErrInvalidProposalNonce(bytes4 sig); + error ErrLooseProposalInternallyRevert(uint, bytes); + + using LibSort for address[]; + + uint256 _proposalExpiryDuration; + uint256 _addingOperatorNum; + address[] _addingOperators; + address[] _addingGovernors; + uint96[] _voteWeights; + + address[] _beforeRelayedOperators; + address[] _beforeRelayedGovernors; + + address[] _afterRelayedOperators; + address[] _afterRelayedGovernors; + + Ballot.VoteType[] _supports; + + GlobalProposal.GlobalProposalDetail _globalProposal; + SignatureConsumer.Signature[] _signatures; + + bytes32 _anyValue; + + function setUp() public virtual override { + super.setUp(); + + _proposalExpiryDuration = 60; + _addingOperatorNum = 3; + + _beforeRelayedOperators = _param.roninBridgeManager.bridgeOperators; + _beforeRelayedGovernors = _param.roninBridgeManager.governors; + + _supports = new Ballot.VoteType[](_beforeRelayedOperators.length); + for (uint256 i; i < _beforeRelayedGovernors.length; i++) { + _supports[i] = Ballot.VoteType.For; + } + + _generateAddingOperators(_addingOperatorNum); + + _globalProposal.nonce = _mainchainBridgeManager.round(0) + 1; + _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; + _globalProposal.executer = address(0); + _globalProposal.loose = false; + + _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); + _globalProposal.values.push(0); + _globalProposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _globalProposal.gasAmounts.push(1_000_000); + + // Duplicate the internal call + _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); + _globalProposal.values.push(0); + _globalProposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _globalProposal.gasAmounts.push(1_000_000); + } + + // Should the strict proposal failed when containing one failed internal call + function test_strictProposal_globalProposal_MainchainSide_revertWhen_containingOneFailedInternalCall() external { + _globalProposal.loose = false; + _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed + + vm.expectEmit(false, true, true, true); + emit ProposalApproved(_anyValue); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.expectRevert(abi.encodeWithSelector(ErrLooseProposalInternallyRevert.selector, 1, "")); + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + } + + // Should the strict proposal passes when all internal calls are valid + function test_strictProposal_globalProposal_MainchainSide_WhenAllInternalCallsPass() external { + _globalProposal.loose = false; + _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + + assertEq(_mainchainBridgeManager.globalProposalRelayed(_globalProposal.nonce), true); + assertEq(_mainchainBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should the loose proposal passes when containing one failed internal call + function test_looseProposal_globalProposal_MainchainSide_WhenContainsOneInternalCallFailed() external { + _globalProposal.loose = true; + _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed + + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + + assertEq(_mainchainBridgeManager.globalProposalRelayed(_globalProposal.nonce), true); + assertEq(_mainchainBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should the loose proposal passes when all internal calls are valid + function test_looseProposal_globalProposal_MainchainSide_WhenAllInternalCallsPass() external { + _globalProposal.loose = true; + _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + + assertEq(_mainchainBridgeManager.globalProposalRelayed(_globalProposal.nonce), true); + assertEq(_mainchainBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + function _generateAddingOperators(uint256 num) internal { + delete _addingOperators; + delete _addingGovernors; + delete _voteWeights; + + _afterRelayedOperators = _beforeRelayedOperators; + _afterRelayedGovernors = _beforeRelayedGovernors; + + for (uint256 i; i < num; i++) { + _addingOperators.push(makeAddr(string.concat("adding-operator", vm.toString(i)))); + _addingGovernors.push(makeAddr(string.concat("adding-governor", vm.toString(i)))); + _voteWeights.push(uint96(uint256(100))); + + _afterRelayedOperators.push(_addingOperators[i]); + _afterRelayedGovernors.push(_addingGovernors[i]); + } + } +} diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol new file mode 100644 index 00000000..95bffd82 --- /dev/null +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol @@ -0,0 +1,169 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibSort } from "solady/utils/LibSort.sol"; + +import "../../BaseIntegration.t.sol"; + +contract LooseProposal_GlobalProposal_RoninBridgeManager_Test is BaseIntegration_Test { + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + + error ErrInvalidProposalNonce(bytes4 sig); + error ErrLooseProposalInternallyRevert(uint, bytes); + + using LibSort for address[]; + + uint256 _proposalExpiryDuration; + uint256 _addingOperatorNum; + address[] _addingOperators; + address[] _addingGovernors; + uint96[] _voteWeights; + + address[] _beforeRelayedOperators; + address[] _beforeRelayedGovernors; + + address[] _afterRelayedOperators; + address[] _afterRelayedGovernors; + + Ballot.VoteType[] _supports; + + GlobalProposal.GlobalProposalDetail _globalProposal; + SignatureConsumer.Signature[] _signatures; + + bytes32 _anyValue; + + function setUp() public virtual override { + super.setUp(); + + _proposalExpiryDuration = 60; + _addingOperatorNum = 3; + + _beforeRelayedOperators = _param.roninBridgeManager.bridgeOperators; + _beforeRelayedGovernors = _param.roninBridgeManager.governors; + + _supports = new Ballot.VoteType[](_beforeRelayedOperators.length); + for (uint256 i; i < _beforeRelayedGovernors.length; i++) { + _supports[i] = Ballot.VoteType.For; + } + + _generateAddingOperators(_addingOperatorNum); + + _globalProposal.nonce = _roninBridgeManager.round(0) + 1; + _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; + _globalProposal.executer = address(0); + _globalProposal.loose = false; + + _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); + _globalProposal.values.push(0); + _globalProposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _globalProposal.gasAmounts.push(1_000_000); + + // Duplicate the internal call + _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); + _globalProposal.values.push(0); + _globalProposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _globalProposal.gasAmounts.push(1_000_000); + } + + // Should the strict proposal failed when containing one failed internal call + function test_strictProposal_globalProposal_RoninSide_revertWhen_containingOneFailedInternalCall() external { + _globalProposal.loose = false; + _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.expectRevert(abi.encodeWithSelector(ErrLooseProposalInternallyRevert.selector, 1, "")); + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); + } + + // Should the strict proposal passes when all internal calls are valid + function test_strictProposal_globalProposal_RoninSide_WhenAllInternalCallsPass() external { + _globalProposal.loose = false; + _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); + + assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should the loose proposal passes when containing one failed internal call + function test_looseProposal_globalProposal_RoninSide_WhenContainsOneInternalCallFailed() external { + _globalProposal.loose = true; + _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); + + assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should the loose proposal passes when all internal calls are valid + function test_looseProposal_globalProposal_RoninSide_WhenAllInternalCallsPass() external { + _globalProposal.loose = true; + _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); + + assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + function _generateAddingOperators(uint256 num) internal { + delete _addingOperators; + delete _addingGovernors; + delete _voteWeights; + + _afterRelayedOperators = _beforeRelayedOperators; + _afterRelayedGovernors = _beforeRelayedGovernors; + + for (uint256 i; i < num; i++) { + _addingOperators.push(makeAddr(string.concat("adding-operator", vm.toString(i)))); + _addingGovernors.push(makeAddr(string.concat("adding-governor", vm.toString(i)))); + _voteWeights.push(uint96(uint256(100))); + + _afterRelayedOperators.push(_addingOperators[i]); + _afterRelayedGovernors.push(_addingGovernors[i]); + } + } +} From 8cf4b22f6e917457cb4e3e24f558131d442a4c19 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 17:17:08 +0700 Subject: [PATCH 102/305] test: add `executer` for Ronin proposal test --- ...er.proposeCurrent.RoninBridgeManager.t.sol | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 test/bridge/integration/bridge-manager/proposal-executer/executer.proposeCurrent.RoninBridgeManager.t.sol diff --git a/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeCurrent.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeCurrent.RoninBridgeManager.t.sol new file mode 100644 index 00000000..ee76739c --- /dev/null +++ b/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeCurrent.RoninBridgeManager.t.sol @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibSort } from "solady/utils/LibSort.sol"; + +import "../../BaseIntegration.t.sol"; + +contract ProposalWithExecuter_CurrentNetworkProposal_RoninBridgeManager_Test is BaseIntegration_Test { + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + event ProposalApproved(bytes32 indexed proposalHash); + event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); + + error ErrInvalidExecuter(); + error ErrProposalNotApproved(); + error ErrInvalidProposalNonce(bytes4 sig); + error ErrLooseProposalInternallyRevert(uint, bytes); + + using LibSort for address[]; + + uint256 _proposalExpiryDuration; + uint256 _addingOperatorNum; + address[] _addingOperators; + address[] _addingGovernors; + uint96[] _voteWeights; + + address[] _beforeRelayedOperators; + address[] _beforeRelayedGovernors; + + address[] _afterRelayedOperators; + address[] _afterRelayedGovernors; + + Ballot.VoteType[] _supports; + + GlobalProposal.GlobalProposalDetail _globalProposal; + SignatureConsumer.Signature[] _signatures; + + Proposal.ProposalDetail _proposal; + + bytes32 _anyValue; + + function setUp() public virtual override { + super.setUp(); + + _proposalExpiryDuration = 60; + _addingOperatorNum = 3; + + _beforeRelayedOperators = _param.roninBridgeManager.bridgeOperators; + _beforeRelayedGovernors = _param.roninBridgeManager.governors; + + _supports = new Ballot.VoteType[](_beforeRelayedOperators.length); + for (uint256 i; i < _beforeRelayedGovernors.length; i++) { + _supports[i] = Ballot.VoteType.For; + } + + _generateAddingOperators(_addingOperatorNum); + + _proposal.nonce = _roninBridgeManager.round(block.chainid) + 1; + _proposal.chainId = block.chainid; + _proposal.executer = address(0); + _proposal.loose = false; + _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; + + _proposal.targets.push(address(_roninBridgeManager)); + _proposal.values.push(0); + _proposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _proposal.gasAmounts.push(1_000_000); + + // Duplicate the internal call + _proposal.targets.push(address(_roninBridgeManager)); + _proposal.values.push(0); + _proposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _proposal.gasAmounts.push(1_000_000); + } + + // Should the auto proposal executes on the last valid vote + function test_autoProposal_strictProposal_WhenAllInternalCallsPass() public { + _proposal.loose = false; + _proposal.executer = address(0); + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should revert when the non-auto proposal get executed again + function test_autoProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_autoProposal_strictProposal_WhenAllInternalCallsPass(); + + vm.expectRevert(abi.encodeWithSelector(ErrProposalNotApproved.selector)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.execute(_proposal); + } + + // Should the non-auto proposal be execute by the specified executer + function test_executerProposal_strictProposal_WhenAllInternalCallsPass() public { + _proposal.loose = false; + _proposal.executer = _param.roninBridgeManager.governors[0]; + _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.execute(_proposal); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should revert when the auto proposal get executed again + function test_executerProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_executerProposal_strictProposal_WhenAllInternalCallsPass(); + + vm.expectRevert(abi.encodeWithSelector(ErrProposalNotApproved.selector)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.execute(_proposal); + } + + // Should the non-auto proposal can not be execute by other governor + function test_executerProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { + _proposal.loose = false; + _proposal.executer = _param.roninBridgeManager.governors[0]; + _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + + vm.expectRevert(abi.encodeWithSelector(ErrInvalidExecuter.selector)); + vm.prank(_param.roninBridgeManager.governors[1]); + _roninBridgeManager.execute(_proposal); + } + + function _generateAddingOperators(uint256 num) internal { + delete _addingOperators; + delete _addingGovernors; + delete _voteWeights; + + _afterRelayedOperators = _beforeRelayedOperators; + _afterRelayedGovernors = _beforeRelayedGovernors; + + for (uint256 i; i < num; i++) { + _addingOperators.push(makeAddr(string.concat("adding-operator", vm.toString(i)))); + _addingGovernors.push(makeAddr(string.concat("adding-governor", vm.toString(i)))); + _voteWeights.push(uint96(uint256(100))); + + _afterRelayedOperators.push(_addingOperators[i]); + _afterRelayedGovernors.push(_addingGovernors[i]); + } + } +} From 1933d6aebc0ea364fca8682c08216dce8a73f819 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 1 Apr 2024 17:29:51 +0700 Subject: [PATCH 103/305] test(MainchainGatewayBatcher): add unit tests --- src/mocks/token/MockERC1155.sol | 4 + test/bridge/integration/BaseIntegration.t.sol | 36 +++- .../MainchainGatewayBatcher.t.sol | 190 ++++++++++++++++++ test/libraries/LibTokenInfo.t.sol | 27 +++ test/libraries/LibTokenInfoBatch.t.sol | 14 ++ test/libraries/LibTokenOwner.t.sol | 19 ++ 6 files changed, 287 insertions(+), 3 deletions(-) create mode 100644 test/bridge/integration/mainchain-gateway/MainchainGatewayBatcher.t.sol create mode 100644 test/libraries/LibTokenInfo.t.sol create mode 100644 test/libraries/LibTokenInfoBatch.t.sol create mode 100644 test/libraries/LibTokenOwner.t.sol diff --git a/src/mocks/token/MockERC1155.sol b/src/mocks/token/MockERC1155.sol index 1a5e7292..deed3dc4 100644 --- a/src/mocks/token/MockERC1155.sol +++ b/src/mocks/token/MockERC1155.sol @@ -9,4 +9,8 @@ contract MockERC1155 is ERC1155 { function mint(address to, uint256 id, uint256 amount) external { _mint(to, id, amount, ""); } + + function mintBatch(address to, uint256[] calldata ids, uint256[] calldata amounts) external { + _mintBatch(to, ids, amounts, ""); + } } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 27b6e5fb..8beb1812 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -61,7 +61,19 @@ import { MockERC1155Deploy } from "@ronin/script/contracts/token/MockERC1155Depl import { RoninBridgeAdminUtils } from "test/helpers/RoninBridgeAdminUtils.t.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +contract MockPoisonERC20 is MockERC20 { + constructor(string memory name_, string memory symbol_) MockERC20(name_, symbol_) { } + + function setApprovalForAll(address spender, bool approved) public { + _approve(msg.sender, spender, approved ? type(uint256).max : 0); + + emit Approval(msg.sender, spender, type(uint256).max); + } +} + contract BaseIntegration_Test is Base_Test { + address sender; + IGeneralConfig _config; ISharedArgument.SharedParameter _param; @@ -97,6 +109,11 @@ contract BaseIntegration_Test is Base_Test { RoninBridgeAdminUtils _roninProposalUtils; MainchainBridgeAdminUtils _mainchainProposalUtils; + MockERC20 _mainchainMockERC20; + MockPoisonERC20 _mainchainMockPoisonERC20; + MockERC20 _roninMockERC20; + MockPoisonERC20 _roninMockPoisonERC20; + function setUp() public virtual { _deployGeneralConfig(); @@ -113,6 +130,8 @@ contract BaseIntegration_Test is Base_Test { _configEmergencyPauserForMainchainGateway(); _configBridgeTrackingForRoninGateway(); + + sender = makeAddr("sender"); } function _deployContractsOnRonin() internal { @@ -130,6 +149,8 @@ contract BaseIntegration_Test is Base_Test { _roninUsdc = new USDCDeploy().run(); _roninMockERC721 = new MockERC721Deploy().run(); _roninMockERC1155 = new MockERC1155Deploy().run(); + _roninMockERC20 = new MockERC20("MockERC20", "ME2"); + _roninMockPoisonERC20 = new MockPoisonERC20("MockPoisonERC20", "MPE2"); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); _roninProposalUtils = @@ -148,6 +169,8 @@ contract BaseIntegration_Test is Base_Test { _mainchainUsdc = new USDCDeploy().run(); _mainchainMockERC721 = new MockERC721Deploy().run(); _mainchainMockERC1155 = new MockERC1155Deploy().run(); + _mainchainMockERC20 = new MockERC20("MockERC20", "ME2"); + _mainchainMockPoisonERC20 = new MockPoisonERC20("MockPoisonERC20", "MPE2"); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); _mainchainProposalUtils = new MainchainBridgeAdminUtils( @@ -241,7 +264,8 @@ contract BaseIntegration_Test is Base_Test { } function _roninGatewayV3Initialize() internal { - (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = _getMainchainAndRoninTokens(); + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = + _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; // reserve slot for ERC721Tokens uint256[] memory minimumThreshold = new uint256[](tokenNum); uint256[] memory chainIds = new uint256[](tokenNum); @@ -436,7 +460,8 @@ contract BaseIntegration_Test is Base_Test { } function _mainchainGatewayV3Initialize() internal { - (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = _getMainchainAndRoninTokens(); + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = + _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; uint256[] memory highTierThreshold = new uint256[](tokenNum); uint256[] memory lockedThreshold = new uint256[](tokenNum); @@ -491,7 +516,7 @@ contract BaseIntegration_Test is Base_Test { view returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) { - uint256 tokenNum = 6; + uint256 tokenNum = 8; mainchainTokens = new address[](tokenNum); roninTokens = new address[](tokenNum); standards = new TokenStandard[](tokenNum); @@ -502,6 +527,8 @@ contract BaseIntegration_Test is Base_Test { mainchainTokens[3] = address(_mainchainUsdc); mainchainTokens[4] = address(_mainchainMockERC721); mainchainTokens[5] = address(_mainchainMockERC1155); + mainchainTokens[6] = address(_mainchainMockERC20); + mainchainTokens[7] = address(_mainchainMockPoisonERC20); roninTokens[0] = address(_roninWeth); roninTokens[1] = address(_roninAxs); @@ -509,6 +536,8 @@ contract BaseIntegration_Test is Base_Test { roninTokens[3] = address(_roninUsdc); roninTokens[4] = address(_roninMockERC721); roninTokens[5] = address(_roninMockERC1155); + roninTokens[6] = address(_roninMockERC20); + roninTokens[7] = address(_roninMockPoisonERC20); standards[0] = TokenStandard.ERC20; standards[1] = TokenStandard.ERC20; @@ -516,6 +545,7 @@ contract BaseIntegration_Test is Base_Test { standards[3] = TokenStandard.ERC20; standards[4] = TokenStandard.ERC721; standards[5] = TokenStandard.ERC1155; + standards[6] = TokenStandard.ERC20; } function _changeAdminOnRonin() internal { diff --git a/test/bridge/integration/mainchain-gateway/MainchainGatewayBatcher.t.sol b/test/bridge/integration/mainchain-gateway/MainchainGatewayBatcher.t.sol new file mode 100644 index 00000000..db2214c2 --- /dev/null +++ b/test/bridge/integration/mainchain-gateway/MainchainGatewayBatcher.t.sol @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { BaseIntegration_Test, MockERC721, MockERC1155 } from "../BaseIntegration.t.sol"; +import { TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { RequestBatch } from "@ronin/contracts/libraries/LibRequestBatch.sol"; + +contract MainchainGatewayBatcherTest is BaseIntegration_Test { + function testConcrete_RevertIf_WrongTokenStandardERC1155_requestDepositForBatch_ERC721() external { + _mainchainMockERC721.mint(sender, 1); + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockERC721); + req.info.erc = TokenStandard.ERC1155; // ERC1155 instead of ERC721 + req.info.ids = new uint256[](1); + req.info.ids[0] = 1; + req.info.quantities = new uint256[](1); + req.info.quantities[0] = 1; + + vm.startPrank(sender); + _mainchainMockERC721.setApprovalForAll(address(_mainchainGatewayBatcher), true); + vm.expectRevert(); + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + } + + function testConcrete_RevertIf_WrongTokenStandardERC721_requestDepositForBatch_ERC1155() external { + _mainchainMockERC1155.mint(sender, 1, 1); + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockERC1155); + req.info.erc = TokenStandard.ERC721; // ERC721 instead of ERC1155 + req.info.ids = new uint256[](1); + req.info.ids[0] = 1; + + vm.startPrank(sender); + _mainchainMockERC1155.setApprovalForAll(address(_mainchainGatewayBatcher), true); + vm.expectRevert(); + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + } + + function testConcrete_RevertIf_WrongTokenStandardERC20_requestDepositForBatch_ERC721() external { + _mainchainMockERC721.mint(sender, 1); + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockERC721); + req.info.erc = TokenStandard.ERC20; // ERC20 instead of ERC721 + req.info.ids = new uint256[](1); + req.info.ids[0] = 1; + + vm.startPrank(sender); + _mainchainMockERC721.setApprovalForAll(address(_mainchainGatewayBatcher), true); + vm.expectRevert(); + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + } + + function testConcrete_RevertIf_WrongTokenStandardERC721_requestDepositForBatch_ERC20() external { + deal(address(_mainchainMockERC20), sender, 1); + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockERC20); + req.info.erc = TokenStandard.ERC721; // ERC721 instead of ERC20 + req.info.ids = new uint256[](1); + req.info.ids[0] = 1; + + vm.startPrank(sender); + _mainchainMockERC20.approve(address(_mainchainGatewayBatcher), 1); + vm.expectRevert(); + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + } + + function testConcrete_RevertIf_WrongTokenStandardERC721_requestDepositForBatch_PoisonERC20() external { + deal(address(_mainchainMockPoisonERC20), sender, 1); + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockPoisonERC20); + req.info.erc = TokenStandard.ERC721; // ERC721 instead of ERC20 + req.info.ids = new uint256[](1); + req.info.ids[0] = 1; + + vm.startPrank(sender); + _mainchainMockPoisonERC20.setApprovalForAll(address(_mainchainGatewayBatcher), true); + vm.expectRevert(); + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + } + + function testConcrete_RevertIf_WrongTokenStandardERC20_requestDepositForBatch_ERC1155() external { + _mainchainMockERC1155.mint(sender, 1, 1); + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockERC1155); + req.info.erc = TokenStandard.ERC20; // ERC20 instead of ERC1155 + req.info.ids = new uint256[](1); + req.info.ids[0] = 1; + + vm.startPrank(sender); + _mainchainMockERC1155.setApprovalForAll(address(_mainchainGatewayBatcher), true); + vm.expectRevert(); + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + } + + function testFuzz_requestDepositBatch_ERC1155(uint256[] calldata ids) external { + uint256[] memory amounts = new uint256[](ids.length); + + vm.assume(ids.length != 0); + vm.assume(!hasDuplicate(ids)); + vm.assume(ids.length == amounts.length); + + for (uint256 i; i < ids.length; i++) { + amounts[i] = 1; + } + for (uint256 i; i < ids.length; i++) { + _mainchainMockERC1155.mint(sender, ids[i], amounts[i]); + } + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockERC1155); + req.info.erc = TokenStandard.ERC1155; + req.info.ids = ids; + req.info.quantities = new uint256[](ids.length); + for (uint256 i; i < ids.length; i++) { + req.info.quantities[i] = 1; + } + + vm.startPrank(sender); + _mainchainMockERC1155.setApprovalForAll(address(_mainchainGatewayBatcher), true); + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + + for (uint256 i; i < ids.length; i++) { + assertEq(_mainchainMockERC1155.balanceOf(sender, ids[i]), 0); + assertEq(_mainchainMockERC1155.balanceOf(address(_mainchainGatewayV3), ids[i]), 1); + } + } + + function testFuzz_requestDepositBatch_ERC721(uint256[] calldata ids) external { + vm.assume(ids.length != 0); + vm.assume(!hasDuplicate(ids)); + + for (uint256 i; i < ids.length; i++) { + _mainchainMockERC721.mint(sender, ids[i]); + } + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockERC721); + req.info.erc = TokenStandard.ERC721; + req.info.ids = ids; + + vm.startPrank(sender); + for (uint256 i; i < ids.length; i++) { + _mainchainMockERC721.approve(address(_mainchainGatewayBatcher), ids[i]); + } + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + + for (uint256 i; i < ids.length; i++) { + assertEq(_mainchainMockERC721.ownerOf(ids[i]), address(_mainchainGatewayV3)); + } + } + + function hasDuplicate(uint256[] memory A) internal pure returns (bool) { + if (A.length == 0) { + return false; + } + unchecked { + for (uint256 i = 0; i < A.length - 1; i++) { + for (uint256 j = i + 1; j < A.length; j++) { + if (A[i] == A[j]) { + return true; + } + } + } + } + + return false; + } +} diff --git a/test/libraries/LibTokenInfo.t.sol b/test/libraries/LibTokenInfo.t.sol new file mode 100644 index 00000000..18365aed --- /dev/null +++ b/test/libraries/LibTokenInfo.t.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Test } from "forge-std/Test.sol"; +import { TokenStandard, TokenInfo, LibTokenInfo } from "@ronin/contracts/libraries/LibTokenInfo.sol"; + +contract LibTokenInfoTest is Test { + bytes32 typeHash; + + function setUp() external { + typeHash = LibTokenInfo.INFO_TYPE_HASH_SINGLE; + } + + function testFuzz_hash(uint8 _erc, uint256 id, uint256 quantity) external { + _erc = uint8(_bound(_erc, 0, 2)); + TokenStandard erc; + assembly { + erc := _erc + } + TokenInfo memory self = TokenInfo({ erc: erc, id: id, quantity: quantity }); + bytes32 hash = typeHash; + assertTrue(hash != 0, "typeHash is zero"); + bytes32 expected = keccak256(abi.encode(hash, self.erc, self.id, self.quantity)); + bytes32 actual = LibTokenInfo.hash(self); + assertEq(actual, expected, "hash mismatch"); + } +} diff --git a/test/libraries/LibTokenInfoBatch.t.sol b/test/libraries/LibTokenInfoBatch.t.sol new file mode 100644 index 00000000..d8b9929a --- /dev/null +++ b/test/libraries/LibTokenInfoBatch.t.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Test } from "forge-std/Test.sol"; +import { TokenStandard, TokenInfoBatch, LibTokenInfoBatch } from "@ronin/contracts/libraries/LibTokenInfoBatch.sol"; + +contract LibTokenInfoBatchTest is Test { + function testConcrete_RevertIf_InvalidTokenInfoBatch() external { + TokenInfoBatch memory self; + self.erc = TokenStandard.ERC1155; + vm.expectRevert(); + LibTokenInfoBatch.validate(self, LibTokenInfoBatch.checkERC1155Batch); + } +} diff --git a/test/libraries/LibTokenOwner.t.sol b/test/libraries/LibTokenOwner.t.sol new file mode 100644 index 00000000..3a9651fc --- /dev/null +++ b/test/libraries/LibTokenOwner.t.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Test } from "forge-std/Test.sol"; +import { TokenOwner, LibTokenOwner } from "@ronin/contracts/libraries/LibTokenOwner.sol"; + +contract LibTokenOwnerTest is Test { + bytes32 _typeHash; + + function setUp() external { + _typeHash = LibTokenOwner.OWNER_TYPE_HASH; + } + + function testFuzz_hash(TokenOwner memory self) external { + bytes32 expected = keccak256(abi.encode(_typeHash, self.addr, self.tokenAddr, self.chainId)); + bytes32 actual = LibTokenOwner.hash(self); + assertEq(actual, expected, "hash mismatch"); + } +} From af017a4eddbf26fc294e2c85ed4d8b8c87c1ecf8 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 18:04:39 +0700 Subject: [PATCH 104/305] feat(BridgeManager): require relayer to be the executer --- src/extensions/sequential-governance/CoreGovernance.sol | 2 +- .../sequential-governance/GlobalCoreGovernance.sol | 5 +++++ src/mainchain/MainchainBridgeManager.sol | 8 ++++++++ src/ronin/gateway/RoninBridgeManager.sol | 7 +++++++ src/utils/CommonErrors.sol | 5 +++++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/extensions/sequential-governance/CoreGovernance.sol b/src/extensions/sequential-governance/CoreGovernance.sol index c2a58fb2..f34d685d 100644 --- a/src/extensions/sequential-governance/CoreGovernance.sol +++ b/src/extensions/sequential-governance/CoreGovernance.sol @@ -219,7 +219,7 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus /** * @dev The specified executer executes the proposal on an approved proposal. */ - function _executeWithCaller(Proposal.ProposalDetail calldata proposal, address caller) internal { + function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal { bytes32 proposalHash = proposal.hash(); ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce]; diff --git a/src/extensions/sequential-governance/GlobalCoreGovernance.sol b/src/extensions/sequential-governance/GlobalCoreGovernance.sol index 7c118ca0..6164562f 100644 --- a/src/extensions/sequential-governance/GlobalCoreGovernance.sol +++ b/src/extensions/sequential-governance/GlobalCoreGovernance.sol @@ -84,6 +84,11 @@ abstract contract GlobalCoreGovernance is CoreGovernance { emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator); } + function _executeGlobalWithCaller(GlobalProposal.GlobalProposalDetail memory globalProposal, address caller) internal { + Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })); + _executeWithCaller(proposal, caller); + } + /** * @dev Returns corresponding address of target options. Return address(0) on non-existent target. */ diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index 7c63d831..22e31319 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -41,6 +41,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna Ballot.VoteType[] calldata supports_, Signature[] calldata signatures ) external onlyGovernor { + _requireExecuter(proposal.executer, msg.sender); _relayProposal(proposal, supports_, signatures, DOMAIN_SEPARATOR, msg.sender); } @@ -55,9 +56,16 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna Ballot.VoteType[] calldata supports_, Signature[] calldata signatures ) external onlyGovernor { + _requireExecuter(globalProposal.executer, msg.sender); _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, domainSeparator: DOMAIN_SEPARATOR, creator: msg.sender }); } + function _requireExecuter(address executer, address caller) internal pure { + if (executer != address(0) && caller != executer) { + revert ErrNonExecuterCannotRelay(executer, caller); + } + } + /** * @dev Internal function to retrieve the minimum vote weight required for governance actions. * @return minimumVoteWeight The minimum vote weight required for governance actions. diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index a95f7fae..fee9129c 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -198,6 +198,13 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan _executeWithCaller(proposal, msg.sender); } + /** + * @dev See {GlobalCoreGovernance-_executeWithCaller}. + */ + function executeGlobal(GlobalProposal.GlobalProposalDetail calldata globalProposal) external { + _executeGlobalWithCaller(globalProposal, msg.sender); + } + /** * @dev Deletes the expired proposal by its chainId and nonce, without creating a new proposal. * diff --git a/src/utils/CommonErrors.sol b/src/utils/CommonErrors.sol index dc7a4050..ce612a55 100644 --- a/src/utils/CommonErrors.sol +++ b/src/utils/CommonErrors.sol @@ -243,3 +243,8 @@ error ErrProposalNotApproved(); * @dev Error of the caller is not the specified executer. */ error ErrInvalidExecuter(); + +/** + * @dev Error of the `caller` to relay is not the specified `executer`. + */ +error ErrNonExecuterCannotRelay(address executer, address caller); \ No newline at end of file From 83133c7cbf921bfd9c6a7de4fdbc5d025a997db4 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 18:04:47 +0700 Subject: [PATCH 105/305] test: add `executer` test for global proposal --- ...ter.proposeGlobal.RoninBridgeManager.t.sol | 194 ++++++++++++++++++ ...r.relayGlobal.MainchainBridgeManager.t.sol | 176 ++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100644 test/bridge/integration/bridge-manager/proposal-executer/executer.proposeGlobal.RoninBridgeManager.t.sol create mode 100644 test/bridge/integration/bridge-manager/proposal-executer/executer.relayGlobal.MainchainBridgeManager.t.sol diff --git a/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeGlobal.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeGlobal.RoninBridgeManager.t.sol new file mode 100644 index 00000000..c09b1bd9 --- /dev/null +++ b/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeGlobal.RoninBridgeManager.t.sol @@ -0,0 +1,194 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibSort } from "solady/utils/LibSort.sol"; + +import "../../BaseIntegration.t.sol"; + +contract ProposalWithExecuter_GlobalProposal_RoninBridgeManager_Test is BaseIntegration_Test { + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + event ProposalApproved(bytes32 indexed proposalHash); + event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); + + error ErrInvalidExecuter(); + error ErrProposalNotApproved(); + error ErrInvalidProposalNonce(bytes4 sig); + error ErrLooseProposalInternallyRevert(uint, bytes); + + using LibSort for address[]; + + uint256 _proposalExpiryDuration; + uint256 _addingOperatorNum; + address[] _addingOperators; + address[] _addingGovernors; + uint96[] _voteWeights; + + address[] _beforeRelayedOperators; + address[] _beforeRelayedGovernors; + + address[] _afterRelayedOperators; + address[] _afterRelayedGovernors; + + Ballot.VoteType[] _supports; + + GlobalProposal.GlobalProposalDetail _globalProposal; + SignatureConsumer.Signature[] _signatures; + + bytes32 _anyValue; + + function setUp() public virtual override { + super.setUp(); + + _proposalExpiryDuration = 60; + _addingOperatorNum = 3; + + _beforeRelayedOperators = _param.roninBridgeManager.bridgeOperators; + _beforeRelayedGovernors = _param.roninBridgeManager.governors; + + _supports = new Ballot.VoteType[](_beforeRelayedOperators.length); + for (uint256 i; i < _beforeRelayedGovernors.length; i++) { + _supports[i] = Ballot.VoteType.For; + } + + _generateAddingOperators(_addingOperatorNum); + + _globalProposal.nonce = _roninBridgeManager.round(0) + 1; + _globalProposal.executer = address(0); + _globalProposal.loose = false; + _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; + + _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); + _globalProposal.values.push(0); + _globalProposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _globalProposal.gasAmounts.push(1_000_000); + + // Duplicate the internal call + _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); + _globalProposal.values.push(0); + _globalProposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _globalProposal.gasAmounts.push(1_000_000); + } + + // Should the auto proposal executes on the last valid vote + function test_autoProposal_strictProposal_WhenAllInternalCallsPass() public { + _globalProposal.loose = false; + _globalProposal.executer = address(0); + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); + + assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should revert when the non-auto proposal get executed again + function test_autoProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_autoProposal_strictProposal_WhenAllInternalCallsPass(); + + vm.expectRevert(abi.encodeWithSelector(ErrProposalNotApproved.selector)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.executeGlobal(_globalProposal); + } + + // Should the non-auto proposal be execute by the specified executer + function test_executerProposal_strictProposal_WhenAllInternalCallsPass() public { + _globalProposal.loose = false; + _globalProposal.executer = _param.roninBridgeManager.governors[0]; + _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); + assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.executeGlobal(_globalProposal); + assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should revert when the auto proposal get executed again + function test_executerProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_executerProposal_strictProposal_WhenAllInternalCallsPass(); + + vm.expectRevert(abi.encodeWithSelector(ErrProposalNotApproved.selector)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.executeGlobal(_globalProposal); + } + + // Should the non-auto proposal can not be execute by other governor + function test_executerProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { + _globalProposal.loose = false; + _globalProposal.executer = _param.roninBridgeManager.governors[0]; + _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); + assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + + vm.expectRevert(abi.encodeWithSelector(ErrInvalidExecuter.selector)); + vm.prank(_param.roninBridgeManager.governors[1]); + _roninBridgeManager.executeGlobal(_globalProposal); + } + + function _generateAddingOperators(uint256 num) internal { + delete _addingOperators; + delete _addingGovernors; + delete _voteWeights; + + _afterRelayedOperators = _beforeRelayedOperators; + _afterRelayedGovernors = _beforeRelayedGovernors; + + for (uint256 i; i < num; i++) { + _addingOperators.push(makeAddr(string.concat("adding-operator", vm.toString(i)))); + _addingGovernors.push(makeAddr(string.concat("adding-governor", vm.toString(i)))); + _voteWeights.push(uint96(uint256(100))); + + _afterRelayedOperators.push(_addingOperators[i]); + _afterRelayedGovernors.push(_addingGovernors[i]); + } + } +} diff --git a/test/bridge/integration/bridge-manager/proposal-executer/executer.relayGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executer/executer.relayGlobal.MainchainBridgeManager.t.sol new file mode 100644 index 00000000..389b142d --- /dev/null +++ b/test/bridge/integration/bridge-manager/proposal-executer/executer.relayGlobal.MainchainBridgeManager.t.sol @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibSort } from "solady/utils/LibSort.sol"; + +import "../../BaseIntegration.t.sol"; + +contract ProposalWithExecuter_GlobalProposal_MainchainBridgeManager_Test is BaseIntegration_Test { + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + event ProposalApproved(bytes32 indexed proposalHash); + event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); + + error ErrInvalidExecuter(); + error ErrProposalNotApproved(); + error ErrInvalidProposalNonce(bytes4 sig); + error ErrNonExecuterCannotRelay(address executer, address caller); + error ErrLooseProposalInternallyRevert(uint, bytes); + + using LibSort for address[]; + + uint256 _proposalExpiryDuration; + uint256 _addingOperatorNum; + address[] _addingOperators; + address[] _addingGovernors; + uint96[] _voteWeights; + + address[] _beforeRelayedOperators; + address[] _beforeRelayedGovernors; + + address[] _afterRelayedOperators; + address[] _afterRelayedGovernors; + + Ballot.VoteType[] _supports; + + GlobalProposal.GlobalProposalDetail _globalProposal; + SignatureConsumer.Signature[] _signatures; + + bytes32 _anyValue; + + function setUp() public virtual override { + super.setUp(); + + _proposalExpiryDuration = 60; + _addingOperatorNum = 3; + + _beforeRelayedOperators = _param.roninBridgeManager.bridgeOperators; + _beforeRelayedGovernors = _param.roninBridgeManager.governors; + + _supports = new Ballot.VoteType[](_beforeRelayedOperators.length); + for (uint256 i; i < _beforeRelayedGovernors.length; i++) { + _supports[i] = Ballot.VoteType.For; + } + + _generateAddingOperators(_addingOperatorNum); + + _globalProposal.nonce = _mainchainBridgeManager.round(0) + 1; + _globalProposal.executer = address(0); + _globalProposal.loose = false; + _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; + + _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); + _globalProposal.values.push(0); + _globalProposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _globalProposal.gasAmounts.push(1_000_000); + + // Duplicate the internal call + _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); + _globalProposal.values.push(0); + _globalProposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _globalProposal.gasAmounts.push(1_000_000); + } + + // Should the auto proposal executes on the last valid vote + function test_relayGlobal_autoProposal_strictProposal_WhenAllInternalCallsPass() public { + _globalProposal.loose = false; + _globalProposal.executer = address(0); + + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + + assertEq(_mainchainBridgeManager.globalProposalRelayed(_globalProposal.nonce), true); + assertEq(_mainchainBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should revert when the non-auto proposal get executed again + function test_relayGlobal_autoProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_relayGlobal_autoProposal_strictProposal_WhenAllInternalCallsPass(); + + vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, MainchainBridgeManager.relayGlobalProposal.selector)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + } + + // Should the non-auto proposal be execute by the specified executer + function test_relayGlobal_executerProposal_strictProposal_WhenAllInternalCallsPass() public { + _globalProposal.loose = false; + _globalProposal.executer = _param.roninBridgeManager.governors[0]; + _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + assertEq(_mainchainBridgeManager.globalProposalRelayed(_globalProposal.nonce), true); + assertEq(_mainchainBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should revert when the auto proposal get executed again + function test_relayGlobal_executerProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_relayGlobal_executerProposal_strictProposal_WhenAllInternalCallsPass(); + + vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, MainchainBridgeManager.relayGlobalProposal.selector)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + } + + // Should the non-auto proposal can not be execute by other governor + function test_relayGlobal_executerProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { + _globalProposal.loose = false; + _globalProposal.executer = _param.roninBridgeManager.governors[0]; + _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + vm.expectRevert(abi.encodeWithSelector(ErrNonExecuterCannotRelay.selector, _param.roninBridgeManager.governors[0], _param.roninBridgeManager.governors[1])); + + vm.prank(_param.roninBridgeManager.governors[1]); + _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); + } + + function _generateAddingOperators(uint256 num) internal { + delete _addingOperators; + delete _addingGovernors; + delete _voteWeights; + + _afterRelayedOperators = _beforeRelayedOperators; + _afterRelayedGovernors = _beforeRelayedGovernors; + + for (uint256 i; i < num; i++) { + _addingOperators.push(makeAddr(string.concat("adding-operator", vm.toString(i)))); + _addingGovernors.push(makeAddr(string.concat("adding-governor", vm.toString(i)))); + _voteWeights.push(uint96(uint256(100))); + + _afterRelayedOperators.push(_addingOperators[i]); + _afterRelayedGovernors.push(_addingGovernors[i]); + } + } +} From ce1cde43d6290d7f618d3477ef94020814933efc Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 1 Apr 2024 18:05:15 +0700 Subject: [PATCH 106/305] test: rename test --- ...idgeManager.t.sol => relayGlobal.MainchainBridgeManager.t.sol} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/bridge/integration/bridge-manager/proposal-loose/{proposeGlobal.MainchainBridgeManager.t.sol => relayGlobal.MainchainBridgeManager.t.sol} (100%) diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol similarity index 100% rename from test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.MainchainBridgeManager.t.sol rename to test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol From 150705abe560136d30f4a759bcaa73c4e13ff086 Mon Sep 17 00:00:00 2001 From: Bao Date: Mon, 1 Apr 2024 18:30:25 +0700 Subject: [PATCH 107/305] Apply suggestions from code review Co-authored-by: tu-do.ron Signed-off-by: Bao --- src/libraries/LibRequestBatch.sol | 6 ++++-- src/libraries/LibTokenInfo.sol | 2 +- src/libraries/LibTokenOwner.sol | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libraries/LibRequestBatch.sol b/src/libraries/LibRequestBatch.sol index 976ea148..5b5bb80a 100644 --- a/src/libraries/LibRequestBatch.sol +++ b/src/libraries/LibRequestBatch.sol @@ -12,7 +12,8 @@ struct RequestBatch { library LibRequestBatch { function forwardRequestToGatewayERC721(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { - for (uint256 i; i < req.info.ids.length; i++) { + uint256 length = req.info.ids.length; + for (uint256 i; i < length; i++) { mainchainGateway.requestDepositFor( Transfer.Request({ recipientAddr: req.recipient, @@ -24,7 +25,8 @@ library LibRequestBatch { } function forwardRequestToGatewayERC1155(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal { - for (uint256 i; i < req.info.ids.length; i++) { + uint256 length = req.info.ids.length; + for (uint256 i; i < length; i++) { mainchainGateway.requestDepositFor( Transfer.Request({ recipientAddr: req.recipient, diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 6fd30422..38f126f0 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -71,7 +71,7 @@ library LibTokenInfo { */ function hash(TokenInfo memory self) internal pure returns (bytes32 digest) { // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity)) - assembly { + assembly ("memory-safe") { let ptr := mload(0x40) mstore(ptr, INFO_TYPE_HASH_SINGLE) mstore(add(ptr, 0x20), mload(self)) // info.erc diff --git a/src/libraries/LibTokenOwner.sol b/src/libraries/LibTokenOwner.sol index 7f47b9b9..a0052f5d 100644 --- a/src/libraries/LibTokenOwner.sol +++ b/src/libraries/LibTokenOwner.sol @@ -16,7 +16,7 @@ library LibTokenOwner { */ function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) { // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId)) - assembly { + assembly ("memory-safe") { let ptr := mload(0x40) mstore(ptr, OWNER_TYPE_HASH) mstore(add(ptr, 0x20), mload(owner)) // owner.addr From fa392560a61d1c6c79d2b7b1d7e7784d5d305eff Mon Sep 17 00:00:00 2001 From: Bao Date: Mon, 1 Apr 2024 18:30:54 +0700 Subject: [PATCH 108/305] Update src/libraries/LibTokenInfoBatch.sol Co-authored-by: tu-do.ron Signed-off-by: Bao --- src/libraries/LibTokenInfoBatch.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/LibTokenInfoBatch.sol b/src/libraries/LibTokenInfoBatch.sol index 14d72cb4..60d557bd 100644 --- a/src/libraries/LibTokenInfoBatch.sol +++ b/src/libraries/LibTokenInfoBatch.sol @@ -60,8 +60,8 @@ library LibTokenInfoBatch { uint256 length = self.ids.length; if ( - self.erc != TokenStandard.ERC1155 // Check ERC1155 - || length != self.quantities.length // Info must have same length for each token id + !(self.erc == TokenStandard.ERC1155 // Check ERC1155 + && length == self.quantities.length) // Info must have same length for each token id ) { return false; } From 10772a6e0202af9f846339b28f7cd4f92f156930 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 2 Apr 2024 10:42:55 +0700 Subject: [PATCH 109/305] test(MainchainGatewayBatcher): add new unit tests --- .../MainchainGatewayBatcher.t.sol | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/bridge/integration/mainchain-gateway/MainchainGatewayBatcher.t.sol b/test/bridge/integration/mainchain-gateway/MainchainGatewayBatcher.t.sol index db2214c2..55cb2ae0 100644 --- a/test/bridge/integration/mainchain-gateway/MainchainGatewayBatcher.t.sol +++ b/test/bridge/integration/mainchain-gateway/MainchainGatewayBatcher.t.sol @@ -110,6 +110,24 @@ contract MainchainGatewayBatcherTest is BaseIntegration_Test { vm.stopPrank(); } + function testConcrete_RevertIf_LengthMismatch_requestDepositForBatch_ERC1155() external { + _mainchainMockERC1155.mint(sender, 1, 1); + + RequestBatch memory req; + req.recipient = sender; + req.tokenAddr = address(_mainchainMockERC1155); + req.info.erc = TokenStandard.ERC1155; + req.info.ids = new uint256[](1); + req.info.ids[0] = 1; + req.info.quantities = new uint256[](2); // Length mismatch + + vm.startPrank(sender); + _mainchainMockERC1155.setApprovalForAll(address(_mainchainGatewayBatcher), true); + vm.expectRevert(); + _mainchainGatewayBatcher.requestDepositForBatch(req); + vm.stopPrank(); + } + function testFuzz_requestDepositBatch_ERC1155(uint256[] calldata ids) external { uint256[] memory amounts = new uint256[](ids.length); From 143705da4b2562f00103b434943408087b90bb68 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 2 Apr 2024 14:45:43 +0700 Subject: [PATCH 110/305] fix: rename to `executor` --- .../sequential-governance/CoreGovernance.sol | 8 +++--- .../GlobalCoreGovernance.sol | 4 +-- src/libraries/GlobalProposal.sol | 10 +++---- src/libraries/Proposal.sol | 10 +++---- src/mainchain/MainchainBridgeManager.sol | 10 +++---- src/ronin/gateway/RoninBridgeManager.sol | 12 ++++----- src/utils/CommonErrors.sol | 8 +++--- test/bridge/integration/BaseIntegration.t.sol | 16 ++++++------ ...r.proposeCurrent.RoninBridgeManager.t.sol} | 24 ++++++++--------- ...or.proposeGlobal.RoninBridgeManager.t.sol} | 24 ++++++++--------- ....relayGlobal.MainchainBridgeManager.t.sol} | 26 +++++++++---------- .../proposeCurrent.RoninBridgeManager.t.sol | 2 +- .../proposeGlobal.RoninBridgeManager.t.sol | 2 +- .../relayGlobal.MainchainBridgeManager.t.sol | 2 +- ...oteBridgeOperator.RoninBridgeManager.t.sol | 4 +-- test/helpers/MainchainBridgeAdminUtils.t.sol | 8 +++--- test/helpers/ProposalUtils.t.sol | 8 +++--- test/helpers/RoninBridgeAdminUtils.t.sol | 8 +++--- 18 files changed, 93 insertions(+), 93 deletions(-) rename test/bridge/integration/bridge-manager/{proposal-executer/executer.proposeCurrent.RoninBridgeManager.t.sol => proposal-executor/executor.proposeCurrent.RoninBridgeManager.t.sol} (92%) rename test/bridge/integration/bridge-manager/{proposal-executer/executer.proposeGlobal.RoninBridgeManager.t.sol => proposal-executor/executor.proposeGlobal.RoninBridgeManager.t.sol} (92%) rename test/bridge/integration/bridge-manager/{proposal-executer/executer.relayGlobal.MainchainBridgeManager.t.sol => proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol} (91%) diff --git a/src/extensions/sequential-governance/CoreGovernance.sol b/src/extensions/sequential-governance/CoreGovernance.sol index f34d685d..1415abb2 100644 --- a/src/extensions/sequential-governance/CoreGovernance.sol +++ b/src/extensions/sequential-governance/CoreGovernance.sol @@ -109,7 +109,7 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus function _proposeProposal( uint256 chainId, uint256 expiryTimestamp, - address executer, + address executor, bool loose, address[] memory targets, uint256[] memory values, @@ -120,7 +120,7 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid); uint256 round_ = _createVotingRound(chainId); - proposal = Proposal.ProposalDetail(round_, chainId, expiryTimestamp, executer, loose, targets, values, calldatas, gasAmounts); + proposal = Proposal.ProposalDetail(round_, chainId, expiryTimestamp, executor, loose, targets, values, calldatas, gasAmounts); proposal.validate(_proposalExpiryDuration); bytes32 proposalHash = proposal.hash(); @@ -217,7 +217,7 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus } /** - * @dev The specified executer executes the proposal on an approved proposal. + * @dev The specified executor executes the proposal on an approved proposal. */ function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal { bytes32 proposalHash = proposal.hash(); @@ -228,7 +228,7 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus } if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved(); - if (caller != proposal.executer) revert ErrInvalidExecuter(); + if (caller != proposal.executor) revert ErrInvalidExecutor(); _tryExecute(_vote, proposal); } diff --git a/src/extensions/sequential-governance/GlobalCoreGovernance.sol b/src/extensions/sequential-governance/GlobalCoreGovernance.sol index 6164562f..585fe6a6 100644 --- a/src/extensions/sequential-governance/GlobalCoreGovernance.sol +++ b/src/extensions/sequential-governance/GlobalCoreGovernance.sol @@ -42,7 +42,7 @@ abstract contract GlobalCoreGovernance is CoreGovernance { function _proposeGlobal( uint256 expiryTimestamp, GlobalProposal.TargetOption[] calldata targetOptions, - address executer, + address executor, bool loose, uint256[] memory values, bytes[] memory calldatas, @@ -51,7 +51,7 @@ abstract contract GlobalCoreGovernance is CoreGovernance { ) internal virtual { uint256 round_ = _createVotingRound(0); GlobalProposal.GlobalProposalDetail memory globalProposal = - GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executer, loose, targetOptions, values, calldatas, gasAmounts); + GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, loose, targetOptions, values, calldatas, gasAmounts); Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true })); proposal.validate(_proposalExpiryDuration); diff --git a/src/libraries/GlobalProposal.sol b/src/libraries/GlobalProposal.sol index ef67cbff..cfe1319a 100644 --- a/src/libraries/GlobalProposal.sol +++ b/src/libraries/GlobalProposal.sol @@ -21,7 +21,7 @@ library GlobalProposal { // Nonce to make sure proposals are executed in order uint256 nonce; uint256 expiryTimestamp; - address executer; + address executor; bool loose; TargetOption[] targetOptions; uint256[] values; @@ -29,7 +29,7 @@ library GlobalProposal { uint256[] gasAmounts; } - // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executer,bool loose,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); + // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,bool loose,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); bytes32 public constant TYPE_HASH = 0x8fdb3bc7211cb44f39a2cae84127672c4570a00720dfbf2bb58285070faa28da; /** @@ -56,7 +56,7 @@ library GlobalProposal { * TYPE_HASH, * proposal.nonce, * proposal.expiryTimestamp, - * proposal.executer, + * proposal.executor, * proposal.loose, * targetsHash, * valuesHash, @@ -70,7 +70,7 @@ library GlobalProposal { mstore(ptr, TYPE_HASH) mstore(add(ptr, 0x20), mload(self)) // proposal.nonce mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp - mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executer + mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor mstore(add(ptr, 0x80), mload(add(self, 0x60))) // proposal.loose let arrayHashed @@ -93,7 +93,7 @@ library GlobalProposal { detail_.nonce = self.nonce; detail_.chainId = 0; detail_.expiryTimestamp = self.expiryTimestamp; - detail_.executer = self.executer; + detail_.executor = self.executor; detail_.loose = self.loose; detail_.targets = new address[](self.targetOptions.length); diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index b0ef091f..5f19cf49 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -28,7 +28,7 @@ library Proposal { uint256 expiryTimestamp; // The address that execute the proposal after the proposal passes. // Leave this address as address(0) to auto-execute by the last valid vote. - address executer; + address executor; // A `loose` proposal will revert the whole proposal if encounter one internal failed. // A non-`loose` proposal will ignore the failed internal calls. bool loose; @@ -38,7 +38,7 @@ library Proposal { uint256[] gasAmounts; } - // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executer,bool loose,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); + // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,bool loose,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); bytes32 public constant TYPE_HASH = 0x98e2bc443e89d620038081eb862bc4dd7a26e2eba7a2a87201642f9419340a57; /** @@ -79,7 +79,7 @@ library Proposal { // proposal.nonce, // proposal.chainId, // proposal.expiryTimestamp - // proposal.executer + // proposal.executor // proposal.loose // targetsHash, // valuesHash, @@ -94,7 +94,7 @@ library Proposal { mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp - mstore(add(ptr, 0x80), mload(add(proposal, 0x80))) // proposal.executer + mstore(add(ptr, 0x80), mload(add(proposal, 0x80))) // proposal.executor mstore(add(ptr, 0xa0), mload(add(proposal, 0x80))) // proposal.loose let arrayHashed @@ -114,7 +114,7 @@ library Proposal { * @dev Returns whether the proposal is auto-executed on the last valid vote. */ function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) { - return proposal.executer == address(0); + return proposal.executor == address(0); } /** diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index 22e31319..60f4bb7e 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -41,7 +41,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna Ballot.VoteType[] calldata supports_, Signature[] calldata signatures ) external onlyGovernor { - _requireExecuter(proposal.executer, msg.sender); + _requireExecutor(proposal.executor, msg.sender); _relayProposal(proposal, supports_, signatures, DOMAIN_SEPARATOR, msg.sender); } @@ -56,13 +56,13 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna Ballot.VoteType[] calldata supports_, Signature[] calldata signatures ) external onlyGovernor { - _requireExecuter(globalProposal.executer, msg.sender); + _requireExecutor(globalProposal.executor, msg.sender); _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, domainSeparator: DOMAIN_SEPARATOR, creator: msg.sender }); } - function _requireExecuter(address executer, address caller) internal pure { - if (executer != address(0) && caller != executer) { - revert ErrNonExecuterCannotRelay(executer, caller); + function _requireExecutor(address executor, address caller) internal pure { + if (executor != address(0) && caller != executor) { + revert ErrNonExecutorCannotRelay(executor, caller); } } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index fee9129c..4a4dac4c 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -46,14 +46,14 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan function propose( uint256 chainId, uint256 expiryTimestamp, - address executer, + address executor, bool loose, address[] calldata targets, uint256[] calldata values, bytes[] calldata calldatas, uint256[] calldata gasAmounts ) external onlyGovernor { - _proposeProposal(chainId, expiryTimestamp, executer, loose, targets, values, calldatas, gasAmounts, msg.sender); + _proposeProposal(chainId, expiryTimestamp, executor, loose, targets, values, calldatas, gasAmounts, msg.sender); } /** @@ -82,7 +82,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan */ function proposeProposalForCurrentNetwork( uint256 expiryTimestamp, - address executer, + address executor, bool loose, address[] calldata targets, uint256[] calldata values, @@ -94,7 +94,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan Proposal.ProposalDetail memory _proposal = _proposeProposal({ chainId: block.chainid, expiryTimestamp: expiryTimestamp, - executer: executer, + executor: executor, loose: loose, targets: targets, values: values, @@ -136,7 +136,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan */ function proposeGlobal( uint256 expiryTimestamp, - address executer, + address executor, bool loose, GlobalProposal.TargetOption[] calldata targetOptions, uint256[] calldata values, @@ -145,7 +145,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan ) external onlyGovernor { _proposeGlobal({ expiryTimestamp: expiryTimestamp, - executer: executer, + executor: executor, loose: loose, targetOptions: targetOptions, values: values, diff --git a/src/utils/CommonErrors.sol b/src/utils/CommonErrors.sol index ce612a55..0aedf12e 100644 --- a/src/utils/CommonErrors.sol +++ b/src/utils/CommonErrors.sol @@ -240,11 +240,11 @@ error ErrInvalidProposal(bytes32 actual, bytes32 expected); error ErrProposalNotApproved(); /** - * @dev Error of the caller is not the specified executer. + * @dev Error of the caller is not the specified executor. */ -error ErrInvalidExecuter(); +error ErrInvalidExecutor(); /** - * @dev Error of the `caller` to relay is not the specified `executer`. + * @dev Error of the `caller` to relay is not the specified `executor`. */ -error ErrNonExecuterCannotRelay(address executer, address caller); \ No newline at end of file +error ErrNonExecutorCannotRelay(address executor, address caller); \ No newline at end of file diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 41454d06..672a4a2c 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -317,7 +317,7 @@ contract BaseIntegration_Test is Base_Test { // set targets GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, @@ -335,7 +335,7 @@ contract BaseIntegration_Test is Base_Test { // set bridge contract GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, @@ -355,7 +355,7 @@ contract BaseIntegration_Test is Base_Test { bytes memory calldata_ = abi.encodeCall(IBridgeManagerCallbackRegister.registerCallbacks, (param.callbackRegisters)); GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, @@ -374,7 +374,7 @@ contract BaseIntegration_Test is Base_Test { // set min governors GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, @@ -414,7 +414,7 @@ contract BaseIntegration_Test is Base_Test { // set targets GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, @@ -432,7 +432,7 @@ contract BaseIntegration_Test is Base_Test { // set bridge contract GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, @@ -452,7 +452,7 @@ contract BaseIntegration_Test is Base_Test { bytes memory calldata_ = abi.encodeCall(IBridgeManagerCallbackRegister.registerCallbacks, (param.callbackRegisters)); GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, @@ -471,7 +471,7 @@ contract BaseIntegration_Test is Base_Test { // set min governors GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, diff --git a/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeCurrent.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeCurrent.RoninBridgeManager.t.sol similarity index 92% rename from test/bridge/integration/bridge-manager/proposal-executer/executer.proposeCurrent.RoninBridgeManager.t.sol rename to test/bridge/integration/bridge-manager/proposal-executor/executor.proposeCurrent.RoninBridgeManager.t.sol index ee76739c..6acebfa4 100644 --- a/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeCurrent.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeCurrent.RoninBridgeManager.t.sol @@ -11,12 +11,12 @@ import { LibSort } from "solady/utils/LibSort.sol"; import "../../BaseIntegration.t.sol"; -contract ProposalWithExecuter_CurrentNetworkProposal_RoninBridgeManager_Test is BaseIntegration_Test { +contract ProposalWithExecutor_CurrentNetworkProposal_RoninBridgeManager_Test is BaseIntegration_Test { event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); event ProposalApproved(bytes32 indexed proposalHash); event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); - error ErrInvalidExecuter(); + error ErrInvalidExecutor(); error ErrProposalNotApproved(); error ErrInvalidProposalNonce(bytes4 sig); error ErrLooseProposalInternallyRevert(uint, bytes); @@ -62,7 +62,7 @@ contract ProposalWithExecuter_CurrentNetworkProposal_RoninBridgeManager_Test is _proposal.nonce = _roninBridgeManager.round(block.chainid) + 1; _proposal.chainId = block.chainid; - _proposal.executer = address(0); + _proposal.executor = address(0); _proposal.loose = false; _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; @@ -81,7 +81,7 @@ contract ProposalWithExecuter_CurrentNetworkProposal_RoninBridgeManager_Test is // Should the auto proposal executes on the last valid vote function test_autoProposal_strictProposal_WhenAllInternalCallsPass() public { _proposal.loose = false; - _proposal.executer = address(0); + _proposal.executor = address(0); vm.expectEmit(false, true, true, true); emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); @@ -112,10 +112,10 @@ contract ProposalWithExecuter_CurrentNetworkProposal_RoninBridgeManager_Test is _roninBridgeManager.execute(_proposal); } - // Should the non-auto proposal be execute by the specified executer - function test_executerProposal_strictProposal_WhenAllInternalCallsPass() public { + // Should the non-auto proposal be execute by the specified executor + function test_executorProposal_strictProposal_WhenAllInternalCallsPass() public { _proposal.loose = false; - _proposal.executer = _param.roninBridgeManager.governors[0]; + _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, true, true, true); @@ -142,8 +142,8 @@ contract ProposalWithExecuter_CurrentNetworkProposal_RoninBridgeManager_Test is } // Should revert when the auto proposal get executed again - function test_executerProposal_revertWhen_proposalIsAlreadyExecuted() external { - test_executerProposal_strictProposal_WhenAllInternalCallsPass(); + function test_executorProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_executorProposal_strictProposal_WhenAllInternalCallsPass(); vm.expectRevert(abi.encodeWithSelector(ErrProposalNotApproved.selector)); @@ -152,9 +152,9 @@ contract ProposalWithExecuter_CurrentNetworkProposal_RoninBridgeManager_Test is } // Should the non-auto proposal can not be execute by other governor - function test_executerProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { + function test_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { _proposal.loose = false; - _proposal.executer = _param.roninBridgeManager.governors[0]; + _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, true, true, true); @@ -172,7 +172,7 @@ contract ProposalWithExecuter_CurrentNetworkProposal_RoninBridgeManager_Test is assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); - vm.expectRevert(abi.encodeWithSelector(ErrInvalidExecuter.selector)); + vm.expectRevert(abi.encodeWithSelector(ErrInvalidExecutor.selector)); vm.prank(_param.roninBridgeManager.governors[1]); _roninBridgeManager.execute(_proposal); } diff --git a/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeGlobal.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeGlobal.RoninBridgeManager.t.sol similarity index 92% rename from test/bridge/integration/bridge-manager/proposal-executer/executer.proposeGlobal.RoninBridgeManager.t.sol rename to test/bridge/integration/bridge-manager/proposal-executor/executor.proposeGlobal.RoninBridgeManager.t.sol index c09b1bd9..bf524b16 100644 --- a/test/bridge/integration/bridge-manager/proposal-executer/executer.proposeGlobal.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeGlobal.RoninBridgeManager.t.sol @@ -11,12 +11,12 @@ import { LibSort } from "solady/utils/LibSort.sol"; import "../../BaseIntegration.t.sol"; -contract ProposalWithExecuter_GlobalProposal_RoninBridgeManager_Test is BaseIntegration_Test { +contract ProposalWithExecutor_GlobalProposal_RoninBridgeManager_Test is BaseIntegration_Test { event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); event ProposalApproved(bytes32 indexed proposalHash); event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); - error ErrInvalidExecuter(); + error ErrInvalidExecutor(); error ErrProposalNotApproved(); error ErrInvalidProposalNonce(bytes4 sig); error ErrLooseProposalInternallyRevert(uint, bytes); @@ -59,7 +59,7 @@ contract ProposalWithExecuter_GlobalProposal_RoninBridgeManager_Test is BaseInte _generateAddingOperators(_addingOperatorNum); _globalProposal.nonce = _roninBridgeManager.round(0) + 1; - _globalProposal.executer = address(0); + _globalProposal.executor = address(0); _globalProposal.loose = false; _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; @@ -78,7 +78,7 @@ contract ProposalWithExecuter_GlobalProposal_RoninBridgeManager_Test is BaseInte // Should the auto proposal executes on the last valid vote function test_autoProposal_strictProposal_WhenAllInternalCallsPass() public { _globalProposal.loose = false; - _globalProposal.executer = address(0); + _globalProposal.executor = address(0); vm.expectEmit(false, true, true, true); emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); @@ -109,10 +109,10 @@ contract ProposalWithExecuter_GlobalProposal_RoninBridgeManager_Test is BaseInte _roninBridgeManager.executeGlobal(_globalProposal); } - // Should the non-auto proposal be execute by the specified executer - function test_executerProposal_strictProposal_WhenAllInternalCallsPass() public { + // Should the non-auto proposal be execute by the specified executor + function test_executorProposal_strictProposal_WhenAllInternalCallsPass() public { _globalProposal.loose = false; - _globalProposal.executer = _param.roninBridgeManager.governors[0]; + _globalProposal.executor = _param.roninBridgeManager.governors[0]; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, true, true, true); @@ -139,8 +139,8 @@ contract ProposalWithExecuter_GlobalProposal_RoninBridgeManager_Test is BaseInte } // Should revert when the auto proposal get executed again - function test_executerProposal_revertWhen_proposalIsAlreadyExecuted() external { - test_executerProposal_strictProposal_WhenAllInternalCallsPass(); + function test_executorProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_executorProposal_strictProposal_WhenAllInternalCallsPass(); vm.expectRevert(abi.encodeWithSelector(ErrProposalNotApproved.selector)); @@ -149,9 +149,9 @@ contract ProposalWithExecuter_GlobalProposal_RoninBridgeManager_Test is BaseInte } // Should the non-auto proposal can not be execute by other governor - function test_executerProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { + function test_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { _globalProposal.loose = false; - _globalProposal.executer = _param.roninBridgeManager.governors[0]; + _globalProposal.executor = _param.roninBridgeManager.governors[0]; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, true, true, true); @@ -169,7 +169,7 @@ contract ProposalWithExecuter_GlobalProposal_RoninBridgeManager_Test is BaseInte assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); - vm.expectRevert(abi.encodeWithSelector(ErrInvalidExecuter.selector)); + vm.expectRevert(abi.encodeWithSelector(ErrInvalidExecutor.selector)); vm.prank(_param.roninBridgeManager.governors[1]); _roninBridgeManager.executeGlobal(_globalProposal); } diff --git a/test/bridge/integration/bridge-manager/proposal-executer/executer.relayGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol similarity index 91% rename from test/bridge/integration/bridge-manager/proposal-executer/executer.relayGlobal.MainchainBridgeManager.t.sol rename to test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol index 389b142d..fba61e10 100644 --- a/test/bridge/integration/bridge-manager/proposal-executer/executer.relayGlobal.MainchainBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol @@ -11,15 +11,15 @@ import { LibSort } from "solady/utils/LibSort.sol"; import "../../BaseIntegration.t.sol"; -contract ProposalWithExecuter_GlobalProposal_MainchainBridgeManager_Test is BaseIntegration_Test { +contract ProposalWithExecutor_GlobalProposal_MainchainBridgeManager_Test is BaseIntegration_Test { event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); event ProposalApproved(bytes32 indexed proposalHash); event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); - error ErrInvalidExecuter(); + error ErrInvalidExecutor(); error ErrProposalNotApproved(); error ErrInvalidProposalNonce(bytes4 sig); - error ErrNonExecuterCannotRelay(address executer, address caller); + error ErrNonExecutorCannotRelay(address executor, address caller); error ErrLooseProposalInternallyRevert(uint, bytes); using LibSort for address[]; @@ -60,7 +60,7 @@ contract ProposalWithExecuter_GlobalProposal_MainchainBridgeManager_Test is Base _generateAddingOperators(_addingOperatorNum); _globalProposal.nonce = _mainchainBridgeManager.round(0) + 1; - _globalProposal.executer = address(0); + _globalProposal.executor = address(0); _globalProposal.loose = false; _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; @@ -79,7 +79,7 @@ contract ProposalWithExecuter_GlobalProposal_MainchainBridgeManager_Test is Base // Should the auto proposal executes on the last valid vote function test_relayGlobal_autoProposal_strictProposal_WhenAllInternalCallsPass() public { _globalProposal.loose = false; - _globalProposal.executer = address(0); + _globalProposal.executor = address(0); vm.expectEmit(false, false, false, false); emit ProposalApproved(_anyValue); @@ -108,10 +108,10 @@ contract ProposalWithExecuter_GlobalProposal_MainchainBridgeManager_Test is Base _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); } - // Should the non-auto proposal be execute by the specified executer - function test_relayGlobal_executerProposal_strictProposal_WhenAllInternalCallsPass() public { + // Should the non-auto proposal be execute by the specified executor + function test_relayGlobal_executorProposal_strictProposal_WhenAllInternalCallsPass() public { _globalProposal.loose = false; - _globalProposal.executer = _param.roninBridgeManager.governors[0]; + _globalProposal.executor = _param.roninBridgeManager.governors[0]; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, false, false, false); @@ -131,8 +131,8 @@ contract ProposalWithExecuter_GlobalProposal_MainchainBridgeManager_Test is Base } // Should revert when the auto proposal get executed again - function test_relayGlobal_executerProposal_revertWhen_proposalIsAlreadyExecuted() external { - test_relayGlobal_executerProposal_strictProposal_WhenAllInternalCallsPass(); + function test_relayGlobal_executorProposal_revertWhen_proposalIsAlreadyExecuted() external { + test_relayGlobal_executorProposal_strictProposal_WhenAllInternalCallsPass(); vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, MainchainBridgeManager.relayGlobalProposal.selector)); @@ -141,16 +141,16 @@ contract ProposalWithExecuter_GlobalProposal_MainchainBridgeManager_Test is Base } // Should the non-auto proposal can not be execute by other governor - function test_relayGlobal_executerProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { + function test_relayGlobal_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { _globalProposal.loose = false; - _globalProposal.executer = _param.roninBridgeManager.governors[0]; + _globalProposal.executor = _param.roninBridgeManager.governors[0]; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); for (uint256 i; i < signatures.length; i++) { _signatures.push(signatures[i]); } - vm.expectRevert(abi.encodeWithSelector(ErrNonExecuterCannotRelay.selector, _param.roninBridgeManager.governors[0], _param.roninBridgeManager.governors[1])); + vm.expectRevert(abi.encodeWithSelector(ErrNonExecutorCannotRelay.selector, _param.roninBridgeManager.governors[0], _param.roninBridgeManager.governors[1])); vm.prank(_param.roninBridgeManager.governors[1]); _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol index 662db5bc..17ee78e1 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol @@ -58,7 +58,7 @@ contract LooseProposal_CurrentNetworkProposal_RoninBridgeManager_Test is BaseInt _proposal.nonce = _roninBridgeManager.round(block.chainid) + 1; _proposal.chainId = block.chainid; - _proposal.executer = address(0); + _proposal.executor = address(0); _proposal.loose = false; _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol index 95bffd82..d05a5156 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol @@ -56,7 +56,7 @@ contract LooseProposal_GlobalProposal_RoninBridgeManager_Test is BaseIntegration _globalProposal.nonce = _roninBridgeManager.round(0) + 1; _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; - _globalProposal.executer = address(0); + _globalProposal.executor = address(0); _globalProposal.loose = false; _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); diff --git a/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol index 084d5d65..b2375358 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol @@ -58,7 +58,7 @@ contract LooseProposal_GlobalProposal_MainchainBridgeManager_Test is BaseIntegra _globalProposal.nonce = _mainchainBridgeManager.round(0) + 1; _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; - _globalProposal.executer = address(0); + _globalProposal.executor = address(0); _globalProposal.loose = false; _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); diff --git a/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol index 5589b253..48e96924 100644 --- a/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol @@ -58,7 +58,7 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { function test_voteAddBridgeOperatorsProposal() public { _globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + _proposalExpiryDuration, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, @@ -121,7 +121,7 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { _globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + _proposalExpiryDuration, - executer: address(0), + executor: address(0), loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, diff --git a/test/helpers/MainchainBridgeAdminUtils.t.sol b/test/helpers/MainchainBridgeAdminUtils.t.sol index aad2f32f..322771c2 100644 --- a/test/helpers/MainchainBridgeAdminUtils.t.sol +++ b/test/helpers/MainchainBridgeAdminUtils.t.sol @@ -20,7 +20,7 @@ contract MainchainBridgeAdminUtils is ProposalUtils { function functionDelegateCall(address to, bytes memory data) public { Proposal.ProposalDetail memory proposal = this.createProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), - executer: address(0), + executor: address(0), loose: false, target: to, value: 0, @@ -42,7 +42,7 @@ contract MainchainBridgeAdminUtils is ProposalUtils { function functionDelegateCallGlobal(GlobalProposal.TargetOption target, bytes memory data) public { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), - executer: address(0), + executor: address(0), loose: false, targetOption: target, value: 0, @@ -77,7 +77,7 @@ contract MainchainBridgeAdminUtils is ProposalUtils { GlobalProposal.GlobalProposalDetail memory proposal = GlobalProposal.GlobalProposalDetail({ nonce: _contract.round(0) + 1, expiryTimestamp: this.defaultExpiryTimestamp(), - executer: address(0), + executor: address(0), loose: false, targetOptions: targetOptions, values: values, @@ -98,7 +98,7 @@ contract MainchainBridgeAdminUtils is ProposalUtils { function upgradeGlobal(GlobalProposal.TargetOption targetOption, uint256 nonce, bytes memory data) public { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), - executer: address(0), + executor: address(0), loose: false, targetOption: targetOption, value: 0, diff --git a/test/helpers/ProposalUtils.t.sol b/test/helpers/ProposalUtils.t.sol index 04395331..38a9bc65 100644 --- a/test/helpers/ProposalUtils.t.sol +++ b/test/helpers/ProposalUtils.t.sol @@ -28,7 +28,7 @@ contract ProposalUtils is Utils, Test { function createProposal( uint256 expiryTimestamp, - address executer, + address executor, bool loose, address target, uint256 value, @@ -39,7 +39,7 @@ contract ProposalUtils is Utils, Test { proposal = Proposal.ProposalDetail({ nonce: nonce, chainId: block.chainid, - executer: executer, + executor: executor, loose: loose, expiryTimestamp: expiryTimestamp, targets: wrapAddress(target), @@ -51,7 +51,7 @@ contract ProposalUtils is Utils, Test { function createGlobalProposal( uint256 expiryTimestamp, - address executer, + address executor, bool loose, GlobalProposal.TargetOption targetOption, uint256 value, @@ -65,7 +65,7 @@ contract ProposalUtils is Utils, Test { proposal = GlobalProposal.GlobalProposalDetail({ nonce: nonce, expiryTimestamp: expiryTimestamp, - executer: executer, + executor: executor, loose: loose, targetOptions: targetOptions, values: wrapUint(value), diff --git a/test/helpers/RoninBridgeAdminUtils.t.sol b/test/helpers/RoninBridgeAdminUtils.t.sol index 0292ea53..db703ab9 100644 --- a/test/helpers/RoninBridgeAdminUtils.t.sol +++ b/test/helpers/RoninBridgeAdminUtils.t.sol @@ -20,7 +20,7 @@ contract RoninBridgeAdminUtils is ProposalUtils { function functionDelegateCall(address to, bytes memory data) public { Proposal.ProposalDetail memory proposal = this.createProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), - executer: address(0), + executor: address(0), loose: false, target: to, value: 0, @@ -42,7 +42,7 @@ contract RoninBridgeAdminUtils is ProposalUtils { function functionDelegateCallGlobal(GlobalProposal.TargetOption target, bytes memory data) public { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), - executer: address(0), + executor: address(0), loose: false, targetOption: target, value: 0, @@ -77,7 +77,7 @@ contract RoninBridgeAdminUtils is ProposalUtils { GlobalProposal.GlobalProposalDetail memory proposal = GlobalProposal.GlobalProposalDetail({ nonce: _contract.round(0) + 1, expiryTimestamp: this.defaultExpiryTimestamp(), - executer: address(0), + executor: address(0), loose: false, targetOptions: targetOptions, values: values, @@ -98,7 +98,7 @@ contract RoninBridgeAdminUtils is ProposalUtils { function upgradeGlobal(GlobalProposal.TargetOption targetOption, uint256 nonce, bytes memory data) public { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), - executer: address(0), + executor: address(0), loose: false, targetOption: targetOption, value: 0, From 9d5f226fc5c97938606ae9fbda01f7b34fe0a990 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 2 Apr 2024 17:02:58 +0700 Subject: [PATCH 111/305] test: add propose and relay mainchain proposal --- ....proposeMainchain.RoninBridgeManager.t.sol | 180 ++++++++++++++++++ ...elayMainchain.MainchainBridgeManager.t.sol | 158 +++++++++++++++ 2 files changed, 338 insertions(+) create mode 100644 test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol create mode 100644 test/bridge/integration/bridge-manager/proposal-executor/executor.relayMainchain.MainchainBridgeManager.t.sol diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol new file mode 100644 index 00000000..53467717 --- /dev/null +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol @@ -0,0 +1,180 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibSort } from "solady/utils/LibSort.sol"; + +import "../../BaseIntegration.t.sol"; + +contract ProposalWithExecutor_MainchainProposal_RoninBridgeManager_Test is BaseIntegration_Test { + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + event ProposalApproved(bytes32 indexed proposalHash); + event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); + + error ErrInvalidExecutor(); + error ErrProposalNotApproved(); + error ErrInvalidProposalNonce(bytes4 sig); + error ErrLooseProposalInternallyRevert(uint, bytes); + + using LibSort for address[]; + + uint256 _proposalExpiryDuration; + uint256 _addingOperatorNum; + address[] _addingOperators; + address[] _addingGovernors; + uint96[] _voteWeights; + + address[] _beforeRelayedOperators; + address[] _beforeRelayedGovernors; + + address[] _afterRelayedOperators; + address[] _afterRelayedGovernors; + + Ballot.VoteType[] _supports; + + Proposal.ProposalDetail _proposal; + SignatureConsumer.Signature[] _signatures; + + bytes32 _anyValue; + + function setUp() public virtual override { + super.setUp(); + + _proposalExpiryDuration = 60; + _addingOperatorNum = 3; + + _beforeRelayedOperators = _param.roninBridgeManager.bridgeOperators; + _beforeRelayedGovernors = _param.roninBridgeManager.governors; + + _supports = new Ballot.VoteType[](_beforeRelayedOperators.length); + for (uint256 i; i < _beforeRelayedGovernors.length; i++) { + _supports[i] = Ballot.VoteType.For; + } + + _generateAddingOperators(_addingOperatorNum); + + _proposal.nonce = _roninBridgeManager.round(block.chainid) + 1; + _proposal.chainId = block.chainid; + _proposal.executor = address(0); + _proposal.loose = false; + _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; + + _proposal.targets.push(address(_mainchainBridgeManager)); // Test Relay + _proposal.values.push(0); + _proposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _proposal.gasAmounts.push(1_000_000); + + // Duplicate the internal call + _proposal.targets.push(address(_mainchainBridgeManager)); // Test Relay + _proposal.values.push(0); + _proposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _proposal.gasAmounts.push(1_000_000); + } + + // Should the proposal is approved but not executed on Ronin chain + function test_proposeMainchain_autoProposal_looseProposal() public { + _proposal.loose = true; + _proposal.executor = address(0); + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + + // Mainchain proposal does not take effect on Ronin chain + assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + } + + // Should the non-auto proposal be execute by the specified executor + function test_proposeMainchain_executorProposal_looseProposal_WhenAllInternalCallsPass() public { + _proposal.loose = true; + _proposal.executor = _param.roninBridgeManager.governors[0]; + _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.execute(_proposal); + + // Mainchain proposal does not take effect on Ronin chain + assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + } + + + // Should the non-auto proposal can not be execute by other governor + function test_proposeMainchain_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { + _proposal.loose = false; + _proposal.executor = _param.roninBridgeManager.governors[0]; + _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, true, true, true); + emit ProposalVoted(_anyValue, _param.roninBridgeManager.governors[0], Ballot.VoteType.For, 100); + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.prank(_param.roninBridgeManager.governors[0]); + _roninBridgeManager.proposeProposalStructAndCastVotes(_proposal, _supports, _signatures); + assertEq(_roninBridgeManager.proposalVoted(block.chainid, _proposal.nonce, _param.roninBridgeManager.governors[0]), true); + assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + + vm.expectRevert(abi.encodeWithSelector(ErrInvalidExecutor.selector)); + vm.prank(_param.roninBridgeManager.governors[1]); + _roninBridgeManager.execute(_proposal); + } + + function _generateAddingOperators(uint256 num) internal { + delete _addingOperators; + delete _addingGovernors; + delete _voteWeights; + + _afterRelayedOperators = _beforeRelayedOperators; + _afterRelayedGovernors = _beforeRelayedGovernors; + + for (uint256 i; i < num; i++) { + _addingOperators.push(makeAddr(string.concat("adding-operator", vm.toString(i)))); + _addingGovernors.push(makeAddr(string.concat("adding-governor", vm.toString(i)))); + _voteWeights.push(uint96(uint256(100))); + + _afterRelayedOperators.push(_addingOperators[i]); + _afterRelayedGovernors.push(_addingGovernors[i]); + } + } +} diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.relayMainchain.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayMainchain.MainchainBridgeManager.t.sol new file mode 100644 index 00000000..89818604 --- /dev/null +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayMainchain.MainchainBridgeManager.t.sol @@ -0,0 +1,158 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibSort } from "solady/utils/LibSort.sol"; + +import "../../BaseIntegration.t.sol"; + +contract ProposalWithExecutor_MainchainProposal_MainchainBridgeManager_Test is BaseIntegration_Test { + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + event ProposalApproved(bytes32 indexed proposalHash); + event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); + + error ErrNonExecutorCannotRelay(address executor, address caller); + error ErrInvalidExecutor(); + error ErrProposalNotApproved(); + error ErrInvalidProposalNonce(bytes4 sig); + error ErrLooseProposalInternallyRevert(uint, bytes); + + using LibSort for address[]; + + uint256 _proposalExpiryDuration; + uint256 _addingOperatorNum; + address[] _addingOperators; + address[] _addingGovernors; + uint96[] _voteWeights; + + address[] _beforeRelayedOperators; + address[] _beforeRelayedGovernors; + + address[] _afterRelayedOperators; + address[] _afterRelayedGovernors; + + Ballot.VoteType[] _supports; + + Proposal.ProposalDetail _proposal; + SignatureConsumer.Signature[] _signatures; + + bytes32 _anyValue; + + function setUp() public virtual override { + super.setUp(); + + _proposalExpiryDuration = 60; + _addingOperatorNum = 3; + + _beforeRelayedOperators = _param.roninBridgeManager.bridgeOperators; + _beforeRelayedGovernors = _param.roninBridgeManager.governors; + + _supports = new Ballot.VoteType[](_beforeRelayedOperators.length); + for (uint256 i; i < _beforeRelayedGovernors.length; i++) { + _supports[i] = Ballot.VoteType.For; + } + + _generateAddingOperators(_addingOperatorNum); + + _proposal.nonce = _mainchainBridgeManager.round(block.chainid) + 1; + _proposal.chainId = block.chainid; + _proposal.executor = address(0); + _proposal.loose = false; + _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; + + _proposal.targets.push(address(_mainchainBridgeManager)); // Test Relay + _proposal.values.push(0); + _proposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _proposal.gasAmounts.push(1_000_000); + + // Duplicate the internal call + _proposal.targets.push(address(_mainchainBridgeManager)); // Test Relay + _proposal.values.push(0); + _proposal.calldatas.push(abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))); + _proposal.gasAmounts.push(1_000_000); + } + + // Should the proposal is approved but not executed on Ronin chain + function test_relayMainchain_autoProposal_looseProposal() public { + _proposal.loose = true; + _proposal.executor = address(0); + + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + // Mainchain proposal take effect on Mainchain + assertEq(_mainchainBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayProposal(_proposal, _supports, _signatures); + assertEq(_mainchainBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should the non-auto proposal be relay by the specified executor + function test_relayMainchain_executorProposal_looseProposal_WhenAllInternalCallsPass() public { + _proposal.loose = true; + _proposal.executor = _param.roninBridgeManager.governors[0]; + _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + vm.expectEmit(false, false, false, false); + emit ProposalApproved(_anyValue); + vm.expectEmit(false, false, false, false); + emit ProposalExecuted(_anyValue, new bool[](2), new bytes[](2)); + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + // Mainchain proposal take effect on Mainchain + assertEq(_mainchainBridgeManager.getBridgeOperators(), _beforeRelayedOperators); + vm.prank(_param.roninBridgeManager.governors[0]); + _mainchainBridgeManager.relayProposal(_proposal, _supports, _signatures); + assertEq(_mainchainBridgeManager.getBridgeOperators(), _afterRelayedOperators); + } + + // Should the non-auto proposal can not be execute by other governor + function test_relayMainchain_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { + _proposal.loose = false; + _proposal.executor = _param.roninBridgeManager.governors[0]; + _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success + + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignatures(_proposal, _param.test.governorPKs); + for (uint256 i; i < signatures.length; i++) { + _signatures.push(signatures[i]); + } + + vm.expectRevert(abi.encodeWithSelector(ErrNonExecutorCannotRelay.selector, _param.roninBridgeManager.governors[0], _param.roninBridgeManager.governors[1])); + vm.prank(_param.roninBridgeManager.governors[1]); + _mainchainBridgeManager.relayProposal(_proposal, _supports, _signatures); + } + + function _generateAddingOperators(uint256 num) internal { + delete _addingOperators; + delete _addingGovernors; + delete _voteWeights; + + _afterRelayedOperators = _beforeRelayedOperators; + _afterRelayedGovernors = _beforeRelayedGovernors; + + for (uint256 i; i < num; i++) { + _addingOperators.push(makeAddr(string.concat("adding-operator", vm.toString(i)))); + _addingGovernors.push(makeAddr(string.concat("adding-governor", vm.toString(i)))); + _voteWeights.push(uint96(uint256(100))); + + _afterRelayedOperators.push(_addingOperators[i]); + _afterRelayedGovernors.push(_addingGovernors[i]); + } + } +} From 1d4a682e67d8b86ab13db5c49d4676f26f298c9f Mon Sep 17 00:00:00 2001 From: Bao Date: Tue, 2 Apr 2024 17:27:10 +0700 Subject: [PATCH 112/305] Update src/libraries/Proposal.sol Co-authored-by: tu-do.ron Signed-off-by: Bao --- src/libraries/Proposal.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index 5f19cf49..abb4dd42 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -94,7 +94,7 @@ library Proposal { mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp - mstore(add(ptr, 0x80), mload(add(proposal, 0x80))) // proposal.executor + mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor mstore(add(ptr, 0xa0), mload(add(proposal, 0x80))) // proposal.loose let arrayHashed From 87191a6da216d9b9dae6aa3a978a4c64252561dd Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 3 Apr 2024 14:07:33 +0700 Subject: [PATCH 113/305] script: init script --- foundry.toml | 2 + .../deploy-sepolia.s.sol | 76 +++++++++++++++++++ script/GeneralConfig.sol | 12 +-- script/GeneralConfigExtended.sol | 14 ++-- script/Migration.s.sol | 2 +- script/utils/Network.sol | 9 ++- 6 files changed, 100 insertions(+), 15 deletions(-) create mode 100644 script/20240403-deploy-sepolia/deploy-sepolia.s.sol diff --git a/foundry.toml b/foundry.toml index f72d3fc2..1910458d 100644 --- a/foundry.toml +++ b/foundry.toml @@ -50,5 +50,7 @@ runs = 1_000 [rpc_endpoints] ethereum = "https://eth.llamarpc.com" goerli = "https://ethereum-goerli.publicnode.com" +# sepolia = "https://ethereum-sepolia-rpc.publicnode.com" +sepolia = "https://sepolia.infura.io/v3/198b01af94b445f78c6d5ef985f57264" ronin-mainnet = "https://api-partner.roninchain.com/rpc" ronin-testnet = "https://saigon-archive.roninchain.com/rpc" diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol new file mode 100644 index 00000000..953e7101 --- /dev/null +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -0,0 +1,76 @@ +import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; + +import { ISharedArgument } from "@ronin/script/interfaces/ISharedArgument.sol"; +import { LibSharedAddress } from "foundry-deployment-kit/libraries/LibSharedAddress.sol"; + +import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import { PauseEnforcer } from "@ronin/contracts/ronin/gateway/PauseEnforcer.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; +import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; +import { MockWrappedToken } from "@ronin/contracts/mocks/token/MockWrappedToken.sol"; + +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; + +import { MainchainGatewayV3Deploy } from "@ronin/script/contracts/MainchainGatewayV3Deploy.s.sol"; +import { MainchainBridgeManagerDeploy } from "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; +import { MainchainPauseEnforcerDeploy } from "@ronin/script/contracts/MainchainPauseEnforcerDeploy.s.sol"; +import { WETHDeploy } from "@ronin/script/contracts/token/WETHDeploy.s.sol"; +import { WRONDeploy } from "@ronin/script/contracts/token/WRONDeploy.s.sol"; +import { AXSDeploy } from "@ronin/script/contracts/token/AXSDeploy.s.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; +import { MockERC721Deploy } from "@ronin/script/contracts/token/MockERC721Deploy.s.sol"; + +import { GeneralConfigExtended } from "../GeneralConfigExtended.sol"; +import { Network } from "../utils/Network.sol"; + +contract DeploySepolia is BaseMigration { + ISharedArgument.SharedParameter _param; + + PauseEnforcer _mainchainPauseEnforcer; + MainchainGatewayV3 _mainchainGatewayV3; + MainchainBridgeManager _mainchainBridgeManager; + + MockWrappedToken _mainchainWeth; + MockERC20 _mainchainAxs; + MockERC20 _mainchainSlp; + MockERC20 _mainchainUsdc; + MockERC721 _mainchainMockERC721; + + MainchainBridgeAdminUtils _mainchainProposalUtils; + + function _configByteCode() internal virtual override returns (bytes memory) { + return abi.encodePacked(type(GeneralConfigExtended).creationCode); + } + + function _sharedArguments() internal virtual override returns (bytes memory rawArgs) { + return ""; + } + + function setUp() public override { + super.setUp(); + } + + function run() public { + // function run() public onlyOn(Network.Sepolia.key()) { + _deployContractsOnMainchain(); + } + + function _deployContractsOnMainchain() internal { + // _mainchainPauseEnforcer = new MainchainPauseEnforcerDeploy().run(); + _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); + _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); + + _mainchainWeth = new WETHDeploy().run(); + _mainchainAxs = new AXSDeploy().run(); + _mainchainSlp = new SLPDeploy().run(); + _mainchainUsdc = new USDCDeploy().run(); + _mainchainMockERC721 = new MockERC721Deploy().run(); + + _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); + _mainchainProposalUtils = new MainchainBridgeAdminUtils( + _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] + ); + } +} diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 2651f1f0..74c05707 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -13,12 +13,12 @@ contract GeneralConfig is BaseGeneralConfig, Utils { function _setUpNetworks() internal virtual override { setNetworkInfo( - Network.Goerli.chainId(), - Network.Goerli.key(), - Network.Goerli.chainAlias(), - Network.Goerli.deploymentDir(), - Network.Goerli.envLabel(), - Network.Goerli.explorer() + Network.Sepolia.chainId(), + Network.Sepolia.key(), + Network.Sepolia.chainAlias(), + Network.Sepolia.deploymentDir(), + Network.Sepolia.envLabel(), + Network.Sepolia.explorer() ); setNetworkInfo( Network.EthMainnet.chainId(), diff --git a/script/GeneralConfigExtended.sol b/script/GeneralConfigExtended.sol index 1d2f5ccb..fcc33c86 100644 --- a/script/GeneralConfigExtended.sol +++ b/script/GeneralConfigExtended.sol @@ -14,12 +14,12 @@ contract GeneralConfigExtended is BaseGeneralConfig { function _setUpNetworks() internal virtual override { setNetworkInfo( - Network.Goerli.chainId(), - Network.Goerli.key(), - Network.Goerli.chainAlias(), - Network.Goerli.deploymentDir(), - Network.Goerli.envLabel(), - Network.Goerli.explorer() + Network.Sepolia.chainId(), + Network.Sepolia.key(), + Network.Sepolia.chainAlias(), + Network.Sepolia.deploymentDir(), + Network.Sepolia.envLabel(), + Network.Sepolia.explorer() ); setNetworkInfo( Network.EthMainnet.chainId(), @@ -46,7 +46,7 @@ contract GeneralConfigExtended is BaseGeneralConfig { } function getCompanionNetwork(TNetwork network) external pure returns (Network) { - if (network == DefaultNetwork.RoninTestnet.key()) return Network.Goerli; + if (network == DefaultNetwork.RoninTestnet.key()) return Network.Sepolia; if (network == DefaultNetwork.RoninMainnet.key()) return Network.EthMainnet; revert("Network: Unknown companion network"); } diff --git a/script/Migration.s.sol b/script/Migration.s.sol index ecec4fa8..019f7419 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -22,7 +22,7 @@ contract Migration is BaseMigrationV2, Utils { function _sharedArguments() internal virtual override returns (bytes memory rawArgs) { ISharedArgument.SharedParameter memory param; - if (network() == Network.Goerli.key()) { + if (network() == Network.Sepolia.key()) { // Undefined } else if (network() == DefaultNetwork.RoninTestnet.key()) { // Undefined diff --git a/script/utils/Network.sol b/script/utils/Network.sol index 9eda031a..688a0ef8 100644 --- a/script/utils/Network.sol +++ b/script/utils/Network.sol @@ -5,6 +5,7 @@ import { LibString, TNetwork } from "foundry-deployment-kit/types/Types.sol"; enum Network { Goerli, + Sepolia, EthMainnet, RoninDevnet } @@ -13,6 +14,7 @@ using { key, name, chainId, chainAlias, envLabel, deploymentDir, explorer } for function chainId(Network network) pure returns (uint256) { if (network == Network.Goerli) return 5; + if (network == Network.Sepolia) return 11155111; if (network == Network.EthMainnet) return 1; if (network == Network.RoninDevnet) return 2022; @@ -25,11 +27,13 @@ function key(Network network) pure returns (TNetwork) { function explorer(Network network) pure returns (string memory link) { if (network == Network.Goerli) return "https://goerli.etherscan.io/"; + if (network == Network.Sepolia) return "https://sepolia.etherscan.io/"; if (network == Network.EthMainnet) return "https://etherscan.io/"; } function name(Network network) pure returns (string memory) { if (network == Network.Goerli) return "Goerli"; + if (network == Network.Sepolia) return "Sepolia"; if (network == Network.RoninDevnet) return "RoninDevnet"; if (network == Network.EthMainnet) return "EthMainnet"; @@ -38,6 +42,7 @@ function name(Network network) pure returns (string memory) { function deploymentDir(Network network) pure returns (string memory) { if (network == Network.Goerli) return "goerli/"; + if (network == Network.Sepolia) return "sepolia/"; if (network == Network.EthMainnet) return "ethereum/"; if (network == Network.RoninDevnet) return "ronin-devnet/"; @@ -45,7 +50,8 @@ function deploymentDir(Network network) pure returns (string memory) { } function envLabel(Network network) pure returns (string memory) { - if (network == Network.Goerli) return "TESTNET_PK"; + if (network == Network.Goerli) return "GOERLI_PK"; + if (network == Network.Sepolia) return "SEPOLIA_PK"; if (network == Network.RoninDevnet) return "DEVNET_PK"; if (network == Network.EthMainnet) return "MAINNET_PK"; @@ -54,6 +60,7 @@ function envLabel(Network network) pure returns (string memory) { function chainAlias(Network network) pure returns (string memory) { if (network == Network.Goerli) return "goerli"; + if (network == Network.Sepolia) return "sepolia"; if (network == Network.EthMainnet) return "ethereum"; if (network == Network.RoninDevnet) return "ronin-devnet"; From 5d30168b3df408840a8ee1c6d7e908369c3ffe29 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 3 Apr 2024 14:39:09 +0700 Subject: [PATCH 114/305] script: remove GeneralConfigExtended --- .../deploy-sepolia.s.sol | 13 +++-- script/BridgeMigration.sol | 4 +- script/GeneralConfig.sol | 7 +++ script/GeneralConfigExtended.sol | 53 ------------------- 4 files changed, 19 insertions(+), 58 deletions(-) delete mode 100644 script/GeneralConfigExtended.sol diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 953e7101..7b02fa95 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { ISharedArgument } from "@ronin/script/interfaces/ISharedArgument.sol"; @@ -22,7 +25,7 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; import { MockERC721Deploy } from "@ronin/script/contracts/token/MockERC721Deploy.s.sol"; -import { GeneralConfigExtended } from "../GeneralConfigExtended.sol"; +import { GeneralConfig } from "../GeneralConfig.sol"; import { Network } from "../utils/Network.sol"; contract DeploySepolia is BaseMigration { @@ -41,13 +44,17 @@ contract DeploySepolia is BaseMigration { MainchainBridgeAdminUtils _mainchainProposalUtils; function _configByteCode() internal virtual override returns (bytes memory) { - return abi.encodePacked(type(GeneralConfigExtended).creationCode); + return abi.encodePacked(type(GeneralConfig).creationCode); } function _sharedArguments() internal virtual override returns (bytes memory rawArgs) { return ""; } + function _getProxyAdmin() internal virtual override returns (address payable) { + return payable(0x55ba00EeB8D8d33Df1b1985459D310b9CAfB19f2); + } + function setUp() public override { super.setUp(); } @@ -58,7 +65,7 @@ contract DeploySepolia is BaseMigration { } function _deployContractsOnMainchain() internal { - // _mainchainPauseEnforcer = new MainchainPauseEnforcerDeploy().run(); + _mainchainPauseEnforcer = new MainchainPauseEnforcerDeploy().run(); _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); diff --git a/script/BridgeMigration.sol b/script/BridgeMigration.sol index 17612c72..5ffc8560 100644 --- a/script/BridgeMigration.sol +++ b/script/BridgeMigration.sol @@ -10,7 +10,7 @@ import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeMa import { ErrorHandler } from "@ronin/contracts/libraries/ErrorHandler.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { GeneralConfigExtended } from "./GeneralConfigExtended.sol"; +import { GeneralConfig } from "./GeneralConfig.sol"; import { IGeneralConfigExtended } from "./IGeneralConfigExtended.sol"; import { Network } from "./utils/Network.sol"; import { Contract } from "./utils/Contract.sol"; @@ -24,7 +24,7 @@ contract BridgeMigration is BaseMigration { IGeneralConfigExtended internal constant _config = IGeneralConfigExtended(address(CONFIG)); function _configByteCode() internal virtual override returns (bytes memory) { - return abi.encodePacked(type(GeneralConfigExtended).creationCode); + return abi.encodePacked(type(GeneralConfig).creationCode); } function _sharedArguments() internal virtual override returns (bytes memory rawArgs) { diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 74c05707..668b4804 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.23; import { console2 as console } from "forge-std/console2.sol"; import { BaseGeneralConfig } from "foundry-deployment-kit/BaseGeneralConfig.sol"; import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; +import { TNetwork } from "foundry-deployment-kit/types/Types.sol"; import { Contract } from "./utils/Contract.sol"; import { Network } from "./utils/Network.sol"; import { Utils } from "./utils/Utils.sol"; @@ -70,4 +71,10 @@ contract GeneralConfig is BaseGeneralConfig, Utils { if (sender == address(0x0) && isLocalNetwork) sender = payable(DEFAULT_SENDER); require(sender != address(0x0), "GeneralConfig: Sender is address(0x0)"); } + + function getCompanionNetwork(TNetwork network) external pure returns (Network) { + if (network == DefaultNetwork.RoninTestnet.key()) return Network.Sepolia; + if (network == DefaultNetwork.RoninMainnet.key()) return Network.EthMainnet; + revert("Network: Unknown companion network"); + } } diff --git a/script/GeneralConfigExtended.sol b/script/GeneralConfigExtended.sol deleted file mode 100644 index fcc33c86..00000000 --- a/script/GeneralConfigExtended.sol +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import { console2 as console } from "forge-std/console2.sol"; -import { TContract } from "foundry-deployment-kit/types/Types.sol"; -import { BaseGeneralConfig } from "foundry-deployment-kit/BaseGeneralConfig.sol"; -import { TNetwork } from "foundry-deployment-kit/types/Types.sol"; -import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; -import { Network } from "./utils/Network.sol"; -import { Contract } from "./utils/Contract.sol"; - -contract GeneralConfigExtended is BaseGeneralConfig { - constructor() BaseGeneralConfig("", "deployments/") { } - - function _setUpNetworks() internal virtual override { - setNetworkInfo( - Network.Sepolia.chainId(), - Network.Sepolia.key(), - Network.Sepolia.chainAlias(), - Network.Sepolia.deploymentDir(), - Network.Sepolia.envLabel(), - Network.Sepolia.explorer() - ); - setNetworkInfo( - Network.EthMainnet.chainId(), - Network.EthMainnet.key(), - Network.EthMainnet.chainAlias(), - Network.EthMainnet.deploymentDir(), - Network.EthMainnet.envLabel(), - Network.EthMainnet.explorer() - ); - } - - function _setUpContracts() internal virtual override { - _mapContractname(Contract.BridgeReward); - _mapContractname(Contract.BridgeSlash); - _mapContractname(Contract.BridgeTracking); - _mapContractname(Contract.RoninBridgeManager); - _mapContractname(Contract.RoninGatewayV3); - _mapContractname(Contract.MainchainBridgeManager); - _mapContractname(Contract.MainchainGatewayV3); - } - - function _mapContractname(Contract contractEnum) internal { - _contractNameMap[contractEnum.key()] = contractEnum.name(); - } - - function getCompanionNetwork(TNetwork network) external pure returns (Network) { - if (network == DefaultNetwork.RoninTestnet.key()) return Network.Sepolia; - if (network == DefaultNetwork.RoninMainnet.key()) return Network.EthMainnet; - revert("Network: Unknown companion network"); - } -} From 5184fca73c6b0d03bf40b7b258b16a0ab3117d9c Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 3 Apr 2024 20:12:39 +0700 Subject: [PATCH 115/305] script: first runnable script --- .../changeGV-config.s.sol | 46 ++++++ .../deploy-sepolia.s.sol | 138 ++++++++++++++++-- script/Migration.s.sol | 50 ++++++- test/bridge/integration/BaseIntegration.t.sol | 7 +- test/helpers/MainchainBridgeAdminUtils.t.sol | 4 +- test/helpers/ProposalUtils.t.sol | 22 +-- test/helpers/RoninBridgeAdminUtils.t.sol | 4 +- 7 files changed, 238 insertions(+), 33 deletions(-) create mode 100644 script/20240403-deploy-sepolia/changeGV-config.s.sol diff --git a/script/20240403-deploy-sepolia/changeGV-config.s.sol b/script/20240403-deploy-sepolia/changeGV-config.s.sol new file mode 100644 index 00000000..5d471b0c --- /dev/null +++ b/script/20240403-deploy-sepolia/changeGV-config.s.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; + +contract DeploySepolia__ChangeGV_Config { + function _removeInitOperator() internal pure returns (bytes memory) { + address[] memory bridgeOperator = new address[](1); + bridgeOperator[0] = 0xbA8E32D874948dF4Cbe72284De91CC4968293BCe; + + // function removeBridgeOperators( + // address[] calldata bridgeOperators + // ) + + return abi.encodeCall(IBridgeManager.removeBridgeOperators, (bridgeOperator)); + } + + function _addTestnetOperators() internal pure returns (bytes memory) { + uint96[] memory voteWeights = new uint96[](4); + address[] memory governors = new address[](4); // 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa,0xb033ba62EC622dC54D0ABFE0254e79692147CA26,0x087D08e3ba42e64E3948962dd1371F906D1278b9,0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F + address[] memory bridgeOperators = new address[](4); // 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B,0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb,0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c,0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A + + voteWeights[0] = 100; + voteWeights[1] = 100; + voteWeights[2] = 100; + voteWeights[3] = 100; + + governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; + bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; + bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; + bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; + + // function addBridgeOperators( + // uint96[] calldata voteWeights, + // address[] calldata governors, + // address[] calldata bridgeOperators + // ) + + return abi.encodeCall(IBridgeManager.addBridgeOperators, (voteWeights, governors, bridgeOperators)); + } +} diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 7b02fa95..f20610fe 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -1,14 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; - import { ISharedArgument } from "@ronin/script/interfaces/ISharedArgument.sol"; import { LibSharedAddress } from "foundry-deployment-kit/libraries/LibSharedAddress.sol"; -import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; -import { PauseEnforcer } from "@ronin/contracts/ronin/gateway/PauseEnforcer.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/ronin/gateway/PauseEnforcer.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; import { MockWrappedToken } from "@ronin/contracts/mocks/token/MockWrappedToken.sol"; @@ -27,8 +25,13 @@ import { MockERC721Deploy } from "@ronin/script/contracts/token/MockERC721Deploy import { GeneralConfig } from "../GeneralConfig.sol"; import { Network } from "../utils/Network.sol"; +import { BridgeMigration } from "../BridgeMigration.sol"; + +import "./changeGV-config.s.sol"; -contract DeploySepolia is BaseMigration { +import "forge-std/console2.sol"; + +contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { ISharedArgument.SharedParameter _param; PauseEnforcer _mainchainPauseEnforcer; @@ -37,7 +40,6 @@ contract DeploySepolia is BaseMigration { MockWrappedToken _mainchainWeth; MockERC20 _mainchainAxs; - MockERC20 _mainchainSlp; MockERC20 _mainchainUsdc; MockERC721 _mainchainMockERC721; @@ -51,17 +53,14 @@ contract DeploySepolia is BaseMigration { return ""; } - function _getProxyAdmin() internal virtual override returns (address payable) { - return payable(0x55ba00EeB8D8d33Df1b1985459D310b9CAfB19f2); - } - function setUp() public override { super.setUp(); } - function run() public { - // function run() public onlyOn(Network.Sepolia.key()) { + function run() public onlyOn(Network.Sepolia.key()) { _deployContractsOnMainchain(); + _mainchainGatewayV3Initialize(); + _correctGVs(); } function _deployContractsOnMainchain() internal { @@ -71,13 +70,122 @@ contract DeploySepolia is BaseMigration { _mainchainWeth = new WETHDeploy().run(); _mainchainAxs = new AXSDeploy().run(); - _mainchainSlp = new SLPDeploy().run(); _mainchainUsdc = new USDCDeploy().run(); _mainchainMockERC721 = new MockERC721Deploy().run(); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); _mainchainProposalUtils = new MainchainBridgeAdminUtils( - _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] + 2021, _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] ); } + + function _mainchainGatewayV3Initialize() internal { + (address[] memory mainchainTokens, address[] memory roninTokens) = _getMainchainAndRoninTokens(); + uint256 tokenNum = mainchainTokens.length; + uint256[] memory highTierThreshold = new uint256[](tokenNum); + uint256[] memory lockedThreshold = new uint256[](tokenNum); + uint256[] memory unlockFeePercentages = new uint256[](tokenNum); + uint256[] memory dailyWithdrawalLimits = new uint256[](tokenNum); + Token.Standard[] memory standards = new Token.Standard[](tokenNum); + + for (uint256 i; i < tokenNum; i++) { + bool isERC721 = i == mainchainTokens.length - 1; // last item is ERC721 + + highTierThreshold[i] = 10; + lockedThreshold[i] = 20; + unlockFeePercentages[i] = 100_000; + dailyWithdrawalLimits[i] = 12; + standards[i] = isERC721 ? Token.Standard.ERC721 : Token.Standard.ERC20; + } + + // Mainchain Gateway V3 + _param.mainchainGatewayV3.wrappedToken = address(_mainchainWeth); + _param.mainchainGatewayV3.addresses[0] = mainchainTokens; // (ERC20 + ERC721) + _param.mainchainGatewayV3.addresses[1] = roninTokens; // (ERC20 + ERC721) + _param.mainchainGatewayV3.addresses[2] = new address[](0); + _param.mainchainGatewayV3.thresholds[0] = highTierThreshold; + _param.mainchainGatewayV3.thresholds[1] = lockedThreshold; + _param.mainchainGatewayV3.thresholds[2] = unlockFeePercentages; + _param.mainchainGatewayV3.thresholds[3] = dailyWithdrawalLimits; + _param.mainchainGatewayV3.standards = standards; + + ISharedArgument.MainchainGatewayV3Param memory param = _param.mainchainGatewayV3; + + vm.broadcast(sender()); + _mainchainGatewayV3.initialize( + param.roleSetter, + IWETH(param.wrappedToken), + 2021, + param.numerator, + param.highTierVWNumerator, + param.denominator, + param.addresses, + param.thresholds, + param.standards + ); + + vm.broadcast(sender()); + _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); + } + + function _correctGVs() internal { + uint256 expiredTime = block.timestamp + 10 days; + address[] memory targets = new address[](2); + uint256[] memory values = new uint256[](2); + bytes[] memory calldatas = new bytes[](2); + uint256[] memory gasAmounts = new uint256[](2); + + targets[0] = address(_mainchainBridgeManager); + values[0] = 0; + calldatas[0] = _removeInitOperator(); + gasAmounts[0] = 1_000_000; + + targets[1] = address(_mainchainBridgeManager); + values[1] = 0; + calldatas[1] = _addTestnetOperators(); + gasAmounts[1] = 1_000_000; + + // ================ VERIFY AND EXECUTE PROPOSAL =============== + + // _verifyMainchainProposalGasAmount(targets, values, calldatas, gasAmounts); + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: _mainchainBridgeManager.round(0) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](1); + supports_[0] = Ballot.VoteType.For; + + SignatureConsumer.Signature[] memory signatures = + _mainchainProposalUtils.generateSignatures(proposal, _param.test.governorPKs); + + vm.broadcast(_mainchainBridgeManager.getGovernors()[0]); + _mainchainBridgeManager.relayProposal(proposal, supports_, signatures); + } + + function _getMainchainAndRoninTokens() + internal + view + returns (address[] memory mainchainTokens, address[] memory roninTokens) + { + uint256 tokenNum = 5; + mainchainTokens = new address[](tokenNum); + roninTokens = new address[](tokenNum); + + mainchainTokens[0] = address(_mainchainWeth); + mainchainTokens[1] = address(_mainchainAxs); + mainchainTokens[2] = address(_mainchainUsdc); + mainchainTokens[3] = address(_mainchainMockERC721); + + roninTokens[0] = address(0x00); + roninTokens[1] = address(0x00); + roninTokens[2] = address(0x067FBFf8990c58Ab90BaE3c97241C5d736053F77); + roninTokens[3] = address(0x00); + } } diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 019f7419..0b5b11f4 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -23,7 +23,54 @@ contract Migration is BaseMigrationV2, Utils { ISharedArgument.SharedParameter memory param; if (network() == Network.Sepolia.key()) { - // Undefined + // tokens + param.weth.name = "Wrapped WETH"; + param.weth.symbol = "WETH"; + param.axs.name = "Axie Infinity Shard"; + param.axs.symbol = "AXS"; + param.usdc.name = "USD Coin"; + param.usdc.symbol = "USDC"; + param.mockErc721.name = "Mock ERC721"; + param.mockErc721.symbol = "M_ERC721"; + + uint256 num = 1; + address[] memory operatorAddrs = new address[](num); + address[] memory governorAddrs = new address[](num); + uint256[] memory operatorPKs = new uint256[](num); + uint256[] memory governorPKs = new uint256[](num); + uint96[] memory voteWeights = new uint96[](num); + GlobalProposal.TargetOption[] memory options = new GlobalProposal.TargetOption[](0); + address[] memory targets = new address[](0); + + operatorAddrs[0] = 0xbA8E32D874948dF4Cbe72284De91CC4968293BCe; // One-time address, becomes useless after this migration + operatorPKs[0] = 0xd5df10f17539ff887f211a90bfede2dffb664b7442b4303ba93ac8f6a7d9fa9b; // One-time address, becomes useless after this migration + + governorAddrs[0] = 0x45E8f1aCFC89F45720cf11e807eD85B730C67C7e; // One-time address, becomes useless after this migration + governorPKs[0] = 0xc2b5a7cc553931272fc819150c4ea31d24ad06fdfa021c403b2ef5293bfe685b; // One-time address, becomes useless after this migration + voteWeights[0] = 100; + + param.test.operatorPKs = operatorPKs; + param.test.governorPKs = governorPKs; + + // Mainchain Gateway Pause Enforcer + param.mainchainPauseEnforcer.admin = makeAddr("pause-enforcer-admin"); + param.mainchainPauseEnforcer.sentries = wrapAddress(makeAddr("pause-enforcer-sentry")); + + // Mainchain Gateway V3 + param.mainchainGatewayV3.roninChainId = 2021; + param.mainchainGatewayV3.numerator = 1; + param.mainchainGatewayV3.highTierVWNumerator = 10; + param.mainchainGatewayV3.denominator = 10; + + // Mainchain Bridge Manager + param.mainchainBridgeManager.num = 2; + param.mainchainBridgeManager.denom = 4; + param.mainchainBridgeManager.roninChainId = 2021; + param.mainchainBridgeManager.bridgeOperators = operatorAddrs; + param.mainchainBridgeManager.governors = governorAddrs; + param.mainchainBridgeManager.voteWeights = voteWeights; + param.mainchainBridgeManager.targetOptions = options; + param.mainchainBridgeManager.targets = targets; } else if (network() == DefaultNetwork.RoninTestnet.key()) { // Undefined } else if (network() == DefaultNetwork.Local.key()) { @@ -116,7 +163,6 @@ contract Migration is BaseMigrationV2, Utils { // Mainchain Bridge Manager param.mainchainBridgeManager.num = 2; param.mainchainBridgeManager.denom = 4; - param.mainchainBridgeManager.roninChainId = 0; param.mainchainBridgeManager.roninChainId = block.chainid; param.mainchainBridgeManager.bridgeOperators = operatorAddrs; param.mainchainBridgeManager.governors = governorAddrs; diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 8dbabc08..482fe386 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -124,8 +124,9 @@ contract BaseIntegration_Test is Base_Test { _roninMockERC721 = new MockERC721Deploy().run(); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); - _roninProposalUtils = - new RoninBridgeAdminUtils(_param.test.governorPKs, _roninBridgeManager, _param.roninBridgeManager.governors[0]); + _roninProposalUtils = new RoninBridgeAdminUtils( + block.chainid, _param.test.governorPKs, _roninBridgeManager, _param.roninBridgeManager.governors[0] + ); _validatorSet = new MockValidatorContract_OnlyTiming_ForHardhatTest(_param.test.numberOfBlocksInEpoch); } @@ -142,7 +143,7 @@ contract BaseIntegration_Test is Base_Test { _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); _mainchainProposalUtils = new MainchainBridgeAdminUtils( - _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] + block.chainid, _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] ); } diff --git a/test/helpers/MainchainBridgeAdminUtils.t.sol b/test/helpers/MainchainBridgeAdminUtils.t.sol index 55c534d0..1236f29b 100644 --- a/test/helpers/MainchainBridgeAdminUtils.t.sol +++ b/test/helpers/MainchainBridgeAdminUtils.t.sol @@ -8,7 +8,9 @@ contract MainchainBridgeAdminUtils is ProposalUtils { MainchainBridgeManager _contract; address _sender; - constructor(uint256[] memory signerPKs, MainchainBridgeManager contract_, address sender) ProposalUtils(signerPKs) { + constructor(uint256 roninChainId, uint256[] memory signerPKs, MainchainBridgeManager contract_, address sender) + ProposalUtils(roninChainId, signerPKs) + { _contract = contract_; _sender = sender; } diff --git a/test/helpers/ProposalUtils.t.sol b/test/helpers/ProposalUtils.t.sol index 4e06b0b5..c5f61e09 100644 --- a/test/helpers/ProposalUtils.t.sol +++ b/test/helpers/ProposalUtils.t.sol @@ -18,8 +18,15 @@ contract ProposalUtils is Utils, Test { uint256[] _signerPKs; bytes32 _domain; - constructor(uint256[] memory signerPKs) { - _domain = getBridgeManagerDomain(); + constructor(uint256 roninChainId, uint256[] memory signerPKs) { + _domain = keccak256( + abi.encode( + keccak256("EIP712Domain(string name,string version,bytes32 salt)"), + keccak256("BridgeAdmin"), // name hash + keccak256("2"), // version hash + keccak256(abi.encode("BRIDGE_ADMIN", roninChainId)) // salt + ) + );; for (uint256 i; i < signerPKs.length; i++) { _signerPKs.push(signerPKs[i]); @@ -117,14 +124,7 @@ contract ProposalUtils is Utils, Test { } function getBridgeManagerDomain() public view returns (bytes32) { - return keccak256( - abi.encode( - keccak256("EIP712Domain(string name,string version,bytes32 salt)"), - keccak256("BridgeAdmin"), // name hash - keccak256("2"), // version hash - keccak256(abi.encode("BRIDGE_ADMIN", block.chainid)) // salt - ) - ); + return _domain; } function generateSignaturesFor(bytes32 proposalHash, uint256[] memory signerPKs, Ballot.VoteType support) @@ -135,7 +135,7 @@ contract ProposalUtils is Utils, Test { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { - bytes32 digest = _domain.toTypedDataHash(Ballot.hash(proposalHash, support)); + bytes32 digest = ECDSA.toTypedDataHash(_domain, Ballot.hash(proposalHash, support)); sigs[i] = _sign(signerPKs[i], digest); } } diff --git a/test/helpers/RoninBridgeAdminUtils.t.sol b/test/helpers/RoninBridgeAdminUtils.t.sol index 1b65257d..dabec5e8 100644 --- a/test/helpers/RoninBridgeAdminUtils.t.sol +++ b/test/helpers/RoninBridgeAdminUtils.t.sol @@ -8,7 +8,9 @@ contract RoninBridgeAdminUtils is ProposalUtils { RoninBridgeManager _contract; address _sender; - constructor(uint256[] memory signerPKs, RoninBridgeManager contract_, address sender) ProposalUtils(signerPKs) { + constructor(uint256 roninChainId, uint256[] memory signerPKs, RoninBridgeManager contract_, address sender) + ProposalUtils(roninChainId, signerPKs) + { _contract = contract_; _sender = sender; } From a6986752225eb7a00fc4162762ad89a55cea74d7 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 2 Apr 2024 17:30:43 +0700 Subject: [PATCH 116/305] fix: set constant as internal --- src/libraries/GlobalProposal.sol | 2 +- src/libraries/Proposal.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/GlobalProposal.sol b/src/libraries/GlobalProposal.sol index cfe1319a..9d26debf 100644 --- a/src/libraries/GlobalProposal.sol +++ b/src/libraries/GlobalProposal.sol @@ -30,7 +30,7 @@ library GlobalProposal { } // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,bool loose,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); - bytes32 public constant TYPE_HASH = 0x8fdb3bc7211cb44f39a2cae84127672c4570a00720dfbf2bb58285070faa28da; + bytes32 internal constant TYPE_HASH = 0x8fdb3bc7211cb44f39a2cae84127672c4570a00720dfbf2bb58285070faa28da; /** * @dev Returns struct hash of the proposal. diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index abb4dd42..c5ede054 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -39,7 +39,7 @@ library Proposal { } // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,bool loose,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); - bytes32 public constant TYPE_HASH = 0x98e2bc443e89d620038081eb862bc4dd7a26e2eba7a2a87201642f9419340a57; + bytes32 internal constant TYPE_HASH = 0x98e2bc443e89d620038081eb862bc4dd7a26e2eba7a2a87201642f9419340a57; /** * @dev Validates the proposal. From 50ab2341de6ba35694b53f33b53a45d27c69b4fb Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 3 Apr 2024 21:09:16 +0700 Subject: [PATCH 117/305] fix(CoreGovernance): remove `_proposeProposal` --- .../sequential-governance/CoreGovernance.sol | 31 ------------------- src/ronin/gateway/RoninBridgeManager.sol | 25 +++++++++++---- 2 files changed, 19 insertions(+), 37 deletions(-) diff --git a/src/extensions/sequential-governance/CoreGovernance.sol b/src/extensions/sequential-governance/CoreGovernance.sol index 1415abb2..3abd7634 100644 --- a/src/extensions/sequential-governance/CoreGovernance.sol +++ b/src/extensions/sequential-governance/CoreGovernance.sol @@ -97,37 +97,6 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus _vote.expiryTimestamp = _expiryTimestamp; } - /** - * @dev Proposes for a new proposal. - * - * Requirements: - * - The chain id is not equal to 0. - * - * Emits the `ProposalCreated` event. - * - */ - function _proposeProposal( - uint256 chainId, - uint256 expiryTimestamp, - address executor, - bool loose, - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - uint256[] memory gasAmounts, - address creator - ) internal virtual returns (Proposal.ProposalDetail memory proposal) { - if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid); - uint256 round_ = _createVotingRound(chainId); - - proposal = Proposal.ProposalDetail(round_, chainId, expiryTimestamp, executor, loose, targets, values, calldatas, gasAmounts); - proposal.validate(_proposalExpiryDuration); - - bytes32 proposalHash = proposal.hash(); - _saveVotingRound(vote[chainId][round_], proposalHash, expiryTimestamp); - emit ProposalCreated(chainId, round_, proposalHash, proposal, creator); - } - /** * @dev Proposes proposal struct. * diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 4a4dac4c..f63bdeb4 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -53,7 +53,20 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan bytes[] calldata calldatas, uint256[] calldata gasAmounts ) external onlyGovernor { - _proposeProposal(chainId, expiryTimestamp, executor, loose, targets, values, calldatas, gasAmounts, msg.sender); + _proposeProposalStruct( + Proposal.ProposalDetail({ + nonce: _createVotingRound(block.chainid), + chainId: block.chainid, + expiryTimestamp: expiryTimestamp, + executor: executor, + loose: loose, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }), + msg.sender + ); } /** @@ -90,8 +103,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan uint256[] calldata gasAmounts, Ballot.VoteType support ) external onlyGovernor { - address _voter = msg.sender; - Proposal.ProposalDetail memory _proposal = _proposeProposal({ + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: _createVotingRound(block.chainid), chainId: block.chainid, expiryTimestamp: expiryTimestamp, executor: executor, @@ -99,10 +112,10 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan targets: targets, values: values, calldatas: calldatas, - gasAmounts: gasAmounts, - creator: _voter + gasAmounts: gasAmounts }); - _castProposalVoteForCurrentNetwork(_voter, _proposal, support); + _proposeProposalStruct(proposal, msg.sender); + _castProposalVoteForCurrentNetwork(msg.sender, proposal, support); } /** From c6c5cca5c0ba01a8d3d3211a5adfacbb03e08353 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 3 Apr 2024 21:16:59 +0700 Subject: [PATCH 118/305] fix: bring internal method into equiv external --- .../BridgeManagerCallbackRegister.sol | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index 0197e688..81b818bc 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -34,8 +34,14 @@ abstract contract BridgeManagerCallbackRegister is Initializable, IdentityGuard, /** * @inheritdoc IBridgeManagerCallbackRegister */ - function unregisterCallbacks(address[] calldata registers) external onlySelfCall returns (bool[] memory unregistereds) { - unregistereds = _unregisterCallbacks(registers); + function unregisterCallbacks(address[] calldata registers) external onlySelfCall nonDuplicate(registers) returns (bool[] memory unregistereds) { + uint256 length = registers.length; + unregistereds = new bool[](length); + EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters(); + + for (uint256 i; i < length; i++) { + unregistereds[i] = _callbackRegisters.remove(registers[i]); + } } /** @@ -69,21 +75,6 @@ abstract contract BridgeManagerCallbackRegister is Initializable, IdentityGuard, } } - /** - * @dev Internal function to unregister multiple callbacks from the bridge. - * @param registers The array of callback addresses to unregister. - * @return unregistereds An array indicating the success status of each unregistration. - */ - function _unregisterCallbacks(address[] memory registers) internal nonDuplicate(registers) returns (bool[] memory unregistereds) { - uint256 length = registers.length; - unregistereds = new bool[](length); - EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters(); - - for (uint256 i; i < length; i++) { - unregistereds[i] = _callbackRegisters.remove(registers[i]); - } - } - /** * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call. */ From 9b0f2a44b68eb679f872b0d35703f989a57c991f Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 3 Apr 2024 21:26:51 +0700 Subject: [PATCH 119/305] fix: remove local vars --- .../BridgeManagerCallbackRegister.sol | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index 81b818bc..163838bf 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -57,19 +57,17 @@ abstract contract BridgeManagerCallbackRegister is Initializable, IdentityGuard, * @return registereds An array indicating the success status of each registration. */ function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) returns (bool[] memory registereds) { - uint256 length = registers.length; - registereds = new bool[](length); - if (length == 0) return registereds; + registereds = new bool[](registers.length); + if (registers.length == 0) return registereds; EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters(); address register; - bytes4 callbackInterface = type(IBridgeManagerCallback).interfaceId; - for (uint256 i; i < length; i++) { + for (uint256 i; i < registers.length; i++) { register = registers[i]; _requireHasCode(register); - _requireSupportsInterface(register, callbackInterface); + _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId); registereds[i] = _callbackRegisters.add(register); } From d405fa660434428610d4098e0b542ef54381e180 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 3 Apr 2024 21:31:17 +0700 Subject: [PATCH 120/305] fix: remove deprecated methods, remove local vars --- .../BridgeManager.sol | 28 ++----------------- src/interfaces/bridge/IBridgeManager.sol | 28 ++----------------- 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index f3fa0c9c..31687a00 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -152,10 +152,9 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, */ function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) { BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - uint256 length = governors.length; - weights = new uint96[](length); + weights = new uint96[](governors.length); - for (uint256 i; i < length; i++) { + for (uint256 i; i < governors.length; i++) { weights[i] = $._governorWeight[governors[i]]; } } @@ -233,13 +232,6 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, removeds = _removeBridgeOperators(bridgeOperators); } - /** - * @inheritdoc IBridgeManager - */ - function updateBridgeOperator(address, /* currOperator */ address /* newOperator */ ) external view onlyGovernor { - revert("Not supported"); - } - /** * @dev Internal function to add bridge operators. * @@ -427,14 +419,6 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, return $._governors; } - /** - * @inheritdoc IBridgeManager - * @custom:deprecated Deprecated due to high gas consume in new design. - */ - function getBridgeOperatorOf(address[] memory /*governors*/ ) external pure returns (address[] memory /*bridgeOperators*/ ) { - revert("Deprecated method"); - } - /** * @inheritdoc IBridgeManager */ @@ -445,14 +429,6 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, return _getBridgeManagerStorage()._operators[idx]; } - /** - * @inheritdoc IBridgeManager - * @custom:deprecated Deprecated due to high gas consume in new design. - */ - function getGovernorsOf(address[] calldata /*bridgeOperators*/ ) external pure returns (address[] memory /*governors*/ ) { - revert("Deprecated method"); - } - /** * @inheritdoc IBridgeManager */ diff --git a/src/interfaces/bridge/IBridgeManager.sol b/src/interfaces/bridge/IBridgeManager.sol index aa057dac..a7ba8907 100644 --- a/src/interfaces/bridge/IBridgeManager.sol +++ b/src/interfaces/bridge/IBridgeManager.sol @@ -80,25 +80,14 @@ interface IBridgeManager is IBridgeManagerEvents { */ function getBridgeOperators() external view returns (address[] memory); - /** - * @dev Returns an array of bridge operators corresponding to governor addresses. - */ - function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_); - /** * @dev Returns the corresponding `operator` of a `governor`. */ function getOperatorOf(address governor) external view returns (address operator); - /** - * @dev Retrieves the governors corresponding to a given array of bridge operators. - */ - function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors); - /** * @dev Returns the corresponding `governor` of a `operator`. */ - function getGovernorOf(address operator) external view returns (address governor); /** @@ -182,19 +171,8 @@ interface IBridgeManager is IBridgeManagerEvents { function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds); /** - * @dev Governor updates their corresponding or operator address. - * - * Requirements: - * - The caller must be the governor of the operator that is requested changes. - * - * @param currOperator The address of the operator to update. - * @param newOperator The new address of the operator. + * @dev Self-call to update the minimum required governor. + * @param min The minimum number, this must not less than 3. */ - function updateBridgeOperator(address currOperator, address newOperator) external; - - /** - * @dev Self-call to update the minimum required governor. - * @param min The minimum number, this must not less than 3. - */ - function setMinRequiredGovernor(uint min) external; + function setMinRequiredGovernor(uint min) external; } From 3845d2fc6196aeeef36b97b32ed827743a1f1fec Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 3 Apr 2024 22:20:26 +0700 Subject: [PATCH 121/305] fix: reduce passed param among internal calls --- .../CommonGovernanceProposal.sol | 44 ++++++------ .../GlobalGovernanceProposal.sol | 33 +++------ .../GovernanceProposal.sol | 42 ++--------- .../CommonGovernanceRelay.sol | 69 +++++++++++-------- .../GlobalGovernanceRelay.sol | 4 +- .../governance-relay/GovernanceRelay.sol | 4 +- src/mainchain/MainchainBridgeManager.sol | 4 ++ src/ronin/gateway/RoninBridgeManager.sol | 12 +++- 8 files changed, 94 insertions(+), 118 deletions(-) diff --git a/src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol b/src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol index 469391f1..eb28ee72 100644 --- a/src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol +++ b/src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol @@ -16,46 +16,46 @@ abstract contract CommonGovernanceProposal is CoreGovernance { Proposal.ProposalDetail memory _proposal, Ballot.VoteType[] calldata _supports, Signature[] calldata _signatures, - bytes32 _forDigest, - bytes32 _againstDigest + bytes32 proposalHash ) internal { if (!(_supports.length != 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig); + bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For)); + bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against)); + uint256 _minimumForVoteWeight = _getMinimumVoteWeight(); uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1; address _lastSigner; - address _signer; - Signature calldata _sig; - bool _hasValidVotes; - for (uint256 _i; _i < _signatures.length; ) { + + for (uint256 _i; _i < _signatures.length;) { + Signature calldata _sig; + address _signer; _sig = _signatures[_i]; if (_supports[_i] == Ballot.VoteType.For) { _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s); } else if (_supports[_i] == Ballot.VoteType.Against) { _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s); - } else revert ErrUnsupportedVoteType(msg.sig); + } else { + revert ErrUnsupportedVoteType(msg.sig); + } if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig); _lastSigner = _signer; uint256 _weight = _getWeight(_signer); - if (_weight > 0) { - _hasValidVotes = true; - if ( - _castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight) - ) { - return; - } + + if (_weight == 0) revert ErrInvalidSignatures(msg.sig); + + if (_castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)) { + return; } unchecked { ++_i; } } - - if (!_hasValidVotes) revert ErrInvalidSignatures(msg.sig); } /** @@ -67,11 +67,7 @@ abstract contract CommonGovernanceProposal is CoreGovernance { function _getProposalSignatures( uint256 _chainId, uint256 _round - ) - internal - view - returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) - { + ) internal view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) { ProposalVote storage _vote = vote[_chainId][_round]; uint256 _forLength = _vote.forVoteds.length; @@ -81,7 +77,7 @@ abstract contract CommonGovernanceProposal is CoreGovernance { _supports = new Ballot.VoteType[](_voterLength); _signatures = new Signature[](_voterLength); _voters = new address[](_voterLength); - for (uint256 _i; _i < _forLength; ) { + for (uint256 _i; _i < _forLength;) { _supports[_i] = Ballot.VoteType.For; _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]]; _voters[_i] = _vote.forVoteds[_i]; @@ -90,7 +86,7 @@ abstract contract CommonGovernanceProposal is CoreGovernance { ++_i; } } - for (uint256 _i; _i < _againstLength; ) { + for (uint256 _i; _i < _againstLength;) { _supports[_i + _forLength] = Ballot.VoteType.Against; _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]]; _voters[_i + _forLength] = _vote.againstVoteds[_i]; @@ -112,4 +108,6 @@ abstract contract CommonGovernanceProposal is CoreGovernance { * @dev Returns the weight of a governor. */ function _getWeight(address _governor) internal view virtual returns (uint256); + + function _proposalDomainSeparator() internal view virtual returns (bytes32); } diff --git a/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol b/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol index 7f3494cc..83c8bb39 100644 --- a/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol +++ b/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol @@ -20,14 +20,7 @@ abstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovern address creator ) internal returns (Proposal.ProposalDetail memory proposal) { proposal = _proposeGlobalStruct(globalProposal, creator); - bytes32 _globalProposalHash = globalProposal.hash(); - _castVotesBySignatures( - proposal, - supports_, - signatures, - ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.For)), - ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.Against)) - ); + _castVotesBySignatures(proposal, supports_, signatures, globalProposal.hash()); } /** @@ -39,30 +32,24 @@ abstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovern Signature[] calldata signatures, bytes32 domainSeparator ) internal { - Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail( - _resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }) - ); + Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })); bytes32 proposalHash = _proposal.hash(); - if (vote[0][_proposal.nonce].hash != proposalHash) + if (vote[0][_proposal.nonce].hash != proposalHash) { revert ErrInvalidProposal(proposalHash, vote[0][_proposal.nonce].hash); + } - bytes32 globalProposalHash = globalProposal.hash(); - _castVotesBySignatures( - _proposal, - supports_, - signatures, - ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(globalProposalHash, Ballot.VoteType.For)), - ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(globalProposalHash, Ballot.VoteType.Against)) - ); + _castVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash()); } /** * @dev See {CommonGovernanceProposal-_getProposalSignatures} */ - function getGlobalProposalSignatures( - uint256 round_ - ) external view returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures) { + function getGlobalProposalSignatures(uint256 round_) + external + view + returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures) + { return _getProposalSignatures(0, round_); } diff --git a/src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol b/src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol index 47064e95..7e9d75ec 100644 --- a/src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol +++ b/src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol @@ -18,14 +18,7 @@ abstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal address _creator ) internal { _proposeProposalStruct(_proposal, _creator); - bytes32 _proposalHash = _proposal.hash(); - _castVotesBySignatures( - _proposal, - _supports, - _signatures, - ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)), - ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against)) - ); + _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash()); } /** @@ -43,41 +36,24 @@ abstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal revert ErrInvalidProposal(_proposalHash, vote[_proposal.chainId][_proposal.nonce].hash); } - _castVotesBySignatures( - _proposal, - _supports, - _signatures, - ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)), - ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against)) - ); + _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash()); } /** * @dev See `castProposalVoteForCurrentNetwork`. */ - function _castProposalVoteForCurrentNetwork( - address _voter, - Proposal.ProposalDetail memory _proposal, - Ballot.VoteType _support - ) internal { + function _castProposalVoteForCurrentNetwork(address _voter, Proposal.ProposalDetail memory _proposal, Ballot.VoteType _support) internal { if (_proposal.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid); bytes32 proposalHash = _proposal.hash(); - if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash) + if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash) { revert ErrInvalidProposal(proposalHash, vote[_proposal.chainId][_proposal.nonce].hash); + } uint256 _minimumForVoteWeight = _getMinimumVoteWeight(); uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1; Signature memory _emptySignature; - _castVote( - _proposal, - _support, - _minimumForVoteWeight, - _minimumAgainstVoteWeight, - _voter, - _emptySignature, - _getWeight(_voter) - ); + _castVote(_proposal, _support, _minimumForVoteWeight, _minimumAgainstVoteWeight, _voter, _emptySignature, _getWeight(_voter)); } /** @@ -86,11 +62,7 @@ abstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal function getProposalSignatures( uint256 _chainId, uint256 _round - ) - external - view - returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) - { + ) external view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) { return _getProposalSignatures(_chainId, _round); } diff --git a/src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol b/src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol index 35bc7c52..4ccd2838 100644 --- a/src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol +++ b/src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol @@ -17,46 +17,53 @@ abstract contract CommonGovernanceRelay is CoreGovernance { Proposal.ProposalDetail memory _proposal, Ballot.VoteType[] calldata _supports, Signature[] calldata _signatures, - bytes32 _forDigest, - bytes32 _againstDigest + bytes32 proposalHash ) internal { if (!(_supports.length > 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig); - uint256 _forVoteCount; - uint256 _againstVoteCount; + bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For)); + bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against)); + address[] memory _forVoteSigners = new address[](_signatures.length); address[] memory _againstVoteSigners = new address[](_signatures.length); { - address _signer; - address _lastSigner; - Ballot.VoteType _support; - Signature calldata _sig; - - for (uint256 _i; _i < _signatures.length; ) { - _sig = _signatures[_i]; - _support = _supports[_i]; - - if (_support == Ballot.VoteType.For) { - _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s); - _forVoteSigners[_forVoteCount++] = _signer; - } else if (_support == Ballot.VoteType.Against) { - _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s); - _againstVoteSigners[_againstVoteCount++] = _signer; - } else revert ErrUnsupportedVoteType(msg.sig); - - if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig); - _lastSigner = _signer; - - unchecked { - ++_i; + uint256 _forVoteCount; + uint256 _againstVoteCount; + + { + address _signer; + address _lastSigner; + Ballot.VoteType _support; + Signature calldata _sig; + + for (uint256 _i; _i < _signatures.length;) { + _sig = _signatures[_i]; + _support = _supports[_i]; + + if (_support == Ballot.VoteType.For) { + _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s); + _forVoteSigners[_forVoteCount++] = _signer; + } else if (_support == Ballot.VoteType.Against) { + _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s); + _againstVoteSigners[_againstVoteCount++] = _signer; + } else { + revert ErrUnsupportedVoteType(msg.sig); + } + + if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig); + _lastSigner = _signer; + + unchecked { + ++_i; + } } } - } - assembly { - mstore(_forVoteSigners, _forVoteCount) - mstore(_againstVoteSigners, _againstVoteCount) + assembly { + mstore(_forVoteSigners, _forVoteCount) + mstore(_againstVoteSigners, _againstVoteCount) + } } ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce]; @@ -86,4 +93,6 @@ abstract contract CommonGovernanceRelay is CoreGovernance { * @dev Returns the weight of the governor list. */ function _sumWeight(address[] memory _governors) internal view virtual returns (uint256); + + function _proposalDomainSeparator() internal view virtual returns (bytes32); } diff --git a/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol b/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol index ec0a4c8d..b6d283c3 100644 --- a/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol +++ b/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol @@ -29,13 +29,11 @@ abstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGove address creator ) internal { Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator); - bytes32 globalProposalHash = globalProposal.hash(); _relayVotesBySignatures( _proposal, supports_, signatures, - ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(globalProposalHash, Ballot.VoteType.For)), - ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(globalProposalHash, Ballot.VoteType.Against)) + globalProposal.hash() ); } } diff --git a/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol b/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol index 58b11f2c..9349d1ee 100644 --- a/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol +++ b/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol @@ -23,13 +23,11 @@ abstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay { address _creator ) internal { _proposeProposalStruct(_proposal, _creator); - bytes32 _proposalHash = _proposal.hash(); _relayVotesBySignatures( _proposal, _supports, _signatures, - ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)), - ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against)) + _proposal.hash() ); } } diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index 60f4bb7e..16947c5b 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -105,4 +105,8 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna function _getChainType() internal pure override returns (ChainType) { return ChainType.Mainchain; } + + function _proposalDomainSeparator() internal view override returns (bytes32) { + return DOMAIN_SEPARATOR; + } } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index f63bdeb4..c251acd0 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -2,7 +2,13 @@ pragma solidity ^0.8.0; import { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from "../../extensions/bridge-operator-governance/BridgeManager.sol"; -import { Ballot, GlobalProposal, Proposal, GovernanceProposal } from "../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol"; +import { + Ballot, + GlobalProposal, + Proposal, + CommonGovernanceProposal, + GovernanceProposal +} from "../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol"; import { CoreGovernance, GlobalCoreGovernance, @@ -271,4 +277,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan function _getWeight(address _governor) internal view virtual override returns (uint256) { return _getGovernorWeight(_governor); } + + function _proposalDomainSeparator() internal view override returns (bytes32) { + return DOMAIN_SEPARATOR; + } } From 3537623676878dcb2ee1175f731d4ff0dff4ef13 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 10:24:00 +0700 Subject: [PATCH 122/305] fix: remove `loose`, proposal is always loose --- .../GlobalCoreGovernance.sol | 3 +-- .../GlobalGovernanceProposal.sol | 4 ++-- src/libraries/GlobalProposal.sol | 16 ++++++-------- src/libraries/Proposal.sol | 21 +++++++------------ src/ronin/gateway/RoninBridgeManager.sol | 6 ------ 5 files changed, 17 insertions(+), 33 deletions(-) diff --git a/src/extensions/sequential-governance/GlobalCoreGovernance.sol b/src/extensions/sequential-governance/GlobalCoreGovernance.sol index 585fe6a6..6ebd9940 100644 --- a/src/extensions/sequential-governance/GlobalCoreGovernance.sol +++ b/src/extensions/sequential-governance/GlobalCoreGovernance.sol @@ -43,7 +43,6 @@ abstract contract GlobalCoreGovernance is CoreGovernance { uint256 expiryTimestamp, GlobalProposal.TargetOption[] calldata targetOptions, address executor, - bool loose, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts, @@ -51,7 +50,7 @@ abstract contract GlobalCoreGovernance is CoreGovernance { ) internal virtual { uint256 round_ = _createVotingRound(0); GlobalProposal.GlobalProposalDetail memory globalProposal = - GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, loose, targetOptions, values, calldatas, gasAmounts); + GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts); Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true })); proposal.validate(_proposalExpiryDuration); diff --git a/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol b/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol index 83c8bb39..23c14008 100644 --- a/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol +++ b/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol @@ -10,7 +10,7 @@ abstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovern using GlobalProposal for GlobalProposal.GlobalProposalDetail; /** - * @dev Proposes and votes by signature. + * @dev Proposes and casts votes for a global proposal by signatures. */ function _proposeGlobalProposalStructAndCastVotes( GlobalProposal.GlobalProposalDetail calldata globalProposal, @@ -24,7 +24,7 @@ abstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovern } /** - * @dev Proposes a global proposal struct and casts votes by signature. + * @dev Casts votes for a global proposal by signatures. */ function _castGlobalProposalBySignatures( GlobalProposal.GlobalProposalDetail calldata globalProposal, diff --git a/src/libraries/GlobalProposal.sol b/src/libraries/GlobalProposal.sol index 9d26debf..823c8df7 100644 --- a/src/libraries/GlobalProposal.sol +++ b/src/libraries/GlobalProposal.sol @@ -22,14 +22,13 @@ library GlobalProposal { uint256 nonce; uint256 expiryTimestamp; address executor; - bool loose; TargetOption[] targetOptions; uint256[] values; bytes[] calldatas; uint256[] gasAmounts; } - // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,bool loose,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); + // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); bytes32 internal constant TYPE_HASH = 0x8fdb3bc7211cb44f39a2cae84127672c4570a00720dfbf2bb58285070faa28da; /** @@ -57,7 +56,6 @@ library GlobalProposal { * proposal.nonce, * proposal.expiryTimestamp, * proposal.executor, - * proposal.loose, * targetsHash, * valuesHash, * calldatasHash, @@ -71,18 +69,17 @@ library GlobalProposal { mstore(add(ptr, 0x20), mload(self)) // proposal.nonce mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor - mstore(add(ptr, 0x80), mload(add(self, 0x60))) // proposal.loose let arrayHashed arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash - mstore(add(ptr, 0xa0), arrayHashed) + mstore(add(ptr, 0x80), arrayHashed) arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash - mstore(add(ptr, 0xc0), arrayHashed) + mstore(add(ptr, 0xa0), arrayHashed) arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash - mstore(add(ptr, 0xe0), arrayHashed) + mstore(add(ptr, 0xc0), arrayHashed) arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash - mstore(add(ptr, 0x100), arrayHashed) - digest_ := keccak256(ptr, 0x120) + mstore(add(ptr, 0xe0), arrayHashed) + digest_ := keccak256(ptr, 0x100) } } @@ -94,7 +91,6 @@ library GlobalProposal { detail_.chainId = 0; detail_.expiryTimestamp = self.expiryTimestamp; detail_.executor = self.executor; - detail_.loose = self.loose; detail_.targets = new address[](self.targetOptions.length); detail_.values = self.values; diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index c5ede054..b6aca9d8 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -15,7 +15,7 @@ library Proposal { error ErrInvalidExpiryTimestamp(); /** - * @dev Error thrown when the loose proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`. + * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`. */ error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg); @@ -29,16 +29,13 @@ library Proposal { // The address that execute the proposal after the proposal passes. // Leave this address as address(0) to auto-execute by the last valid vote. address executor; - // A `loose` proposal will revert the whole proposal if encounter one internal failed. - // A non-`loose` proposal will ignore the failed internal calls. - bool loose; address[] targets; uint256[] values; bytes[] calldatas; uint256[] gasAmounts; } - // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,bool loose,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); + // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); bytes32 internal constant TYPE_HASH = 0x98e2bc443e89d620038081eb862bc4dd7a26e2eba7a2a87201642f9419340a57; /** @@ -80,7 +77,6 @@ library Proposal { // proposal.chainId, // proposal.expiryTimestamp // proposal.executor - // proposal.loose // targetsHash, // valuesHash, // calldatasHash, @@ -95,18 +91,17 @@ library Proposal { mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor - mstore(add(ptr, 0xa0), mload(add(proposal, 0x80))) // proposal.loose let arrayHashed arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash - mstore(add(ptr, 0xc0), arrayHashed) + mstore(add(ptr, 0xa0), arrayHashed) arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash - mstore(add(ptr, 0xe0), arrayHashed) + mstore(add(ptr, 0xc0), arrayHashed) arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash - mstore(add(ptr, 0x100), arrayHashed) + mstore(add(ptr, 0xe0), arrayHashed) arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash - mstore(add(ptr, 0x120), arrayHashed) - digest_ := keccak256(ptr, 0x140) + mstore(add(ptr, 0x100), arrayHashed) + digest_ := keccak256(ptr, 0x120) } } @@ -140,7 +135,7 @@ library Proposal { (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]); - if (!proposal.loose && !successCalls[i]) { + if (!successCalls[i]) { revert ErrLooseProposalInternallyRevert(i, returnDatas[i]); } } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index c251acd0..4b05bf01 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -53,7 +53,6 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan uint256 chainId, uint256 expiryTimestamp, address executor, - bool loose, address[] calldata targets, uint256[] calldata values, bytes[] calldata calldatas, @@ -65,7 +64,6 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan chainId: block.chainid, expiryTimestamp: expiryTimestamp, executor: executor, - loose: loose, targets: targets, values: values, calldatas: calldatas, @@ -102,7 +100,6 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan function proposeProposalForCurrentNetwork( uint256 expiryTimestamp, address executor, - bool loose, address[] calldata targets, uint256[] calldata values, bytes[] calldata calldatas, @@ -114,7 +111,6 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan chainId: block.chainid, expiryTimestamp: expiryTimestamp, executor: executor, - loose: loose, targets: targets, values: values, calldatas: calldatas, @@ -156,7 +152,6 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan function proposeGlobal( uint256 expiryTimestamp, address executor, - bool loose, GlobalProposal.TargetOption[] calldata targetOptions, uint256[] calldata values, bytes[] calldata calldatas, @@ -165,7 +160,6 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan _proposeGlobal({ expiryTimestamp: expiryTimestamp, executor: executor, - loose: loose, targetOptions: targetOptions, values: values, calldatas: calldatas, From 9c8114d2efb1a63a2dc2b6e13ff1630982921c83 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 10:44:38 +0700 Subject: [PATCH 123/305] fix: impl one `_findInStorageArray` --- .../BridgeManager.sol | 35 +++++-------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index 31687a00..65f3f1e4 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.23; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; -import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { IBridgeManagerCallback, BridgeManagerCallbackRegister } from "./BridgeManagerCallbackRegister.sol"; import { IHasContracts, HasContracts } from "../../extensions/collections/HasContracts.sol"; @@ -16,7 +15,6 @@ import "./BridgeManagerQuorum.sol"; abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, BridgeManagerQuorum, BridgeManagerCallbackRegister { using AddressArrayUtils for address[]; - using EnumerableSet for EnumerableSet.AddressSet; struct BridgeManagerStorage { /// @notice List of the governors. @@ -361,23 +359,9 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, emit BridgeOperatorsRemoved(removeds, removingOperators); } - function _findOperatorInArray(address addr) internal view returns (bool found, uint idx) { - BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - - for (uint i; i < $._operators.length; i++) { - if (addr == $._operators[i]) { - return (true, i); - } - } - - return (false, type(uint256).max); - } - - function _findGovernorInArray(address addr) internal view returns (bool found, uint idx) { - BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - - for (uint i; i < $._governors.length; i++) { - if (addr == $._governors[i]) { + function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) { + for (uint i; i < $_array.length; i++) { + if (addr == $_array[i]) { return (true, i); } } @@ -391,8 +375,7 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, * @inheritdoc IBridgeManager */ function totalBridgeOperator() external view returns (uint256) { - BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - return $._operators.length; + return _getBridgeManagerStorage()._operators.length; } /** @@ -407,23 +390,21 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, * @inheritdoc IBridgeManager */ function getBridgeOperators() external view returns (address[] memory) { - BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - return $._operators; + return _getBridgeManagerStorage()._operators; } /** * @inheritdoc IBridgeManager */ function getGovernors() external view returns (address[] memory) { - BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - return $._governors; + return _getBridgeManagerStorage()._governors; } /** * @inheritdoc IBridgeManager */ function getOperatorOf(address governor) external view returns (address operator) { - (bool found, uint idx) = _findGovernorInArray(governor); + (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor); if (!found) revert ErrGovernorNotFound(governor); return _getBridgeManagerStorage()._operators[idx]; @@ -437,7 +418,7 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, } function _getGovernorOf(address operator) internal view returns (address governor, uint idx) { - (bool found, uint foundId) = _findOperatorInArray(operator); + (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator); if (!found) revert ErrOperatorNotFound(operator); return (_getBridgeManagerStorage()._governors[foundId], foundId); From ea04a8ee9c2529818108fe2c6e4ea9f3b119bfae Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 10:44:53 +0700 Subject: [PATCH 124/305] fix: split out initialize --- src/ronin/gateway/RoninBridgeManager.sol | 18 ----- .../gateway/RoninBridgeManagerConstructor.sol | 78 +++++++++++++++++++ 2 files changed, 78 insertions(+), 18 deletions(-) create mode 100644 src/ronin/gateway/RoninBridgeManagerConstructor.sol diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 4b05bf01..4549a59c 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -20,24 +20,6 @@ import "../../utils/CommonErrors.sol"; contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal { using Proposal for Proposal.ProposalDetail; - function initialize( - uint256 num, - uint256 denom, - uint256 roninChainId, - uint256 expiryDuration, - address bridgeContract, - address[] memory callbackRegisters, - address[] memory bridgeOperators, - address[] memory governors, - uint96[] memory voteWeights, - GlobalProposal.TargetOption[] memory targetOptions, - address[] memory targets - ) external initializer { - __CoreGovernance_init(expiryDuration); - __GlobalCoreGovernance_init(targetOptions, targets); - __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); - } - /** * CURRENT NETWORK */ diff --git a/src/ronin/gateway/RoninBridgeManagerConstructor.sol b/src/ronin/gateway/RoninBridgeManagerConstructor.sol new file mode 100644 index 00000000..0661de6e --- /dev/null +++ b/src/ronin/gateway/RoninBridgeManagerConstructor.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from "../../extensions/bridge-operator-governance/BridgeManager.sol"; +import { + Ballot, + GlobalProposal, + Proposal, + CommonGovernanceProposal, + GovernanceProposal +} from "../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol"; +import { + CoreGovernance, + GlobalCoreGovernance, + GlobalGovernanceProposal +} from "../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol"; +import { VoteStatusConsumer } from "../../interfaces/consumers/VoteStatusConsumer.sol"; +import "../../utils/CommonErrors.sol"; + +contract RoninBridgeManagerConstructor is BridgeManager, GovernanceProposal, GlobalGovernanceProposal { + using Proposal for Proposal.ProposalDetail; + + function initialize( + uint256 num, + uint256 denom, + uint256 roninChainId, + uint256 expiryDuration, + address bridgeContract, + address[] memory callbackRegisters, + address[] memory bridgeOperators, + address[] memory governors, + uint96[] memory voteWeights, + GlobalProposal.TargetOption[] memory targetOptions, + address[] memory targets + ) external initializer { + __CoreGovernance_init(expiryDuration); + __GlobalCoreGovernance_init(targetOptions, targets); + __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); + } + + + /** + * @dev Internal function to get the chain type of the contract. + * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain). + */ + function _getChainType() internal pure override returns (ChainType) { + return ChainType.RoninChain; + } + + /** + * @dev Internal function to get the total weights of all governors. + * @return The total weights of all governors combined. + */ + function _getTotalWeight() internal view virtual override returns (uint256) { + return getTotalWeight(); + } + + /** + * @dev Internal function to get the minimum vote weight required for governance actions. + * @return The minimum vote weight required for governance actions. + */ + function _getMinimumVoteWeight() internal view virtual override returns (uint256) { + return minimumVoteWeight(); + } + + /** + * @dev Internal function to get the vote weight of a specific governor. + * @param _governor The address of the governor to get the vote weight for. + * @return The vote weight of the specified governor. + */ + function _getWeight(address _governor) internal view virtual override returns (uint256) { + return _getGovernorWeight(_governor); + } + + function _proposalDomainSeparator() internal view override returns (bytes32) { + return DOMAIN_SEPARATOR; + } +} From 8409167490fab75e24324bf07f5fc4d290625097 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 10:55:24 +0700 Subject: [PATCH 125/305] fix: remove internal method `_executeGlobalWithCaller` --- .../GlobalCoreGovernance.sol | 15 ++------------- src/ronin/gateway/RoninBridgeManager.sol | 6 +++++- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/extensions/sequential-governance/GlobalCoreGovernance.sol b/src/extensions/sequential-governance/GlobalCoreGovernance.sol index 6ebd9940..7fcd4f21 100644 --- a/src/extensions/sequential-governance/GlobalCoreGovernance.sol +++ b/src/extensions/sequential-governance/GlobalCoreGovernance.sol @@ -83,11 +83,6 @@ abstract contract GlobalCoreGovernance is CoreGovernance { emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator); } - function _executeGlobalWithCaller(GlobalProposal.GlobalProposalDetail memory globalProposal, address caller) internal { - Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })); - _executeWithCaller(proposal, caller); - } - /** * @dev Returns corresponding address of target options. Return address(0) on non-existent target. */ @@ -103,12 +98,9 @@ abstract contract GlobalCoreGovernance is CoreGovernance { function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) { targets = new address[](targetOptions.length); - for (uint256 i; i < targetOptions.length;) { + for (uint256 i; i < targetOptions.length; ++i) { targets[i] = _targetOptionsMap[targetOptions[i]]; if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig); - unchecked { - ++i; - } } } @@ -129,12 +121,9 @@ abstract contract GlobalCoreGovernance is CoreGovernance { * @dev Updates list of `targetOptions` to `targets`. */ function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal { - for (uint256 i; i < targetOptions.length;) { + for (uint256 i; i < targetOptions.length; ++i) { if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig); _updateTargetOption(targetOptions[i], targets[i]); - unchecked { - ++i; - } } } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 4549a59c..8b8ce4f5 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -19,6 +19,7 @@ import "../../utils/CommonErrors.sol"; contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal { using Proposal for Proposal.ProposalDetail; + using GlobalProposal for GlobalProposal.GlobalProposalDetail; /** * CURRENT NETWORK @@ -197,7 +198,10 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan * @dev See {GlobalCoreGovernance-_executeWithCaller}. */ function executeGlobal(GlobalProposal.GlobalProposalDetail calldata globalProposal) external { - _executeGlobalWithCaller(globalProposal, msg.sender); + _executeWithCaller({ + proposal: globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })), + caller: msg.sender + }); } /** From bedbef46100272520f29f7632bc6847beaaff655 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 10:58:34 +0700 Subject: [PATCH 126/305] fix: remove internal `_getProposalExpiryDuration` --- src/extensions/sequential-governance/CoreGovernance.sol | 7 ------- src/mainchain/MainchainBridgeManager.sol | 2 +- src/ronin/gateway/RoninBridgeManager.sol | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/extensions/sequential-governance/CoreGovernance.sol b/src/extensions/sequential-governance/CoreGovernance.sol index 3abd7634..e0022668 100644 --- a/src/extensions/sequential-governance/CoreGovernance.sol +++ b/src/extensions/sequential-governance/CoreGovernance.sol @@ -261,13 +261,6 @@ abstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatus emit ProposalExpiryDurationChanged(expiryDuration); } - /** - * @dev Returns the expiry duration for a new proposal. - */ - function _getProposalExpiryDuration() internal view returns (uint256) { - return _proposalExpiryDuration; - } - /** * @dev Returns whether the voter casted for the proposal. */ diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index 16947c5b..821ee8aa 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -78,7 +78,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna * @dev Returns the expiry duration for a new proposal. */ function getProposalExpiryDuration() external view returns (uint256) { - return _getProposalExpiryDuration(); + return _proposalExpiryDuration; } /** diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 8b8ce4f5..f4d86701 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -222,7 +222,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan * @dev Returns the expiry duration for a new proposal. */ function getProposalExpiryDuration() external view returns (uint256) { - return _getProposalExpiryDuration(); + return _proposalExpiryDuration; } /** From f30fad5ce2e09415a229ac567a9697694dbdea06 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 10:59:47 +0700 Subject: [PATCH 127/305] config: add foundry profile runs 1 for RoninBridgeManager --- foundry.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/foundry.toml b/foundry.toml index 06eee488..ce1b284d 100644 --- a/foundry.toml +++ b/foundry.toml @@ -24,6 +24,10 @@ evm_version = 'istanbul' [profile.ethereum] evm_version = 'shanghai' +[profile.ronin.ronin_bridge_manager] +evm_version = 'istanbul' +optimizer_runs = 1 + [fmt] line_length = 160 tab_width = 2 From e37b01b30a5372c8e7aadf0cef0cb82209c18af8 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 11:07:32 +0700 Subject: [PATCH 128/305] test: remove `loose` in test setup --- .../20231218-maptoken-mainchain.s.sol | 9 +++------ test/bridge/integration/BaseIntegration.t.sol | 8 -------- ...or.proposeCurrent.RoninBridgeManager.t.sol | 4 ---- ...tor.proposeGlobal.RoninBridgeManager.t.sol | 4 ---- ....proposeMainchain.RoninBridgeManager.t.sol | 5 ----- ...r.relayGlobal.MainchainBridgeManager.t.sol | 4 ---- ...elayMainchain.MainchainBridgeManager.t.sol | 4 ---- .../proposeCurrent.RoninBridgeManager.t.sol | 5 ----- .../proposeGlobal.RoninBridgeManager.t.sol | 5 ----- .../relayGlobal.MainchainBridgeManager.t.sol | 5 ----- ...oteBridgeOperator.RoninBridgeManager.t.sol | 20 +++++-------------- test/helpers/MainchainBridgeAdminUtils.t.sol | 4 ---- test/helpers/ProposalUtils.t.sol | 4 ---- test/helpers/RoninBridgeAdminUtils.t.sol | 4 ---- 14 files changed, 8 insertions(+), 77 deletions(-) diff --git a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol index abc8901e..ac16b2e6 100644 --- a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol @@ -31,9 +31,7 @@ contract Migration__20231215_MapTokenMainchain is BridgeMigration { super.setUp(); _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress( - _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key() - ); + _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); } function run() public { @@ -64,8 +62,7 @@ contract Migration__20231215_MapTokenMainchain is BridgeMigration { // uint256[][4] calldata _thresholds // ) - bytes memory innerData = - abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); uint256 expiredTime = block.timestamp + 10 days; @@ -83,6 +80,6 @@ contract Migration__20231215_MapTokenMainchain is BridgeMigration { uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); vm.broadcast(sender()); - _roninBridgeManager.propose(chainId, expiredTime, address(0), false, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 672a4a2c..d2c84f31 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -318,7 +318,6 @@ contract BaseIntegration_Test is Base_Test { GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(GlobalCoreGovernance.updateManyTargetOption, (param.targetOptions, param.targets)), @@ -336,7 +335,6 @@ contract BaseIntegration_Test is Base_Test { GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, param.bridgeContract)), @@ -356,7 +354,6 @@ contract BaseIntegration_Test is Base_Test { GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: calldata_, @@ -375,7 +372,6 @@ contract BaseIntegration_Test is Base_Test { GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IBridgeManager.setMinRequiredGovernor, (_param.roninBridgeManager.minRequiredGovernor)), @@ -415,7 +411,6 @@ contract BaseIntegration_Test is Base_Test { GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(GlobalCoreGovernance.updateManyTargetOption, (param.targetOptions, param.targets)), @@ -433,7 +428,6 @@ contract BaseIntegration_Test is Base_Test { GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, param.bridgeContract)), @@ -453,7 +447,6 @@ contract BaseIntegration_Test is Base_Test { GlobalProposal.GlobalProposalDetail memory globalProposal = _mainchainProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: calldata_, @@ -472,7 +465,6 @@ contract BaseIntegration_Test is Base_Test { GlobalProposal.GlobalProposalDetail memory globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + 10, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IBridgeManager.setMinRequiredGovernor, (_param.roninBridgeManager.minRequiredGovernor)), diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeCurrent.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeCurrent.RoninBridgeManager.t.sol index 6acebfa4..2b23582e 100644 --- a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeCurrent.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeCurrent.RoninBridgeManager.t.sol @@ -63,7 +63,6 @@ contract ProposalWithExecutor_CurrentNetworkProposal_RoninBridgeManager_Test is _proposal.nonce = _roninBridgeManager.round(block.chainid) + 1; _proposal.chainId = block.chainid; _proposal.executor = address(0); - _proposal.loose = false; _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; _proposal.targets.push(address(_roninBridgeManager)); @@ -80,7 +79,6 @@ contract ProposalWithExecutor_CurrentNetworkProposal_RoninBridgeManager_Test is // Should the auto proposal executes on the last valid vote function test_autoProposal_strictProposal_WhenAllInternalCallsPass() public { - _proposal.loose = false; _proposal.executor = address(0); vm.expectEmit(false, true, true, true); @@ -114,7 +112,6 @@ contract ProposalWithExecutor_CurrentNetworkProposal_RoninBridgeManager_Test is // Should the non-auto proposal be execute by the specified executor function test_executorProposal_strictProposal_WhenAllInternalCallsPass() public { - _proposal.loose = false; _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success @@ -153,7 +150,6 @@ contract ProposalWithExecutor_CurrentNetworkProposal_RoninBridgeManager_Test is // Should the non-auto proposal can not be execute by other governor function test_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { - _proposal.loose = false; _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeGlobal.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeGlobal.RoninBridgeManager.t.sol index bf524b16..98aac58d 100644 --- a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeGlobal.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeGlobal.RoninBridgeManager.t.sol @@ -60,7 +60,6 @@ contract ProposalWithExecutor_GlobalProposal_RoninBridgeManager_Test is BaseInte _globalProposal.nonce = _roninBridgeManager.round(0) + 1; _globalProposal.executor = address(0); - _globalProposal.loose = false; _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); @@ -77,7 +76,6 @@ contract ProposalWithExecutor_GlobalProposal_RoninBridgeManager_Test is BaseInte // Should the auto proposal executes on the last valid vote function test_autoProposal_strictProposal_WhenAllInternalCallsPass() public { - _globalProposal.loose = false; _globalProposal.executor = address(0); vm.expectEmit(false, true, true, true); @@ -111,7 +109,6 @@ contract ProposalWithExecutor_GlobalProposal_RoninBridgeManager_Test is BaseInte // Should the non-auto proposal be execute by the specified executor function test_executorProposal_strictProposal_WhenAllInternalCallsPass() public { - _globalProposal.loose = false; _globalProposal.executor = _param.roninBridgeManager.governors[0]; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success @@ -150,7 +147,6 @@ contract ProposalWithExecutor_GlobalProposal_RoninBridgeManager_Test is BaseInte // Should the non-auto proposal can not be execute by other governor function test_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { - _globalProposal.loose = false; _globalProposal.executor = _param.roninBridgeManager.governors[0]; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol index 53467717..37b115e6 100644 --- a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol @@ -61,7 +61,6 @@ contract ProposalWithExecutor_MainchainProposal_RoninBridgeManager_Test is BaseI _proposal.nonce = _roninBridgeManager.round(block.chainid) + 1; _proposal.chainId = block.chainid; _proposal.executor = address(0); - _proposal.loose = false; _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; _proposal.targets.push(address(_mainchainBridgeManager)); // Test Relay @@ -78,7 +77,6 @@ contract ProposalWithExecutor_MainchainProposal_RoninBridgeManager_Test is BaseI // Should the proposal is approved but not executed on Ronin chain function test_proposeMainchain_autoProposal_looseProposal() public { - _proposal.loose = true; _proposal.executor = address(0); vm.expectEmit(false, true, true, true); @@ -104,7 +102,6 @@ contract ProposalWithExecutor_MainchainProposal_RoninBridgeManager_Test is BaseI // Should the non-auto proposal be execute by the specified executor function test_proposeMainchain_executorProposal_looseProposal_WhenAllInternalCallsPass() public { - _proposal.loose = true; _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success @@ -133,10 +130,8 @@ contract ProposalWithExecutor_MainchainProposal_RoninBridgeManager_Test is BaseI assertEq(_roninBridgeManager.getBridgeOperators(), _beforeRelayedOperators); } - // Should the non-auto proposal can not be execute by other governor function test_proposeMainchain_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { - _proposal.loose = false; _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol index fba61e10..c0a97047 100644 --- a/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol @@ -61,7 +61,6 @@ contract ProposalWithExecutor_GlobalProposal_MainchainBridgeManager_Test is Base _globalProposal.nonce = _mainchainBridgeManager.round(0) + 1; _globalProposal.executor = address(0); - _globalProposal.loose = false; _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); @@ -78,7 +77,6 @@ contract ProposalWithExecutor_GlobalProposal_MainchainBridgeManager_Test is Base // Should the auto proposal executes on the last valid vote function test_relayGlobal_autoProposal_strictProposal_WhenAllInternalCallsPass() public { - _globalProposal.loose = false; _globalProposal.executor = address(0); vm.expectEmit(false, false, false, false); @@ -110,7 +108,6 @@ contract ProposalWithExecutor_GlobalProposal_MainchainBridgeManager_Test is Base // Should the non-auto proposal be execute by the specified executor function test_relayGlobal_executorProposal_strictProposal_WhenAllInternalCallsPass() public { - _globalProposal.loose = false; _globalProposal.executor = _param.roninBridgeManager.governors[0]; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success @@ -142,7 +139,6 @@ contract ProposalWithExecutor_GlobalProposal_MainchainBridgeManager_Test is Base // Should the non-auto proposal can not be execute by other governor function test_relayGlobal_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { - _globalProposal.loose = false; _globalProposal.executor = _param.roninBridgeManager.governors[0]; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.relayMainchain.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayMainchain.MainchainBridgeManager.t.sol index 89818604..c06d6792 100644 --- a/test/bridge/integration/bridge-manager/proposal-executor/executor.relayMainchain.MainchainBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayMainchain.MainchainBridgeManager.t.sol @@ -62,7 +62,6 @@ contract ProposalWithExecutor_MainchainProposal_MainchainBridgeManager_Test is B _proposal.nonce = _mainchainBridgeManager.round(block.chainid) + 1; _proposal.chainId = block.chainid; _proposal.executor = address(0); - _proposal.loose = false; _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; _proposal.targets.push(address(_mainchainBridgeManager)); // Test Relay @@ -79,7 +78,6 @@ contract ProposalWithExecutor_MainchainProposal_MainchainBridgeManager_Test is B // Should the proposal is approved but not executed on Ronin chain function test_relayMainchain_autoProposal_looseProposal() public { - _proposal.loose = true; _proposal.executor = address(0); vm.expectEmit(false, false, false, false); @@ -101,7 +99,6 @@ contract ProposalWithExecutor_MainchainProposal_MainchainBridgeManager_Test is B // Should the non-auto proposal be relay by the specified executor function test_relayMainchain_executorProposal_looseProposal_WhenAllInternalCallsPass() public { - _proposal.loose = true; _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success @@ -124,7 +121,6 @@ contract ProposalWithExecutor_MainchainProposal_MainchainBridgeManager_Test is B // Should the non-auto proposal can not be execute by other governor function test_relayMainchain_executorProposal_revertWhen_proposalIsExecutedByAnotherGovernor() external { - _proposal.loose = false; _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol index 17ee78e1..daa8f3d8 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol @@ -59,7 +59,6 @@ contract LooseProposal_CurrentNetworkProposal_RoninBridgeManager_Test is BaseInt _proposal.nonce = _roninBridgeManager.round(block.chainid) + 1; _proposal.chainId = block.chainid; _proposal.executor = address(0); - _proposal.loose = false; _proposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; _proposal.targets.push(address(_roninBridgeManager)); @@ -76,7 +75,6 @@ contract LooseProposal_CurrentNetworkProposal_RoninBridgeManager_Test is BaseInt // Should the strict proposal failed when containing one failed internal call function test_strictProposal_revertWhen_containingOneFailedInternalCall() external { - _proposal.loose = false; _proposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, true, true, true); @@ -94,7 +92,6 @@ contract LooseProposal_CurrentNetworkProposal_RoninBridgeManager_Test is BaseInt // Should the strict proposal passes when all internal calls are valid function test_strictProposal_WhenAllInternalCallsPass() external { - _proposal.loose = false; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, true, true, true); @@ -114,7 +111,6 @@ contract LooseProposal_CurrentNetworkProposal_RoninBridgeManager_Test is BaseInt // Should the loose proposal passes when containing one failed internal call function test_looseProposal_WhenContainsOneInternalCallFailed() external { - _proposal.loose = true; _proposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, true, true, true); @@ -134,7 +130,6 @@ contract LooseProposal_CurrentNetworkProposal_RoninBridgeManager_Test is BaseInt // Should the loose proposal passes when all internal calls are valid function test_looseProposal_WhenAllInternalCallsPass() external { - _proposal.loose = true; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, true, true, true); diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol index d05a5156..1ab43f14 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol @@ -57,7 +57,6 @@ contract LooseProposal_GlobalProposal_RoninBridgeManager_Test is BaseIntegration _globalProposal.nonce = _roninBridgeManager.round(0) + 1; _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; _globalProposal.executor = address(0); - _globalProposal.loose = false; _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); _globalProposal.values.push(0); @@ -73,7 +72,6 @@ contract LooseProposal_GlobalProposal_RoninBridgeManager_Test is BaseIntegration // Should the strict proposal failed when containing one failed internal call function test_strictProposal_globalProposal_RoninSide_revertWhen_containingOneFailedInternalCall() external { - _globalProposal.loose = false; _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, true, true, true); @@ -91,7 +89,6 @@ contract LooseProposal_GlobalProposal_RoninBridgeManager_Test is BaseIntegration // Should the strict proposal passes when all internal calls are valid function test_strictProposal_globalProposal_RoninSide_WhenAllInternalCallsPass() external { - _globalProposal.loose = false; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, true, true, true); @@ -111,7 +108,6 @@ contract LooseProposal_GlobalProposal_RoninBridgeManager_Test is BaseIntegration // Should the loose proposal passes when containing one failed internal call function test_looseProposal_globalProposal_RoninSide_WhenContainsOneInternalCallFailed() external { - _globalProposal.loose = true; _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, true, true, true); @@ -131,7 +127,6 @@ contract LooseProposal_GlobalProposal_RoninBridgeManager_Test is BaseIntegration // Should the loose proposal passes when all internal calls are valid function test_looseProposal_globalProposal_RoninSide_WhenAllInternalCallsPass() external { - _globalProposal.loose = true; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, true, true, true); diff --git a/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol index b2375358..f842451f 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol @@ -59,7 +59,6 @@ contract LooseProposal_GlobalProposal_MainchainBridgeManager_Test is BaseIntegra _globalProposal.nonce = _mainchainBridgeManager.round(0) + 1; _globalProposal.expiryTimestamp = block.timestamp + _proposalExpiryDuration; _globalProposal.executor = address(0); - _globalProposal.loose = false; _globalProposal.targetOptions.push(GlobalProposal.TargetOption.BridgeManager); _globalProposal.values.push(0); @@ -75,7 +74,6 @@ contract LooseProposal_GlobalProposal_MainchainBridgeManager_Test is BaseIntegra // Should the strict proposal failed when containing one failed internal call function test_strictProposal_globalProposal_MainchainSide_revertWhen_containingOneFailedInternalCall() external { - _globalProposal.loose = false; _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, true, true, true); @@ -93,7 +91,6 @@ contract LooseProposal_GlobalProposal_MainchainBridgeManager_Test is BaseIntegra // Should the strict proposal passes when all internal calls are valid function test_strictProposal_globalProposal_MainchainSide_WhenAllInternalCallsPass() external { - _globalProposal.loose = false; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, false, false, false); @@ -115,7 +112,6 @@ contract LooseProposal_GlobalProposal_MainchainBridgeManager_Test is BaseIntegra // Should the loose proposal passes when containing one failed internal call function test_looseProposal_globalProposal_MainchainSide_WhenContainsOneInternalCallFailed() external { - _globalProposal.loose = true; _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, false, false, false); @@ -137,7 +133,6 @@ contract LooseProposal_GlobalProposal_MainchainBridgeManager_Test is BaseIntegra // Should the loose proposal passes when all internal calls are valid function test_looseProposal_globalProposal_MainchainSide_WhenAllInternalCallsPass() external { - _globalProposal.loose = true; _globalProposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success vm.expectEmit(false, false, false, false); diff --git a/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol index 48e96924..110d1070 100644 --- a/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol @@ -59,7 +59,6 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { _globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + _proposalExpiryDuration, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)), @@ -67,8 +66,7 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { nonce: _roninBridgeManager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = - _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); for (uint256 i; i < signatures.length; i++) { _signatures.push(signatures[i]); @@ -80,9 +78,7 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { vm.prank(_param.roninBridgeManager.governors[0]); _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); - assertEq( - _roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true - ); + assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); } @@ -106,9 +102,7 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { function test_RevertWhen_RelayAgain() public { test_relayAddBridgeOperator(); - vm.expectRevert( - abi.encodeWithSelector(ErrInvalidProposalNonce.selector, MainchainBridgeManager.relayGlobalProposal.selector) - ); + vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, MainchainBridgeManager.relayGlobalProposal.selector)); vm.prank(_param.mainchainBridgeManager.governors[0]); _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); @@ -122,7 +116,6 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { _globalProposal = _roninProposalUtils.createGlobalProposal({ expiryTimestamp: block.timestamp + _proposalExpiryDuration, executor: address(0), - loose: false, targetOption: GlobalProposal.TargetOption.BridgeManager, value: 0, calldata_: abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)), @@ -130,8 +123,7 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { nonce: _roninBridgeManager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = - _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _roninProposalUtils.generateSignaturesGlobal(_globalProposal, _param.test.governorPKs); for (uint256 i; i < signatures.length; i++) { _signatures.push(signatures[i]); @@ -143,9 +135,7 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { vm.prank(_param.roninBridgeManager.governors[0]); _roninBridgeManager.proposeGlobalProposalStructAndCastVotes(_globalProposal, _supports, _signatures); - assertEq( - _roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true - ); + assertEq(_roninBridgeManager.globalProposalVoted(_globalProposal.nonce, _param.roninBridgeManager.governors[0]), true); assertEq(_roninBridgeManager.getBridgeOperators(), _afterRelayedOperators); } diff --git a/test/helpers/MainchainBridgeAdminUtils.t.sol b/test/helpers/MainchainBridgeAdminUtils.t.sol index 322771c2..197ab666 100644 --- a/test/helpers/MainchainBridgeAdminUtils.t.sol +++ b/test/helpers/MainchainBridgeAdminUtils.t.sol @@ -21,7 +21,6 @@ contract MainchainBridgeAdminUtils is ProposalUtils { Proposal.ProposalDetail memory proposal = this.createProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), executor: address(0), - loose: false, target: to, value: 0, calldata_: abi.encodeWithSignature("functionDelegateCall(bytes)", data), @@ -43,7 +42,6 @@ contract MainchainBridgeAdminUtils is ProposalUtils { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), executor: address(0), - loose: false, targetOption: target, value: 0, calldata_: abi.encodeWithSignature("functionDelegateCall(bytes)", data), @@ -78,7 +76,6 @@ contract MainchainBridgeAdminUtils is ProposalUtils { nonce: _contract.round(0) + 1, expiryTimestamp: this.defaultExpiryTimestamp(), executor: address(0), - loose: false, targetOptions: targetOptions, values: values, calldatas: calldatas, @@ -99,7 +96,6 @@ contract MainchainBridgeAdminUtils is ProposalUtils { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), executor: address(0), - loose: false, targetOption: targetOption, value: 0, calldata_: abi.encodeWithSignature("upgradeTo(bytes)", data), diff --git a/test/helpers/ProposalUtils.t.sol b/test/helpers/ProposalUtils.t.sol index 38a9bc65..8affd389 100644 --- a/test/helpers/ProposalUtils.t.sol +++ b/test/helpers/ProposalUtils.t.sol @@ -29,7 +29,6 @@ contract ProposalUtils is Utils, Test { function createProposal( uint256 expiryTimestamp, address executor, - bool loose, address target, uint256 value, bytes memory calldata_, @@ -40,7 +39,6 @@ contract ProposalUtils is Utils, Test { nonce: nonce, chainId: block.chainid, executor: executor, - loose: loose, expiryTimestamp: expiryTimestamp, targets: wrapAddress(target), values: wrapUint(value), @@ -52,7 +50,6 @@ contract ProposalUtils is Utils, Test { function createGlobalProposal( uint256 expiryTimestamp, address executor, - bool loose, GlobalProposal.TargetOption targetOption, uint256 value, bytes memory calldata_, @@ -66,7 +63,6 @@ contract ProposalUtils is Utils, Test { nonce: nonce, expiryTimestamp: expiryTimestamp, executor: executor, - loose: loose, targetOptions: targetOptions, values: wrapUint(value), calldatas: wrapBytes(calldata_), diff --git a/test/helpers/RoninBridgeAdminUtils.t.sol b/test/helpers/RoninBridgeAdminUtils.t.sol index db703ab9..6489a7f3 100644 --- a/test/helpers/RoninBridgeAdminUtils.t.sol +++ b/test/helpers/RoninBridgeAdminUtils.t.sol @@ -21,7 +21,6 @@ contract RoninBridgeAdminUtils is ProposalUtils { Proposal.ProposalDetail memory proposal = this.createProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), executor: address(0), - loose: false, target: to, value: 0, calldata_: abi.encodeWithSignature("functionDelegateCall(bytes)", data), @@ -43,7 +42,6 @@ contract RoninBridgeAdminUtils is ProposalUtils { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), executor: address(0), - loose: false, targetOption: target, value: 0, calldata_: abi.encodeWithSignature("functionDelegateCall(bytes)", data), @@ -78,7 +76,6 @@ contract RoninBridgeAdminUtils is ProposalUtils { nonce: _contract.round(0) + 1, expiryTimestamp: this.defaultExpiryTimestamp(), executor: address(0), - loose: false, targetOptions: targetOptions, values: values, calldatas: calldatas, @@ -99,7 +96,6 @@ contract RoninBridgeAdminUtils is ProposalUtils { GlobalProposal.GlobalProposalDetail memory proposal = this.createGlobalProposal({ expiryTimestamp: this.defaultExpiryTimestamp(), executor: address(0), - loose: false, targetOption: targetOption, value: 0, calldata_: abi.encodeWithSignature("upgradeTo(bytes)", data), From 91c240ca79d4bfc4dde4c97a50512051abadf2b6 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 11:45:42 +0700 Subject: [PATCH 129/305] script: fix USDC decimal to 6 --- .../deploy-sepolia.s.sol | 3 ++- script/contracts/token/USDCDeploy.s.sol | 19 +++++++++++++++---- src/mocks/token/MockUSDC.sol | 19 +++++++++++++++++++ test/bridge/integration/BaseIntegration.t.sol | 5 +++-- test/helpers/ProposalUtils.t.sol | 2 +- 5 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 src/mocks/token/MockUSDC.sol diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index f20610fe..86272161 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -7,6 +7,7 @@ import { LibSharedAddress } from "foundry-deployment-kit/libraries/LibSharedAddr import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/ronin/gateway/PauseEnforcer.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; import { MockWrappedToken } from "@ronin/contracts/mocks/token/MockWrappedToken.sol"; @@ -40,7 +41,7 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { MockWrappedToken _mainchainWeth; MockERC20 _mainchainAxs; - MockERC20 _mainchainUsdc; + MockUSDC _mainchainUsdc; MockERC721 _mainchainMockERC721; MainchainBridgeAdminUtils _mainchainProposalUtils; diff --git a/script/contracts/token/USDCDeploy.s.sol b/script/contracts/token/USDCDeploy.s.sol index 5e519d8f..68ed58d9 100644 --- a/script/contracts/token/USDCDeploy.s.sol +++ b/script/contracts/token/USDCDeploy.s.sol @@ -1,16 +1,27 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; import { Contract } from "../../utils/Contract.sol"; import { ISharedArgument } from "../../interfaces/ISharedArgument.sol"; -import { MockERC20Deploy } from "./MockERC20Deploy.s.sol"; +import { Migration } from "../../Migration.s.sol"; -contract USDCDeploy is MockERC20Deploy { - function _arguments() internal virtual override returns (ISharedArgument.MockERC20Param memory) { +contract USDCDeploy is Migration { + function _defaultArguments() internal virtual override returns (bytes memory args) { + ISharedArgument.MockERC20Param memory param = _arguments(); + + args = abi.encode(param.name, param.symbol); + } + + function _arguments() internal virtual returns (ISharedArgument.MockERC20Param memory) { return config.sharedArguments().usdc; } - function _getContract() internal virtual override returns (Contract) { + function _getContract() internal returns (Contract) { return Contract.USDC; } + + function run() public virtual returns (MockUSDC) { + return MockUSDC(_deployImmutable(_getContract().key())); + } } diff --git a/src/mocks/token/MockUSDC.sol b/src/mocks/token/MockUSDC.sol new file mode 100644 index 00000000..d7c7cfe7 --- /dev/null +++ b/src/mocks/token/MockUSDC.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract MockUSDC is ERC20 { + constructor(string memory name, string memory symbol) ERC20(name, symbol) { } + + function mint(address to, uint256 amount) external { + _mint(to, amount); + } + + /** + * @dev USDC always have decimal is 6 + */ + function decimals() public pure override returns (uint8) { + return 6; + } +} diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 482fe386..d83ec976 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -16,6 +16,7 @@ import { BridgeSlash } from "@ronin/contracts/ronin/gateway/BridgeSlash.sol"; import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; @@ -76,13 +77,13 @@ contract BaseIntegration_Test is Base_Test { MockWrappedToken _roninWron; MockERC20 _roninAxs; MockERC20 _roninSlp; - MockERC20 _roninUsdc; + MockUSDC _roninUsdc; MockERC721 _roninMockERC721; MockWrappedToken _mainchainWeth; MockERC20 _mainchainAxs; MockERC20 _mainchainSlp; - MockERC20 _mainchainUsdc; + MockUSDC _mainchainUsdc; MockERC721 _mainchainMockERC721; MockValidatorContract_OnlyTiming_ForHardhatTest _validatorSet; diff --git a/test/helpers/ProposalUtils.t.sol b/test/helpers/ProposalUtils.t.sol index c5f61e09..bac3abaa 100644 --- a/test/helpers/ProposalUtils.t.sol +++ b/test/helpers/ProposalUtils.t.sol @@ -26,7 +26,7 @@ contract ProposalUtils is Utils, Test { keccak256("2"), // version hash keccak256(abi.encode("BRIDGE_ADMIN", roninChainId)) // salt ) - );; + ); for (uint256 i; i < signerPKs.length; i++) { _signerPKs.push(signerPKs[i]); From 11c22c9cbbfb6d8078eb007dffa794d8dfff4ab9 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 15:44:34 +0700 Subject: [PATCH 130/305] script: grand fund for gateway --- .../deploy-sepolia.s.sol | 98 ++++++++++++++----- script/contracts/token/USDCDeploy.s.sol | 2 +- 2 files changed, 76 insertions(+), 24 deletions(-) diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 86272161..c462642f 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -42,6 +42,7 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { MockWrappedToken _mainchainWeth; MockERC20 _mainchainAxs; MockUSDC _mainchainUsdc; + MockERC20 _mainchainSlp; MockERC721 _mainchainMockERC721; MainchainBridgeAdminUtils _mainchainProposalUtils; @@ -59,9 +60,14 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { } function run() public onlyOn(Network.Sepolia.key()) { + vm.startBroadcast(0x55ba00EeB8D8d33Df1b1985459D310b9CAfB19f2); + payable(sender()).transfer(5 ether); + vm.stopBroadcast(); + _deployContractsOnMainchain(); _mainchainGatewayV3Initialize(); _correctGVs(); + _grantFundForGateway(); } function _deployContractsOnMainchain() internal { @@ -72,6 +78,7 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { _mainchainWeth = new WETHDeploy().run(); _mainchainAxs = new AXSDeploy().run(); _mainchainUsdc = new USDCDeploy().run(); + _mainchainSlp = new SLPDeploy().run(); _mainchainMockERC721 = new MockERC721Deploy().run(); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); @@ -81,23 +88,15 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { } function _mainchainGatewayV3Initialize() internal { - (address[] memory mainchainTokens, address[] memory roninTokens) = _getMainchainAndRoninTokens(); - uint256 tokenNum = mainchainTokens.length; - uint256[] memory highTierThreshold = new uint256[](tokenNum); - uint256[] memory lockedThreshold = new uint256[](tokenNum); - uint256[] memory unlockFeePercentages = new uint256[](tokenNum); - uint256[] memory dailyWithdrawalLimits = new uint256[](tokenNum); - Token.Standard[] memory standards = new Token.Standard[](tokenNum); - - for (uint256 i; i < tokenNum; i++) { - bool isERC721 = i == mainchainTokens.length - 1; // last item is ERC721 - - highTierThreshold[i] = 10; - lockedThreshold[i] = 20; - unlockFeePercentages[i] = 100_000; - dailyWithdrawalLimits[i] = 12; - standards[i] = isERC721 ? Token.Standard.ERC721 : Token.Standard.ERC20; - } + ( + address[] memory mainchainTokens, + address[] memory roninTokens, + uint256[] memory highTierThreshold, + uint256[] memory lockedThreshold, + uint256[] memory unlockFeePercentages, + uint256[] memory dailyWithdrawalLimits, + Token.Standard[] memory standards + ) = _getMainchainAndRoninTokens(); // Mainchain Gateway V3 _param.mainchainGatewayV3.wrappedToken = address(_mainchainWeth); @@ -173,20 +172,73 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { function _getMainchainAndRoninTokens() internal view - returns (address[] memory mainchainTokens, address[] memory roninTokens) + returns ( + address[] memory mainchainTokens, + address[] memory roninTokens, + uint256[] memory highTierThreshold, + uint256[] memory lockedThreshold, + uint256[] memory unlockFeePercentages, + uint256[] memory dailyWithdrawalLimits, + Token.Standard[] memory standards + ) { uint256 tokenNum = 5; mainchainTokens = new address[](tokenNum); roninTokens = new address[](tokenNum); + highTierThreshold = new uint256[](tokenNum); + lockedThreshold = new uint256[](tokenNum); + unlockFeePercentages = new uint256[](tokenNum); + dailyWithdrawalLimits = new uint256[](tokenNum); + standards = new Token.Standard[](tokenNum); mainchainTokens[0] = address(_mainchainWeth); + roninTokens[0] = address(0x29C6F8349A028E1bdfC68BFa08BDee7bC5D47E16); + highTierThreshold[0] = 0.0007 * 1e18; + lockedThreshold[0] = 0.0001 * 1e18; + dailyWithdrawalLimits[0] = 0.0003 * 1e18; + unlockFeePercentages[0] = 100_000; + standards[0] = Token.Standard.ERC20; + mainchainTokens[1] = address(_mainchainAxs); - mainchainTokens[2] = address(_mainchainUsdc); - mainchainTokens[3] = address(_mainchainMockERC721); + roninTokens[1] = address(0x3C4e17b9056272Ce1b49F6900d8cFD6171a1869d); + highTierThreshold[1] = 90 * 1e18; + lockedThreshold[1] = 40 * 1e18; + dailyWithdrawalLimits[1] = 100 * 1e18; + unlockFeePercentages[1] = 100_000; + standards[1] = Token.Standard.ERC20; - roninTokens[0] = address(0x00); - roninTokens[1] = address(0x00); + mainchainTokens[2] = address(_mainchainUsdc); roninTokens[2] = address(0x067FBFf8990c58Ab90BaE3c97241C5d736053F77); - roninTokens[3] = address(0x00); + highTierThreshold[2] = 900 * 1e6; + lockedThreshold[2] = 400 * 1e6; + dailyWithdrawalLimits[2] = 1000 * 1e6; + unlockFeePercentages[2] = 100_000; + standards[2] = Token.Standard.ERC20; + + mainchainTokens[3] = address(_mainchainSlp); + roninTokens[3] = address(0x82f5483623D636BC3deBA8Ae67E1751b6CF2Bad2); + highTierThreshold[3] = 90 * 1e18; + lockedThreshold[3] = 40 * 1e18; + dailyWithdrawalLimits[3] = 100 * 1e18; + unlockFeePercentages[3] = 100_000; + standards[3] = Token.Standard.ERC20; + + mainchainTokens[4] = address(_mainchainMockERC721); + roninTokens[4] = address(0x00); + standards[4] = Token.Standard.ERC721; + } + + function _grantFundForGateway() internal { + vm.broadcast(sender()); + _mainchainGatewayV3.receiveEther{value: 0.1 ether}(); + + vm.broadcast(sender()); + _mainchainAxs.mint(address(_mainchainGatewayV3), 1_000_000 * 1e18); + + vm.broadcast(sender()); + _mainchainUsdc.mint(address(_mainchainGatewayV3), 500_000 * 1e6); + + vm.broadcast(sender()); + _mainchainSlp.mint(address(_mainchainGatewayV3), 50_000_000 * 1e6); } } diff --git a/script/contracts/token/USDCDeploy.s.sol b/script/contracts/token/USDCDeploy.s.sol index 68ed58d9..c01e1505 100644 --- a/script/contracts/token/USDCDeploy.s.sol +++ b/script/contracts/token/USDCDeploy.s.sol @@ -17,7 +17,7 @@ contract USDCDeploy is Migration { return config.sharedArguments().usdc; } - function _getContract() internal returns (Contract) { + function _getContract() internal pure returns (Contract) { return Contract.USDC; } From 1d6e371d0a0874b1fd4f9178ca8a3dc8679ce25e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 15:44:47 +0700 Subject: [PATCH 131/305] script: fix numerator in gateway --- script/Migration.s.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 0b5b11f4..748cb3b7 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -58,8 +58,8 @@ contract Migration is BaseMigrationV2, Utils { // Mainchain Gateway V3 param.mainchainGatewayV3.roninChainId = 2021; - param.mainchainGatewayV3.numerator = 1; - param.mainchainGatewayV3.highTierVWNumerator = 10; + param.mainchainGatewayV3.numerator = 4 ; + param.mainchainGatewayV3.highTierVWNumerator = 7; param.mainchainGatewayV3.denominator = 10; // Mainchain Bridge Manager From a1b5d5b69ee6df7de7ca45a57e2d73a61ae6ef53 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 4 Apr 2024 15:57:25 +0700 Subject: [PATCH 132/305] script: add sentry config --- script/Migration.s.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 748cb3b7..2b82da66 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -53,8 +53,8 @@ contract Migration is BaseMigrationV2, Utils { param.test.governorPKs = governorPKs; // Mainchain Gateway Pause Enforcer - param.mainchainPauseEnforcer.admin = makeAddr("pause-enforcer-admin"); - param.mainchainPauseEnforcer.sentries = wrapAddress(makeAddr("pause-enforcer-sentry")); + param.mainchainPauseEnforcer.admin = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; + param.mainchainPauseEnforcer.sentries = wrapAddress(0x8Ed0c5B427688f2Bd945509199CAa4741C81aFFe); // Gnosis Sepolia // Mainchain Gateway V3 param.mainchainGatewayV3.roninChainId = 2021; From 6238f2323a8f3778409cb226e25138b7f9e2e485 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Thu, 4 Apr 2024 16:00:32 +0700 Subject: [PATCH 133/305] script: fix test, RoninBridgeManagerDeploy script --- .../20231218-maptoken-roninchain.s.sol | 5 +- .../20240115-maptoken-mainchain.s.sol | 49 ++------- .../20240115-maptoken-roninchain.s.sol | 32 ++---- .../20240131-maptoken-pixel-mainchain.s.sol | 35 ++---- .../20240131-maptoken-pixel-roninchain.s.sol | 23 +--- .../20240206-maptoken-banana-mainchain.s.sol | 28 ++--- .../20240206-maptoken-banana-roninchain.s.sol | 2 +- script/GeneralConfig.sol | 1 + .../contracts/RoninBridgeManagerDeploy.s.sol | 14 ++- script/utils/Contract.sol | 2 + ....proposeMainchain.RoninBridgeManager.t.sol | 2 + .../proposeCurrent.RoninBridgeManager.t.sol | 1 + .../proposeGlobal.RoninBridgeManager.t.sol | 1 + .../relayGlobal.MainchainBridgeManager.t.sol | 1 + .../updateOperator.RoninBridgeManager.t.sol | 69 ++++++------ .../bridge-manager/update/update.t.sol | 101 +++++++++--------- .../bridge-manager/BridgeManagerCRUD.t.sol | 97 ++++++++--------- 17 files changed, 195 insertions(+), 268 deletions(-) diff --git a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol index 4e3b9150..9a7d2a2c 100644 --- a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol @@ -41,8 +41,7 @@ contract Migration__20231215_MapTokenRoninchain is BridgeMigration { // uint256[] calldata chainIds, // Token.Standard[] calldata _standards // ) - bytes memory innerData = - abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); uint256 expiredTime = block.timestamp + 10 days; @@ -58,6 +57,6 @@ contract Migration__20231215_MapTokenRoninchain is BridgeMigration { _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); vm.broadcast(sender()); - _roninBridgeManager.propose(block.chainid, expiredTime, address(0), false, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index f433067c..18cde061 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -43,14 +43,9 @@ contract Migration__MapTokenMainchain is BridgeMigration { super.setUp(); _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress( - _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), - Contract.MainchainGatewayV3.key() - ); - _mainchainBridgeManager = _config.getAddress( - _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), - Contract.MainchainBridgeManager.key() - ); + _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = + _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainBridgeManager.key()); } function _mapFarmlandToken() internal pure returns (bytes memory) { @@ -68,11 +63,7 @@ contract Migration__MapTokenMainchain is BridgeMigration { // Token.Standard[] calldata _standards // ) - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, ( - mainchainTokens, - roninTokens, - standards - )); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, (mainchainTokens, roninTokens, standards)); return abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); } @@ -106,25 +97,18 @@ contract Migration__MapTokenMainchain is BridgeMigration { // uint256[][4] calldata _thresholds // ) - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, ( - mainchainTokens, - roninTokens, - standards, - thresholds - )); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); return abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); } - function _removeAxieChatGovernorAddress() pure internal returns (bytes memory) { + function _removeAxieChatGovernorAddress() internal pure returns (bytes memory) { address[] memory bridgeOperator = new address[](1); bridgeOperator[0] = _axieChatBridgeOperator; - return abi.encodeCall(IBridgeManager.removeBridgeOperators, ( - bridgeOperator - )); + return abi.encodeCall(IBridgeManager.removeBridgeOperators, (bridgeOperator)); } - function _addAxieChatGovernorAddress() pure internal returns (bytes memory) { + function _addAxieChatGovernorAddress() internal pure returns (bytes memory) { uint96[] memory voteWeight = new uint96[](1); address[] memory governor = new address[](1); address[] memory bridgeOperator = new address[](1); @@ -133,11 +117,7 @@ contract Migration__MapTokenMainchain is BridgeMigration { governor[0] = _axieChatGovernor; bridgeOperator[0] = _axieChatBridgeOperator; - return abi.encodeCall(IBridgeManager.addBridgeOperators, ( - voteWeight, - governor, - bridgeOperator - )); + return abi.encodeCall(IBridgeManager.addBridgeOperators, (voteWeight, governor, bridgeOperator)); } function run() public { @@ -172,15 +152,6 @@ contract Migration__MapTokenMainchain is BridgeMigration { uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); vm.broadcast(sender()); - _roninBridgeManager.propose( - chainId, - expiredTime, - address(0), - false, - targets, - values, - calldatas, - gasAmounts - ); + _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index ffd75cf7..07e09cce 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -59,16 +59,11 @@ contract Migration__MapTokenRoninchain is BridgeMigration { // Token.Standard[] calldata _standards // ) - bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, ( - roninTokens, - mainchainTokens, - chainIds, - standards - )); + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); return abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); } - function _removeAxieChatGovernorAddress() pure internal returns (bytes memory) { + function _removeAxieChatGovernorAddress() internal pure returns (bytes memory) { address[] memory bridgeOperator = new address[](1); bridgeOperator[0] = _axieChatBridgeOperator; @@ -76,12 +71,10 @@ contract Migration__MapTokenRoninchain is BridgeMigration { // address[] calldata bridgeOperators // ) - return abi.encodeCall(IBridgeManager.removeBridgeOperators, ( - bridgeOperator - )); + return abi.encodeCall(IBridgeManager.removeBridgeOperators, (bridgeOperator)); } - function _addAxieChatGovernorAddress() pure internal returns (bytes memory) { + function _addAxieChatGovernorAddress() internal pure returns (bytes memory) { uint96[] memory voteWeight = new uint96[](1); address[] memory governor = new address[](1); address[] memory bridgeOperator = new address[](1); @@ -96,11 +89,7 @@ contract Migration__MapTokenRoninchain is BridgeMigration { // address[] calldata bridgeOperators // ) - return abi.encodeCall(IBridgeManager.addBridgeOperators, ( - voteWeight, - governor, - bridgeOperator - )); + return abi.encodeCall(IBridgeManager.addBridgeOperators, (voteWeight, governor, bridgeOperator)); } function run() public { @@ -128,15 +117,6 @@ contract Migration__MapTokenRoninchain is BridgeMigration { _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); vm.broadcast(sender()); - _roninBridgeManager.propose( - block.chainid, - expiredTime, - address(0), - false, - targets, - values, - calldatas, - gasAmounts - ); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol index 0603d4a2..3c81b866 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol @@ -26,14 +26,9 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio super.setUp(); _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress( - _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), - Contract.MainchainGatewayV3.key() - ); - _mainchainBridgeManager = _config.getAddress( - _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), - Contract.MainchainBridgeManager.key() - ); + _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = + _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainBridgeManager.key()); } function run() public { @@ -73,12 +68,7 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio // uint256[][4] calldata _thresholds // ) - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, ( - mainchainTokens, - roninTokens, - standards, - thresholds - )); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); @@ -99,11 +89,7 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio // Token.Standard[] calldata _standards // ) external; - innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, ( - mainchainTokens, - roninTokens, - standards - )); + innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, (mainchainTokens, roninTokens, standards)); proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); @@ -130,15 +116,6 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); vm.broadcast(_governor); - _roninBridgeManager.propose( - chainId, - expiredTime, - address(0), - false, - targets, - values, - calldatas, - gasAmounts - ); + _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol index 129f589b..96c309bb 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol @@ -74,12 +74,7 @@ contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migrati // uint256[] calldata chainIds, // Token.Standard[] calldata _standards // ) - bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, ( - roninTokens, - mainchainTokens, - chainIds, - standards - )); + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); targets[0] = _roninGatewayV3; @@ -101,10 +96,7 @@ contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migrati mainchainTokensToSetMinThreshold[1] = _aggMainchainToken; minThresholds[1] = _aggMinThreshold; - innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, ( - mainchainTokensToSetMinThreshold, - minThresholds - )); + innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (mainchainTokensToSetMinThreshold, minThresholds)); proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); targets[1] = _roninGatewayV3; @@ -128,15 +120,6 @@ contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migrati _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); vm.broadcast(_governor); - _roninBridgeManager.propose( - block.chainid, - expiredTime, - address(0), - false, - targets, - values, - calldatas, - gasAmounts - ); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index 9714c9bd..d5b28654 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -1,19 +1,19 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {console2} from "forge-std/console2.sol"; -import {StdStyle} from "forge-std/StdStyle.sol"; -import {BaseMigration} from "foundry-deployment-kit/BaseMigration.s.sol"; -import {RoninBridgeManager} from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -import {IMainchainGatewayV3} from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; -import {GlobalProposal} from "@ronin/contracts/libraries/GlobalProposal.sol"; -import {Token} from "@ronin/contracts/libraries/Token.sol"; -import {Contract} from "../utils/Contract.sol"; -import {BridgeMigration} from "../BridgeMigration.sol"; -import {Network} from "../utils/Network.sol"; -import {DefaultNetwork} from "foundry-deployment-kit/utils/DefaultNetwork.sol"; -import {Contract} from "../utils/Contract.sol"; -import {IGeneralConfigExtended} from "../IGeneralConfigExtended.sol"; +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { Contract } from "../utils/Contract.sol"; +import { BridgeMigration } from "../BridgeMigration.sol"; +import { Network } from "../utils/Network.sol"; +import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; import "./maptoken-banana-configs.s.sol"; import "./maptoken-genkai-configs.s.sol"; @@ -146,7 +146,7 @@ contract Migration__20240206_MapTokenBananaMainchain is console2.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); - _roninBridgeManager.propose(chainId, expiredTime, address(0), false, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index 2e6ab1dc..f0a2bdb8 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -152,7 +152,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is console2.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); - _roninBridgeManager.propose(block.chainid, expiredTime, address(0), false, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); // ============= LOCAL SIMULATION ================== _cheatWeightOperator(_governor); diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 3d5de15f..7e2dbfdc 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -48,6 +48,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _mapContractName(Contract.MainchainGatewayV3); _mapContractName(Contract.MainchainBridgeManager); _mapContractName(Contract.MockERC721); + _mapContractName(Contract.RoninBridgeManagerConstructor); _contractNameMap[Contract.WETH.key()] = "MockWrappedToken"; _contractNameMap[Contract.WRON.key()] = "MockWrappedToken"; diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index 6666dc38..951f0745 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -1,20 +1,22 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import { RoninBridgeManagerConstructor } from "@ronin/contracts/ronin/gateway/RoninBridgeManagerConstructor.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import { Migration } from "../Migration.s.sol"; - +import { LibProxy } from "foundry-deployment-kit/libraries/LibProxy.sol"; import { RoninGatewayV3Deploy } from "./RoninGatewayV3Deploy.s.sol"; import { BridgeSlashDeploy } from "./BridgeSlashDeploy.s.sol"; contract RoninBridgeManagerDeploy is Migration { + using LibProxy for *; + function _defaultArguments() internal virtual override returns (bytes memory args) { ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; - args = abi.encodeCall( - RoninBridgeManager.initialize, + RoninBridgeManagerConstructor.initialize, ( param.num, param.denom, @@ -32,6 +34,10 @@ contract RoninBridgeManagerDeploy is Migration { } function run() public virtual returns (RoninBridgeManager) { - return RoninBridgeManager(_deployProxy(Contract.RoninBridgeManager.key())); + address payable instance = _deployProxy(Contract.RoninBridgeManagerConstructor.key()); + address logic = _deployLogic(Contract.RoninBridgeManager.key()); + address proxyAdmin = instance.getProxyAdmin(); + _upgradeRaw(proxyAdmin, instance, logic, EMPTY_ARGS); + return RoninBridgeManager(instance); } } diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index 3442649f..bdaa906e 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -16,6 +16,7 @@ enum Contract { RoninPauseEnforcer, RoninGatewayV3, RoninBridgeManager, + RoninBridgeManagerConstructor, MainchainPauseEnforcer, MainchainGatewayV3, MainchainBridgeManager, @@ -42,6 +43,7 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.RoninPauseEnforcer) return "PauseEnforcer"; if (contractEnum == Contract.RoninGatewayV3) return "RoninGatewayV3"; if (contractEnum == Contract.RoninBridgeManager) return "RoninBridgeManager"; + if (contractEnum == Contract.RoninBridgeManagerConstructor) return "RoninBridgeManagerConstructor"; if (contractEnum == Contract.MainchainPauseEnforcer) return "PauseEnforcer"; if (contractEnum == Contract.MainchainGatewayV3) return "MainchainGatewayV3"; diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol index 37b115e6..dd811cf3 100644 --- a/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.proposeMainchain.RoninBridgeManager.t.sol @@ -77,6 +77,7 @@ contract ProposalWithExecutor_MainchainProposal_RoninBridgeManager_Test is BaseI // Should the proposal is approved but not executed on Ronin chain function test_proposeMainchain_autoProposal_looseProposal() public { + vm.skip(true); _proposal.executor = address(0); vm.expectEmit(false, true, true, true); @@ -102,6 +103,7 @@ contract ProposalWithExecutor_MainchainProposal_RoninBridgeManager_Test is BaseI // Should the non-auto proposal be execute by the specified executor function test_proposeMainchain_executorProposal_looseProposal_WhenAllInternalCallsPass() public { + vm.skip(true); _proposal.executor = _param.roninBridgeManager.governors[0]; _proposal.gasAmounts[1] = 1_000_000; // Set gas for the second call becomes success diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol index daa8f3d8..c994d91e 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeCurrent.RoninBridgeManager.t.sol @@ -111,6 +111,7 @@ contract LooseProposal_CurrentNetworkProposal_RoninBridgeManager_Test is BaseInt // Should the loose proposal passes when containing one failed internal call function test_looseProposal_WhenContainsOneInternalCallFailed() external { + vm.skip(true); _proposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, true, true, true); diff --git a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol index 1ab43f14..c067afb1 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/proposeGlobal.RoninBridgeManager.t.sol @@ -108,6 +108,7 @@ contract LooseProposal_GlobalProposal_RoninBridgeManager_Test is BaseIntegration // Should the loose proposal passes when containing one failed internal call function test_looseProposal_globalProposal_RoninSide_WhenContainsOneInternalCallFailed() external { + vm.skip(true); _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, true, true, true); diff --git a/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol index f842451f..cf1c01c6 100644 --- a/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-loose/relayGlobal.MainchainBridgeManager.t.sol @@ -112,6 +112,7 @@ contract LooseProposal_GlobalProposal_MainchainBridgeManager_Test is BaseIntegra // Should the loose proposal passes when containing one failed internal call function test_looseProposal_globalProposal_MainchainSide_WhenContainsOneInternalCallFailed() external { + vm.skip(true); _globalProposal.gasAmounts[1] = 1_000; // Set gas for the second call becomes failed vm.expectEmit(false, false, false, false); diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index 8398e397..07b5fe50 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -41,52 +41,53 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { } function test_updateOperator_and_wrapUpEpoch() public { - // Disable test due to not supporting update operator vm.skip(true); - console.log("=============== Test Update Operator ==========="); + // // Disable test due to not supporting update operator + // vm.skip(true); + // console.log("=============== Test Update Operator ==========="); - _depositFor(); - _moveToEndPeriodAndWrapUpEpoch(); + // _depositFor(); + // _moveToEndPeriodAndWrapUpEpoch(); - console.log("=============== First 50 Receipts ==========="); - // _bulkDepositFor(first50Receipts); + // console.log("=============== First 50 Receipts ==========="); + // // _bulkDepositFor(first50Receipts); - for (uint i; i < 50; i++) { - _depositFor(); - } + // for (uint i; i < 50; i++) { + // _depositFor(); + // } - console.log("=============== Update bridge operator ==========="); - _updateBridgeOperator(); + // console.log("=============== Update bridge operator ==========="); + // _updateBridgeOperator(); - console.log("=============== Second 50 Receipts ==========="); - // _bulkDepositFor(second50Receipts); - for (uint i; i < 50; i++) { - _depositFor(); - } + // console.log("=============== Second 50 Receipts ==========="); + // // _bulkDepositFor(second50Receipts); + // for (uint i; i < 50; i++) { + // _depositFor(); + // } - _wrapUpEpoch(); - _wrapUpEpoch(); + // _wrapUpEpoch(); + // _wrapUpEpoch(); - _moveToEndPeriodAndWrapUpEpoch(); + // _moveToEndPeriodAndWrapUpEpoch(); - console.log("=============== Check slash and reward behavior ==========="); - _depositFor(); + // console.log("=============== Check slash and reward behavior ==========="); + // _depositFor(); - logBridgeTracking(); - logBridgeSlash(); + // logBridgeTracking(); + // logBridgeSlash(); } - function _updateBridgeOperator() internal { - vm.prank(_param.roninBridgeManager.governors[0]); - address previousOperator = _param.roninBridgeManager.bridgeOperators[0]; - _roninBridgeManager.updateBridgeOperator(previousOperator, _newBridgeOperator); - _param.roninBridgeManager.bridgeOperators[0] = _newBridgeOperator; - - console.log( - "Update operator: ", - string(abi.encodePacked(vm.toString(previousOperator), " => ", vm.toString(_newBridgeOperator))) - ); - } + // function _updateBridgeOperator() internal { + // vm.prank(_param.roninBridgeManager.governors[0]); + // address previousOperator = _param.roninBridgeManager.bridgeOperators[0]; + // _roninBridgeManager.updateBridgeOperator(previousOperator, _newBridgeOperator); + // _param.roninBridgeManager.bridgeOperators[0] = _newBridgeOperator; + + // console.log( + // "Update operator: ", + // string(abi.encodePacked(vm.toString(previousOperator), " => ", vm.toString(_newBridgeOperator))) + // ); + // } function _depositFor() internal { console.log(">> depositFor ...."); diff --git a/test/bridge/unit/concrete/bridge-manager/update/update.t.sol b/test/bridge/unit/concrete/bridge-manager/update/update.t.sol index e5c62c6c..bff731f3 100644 --- a/test/bridge/unit/concrete/bridge-manager/update/update.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/update/update.t.sol @@ -22,89 +22,90 @@ contract Update_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { } function test_RevertWhen_NotGovernorOfTheChangingBridgeOperator() external { - address newOperator = _generateBridgeOperatorAddressToUpdate(); + vm.skip(true); + // address newOperator = _generateBridgeOperatorAddressToUpdate(); - // Make the caller not the governor. - changePrank({ msgSender: _bridgeOperators[0] }); + // // Make the caller not the governor. + // changePrank({ msgSender: _bridgeOperators[0] }); - // Run the test. - vm.expectRevert(abi.encodeWithSelector(ErrUnauthorized.selector, IBridgeManager.updateBridgeOperator.selector, RoleAccess.GOVERNOR)); - _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); + // // Run the test. + // vm.expectRevert(abi.encodeWithSelector(ErrUnauthorized.selector, IBridgeManager.updateBridgeOperator.selector, RoleAccess.GOVERNOR)); + // _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorAddressIsZero() external { vm.skip(true); - address newOperator = address(0); + // address newOperator = address(0); - // Run the test. - vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.updateBridgeOperator.selector)); - _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); + // // Run the test. + // vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.updateBridgeOperator.selector)); + // _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorIsExistedInCurrentOperatorList() external { vm.skip(true); - address newOperator = _bridgeOperators[2]; + // address newOperator = _bridgeOperators[2]; - // Run the test. - vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorAlreadyExisted.selector, newOperator)); - _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); + // // Run the test. + // vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorAlreadyExisted.selector, newOperator)); + // _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorIsExistedInCurrentGovernorList() external { vm.skip(true); - address newOperator = _governors[2]; + // address newOperator = _governors[2]; - // Run the test. - vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.updateBridgeOperator.selector)); // TODO: fix error sig here - _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); + // // Run the test. + // vm.expectRevert(abi.encodeWithSelector(ErrZeroAddress.selector, IBridgeManager.updateBridgeOperator.selector)); // TODO: fix error sig here + // _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_RevertWhen_NewOperatorIsTheSameWithPreviousOperator() external { vm.skip(true); - address prevOperator = _bridgeManager.getOperatorOf(_caller); - address newOperator = prevOperator; + // address prevOperator = _bridgeManager.getOperatorOf(_caller); + // address newOperator = prevOperator; - // Run the test. - vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorAlreadyExisted.selector, prevOperator)); - _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); + // // Run the test. + // vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorAlreadyExisted.selector, prevOperator)); + // _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); } function test_UpdateOperators_NewOperatorIsValid() external { vm.skip(true); - // Get before test state. - (address[] memory beforeBridgeOperators, address[] memory beforeGovernors, uint96[] memory beforeVoteWeights) = _getBridgeMembers(); + // // Get before test state. + // (address[] memory beforeBridgeOperators, address[] memory beforeGovernors, uint96[] memory beforeVoteWeights) = _getBridgeMembers(); - // Prepare data. - address prevOperator = _bridgeManager.getOperatorOf(_caller); - address newOperator = _generateBridgeOperatorAddressToUpdate(); + // // Prepare data. + // address prevOperator = _bridgeManager.getOperatorOf(_caller); + // address newOperator = _generateBridgeOperatorAddressToUpdate(); - // Run the test + // // Run the test - // Should emit the event - vm.expectEmit({ emitter: address(_bridgeManager) }); - emit BridgeOperatorUpdated(_caller, prevOperator, newOperator); + // // Should emit the event + // vm.expectEmit({ emitter: address(_bridgeManager) }); + // emit BridgeOperatorUpdated(_caller, prevOperator, newOperator); - _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); + // _bridgeManager.updateBridgeOperator(_bridgeOperators[0], newOperator); - // Get after test state - (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembers(); + // // Get after test state + // (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembers(); - // it should modify the current operators list - beforeBridgeOperators[0] = newOperator; - _assertBridgeMembers({ - comparingOperators: beforeBridgeOperators, - comparingGovernors: beforeGovernors, - comparingWeights: beforeVoteWeights, - expectingOperators: afterBridgeOperators, - expectingGovernors: afterGovernors, - expectingWeights: afterVoteWeights - }); + // // it should modify the current operators list + // beforeBridgeOperators[0] = newOperator; + // _assertBridgeMembers({ + // comparingOperators: beforeBridgeOperators, + // comparingGovernors: beforeGovernors, + // comparingWeights: beforeVoteWeights, + // expectingOperators: afterBridgeOperators, + // expectingGovernors: afterGovernors, + // expectingWeights: afterVoteWeights + // }); - // it should remove the old operator - assertEq(_bridgeManager.getOperatorOf(_caller), newOperator); - assertEq(_bridgeManager.getGovernorOf(newOperator), _caller); + // // it should remove the old operator + // assertEq(_bridgeManager.getOperatorOf(_caller), newOperator); + // assertEq(_bridgeManager.getGovernorOf(newOperator), _caller); - vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrOperatorNotFound.selector, prevOperator)); - _bridgeManager.getGovernorOf(prevOperator); + // vm.expectRevert(abi.encodeWithSelector(IBridgeManager.ErrOperatorNotFound.selector, prevOperator)); + // _bridgeManager.getGovernorOf(prevOperator); } } diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol index ea79881f..20ecd00c 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeManagerCRUD.t.sol @@ -39,19 +39,20 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { uint96[] private _initWeights; function testFail_MaliciousUpdateBridgeOperator() external { - (address[] memory bridgeOperators, address[] memory governors, ) = - getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); + vm.skip(true); + // (address[] memory bridgeOperators, address[] memory governors, ) = + // getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); - vm.startPrank(governors[0]); - address lastOperator; + // vm.startPrank(governors[0]); + // address lastOperator; - for (uint256 i = 1; i < bridgeOperators.length; ++i) { - lastOperator = bridgeOperators[i]; - MockBridgeManager(_bridgeManager).updateBridgeOperator(bridgeOperators[0], lastOperator); - vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorUpdateFailed.selector, lastOperator)); - } + // for (uint256 i = 1; i < bridgeOperators.length; ++i) { + // lastOperator = bridgeOperators[i]; + // MockBridgeManager(_bridgeManager).updateBridgeOperator(bridgeOperators[0], lastOperator); + // vm.expectRevert(abi.encodeWithSelector(ErrBridgeOperatorUpdateFailed.selector, lastOperator)); + // } - vm.stopPrank(); + // vm.stopPrank(); } /** @@ -173,28 +174,28 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { */ function testFuzz_UpdateBridgeOperator_CallerIsGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { vm.skip(true); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = - getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); - IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); + // (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + // getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); + // IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); + + // uint256 randomSeed = _randomize(_triShuffle(r1, r2, r3), 0, voteWeights.length - 1); + // address randomGovernor = governors[randomSeed]; + // address correspondingOperator = bridgeOperators[randomSeed]; + // address newBridgeOperator = makeAddr("NEW_BRIDGE_OPERATOR"); + // vm.deal(newBridgeOperator, 1 ether); + + // vm.prank(randomGovernor); + // vm.expectEmit(_bridgeManager); + // bool[] memory statuses = new bool[](1); + // statuses[0] = true; + // emit BridgeOperatorUpdated(randomGovernor, bridgeOperators[randomSeed], newBridgeOperator); + // bridgeManager.updateBridgeOperator(correspondingOperator, newBridgeOperator); + + // // swap and pop + // bridgeOperators[randomSeed] = bridgeOperators[bridgeOperators.length - 1]; + // bridgeOperators[bridgeOperators.length - 1] = newBridgeOperator; - uint256 randomSeed = _randomize(_triShuffle(r1, r2, r3), 0, voteWeights.length - 1); - address randomGovernor = governors[randomSeed]; - address correspondingOperator = bridgeOperators[randomSeed]; - address newBridgeOperator = makeAddr("NEW_BRIDGE_OPERATOR"); - vm.deal(newBridgeOperator, 1 ether); - - vm.prank(randomGovernor); - vm.expectEmit(_bridgeManager); - bool[] memory statuses = new bool[](1); - statuses[0] = true; - emit BridgeOperatorUpdated(randomGovernor, bridgeOperators[randomSeed], newBridgeOperator); - bridgeManager.updateBridgeOperator(correspondingOperator, newBridgeOperator); - - // swap and pop - bridgeOperators[randomSeed] = bridgeOperators[bridgeOperators.length - 1]; - bridgeOperators[bridgeOperators.length - 1] = newBridgeOperator; - - _invariantTest(bridgeManager, voteWeights, governors, bridgeOperators); + // _invariantTest(bridgeManager, voteWeights, governors, bridgeOperators); } /** @@ -202,23 +203,23 @@ contract BridgeManagerCRUDTest is BridgeManagerUtils { */ function test_UpdateBridgeOperator_CallerIsNotGovernor(uint256 r1, uint256 r2, uint256 r3, uint16 numBridgeOperators) external virtual { vm.skip(true); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = - getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); - IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); - - address unauthorizedCaller = makeAddr("UNAUTHORIZED_CALLER"); - for (uint256 i; i < governors.length;) { - vm.assume(unauthorizedCaller != governors[i]); - unchecked { - ++i; - } - } - address newBridgeOperator = makeAddr("NEW_BRIDGE_OPERATOR"); - - vm.prank(unauthorizedCaller); - bridgeManager.updateBridgeOperator(bridgeOperators[0], newBridgeOperator); - - vm.expectRevert(abi.encodeWithSelector(ErrUnauthorized.selector, IBridgeManager.updateBridgeOperator.selector, RoleAccess.GOVERNOR)); + // (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + // getValidAndNonExistingInputs(_bridgeManager, r1, r2, r3, numBridgeOperators); + // IBridgeManager bridgeManager = _addBridgeOperators(_bridgeManager, _bridgeManager, voteWeights, governors, bridgeOperators); + + // address unauthorizedCaller = makeAddr("UNAUTHORIZED_CALLER"); + // for (uint256 i; i < governors.length;) { + // vm.assume(unauthorizedCaller != governors[i]); + // unchecked { + // ++i; + // } + // } + // address newBridgeOperator = makeAddr("NEW_BRIDGE_OPERATOR"); + + // vm.prank(unauthorizedCaller); + // bridgeManager.updateBridgeOperator(bridgeOperators[0], newBridgeOperator); + + // vm.expectRevert(abi.encodeWithSelector(ErrUnauthorized.selector, IBridgeManager.updateBridgeOperator.selector, RoleAccess.GOVERNOR)); } function _setUp() internal virtual { From 49ed5ad85b0a26d3e414bcdb6d89599fa09eebc6 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 5 Apr 2024 12:08:46 +0700 Subject: [PATCH 134/305] forge install: foundry-deployment-kit v0.2.0 --- lib/foundry-deployment-kit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index 3aa1ca23..2f48f7db 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit 3aa1ca23adaa55a2e04818b0dced14947e4e5c28 +Subproject commit 2f48f7dbed4b99688ecd2b42109e3400d296b3a3 From 7ef18ec85378f0e5d3f426263ac36dbd08f12410 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 5 Apr 2024 13:10:34 +0700 Subject: [PATCH 135/305] fix: fix script --- foundry.toml | 11 +++++------ lib/forge-std | 2 +- .../deploy-sepolia.s.sol | 19 +++++++++++-------- script/Migration.s.sol | 1 + 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/foundry.toml b/foundry.toml index 1910458d..6f215d4e 100644 --- a/foundry.toml +++ b/foundry.toml @@ -5,10 +5,7 @@ optimizer = true optimizer_runs = 200 ffi = true -libs = [ - 'lib', - 'node_modules/hardhat', -] +libs = ['lib', 'node_modules/hardhat'] # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options @@ -47,10 +44,12 @@ runs = 1_000 [profile.min-solc-via-ir.fuzz] runs = 1_000 +[etherscan] +sepolia = { key = "${ETHERSCAN_API_KEY}", chain = 11155111, url = "https://api-sepolia.etherscan.io/api" } + [rpc_endpoints] ethereum = "https://eth.llamarpc.com" goerli = "https://ethereum-goerli.publicnode.com" -# sepolia = "https://ethereum-sepolia-rpc.publicnode.com" -sepolia = "https://sepolia.infura.io/v3/198b01af94b445f78c6d5ef985f57264" +sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}" ronin-mainnet = "https://api-partner.roninchain.com/rpc" ronin-testnet = "https://saigon-archive.roninchain.com/rpc" diff --git a/lib/forge-std b/lib/forge-std index 4d9985c9..e4aef94c 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 4d9985c9fb046e5c8572bb173662109aae09d7de +Subproject commit e4aef94c1768803a16fe19f7ce8b65defd027cfd diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index c462642f..8a3b34ec 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -27,7 +27,7 @@ import { MockERC721Deploy } from "@ronin/script/contracts/token/MockERC721Deploy import { GeneralConfig } from "../GeneralConfig.sol"; import { Network } from "../utils/Network.sol"; import { BridgeMigration } from "../BridgeMigration.sol"; - +import { DefaultContract } from "foundry-deployment-kit/utils/DefaultContract.sol"; import "./changeGV-config.s.sol"; import "forge-std/console2.sol"; @@ -46,6 +46,8 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { MockERC721 _mainchainMockERC721; MainchainBridgeAdminUtils _mainchainProposalUtils; + // Default proxy admin for sepolia + address internal constant PROXY_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; function _configByteCode() internal virtual override returns (bytes memory) { return abi.encodePacked(type(GeneralConfig).creationCode); @@ -57,12 +59,13 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { function setUp() public override { super.setUp(); + CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), PROXY_ADMIN); } function run() public onlyOn(Network.Sepolia.key()) { - vm.startBroadcast(0x55ba00EeB8D8d33Df1b1985459D310b9CAfB19f2); - payable(sender()).transfer(5 ether); - vm.stopBroadcast(); + // vm.startBroadcast(0x55ba00EeB8D8d33Df1b1985459D310b9CAfB19f2); + // payable(PROXY_ADMIN).transfer(5 ether); + // vm.stopBroadcast(); _deployContractsOnMainchain(); _mainchainGatewayV3Initialize(); @@ -230,15 +233,15 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { function _grantFundForGateway() internal { vm.broadcast(sender()); - _mainchainGatewayV3.receiveEther{value: 0.1 ether}(); + _mainchainGatewayV3.receiveEther{ value: 0.1 ether }(); - vm.broadcast(sender()); + vm.broadcast(PROXY_ADMIN); _mainchainAxs.mint(address(_mainchainGatewayV3), 1_000_000 * 1e18); - vm.broadcast(sender()); + vm.broadcast(PROXY_ADMIN); _mainchainUsdc.mint(address(_mainchainGatewayV3), 500_000 * 1e6); - vm.broadcast(sender()); + vm.broadcast(PROXY_ADMIN); _mainchainSlp.mint(address(_mainchainGatewayV3), 50_000_000 * 1e6); } } diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 2b82da66..035fde1e 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -57,6 +57,7 @@ contract Migration is BaseMigrationV2, Utils { param.mainchainPauseEnforcer.sentries = wrapAddress(0x8Ed0c5B427688f2Bd945509199CAa4741C81aFFe); // Gnosis Sepolia // Mainchain Gateway V3 + param.mainchainGatewayV3.roleSetter = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; param.mainchainGatewayV3.roninChainId = 2021; param.mainchainGatewayV3.numerator = 4 ; param.mainchainGatewayV3.highTierVWNumerator = 7; From e3d86c3a20bb96f006b79b4615a1f2d0182ffc98 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 5 Apr 2024 14:28:39 +0700 Subject: [PATCH 136/305] chore: add deployment artifact --- .../11155111/run-1712301925.json | 1082 ++++++ .../11155111/run-1712302101.json | 1082 ++++++ .../11155111/run-latest.json | 1082 ++++++ deployments/sepolia/.chainId | 1 + deployments/sepolia/AXS.json | 448 +++ .../sepolia/MainchainBridgeManager.json | 2161 ++++++++++++ .../sepolia/MainchainGatewayV3Logic.json | 2928 +++++++++++++++++ .../sepolia/MainchainGatewayV3Proxy.json | 218 ++ deployments/sepolia/MockERC721.json | 544 +++ deployments/sepolia/PauseEnforcerLogic.json | 723 ++++ deployments/sepolia/PauseEnforcerProxy.json | 218 ++ deployments/sepolia/SLP.json | 448 +++ deployments/sepolia/USDC.json | 448 +++ deployments/sepolia/WETH.json | 429 +++ 14 files changed, 11812 insertions(+) create mode 100644 broadcast/deploy-sepolia.s.sol/11155111/run-1712301925.json create mode 100644 broadcast/deploy-sepolia.s.sol/11155111/run-1712302101.json create mode 100644 broadcast/deploy-sepolia.s.sol/11155111/run-latest.json create mode 100644 deployments/sepolia/.chainId create mode 100644 deployments/sepolia/AXS.json create mode 100644 deployments/sepolia/MainchainBridgeManager.json create mode 100644 deployments/sepolia/MainchainGatewayV3Logic.json create mode 100644 deployments/sepolia/MainchainGatewayV3Proxy.json create mode 100644 deployments/sepolia/MockERC721.json create mode 100644 deployments/sepolia/PauseEnforcerLogic.json create mode 100644 deployments/sepolia/PauseEnforcerProxy.json create mode 100644 deployments/sepolia/SLP.json create mode 100644 deployments/sepolia/USDC.json create mode 100644 deployments/sepolia/WETH.json diff --git a/broadcast/deploy-sepolia.s.sol/11155111/run-1712301925.json b/broadcast/deploy-sepolia.s.sol/11155111/run-1712301925.json new file mode 100644 index 00000000..efb286f6 --- /dev/null +++ b/broadcast/deploy-sepolia.s.sol/11155111/run-1712301925.json @@ -0,0 +1,1082 @@ +{ + "transactions": [ + { + "hash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x206770", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca264697066735822122024939a448abbecaf74c9f8ef1d3326da17dd252cccddf0ade66be800061b239364736f6c63430008170033", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "function": null, + "arguments": [ + "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x134c04", + "value": "0x0", + "data": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000c2cb024747e86a05a2d2839dd02ceb78f939f983000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c0700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x1", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfc974f6c8df2578db7fd7422c3218315120a78c63fc02a15adfeb8074998e0d1", + "transactionType": "CREATE", + "contractName": "MainchainGatewayV3", + "contractAddress": "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x798a36", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b506000805460ff1916905561470d8061002a6000396000f3fe60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614007565b90501115610f1d57610e85610e718680614007565b610e7e6020890189614007565b8787611a1f565b610eab610e928680614007565b8660005b602002810190610ea69190614007565b6123a2565b610ed1610eb88680614007565b8660015b602002810190610ecc9190614007565b61194a565b610ef7610ede8680614007565b8660025b602002810190610ef29190614007565b612477565b610f1d610f048680614007565b8660035b602002810190610f189190614007565b612588565b60005b610f2d6040870187614007565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614007565b84818110610f7757610f77613ff1565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d6110983685900385018561409f565b612843565b90506110b16110983685900385018561409f565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b9083908690614173565b60405180910390a160006111756080850160608601613a7f565b9050600061118b61012086016101008701614200565b600181111561119c5761119c613d3c565b036112635760006111b6368690038601610100870161421d565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc368790038701610100880161421d565b60408301519091506112139061014088013561424f565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a0161421d565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d0929190614173565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f9190614262565b60385461138c9084614262565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e69190614262565b60025461138c9084614262565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b369190614279565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b607680546000918261184983614293565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142ce565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b838110156119e95782828281811061199557611995613ff1565b90506020020135603a60008787858181106119b2576119b2613ff1565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d094939291906143f8565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b85811015611b7c57848482818110611a7557611a75613ff1565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa0613ff1565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd613ff1565b9050602002016020810190611b129190614200565b60786000898985818110611b2857611b28613ff1565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c368890038801610100890161421d565b612c6d565b6001611db36040880160208901614200565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d61012088016101008901614200565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a01614200565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a61409f565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d01614200565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca613ff1565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b36919061439a565b84935061208685613229565b61209090836144be565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d90614173565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611297919061421d565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be929190614173565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b6002546037546123659190614262565b6038546001546123759190614262565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612441578282828181106123ed576123ed613ff1565b905060200201356039600087878581811061240a5761240a613ff1565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d094939291906143f8565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b8381101561255257620f42408383838181106124c6576124c6613ff1565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe613ff1565b90506020020135603b600087878581811061251b5761251b613ff1565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d094939291906143f8565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612627578282828181106125d3576125d3613ff1565b90506020020135603c60008787858181106125f0576125f0613ff1565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d094939291906143f8565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144d1565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144be565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101291906144f3565b60006002546001600254846001546127a69190614262565b6127b091906144be565b6127ba919061424f565b610a7691906144d1565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d8385614262565b610ff991906144d1565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b91906144f3565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061424f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add9190614530565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd9190614530565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d699190614530565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd6919061454c565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b9190614530565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b36949392919061456e565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145a4565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614619565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a1919061464c565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144d1565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144be565b9091555050505050565b600082600001828154811061335c5761335c613ff1565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b369392919061467a565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009286169161349391614530565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef836002614262565b6134fa9060026144be565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b8160008151811061355757613557613ff1565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061358657613586613ff1565b60200101906001600160f81b031916908160001a90535060006135aa846002614262565b6135b59060016144be565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e9613ff1565b1a60f81b8282815181106135ff576135ff613ff1565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146aa565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361424f565b85549091506000906137039060019061424f565b905081811461376857600086600001828154811061372357613723613ff1565b906000526020600020015490508087600001848154811061374657613746613ff1565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146c1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a69190614262565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916138339190614530565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a0919061454c565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b613fc1613ecb565b823560ff81168114613fd257600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261401e57600080fd5b83018035915067ffffffffffffffff82111561403957600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561406357600080fd5b61406b613ecb565b9050813561407881613a5f565b8152602082013561408881613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140b257600080fd5b60405160a0810181811067ffffffffffffffff821117156140e357634e487b7160e01b600052604160045260246000fd5b6040528235815260208301356140f881613f02565b602082015261410a8460408501614051565b604082015261411c8460a08501614051565b606082015261412f846101008501613f0f565b60808201529392505050565b803561414681613a5f565b6001600160a01b03908116835260208201359061416282613a5f565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561419481613f02565b61419d81613d52565b806040840152506141b4606083016040850161413b565b6141c460c0830160a0850161413b565b6101206101008401356141d681613f02565b6141df81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561421257600080fd5b8135610ff981613f02565b60006060828403121561422f57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614239565b8082028115828204841417610a7657610a76614239565b602081016010831061428d5761428d613d3c565b91905290565b6000600182016142a5576142a5614239565b5060010190565b80516142b781613d52565b825260208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516142ef81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143646101208401826142ac565b509392505050565b6001600160e01b03198316815260408101600b831061438d5761438d613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156143ed5781356143d281613a5f565b6001600160a01b0316875295820195908201906001016143bf565b509495945050505050565b60408152600061440c6040830186886143af565b82810360208401528381526001600160fb1b0384111561442b57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061445860608301888a6143af565b6020838203602085015261446d82888a6143af565b848103604086015285815286925060200160005b868110156144af57833561449481613f02565b61449d81613d52565b82529282019290820190600101614481565b509a9950505050505050505050565b80820180821115610a7657610a76614239565b6000826144ee57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561450557600080fd5b5051919050565b60005b8381101561452757818101518382015260200161450f565b50506000910152565b6000825161454281846020870161450c565b9190910192915050565b60006020828403121561455e57600080fd5b81518015158114610ff957600080fd5b60c0810161457c82876142ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516145dc81601785016020880161450c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161460d81602884016020880161450c565b01602801949350505050565b602081526000825180602084015261463881604085016020870161450c565b601f01601f19169190910160400192915050565b60006020828403121561465e57600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a0810161468882866142ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146b9576146b9614239565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec8cc7f89d632f5b6c36d2cdb75ab664383134c4e4a6f2157e2624267b4eadfe64736f6c63430008170033", + "nonce": "0x2", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": [ + "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x134c04", + "value": "0x0", + "data": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000762f3e2221c0dee575d1bd43145bafeebe965ef2000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c0700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x3", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionType": "CREATE", + "contractName": "MainchainBridgeManager", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "function": null, + "arguments": [ + "2", + "4", + "2021", + "0x0000000000000000000000000000000000000000", + "[]", + "[0xbA8E32D874948dF4Cbe72284De91CC4968293BCe]", + "[0x45E8f1aCFC89F45720cf11e807eD85B730C67C7e]", + "[100]", + "[]", + "[]" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x8e0ff6", + "value": "0x0", + "data": "0x60a06040526040516200659938038062006599833981016040819052620000269162001523565b8181600160ff1b8c8c8c8c8c8c8c8c836200004181620001a3565b505060016000805160206200657983398151915255620000628888620002b2565b50620000729050600286620003c7565b604080516020808201839052600c60608301526b212924a223a2afa0a226a4a760a11b6080808401919091528284018a905283518084038201815260a0840185528051908301207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08501527f9d3fa1662ea89365eb7af36506f0ad5413bd7e078960d8481ff4718763aaa8e960e08501527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a56101008501526101208085019190915284518085039091018152610140909301909352815191012090526200015d81838562000471565b50505050505050505062000177816200089160201b60201c565b5062000185600030620008c4565b62000191828262000960565b5050505050505050505050506200196e565b606081620001b18162000a23565b8251806001600160401b03811115620001ce57620001ce62001334565b604051908082528060200260200182016040528015620001f8578160200160208202803683370190505b509250806000036200020b5750620002ac565b6000805160206200653983398151915260006314d72edb60e21b815b84811015620002a6578781815181106200024557620002456200165e565b60200260200101519250620002608362000a5f60201b60201c565b6200026c838362000a97565b62000278848462000c76565b8782815181106200028d576200028d6200165e565b9115156020928302919091019091015260010162000227565b50505050505b50919050565b60008082841115620002ea576040516387f6f09560e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b60008051602062006559833981519152549150620003267fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff5490565b90506200034160008051602062006559833981519152859055565b6200036b7fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff849055565b8284620003876000805160206200657983398151915262000c96565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111562000400576200040062001674565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111562000444576200044462001674565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60606200047f838362000cbe565b6200048a8162000a23565b82518551811480156200049d5750845181145b620004ca576040516306b5667560e21b81526001600160e01b0319600035166004820152602401620002e1565b806001600160401b03811115620004e557620004e562001334565b6040519080825280602002602001820160405280156200050f578160200160208202803683370190505b5092508060000362000522575062000889565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c917f8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3917fd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d917f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3919081908190815b89811015620007db578d8181518110620005e557620005e56200165e565b602002602001015194508c81815181106200060457620006046200165e565b602002602001015193506200061f8562000ddc60201b60201c565b6200062a8462000ddc565b8e81815181106200063f576200063f6200165e565b60200260200101516001600160601b03166000036200068057604051637f11b8a360e11b81526001600160e01b0319600035166004820152602401620002e1565b6200068c898662000e13565b806200069f57506200069f898562000e13565b80620006b25750620006b2878662000e13565b80620006c55750620006c5878562000e13565b158c8281518110620006db57620006db6200165e565b6020026020010190151590811515815250508b81815181106200070257620007026200165e565b602002602001015115620007d2576200071c898662000c76565b5062000729878562000c76565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f90829081106200077257620007726200165e565b6020908102919091018101516001600160601b03169083018190526200079990846200168a565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101620005c7565b50620008087f6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c8362000e36565b5062000840635ebae8a060e01b8d8d6040516020016200082a92919062001728565b60408051601f1981840301815291905262000e50565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f6040516200087794939291906200175a565b60405180910390a15050505050505050505b509392505050565b600281905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b8060036000846004811115620008de57620008de62001674565b6004811115620008f257620008f262001674565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600481111562000933576200093362001674565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60005b825181101562000a1e57306001600160a01b03168282815181106200098c576200098c6200165e565b60200260200101516001600160a01b031603620009cb5760405163053265f160e01b81526001600160e01b0319600035166004820152602401620002e1565b62000a15838281518110620009e457620009e46200165e565b602002602001015183838151811062000a015762000a016200165e565b6020026020010151620008c460201b60201c565b60010162000963565b505050565b62000a2e816200118b565b1562000a5c57604051630d697db160e11b81526001600160e01b0319600035166004820152602401620002e1565b50565b806001600160a01b03163b60000362000a5c57604051630bfc64a360e21b81526001600160a01b0382166004820152602401620002e1565b6040516001600160e01b03198216602482015260009060440160408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169062000afb90859062001810565b600060405180830381855afa9150503d806000811462000b38576040519150601f19603f3d011682016040523d82523d6000602084013e62000b3d565b606091505b50915091508162000c1f57846001600160a01b03168360405160240162000b6591906200185c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525162000b9c919062001810565b600060405180830381855afa9150503d806000811462000bd9576040519150601f19603f3d011682016040523d82523d6000602084013e62000bde565b606091505b5090925090508162000c1f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b8080602001905181019062000c35919062001871565b62000c6f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b5050505050565b600062000c8d836001600160a01b03841662001236565b90505b92915050565b600062000ca1825490565b905062000cb98262000cb58360016200168a565b9055565b919050565b81518151606091908082016001600160401b0381111562000ce35762000ce362001334565b60405190808252806020026020018201604052801562000d0d578160200160208202803683370190505b50925060005b8281101562000d6f5785818151811062000d315762000d316200165e565b602002602001015184828151811062000d4e5762000d4e6200165e565b6001600160a01b039092166020928302919091019091015260010162000d13565b60005b8281101562000dd25785818151811062000d905762000d906200165e565b602002602001015185838151811062000dad5762000dad6200165e565b6001600160a01b03909216602092830291909101909101526001918201910162000d72565b5050505092915050565b6001600160a01b03811662000a5c5760405163104c66df60e31b81526001600160e01b0319600035166004820152602401620002e1565b6001600160a01b0381166000908152600183016020526040812054151562000c8d565b600062000c908362000e49818562001288565b9250829055565b600062000e6c60008051602062006539833981519152620012a8565b8051909150600081900362000e815750505050565b6000816001600160401b0381111562000e9e5762000e9e62001334565b60405190808252806020026020018201604052801562000ec8578160200160208202803683370190505b5090506000826001600160401b0381111562000ee85762000ee862001334565b60405190808252806020026020018201604052801562000f1d57816020015b606081526020019060019003908162000f075790505b5090506000868660405160200162000f3792919062001895565b604051602081830303815290604052905060008160405160240162000f5d91906200185c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015620011415786818151811062000faa5762000faa6200165e565b60200260200101516001600160a01b03168360405162000fcb919062001810565b6000604051808303816000865af19150503d80600081146200100a576040519150601f19603f3d011682016040523d82523d6000602084013e6200100f565b606091505b508683815181106200102557620010256200165e565b602002602001018684815181106200104157620010416200165e565b60200260200101829052821515151581525050508481815181106200106a576200106a6200165e565b602002602001015162001138578681815181106200108c576200108c6200165e565b60200260200101516001600160a01b031682604051620010ad919062001810565b6000604051808303816000865af19150503d8060008114620010ec576040519150601f19603f3d011682016040523d82523d6000602084013e620010f1565b606091505b508683815181106200110757620011076200165e565b602002602001018684815181106200112357620011236200165e565b60200260200101829052821515151581525050505b60010162000f8c565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051620011799493929190620018c8565b60405180910390a15050505050505050565b600081516000036200119f57506000919050565b60005b60018351038110156200122d57600181015b83518110156200122357838181518110620011d357620011d36200165e565b60200260200101516001600160a01b0316848381518110620011f957620011f96200165e565b60200260200101516001600160a01b0316036200121a575060019392505050565b600101620011b4565b50600101620011a2565b50600092915050565b60008181526001830160205260408120546200127f5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000c90565b50600062000c90565b815481018181101562000c9057634e487b7160005260116020526024601cfd5b60606000620012b783620012be565b9392505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156200131057602002820191906000526020600020905b815481526020019060010190808311620012fb575b50505050509050919050565b80516001600160a01b038116811462000cb957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562001375576200137562001334565b604052919050565b60006001600160401b0382111562001399576200139962001334565b5060051b60200190565b600082601f830112620013b557600080fd5b81516020620013ce620013c8836200137d565b6200134a565b8083825260208201915060208460051b870101935086841115620013f157600080fd5b602086015b8481101562001418576200140a816200131c565b8352918301918301620013f6565b509695505050505050565b600082601f8301126200143557600080fd5b8151602062001448620013c8836200137d565b8083825260208201915060208460051b8701019350868411156200146b57600080fd5b602086015b84811015620014185780516001600160601b0381168114620014925760008081fd5b835291830191830162001470565b600082601f830112620014b257600080fd5b81516020620014c5620013c8836200137d565b80838252602082019150600560208560051b880101945087851115620014ea57600080fd5b602087015b8581101562001516578051828110620015085760008081fd5b8452928401928401620014ef565b5090979650505050505050565b6000806000806000806000806000806101408b8d0312156200154457600080fd5b8a51995060208b0151985060408b015197506200156460608c016200131c565b60808c01519097506001600160401b03808211156200158257600080fd5b620015908e838f01620013a3565b975060a08d0151915080821115620015a757600080fd5b620015b58e838f01620013a3565b965060c08d0151915080821115620015cc57600080fd5b620015da8e838f01620013a3565b955060e08d0151915080821115620015f157600080fd5b620015ff8e838f0162001423565b94506101008d01519150808211156200161757600080fd5b620016258e838f01620014a0565b93506101208d01519150808211156200163d57600080fd5b506200164c8d828e01620013a3565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b8082018082111562000c9057634e487b7160e01b600052601160045260246000fd5b60008151808452602080850194506020840160005b83811015620016e85781516001600160a01b031687529582019590820190600101620016c1565b509495945050505050565b60008151808452602080850194506020840160005b83811015620016e857815115158752958201959082019060010162001708565b6040815260006200173d6040830185620016ac565b8281036020840152620017518185620016f3565b95945050505050565b6080815260006200176f6080830187620016f3565b82810360208481019190915286518083528782019282019060005b81811015620017b15784516001600160601b0316835293830193918301916001016200178a565b50508481036040860152620017c78188620016ac565b925050508281036060840152620017df8185620016ac565b979650505050505050565b60005b8381101562001807578181015183820152602001620017ed565b50506000910152565b6000825162001824818460208701620017ea565b9190910192915050565b6000815180845262001848816020860160208601620017ea565b601f01601f19169290920160200192915050565b60208152600062000c8d60208301846200182e565b6000602082840312156200188457600080fd5b81518015158114620012b757600080fd5b6001600160e01b0319831681528151600090620018ba816004850160208701620017ea565b919091016004019392505050565b608081526000620018dd60808301876200182e565b602083820381850152620018f28288620016ac565b91508382036040850152620019088287620016f3565b915083820360608501528185518084528284019150828160051b85010183880160005b838110156200195d57601f198784030185526200194a8383516200182e565b948601949250908501906001016200192b565b50909b9a5050505050505050505050565b608051614ba162001998600039600081816102c5015281816107c501526108510152614ba16000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b1461050c578063e75235b814610537578063e9c034981461053f578063f80b535214610552578063fdc4fa471461055a57600080fd5b8063cc7e6b3b146104be578063d0a50db0146104de578063d78392f8146104e6578063dafae408146104f957600080fd5b8063b9c36209116100e9578063b9c3620914610464578063bc9182fd1461048c578063bc96180b1461049f578063c441c4a8146104a757600080fd5b80639b19dbfd146103db5780639b2ee437146103e3578063b384abef146103f6578063b405aaf21461045157600080fd5b80633644e515116101925780637de5dedd116101615780637de5dedd14610332578063800eaab31461033a578063865e6fd31461034d578063901979d51461036057600080fd5b80633644e515146102c05780635e05cf9e146102e7578063776fb1ec146102fc5780637d465f791461031f57600080fd5b80631f425338116101ce5780631f425338146102675780632d6d7d731461027a57806334d5f37b1461028d57806335da8121146102ad57600080fd5b806301a5f43f1461020057806306aba0e1146102295780630a44fa431461023f5780630f7c318914610252575b600080fd5b61021361020e366004613b79565b61056d565b6040516102209190613c50565b60405180910390f35b610231610620565b604051908152602001610220565b61023161024d366004613c63565b61063d565b61025a6106c2565b6040516102209190613cde565b610213610275366004613c63565b6106db565b61025a610288366004613c63565b610728565b61023161029b366004613cf1565b60006020819052908152604090205481565b6102136102bb366004613c63565b61076c565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6102f5366004613d4e565b6107b2565b005b61030f61030a366004613cf1565b6107f1565b6040519015158152602001610220565b6102fa61032d366004613dea565b61083e565b610231610876565b6102fa610348366004613fe8565b6108f2565b6102fa61035b36600461405a565b610937565b6103c361036e36600461408d565b6001600160a01b039081166000908152600080516020614b0c83398151915260209081526040808320549093168252600080516020614aec83398151915290522054600160a01b90046001600160601b031690565b6040516001600160601b039091168152602001610220565b61025a610952565b6102fa6103f136600461408d565b61095c565b6104406104043660046140a8565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102209594939291906140f0565b61030f61045f36600461408d565b610af3565b6104776104723660046140a8565b610b0d565b60408051928352602083019190915201610220565b61025a61049a36600461411e565b610b2e565b610231610c1f565b6104af610c2a565b6040516102209392919061418c565b6104d16104cc366004613c63565b610c54565b60405161022091906141cf565b610231610c92565b6103c36104f436600461408d565b610cab565b61030f610507366004613cf1565b610cb6565b61051f61051a3660046141e2565b610cf3565b6040516001600160a01b039091168152602001610220565b610477610d6e565b61021361054d366004613c63565b610d9f565b61025a610de5565b61025a610568366004613c63565b610def565b6060610577610ed6565b61061587878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250610f0692505050565b979650505050505050565b6000610638600080516020614b4c8339815191525490565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061067e92508391506112829050565b6106ba8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112ba92505050565b949350505050565b6060610638600080516020614a8c83398151915261133e565b60606106e5610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061134b92505050565b9392505050565b606061072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611416915050565b92915050565b6060610776610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b6107bb33611662565b6107ea85858585857f0000000000000000000000000000000000000000000000000000000000000000336116a4565b5050505050565b60008060008381527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff166004811115610836576108366140ca565b141592915050565b61084733611662565b6107ea85858585857f000000000000000000000000000000000000000000000000000000000000000033611749565b600061088e600080516020614aac8339815191525490565b60016108a6600080516020614aac8339815191525490565b6108d46108bf600080516020614b4c8339815191525490565b600080516020614acc833981519152906117a5565b6108de9190614213565b6108e89190614226565b6106389190614239565b333014610929576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b60405180910390fd5b61093382826117d0565b5050565b61093f610ed6565b6109488161187e565b61093382826118b4565b6060610638611958565b61096533611662565b61096e81611971565b336000908152600080516020614aec83398151915260208190526040909120546001600160a01b0390811690831681036109c657604051630669b93360e31b81526001600160a01b0384166004820152602401610920565b600080516020614b2c83398151915260006109e182846119a6565b80156109f257506109f282866119bb565b905080610a1d5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610920565b6001600160a01b038381166000818152600080516020614b0c8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610ab0906364b18d0960e11b906060015b6040516020818303038152906040526119d0565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b6000610766600080516020614b2c83398151915283611cd8565b600080610b18610ed6565b610b228484611cfa565b915091505b9250929050565b8051606090806001600160401b03811115610b4b57610b4b613e2d565b604051908082528060200260200182016040528015610b74578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110610ba657610ba6614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b0316848281518110610bf757610bf7614270565b6001600160a01b0390921660209283029190910190910152600101610b89565b505050919050565b600061063860025490565b6060806060610c37611def565b9250610c4283610b2e565b9150610c4d83611e1a565b9050909192565b6060610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e1a92505050565b6000610638600080516020614b2c833981519152611f03565b600061076682611f0d565b6000610cd16108bf600080516020614b4c8339815191525490565b600080516020614aac83398151915254610ceb9084614286565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610d2a57610d2a6140ca565b60ff1681526020810191909152604001600020546001600160a01b0316905080610d69578160405163409140df60e11b8152600401610920919061429d565b919050565b600080610d87600080516020614acc8339815191525490565b600080516020614aac83398151915254915091509091565b6060610da9610ed6565b610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611f4592505050565b6060610638611def565b606081806001600160401b03811115610e0a57610e0a613e2d565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b509150600080516020614b0c83398151915260005b82811015610ecd57816000878784818110610e6557610e65614270565b9050602002016020810190610e7a919061408d565b6001600160a01b0390811682526020820192909252604001600020548551911690859083908110610ead57610ead614270565b6001600160a01b0390921660209283029190910190910152600101610e48565b50505092915050565b333014610f04576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b565b6060610f12838361222a565b610f1b81611282565b8251855181148015610f2d5750845181145b610f58576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b806001600160401b03811115610f7057610f70613e2d565b604051908082528060200260200182016040528015610f99578160200160208202803683370190505b50925080600003610faa575061127a565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b0c83398151915291600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156111fb578d818151811061103357611033614270565b602002602001015194508c818151811061104f5761104f614270565b6020026020010151935061106285611971565b61106b84611971565b8e818151811061107d5761107d614270565b60200260200101516001600160601b03166000036110bc576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b6110c68986611cd8565b806110d657506110d68985611cd8565b806110e657506110e68786611cd8565b806110f657506110f68785611cd8565b158c828151811061110957611109614270565b6020026020010190151590811515815250508b818151811061112d5761112d614270565b6020026020010151156111f35761114489866119bb565b5061114f87856119bb565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f908290811061119557611195614270565b6020908102919091018101516001600160601b03169083018190526111ba9084614213565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611019565b50611214600080516020614b4c83398151915283612334565b50611233635ebae8a060e01b8d8d604051602001610a9c9291906142b7565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161126894939291906142e5565b60405180910390a15050505050505050505b509392505050565b61128b8161234b565b156112b7576000356001600160e01b031916604051630d697db160e11b8152600401610920919061425b565b50565b6000816112c681611282565b600080516020614aec83398151915260005b8451811015610c17578160008683815181106112f6576112f6614270565b6020908102919091018101516001600160a01b031682528101919091526040016000205461133490600160a01b90046001600160601b031685614213565b93506001016112d8565b60606000610721836123ea565b60608161135781611282565b8251806001600160401b0381111561137157611371613e2d565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b509250600080516020614a8c83398151915260005b8281101561140d576113e38682815181106113cc576113cc614270565b6020026020010151836119a690919063ffffffff16565b8582815181106113f5576113f5614270565b911515602092830291909101909101526001016113af565b50505050919050565b606082516001600160401b0381111561143157611431613e2d565b60405190808252806020026020018201604052801561145a578160200160208202803683370190505b50905060005b8351811015611569576003600085838151811061147f5761147f614270565b60200260200101516004811115611498576114986140ca565b60048111156114a9576114a96140ca565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114dd576114dd614270565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611535575060006001600160a01b031682828151811061152257611522614270565b60200260200101516001600160a01b0316145b15611561576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b600101611460565b5092915050565b60608161157c81611282565b8251806001600160401b0381111561159657611596613e2d565b6040519080825280602002602001820160405280156115bf578160200160208202803683370190505b509250806000036115d0575061165c565b600080516020614a8c83398151915260006314d72edb60e21b815b848110156116565787818151811061160557611605614270565b602002602001015192506116188361187e565b6116228383612446565b61162c84846119bb565b87828151811061163e5761163e614270565b911515602092830291909101909101526001016115eb565b50505050505b50919050565b61166b81611f0d565b6001600160601b03166000036112b7576000356001600160e01b0319166003604051620f948f60ea1b8152600401610920929190614332565b6116b66116b0886144a3565b826125d9565b5060006116ca6116c5896144a3565b6126df565b905061173f6116d8896144a3565b8888888861172b896116eb89600061281e565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b61173a8a6116eb8a600161281e565b612857565b5050505050505050565b600061175d61175789614577565b83612c4e565b9050600061177261176d8a614577565b612d98565b905061179a828989898961178b8a6116eb89600061281e565b61173a8b6116eb8a600161281e565b505050505050505050565b600082548015611569578281029150808204831461156957634e487b7160005260116020526024601cfd5b60005b825181101561187957306001600160a01b03168282815181106117f8576117f8614270565b60200260200101516001600160a01b031603611835576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b61187183828151811061184a5761184a614270565b602002602001015183838151811061186457611864614270565b6020026020010151612ecf565b6001016117d3565b505050565b806001600160a01b03163b6000036112b757604051630bfc64a360e21b81526001600160a01b0382166004820152602401610920565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156118ea576118ea6140ca565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561192b5761192b6140ca565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6060610638600080516020614b2c83398151915261133e565b6001600160a01b0381166112b7576000356001600160e01b03191660405163104c66df60e31b8152600401610920919061425b565b6000610721836001600160a01b038416612f62565b6000610721836001600160a01b038416613055565b60006119e9600080516020614a8c83398151915261133e565b805190915060008190036119fd5750505050565b6000816001600160401b03811115611a1757611a17613e2d565b604051908082528060200260200182016040528015611a40578160200160208202803683370190505b5090506000826001600160401b03811115611a5d57611a5d613e2d565b604051908082528060200260200182016040528015611a9057816020015b6060815260200190600190039081611a7b5790505b50905060008686604051602001611aa8929190614665565b6040516020818303038152906040529050600081604051602401611acc91906146c2565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015611c9057868181518110611b1557611b15614270565b60200260200101516001600160a01b031683604051611b3491906146d5565b6000604051808303816000865af19150503d8060008114611b71576040519150601f19603f3d011682016040523d82523d6000602084013e611b76565b606091505b50868381518110611b8957611b89614270565b60200260200101868481518110611ba257611ba2614270565b6020026020010182905282151515158152505050848181518110611bc857611bc8614270565b6020026020010151611c8857868181518110611be657611be6614270565b60200260200101516001600160a01b031682604051611c0591906146d5565b6000604051808303816000865af19150503d8060008114611c42576040519150601f19603f3d011682016040523d82523d6000602084013e611c47565b606091505b50868381518110611c5a57611c5a614270565b60200260200101868481518110611c7357611c73614270565b60200260200101829052821515151581525050505b600101611afb565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051611cc6949392919061473e565b60405180910390a15050505050505050565b6001600160a01b03811660009081526001830160205260408120541515610721565b60008082841115611d2c576000356001600160e01b0319166040516387f6f09560e01b8152600401610920919061425b565b600080516020614acc833981519152549150611d54600080516020614aac8339815191525490565b9050611d6d600080516020614acc833981519152859055565b611d84600080516020614aac833981519152849055565b8284611daf7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6130a8565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606106387f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61133e565b8051606090806001600160401b03811115611e3757611e37613e2d565b604051908082528060200260200182016040528015611e60578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110611e9257611e92614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b0316848281518110611ee357611ee3614270565b6001600160601b0390921660209283029190910190910152600101611e75565b6000610766825490565b6001600160a01b03166000908152600080516020614aec8339815191526020526040902054600160a01b90046001600160601b031690565b606081611f5181611282565b8251806001600160401b03811115611f6b57611f6b613e2d565b604051908082528060200260200182016040528015611f94578160200160208202803683370190505b50925080600003611fa5575061165c565b60408051808201909152600080825260208201819052600080516020614b0c833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156121aa578c818151811061202e5761202e614270565b6020908102919091018101516001600160a01b038082166000908152928c90526040909220549091169550935061206485611971565b61206d84611971565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b031691830191909152909350908516146120e1576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b6120eb8785611cd8565b80156120fc57506120fc8886611cd8565b8c828151811061210e5761210e614270565b6020026020010190151590811515815250508b818151811061213257612132614270565b6020026020010151156121a25761214988866119a6565b5061215487856119a6565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b031916905592881682528881529181205582015161219f906001600160601b031684614213565b92505b600101612014565b506121c3600080516020614b4c833981519152836130c3565b506121e263c48549de60e01b8d8d604051602001610a9c9291906142b7565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d60405161221392919061478b565b60405180910390a150505050505050505050919050565b81518151606091908082016001600160401b0381111561224c5761224c613e2d565b604051908082528060200260200182016040528015612275578160200160208202803683370190505b50925060005b828110156122cf5785818151811061229557612295614270565b60200260200101518482815181106122af576122af614270565b6001600160a01b039092166020928302919091019091015260010161227b565b60005b8281101561232a578581815181106122ec576122ec614270565b602002602001015185838151811061230657612306614270565b6001600160a01b0390921660209283029190910190910152600191820191016122d2565b5050505092915050565b60006107668361234485856130d3565b9250829055565b6000815160000361235e57506000919050565b60005b60018351038110156123e157600181015b83518110156123d85783818151811061238d5761238d614270565b60200260200101516001600160a01b03168483815181106123b0576123b0614270565b60200260200101516001600160a01b0316036123d0575060019392505050565b600101612372565b50600101612361565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561243a57602002820191906000526020600020905b815481526020019060010190808311612426575b50505050509050919050565b600081604051602401612459919061425b565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906124a29085906146d5565b600060405180830381855afa9150503d80600081146124dd576040519150601f19603f3d011682016040523d82523d6000602084013e6124e2565b606091505b5091509150816125a457846001600160a01b03168360405160240161250791906146c2565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161253c91906146d5565b600060405180830381855afa9150503d8060008114612577576040519150601f19603f3d011682016040523d82523d6000602084013e61257c565b606091505b509092509050816125a457838560405163069d427960e11b81526004016109209291906147b0565b808060200190518101906125b891906147d3565b6107ea57838560405163069d427960e11b81526004016109209291906147b0565b602082015160009080820361261b5760405163092048d160e11b8152600080356001600160e01b03191660048301526024820152466044820152606401610920565b6002546126299085906130f2565b6000612634856126df565b905061263f82613193565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461269b576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516126cf9291906148e2565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561270d5761270d613e2d565b604051908082528060200260200182016040528015612736578160200160208202803683370190505b5060c086015190915060005b8251811015612795578660a00151818151811061276157612761614270565b60200260200101518051906020012083828151811061278257612782614270565b6020908102919091010152600101612742565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061286557508483145b612890576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b60008080856001600160401b038111156128ac576128ac613e2d565b6040519080825280602002602001820160405280156128d5578160200160208202803683370190505b5090506000866001600160401b038111156128f2576128f2613e2d565b60405190808252806020026020018201604052801561291b578160200160208202803683370190505b50905060008060003660005b8b811015612aac578c8c8281811061294157612941614270565b90506060020191508e8e8281811061295b5761295b614270565b9050602002016020810190612970919061490c565b92506000836001811115612986576129866140ca565b036129f0576129ab8b61299c602085018561492d565b8460200135856040013561322f565b945084878a6129b981614950565b9b50815181106129cb576129cb614270565b60200260200101906001600160a01b031690816001600160a01b031681525050612a61565b6001836001811115612a0457612a046140ca565b03612a3a57612a1a8a61299c602085018561492d565b9450848689612a2881614950565b9a50815181106129cb576129cb614270565b6000356001600160e01b031916604051630612418f60e11b8152600401610920919061425b565b846001600160a01b0316846001600160a01b031610612aa1576000356001600160e01b031916604051635d3dcd3160e01b8152600401610920919061425b565b849350600101612927565b50505085845250508281526020808c015160009081526001825260408082208e51835290925290812090612ade613257565b90506000612aeb85613261565b9050818110612b725780600003612b23576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b66838f61326c565b50505050505050612c45565b600082612b7d6132d9565b612b879190614226565b612b92906001614213565b90506000612b9f86613261565b9050818110612c1e5780600003612bd7576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050612c45565b6000356001600160e01b031916604051634ccfe64360e11b8152600401610920919061425b565b50505050505050565b612c8e6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b612ca7612ca084604001516001611416565b84906132e3565b9050612cbe600254826130f290919063ffffffff16565b6000612cc9826126df565b90506000612cd76000613193565b60008181527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602090815260409091209087015160018201859055600690910155905082518114612d49576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85612d7689612d98565b8989604051612d889493929190614969565b60405180910390a3505092915050565b60608101516040820151608083015151600092919083906001600160401b03811115612dc657612dc6613e2d565b604051908082528060200260200182016040528015612def578160200160208202803683370190505b5060a086015190915060005b8251811015612e4e5786608001518181518110612e1a57612e1a614270565b602002602001015180519060200120838281518110612e3b57612e3b614270565b6020908102919091010152600101612dfb565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b8060036000846004811115612ee657612ee66140ca565b6004811115612ef757612ef76140ca565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826004811115612f3557612f356140ca565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6000818152600183016020526040812054801561304b576000612f86600183614226565b8554909150600090612f9a90600190614226565b9050818114612fff576000866000018281548110612fba57612fba614270565b9060005260206000200154905080876000018481548110612fdd57612fdd614270565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061301057613010614a50565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610766565b6000915050610766565b600081815260018301602052604081205461309c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610766565b506000610766565b9055565b60006130b2825490565b9050610d69826130a4836001614213565b600061076683612344858561340d565b815481018181101561076657634e487b7160005260116020526024601cfd5b60008260600151511180156131105750816080015151826060015151145b801561312557508160a0015151826060015151145b801561313a57508160c0015151826060015151145b613165576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b61316f8142614213565b826040015111156109335760405163ad89be9d60e01b815260040160405180910390fd5b600081815260208190526040812054908190036131c25750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906000825460ff1660048111156131f4576131f46140ca565b036132125760405163757a436360e01b815260040160405180910390fd5b505050600090815260208190526040902080546001019081905590565b6000806000613240878787876135e8565b9150915061324d816136d5565b5095945050505050565b6000610638610876565b6000610766826112ba565b6132758161388b565b1561093357815460ff19166002178255600080613291836138a5565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba83836040516132cb929190614a66565b60405180910390a250505050565b6000610638610620565b6133236040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561335a5761335a613e2d565b604051908082528060200260200182016040528015613383578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b836040015151811015611569578281815181106133cf576133cf614270565b6020026020010151826060015182815181106133ed576133ed614270565b6001600160a01b03909216602092830291909101909101526001016133b0565b600082548281101561342c57634e487b7160005260116020526024601cfd5b9190910392915050565b60048301548110156134e95782600801600084600401838154811061345d5761345d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106134a6576134a6614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613436565b5060005b60058301548110156135a05782600801600084600501838154811061351457613514614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600584018054600786019291908490811061355d5761355d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016134ed565b50815460ff1916825560006001830181905560028301819055600383018190556135ce906004840190613b03565b6135dc600583016000613b03565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136cc565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136cc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561369c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136c5576000600192509250506136cc565b9150600090505b94509492505050565b60008160048111156136e9576136e96140ca565b036136f15750565b6001816004811115613705576137056140ca565b036137525760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610920565b6002816004811115613766576137666140ca565b036137b35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610920565b60038160048111156137c7576137c76140ca565b0361381f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610920565b6004816004811115613833576138336140ca565b036112b75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610920565b600081602001516000148061076657505060200151461490565b6060806138b18361388b565b6138ef57602083015160405163092048d160e11b81526000356001600160e01b03191660048201526024810191909152466044820152606401610920565b8260600151516001600160401b0381111561390c5761390c613e2d565b604051908082528060200260200182016040528015613935578160200160208202803683370190505b5091508260600151516001600160401b0381111561395557613955613e2d565b60405190808252806020026020018201604052801561398857816020015b60608152602001906001900390816139735790505b50905060005b836060015151811015613afd578360c0015181815181106139b1576139b1614270565b60200260200101515a116139e4576139c8846126df565b6040516307aec4ab60e21b815260040161092091815260200190565b836060015181815181106139fa576139fa614270565b60200260200101516001600160a01b031684608001518281518110613a2157613a21614270565b60200260200101518560c001518381518110613a3f57613a3f614270565b6020026020010151908660a001518481518110613a5e57613a5e614270565b6020026020010151604051613a7391906146d5565b600060405180830381858888f193505050503d8060008114613ab1576040519150601f19603f3d011682016040523d82523d6000602084013e613ab6565b606091505b50848381518110613ac957613ac9614270565b60200260200101848481518110613ae257613ae2614270565b6020908102919091010191909152901515905260010161398e565b50915091565b50805460008255906000526020600020908101906112b791905b80821115613b315760008155600101613b1d565b5090565b60008083601f840112613b4757600080fd5b5081356001600160401b03811115613b5e57600080fd5b6020830191508360208260051b8501011115610b2757600080fd5b60008060008060008060608789031215613b9257600080fd5b86356001600160401b0380821115613ba957600080fd5b613bb58a838b01613b35565b90985096506020890135915080821115613bce57600080fd5b613bda8a838b01613b35565b90965094506040890135915080821115613bf357600080fd5b50613c0089828a01613b35565b979a9699509497509295939492505050565b60008151808452602080850194506020840160005b83811015613c45578151151587529582019590820190600101613c27565b509495945050505050565b6020815260006107216020830184613c12565b60008060208385031215613c7657600080fd5b82356001600160401b03811115613c8c57600080fd5b613c9885828601613b35565b90969095509350505050565b60008151808452602080850194506020840160005b83811015613c455781516001600160a01b031687529582019590820190600101613cb9565b6020815260006107216020830184613ca4565b600060208284031215613d0357600080fd5b5035919050565b60008083601f840112613d1c57600080fd5b5081356001600160401b03811115613d3357600080fd5b602083019150836020606083028501011115610b2757600080fd5b600080600080600060608688031215613d6657600080fd5b85356001600160401b0380821115613d7d57600080fd5b9087019060e0828a031215613d9157600080fd5b90955060208701359080821115613da757600080fd5b613db389838a01613b35565b90965094506040880135915080821115613dcc57600080fd5b50613dd988828901613d0a565b969995985093965092949392505050565b600080600080600060608688031215613e0257600080fd5b85356001600160401b0380821115613e1957600080fd5b9087019060c0828a031215613d9157600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613e6557613e65613e2d565b60405290565b60405160c081016001600160401b0381118282101715613e6557613e65613e2d565b604051601f8201601f191681016001600160401b0381118282101715613eb557613eb5613e2d565b604052919050565b60006001600160401b03821115613ed657613ed6613e2d565b5060051b60200190565b600082601f830112613ef157600080fd5b81356020613f06613f0183613ebd565b613e8d565b80838252602082019150600560208560051b880101945087851115613f2a57600080fd5b602087015b85811015613f53578035828110613f465760008081fd5b8452928401928401613f2f565b5090979650505050505050565b80356001600160a01b0381168114610d6957600080fd5b600082601f830112613f8857600080fd5b81356020613f98613f0183613ebd565b8083825260208201915060208460051b870101935086841115613fba57600080fd5b602086015b84811015613fdd57613fd081613f60565b8352918301918301613fbf565b509695505050505050565b60008060408385031215613ffb57600080fd5b82356001600160401b038082111561401257600080fd5b61401e86838701613ee0565b9350602085013591508082111561403457600080fd5b5061404185828601613f77565b9150509250929050565b803560108110610d6957600080fd5b6000806040838503121561406d57600080fd5b6140768361404b565b915061408460208401613f60565b90509250929050565b60006020828403121561409f57600080fd5b61072182613f60565b600080604083850312156140bb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600581106112b7576112b76140ca565b60a081016140fd876140e0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561413057600080fd5b81356001600160401b0381111561414657600080fd5b6106ba84828501613f77565b60008151808452602080850194506020840160005b83811015613c455781516001600160601b031687529582019590820190600101614167565b60608152600061419f6060830186613ca4565b82810360208401526141b18186613ca4565b905082810360408401526141c58185614152565b9695505050505050565b6020815260006107216020830184614152565b6000602082840312156141f457600080fd5b6107218261404b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610766576107666141fd565b81810381811115610766576107666141fd565b60008261425657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610766576107666141fd565b60208101601083106142b1576142b16140ca565b91905290565b6040815260006142ca6040830185613ca4565b82810360208401526142dc8185613c12565b95945050505050565b6080815260006142f86080830187613c12565b828103602084015261430a8187614152565b9050828103604084015261431e8186613ca4565b905082810360608401526106158185613ca4565b6001600160e01b03198316815260408101600b8310614353576143536140ca565b8260208301529392505050565b600082601f83011261437157600080fd5b81356020614381613f0183613ebd565b8083825260208201915060208460051b8701019350868411156143a357600080fd5b602086015b84811015613fdd57803583529183019183016143a8565b6000601f83601f8401126143d257600080fd5b823560206143e2613f0183613ebd565b82815260059290921b8501810191818101908784111561440157600080fd5b8287015b848110156144975780356001600160401b03808211156144255760008081fd5b818a0191508a603f83011261443a5760008081fd5b8582013560408282111561445057614450613e2d565b614461828b01601f19168901613e8d565b92508183528c818386010111156144785760008081fd5b8181850189850137506000908201870152845250918301918301614405565b50979650505050505050565b600060e082360312156144b557600080fd5b6144bd613e43565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156144ef57600080fd5b6144fb36838701613f77565b6060840152608085013591508082111561451457600080fd5b61452036838701614360565b608084015260a085013591508082111561453957600080fd5b614545368387016143bf565b60a084015260c085013591508082111561455e57600080fd5b5061456b36828601614360565b60c08301525092915050565b600060c0823603121561458957600080fd5b614591613e6b565b823581526020830135602082015260408301356001600160401b03808211156145b957600080fd5b6145c536838701613ee0565b604084015260608501359150808211156145de57600080fd5b6145ea36838701614360565b6060840152608085013591508082111561460357600080fd5b61460f368387016143bf565b608084015260a085013591508082111561462857600080fd5b5061463536828601614360565b60a08301525092915050565b60005b8381101561465c578181015183820152602001614644565b50506000910152565b6001600160e01b0319831681528151600090614688816004850160208701614641565b919091016004019392505050565b600081518084526146ae816020860160208601614641565b601f01601f19169290920160200192915050565b6020815260006107216020830184614696565b600082516146e7818460208701614641565b9190910192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015613f5357601f1986840301895261472c838351614696565b98840198925090830190600101614710565b6080815260006147516080830187614696565b82810360208401526147638187613ca4565b905082810360408401526147778186613c12565b9050828103606084015261061581856146f1565b60408152600061479e6040830185613c12565b82810360208401526142dc8185613ca4565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082840312156147e557600080fd5b8151801515811461072157600080fd5b60008151808452602080850194506020840160005b83811015613c455781518752958201959082019060010161480a565b600060e0830182518452602080840151602086015260408401516040860152606084015160e0606087015282815180855261010088019150602083019450600092505b808310156148925784516001600160a01b03168252938301936001929092019190830190614869565b506080860151935086810360808801526148ac81856147f5565b935050505060a083015184820360a08601526148c882826146f1565b91505060c083015184820360c08601526142dc82826147f5565b6040815260006148f56040830185614826565b905060018060a01b03831660208301529392505050565b60006020828403121561491e57600080fd5b81356002811061072157600080fd5b60006020828403121561493f57600080fd5b813560ff8116811461072157600080fd5b600060018201614962576149626141fd565b5060010190565b60808152600061497c6080830187614826565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156149e65783516149d0816140e0565b82529284019260019290920191908401906149bd565b50606089015193508481036060860152614a0081856147f5565b935050505060808601518282036080840152614a1c82826146f1565b91505060a086015182820360a0840152614a3682826147f5565b93505050506142dc60608301846001600160a01b03169052565b634e487b7160e01b600052603160045260246000fd5b604081526000614a796040830185613c12565b82810360208401526142dc81856146f156fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca2646970667358221220cb0e92b2033c9131bafd8c90a491e8241ace110667169406b1c1a69bc857723964736f6c634300081700335da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240c55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce000000000000000000000000000000000000000000000000000000000000000100000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x4", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x2dee73f551b3abed26e8bcff6fdf199076359cad3e452780ea854a81db7b7a56", + "transactionType": "CREATE", + "contractName": "MockWrappedToken", + "contractAddress": "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08", + "function": null, + "arguments": [ + "\"Wrapped WETH\"", + "\"WETH\"" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x129c0c", + "value": "0x0", + "data": "0x60806040526002805460ff191660121790553480156200001e57600080fd5b5060405162000bb738038062000bb783398101604081905262000041916200012f565b60006200004f83826200022a565b5060016200005e82826200022a565b505050620002f6565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008f57600080fd5b81516001600160401b0380821115620000ac57620000ac62000067565b604051601f8301601f19908116603f01168101908282118183101715620000d757620000d762000067565b8160405283815260209250866020858801011115620000f557600080fd5b600091505b83821015620001195785820183015181830184015290820190620000fa565b6000602085830101528094505050505092915050565b600080604083850312156200014357600080fd5b82516001600160401b03808211156200015b57600080fd5b62000169868387016200007d565b935060208501519150808211156200018057600080fd5b506200018f858286016200007d565b9150509250929050565b600181811c90821680620001ae57607f821691505b602082108103620001cf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000225576000816000526020600020601f850160051c81016020861015620002005750805b601f850160051c820191505b8181101562000221578281556001016200020c565b5050505b505050565b81516001600160401b0381111562000246576200024662000067565b6200025e8162000257845462000199565b84620001d5565b602080601f8311600181146200029657600084156200027d5750858301515b600019600386901b1c1916600185901b17855562000221565b600085815260208120601f198616915b82811015620002c757888601518255948401946001909101908401620002a6565b5085821015620002e65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6108b180620003066000396000f3fe6080604052600436106100ab5760003560e01c806340c10f191161006457806340c10f19146101a657806370a08231146101c657806395d89b41146101f3578063a9059cbb14610208578063d0e30db0146100ba578063dd62ed3e14610228576100ba565b806306fdde03146100c2578063095ea7b3146100ed57806318160ddd1461011d57806323b872dd1461013a5780632e1a7d4d1461015a578063313ce5671461017a576100ba565b366100ba576100b8610260565b005b6100b8610260565b3480156100ce57600080fd5b506100d76102bb565b6040516100e491906106cd565b60405180910390f35b3480156100f957600080fd5b5061010d610108366004610738565b610349565b60405190151581526020016100e4565b34801561012957600080fd5b50475b6040519081526020016100e4565b34801561014657600080fd5b5061010d610155366004610762565b6103b6565b34801561016657600080fd5b506100b861017536600461079e565b61053a565b34801561018657600080fd5b506002546101949060ff1681565b60405160ff90911681526020016100e4565b3480156101b257600080fd5b506100b86101c1366004610738565b6105e0565b3480156101d257600080fd5b5061012c6101e13660046107b7565b60036020526000908152604090205481565b3480156101ff57600080fd5b506100d76106ac565b34801561021457600080fd5b5061010d610223366004610738565b6106b9565b34801561023457600080fd5b5061012c6102433660046107d2565b600460209081526000928352604080842090915290825290205481565b336000908152600360205260408120805434929061027f90849061081b565b909155505060405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600080546102c89061082e565b80601f01602080910402602001604051908101604052809291908181526020018280546102f49061082e565b80156103415780601f1061031657610100808354040283529160200191610341565b820191906000526020600020905b81548152906001019060200180831161032457829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103a49086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600360205260408120548211156103db57600080fd5b6001600160a01b038416331480159061041957506001600160a01b038416600090815260046020908152604080832033845290915290205460001914155b15610487576001600160a01b038416600090815260046020908152604080832033845290915290205482111561044e57600080fd5b6001600160a01b038416600090815260046020908152604080832033845290915281208054849290610481908490610868565b90915550505b6001600160a01b038416600090815260036020526040812080548492906104af908490610868565b90915550506001600160a01b038316600090815260036020526040812080548492906104dc90849061081b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161052891815260200190565b60405180910390a35060019392505050565b3360009081526003602052604090205481111561055657600080fd5b3360009081526003602052604081208054839290610575908490610868565b9091555050604051339082156108fc029083906000818181858888f193505050501580156105a7573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b6001600160a01b03821661063a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b6001600160a01b0382166000908152600360205260408120805483929061066290849061081b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600180546102c89061082e565b60006106c63384846103b6565b9392505050565b60006020808352835180602085015260005b818110156106fb578581018301518582016040015282016106df565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073357600080fd5b919050565b6000806040838503121561074b57600080fd5b6107548361071c565b946020939093013593505050565b60008060006060848603121561077757600080fd5b6107808461071c565b925061078e6020850161071c565b9150604084013590509250925092565b6000602082840312156107b057600080fd5b5035919050565b6000602082840312156107c957600080fd5b6106c68261071c565b600080604083850312156107e557600080fd5b6107ee8361071c565b91506107fc6020840161071c565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103b0576103b0610805565b600181811c9082168061084257607f821691505b60208210810361086257634e487b7160e01b600052602260045260246000fd5b50919050565b818103818111156103b0576103b061080556fea264697066735822122095d4930cf27620bcea5a7285e58e73054c5baacb40c41af0a6f7a73e87199e6e64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c577261707065642057455448000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000", + "nonce": "0x5", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xd36cfb4ff52aca0b54fab424d42682f7006aa276d920d954845fce772f15ae29", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x136900", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000134178696520496e66696e6974792053686172640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034158530000000000000000000000000000000000000000000000000000000000", + "nonce": "0x6", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xda899ebfaa31641d314550dd2aeb03595ec494bcd9323a950a1cef844fc8f200", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x136810", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0x7", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1c7c983e044318fc7794666da425f357e85f09fc64fef6f72b1638ed7ccb0925", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x123728", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x8", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x05ed9fcbf60a4649d6b19c4860b6674dee41f7408cf89d7fc02823656bf7ad03", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0xAad5541Eb4e5DE1f353BCc8EaBD124fc42107507", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x228f50", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506040516200158238038062001582833981016040819052620000349162000126565b8181600062000044838262000221565b50600162000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61128580620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101e1578063b88d4fde146101f4578063c87b56dd14610207578063e985e9c51461021a57600080fd5b80636352211e146101a557806370a08231146101b857806395d89b41146101d957600080fd5b8063095ea7b3116100c8578063095ea7b31461015757806323b872dd1461016c57806340c10f191461017f57806342842e0e1461019257600080fd5b806301ffc9a7146100ef57806306fdde0314610117578063081812fc1461012c575b600080fd5b6101026100fd366004610dac565b61022d565b60405190151581526020015b60405180910390f35b61011f61027f565b60405161010e9190610e19565b61013f61013a366004610e2c565b610311565b6040516001600160a01b03909116815260200161010e565b61016a610165366004610e61565b610338565b005b61016a61017a366004610e8b565b610452565b61016a61018d366004610e61565b610483565b61016a6101a0366004610e8b565b610491565b61013f6101b3366004610e2c565b6104ac565b6101cb6101c6366004610ec7565b61050c565b60405190815260200161010e565b61011f610592565b61016a6101ef366004610ee2565b6105a1565b61016a610202366004610f34565b6105ac565b61011f610215366004610e2c565b6105e4565b610102610228366004611010565b610658565b60006001600160e01b031982166380ac58cd60e01b148061025e57506001600160e01b03198216635b5e139f60e01b145b8061027957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028e90611043565b80601f01602080910402602001604051908101604052809291908181526020018280546102ba90611043565b80156103075780601f106102dc57610100808354040283529160200191610307565b820191906000526020600020905b8154815290600101906020018083116102ea57829003601f168201915b5050505050905090565b600061031c82610686565b506000908152600460205260409020546001600160a01b031690565b6000610343826104ac565b9050806001600160a01b0316836001600160a01b0316036103b55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103d157506103d18133610658565b6104435760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016103ac565b61044d83836106e8565b505050565b61045c3382610756565b6104785760405162461bcd60e51b81526004016103ac9061107d565b61044d8383836107b5565b61048d8282610951565b5050565b61044d838383604051806020016040528060008152506105ac565b6000818152600260205260408120546001600160a01b0316806102795760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b60006001600160a01b0382166105765760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103ac565b506001600160a01b031660009081526003602052604090205490565b60606001805461028e90611043565b61048d338383610a93565b6105b63383610756565b6105d25760405162461bcd60e51b81526004016103ac9061107d565b6105de84848484610b61565b50505050565b60606105ef82610686565b600061060660408051602081019091526000815290565b905060008151116106265760405180602001604052806000815250610651565b8061063084610b94565b6040516020016106419291906110cb565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600260205260409020546001600160a01b03166106e55760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061071d826104ac565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610762836104ac565b9050806001600160a01b0316846001600160a01b0316148061078957506107898185610658565b806107ad5750836001600160a01b03166107a284610311565b6001600160a01b0316145b949350505050565b826001600160a01b03166107c8826104ac565b6001600160a01b03161461082c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016103ac565b6001600160a01b03821661088e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103ac565b6108996000826106e8565b6001600160a01b03831660009081526003602052604081208054600192906108c2908490611110565b90915550506001600160a01b03821660009081526003602052604081208054600192906108f0908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b0382166109a75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016103ac565b6000818152600260205260409020546001600160a01b031615610a0c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016103ac565b6001600160a01b0382166000908152600360205260408120805460019290610a35908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603610af45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103ac565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610b6c8484846107b5565b610b7884848484610c95565b6105de5760405162461bcd60e51b81526004016103ac90611136565b606081600003610bbb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610be55780610bcf81611188565b9150610bde9050600a836111b7565b9150610bbf565b60008167ffffffffffffffff811115610c0057610c00610f1e565b6040519080825280601f01601f191660200182016040528015610c2a576020820181803683370190505b5090505b84156107ad57610c3f600183611110565b9150610c4c600a866111cb565b610c57906030611123565b60f81b818381518110610c6c57610c6c6111df565b60200101906001600160f81b031916908160001a905350610c8e600a866111b7565b9450610c2e565b60006001600160a01b0384163b15610d8b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610cd99033908990889088906004016111f5565b6020604051808303816000875af1925050508015610d14575060408051601f3d908101601f19168201909252610d1191810190611232565b60015b610d71573d808015610d42576040519150601f19603f3d011682016040523d82523d6000602084013e610d47565b606091505b508051600003610d695760405162461bcd60e51b81526004016103ac90611136565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107ad565b506001949350505050565b6001600160e01b0319811681146106e557600080fd5b600060208284031215610dbe57600080fd5b813561065181610d96565b60005b83811015610de4578181015183820152602001610dcc565b50506000910152565b60008151808452610e05816020860160208601610dc9565b601f01601f19169290920160200192915050565b6020815260006106516020830184610ded565b600060208284031215610e3e57600080fd5b5035919050565b80356001600160a01b0381168114610e5c57600080fd5b919050565b60008060408385031215610e7457600080fd5b610e7d83610e45565b946020939093013593505050565b600080600060608486031215610ea057600080fd5b610ea984610e45565b9250610eb760208501610e45565b9150604084013590509250925092565b600060208284031215610ed957600080fd5b61065182610e45565b60008060408385031215610ef557600080fd5b610efe83610e45565b915060208301358015158114610f1357600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610f4a57600080fd5b610f5385610e45565b9350610f6160208601610e45565b925060408501359150606085013567ffffffffffffffff80821115610f8557600080fd5b818701915087601f830112610f9957600080fd5b813581811115610fab57610fab610f1e565b604051601f8201601f19908116603f01168101908382118183101715610fd357610fd3610f1e565b816040528281528a6020848701011115610fec57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561102357600080fd5b61102c83610e45565b915061103a60208401610e45565b90509250929050565b600181811c9082168061105757607f821691505b60208210810361107757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600083516110dd818460208801610dc9565b8351908301906110f1818360208801610dc9565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610279576102796110fa565b80820180821115610279576102796110fa565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60006001820161119a5761119a6110fa565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826111c6576111c66111a1565b500490565b6000826111da576111da6111a1565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061122890830184610ded565b9695505050505050565b60006020828403121561124457600080fd5b815161065181610d9656fea2646970667358221220cb618065662e7edd32746d846fe974bcdec24b45727d8217ab8bb697460c03b464736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b4d6f636b2045524337323100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d5f455243373231000000000000000000000000000000000000000000000000", + "nonce": "0x9", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x1a4c5c", + "value": "0x0", + "data": "0x504af48c000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f0800000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000003c4e17b9056272ce1b49f6900d8cfd6171a1869d000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f7700000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000035a4e900000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000017d784000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "nonce": "0xa", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x1dcba", + "value": "0x0", + "data": "0x29b6eca90000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0xb", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionType": "CALL", + "contractName": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "function": "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", + "arguments": [ + "(1, 11155111, 1713164364, [0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d, 0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d], [0, 0], [0xe9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce, 0x01a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a], [1000000, 1000000])", + "[0]", + "[(27, 0x55f217103277c74cf09050ad7b6921a97c4cd51e3d27aad6fc593df454babf58, 0x52b7389372928284c678ebc2d6d6eb11b88f5c469c9c05fde4c3df558f1279dd)]" + ], + "transaction": { + "type": "0x02", + "from": "0x45e8f1acfc89f45720cf11e807ed85b730c67c7e", + "to": "0x5396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "gas": "0x16b706", + "value": "0x0", + "data": "0x5e05cf9e000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000005e0000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000000000000000000000000000000000000661cd04c00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000064e9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024401a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001b55f217103277c74cf09050ad7b6921a97c4cd51e3d27aad6fc593df454babf5852b7389372928284c678ebc2d6d6eb11b88f5c469c9c05fde4c3df558f1279dd", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x2e1bd6096e0362e57c9f7283d763660a65bcc2f230459e824dd9d6208672c86d", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0xc7ee", + "value": "0x16345785d8a0000", + "data": "0xa3912ec8", + "nonce": "0xc", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "1000000000000000000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x1d3a9042588f6c1065d4ca51de234bb29f40fd23", + "gas": "0x2420e", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000d3c21bcecceda1000000", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "500000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x523e8d078be0769e806b8a154f0f7ac6f4cde770", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e000000000000000000000000000000000000000000000000000000746a528800", + "nonce": "0x1", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x591a38ba0f6c4110057b0a4842b87e9796b3ed94", + "gas": "0x241d8", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000002d79883d2000", + "nonce": "0x2", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionIndex": "0xf", + "blockHash": "0x64d86c267a22dfe23a0fed32d8327fb2eac8311dea6d171bcfe37a62bf782208", + "blockNumber": "0x55f334", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x244127", + "gasUsed": "0x103480", + "contractAddress": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "logs": [ + { + "address": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x64d86c267a22dfe23a0fed32d8327fb2eac8311dea6d171bcfe37a62bf782208", + "blockNumber": "0x55f334", + "transactionHash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionIndex": "0xf", + "logIndex": "0x19", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e4b" + }, + { + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x16a693", + "gasUsed": "0x9b5d0", + "contractAddress": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "logs": [ + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c2cb024747e86a05a2d2839dd02ceb78f939f983" + ], + "data": "0x", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "logIndex": "0x6", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000404000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000008000000000000000000000000000000000000000000000000800000000100000000020000000000000000000000000000000000000001000000000000000020000000000000000000000000000000000400000000000000000000000000080000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e54" + }, + { + "transactionHash": "0xfc974f6c8df2578db7fd7422c3218315120a78c63fc02a15adfeb8074998e0d1", + "transactionIndex": "0x6", + "blockHash": "0xc66a8e8dafce7c756ec7f8f3e6004ced94ff119f4d2690c6a3cab7d7318b037c", + "blockNumber": "0x55f336", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x408a01", + "gasUsed": "0x3ccbe7", + "contractAddress": "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e54" + }, + { + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0xfd335", + "gasUsed": "0x9b5d0", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000762f3e2221c0dee575d1bd43145bafeebe965ef2" + ], + "data": "0x", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "logIndex": "0x8", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000200000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000040000000000000000000000000000000000000000000800000000080000000000000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e56" + }, + { + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x4763a3", + "gasUsed": "0x4763a3", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "logs": [ + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000004" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000100000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da1", + "0x8000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x4", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x04020000000000000000000000000000000080400000200000100000000000000000400000000000000000000000040000000000000000010204000000040000000000000100800000000000000000000000000000040005000400000000000008000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000001000010100000000000000000000000000002000000000000000000000000000000000000000000000000000808000001000000000000060000000020000000000000000900000000000000000008000000000000000001000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e59" + }, + { + "transactionHash": "0x2dee73f551b3abed26e8bcff6fdf199076359cad3e452780ea854a81db7b7a56", + "transactionIndex": "0x8", + "blockHash": "0xd46b3accefb441f3c15d14af87ce8b7f58cbfb081076734b47b3c01c54eb1d3e", + "blockNumber": "0x55f339", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x127d50", + "gasUsed": "0x95e0a", + "contractAddress": "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5b" + }, + { + "transactionHash": "0xd36cfb4ff52aca0b54fab424d42682f7006aa276d920d954845fce772f15ae29", + "transactionIndex": "0x5", + "blockHash": "0x5c7e1693354d5cd1d25e6f67528bc02d1ea3555be8a83acaf8638b86b410cbba", + "blockNumber": "0x55f33a", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x596f34", + "gasUsed": "0x9bf7e", + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5d" + }, + { + "transactionHash": "0xda899ebfaa31641d314550dd2aeb03595ec494bcd9323a950a1cef844fc8f200", + "transactionIndex": "0xc", + "blockHash": "0x4df8de86171713e8dcb9b69825e37983e8e5db4f0516a592c2614abb2c505c34", + "blockNumber": "0x55f33b", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x174f2d", + "gasUsed": "0x9bf06", + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + }, + { + "transactionHash": "0x1c7c983e044318fc7794666da425f357e85f09fc64fef6f72b1638ed7ccb0925", + "transactionIndex": "0x6", + "blockHash": "0x12435e24ca8c1c2f67aec6addf959fd149ab08c377897f82e95891a011030941", + "blockNumber": "0x55f33c", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0xcce3b", + "gasUsed": "0x92116", + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e62" + }, + { + "transactionHash": "0x05ed9fcbf60a4649d6b19c4860b6674dee41f7408cf89d7fc02823656bf7ad03", + "transactionIndex": "0x10", + "blockHash": "0x6aae1318428264a2fc074362d9d496a99b53f373f698bb8d6fc5dc54abeead42", + "blockNumber": "0x55f33d", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x1ebea5", + "gasUsed": "0x115336", + "contractAddress": "0xAad5541Eb4e5DE1f353BCc8EaBD124fc42107507", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e61" + }, + { + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x709f0d", + "gasUsed": "0xd2e08", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "0x00000000000000000000000031762cdd4aa65cd6f5f09d7a05a56211720a1168" + ], + "data": "0x", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf" + ], + "data": "0x0000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f08", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x8", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000004", + "0x000000000000000000000000000000000000000000000000000000000000000a" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x9", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000007", + "0x000000000000000000000000000000000000000000000000000000000000000a" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xa", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000003c4e17b9056272ce1b49f6900d8cfd6171a1869d000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f7700000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xb", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000035a4e900000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xc", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000017d784000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xd", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xe", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc421075070000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xf", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x10", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x000000040082000000000000000040000000000090000000020000000000000000000000000000000000000022000000000010000400000000200000000404008000200000000000000000000000000000000000000c0000000400000000000008000010020000000000000000000800000001000000000000000000000000000000000000000040010000000000000020000000040080000000000000000001000000000000001000010000100400080400000000000008003000000000000000200000000020000000000000440000000000008060000102000100000060008000100000000000000000000000000000000000000000000000200000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e62" + }, + { + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x32c5a", + "gasUsed": "0xe8f0", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x000000000000000000000000000000000000000000000000000000000000000b", + "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d" + ], + "data": "0x", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "logIndex": "0x4", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008000000000004000000000000000400000000000000000000000000000000000000000000000000000000000000000000000010004000000000000000000000100800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000002000000040001000000000000000000000000000000000000000000000000000000000000000040000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e66" + }, + { + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "from": "0x45E8f1aCFC89F45720cf11e807eD85B730C67C7e", + "to": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "cumulativeGasUsed": "0x100066", + "gasUsed": "0xb8b3c", + "contractAddress": null, + "logs": [ + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x0000000000000000000000000000000000000000000000000000000000aa36a7", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000000000000000000000000000000000000661cd04c00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000064e9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024401a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x6", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000080000110000000000000000000080000000000000100000000000000000000000000000000000000000040002000000000000000000000000040000000000000000000000000000000000000000000000040000800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000200010000000000000000000000000000000000000000028000000080000000000000000000000000000000000212000000000000000000000000000800000000100000800000000000000000400040000000000000000000000000900000000000000020000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e65" + }, + { + "transactionHash": "0x2e1bd6096e0362e57c9f7283d763660a65bcc2f230459e824dd9d6208672c86d", + "transactionIndex": "0xa", + "blockHash": "0x6afdcc553c494ac7fa319a1a21a07874af034283d416b883c052602ed1aa9dd9", + "blockNumber": "0x55f341", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x13f109", + "gasUsed": "0x6faa", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + }, + { + "transactionHash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionIndex": "0x11", + "blockHash": "0x45eca05b0359867cbc7b68ba8ac73c2ebf9fda1802e2fc098c59a3e611fd241c", + "blockNumber": "0x55f342", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "cumulativeGasUsed": "0x6adf4c", + "gasUsed": "0x10b12", + "contractAddress": null, + "logs": [ + { + "address": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", + "blockHash": "0x45eca05b0359867cbc7b68ba8ac73c2ebf9fda1802e2fc098c59a3e611fd241c", + "blockNumber": "0x55f342", + "transactionHash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionIndex": "0x11", + "logIndex": "0x44", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000000000000000020000000000000000000800000000000000000000002010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000020000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5f" + }, + { + "transactionHash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionIndex": "0x7", + "blockHash": "0x0b478be16ce44504d4d8b271f105badb63dd194cda40b73084160b606f29ac93", + "blockNumber": "0x55f343", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "cumulativeGasUsed": "0x37c4f", + "gasUsed": "0x10aee", + "contractAddress": null, + "logs": [ + { + "address": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x000000000000000000000000000000000000000000000000000000746a528800", + "blockHash": "0x0b478be16ce44504d4d8b271f105badb63dd194cda40b73084160b606f29ac93", + "blockNumber": "0x55f343", + "transactionHash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionIndex": "0x7", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000040000000000020000000000000000000800000000000000000000000010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000800000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5f" + }, + { + "transactionHash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionIndex": "0xd", + "blockHash": "0x6eaa5ed29a93ecffb338b7cfcabda5cca207cb4c78a53debbe59cae7e585656b", + "blockNumber": "0x55f344", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "cumulativeGasUsed": "0xcc9c5", + "gasUsed": "0x10afa", + "contractAddress": null, + "logs": [ + { + "address": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x6eaa5ed29a93ecffb338b7cfcabda5cca207cb4c78a53debbe59cae7e585656b", + "blockNumber": "0x55f344", + "transactionHash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionIndex": "0xd", + "logIndex": "0xb", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000000000000000020000000000000000000800000000000000000020000010000200000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000100000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712301925, + "chain": 11155111, + "multi": false, + "commit": "7ef18ec" +} \ No newline at end of file diff --git a/broadcast/deploy-sepolia.s.sol/11155111/run-1712302101.json b/broadcast/deploy-sepolia.s.sol/11155111/run-1712302101.json new file mode 100644 index 00000000..09b79284 --- /dev/null +++ b/broadcast/deploy-sepolia.s.sol/11155111/run-1712302101.json @@ -0,0 +1,1082 @@ +{ + "transactions": [ + { + "hash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x206770", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca264697066735822122024939a448abbecaf74c9f8ef1d3326da17dd252cccddf0ade66be800061b239364736f6c63430008170033", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "function": null, + "arguments": [ + "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x134c04", + "value": "0x0", + "data": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000c2cb024747e86a05a2d2839dd02ceb78f939f983000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c0700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x1", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfc974f6c8df2578db7fd7422c3218315120a78c63fc02a15adfeb8074998e0d1", + "transactionType": "CREATE", + "contractName": "MainchainGatewayV3", + "contractAddress": "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x798a36", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b506000805460ff1916905561470d8061002a6000396000f3fe60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614007565b90501115610f1d57610e85610e718680614007565b610e7e6020890189614007565b8787611a1f565b610eab610e928680614007565b8660005b602002810190610ea69190614007565b6123a2565b610ed1610eb88680614007565b8660015b602002810190610ecc9190614007565b61194a565b610ef7610ede8680614007565b8660025b602002810190610ef29190614007565b612477565b610f1d610f048680614007565b8660035b602002810190610f189190614007565b612588565b60005b610f2d6040870187614007565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614007565b84818110610f7757610f77613ff1565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d6110983685900385018561409f565b612843565b90506110b16110983685900385018561409f565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b9083908690614173565b60405180910390a160006111756080850160608601613a7f565b9050600061118b61012086016101008701614200565b600181111561119c5761119c613d3c565b036112635760006111b6368690038601610100870161421d565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc368790038701610100880161421d565b60408301519091506112139061014088013561424f565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a0161421d565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d0929190614173565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f9190614262565b60385461138c9084614262565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e69190614262565b60025461138c9084614262565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b369190614279565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b607680546000918261184983614293565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142ce565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b838110156119e95782828281811061199557611995613ff1565b90506020020135603a60008787858181106119b2576119b2613ff1565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d094939291906143f8565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b85811015611b7c57848482818110611a7557611a75613ff1565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa0613ff1565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd613ff1565b9050602002016020810190611b129190614200565b60786000898985818110611b2857611b28613ff1565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c368890038801610100890161421d565b612c6d565b6001611db36040880160208901614200565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d61012088016101008901614200565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a01614200565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a61409f565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d01614200565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca613ff1565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b36919061439a565b84935061208685613229565b61209090836144be565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d90614173565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611297919061421d565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be929190614173565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b6002546037546123659190614262565b6038546001546123759190614262565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612441578282828181106123ed576123ed613ff1565b905060200201356039600087878581811061240a5761240a613ff1565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d094939291906143f8565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b8381101561255257620f42408383838181106124c6576124c6613ff1565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe613ff1565b90506020020135603b600087878581811061251b5761251b613ff1565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d094939291906143f8565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612627578282828181106125d3576125d3613ff1565b90506020020135603c60008787858181106125f0576125f0613ff1565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d094939291906143f8565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144d1565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144be565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101291906144f3565b60006002546001600254846001546127a69190614262565b6127b091906144be565b6127ba919061424f565b610a7691906144d1565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d8385614262565b610ff991906144d1565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b91906144f3565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061424f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add9190614530565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd9190614530565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d699190614530565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd6919061454c565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b9190614530565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b36949392919061456e565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145a4565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614619565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a1919061464c565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144d1565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144be565b9091555050505050565b600082600001828154811061335c5761335c613ff1565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b369392919061467a565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009286169161349391614530565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef836002614262565b6134fa9060026144be565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b8160008151811061355757613557613ff1565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061358657613586613ff1565b60200101906001600160f81b031916908160001a90535060006135aa846002614262565b6135b59060016144be565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e9613ff1565b1a60f81b8282815181106135ff576135ff613ff1565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146aa565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361424f565b85549091506000906137039060019061424f565b905081811461376857600086600001828154811061372357613723613ff1565b906000526020600020015490508087600001848154811061374657613746613ff1565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146c1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a69190614262565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916138339190614530565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a0919061454c565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b613fc1613ecb565b823560ff81168114613fd257600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261401e57600080fd5b83018035915067ffffffffffffffff82111561403957600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561406357600080fd5b61406b613ecb565b9050813561407881613a5f565b8152602082013561408881613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140b257600080fd5b60405160a0810181811067ffffffffffffffff821117156140e357634e487b7160e01b600052604160045260246000fd5b6040528235815260208301356140f881613f02565b602082015261410a8460408501614051565b604082015261411c8460a08501614051565b606082015261412f846101008501613f0f565b60808201529392505050565b803561414681613a5f565b6001600160a01b03908116835260208201359061416282613a5f565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561419481613f02565b61419d81613d52565b806040840152506141b4606083016040850161413b565b6141c460c0830160a0850161413b565b6101206101008401356141d681613f02565b6141df81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561421257600080fd5b8135610ff981613f02565b60006060828403121561422f57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614239565b8082028115828204841417610a7657610a76614239565b602081016010831061428d5761428d613d3c565b91905290565b6000600182016142a5576142a5614239565b5060010190565b80516142b781613d52565b825260208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516142ef81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143646101208401826142ac565b509392505050565b6001600160e01b03198316815260408101600b831061438d5761438d613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156143ed5781356143d281613a5f565b6001600160a01b0316875295820195908201906001016143bf565b509495945050505050565b60408152600061440c6040830186886143af565b82810360208401528381526001600160fb1b0384111561442b57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061445860608301888a6143af565b6020838203602085015261446d82888a6143af565b848103604086015285815286925060200160005b868110156144af57833561449481613f02565b61449d81613d52565b82529282019290820190600101614481565b509a9950505050505050505050565b80820180821115610a7657610a76614239565b6000826144ee57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561450557600080fd5b5051919050565b60005b8381101561452757818101518382015260200161450f565b50506000910152565b6000825161454281846020870161450c565b9190910192915050565b60006020828403121561455e57600080fd5b81518015158114610ff957600080fd5b60c0810161457c82876142ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516145dc81601785016020880161450c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161460d81602884016020880161450c565b01602801949350505050565b602081526000825180602084015261463881604085016020870161450c565b601f01601f19169190910160400192915050565b60006020828403121561465e57600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a0810161468882866142ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146b9576146b9614239565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec8cc7f89d632f5b6c36d2cdb75ab664383134c4e4a6f2157e2624267b4eadfe64736f6c63430008170033", + "nonce": "0x2", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": [ + "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x134c04", + "value": "0x0", + "data": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000762f3e2221c0dee575d1bd43145bafeebe965ef2000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c0700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x3", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionType": "CREATE", + "contractName": "MainchainBridgeManager", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "function": null, + "arguments": [ + "2", + "4", + "2021", + "0x0000000000000000000000000000000000000000", + "[]", + "[0xbA8E32D874948dF4Cbe72284De91CC4968293BCe]", + "[0x45E8f1aCFC89F45720cf11e807eD85B730C67C7e]", + "[100]", + "[]", + "[]" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x8e0ff6", + "value": "0x0", + "data": "0x60a06040526040516200659938038062006599833981016040819052620000269162001523565b8181600160ff1b8c8c8c8c8c8c8c8c836200004181620001a3565b505060016000805160206200657983398151915255620000628888620002b2565b50620000729050600286620003c7565b604080516020808201839052600c60608301526b212924a223a2afa0a226a4a760a11b6080808401919091528284018a905283518084038201815260a0840185528051908301207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08501527f9d3fa1662ea89365eb7af36506f0ad5413bd7e078960d8481ff4718763aaa8e960e08501527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a56101008501526101208085019190915284518085039091018152610140909301909352815191012090526200015d81838562000471565b50505050505050505062000177816200089160201b60201c565b5062000185600030620008c4565b62000191828262000960565b5050505050505050505050506200196e565b606081620001b18162000a23565b8251806001600160401b03811115620001ce57620001ce62001334565b604051908082528060200260200182016040528015620001f8578160200160208202803683370190505b509250806000036200020b5750620002ac565b6000805160206200653983398151915260006314d72edb60e21b815b84811015620002a6578781815181106200024557620002456200165e565b60200260200101519250620002608362000a5f60201b60201c565b6200026c838362000a97565b62000278848462000c76565b8782815181106200028d576200028d6200165e565b9115156020928302919091019091015260010162000227565b50505050505b50919050565b60008082841115620002ea576040516387f6f09560e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b60008051602062006559833981519152549150620003267fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff5490565b90506200034160008051602062006559833981519152859055565b6200036b7fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff849055565b8284620003876000805160206200657983398151915262000c96565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111562000400576200040062001674565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111562000444576200044462001674565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60606200047f838362000cbe565b6200048a8162000a23565b82518551811480156200049d5750845181145b620004ca576040516306b5667560e21b81526001600160e01b0319600035166004820152602401620002e1565b806001600160401b03811115620004e557620004e562001334565b6040519080825280602002602001820160405280156200050f578160200160208202803683370190505b5092508060000362000522575062000889565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c917f8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3917fd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d917f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3919081908190815b89811015620007db578d8181518110620005e557620005e56200165e565b602002602001015194508c81815181106200060457620006046200165e565b602002602001015193506200061f8562000ddc60201b60201c565b6200062a8462000ddc565b8e81815181106200063f576200063f6200165e565b60200260200101516001600160601b03166000036200068057604051637f11b8a360e11b81526001600160e01b0319600035166004820152602401620002e1565b6200068c898662000e13565b806200069f57506200069f898562000e13565b80620006b25750620006b2878662000e13565b80620006c55750620006c5878562000e13565b158c8281518110620006db57620006db6200165e565b6020026020010190151590811515815250508b81815181106200070257620007026200165e565b602002602001015115620007d2576200071c898662000c76565b5062000729878562000c76565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f90829081106200077257620007726200165e565b6020908102919091018101516001600160601b03169083018190526200079990846200168a565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101620005c7565b50620008087f6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c8362000e36565b5062000840635ebae8a060e01b8d8d6040516020016200082a92919062001728565b60408051601f1981840301815291905262000e50565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f6040516200087794939291906200175a565b60405180910390a15050505050505050505b509392505050565b600281905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b8060036000846004811115620008de57620008de62001674565b6004811115620008f257620008f262001674565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600481111562000933576200093362001674565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60005b825181101562000a1e57306001600160a01b03168282815181106200098c576200098c6200165e565b60200260200101516001600160a01b031603620009cb5760405163053265f160e01b81526001600160e01b0319600035166004820152602401620002e1565b62000a15838281518110620009e457620009e46200165e565b602002602001015183838151811062000a015762000a016200165e565b6020026020010151620008c460201b60201c565b60010162000963565b505050565b62000a2e816200118b565b1562000a5c57604051630d697db160e11b81526001600160e01b0319600035166004820152602401620002e1565b50565b806001600160a01b03163b60000362000a5c57604051630bfc64a360e21b81526001600160a01b0382166004820152602401620002e1565b6040516001600160e01b03198216602482015260009060440160408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169062000afb90859062001810565b600060405180830381855afa9150503d806000811462000b38576040519150601f19603f3d011682016040523d82523d6000602084013e62000b3d565b606091505b50915091508162000c1f57846001600160a01b03168360405160240162000b6591906200185c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525162000b9c919062001810565b600060405180830381855afa9150503d806000811462000bd9576040519150601f19603f3d011682016040523d82523d6000602084013e62000bde565b606091505b5090925090508162000c1f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b8080602001905181019062000c35919062001871565b62000c6f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b5050505050565b600062000c8d836001600160a01b03841662001236565b90505b92915050565b600062000ca1825490565b905062000cb98262000cb58360016200168a565b9055565b919050565b81518151606091908082016001600160401b0381111562000ce35762000ce362001334565b60405190808252806020026020018201604052801562000d0d578160200160208202803683370190505b50925060005b8281101562000d6f5785818151811062000d315762000d316200165e565b602002602001015184828151811062000d4e5762000d4e6200165e565b6001600160a01b039092166020928302919091019091015260010162000d13565b60005b8281101562000dd25785818151811062000d905762000d906200165e565b602002602001015185838151811062000dad5762000dad6200165e565b6001600160a01b03909216602092830291909101909101526001918201910162000d72565b5050505092915050565b6001600160a01b03811662000a5c5760405163104c66df60e31b81526001600160e01b0319600035166004820152602401620002e1565b6001600160a01b0381166000908152600183016020526040812054151562000c8d565b600062000c908362000e49818562001288565b9250829055565b600062000e6c60008051602062006539833981519152620012a8565b8051909150600081900362000e815750505050565b6000816001600160401b0381111562000e9e5762000e9e62001334565b60405190808252806020026020018201604052801562000ec8578160200160208202803683370190505b5090506000826001600160401b0381111562000ee85762000ee862001334565b60405190808252806020026020018201604052801562000f1d57816020015b606081526020019060019003908162000f075790505b5090506000868660405160200162000f3792919062001895565b604051602081830303815290604052905060008160405160240162000f5d91906200185c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015620011415786818151811062000faa5762000faa6200165e565b60200260200101516001600160a01b03168360405162000fcb919062001810565b6000604051808303816000865af19150503d80600081146200100a576040519150601f19603f3d011682016040523d82523d6000602084013e6200100f565b606091505b508683815181106200102557620010256200165e565b602002602001018684815181106200104157620010416200165e565b60200260200101829052821515151581525050508481815181106200106a576200106a6200165e565b602002602001015162001138578681815181106200108c576200108c6200165e565b60200260200101516001600160a01b031682604051620010ad919062001810565b6000604051808303816000865af19150503d8060008114620010ec576040519150601f19603f3d011682016040523d82523d6000602084013e620010f1565b606091505b508683815181106200110757620011076200165e565b602002602001018684815181106200112357620011236200165e565b60200260200101829052821515151581525050505b60010162000f8c565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051620011799493929190620018c8565b60405180910390a15050505050505050565b600081516000036200119f57506000919050565b60005b60018351038110156200122d57600181015b83518110156200122357838181518110620011d357620011d36200165e565b60200260200101516001600160a01b0316848381518110620011f957620011f96200165e565b60200260200101516001600160a01b0316036200121a575060019392505050565b600101620011b4565b50600101620011a2565b50600092915050565b60008181526001830160205260408120546200127f5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000c90565b50600062000c90565b815481018181101562000c9057634e487b7160005260116020526024601cfd5b60606000620012b783620012be565b9392505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156200131057602002820191906000526020600020905b815481526020019060010190808311620012fb575b50505050509050919050565b80516001600160a01b038116811462000cb957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562001375576200137562001334565b604052919050565b60006001600160401b0382111562001399576200139962001334565b5060051b60200190565b600082601f830112620013b557600080fd5b81516020620013ce620013c8836200137d565b6200134a565b8083825260208201915060208460051b870101935086841115620013f157600080fd5b602086015b8481101562001418576200140a816200131c565b8352918301918301620013f6565b509695505050505050565b600082601f8301126200143557600080fd5b8151602062001448620013c8836200137d565b8083825260208201915060208460051b8701019350868411156200146b57600080fd5b602086015b84811015620014185780516001600160601b0381168114620014925760008081fd5b835291830191830162001470565b600082601f830112620014b257600080fd5b81516020620014c5620013c8836200137d565b80838252602082019150600560208560051b880101945087851115620014ea57600080fd5b602087015b8581101562001516578051828110620015085760008081fd5b8452928401928401620014ef565b5090979650505050505050565b6000806000806000806000806000806101408b8d0312156200154457600080fd5b8a51995060208b0151985060408b015197506200156460608c016200131c565b60808c01519097506001600160401b03808211156200158257600080fd5b620015908e838f01620013a3565b975060a08d0151915080821115620015a757600080fd5b620015b58e838f01620013a3565b965060c08d0151915080821115620015cc57600080fd5b620015da8e838f01620013a3565b955060e08d0151915080821115620015f157600080fd5b620015ff8e838f0162001423565b94506101008d01519150808211156200161757600080fd5b620016258e838f01620014a0565b93506101208d01519150808211156200163d57600080fd5b506200164c8d828e01620013a3565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b8082018082111562000c9057634e487b7160e01b600052601160045260246000fd5b60008151808452602080850194506020840160005b83811015620016e85781516001600160a01b031687529582019590820190600101620016c1565b509495945050505050565b60008151808452602080850194506020840160005b83811015620016e857815115158752958201959082019060010162001708565b6040815260006200173d6040830185620016ac565b8281036020840152620017518185620016f3565b95945050505050565b6080815260006200176f6080830187620016f3565b82810360208481019190915286518083528782019282019060005b81811015620017b15784516001600160601b0316835293830193918301916001016200178a565b50508481036040860152620017c78188620016ac565b925050508281036060840152620017df8185620016ac565b979650505050505050565b60005b8381101562001807578181015183820152602001620017ed565b50506000910152565b6000825162001824818460208701620017ea565b9190910192915050565b6000815180845262001848816020860160208601620017ea565b601f01601f19169290920160200192915050565b60208152600062000c8d60208301846200182e565b6000602082840312156200188457600080fd5b81518015158114620012b757600080fd5b6001600160e01b0319831681528151600090620018ba816004850160208701620017ea565b919091016004019392505050565b608081526000620018dd60808301876200182e565b602083820381850152620018f28288620016ac565b91508382036040850152620019088287620016f3565b915083820360608501528185518084528284019150828160051b85010183880160005b838110156200195d57601f198784030185526200194a8383516200182e565b948601949250908501906001016200192b565b50909b9a5050505050505050505050565b608051614ba162001998600039600081816102c5015281816107c501526108510152614ba16000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b1461050c578063e75235b814610537578063e9c034981461053f578063f80b535214610552578063fdc4fa471461055a57600080fd5b8063cc7e6b3b146104be578063d0a50db0146104de578063d78392f8146104e6578063dafae408146104f957600080fd5b8063b9c36209116100e9578063b9c3620914610464578063bc9182fd1461048c578063bc96180b1461049f578063c441c4a8146104a757600080fd5b80639b19dbfd146103db5780639b2ee437146103e3578063b384abef146103f6578063b405aaf21461045157600080fd5b80633644e515116101925780637de5dedd116101615780637de5dedd14610332578063800eaab31461033a578063865e6fd31461034d578063901979d51461036057600080fd5b80633644e515146102c05780635e05cf9e146102e7578063776fb1ec146102fc5780637d465f791461031f57600080fd5b80631f425338116101ce5780631f425338146102675780632d6d7d731461027a57806334d5f37b1461028d57806335da8121146102ad57600080fd5b806301a5f43f1461020057806306aba0e1146102295780630a44fa431461023f5780630f7c318914610252575b600080fd5b61021361020e366004613b79565b61056d565b6040516102209190613c50565b60405180910390f35b610231610620565b604051908152602001610220565b61023161024d366004613c63565b61063d565b61025a6106c2565b6040516102209190613cde565b610213610275366004613c63565b6106db565b61025a610288366004613c63565b610728565b61023161029b366004613cf1565b60006020819052908152604090205481565b6102136102bb366004613c63565b61076c565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6102f5366004613d4e565b6107b2565b005b61030f61030a366004613cf1565b6107f1565b6040519015158152602001610220565b6102fa61032d366004613dea565b61083e565b610231610876565b6102fa610348366004613fe8565b6108f2565b6102fa61035b36600461405a565b610937565b6103c361036e36600461408d565b6001600160a01b039081166000908152600080516020614b0c83398151915260209081526040808320549093168252600080516020614aec83398151915290522054600160a01b90046001600160601b031690565b6040516001600160601b039091168152602001610220565b61025a610952565b6102fa6103f136600461408d565b61095c565b6104406104043660046140a8565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102209594939291906140f0565b61030f61045f36600461408d565b610af3565b6104776104723660046140a8565b610b0d565b60408051928352602083019190915201610220565b61025a61049a36600461411e565b610b2e565b610231610c1f565b6104af610c2a565b6040516102209392919061418c565b6104d16104cc366004613c63565b610c54565b60405161022091906141cf565b610231610c92565b6103c36104f436600461408d565b610cab565b61030f610507366004613cf1565b610cb6565b61051f61051a3660046141e2565b610cf3565b6040516001600160a01b039091168152602001610220565b610477610d6e565b61021361054d366004613c63565b610d9f565b61025a610de5565b61025a610568366004613c63565b610def565b6060610577610ed6565b61061587878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250610f0692505050565b979650505050505050565b6000610638600080516020614b4c8339815191525490565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061067e92508391506112829050565b6106ba8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112ba92505050565b949350505050565b6060610638600080516020614a8c83398151915261133e565b60606106e5610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061134b92505050565b9392505050565b606061072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611416915050565b92915050565b6060610776610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b6107bb33611662565b6107ea85858585857f0000000000000000000000000000000000000000000000000000000000000000336116a4565b5050505050565b60008060008381527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff166004811115610836576108366140ca565b141592915050565b61084733611662565b6107ea85858585857f000000000000000000000000000000000000000000000000000000000000000033611749565b600061088e600080516020614aac8339815191525490565b60016108a6600080516020614aac8339815191525490565b6108d46108bf600080516020614b4c8339815191525490565b600080516020614acc833981519152906117a5565b6108de9190614213565b6108e89190614226565b6106389190614239565b333014610929576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b60405180910390fd5b61093382826117d0565b5050565b61093f610ed6565b6109488161187e565b61093382826118b4565b6060610638611958565b61096533611662565b61096e81611971565b336000908152600080516020614aec83398151915260208190526040909120546001600160a01b0390811690831681036109c657604051630669b93360e31b81526001600160a01b0384166004820152602401610920565b600080516020614b2c83398151915260006109e182846119a6565b80156109f257506109f282866119bb565b905080610a1d5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610920565b6001600160a01b038381166000818152600080516020614b0c8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610ab0906364b18d0960e11b906060015b6040516020818303038152906040526119d0565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b6000610766600080516020614b2c83398151915283611cd8565b600080610b18610ed6565b610b228484611cfa565b915091505b9250929050565b8051606090806001600160401b03811115610b4b57610b4b613e2d565b604051908082528060200260200182016040528015610b74578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110610ba657610ba6614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b0316848281518110610bf757610bf7614270565b6001600160a01b0390921660209283029190910190910152600101610b89565b505050919050565b600061063860025490565b6060806060610c37611def565b9250610c4283610b2e565b9150610c4d83611e1a565b9050909192565b6060610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e1a92505050565b6000610638600080516020614b2c833981519152611f03565b600061076682611f0d565b6000610cd16108bf600080516020614b4c8339815191525490565b600080516020614aac83398151915254610ceb9084614286565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610d2a57610d2a6140ca565b60ff1681526020810191909152604001600020546001600160a01b0316905080610d69578160405163409140df60e11b8152600401610920919061429d565b919050565b600080610d87600080516020614acc8339815191525490565b600080516020614aac83398151915254915091509091565b6060610da9610ed6565b610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611f4592505050565b6060610638611def565b606081806001600160401b03811115610e0a57610e0a613e2d565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b509150600080516020614b0c83398151915260005b82811015610ecd57816000878784818110610e6557610e65614270565b9050602002016020810190610e7a919061408d565b6001600160a01b0390811682526020820192909252604001600020548551911690859083908110610ead57610ead614270565b6001600160a01b0390921660209283029190910190910152600101610e48565b50505092915050565b333014610f04576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b565b6060610f12838361222a565b610f1b81611282565b8251855181148015610f2d5750845181145b610f58576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b806001600160401b03811115610f7057610f70613e2d565b604051908082528060200260200182016040528015610f99578160200160208202803683370190505b50925080600003610faa575061127a565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b0c83398151915291600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156111fb578d818151811061103357611033614270565b602002602001015194508c818151811061104f5761104f614270565b6020026020010151935061106285611971565b61106b84611971565b8e818151811061107d5761107d614270565b60200260200101516001600160601b03166000036110bc576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b6110c68986611cd8565b806110d657506110d68985611cd8565b806110e657506110e68786611cd8565b806110f657506110f68785611cd8565b158c828151811061110957611109614270565b6020026020010190151590811515815250508b818151811061112d5761112d614270565b6020026020010151156111f35761114489866119bb565b5061114f87856119bb565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f908290811061119557611195614270565b6020908102919091018101516001600160601b03169083018190526111ba9084614213565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611019565b50611214600080516020614b4c83398151915283612334565b50611233635ebae8a060e01b8d8d604051602001610a9c9291906142b7565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161126894939291906142e5565b60405180910390a15050505050505050505b509392505050565b61128b8161234b565b156112b7576000356001600160e01b031916604051630d697db160e11b8152600401610920919061425b565b50565b6000816112c681611282565b600080516020614aec83398151915260005b8451811015610c17578160008683815181106112f6576112f6614270565b6020908102919091018101516001600160a01b031682528101919091526040016000205461133490600160a01b90046001600160601b031685614213565b93506001016112d8565b60606000610721836123ea565b60608161135781611282565b8251806001600160401b0381111561137157611371613e2d565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b509250600080516020614a8c83398151915260005b8281101561140d576113e38682815181106113cc576113cc614270565b6020026020010151836119a690919063ffffffff16565b8582815181106113f5576113f5614270565b911515602092830291909101909101526001016113af565b50505050919050565b606082516001600160401b0381111561143157611431613e2d565b60405190808252806020026020018201604052801561145a578160200160208202803683370190505b50905060005b8351811015611569576003600085838151811061147f5761147f614270565b60200260200101516004811115611498576114986140ca565b60048111156114a9576114a96140ca565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114dd576114dd614270565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611535575060006001600160a01b031682828151811061152257611522614270565b60200260200101516001600160a01b0316145b15611561576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b600101611460565b5092915050565b60608161157c81611282565b8251806001600160401b0381111561159657611596613e2d565b6040519080825280602002602001820160405280156115bf578160200160208202803683370190505b509250806000036115d0575061165c565b600080516020614a8c83398151915260006314d72edb60e21b815b848110156116565787818151811061160557611605614270565b602002602001015192506116188361187e565b6116228383612446565b61162c84846119bb565b87828151811061163e5761163e614270565b911515602092830291909101909101526001016115eb565b50505050505b50919050565b61166b81611f0d565b6001600160601b03166000036112b7576000356001600160e01b0319166003604051620f948f60ea1b8152600401610920929190614332565b6116b66116b0886144a3565b826125d9565b5060006116ca6116c5896144a3565b6126df565b905061173f6116d8896144a3565b8888888861172b896116eb89600061281e565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b61173a8a6116eb8a600161281e565b612857565b5050505050505050565b600061175d61175789614577565b83612c4e565b9050600061177261176d8a614577565b612d98565b905061179a828989898961178b8a6116eb89600061281e565b61173a8b6116eb8a600161281e565b505050505050505050565b600082548015611569578281029150808204831461156957634e487b7160005260116020526024601cfd5b60005b825181101561187957306001600160a01b03168282815181106117f8576117f8614270565b60200260200101516001600160a01b031603611835576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b61187183828151811061184a5761184a614270565b602002602001015183838151811061186457611864614270565b6020026020010151612ecf565b6001016117d3565b505050565b806001600160a01b03163b6000036112b757604051630bfc64a360e21b81526001600160a01b0382166004820152602401610920565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156118ea576118ea6140ca565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561192b5761192b6140ca565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6060610638600080516020614b2c83398151915261133e565b6001600160a01b0381166112b7576000356001600160e01b03191660405163104c66df60e31b8152600401610920919061425b565b6000610721836001600160a01b038416612f62565b6000610721836001600160a01b038416613055565b60006119e9600080516020614a8c83398151915261133e565b805190915060008190036119fd5750505050565b6000816001600160401b03811115611a1757611a17613e2d565b604051908082528060200260200182016040528015611a40578160200160208202803683370190505b5090506000826001600160401b03811115611a5d57611a5d613e2d565b604051908082528060200260200182016040528015611a9057816020015b6060815260200190600190039081611a7b5790505b50905060008686604051602001611aa8929190614665565b6040516020818303038152906040529050600081604051602401611acc91906146c2565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015611c9057868181518110611b1557611b15614270565b60200260200101516001600160a01b031683604051611b3491906146d5565b6000604051808303816000865af19150503d8060008114611b71576040519150601f19603f3d011682016040523d82523d6000602084013e611b76565b606091505b50868381518110611b8957611b89614270565b60200260200101868481518110611ba257611ba2614270565b6020026020010182905282151515158152505050848181518110611bc857611bc8614270565b6020026020010151611c8857868181518110611be657611be6614270565b60200260200101516001600160a01b031682604051611c0591906146d5565b6000604051808303816000865af19150503d8060008114611c42576040519150601f19603f3d011682016040523d82523d6000602084013e611c47565b606091505b50868381518110611c5a57611c5a614270565b60200260200101868481518110611c7357611c73614270565b60200260200101829052821515151581525050505b600101611afb565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051611cc6949392919061473e565b60405180910390a15050505050505050565b6001600160a01b03811660009081526001830160205260408120541515610721565b60008082841115611d2c576000356001600160e01b0319166040516387f6f09560e01b8152600401610920919061425b565b600080516020614acc833981519152549150611d54600080516020614aac8339815191525490565b9050611d6d600080516020614acc833981519152859055565b611d84600080516020614aac833981519152849055565b8284611daf7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6130a8565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606106387f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61133e565b8051606090806001600160401b03811115611e3757611e37613e2d565b604051908082528060200260200182016040528015611e60578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110611e9257611e92614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b0316848281518110611ee357611ee3614270565b6001600160601b0390921660209283029190910190910152600101611e75565b6000610766825490565b6001600160a01b03166000908152600080516020614aec8339815191526020526040902054600160a01b90046001600160601b031690565b606081611f5181611282565b8251806001600160401b03811115611f6b57611f6b613e2d565b604051908082528060200260200182016040528015611f94578160200160208202803683370190505b50925080600003611fa5575061165c565b60408051808201909152600080825260208201819052600080516020614b0c833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156121aa578c818151811061202e5761202e614270565b6020908102919091018101516001600160a01b038082166000908152928c90526040909220549091169550935061206485611971565b61206d84611971565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b031691830191909152909350908516146120e1576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b6120eb8785611cd8565b80156120fc57506120fc8886611cd8565b8c828151811061210e5761210e614270565b6020026020010190151590811515815250508b818151811061213257612132614270565b6020026020010151156121a25761214988866119a6565b5061215487856119a6565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b031916905592881682528881529181205582015161219f906001600160601b031684614213565b92505b600101612014565b506121c3600080516020614b4c833981519152836130c3565b506121e263c48549de60e01b8d8d604051602001610a9c9291906142b7565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d60405161221392919061478b565b60405180910390a150505050505050505050919050565b81518151606091908082016001600160401b0381111561224c5761224c613e2d565b604051908082528060200260200182016040528015612275578160200160208202803683370190505b50925060005b828110156122cf5785818151811061229557612295614270565b60200260200101518482815181106122af576122af614270565b6001600160a01b039092166020928302919091019091015260010161227b565b60005b8281101561232a578581815181106122ec576122ec614270565b602002602001015185838151811061230657612306614270565b6001600160a01b0390921660209283029190910190910152600191820191016122d2565b5050505092915050565b60006107668361234485856130d3565b9250829055565b6000815160000361235e57506000919050565b60005b60018351038110156123e157600181015b83518110156123d85783818151811061238d5761238d614270565b60200260200101516001600160a01b03168483815181106123b0576123b0614270565b60200260200101516001600160a01b0316036123d0575060019392505050565b600101612372565b50600101612361565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561243a57602002820191906000526020600020905b815481526020019060010190808311612426575b50505050509050919050565b600081604051602401612459919061425b565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906124a29085906146d5565b600060405180830381855afa9150503d80600081146124dd576040519150601f19603f3d011682016040523d82523d6000602084013e6124e2565b606091505b5091509150816125a457846001600160a01b03168360405160240161250791906146c2565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161253c91906146d5565b600060405180830381855afa9150503d8060008114612577576040519150601f19603f3d011682016040523d82523d6000602084013e61257c565b606091505b509092509050816125a457838560405163069d427960e11b81526004016109209291906147b0565b808060200190518101906125b891906147d3565b6107ea57838560405163069d427960e11b81526004016109209291906147b0565b602082015160009080820361261b5760405163092048d160e11b8152600080356001600160e01b03191660048301526024820152466044820152606401610920565b6002546126299085906130f2565b6000612634856126df565b905061263f82613193565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461269b576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516126cf9291906148e2565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561270d5761270d613e2d565b604051908082528060200260200182016040528015612736578160200160208202803683370190505b5060c086015190915060005b8251811015612795578660a00151818151811061276157612761614270565b60200260200101518051906020012083828151811061278257612782614270565b6020908102919091010152600101612742565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061286557508483145b612890576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b60008080856001600160401b038111156128ac576128ac613e2d565b6040519080825280602002602001820160405280156128d5578160200160208202803683370190505b5090506000866001600160401b038111156128f2576128f2613e2d565b60405190808252806020026020018201604052801561291b578160200160208202803683370190505b50905060008060003660005b8b811015612aac578c8c8281811061294157612941614270565b90506060020191508e8e8281811061295b5761295b614270565b9050602002016020810190612970919061490c565b92506000836001811115612986576129866140ca565b036129f0576129ab8b61299c602085018561492d565b8460200135856040013561322f565b945084878a6129b981614950565b9b50815181106129cb576129cb614270565b60200260200101906001600160a01b031690816001600160a01b031681525050612a61565b6001836001811115612a0457612a046140ca565b03612a3a57612a1a8a61299c602085018561492d565b9450848689612a2881614950565b9a50815181106129cb576129cb614270565b6000356001600160e01b031916604051630612418f60e11b8152600401610920919061425b565b846001600160a01b0316846001600160a01b031610612aa1576000356001600160e01b031916604051635d3dcd3160e01b8152600401610920919061425b565b849350600101612927565b50505085845250508281526020808c015160009081526001825260408082208e51835290925290812090612ade613257565b90506000612aeb85613261565b9050818110612b725780600003612b23576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b66838f61326c565b50505050505050612c45565b600082612b7d6132d9565b612b879190614226565b612b92906001614213565b90506000612b9f86613261565b9050818110612c1e5780600003612bd7576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050612c45565b6000356001600160e01b031916604051634ccfe64360e11b8152600401610920919061425b565b50505050505050565b612c8e6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b612ca7612ca084604001516001611416565b84906132e3565b9050612cbe600254826130f290919063ffffffff16565b6000612cc9826126df565b90506000612cd76000613193565b60008181527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602090815260409091209087015160018201859055600690910155905082518114612d49576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85612d7689612d98565b8989604051612d889493929190614969565b60405180910390a3505092915050565b60608101516040820151608083015151600092919083906001600160401b03811115612dc657612dc6613e2d565b604051908082528060200260200182016040528015612def578160200160208202803683370190505b5060a086015190915060005b8251811015612e4e5786608001518181518110612e1a57612e1a614270565b602002602001015180519060200120838281518110612e3b57612e3b614270565b6020908102919091010152600101612dfb565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b8060036000846004811115612ee657612ee66140ca565b6004811115612ef757612ef76140ca565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826004811115612f3557612f356140ca565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6000818152600183016020526040812054801561304b576000612f86600183614226565b8554909150600090612f9a90600190614226565b9050818114612fff576000866000018281548110612fba57612fba614270565b9060005260206000200154905080876000018481548110612fdd57612fdd614270565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061301057613010614a50565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610766565b6000915050610766565b600081815260018301602052604081205461309c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610766565b506000610766565b9055565b60006130b2825490565b9050610d69826130a4836001614213565b600061076683612344858561340d565b815481018181101561076657634e487b7160005260116020526024601cfd5b60008260600151511180156131105750816080015151826060015151145b801561312557508160a0015151826060015151145b801561313a57508160c0015151826060015151145b613165576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b61316f8142614213565b826040015111156109335760405163ad89be9d60e01b815260040160405180910390fd5b600081815260208190526040812054908190036131c25750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906000825460ff1660048111156131f4576131f46140ca565b036132125760405163757a436360e01b815260040160405180910390fd5b505050600090815260208190526040902080546001019081905590565b6000806000613240878787876135e8565b9150915061324d816136d5565b5095945050505050565b6000610638610876565b6000610766826112ba565b6132758161388b565b1561093357815460ff19166002178255600080613291836138a5565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba83836040516132cb929190614a66565b60405180910390a250505050565b6000610638610620565b6133236040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561335a5761335a613e2d565b604051908082528060200260200182016040528015613383578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b836040015151811015611569578281815181106133cf576133cf614270565b6020026020010151826060015182815181106133ed576133ed614270565b6001600160a01b03909216602092830291909101909101526001016133b0565b600082548281101561342c57634e487b7160005260116020526024601cfd5b9190910392915050565b60048301548110156134e95782600801600084600401838154811061345d5761345d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106134a6576134a6614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613436565b5060005b60058301548110156135a05782600801600084600501838154811061351457613514614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600584018054600786019291908490811061355d5761355d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016134ed565b50815460ff1916825560006001830181905560028301819055600383018190556135ce906004840190613b03565b6135dc600583016000613b03565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136cc565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136cc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561369c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136c5576000600192509250506136cc565b9150600090505b94509492505050565b60008160048111156136e9576136e96140ca565b036136f15750565b6001816004811115613705576137056140ca565b036137525760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610920565b6002816004811115613766576137666140ca565b036137b35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610920565b60038160048111156137c7576137c76140ca565b0361381f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610920565b6004816004811115613833576138336140ca565b036112b75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610920565b600081602001516000148061076657505060200151461490565b6060806138b18361388b565b6138ef57602083015160405163092048d160e11b81526000356001600160e01b03191660048201526024810191909152466044820152606401610920565b8260600151516001600160401b0381111561390c5761390c613e2d565b604051908082528060200260200182016040528015613935578160200160208202803683370190505b5091508260600151516001600160401b0381111561395557613955613e2d565b60405190808252806020026020018201604052801561398857816020015b60608152602001906001900390816139735790505b50905060005b836060015151811015613afd578360c0015181815181106139b1576139b1614270565b60200260200101515a116139e4576139c8846126df565b6040516307aec4ab60e21b815260040161092091815260200190565b836060015181815181106139fa576139fa614270565b60200260200101516001600160a01b031684608001518281518110613a2157613a21614270565b60200260200101518560c001518381518110613a3f57613a3f614270565b6020026020010151908660a001518481518110613a5e57613a5e614270565b6020026020010151604051613a7391906146d5565b600060405180830381858888f193505050503d8060008114613ab1576040519150601f19603f3d011682016040523d82523d6000602084013e613ab6565b606091505b50848381518110613ac957613ac9614270565b60200260200101848481518110613ae257613ae2614270565b6020908102919091010191909152901515905260010161398e565b50915091565b50805460008255906000526020600020908101906112b791905b80821115613b315760008155600101613b1d565b5090565b60008083601f840112613b4757600080fd5b5081356001600160401b03811115613b5e57600080fd5b6020830191508360208260051b8501011115610b2757600080fd5b60008060008060008060608789031215613b9257600080fd5b86356001600160401b0380821115613ba957600080fd5b613bb58a838b01613b35565b90985096506020890135915080821115613bce57600080fd5b613bda8a838b01613b35565b90965094506040890135915080821115613bf357600080fd5b50613c0089828a01613b35565b979a9699509497509295939492505050565b60008151808452602080850194506020840160005b83811015613c45578151151587529582019590820190600101613c27565b509495945050505050565b6020815260006107216020830184613c12565b60008060208385031215613c7657600080fd5b82356001600160401b03811115613c8c57600080fd5b613c9885828601613b35565b90969095509350505050565b60008151808452602080850194506020840160005b83811015613c455781516001600160a01b031687529582019590820190600101613cb9565b6020815260006107216020830184613ca4565b600060208284031215613d0357600080fd5b5035919050565b60008083601f840112613d1c57600080fd5b5081356001600160401b03811115613d3357600080fd5b602083019150836020606083028501011115610b2757600080fd5b600080600080600060608688031215613d6657600080fd5b85356001600160401b0380821115613d7d57600080fd5b9087019060e0828a031215613d9157600080fd5b90955060208701359080821115613da757600080fd5b613db389838a01613b35565b90965094506040880135915080821115613dcc57600080fd5b50613dd988828901613d0a565b969995985093965092949392505050565b600080600080600060608688031215613e0257600080fd5b85356001600160401b0380821115613e1957600080fd5b9087019060c0828a031215613d9157600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613e6557613e65613e2d565b60405290565b60405160c081016001600160401b0381118282101715613e6557613e65613e2d565b604051601f8201601f191681016001600160401b0381118282101715613eb557613eb5613e2d565b604052919050565b60006001600160401b03821115613ed657613ed6613e2d565b5060051b60200190565b600082601f830112613ef157600080fd5b81356020613f06613f0183613ebd565b613e8d565b80838252602082019150600560208560051b880101945087851115613f2a57600080fd5b602087015b85811015613f53578035828110613f465760008081fd5b8452928401928401613f2f565b5090979650505050505050565b80356001600160a01b0381168114610d6957600080fd5b600082601f830112613f8857600080fd5b81356020613f98613f0183613ebd565b8083825260208201915060208460051b870101935086841115613fba57600080fd5b602086015b84811015613fdd57613fd081613f60565b8352918301918301613fbf565b509695505050505050565b60008060408385031215613ffb57600080fd5b82356001600160401b038082111561401257600080fd5b61401e86838701613ee0565b9350602085013591508082111561403457600080fd5b5061404185828601613f77565b9150509250929050565b803560108110610d6957600080fd5b6000806040838503121561406d57600080fd5b6140768361404b565b915061408460208401613f60565b90509250929050565b60006020828403121561409f57600080fd5b61072182613f60565b600080604083850312156140bb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600581106112b7576112b76140ca565b60a081016140fd876140e0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561413057600080fd5b81356001600160401b0381111561414657600080fd5b6106ba84828501613f77565b60008151808452602080850194506020840160005b83811015613c455781516001600160601b031687529582019590820190600101614167565b60608152600061419f6060830186613ca4565b82810360208401526141b18186613ca4565b905082810360408401526141c58185614152565b9695505050505050565b6020815260006107216020830184614152565b6000602082840312156141f457600080fd5b6107218261404b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610766576107666141fd565b81810381811115610766576107666141fd565b60008261425657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610766576107666141fd565b60208101601083106142b1576142b16140ca565b91905290565b6040815260006142ca6040830185613ca4565b82810360208401526142dc8185613c12565b95945050505050565b6080815260006142f86080830187613c12565b828103602084015261430a8187614152565b9050828103604084015261431e8186613ca4565b905082810360608401526106158185613ca4565b6001600160e01b03198316815260408101600b8310614353576143536140ca565b8260208301529392505050565b600082601f83011261437157600080fd5b81356020614381613f0183613ebd565b8083825260208201915060208460051b8701019350868411156143a357600080fd5b602086015b84811015613fdd57803583529183019183016143a8565b6000601f83601f8401126143d257600080fd5b823560206143e2613f0183613ebd565b82815260059290921b8501810191818101908784111561440157600080fd5b8287015b848110156144975780356001600160401b03808211156144255760008081fd5b818a0191508a603f83011261443a5760008081fd5b8582013560408282111561445057614450613e2d565b614461828b01601f19168901613e8d565b92508183528c818386010111156144785760008081fd5b8181850189850137506000908201870152845250918301918301614405565b50979650505050505050565b600060e082360312156144b557600080fd5b6144bd613e43565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156144ef57600080fd5b6144fb36838701613f77565b6060840152608085013591508082111561451457600080fd5b61452036838701614360565b608084015260a085013591508082111561453957600080fd5b614545368387016143bf565b60a084015260c085013591508082111561455e57600080fd5b5061456b36828601614360565b60c08301525092915050565b600060c0823603121561458957600080fd5b614591613e6b565b823581526020830135602082015260408301356001600160401b03808211156145b957600080fd5b6145c536838701613ee0565b604084015260608501359150808211156145de57600080fd5b6145ea36838701614360565b6060840152608085013591508082111561460357600080fd5b61460f368387016143bf565b608084015260a085013591508082111561462857600080fd5b5061463536828601614360565b60a08301525092915050565b60005b8381101561465c578181015183820152602001614644565b50506000910152565b6001600160e01b0319831681528151600090614688816004850160208701614641565b919091016004019392505050565b600081518084526146ae816020860160208601614641565b601f01601f19169290920160200192915050565b6020815260006107216020830184614696565b600082516146e7818460208701614641565b9190910192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015613f5357601f1986840301895261472c838351614696565b98840198925090830190600101614710565b6080815260006147516080830187614696565b82810360208401526147638187613ca4565b905082810360408401526147778186613c12565b9050828103606084015261061581856146f1565b60408152600061479e6040830185613c12565b82810360208401526142dc8185613ca4565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082840312156147e557600080fd5b8151801515811461072157600080fd5b60008151808452602080850194506020840160005b83811015613c455781518752958201959082019060010161480a565b600060e0830182518452602080840151602086015260408401516040860152606084015160e0606087015282815180855261010088019150602083019450600092505b808310156148925784516001600160a01b03168252938301936001929092019190830190614869565b506080860151935086810360808801526148ac81856147f5565b935050505060a083015184820360a08601526148c882826146f1565b91505060c083015184820360c08601526142dc82826147f5565b6040815260006148f56040830185614826565b905060018060a01b03831660208301529392505050565b60006020828403121561491e57600080fd5b81356002811061072157600080fd5b60006020828403121561493f57600080fd5b813560ff8116811461072157600080fd5b600060018201614962576149626141fd565b5060010190565b60808152600061497c6080830187614826565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156149e65783516149d0816140e0565b82529284019260019290920191908401906149bd565b50606089015193508481036060860152614a0081856147f5565b935050505060808601518282036080840152614a1c82826146f1565b91505060a086015182820360a0840152614a3682826147f5565b93505050506142dc60608301846001600160a01b03169052565b634e487b7160e01b600052603160045260246000fd5b604081526000614a796040830185613c12565b82810360208401526142dc81856146f156fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca2646970667358221220cb0e92b2033c9131bafd8c90a491e8241ace110667169406b1c1a69bc857723964736f6c634300081700335da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240c55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce000000000000000000000000000000000000000000000000000000000000000100000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x4", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x2dee73f551b3abed26e8bcff6fdf199076359cad3e452780ea854a81db7b7a56", + "transactionType": "CREATE", + "contractName": "MockWrappedToken", + "contractAddress": "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08", + "function": null, + "arguments": [ + "\"Wrapped WETH\"", + "\"WETH\"" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x129c0c", + "value": "0x0", + "data": "0x60806040526002805460ff191660121790553480156200001e57600080fd5b5060405162000bb738038062000bb783398101604081905262000041916200012f565b60006200004f83826200022a565b5060016200005e82826200022a565b505050620002f6565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008f57600080fd5b81516001600160401b0380821115620000ac57620000ac62000067565b604051601f8301601f19908116603f01168101908282118183101715620000d757620000d762000067565b8160405283815260209250866020858801011115620000f557600080fd5b600091505b83821015620001195785820183015181830184015290820190620000fa565b6000602085830101528094505050505092915050565b600080604083850312156200014357600080fd5b82516001600160401b03808211156200015b57600080fd5b62000169868387016200007d565b935060208501519150808211156200018057600080fd5b506200018f858286016200007d565b9150509250929050565b600181811c90821680620001ae57607f821691505b602082108103620001cf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000225576000816000526020600020601f850160051c81016020861015620002005750805b601f850160051c820191505b8181101562000221578281556001016200020c565b5050505b505050565b81516001600160401b0381111562000246576200024662000067565b6200025e8162000257845462000199565b84620001d5565b602080601f8311600181146200029657600084156200027d5750858301515b600019600386901b1c1916600185901b17855562000221565b600085815260208120601f198616915b82811015620002c757888601518255948401946001909101908401620002a6565b5085821015620002e65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6108b180620003066000396000f3fe6080604052600436106100ab5760003560e01c806340c10f191161006457806340c10f19146101a657806370a08231146101c657806395d89b41146101f3578063a9059cbb14610208578063d0e30db0146100ba578063dd62ed3e14610228576100ba565b806306fdde03146100c2578063095ea7b3146100ed57806318160ddd1461011d57806323b872dd1461013a5780632e1a7d4d1461015a578063313ce5671461017a576100ba565b366100ba576100b8610260565b005b6100b8610260565b3480156100ce57600080fd5b506100d76102bb565b6040516100e491906106cd565b60405180910390f35b3480156100f957600080fd5b5061010d610108366004610738565b610349565b60405190151581526020016100e4565b34801561012957600080fd5b50475b6040519081526020016100e4565b34801561014657600080fd5b5061010d610155366004610762565b6103b6565b34801561016657600080fd5b506100b861017536600461079e565b61053a565b34801561018657600080fd5b506002546101949060ff1681565b60405160ff90911681526020016100e4565b3480156101b257600080fd5b506100b86101c1366004610738565b6105e0565b3480156101d257600080fd5b5061012c6101e13660046107b7565b60036020526000908152604090205481565b3480156101ff57600080fd5b506100d76106ac565b34801561021457600080fd5b5061010d610223366004610738565b6106b9565b34801561023457600080fd5b5061012c6102433660046107d2565b600460209081526000928352604080842090915290825290205481565b336000908152600360205260408120805434929061027f90849061081b565b909155505060405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600080546102c89061082e565b80601f01602080910402602001604051908101604052809291908181526020018280546102f49061082e565b80156103415780601f1061031657610100808354040283529160200191610341565b820191906000526020600020905b81548152906001019060200180831161032457829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103a49086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600360205260408120548211156103db57600080fd5b6001600160a01b038416331480159061041957506001600160a01b038416600090815260046020908152604080832033845290915290205460001914155b15610487576001600160a01b038416600090815260046020908152604080832033845290915290205482111561044e57600080fd5b6001600160a01b038416600090815260046020908152604080832033845290915281208054849290610481908490610868565b90915550505b6001600160a01b038416600090815260036020526040812080548492906104af908490610868565b90915550506001600160a01b038316600090815260036020526040812080548492906104dc90849061081b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161052891815260200190565b60405180910390a35060019392505050565b3360009081526003602052604090205481111561055657600080fd5b3360009081526003602052604081208054839290610575908490610868565b9091555050604051339082156108fc029083906000818181858888f193505050501580156105a7573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b6001600160a01b03821661063a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b6001600160a01b0382166000908152600360205260408120805483929061066290849061081b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600180546102c89061082e565b60006106c63384846103b6565b9392505050565b60006020808352835180602085015260005b818110156106fb578581018301518582016040015282016106df565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073357600080fd5b919050565b6000806040838503121561074b57600080fd5b6107548361071c565b946020939093013593505050565b60008060006060848603121561077757600080fd5b6107808461071c565b925061078e6020850161071c565b9150604084013590509250925092565b6000602082840312156107b057600080fd5b5035919050565b6000602082840312156107c957600080fd5b6106c68261071c565b600080604083850312156107e557600080fd5b6107ee8361071c565b91506107fc6020840161071c565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103b0576103b0610805565b600181811c9082168061084257607f821691505b60208210810361086257634e487b7160e01b600052602260045260246000fd5b50919050565b818103818111156103b0576103b061080556fea264697066735822122095d4930cf27620bcea5a7285e58e73054c5baacb40c41af0a6f7a73e87199e6e64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c577261707065642057455448000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000", + "nonce": "0x5", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xd36cfb4ff52aca0b54fab424d42682f7006aa276d920d954845fce772f15ae29", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x136900", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000134178696520496e66696e6974792053686172640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034158530000000000000000000000000000000000000000000000000000000000", + "nonce": "0x6", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xda899ebfaa31641d314550dd2aeb03595ec494bcd9323a950a1cef844fc8f200", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x136810", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0x7", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1c7c983e044318fc7794666da425f357e85f09fc64fef6f72b1638ed7ccb0925", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x123728", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x8", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x05ed9fcbf60a4649d6b19c4860b6674dee41f7408cf89d7fc02823656bf7ad03", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0xAad5541Eb4e5DE1f353BCc8EaBD124fc42107507", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x228f50", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506040516200158238038062001582833981016040819052620000349162000126565b8181600062000044838262000221565b50600162000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61128580620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101e1578063b88d4fde146101f4578063c87b56dd14610207578063e985e9c51461021a57600080fd5b80636352211e146101a557806370a08231146101b857806395d89b41146101d957600080fd5b8063095ea7b3116100c8578063095ea7b31461015757806323b872dd1461016c57806340c10f191461017f57806342842e0e1461019257600080fd5b806301ffc9a7146100ef57806306fdde0314610117578063081812fc1461012c575b600080fd5b6101026100fd366004610dac565b61022d565b60405190151581526020015b60405180910390f35b61011f61027f565b60405161010e9190610e19565b61013f61013a366004610e2c565b610311565b6040516001600160a01b03909116815260200161010e565b61016a610165366004610e61565b610338565b005b61016a61017a366004610e8b565b610452565b61016a61018d366004610e61565b610483565b61016a6101a0366004610e8b565b610491565b61013f6101b3366004610e2c565b6104ac565b6101cb6101c6366004610ec7565b61050c565b60405190815260200161010e565b61011f610592565b61016a6101ef366004610ee2565b6105a1565b61016a610202366004610f34565b6105ac565b61011f610215366004610e2c565b6105e4565b610102610228366004611010565b610658565b60006001600160e01b031982166380ac58cd60e01b148061025e57506001600160e01b03198216635b5e139f60e01b145b8061027957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028e90611043565b80601f01602080910402602001604051908101604052809291908181526020018280546102ba90611043565b80156103075780601f106102dc57610100808354040283529160200191610307565b820191906000526020600020905b8154815290600101906020018083116102ea57829003601f168201915b5050505050905090565b600061031c82610686565b506000908152600460205260409020546001600160a01b031690565b6000610343826104ac565b9050806001600160a01b0316836001600160a01b0316036103b55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103d157506103d18133610658565b6104435760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016103ac565b61044d83836106e8565b505050565b61045c3382610756565b6104785760405162461bcd60e51b81526004016103ac9061107d565b61044d8383836107b5565b61048d8282610951565b5050565b61044d838383604051806020016040528060008152506105ac565b6000818152600260205260408120546001600160a01b0316806102795760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b60006001600160a01b0382166105765760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103ac565b506001600160a01b031660009081526003602052604090205490565b60606001805461028e90611043565b61048d338383610a93565b6105b63383610756565b6105d25760405162461bcd60e51b81526004016103ac9061107d565b6105de84848484610b61565b50505050565b60606105ef82610686565b600061060660408051602081019091526000815290565b905060008151116106265760405180602001604052806000815250610651565b8061063084610b94565b6040516020016106419291906110cb565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600260205260409020546001600160a01b03166106e55760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061071d826104ac565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610762836104ac565b9050806001600160a01b0316846001600160a01b0316148061078957506107898185610658565b806107ad5750836001600160a01b03166107a284610311565b6001600160a01b0316145b949350505050565b826001600160a01b03166107c8826104ac565b6001600160a01b03161461082c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016103ac565b6001600160a01b03821661088e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103ac565b6108996000826106e8565b6001600160a01b03831660009081526003602052604081208054600192906108c2908490611110565b90915550506001600160a01b03821660009081526003602052604081208054600192906108f0908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b0382166109a75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016103ac565b6000818152600260205260409020546001600160a01b031615610a0c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016103ac565b6001600160a01b0382166000908152600360205260408120805460019290610a35908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603610af45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103ac565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610b6c8484846107b5565b610b7884848484610c95565b6105de5760405162461bcd60e51b81526004016103ac90611136565b606081600003610bbb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610be55780610bcf81611188565b9150610bde9050600a836111b7565b9150610bbf565b60008167ffffffffffffffff811115610c0057610c00610f1e565b6040519080825280601f01601f191660200182016040528015610c2a576020820181803683370190505b5090505b84156107ad57610c3f600183611110565b9150610c4c600a866111cb565b610c57906030611123565b60f81b818381518110610c6c57610c6c6111df565b60200101906001600160f81b031916908160001a905350610c8e600a866111b7565b9450610c2e565b60006001600160a01b0384163b15610d8b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610cd99033908990889088906004016111f5565b6020604051808303816000875af1925050508015610d14575060408051601f3d908101601f19168201909252610d1191810190611232565b60015b610d71573d808015610d42576040519150601f19603f3d011682016040523d82523d6000602084013e610d47565b606091505b508051600003610d695760405162461bcd60e51b81526004016103ac90611136565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107ad565b506001949350505050565b6001600160e01b0319811681146106e557600080fd5b600060208284031215610dbe57600080fd5b813561065181610d96565b60005b83811015610de4578181015183820152602001610dcc565b50506000910152565b60008151808452610e05816020860160208601610dc9565b601f01601f19169290920160200192915050565b6020815260006106516020830184610ded565b600060208284031215610e3e57600080fd5b5035919050565b80356001600160a01b0381168114610e5c57600080fd5b919050565b60008060408385031215610e7457600080fd5b610e7d83610e45565b946020939093013593505050565b600080600060608486031215610ea057600080fd5b610ea984610e45565b9250610eb760208501610e45565b9150604084013590509250925092565b600060208284031215610ed957600080fd5b61065182610e45565b60008060408385031215610ef557600080fd5b610efe83610e45565b915060208301358015158114610f1357600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610f4a57600080fd5b610f5385610e45565b9350610f6160208601610e45565b925060408501359150606085013567ffffffffffffffff80821115610f8557600080fd5b818701915087601f830112610f9957600080fd5b813581811115610fab57610fab610f1e565b604051601f8201601f19908116603f01168101908382118183101715610fd357610fd3610f1e565b816040528281528a6020848701011115610fec57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561102357600080fd5b61102c83610e45565b915061103a60208401610e45565b90509250929050565b600181811c9082168061105757607f821691505b60208210810361107757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600083516110dd818460208801610dc9565b8351908301906110f1818360208801610dc9565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610279576102796110fa565b80820180821115610279576102796110fa565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60006001820161119a5761119a6110fa565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826111c6576111c66111a1565b500490565b6000826111da576111da6111a1565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061122890830184610ded565b9695505050505050565b60006020828403121561124457600080fd5b815161065181610d9656fea2646970667358221220cb618065662e7edd32746d846fe974bcdec24b45727d8217ab8bb697460c03b464736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b4d6f636b2045524337323100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d5f455243373231000000000000000000000000000000000000000000000000", + "nonce": "0x9", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x1a4c5c", + "value": "0x0", + "data": "0x504af48c000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f0800000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000003c4e17b9056272ce1b49f6900d8cfd6171a1869d000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f7700000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000035a4e900000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000017d784000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "nonce": "0xa", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x1dcba", + "value": "0x0", + "data": "0x29b6eca90000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0xb", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionType": "CALL", + "contractName": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "function": "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", + "arguments": [ + "(1, 11155111, 1713164364, [0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d, 0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d], [0, 0], [0xe9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce, 0x01a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a], [1000000, 1000000])", + "[0]", + "[(27, 0x55f217103277c74cf09050ad7b6921a97c4cd51e3d27aad6fc593df454babf58, 0x52b7389372928284c678ebc2d6d6eb11b88f5c469c9c05fde4c3df558f1279dd)]" + ], + "transaction": { + "type": "0x02", + "from": "0x45e8f1acfc89f45720cf11e807ed85b730c67c7e", + "to": "0x5396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "gas": "0x16b706", + "value": "0x0", + "data": "0x5e05cf9e000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000005e0000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000000000000000000000000000000000000661cd04c00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000064e9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024401a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001b55f217103277c74cf09050ad7b6921a97c4cd51e3d27aad6fc593df454babf5852b7389372928284c678ebc2d6d6eb11b88f5c469c9c05fde4c3df558f1279dd", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x2e1bd6096e0362e57c9f7283d763660a65bcc2f230459e824dd9d6208672c86d", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0xc7ee", + "value": "0x16345785d8a0000", + "data": "0xa3912ec8", + "nonce": "0xc", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "1000000000000000000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x1d3a9042588f6c1065d4ca51de234bb29f40fd23", + "gas": "0x2420e", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000d3c21bcecceda1000000", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "500000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x523e8d078be0769e806b8a154f0f7ac6f4cde770", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e000000000000000000000000000000000000000000000000000000746a528800", + "nonce": "0x1", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x591a38ba0f6c4110057b0a4842b87e9796b3ed94", + "gas": "0x241d8", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000002d79883d2000", + "nonce": "0x2", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionIndex": "0xf", + "blockHash": "0x64d86c267a22dfe23a0fed32d8327fb2eac8311dea6d171bcfe37a62bf782208", + "blockNumber": "0x55f334", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x244127", + "gasUsed": "0x103480", + "contractAddress": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "logs": [ + { + "address": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x64d86c267a22dfe23a0fed32d8327fb2eac8311dea6d171bcfe37a62bf782208", + "blockNumber": "0x55f334", + "transactionHash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionIndex": "0xf", + "logIndex": "0x19", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e4b" + }, + { + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x16a693", + "gasUsed": "0x9b5d0", + "contractAddress": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "logs": [ + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c2cb024747e86a05a2d2839dd02ceb78f939f983" + ], + "data": "0x", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "logIndex": "0x6", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000404000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000008000000000000000000000000000000000000000000000000800000000100000000020000000000000000000000000000000000000001000000000000000020000000000000000000000000000000000400000000000000000000000000080000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e54" + }, + { + "transactionHash": "0xfc974f6c8df2578db7fd7422c3218315120a78c63fc02a15adfeb8074998e0d1", + "transactionIndex": "0x6", + "blockHash": "0xc66a8e8dafce7c756ec7f8f3e6004ced94ff119f4d2690c6a3cab7d7318b037c", + "blockNumber": "0x55f336", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x408a01", + "gasUsed": "0x3ccbe7", + "contractAddress": "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e54" + }, + { + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0xfd335", + "gasUsed": "0x9b5d0", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000762f3e2221c0dee575d1bd43145bafeebe965ef2" + ], + "data": "0x", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "logIndex": "0x8", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000200000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000040000000000000000000000000000000000000000000800000000080000000000000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e56" + }, + { + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x4763a3", + "gasUsed": "0x4763a3", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "logs": [ + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000004" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000100000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da1", + "0x8000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x4", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x04020000000000000000000000000000000080400000200000100000000000000000400000000000000000000000040000000000000000010204000000040000000000000100800000000000000000000000000000040005000400000000000008000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000001000010100000000000000000000000000002000000000000000000000000000000000000000000000000000808000001000000000000060000000020000000000000000900000000000000000008000000000000000001000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e59" + }, + { + "transactionHash": "0x2dee73f551b3abed26e8bcff6fdf199076359cad3e452780ea854a81db7b7a56", + "transactionIndex": "0x8", + "blockHash": "0xd46b3accefb441f3c15d14af87ce8b7f58cbfb081076734b47b3c01c54eb1d3e", + "blockNumber": "0x55f339", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x127d50", + "gasUsed": "0x95e0a", + "contractAddress": "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5b" + }, + { + "transactionHash": "0xd36cfb4ff52aca0b54fab424d42682f7006aa276d920d954845fce772f15ae29", + "transactionIndex": "0x5", + "blockHash": "0x5c7e1693354d5cd1d25e6f67528bc02d1ea3555be8a83acaf8638b86b410cbba", + "blockNumber": "0x55f33a", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x596f34", + "gasUsed": "0x9bf7e", + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5d" + }, + { + "transactionHash": "0xda899ebfaa31641d314550dd2aeb03595ec494bcd9323a950a1cef844fc8f200", + "transactionIndex": "0xc", + "blockHash": "0x4df8de86171713e8dcb9b69825e37983e8e5db4f0516a592c2614abb2c505c34", + "blockNumber": "0x55f33b", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x174f2d", + "gasUsed": "0x9bf06", + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + }, + { + "transactionHash": "0x1c7c983e044318fc7794666da425f357e85f09fc64fef6f72b1638ed7ccb0925", + "transactionIndex": "0x6", + "blockHash": "0x12435e24ca8c1c2f67aec6addf959fd149ab08c377897f82e95891a011030941", + "blockNumber": "0x55f33c", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0xcce3b", + "gasUsed": "0x92116", + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e62" + }, + { + "transactionHash": "0x05ed9fcbf60a4649d6b19c4860b6674dee41f7408cf89d7fc02823656bf7ad03", + "transactionIndex": "0x10", + "blockHash": "0x6aae1318428264a2fc074362d9d496a99b53f373f698bb8d6fc5dc54abeead42", + "blockNumber": "0x55f33d", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x1ebea5", + "gasUsed": "0x115336", + "contractAddress": "0xAad5541Eb4e5DE1f353BCc8EaBD124fc42107507", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e61" + }, + { + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x709f0d", + "gasUsed": "0xd2e08", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "0x00000000000000000000000031762cdd4aa65cd6f5f09d7a05a56211720a1168" + ], + "data": "0x", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf" + ], + "data": "0x0000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f08", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x8", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000004", + "0x000000000000000000000000000000000000000000000000000000000000000a" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x9", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000007", + "0x000000000000000000000000000000000000000000000000000000000000000a" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xa", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000003c4e17b9056272ce1b49f6900d8cfd6171a1869d000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f7700000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xb", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000035a4e900000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xc", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000017d784000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xd", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xe", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc421075070000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xf", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x10", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x000000040082000000000000000040000000000090000000020000000000000000000000000000000000000022000000000010000400000000200000000404008000200000000000000000000000000000000000000c0000000400000000000008000010020000000000000000000800000001000000000000000000000000000000000000000040010000000000000020000000040080000000000000000001000000000000001000010000100400080400000000000008003000000000000000200000000020000000000000440000000000008060000102000100000060008000100000000000000000000000000000000000000000000000200000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e62" + }, + { + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x32c5a", + "gasUsed": "0xe8f0", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x000000000000000000000000000000000000000000000000000000000000000b", + "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d" + ], + "data": "0x", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "logIndex": "0x4", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008000000000004000000000000000400000000000000000000000000000000000000000000000000000000000000000000000010004000000000000000000000100800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000002000000040001000000000000000000000000000000000000000000000000000000000000000040000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e66" + }, + { + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "from": "0x45E8f1aCFC89F45720cf11e807eD85B730C67C7e", + "to": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "cumulativeGasUsed": "0x100066", + "gasUsed": "0xb8b3c", + "contractAddress": null, + "logs": [ + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x0000000000000000000000000000000000000000000000000000000000aa36a7", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000000000000000000000000000000000000661cd04c00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000064e9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024401a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x6", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000080000110000000000000000000080000000000000100000000000000000000000000000000000000000040002000000000000000000000000040000000000000000000000000000000000000000000000040000800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000200010000000000000000000000000000000000000000028000000080000000000000000000000000000000000212000000000000000000000000000800000000100000800000000000000000400040000000000000000000000000900000000000000020000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e65" + }, + { + "transactionHash": "0x2e1bd6096e0362e57c9f7283d763660a65bcc2f230459e824dd9d6208672c86d", + "transactionIndex": "0xa", + "blockHash": "0x6afdcc553c494ac7fa319a1a21a07874af034283d416b883c052602ed1aa9dd9", + "blockNumber": "0x55f341", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x13f109", + "gasUsed": "0x6faa", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + }, + { + "transactionHash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionIndex": "0x11", + "blockHash": "0x45eca05b0359867cbc7b68ba8ac73c2ebf9fda1802e2fc098c59a3e611fd241c", + "blockNumber": "0x55f342", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "cumulativeGasUsed": "0x6adf4c", + "gasUsed": "0x10b12", + "contractAddress": null, + "logs": [ + { + "address": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", + "blockHash": "0x45eca05b0359867cbc7b68ba8ac73c2ebf9fda1802e2fc098c59a3e611fd241c", + "blockNumber": "0x55f342", + "transactionHash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionIndex": "0x11", + "logIndex": "0x44", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000000000000000020000000000000000000800000000000000000000002010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000020000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5f" + }, + { + "transactionHash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionIndex": "0x7", + "blockHash": "0x0b478be16ce44504d4d8b271f105badb63dd194cda40b73084160b606f29ac93", + "blockNumber": "0x55f343", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "cumulativeGasUsed": "0x37c4f", + "gasUsed": "0x10aee", + "contractAddress": null, + "logs": [ + { + "address": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x000000000000000000000000000000000000000000000000000000746a528800", + "blockHash": "0x0b478be16ce44504d4d8b271f105badb63dd194cda40b73084160b606f29ac93", + "blockNumber": "0x55f343", + "transactionHash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionIndex": "0x7", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000040000000000020000000000000000000800000000000000000000000010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000800000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5f" + }, + { + "transactionHash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionIndex": "0xd", + "blockHash": "0x6eaa5ed29a93ecffb338b7cfcabda5cca207cb4c78a53debbe59cae7e585656b", + "blockNumber": "0x55f344", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "cumulativeGasUsed": "0xcc9c5", + "gasUsed": "0x10afa", + "contractAddress": null, + "logs": [ + { + "address": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x6eaa5ed29a93ecffb338b7cfcabda5cca207cb4c78a53debbe59cae7e585656b", + "blockNumber": "0x55f344", + "transactionHash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionIndex": "0xd", + "logIndex": "0xb", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000000000000000020000000000000000000800000000000000000020000010000200000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000100000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712302101, + "chain": 11155111, + "multi": false, + "commit": "7ef18ec" +} \ No newline at end of file diff --git a/broadcast/deploy-sepolia.s.sol/11155111/run-latest.json b/broadcast/deploy-sepolia.s.sol/11155111/run-latest.json new file mode 100644 index 00000000..09b79284 --- /dev/null +++ b/broadcast/deploy-sepolia.s.sol/11155111/run-latest.json @@ -0,0 +1,1082 @@ +{ + "transactions": [ + { + "hash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x206770", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca264697066735822122024939a448abbecaf74c9f8ef1d3326da17dd252cccddf0ade66be800061b239364736f6c63430008170033", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "function": null, + "arguments": [ + "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x134c04", + "value": "0x0", + "data": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000c2cb024747e86a05a2d2839dd02ceb78f939f983000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c0700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x1", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfc974f6c8df2578db7fd7422c3218315120a78c63fc02a15adfeb8074998e0d1", + "transactionType": "CREATE", + "contractName": "MainchainGatewayV3", + "contractAddress": "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x798a36", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b506000805460ff1916905561470d8061002a6000396000f3fe60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614007565b90501115610f1d57610e85610e718680614007565b610e7e6020890189614007565b8787611a1f565b610eab610e928680614007565b8660005b602002810190610ea69190614007565b6123a2565b610ed1610eb88680614007565b8660015b602002810190610ecc9190614007565b61194a565b610ef7610ede8680614007565b8660025b602002810190610ef29190614007565b612477565b610f1d610f048680614007565b8660035b602002810190610f189190614007565b612588565b60005b610f2d6040870187614007565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614007565b84818110610f7757610f77613ff1565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d6110983685900385018561409f565b612843565b90506110b16110983685900385018561409f565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b9083908690614173565b60405180910390a160006111756080850160608601613a7f565b9050600061118b61012086016101008701614200565b600181111561119c5761119c613d3c565b036112635760006111b6368690038601610100870161421d565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc368790038701610100880161421d565b60408301519091506112139061014088013561424f565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a0161421d565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d0929190614173565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f9190614262565b60385461138c9084614262565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e69190614262565b60025461138c9084614262565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b369190614279565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b607680546000918261184983614293565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142ce565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b838110156119e95782828281811061199557611995613ff1565b90506020020135603a60008787858181106119b2576119b2613ff1565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d094939291906143f8565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b85811015611b7c57848482818110611a7557611a75613ff1565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa0613ff1565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd613ff1565b9050602002016020810190611b129190614200565b60786000898985818110611b2857611b28613ff1565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c368890038801610100890161421d565b612c6d565b6001611db36040880160208901614200565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d61012088016101008901614200565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a01614200565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a61409f565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d01614200565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca613ff1565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b36919061439a565b84935061208685613229565b61209090836144be565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d90614173565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611297919061421d565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be929190614173565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b6002546037546123659190614262565b6038546001546123759190614262565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612441578282828181106123ed576123ed613ff1565b905060200201356039600087878581811061240a5761240a613ff1565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d094939291906143f8565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b8381101561255257620f42408383838181106124c6576124c6613ff1565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe613ff1565b90506020020135603b600087878581811061251b5761251b613ff1565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d094939291906143f8565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612627578282828181106125d3576125d3613ff1565b90506020020135603c60008787858181106125f0576125f0613ff1565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d094939291906143f8565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144d1565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144be565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101291906144f3565b60006002546001600254846001546127a69190614262565b6127b091906144be565b6127ba919061424f565b610a7691906144d1565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d8385614262565b610ff991906144d1565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b91906144f3565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061424f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add9190614530565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd9190614530565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d699190614530565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd6919061454c565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b9190614530565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b36949392919061456e565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145a4565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614619565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a1919061464c565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144d1565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144be565b9091555050505050565b600082600001828154811061335c5761335c613ff1565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b369392919061467a565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009286169161349391614530565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef836002614262565b6134fa9060026144be565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b8160008151811061355757613557613ff1565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061358657613586613ff1565b60200101906001600160f81b031916908160001a90535060006135aa846002614262565b6135b59060016144be565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e9613ff1565b1a60f81b8282815181106135ff576135ff613ff1565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146aa565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361424f565b85549091506000906137039060019061424f565b905081811461376857600086600001828154811061372357613723613ff1565b906000526020600020015490508087600001848154811061374657613746613ff1565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146c1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a69190614262565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916138339190614530565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a0919061454c565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b613fc1613ecb565b823560ff81168114613fd257600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261401e57600080fd5b83018035915067ffffffffffffffff82111561403957600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561406357600080fd5b61406b613ecb565b9050813561407881613a5f565b8152602082013561408881613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140b257600080fd5b60405160a0810181811067ffffffffffffffff821117156140e357634e487b7160e01b600052604160045260246000fd5b6040528235815260208301356140f881613f02565b602082015261410a8460408501614051565b604082015261411c8460a08501614051565b606082015261412f846101008501613f0f565b60808201529392505050565b803561414681613a5f565b6001600160a01b03908116835260208201359061416282613a5f565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561419481613f02565b61419d81613d52565b806040840152506141b4606083016040850161413b565b6141c460c0830160a0850161413b565b6101206101008401356141d681613f02565b6141df81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561421257600080fd5b8135610ff981613f02565b60006060828403121561422f57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614239565b8082028115828204841417610a7657610a76614239565b602081016010831061428d5761428d613d3c565b91905290565b6000600182016142a5576142a5614239565b5060010190565b80516142b781613d52565b825260208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516142ef81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143646101208401826142ac565b509392505050565b6001600160e01b03198316815260408101600b831061438d5761438d613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156143ed5781356143d281613a5f565b6001600160a01b0316875295820195908201906001016143bf565b509495945050505050565b60408152600061440c6040830186886143af565b82810360208401528381526001600160fb1b0384111561442b57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061445860608301888a6143af565b6020838203602085015261446d82888a6143af565b848103604086015285815286925060200160005b868110156144af57833561449481613f02565b61449d81613d52565b82529282019290820190600101614481565b509a9950505050505050505050565b80820180821115610a7657610a76614239565b6000826144ee57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561450557600080fd5b5051919050565b60005b8381101561452757818101518382015260200161450f565b50506000910152565b6000825161454281846020870161450c565b9190910192915050565b60006020828403121561455e57600080fd5b81518015158114610ff957600080fd5b60c0810161457c82876142ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516145dc81601785016020880161450c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161460d81602884016020880161450c565b01602801949350505050565b602081526000825180602084015261463881604085016020870161450c565b601f01601f19169190910160400192915050565b60006020828403121561465e57600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a0810161468882866142ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146b9576146b9614239565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec8cc7f89d632f5b6c36d2cdb75ab664383134c4e4a6f2157e2624267b4eadfe64736f6c63430008170033", + "nonce": "0x2", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": [ + "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x134c04", + "value": "0x0", + "data": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000762f3e2221c0dee575d1bd43145bafeebe965ef2000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c0700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x3", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionType": "CREATE", + "contractName": "MainchainBridgeManager", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "function": null, + "arguments": [ + "2", + "4", + "2021", + "0x0000000000000000000000000000000000000000", + "[]", + "[0xbA8E32D874948dF4Cbe72284De91CC4968293BCe]", + "[0x45E8f1aCFC89F45720cf11e807eD85B730C67C7e]", + "[100]", + "[]", + "[]" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x8e0ff6", + "value": "0x0", + "data": "0x60a06040526040516200659938038062006599833981016040819052620000269162001523565b8181600160ff1b8c8c8c8c8c8c8c8c836200004181620001a3565b505060016000805160206200657983398151915255620000628888620002b2565b50620000729050600286620003c7565b604080516020808201839052600c60608301526b212924a223a2afa0a226a4a760a11b6080808401919091528284018a905283518084038201815260a0840185528051908301207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08501527f9d3fa1662ea89365eb7af36506f0ad5413bd7e078960d8481ff4718763aaa8e960e08501527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a56101008501526101208085019190915284518085039091018152610140909301909352815191012090526200015d81838562000471565b50505050505050505062000177816200089160201b60201c565b5062000185600030620008c4565b62000191828262000960565b5050505050505050505050506200196e565b606081620001b18162000a23565b8251806001600160401b03811115620001ce57620001ce62001334565b604051908082528060200260200182016040528015620001f8578160200160208202803683370190505b509250806000036200020b5750620002ac565b6000805160206200653983398151915260006314d72edb60e21b815b84811015620002a6578781815181106200024557620002456200165e565b60200260200101519250620002608362000a5f60201b60201c565b6200026c838362000a97565b62000278848462000c76565b8782815181106200028d576200028d6200165e565b9115156020928302919091019091015260010162000227565b50505050505b50919050565b60008082841115620002ea576040516387f6f09560e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b60008051602062006559833981519152549150620003267fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff5490565b90506200034160008051602062006559833981519152859055565b6200036b7fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff849055565b8284620003876000805160206200657983398151915262000c96565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111562000400576200040062001674565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111562000444576200044462001674565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60606200047f838362000cbe565b6200048a8162000a23565b82518551811480156200049d5750845181145b620004ca576040516306b5667560e21b81526001600160e01b0319600035166004820152602401620002e1565b806001600160401b03811115620004e557620004e562001334565b6040519080825280602002602001820160405280156200050f578160200160208202803683370190505b5092508060000362000522575062000889565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c917f8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3917fd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d917f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3919081908190815b89811015620007db578d8181518110620005e557620005e56200165e565b602002602001015194508c81815181106200060457620006046200165e565b602002602001015193506200061f8562000ddc60201b60201c565b6200062a8462000ddc565b8e81815181106200063f576200063f6200165e565b60200260200101516001600160601b03166000036200068057604051637f11b8a360e11b81526001600160e01b0319600035166004820152602401620002e1565b6200068c898662000e13565b806200069f57506200069f898562000e13565b80620006b25750620006b2878662000e13565b80620006c55750620006c5878562000e13565b158c8281518110620006db57620006db6200165e565b6020026020010190151590811515815250508b81815181106200070257620007026200165e565b602002602001015115620007d2576200071c898662000c76565b5062000729878562000c76565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f90829081106200077257620007726200165e565b6020908102919091018101516001600160601b03169083018190526200079990846200168a565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101620005c7565b50620008087f6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c8362000e36565b5062000840635ebae8a060e01b8d8d6040516020016200082a92919062001728565b60408051601f1981840301815291905262000e50565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f6040516200087794939291906200175a565b60405180910390a15050505050505050505b509392505050565b600281905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b8060036000846004811115620008de57620008de62001674565b6004811115620008f257620008f262001674565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600481111562000933576200093362001674565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60005b825181101562000a1e57306001600160a01b03168282815181106200098c576200098c6200165e565b60200260200101516001600160a01b031603620009cb5760405163053265f160e01b81526001600160e01b0319600035166004820152602401620002e1565b62000a15838281518110620009e457620009e46200165e565b602002602001015183838151811062000a015762000a016200165e565b6020026020010151620008c460201b60201c565b60010162000963565b505050565b62000a2e816200118b565b1562000a5c57604051630d697db160e11b81526001600160e01b0319600035166004820152602401620002e1565b50565b806001600160a01b03163b60000362000a5c57604051630bfc64a360e21b81526001600160a01b0382166004820152602401620002e1565b6040516001600160e01b03198216602482015260009060440160408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169062000afb90859062001810565b600060405180830381855afa9150503d806000811462000b38576040519150601f19603f3d011682016040523d82523d6000602084013e62000b3d565b606091505b50915091508162000c1f57846001600160a01b03168360405160240162000b6591906200185c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525162000b9c919062001810565b600060405180830381855afa9150503d806000811462000bd9576040519150601f19603f3d011682016040523d82523d6000602084013e62000bde565b606091505b5090925090508162000c1f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b8080602001905181019062000c35919062001871565b62000c6f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b5050505050565b600062000c8d836001600160a01b03841662001236565b90505b92915050565b600062000ca1825490565b905062000cb98262000cb58360016200168a565b9055565b919050565b81518151606091908082016001600160401b0381111562000ce35762000ce362001334565b60405190808252806020026020018201604052801562000d0d578160200160208202803683370190505b50925060005b8281101562000d6f5785818151811062000d315762000d316200165e565b602002602001015184828151811062000d4e5762000d4e6200165e565b6001600160a01b039092166020928302919091019091015260010162000d13565b60005b8281101562000dd25785818151811062000d905762000d906200165e565b602002602001015185838151811062000dad5762000dad6200165e565b6001600160a01b03909216602092830291909101909101526001918201910162000d72565b5050505092915050565b6001600160a01b03811662000a5c5760405163104c66df60e31b81526001600160e01b0319600035166004820152602401620002e1565b6001600160a01b0381166000908152600183016020526040812054151562000c8d565b600062000c908362000e49818562001288565b9250829055565b600062000e6c60008051602062006539833981519152620012a8565b8051909150600081900362000e815750505050565b6000816001600160401b0381111562000e9e5762000e9e62001334565b60405190808252806020026020018201604052801562000ec8578160200160208202803683370190505b5090506000826001600160401b0381111562000ee85762000ee862001334565b60405190808252806020026020018201604052801562000f1d57816020015b606081526020019060019003908162000f075790505b5090506000868660405160200162000f3792919062001895565b604051602081830303815290604052905060008160405160240162000f5d91906200185c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015620011415786818151811062000faa5762000faa6200165e565b60200260200101516001600160a01b03168360405162000fcb919062001810565b6000604051808303816000865af19150503d80600081146200100a576040519150601f19603f3d011682016040523d82523d6000602084013e6200100f565b606091505b508683815181106200102557620010256200165e565b602002602001018684815181106200104157620010416200165e565b60200260200101829052821515151581525050508481815181106200106a576200106a6200165e565b602002602001015162001138578681815181106200108c576200108c6200165e565b60200260200101516001600160a01b031682604051620010ad919062001810565b6000604051808303816000865af19150503d8060008114620010ec576040519150601f19603f3d011682016040523d82523d6000602084013e620010f1565b606091505b508683815181106200110757620011076200165e565b602002602001018684815181106200112357620011236200165e565b60200260200101829052821515151581525050505b60010162000f8c565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051620011799493929190620018c8565b60405180910390a15050505050505050565b600081516000036200119f57506000919050565b60005b60018351038110156200122d57600181015b83518110156200122357838181518110620011d357620011d36200165e565b60200260200101516001600160a01b0316848381518110620011f957620011f96200165e565b60200260200101516001600160a01b0316036200121a575060019392505050565b600101620011b4565b50600101620011a2565b50600092915050565b60008181526001830160205260408120546200127f5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000c90565b50600062000c90565b815481018181101562000c9057634e487b7160005260116020526024601cfd5b60606000620012b783620012be565b9392505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156200131057602002820191906000526020600020905b815481526020019060010190808311620012fb575b50505050509050919050565b80516001600160a01b038116811462000cb957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562001375576200137562001334565b604052919050565b60006001600160401b0382111562001399576200139962001334565b5060051b60200190565b600082601f830112620013b557600080fd5b81516020620013ce620013c8836200137d565b6200134a565b8083825260208201915060208460051b870101935086841115620013f157600080fd5b602086015b8481101562001418576200140a816200131c565b8352918301918301620013f6565b509695505050505050565b600082601f8301126200143557600080fd5b8151602062001448620013c8836200137d565b8083825260208201915060208460051b8701019350868411156200146b57600080fd5b602086015b84811015620014185780516001600160601b0381168114620014925760008081fd5b835291830191830162001470565b600082601f830112620014b257600080fd5b81516020620014c5620013c8836200137d565b80838252602082019150600560208560051b880101945087851115620014ea57600080fd5b602087015b8581101562001516578051828110620015085760008081fd5b8452928401928401620014ef565b5090979650505050505050565b6000806000806000806000806000806101408b8d0312156200154457600080fd5b8a51995060208b0151985060408b015197506200156460608c016200131c565b60808c01519097506001600160401b03808211156200158257600080fd5b620015908e838f01620013a3565b975060a08d0151915080821115620015a757600080fd5b620015b58e838f01620013a3565b965060c08d0151915080821115620015cc57600080fd5b620015da8e838f01620013a3565b955060e08d0151915080821115620015f157600080fd5b620015ff8e838f0162001423565b94506101008d01519150808211156200161757600080fd5b620016258e838f01620014a0565b93506101208d01519150808211156200163d57600080fd5b506200164c8d828e01620013a3565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b8082018082111562000c9057634e487b7160e01b600052601160045260246000fd5b60008151808452602080850194506020840160005b83811015620016e85781516001600160a01b031687529582019590820190600101620016c1565b509495945050505050565b60008151808452602080850194506020840160005b83811015620016e857815115158752958201959082019060010162001708565b6040815260006200173d6040830185620016ac565b8281036020840152620017518185620016f3565b95945050505050565b6080815260006200176f6080830187620016f3565b82810360208481019190915286518083528782019282019060005b81811015620017b15784516001600160601b0316835293830193918301916001016200178a565b50508481036040860152620017c78188620016ac565b925050508281036060840152620017df8185620016ac565b979650505050505050565b60005b8381101562001807578181015183820152602001620017ed565b50506000910152565b6000825162001824818460208701620017ea565b9190910192915050565b6000815180845262001848816020860160208601620017ea565b601f01601f19169290920160200192915050565b60208152600062000c8d60208301846200182e565b6000602082840312156200188457600080fd5b81518015158114620012b757600080fd5b6001600160e01b0319831681528151600090620018ba816004850160208701620017ea565b919091016004019392505050565b608081526000620018dd60808301876200182e565b602083820381850152620018f28288620016ac565b91508382036040850152620019088287620016f3565b915083820360608501528185518084528284019150828160051b85010183880160005b838110156200195d57601f198784030185526200194a8383516200182e565b948601949250908501906001016200192b565b50909b9a5050505050505050505050565b608051614ba162001998600039600081816102c5015281816107c501526108510152614ba16000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b1461050c578063e75235b814610537578063e9c034981461053f578063f80b535214610552578063fdc4fa471461055a57600080fd5b8063cc7e6b3b146104be578063d0a50db0146104de578063d78392f8146104e6578063dafae408146104f957600080fd5b8063b9c36209116100e9578063b9c3620914610464578063bc9182fd1461048c578063bc96180b1461049f578063c441c4a8146104a757600080fd5b80639b19dbfd146103db5780639b2ee437146103e3578063b384abef146103f6578063b405aaf21461045157600080fd5b80633644e515116101925780637de5dedd116101615780637de5dedd14610332578063800eaab31461033a578063865e6fd31461034d578063901979d51461036057600080fd5b80633644e515146102c05780635e05cf9e146102e7578063776fb1ec146102fc5780637d465f791461031f57600080fd5b80631f425338116101ce5780631f425338146102675780632d6d7d731461027a57806334d5f37b1461028d57806335da8121146102ad57600080fd5b806301a5f43f1461020057806306aba0e1146102295780630a44fa431461023f5780630f7c318914610252575b600080fd5b61021361020e366004613b79565b61056d565b6040516102209190613c50565b60405180910390f35b610231610620565b604051908152602001610220565b61023161024d366004613c63565b61063d565b61025a6106c2565b6040516102209190613cde565b610213610275366004613c63565b6106db565b61025a610288366004613c63565b610728565b61023161029b366004613cf1565b60006020819052908152604090205481565b6102136102bb366004613c63565b61076c565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6102f5366004613d4e565b6107b2565b005b61030f61030a366004613cf1565b6107f1565b6040519015158152602001610220565b6102fa61032d366004613dea565b61083e565b610231610876565b6102fa610348366004613fe8565b6108f2565b6102fa61035b36600461405a565b610937565b6103c361036e36600461408d565b6001600160a01b039081166000908152600080516020614b0c83398151915260209081526040808320549093168252600080516020614aec83398151915290522054600160a01b90046001600160601b031690565b6040516001600160601b039091168152602001610220565b61025a610952565b6102fa6103f136600461408d565b61095c565b6104406104043660046140a8565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102209594939291906140f0565b61030f61045f36600461408d565b610af3565b6104776104723660046140a8565b610b0d565b60408051928352602083019190915201610220565b61025a61049a36600461411e565b610b2e565b610231610c1f565b6104af610c2a565b6040516102209392919061418c565b6104d16104cc366004613c63565b610c54565b60405161022091906141cf565b610231610c92565b6103c36104f436600461408d565b610cab565b61030f610507366004613cf1565b610cb6565b61051f61051a3660046141e2565b610cf3565b6040516001600160a01b039091168152602001610220565b610477610d6e565b61021361054d366004613c63565b610d9f565b61025a610de5565b61025a610568366004613c63565b610def565b6060610577610ed6565b61061587878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250610f0692505050565b979650505050505050565b6000610638600080516020614b4c8339815191525490565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061067e92508391506112829050565b6106ba8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112ba92505050565b949350505050565b6060610638600080516020614a8c83398151915261133e565b60606106e5610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061134b92505050565b9392505050565b606061072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611416915050565b92915050565b6060610776610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b6107bb33611662565b6107ea85858585857f0000000000000000000000000000000000000000000000000000000000000000336116a4565b5050505050565b60008060008381527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff166004811115610836576108366140ca565b141592915050565b61084733611662565b6107ea85858585857f000000000000000000000000000000000000000000000000000000000000000033611749565b600061088e600080516020614aac8339815191525490565b60016108a6600080516020614aac8339815191525490565b6108d46108bf600080516020614b4c8339815191525490565b600080516020614acc833981519152906117a5565b6108de9190614213565b6108e89190614226565b6106389190614239565b333014610929576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b60405180910390fd5b61093382826117d0565b5050565b61093f610ed6565b6109488161187e565b61093382826118b4565b6060610638611958565b61096533611662565b61096e81611971565b336000908152600080516020614aec83398151915260208190526040909120546001600160a01b0390811690831681036109c657604051630669b93360e31b81526001600160a01b0384166004820152602401610920565b600080516020614b2c83398151915260006109e182846119a6565b80156109f257506109f282866119bb565b905080610a1d5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610920565b6001600160a01b038381166000818152600080516020614b0c8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610ab0906364b18d0960e11b906060015b6040516020818303038152906040526119d0565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b6000610766600080516020614b2c83398151915283611cd8565b600080610b18610ed6565b610b228484611cfa565b915091505b9250929050565b8051606090806001600160401b03811115610b4b57610b4b613e2d565b604051908082528060200260200182016040528015610b74578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110610ba657610ba6614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b0316848281518110610bf757610bf7614270565b6001600160a01b0390921660209283029190910190910152600101610b89565b505050919050565b600061063860025490565b6060806060610c37611def565b9250610c4283610b2e565b9150610c4d83611e1a565b9050909192565b6060610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e1a92505050565b6000610638600080516020614b2c833981519152611f03565b600061076682611f0d565b6000610cd16108bf600080516020614b4c8339815191525490565b600080516020614aac83398151915254610ceb9084614286565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610d2a57610d2a6140ca565b60ff1681526020810191909152604001600020546001600160a01b0316905080610d69578160405163409140df60e11b8152600401610920919061429d565b919050565b600080610d87600080516020614acc8339815191525490565b600080516020614aac83398151915254915091509091565b6060610da9610ed6565b610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611f4592505050565b6060610638611def565b606081806001600160401b03811115610e0a57610e0a613e2d565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b509150600080516020614b0c83398151915260005b82811015610ecd57816000878784818110610e6557610e65614270565b9050602002016020810190610e7a919061408d565b6001600160a01b0390811682526020820192909252604001600020548551911690859083908110610ead57610ead614270565b6001600160a01b0390921660209283029190910190910152600101610e48565b50505092915050565b333014610f04576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b565b6060610f12838361222a565b610f1b81611282565b8251855181148015610f2d5750845181145b610f58576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b806001600160401b03811115610f7057610f70613e2d565b604051908082528060200260200182016040528015610f99578160200160208202803683370190505b50925080600003610faa575061127a565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b0c83398151915291600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156111fb578d818151811061103357611033614270565b602002602001015194508c818151811061104f5761104f614270565b6020026020010151935061106285611971565b61106b84611971565b8e818151811061107d5761107d614270565b60200260200101516001600160601b03166000036110bc576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b6110c68986611cd8565b806110d657506110d68985611cd8565b806110e657506110e68786611cd8565b806110f657506110f68785611cd8565b158c828151811061110957611109614270565b6020026020010190151590811515815250508b818151811061112d5761112d614270565b6020026020010151156111f35761114489866119bb565b5061114f87856119bb565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f908290811061119557611195614270565b6020908102919091018101516001600160601b03169083018190526111ba9084614213565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611019565b50611214600080516020614b4c83398151915283612334565b50611233635ebae8a060e01b8d8d604051602001610a9c9291906142b7565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161126894939291906142e5565b60405180910390a15050505050505050505b509392505050565b61128b8161234b565b156112b7576000356001600160e01b031916604051630d697db160e11b8152600401610920919061425b565b50565b6000816112c681611282565b600080516020614aec83398151915260005b8451811015610c17578160008683815181106112f6576112f6614270565b6020908102919091018101516001600160a01b031682528101919091526040016000205461133490600160a01b90046001600160601b031685614213565b93506001016112d8565b60606000610721836123ea565b60608161135781611282565b8251806001600160401b0381111561137157611371613e2d565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b509250600080516020614a8c83398151915260005b8281101561140d576113e38682815181106113cc576113cc614270565b6020026020010151836119a690919063ffffffff16565b8582815181106113f5576113f5614270565b911515602092830291909101909101526001016113af565b50505050919050565b606082516001600160401b0381111561143157611431613e2d565b60405190808252806020026020018201604052801561145a578160200160208202803683370190505b50905060005b8351811015611569576003600085838151811061147f5761147f614270565b60200260200101516004811115611498576114986140ca565b60048111156114a9576114a96140ca565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114dd576114dd614270565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611535575060006001600160a01b031682828151811061152257611522614270565b60200260200101516001600160a01b0316145b15611561576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b600101611460565b5092915050565b60608161157c81611282565b8251806001600160401b0381111561159657611596613e2d565b6040519080825280602002602001820160405280156115bf578160200160208202803683370190505b509250806000036115d0575061165c565b600080516020614a8c83398151915260006314d72edb60e21b815b848110156116565787818151811061160557611605614270565b602002602001015192506116188361187e565b6116228383612446565b61162c84846119bb565b87828151811061163e5761163e614270565b911515602092830291909101909101526001016115eb565b50505050505b50919050565b61166b81611f0d565b6001600160601b03166000036112b7576000356001600160e01b0319166003604051620f948f60ea1b8152600401610920929190614332565b6116b66116b0886144a3565b826125d9565b5060006116ca6116c5896144a3565b6126df565b905061173f6116d8896144a3565b8888888861172b896116eb89600061281e565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b61173a8a6116eb8a600161281e565b612857565b5050505050505050565b600061175d61175789614577565b83612c4e565b9050600061177261176d8a614577565b612d98565b905061179a828989898961178b8a6116eb89600061281e565b61173a8b6116eb8a600161281e565b505050505050505050565b600082548015611569578281029150808204831461156957634e487b7160005260116020526024601cfd5b60005b825181101561187957306001600160a01b03168282815181106117f8576117f8614270565b60200260200101516001600160a01b031603611835576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b61187183828151811061184a5761184a614270565b602002602001015183838151811061186457611864614270565b6020026020010151612ecf565b6001016117d3565b505050565b806001600160a01b03163b6000036112b757604051630bfc64a360e21b81526001600160a01b0382166004820152602401610920565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156118ea576118ea6140ca565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561192b5761192b6140ca565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6060610638600080516020614b2c83398151915261133e565b6001600160a01b0381166112b7576000356001600160e01b03191660405163104c66df60e31b8152600401610920919061425b565b6000610721836001600160a01b038416612f62565b6000610721836001600160a01b038416613055565b60006119e9600080516020614a8c83398151915261133e565b805190915060008190036119fd5750505050565b6000816001600160401b03811115611a1757611a17613e2d565b604051908082528060200260200182016040528015611a40578160200160208202803683370190505b5090506000826001600160401b03811115611a5d57611a5d613e2d565b604051908082528060200260200182016040528015611a9057816020015b6060815260200190600190039081611a7b5790505b50905060008686604051602001611aa8929190614665565b6040516020818303038152906040529050600081604051602401611acc91906146c2565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015611c9057868181518110611b1557611b15614270565b60200260200101516001600160a01b031683604051611b3491906146d5565b6000604051808303816000865af19150503d8060008114611b71576040519150601f19603f3d011682016040523d82523d6000602084013e611b76565b606091505b50868381518110611b8957611b89614270565b60200260200101868481518110611ba257611ba2614270565b6020026020010182905282151515158152505050848181518110611bc857611bc8614270565b6020026020010151611c8857868181518110611be657611be6614270565b60200260200101516001600160a01b031682604051611c0591906146d5565b6000604051808303816000865af19150503d8060008114611c42576040519150601f19603f3d011682016040523d82523d6000602084013e611c47565b606091505b50868381518110611c5a57611c5a614270565b60200260200101868481518110611c7357611c73614270565b60200260200101829052821515151581525050505b600101611afb565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051611cc6949392919061473e565b60405180910390a15050505050505050565b6001600160a01b03811660009081526001830160205260408120541515610721565b60008082841115611d2c576000356001600160e01b0319166040516387f6f09560e01b8152600401610920919061425b565b600080516020614acc833981519152549150611d54600080516020614aac8339815191525490565b9050611d6d600080516020614acc833981519152859055565b611d84600080516020614aac833981519152849055565b8284611daf7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6130a8565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606106387f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61133e565b8051606090806001600160401b03811115611e3757611e37613e2d565b604051908082528060200260200182016040528015611e60578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110611e9257611e92614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b0316848281518110611ee357611ee3614270565b6001600160601b0390921660209283029190910190910152600101611e75565b6000610766825490565b6001600160a01b03166000908152600080516020614aec8339815191526020526040902054600160a01b90046001600160601b031690565b606081611f5181611282565b8251806001600160401b03811115611f6b57611f6b613e2d565b604051908082528060200260200182016040528015611f94578160200160208202803683370190505b50925080600003611fa5575061165c565b60408051808201909152600080825260208201819052600080516020614b0c833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156121aa578c818151811061202e5761202e614270565b6020908102919091018101516001600160a01b038082166000908152928c90526040909220549091169550935061206485611971565b61206d84611971565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b031691830191909152909350908516146120e1576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b6120eb8785611cd8565b80156120fc57506120fc8886611cd8565b8c828151811061210e5761210e614270565b6020026020010190151590811515815250508b818151811061213257612132614270565b6020026020010151156121a25761214988866119a6565b5061215487856119a6565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b031916905592881682528881529181205582015161219f906001600160601b031684614213565b92505b600101612014565b506121c3600080516020614b4c833981519152836130c3565b506121e263c48549de60e01b8d8d604051602001610a9c9291906142b7565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d60405161221392919061478b565b60405180910390a150505050505050505050919050565b81518151606091908082016001600160401b0381111561224c5761224c613e2d565b604051908082528060200260200182016040528015612275578160200160208202803683370190505b50925060005b828110156122cf5785818151811061229557612295614270565b60200260200101518482815181106122af576122af614270565b6001600160a01b039092166020928302919091019091015260010161227b565b60005b8281101561232a578581815181106122ec576122ec614270565b602002602001015185838151811061230657612306614270565b6001600160a01b0390921660209283029190910190910152600191820191016122d2565b5050505092915050565b60006107668361234485856130d3565b9250829055565b6000815160000361235e57506000919050565b60005b60018351038110156123e157600181015b83518110156123d85783818151811061238d5761238d614270565b60200260200101516001600160a01b03168483815181106123b0576123b0614270565b60200260200101516001600160a01b0316036123d0575060019392505050565b600101612372565b50600101612361565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561243a57602002820191906000526020600020905b815481526020019060010190808311612426575b50505050509050919050565b600081604051602401612459919061425b565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906124a29085906146d5565b600060405180830381855afa9150503d80600081146124dd576040519150601f19603f3d011682016040523d82523d6000602084013e6124e2565b606091505b5091509150816125a457846001600160a01b03168360405160240161250791906146c2565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161253c91906146d5565b600060405180830381855afa9150503d8060008114612577576040519150601f19603f3d011682016040523d82523d6000602084013e61257c565b606091505b509092509050816125a457838560405163069d427960e11b81526004016109209291906147b0565b808060200190518101906125b891906147d3565b6107ea57838560405163069d427960e11b81526004016109209291906147b0565b602082015160009080820361261b5760405163092048d160e11b8152600080356001600160e01b03191660048301526024820152466044820152606401610920565b6002546126299085906130f2565b6000612634856126df565b905061263f82613193565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461269b576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516126cf9291906148e2565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561270d5761270d613e2d565b604051908082528060200260200182016040528015612736578160200160208202803683370190505b5060c086015190915060005b8251811015612795578660a00151818151811061276157612761614270565b60200260200101518051906020012083828151811061278257612782614270565b6020908102919091010152600101612742565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061286557508483145b612890576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b60008080856001600160401b038111156128ac576128ac613e2d565b6040519080825280602002602001820160405280156128d5578160200160208202803683370190505b5090506000866001600160401b038111156128f2576128f2613e2d565b60405190808252806020026020018201604052801561291b578160200160208202803683370190505b50905060008060003660005b8b811015612aac578c8c8281811061294157612941614270565b90506060020191508e8e8281811061295b5761295b614270565b9050602002016020810190612970919061490c565b92506000836001811115612986576129866140ca565b036129f0576129ab8b61299c602085018561492d565b8460200135856040013561322f565b945084878a6129b981614950565b9b50815181106129cb576129cb614270565b60200260200101906001600160a01b031690816001600160a01b031681525050612a61565b6001836001811115612a0457612a046140ca565b03612a3a57612a1a8a61299c602085018561492d565b9450848689612a2881614950565b9a50815181106129cb576129cb614270565b6000356001600160e01b031916604051630612418f60e11b8152600401610920919061425b565b846001600160a01b0316846001600160a01b031610612aa1576000356001600160e01b031916604051635d3dcd3160e01b8152600401610920919061425b565b849350600101612927565b50505085845250508281526020808c015160009081526001825260408082208e51835290925290812090612ade613257565b90506000612aeb85613261565b9050818110612b725780600003612b23576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b66838f61326c565b50505050505050612c45565b600082612b7d6132d9565b612b879190614226565b612b92906001614213565b90506000612b9f86613261565b9050818110612c1e5780600003612bd7576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050612c45565b6000356001600160e01b031916604051634ccfe64360e11b8152600401610920919061425b565b50505050505050565b612c8e6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b612ca7612ca084604001516001611416565b84906132e3565b9050612cbe600254826130f290919063ffffffff16565b6000612cc9826126df565b90506000612cd76000613193565b60008181527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602090815260409091209087015160018201859055600690910155905082518114612d49576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85612d7689612d98565b8989604051612d889493929190614969565b60405180910390a3505092915050565b60608101516040820151608083015151600092919083906001600160401b03811115612dc657612dc6613e2d565b604051908082528060200260200182016040528015612def578160200160208202803683370190505b5060a086015190915060005b8251811015612e4e5786608001518181518110612e1a57612e1a614270565b602002602001015180519060200120838281518110612e3b57612e3b614270565b6020908102919091010152600101612dfb565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b8060036000846004811115612ee657612ee66140ca565b6004811115612ef757612ef76140ca565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826004811115612f3557612f356140ca565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6000818152600183016020526040812054801561304b576000612f86600183614226565b8554909150600090612f9a90600190614226565b9050818114612fff576000866000018281548110612fba57612fba614270565b9060005260206000200154905080876000018481548110612fdd57612fdd614270565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061301057613010614a50565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610766565b6000915050610766565b600081815260018301602052604081205461309c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610766565b506000610766565b9055565b60006130b2825490565b9050610d69826130a4836001614213565b600061076683612344858561340d565b815481018181101561076657634e487b7160005260116020526024601cfd5b60008260600151511180156131105750816080015151826060015151145b801561312557508160a0015151826060015151145b801561313a57508160c0015151826060015151145b613165576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b61316f8142614213565b826040015111156109335760405163ad89be9d60e01b815260040160405180910390fd5b600081815260208190526040812054908190036131c25750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906000825460ff1660048111156131f4576131f46140ca565b036132125760405163757a436360e01b815260040160405180910390fd5b505050600090815260208190526040902080546001019081905590565b6000806000613240878787876135e8565b9150915061324d816136d5565b5095945050505050565b6000610638610876565b6000610766826112ba565b6132758161388b565b1561093357815460ff19166002178255600080613291836138a5565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba83836040516132cb929190614a66565b60405180910390a250505050565b6000610638610620565b6133236040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561335a5761335a613e2d565b604051908082528060200260200182016040528015613383578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b836040015151811015611569578281815181106133cf576133cf614270565b6020026020010151826060015182815181106133ed576133ed614270565b6001600160a01b03909216602092830291909101909101526001016133b0565b600082548281101561342c57634e487b7160005260116020526024601cfd5b9190910392915050565b60048301548110156134e95782600801600084600401838154811061345d5761345d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106134a6576134a6614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613436565b5060005b60058301548110156135a05782600801600084600501838154811061351457613514614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600584018054600786019291908490811061355d5761355d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016134ed565b50815460ff1916825560006001830181905560028301819055600383018190556135ce906004840190613b03565b6135dc600583016000613b03565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136cc565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136cc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561369c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136c5576000600192509250506136cc565b9150600090505b94509492505050565b60008160048111156136e9576136e96140ca565b036136f15750565b6001816004811115613705576137056140ca565b036137525760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610920565b6002816004811115613766576137666140ca565b036137b35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610920565b60038160048111156137c7576137c76140ca565b0361381f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610920565b6004816004811115613833576138336140ca565b036112b75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610920565b600081602001516000148061076657505060200151461490565b6060806138b18361388b565b6138ef57602083015160405163092048d160e11b81526000356001600160e01b03191660048201526024810191909152466044820152606401610920565b8260600151516001600160401b0381111561390c5761390c613e2d565b604051908082528060200260200182016040528015613935578160200160208202803683370190505b5091508260600151516001600160401b0381111561395557613955613e2d565b60405190808252806020026020018201604052801561398857816020015b60608152602001906001900390816139735790505b50905060005b836060015151811015613afd578360c0015181815181106139b1576139b1614270565b60200260200101515a116139e4576139c8846126df565b6040516307aec4ab60e21b815260040161092091815260200190565b836060015181815181106139fa576139fa614270565b60200260200101516001600160a01b031684608001518281518110613a2157613a21614270565b60200260200101518560c001518381518110613a3f57613a3f614270565b6020026020010151908660a001518481518110613a5e57613a5e614270565b6020026020010151604051613a7391906146d5565b600060405180830381858888f193505050503d8060008114613ab1576040519150601f19603f3d011682016040523d82523d6000602084013e613ab6565b606091505b50848381518110613ac957613ac9614270565b60200260200101848481518110613ae257613ae2614270565b6020908102919091010191909152901515905260010161398e565b50915091565b50805460008255906000526020600020908101906112b791905b80821115613b315760008155600101613b1d565b5090565b60008083601f840112613b4757600080fd5b5081356001600160401b03811115613b5e57600080fd5b6020830191508360208260051b8501011115610b2757600080fd5b60008060008060008060608789031215613b9257600080fd5b86356001600160401b0380821115613ba957600080fd5b613bb58a838b01613b35565b90985096506020890135915080821115613bce57600080fd5b613bda8a838b01613b35565b90965094506040890135915080821115613bf357600080fd5b50613c0089828a01613b35565b979a9699509497509295939492505050565b60008151808452602080850194506020840160005b83811015613c45578151151587529582019590820190600101613c27565b509495945050505050565b6020815260006107216020830184613c12565b60008060208385031215613c7657600080fd5b82356001600160401b03811115613c8c57600080fd5b613c9885828601613b35565b90969095509350505050565b60008151808452602080850194506020840160005b83811015613c455781516001600160a01b031687529582019590820190600101613cb9565b6020815260006107216020830184613ca4565b600060208284031215613d0357600080fd5b5035919050565b60008083601f840112613d1c57600080fd5b5081356001600160401b03811115613d3357600080fd5b602083019150836020606083028501011115610b2757600080fd5b600080600080600060608688031215613d6657600080fd5b85356001600160401b0380821115613d7d57600080fd5b9087019060e0828a031215613d9157600080fd5b90955060208701359080821115613da757600080fd5b613db389838a01613b35565b90965094506040880135915080821115613dcc57600080fd5b50613dd988828901613d0a565b969995985093965092949392505050565b600080600080600060608688031215613e0257600080fd5b85356001600160401b0380821115613e1957600080fd5b9087019060c0828a031215613d9157600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613e6557613e65613e2d565b60405290565b60405160c081016001600160401b0381118282101715613e6557613e65613e2d565b604051601f8201601f191681016001600160401b0381118282101715613eb557613eb5613e2d565b604052919050565b60006001600160401b03821115613ed657613ed6613e2d565b5060051b60200190565b600082601f830112613ef157600080fd5b81356020613f06613f0183613ebd565b613e8d565b80838252602082019150600560208560051b880101945087851115613f2a57600080fd5b602087015b85811015613f53578035828110613f465760008081fd5b8452928401928401613f2f565b5090979650505050505050565b80356001600160a01b0381168114610d6957600080fd5b600082601f830112613f8857600080fd5b81356020613f98613f0183613ebd565b8083825260208201915060208460051b870101935086841115613fba57600080fd5b602086015b84811015613fdd57613fd081613f60565b8352918301918301613fbf565b509695505050505050565b60008060408385031215613ffb57600080fd5b82356001600160401b038082111561401257600080fd5b61401e86838701613ee0565b9350602085013591508082111561403457600080fd5b5061404185828601613f77565b9150509250929050565b803560108110610d6957600080fd5b6000806040838503121561406d57600080fd5b6140768361404b565b915061408460208401613f60565b90509250929050565b60006020828403121561409f57600080fd5b61072182613f60565b600080604083850312156140bb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600581106112b7576112b76140ca565b60a081016140fd876140e0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561413057600080fd5b81356001600160401b0381111561414657600080fd5b6106ba84828501613f77565b60008151808452602080850194506020840160005b83811015613c455781516001600160601b031687529582019590820190600101614167565b60608152600061419f6060830186613ca4565b82810360208401526141b18186613ca4565b905082810360408401526141c58185614152565b9695505050505050565b6020815260006107216020830184614152565b6000602082840312156141f457600080fd5b6107218261404b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610766576107666141fd565b81810381811115610766576107666141fd565b60008261425657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610766576107666141fd565b60208101601083106142b1576142b16140ca565b91905290565b6040815260006142ca6040830185613ca4565b82810360208401526142dc8185613c12565b95945050505050565b6080815260006142f86080830187613c12565b828103602084015261430a8187614152565b9050828103604084015261431e8186613ca4565b905082810360608401526106158185613ca4565b6001600160e01b03198316815260408101600b8310614353576143536140ca565b8260208301529392505050565b600082601f83011261437157600080fd5b81356020614381613f0183613ebd565b8083825260208201915060208460051b8701019350868411156143a357600080fd5b602086015b84811015613fdd57803583529183019183016143a8565b6000601f83601f8401126143d257600080fd5b823560206143e2613f0183613ebd565b82815260059290921b8501810191818101908784111561440157600080fd5b8287015b848110156144975780356001600160401b03808211156144255760008081fd5b818a0191508a603f83011261443a5760008081fd5b8582013560408282111561445057614450613e2d565b614461828b01601f19168901613e8d565b92508183528c818386010111156144785760008081fd5b8181850189850137506000908201870152845250918301918301614405565b50979650505050505050565b600060e082360312156144b557600080fd5b6144bd613e43565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156144ef57600080fd5b6144fb36838701613f77565b6060840152608085013591508082111561451457600080fd5b61452036838701614360565b608084015260a085013591508082111561453957600080fd5b614545368387016143bf565b60a084015260c085013591508082111561455e57600080fd5b5061456b36828601614360565b60c08301525092915050565b600060c0823603121561458957600080fd5b614591613e6b565b823581526020830135602082015260408301356001600160401b03808211156145b957600080fd5b6145c536838701613ee0565b604084015260608501359150808211156145de57600080fd5b6145ea36838701614360565b6060840152608085013591508082111561460357600080fd5b61460f368387016143bf565b608084015260a085013591508082111561462857600080fd5b5061463536828601614360565b60a08301525092915050565b60005b8381101561465c578181015183820152602001614644565b50506000910152565b6001600160e01b0319831681528151600090614688816004850160208701614641565b919091016004019392505050565b600081518084526146ae816020860160208601614641565b601f01601f19169290920160200192915050565b6020815260006107216020830184614696565b600082516146e7818460208701614641565b9190910192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015613f5357601f1986840301895261472c838351614696565b98840198925090830190600101614710565b6080815260006147516080830187614696565b82810360208401526147638187613ca4565b905082810360408401526147778186613c12565b9050828103606084015261061581856146f1565b60408152600061479e6040830185613c12565b82810360208401526142dc8185613ca4565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082840312156147e557600080fd5b8151801515811461072157600080fd5b60008151808452602080850194506020840160005b83811015613c455781518752958201959082019060010161480a565b600060e0830182518452602080840151602086015260408401516040860152606084015160e0606087015282815180855261010088019150602083019450600092505b808310156148925784516001600160a01b03168252938301936001929092019190830190614869565b506080860151935086810360808801526148ac81856147f5565b935050505060a083015184820360a08601526148c882826146f1565b91505060c083015184820360c08601526142dc82826147f5565b6040815260006148f56040830185614826565b905060018060a01b03831660208301529392505050565b60006020828403121561491e57600080fd5b81356002811061072157600080fd5b60006020828403121561493f57600080fd5b813560ff8116811461072157600080fd5b600060018201614962576149626141fd565b5060010190565b60808152600061497c6080830187614826565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156149e65783516149d0816140e0565b82529284019260019290920191908401906149bd565b50606089015193508481036060860152614a0081856147f5565b935050505060808601518282036080840152614a1c82826146f1565b91505060a086015182820360a0840152614a3682826147f5565b93505050506142dc60608301846001600160a01b03169052565b634e487b7160e01b600052603160045260246000fd5b604081526000614a796040830185613c12565b82810360208401526142dc81856146f156fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca2646970667358221220cb0e92b2033c9131bafd8c90a491e8241ace110667169406b1c1a69bc857723964736f6c634300081700335da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240c55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce000000000000000000000000000000000000000000000000000000000000000100000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x4", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x2dee73f551b3abed26e8bcff6fdf199076359cad3e452780ea854a81db7b7a56", + "transactionType": "CREATE", + "contractName": "MockWrappedToken", + "contractAddress": "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08", + "function": null, + "arguments": [ + "\"Wrapped WETH\"", + "\"WETH\"" + ], + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x129c0c", + "value": "0x0", + "data": "0x60806040526002805460ff191660121790553480156200001e57600080fd5b5060405162000bb738038062000bb783398101604081905262000041916200012f565b60006200004f83826200022a565b5060016200005e82826200022a565b505050620002f6565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008f57600080fd5b81516001600160401b0380821115620000ac57620000ac62000067565b604051601f8301601f19908116603f01168101908282118183101715620000d757620000d762000067565b8160405283815260209250866020858801011115620000f557600080fd5b600091505b83821015620001195785820183015181830184015290820190620000fa565b6000602085830101528094505050505092915050565b600080604083850312156200014357600080fd5b82516001600160401b03808211156200015b57600080fd5b62000169868387016200007d565b935060208501519150808211156200018057600080fd5b506200018f858286016200007d565b9150509250929050565b600181811c90821680620001ae57607f821691505b602082108103620001cf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000225576000816000526020600020601f850160051c81016020861015620002005750805b601f850160051c820191505b8181101562000221578281556001016200020c565b5050505b505050565b81516001600160401b0381111562000246576200024662000067565b6200025e8162000257845462000199565b84620001d5565b602080601f8311600181146200029657600084156200027d5750858301515b600019600386901b1c1916600185901b17855562000221565b600085815260208120601f198616915b82811015620002c757888601518255948401946001909101908401620002a6565b5085821015620002e65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6108b180620003066000396000f3fe6080604052600436106100ab5760003560e01c806340c10f191161006457806340c10f19146101a657806370a08231146101c657806395d89b41146101f3578063a9059cbb14610208578063d0e30db0146100ba578063dd62ed3e14610228576100ba565b806306fdde03146100c2578063095ea7b3146100ed57806318160ddd1461011d57806323b872dd1461013a5780632e1a7d4d1461015a578063313ce5671461017a576100ba565b366100ba576100b8610260565b005b6100b8610260565b3480156100ce57600080fd5b506100d76102bb565b6040516100e491906106cd565b60405180910390f35b3480156100f957600080fd5b5061010d610108366004610738565b610349565b60405190151581526020016100e4565b34801561012957600080fd5b50475b6040519081526020016100e4565b34801561014657600080fd5b5061010d610155366004610762565b6103b6565b34801561016657600080fd5b506100b861017536600461079e565b61053a565b34801561018657600080fd5b506002546101949060ff1681565b60405160ff90911681526020016100e4565b3480156101b257600080fd5b506100b86101c1366004610738565b6105e0565b3480156101d257600080fd5b5061012c6101e13660046107b7565b60036020526000908152604090205481565b3480156101ff57600080fd5b506100d76106ac565b34801561021457600080fd5b5061010d610223366004610738565b6106b9565b34801561023457600080fd5b5061012c6102433660046107d2565b600460209081526000928352604080842090915290825290205481565b336000908152600360205260408120805434929061027f90849061081b565b909155505060405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600080546102c89061082e565b80601f01602080910402602001604051908101604052809291908181526020018280546102f49061082e565b80156103415780601f1061031657610100808354040283529160200191610341565b820191906000526020600020905b81548152906001019060200180831161032457829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103a49086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600360205260408120548211156103db57600080fd5b6001600160a01b038416331480159061041957506001600160a01b038416600090815260046020908152604080832033845290915290205460001914155b15610487576001600160a01b038416600090815260046020908152604080832033845290915290205482111561044e57600080fd5b6001600160a01b038416600090815260046020908152604080832033845290915281208054849290610481908490610868565b90915550505b6001600160a01b038416600090815260036020526040812080548492906104af908490610868565b90915550506001600160a01b038316600090815260036020526040812080548492906104dc90849061081b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161052891815260200190565b60405180910390a35060019392505050565b3360009081526003602052604090205481111561055657600080fd5b3360009081526003602052604081208054839290610575908490610868565b9091555050604051339082156108fc029083906000818181858888f193505050501580156105a7573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b6001600160a01b03821661063a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b6001600160a01b0382166000908152600360205260408120805483929061066290849061081b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600180546102c89061082e565b60006106c63384846103b6565b9392505050565b60006020808352835180602085015260005b818110156106fb578581018301518582016040015282016106df565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073357600080fd5b919050565b6000806040838503121561074b57600080fd5b6107548361071c565b946020939093013593505050565b60008060006060848603121561077757600080fd5b6107808461071c565b925061078e6020850161071c565b9150604084013590509250925092565b6000602082840312156107b057600080fd5b5035919050565b6000602082840312156107c957600080fd5b6106c68261071c565b600080604083850312156107e557600080fd5b6107ee8361071c565b91506107fc6020840161071c565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103b0576103b0610805565b600181811c9082168061084257607f821691505b60208210810361086257634e487b7160e01b600052602260045260246000fd5b50919050565b818103818111156103b0576103b061080556fea264697066735822122095d4930cf27620bcea5a7285e58e73054c5baacb40c41af0a6f7a73e87199e6e64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c577261707065642057455448000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000", + "nonce": "0x5", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xd36cfb4ff52aca0b54fab424d42682f7006aa276d920d954845fce772f15ae29", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x136900", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000134178696520496e66696e6974792053686172640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034158530000000000000000000000000000000000000000000000000000000000", + "nonce": "0x6", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xda899ebfaa31641d314550dd2aeb03595ec494bcd9323a950a1cef844fc8f200", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x136810", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0x7", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1c7c983e044318fc7794666da425f357e85f09fc64fef6f72b1638ed7ccb0925", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x123728", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x8", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x05ed9fcbf60a4649d6b19c4860b6674dee41f7408cf89d7fc02823656bf7ad03", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0xAad5541Eb4e5DE1f353BCc8EaBD124fc42107507", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "gas": "0x228f50", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506040516200158238038062001582833981016040819052620000349162000126565b8181600062000044838262000221565b50600162000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61128580620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101e1578063b88d4fde146101f4578063c87b56dd14610207578063e985e9c51461021a57600080fd5b80636352211e146101a557806370a08231146101b857806395d89b41146101d957600080fd5b8063095ea7b3116100c8578063095ea7b31461015757806323b872dd1461016c57806340c10f191461017f57806342842e0e1461019257600080fd5b806301ffc9a7146100ef57806306fdde0314610117578063081812fc1461012c575b600080fd5b6101026100fd366004610dac565b61022d565b60405190151581526020015b60405180910390f35b61011f61027f565b60405161010e9190610e19565b61013f61013a366004610e2c565b610311565b6040516001600160a01b03909116815260200161010e565b61016a610165366004610e61565b610338565b005b61016a61017a366004610e8b565b610452565b61016a61018d366004610e61565b610483565b61016a6101a0366004610e8b565b610491565b61013f6101b3366004610e2c565b6104ac565b6101cb6101c6366004610ec7565b61050c565b60405190815260200161010e565b61011f610592565b61016a6101ef366004610ee2565b6105a1565b61016a610202366004610f34565b6105ac565b61011f610215366004610e2c565b6105e4565b610102610228366004611010565b610658565b60006001600160e01b031982166380ac58cd60e01b148061025e57506001600160e01b03198216635b5e139f60e01b145b8061027957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028e90611043565b80601f01602080910402602001604051908101604052809291908181526020018280546102ba90611043565b80156103075780601f106102dc57610100808354040283529160200191610307565b820191906000526020600020905b8154815290600101906020018083116102ea57829003601f168201915b5050505050905090565b600061031c82610686565b506000908152600460205260409020546001600160a01b031690565b6000610343826104ac565b9050806001600160a01b0316836001600160a01b0316036103b55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103d157506103d18133610658565b6104435760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016103ac565b61044d83836106e8565b505050565b61045c3382610756565b6104785760405162461bcd60e51b81526004016103ac9061107d565b61044d8383836107b5565b61048d8282610951565b5050565b61044d838383604051806020016040528060008152506105ac565b6000818152600260205260408120546001600160a01b0316806102795760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b60006001600160a01b0382166105765760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103ac565b506001600160a01b031660009081526003602052604090205490565b60606001805461028e90611043565b61048d338383610a93565b6105b63383610756565b6105d25760405162461bcd60e51b81526004016103ac9061107d565b6105de84848484610b61565b50505050565b60606105ef82610686565b600061060660408051602081019091526000815290565b905060008151116106265760405180602001604052806000815250610651565b8061063084610b94565b6040516020016106419291906110cb565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600260205260409020546001600160a01b03166106e55760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061071d826104ac565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610762836104ac565b9050806001600160a01b0316846001600160a01b0316148061078957506107898185610658565b806107ad5750836001600160a01b03166107a284610311565b6001600160a01b0316145b949350505050565b826001600160a01b03166107c8826104ac565b6001600160a01b03161461082c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016103ac565b6001600160a01b03821661088e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103ac565b6108996000826106e8565b6001600160a01b03831660009081526003602052604081208054600192906108c2908490611110565b90915550506001600160a01b03821660009081526003602052604081208054600192906108f0908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b0382166109a75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016103ac565b6000818152600260205260409020546001600160a01b031615610a0c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016103ac565b6001600160a01b0382166000908152600360205260408120805460019290610a35908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603610af45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103ac565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610b6c8484846107b5565b610b7884848484610c95565b6105de5760405162461bcd60e51b81526004016103ac90611136565b606081600003610bbb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610be55780610bcf81611188565b9150610bde9050600a836111b7565b9150610bbf565b60008167ffffffffffffffff811115610c0057610c00610f1e565b6040519080825280601f01601f191660200182016040528015610c2a576020820181803683370190505b5090505b84156107ad57610c3f600183611110565b9150610c4c600a866111cb565b610c57906030611123565b60f81b818381518110610c6c57610c6c6111df565b60200101906001600160f81b031916908160001a905350610c8e600a866111b7565b9450610c2e565b60006001600160a01b0384163b15610d8b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610cd99033908990889088906004016111f5565b6020604051808303816000875af1925050508015610d14575060408051601f3d908101601f19168201909252610d1191810190611232565b60015b610d71573d808015610d42576040519150601f19603f3d011682016040523d82523d6000602084013e610d47565b606091505b508051600003610d695760405162461bcd60e51b81526004016103ac90611136565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107ad565b506001949350505050565b6001600160e01b0319811681146106e557600080fd5b600060208284031215610dbe57600080fd5b813561065181610d96565b60005b83811015610de4578181015183820152602001610dcc565b50506000910152565b60008151808452610e05816020860160208601610dc9565b601f01601f19169290920160200192915050565b6020815260006106516020830184610ded565b600060208284031215610e3e57600080fd5b5035919050565b80356001600160a01b0381168114610e5c57600080fd5b919050565b60008060408385031215610e7457600080fd5b610e7d83610e45565b946020939093013593505050565b600080600060608486031215610ea057600080fd5b610ea984610e45565b9250610eb760208501610e45565b9150604084013590509250925092565b600060208284031215610ed957600080fd5b61065182610e45565b60008060408385031215610ef557600080fd5b610efe83610e45565b915060208301358015158114610f1357600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610f4a57600080fd5b610f5385610e45565b9350610f6160208601610e45565b925060408501359150606085013567ffffffffffffffff80821115610f8557600080fd5b818701915087601f830112610f9957600080fd5b813581811115610fab57610fab610f1e565b604051601f8201601f19908116603f01168101908382118183101715610fd357610fd3610f1e565b816040528281528a6020848701011115610fec57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561102357600080fd5b61102c83610e45565b915061103a60208401610e45565b90509250929050565b600181811c9082168061105757607f821691505b60208210810361107757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600083516110dd818460208801610dc9565b8351908301906110f1818360208801610dc9565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610279576102796110fa565b80820180821115610279576102796110fa565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60006001820161119a5761119a6110fa565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826111c6576111c66111a1565b500490565b6000826111da576111da6111a1565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061122890830184610ded565b9695505050505050565b60006020828403121561124457600080fd5b815161065181610d9656fea2646970667358221220cb618065662e7edd32746d846fe974bcdec24b45727d8217ab8bb697460c03b464736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b4d6f636b2045524337323100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d5f455243373231000000000000000000000000000000000000000000000000", + "nonce": "0x9", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x1a4c5c", + "value": "0x0", + "data": "0x504af48c000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f0800000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000003c4e17b9056272ce1b49f6900d8cfd6171a1869d000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f7700000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000035a4e900000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000017d784000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "nonce": "0xa", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x1dcba", + "value": "0x0", + "data": "0x29b6eca90000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0xb", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionType": "CALL", + "contractName": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "function": "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", + "arguments": [ + "(1, 11155111, 1713164364, [0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d, 0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d], [0, 0], [0xe9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce, 0x01a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a], [1000000, 1000000])", + "[0]", + "[(27, 0x55f217103277c74cf09050ad7b6921a97c4cd51e3d27aad6fc593df454babf58, 0x52b7389372928284c678ebc2d6d6eb11b88f5c469c9c05fde4c3df558f1279dd)]" + ], + "transaction": { + "type": "0x02", + "from": "0x45e8f1acfc89f45720cf11e807ed85b730c67c7e", + "to": "0x5396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "gas": "0x16b706", + "value": "0x0", + "data": "0x5e05cf9e000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000005e0000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000000000000000000000000000000000000661cd04c00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000064e9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024401a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001b55f217103277c74cf09050ad7b6921a97c4cd51e3d27aad6fc593df454babf5852b7389372928284c678ebc2d6d6eb11b88f5c469c9c05fde4c3df558f1279dd", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x2e1bd6096e0362e57c9f7283d763660a65bcc2f230459e824dd9d6208672c86d", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x31762cdd4aa65cd6f5f09d7a05a56211720a1168", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0xc7ee", + "value": "0x16345785d8a0000", + "data": "0xa3912ec8", + "nonce": "0xc", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "1000000000000000000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x1d3a9042588f6c1065d4ca51de234bb29f40fd23", + "gas": "0x2420e", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000d3c21bcecceda1000000", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "500000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x523e8d078be0769e806b8a154f0f7ac6f4cde770", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e000000000000000000000000000000000000000000000000000000746a528800", + "nonce": "0x1", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockERC20.sol:MockERC20", + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x591a38ba0f6c4110057b0a4842b87e9796b3ed94", + "gas": "0x241d8", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000002d79883d2000", + "nonce": "0x2", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionIndex": "0xf", + "blockHash": "0x64d86c267a22dfe23a0fed32d8327fb2eac8311dea6d171bcfe37a62bf782208", + "blockNumber": "0x55f334", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x244127", + "gasUsed": "0x103480", + "contractAddress": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "logs": [ + { + "address": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x64d86c267a22dfe23a0fed32d8327fb2eac8311dea6d171bcfe37a62bf782208", + "blockNumber": "0x55f334", + "transactionHash": "0x8b20965bae03a8a39c19dadfb844a40efb3b0c79dc9539452872034e2fcc9fa8", + "transactionIndex": "0xf", + "logIndex": "0x19", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e4b" + }, + { + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x16a693", + "gasUsed": "0x9b5d0", + "contractAddress": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "logs": [ + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c2cb024747e86a05a2d2839dd02ceb78f939f983" + ], + "data": "0x", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "blockHash": "0x19da392b7153a817aed937b07f08d2ab644b316d9efe43fb2ac544df7b73c51e", + "blockNumber": "0x55f335", + "transactionHash": "0x9a3d363d4f352fb0573faff77d4cb2bf580d9f30eca8abd4a934bd08178e79a3", + "transactionIndex": "0x13", + "logIndex": "0x6", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000404000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000008000000000000000000000000000000000000000000000000800000000100000000020000000000000000000000000000000000000001000000000000000020000000000000000000000000000000000400000000000000000000000000080000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e54" + }, + { + "transactionHash": "0xfc974f6c8df2578db7fd7422c3218315120a78c63fc02a15adfeb8074998e0d1", + "transactionIndex": "0x6", + "blockHash": "0xc66a8e8dafce7c756ec7f8f3e6004ced94ff119f4d2690c6a3cab7d7318b037c", + "blockNumber": "0x55f336", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x408a01", + "gasUsed": "0x3ccbe7", + "contractAddress": "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e54" + }, + { + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0xfd335", + "gasUsed": "0x9b5d0", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000762f3e2221c0dee575d1bd43145bafeebe965ef2" + ], + "data": "0x", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "blockHash": "0xa25151481341d1709bb2ee72ace7ed16112c5a44c79189a10f3b41fd8c9a0000", + "blockNumber": "0x55f337", + "transactionHash": "0x60d887a1f18d798ed40b636aa7ac49158dc05e4345f29814d3850f3729ba18ab", + "transactionIndex": "0x7", + "logIndex": "0x8", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000200000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000040000000000000000000000000000000000000000000800000000080000000000000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e56" + }, + { + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x4763a3", + "gasUsed": "0x4763a3", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "logs": [ + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000004" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000100000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da1", + "0x8000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d" + ], + "data": "0x", + "blockHash": "0x42dedbf4364e4511ad5e4f8468437c47e7b6be64d165e8f8beec4d07cb0456e3", + "blockNumber": "0x55f338", + "transactionHash": "0xaf75d8fee3e27b9917e959002954ceb6ecdcd01ce5c120d9a73a92d601c28377", + "transactionIndex": "0x0", + "logIndex": "0x4", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x04020000000000000000000000000000000080400000200000100000000000000000400000000000000000000000040000000000000000010204000000040000000000000100800000000000000000000000000000040005000400000000000008000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000001000010100000000000000000000000000002000000000000000000000000000000000000000000000000000808000001000000000000060000000020000000000000000900000000000000000008000000000000000001000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e59" + }, + { + "transactionHash": "0x2dee73f551b3abed26e8bcff6fdf199076359cad3e452780ea854a81db7b7a56", + "transactionIndex": "0x8", + "blockHash": "0xd46b3accefb441f3c15d14af87ce8b7f58cbfb081076734b47b3c01c54eb1d3e", + "blockNumber": "0x55f339", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x127d50", + "gasUsed": "0x95e0a", + "contractAddress": "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5b" + }, + { + "transactionHash": "0xd36cfb4ff52aca0b54fab424d42682f7006aa276d920d954845fce772f15ae29", + "transactionIndex": "0x5", + "blockHash": "0x5c7e1693354d5cd1d25e6f67528bc02d1ea3555be8a83acaf8638b86b410cbba", + "blockNumber": "0x55f33a", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x596f34", + "gasUsed": "0x9bf7e", + "contractAddress": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5d" + }, + { + "transactionHash": "0xda899ebfaa31641d314550dd2aeb03595ec494bcd9323a950a1cef844fc8f200", + "transactionIndex": "0xc", + "blockHash": "0x4df8de86171713e8dcb9b69825e37983e8e5db4f0516a592c2614abb2c505c34", + "blockNumber": "0x55f33b", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x174f2d", + "gasUsed": "0x9bf06", + "contractAddress": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + }, + { + "transactionHash": "0x1c7c983e044318fc7794666da425f357e85f09fc64fef6f72b1638ed7ccb0925", + "transactionIndex": "0x6", + "blockHash": "0x12435e24ca8c1c2f67aec6addf959fd149ab08c377897f82e95891a011030941", + "blockNumber": "0x55f33c", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0xcce3b", + "gasUsed": "0x92116", + "contractAddress": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e62" + }, + { + "transactionHash": "0x05ed9fcbf60a4649d6b19c4860b6674dee41f7408cf89d7fc02823656bf7ad03", + "transactionIndex": "0x10", + "blockHash": "0x6aae1318428264a2fc074362d9d496a99b53f373f698bb8d6fc5dc54abeead42", + "blockNumber": "0x55f33d", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": null, + "cumulativeGasUsed": "0x1ebea5", + "gasUsed": "0x115336", + "contractAddress": "0xAad5541Eb4e5DE1f353BCc8EaBD124fc42107507", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e61" + }, + { + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x709f0d", + "gasUsed": "0xd2e08", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "0x00000000000000000000000031762cdd4aa65cd6f5f09d7a05a56211720a1168" + ], + "data": "0x", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf" + ], + "data": "0x0000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f08", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x8", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000004", + "0x000000000000000000000000000000000000000000000000000000000000000a" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x9", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000007", + "0x000000000000000000000000000000000000000000000000000000000000000a" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xa", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000003c4e17b9056272ce1b49f6900d8cfd6171a1869d000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f7700000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xb", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000035a4e900000000000000000000000000000000000000000000000004e1003b28d92800000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xc", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000017d784000000000000000000000000000000000000000000000000022b1c8c1227a000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xd", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc42107507000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xe", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000050000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f080000000000000000000000001d3a9042588f6c1065d4ca51de234bb29f40fd23000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde770000000000000000000000000591a38ba0f6c4110057b0a4842b87e9796b3ed94000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc421075070000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0xf", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x2594498e37aea40ae73a5e71a99d9fd1df4a871a64dfa2eaa5024c442cdf5802", + "blockNumber": "0x55f33e", + "transactionHash": "0x97718314ac57504f4b5c54cb09ef926f128d0a2ce91dbafe08b555652a644dc8", + "transactionIndex": "0x2", + "logIndex": "0x10", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x000000040082000000000000000040000000000090000000020000000000000000000000000000000000000022000000000010000400000000200000000404008000200000000000000000000000000000000000000c0000000400000000000008000010020000000000000000000800000001000000000000000000000000000000000000000040010000000000000020000000040080000000000000000001000000000000001000010000100400080400000000000008003000000000000000200000000020000000000000440000000000008060000102000100000060008000100000000000000000000000000000000000000000000000200000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e62" + }, + { + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x32c5a", + "gasUsed": "0xe8f0", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x000000000000000000000000000000000000000000000000000000000000000b", + "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d" + ], + "data": "0x", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "blockHash": "0x64a7398f407e2f095bcfb64bd7b11f0f9274dedd2ce5975540f7ca65512dd9f7", + "blockNumber": "0x55f33f", + "transactionHash": "0xfd8ba716d387b2866145dbf75c6479d22c4a0f33110719f7e6c561a955161715", + "transactionIndex": "0x5", + "logIndex": "0x4", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008000000000004000000000000000400000000000000000000000000000000000000000000000000000000000000000000000010004000000000000000000000100800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000002000000040001000000000000000000000000000000000000000000000000000000000000000040000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e66" + }, + { + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "from": "0x45E8f1aCFC89F45720cf11e807eD85B730C67C7e", + "to": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "cumulativeGasUsed": "0x100066", + "gasUsed": "0xb8b3c", + "contractAddress": null, + "logs": [ + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x0000000000000000000000000000000000000000000000000000000000aa36a7", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000000000000000000000000000000000000661cd04c00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000064e9c0349800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024401a5f43f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba", + "0x036fad1ccfdc756de3739e2d0082cd7121dc51365b26125c9f18b2a95013699f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x45ea934345ba79d1f28d064a46523300e6782d676f9938cf2e66e40f0501e053", + "blockNumber": "0x55f340", + "transactionHash": "0x9472c29a430a1716827514c4b27e4f9c6ca7695ace23dfb0f349ec16f374b693", + "transactionIndex": "0x6", + "logIndex": "0x6", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000080000110000000000000000000080000000000000100000000000000000000000000000000000000000040002000000000000000000000000040000000000000000000000000000000000000000000000040000800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000200010000000000000000000000000000000000000000028000000080000000000000000000000000000000000212000000000000000000000000000800000000100000800000000000000000400040000000000000000000000000900000000000000020000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e65" + }, + { + "transactionHash": "0x2e1bd6096e0362e57c9f7283d763660a65bcc2f230459e824dd9d6208672c86d", + "transactionIndex": "0xa", + "blockHash": "0x6afdcc553c494ac7fa319a1a21a07874af034283d416b883c052602ed1aa9dd9", + "blockNumber": "0x55f341", + "from": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x13f109", + "gasUsed": "0x6faa", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + }, + { + "transactionHash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionIndex": "0x11", + "blockHash": "0x45eca05b0359867cbc7b68ba8ac73c2ebf9fda1802e2fc098c59a3e611fd241c", + "blockNumber": "0x55f342", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "cumulativeGasUsed": "0x6adf4c", + "gasUsed": "0x10b12", + "contractAddress": null, + "logs": [ + { + "address": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", + "blockHash": "0x45eca05b0359867cbc7b68ba8ac73c2ebf9fda1802e2fc098c59a3e611fd241c", + "blockNumber": "0x55f342", + "transactionHash": "0x35e78d416afd2b635ffa21682bb281a9676ae946184d1912f01854aa4c5249d9", + "transactionIndex": "0x11", + "logIndex": "0x44", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000000000000000020000000000000000000800000000000000000000002010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000020000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5f" + }, + { + "transactionHash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionIndex": "0x7", + "blockHash": "0x0b478be16ce44504d4d8b271f105badb63dd194cda40b73084160b606f29ac93", + "blockNumber": "0x55f343", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "cumulativeGasUsed": "0x37c4f", + "gasUsed": "0x10aee", + "contractAddress": null, + "logs": [ + { + "address": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x000000000000000000000000000000000000000000000000000000746a528800", + "blockHash": "0x0b478be16ce44504d4d8b271f105badb63dd194cda40b73084160b606f29ac93", + "blockNumber": "0x55f343", + "transactionHash": "0x820bd3b09997e2051f13160d810b051bde970e17aa549fd14ad5f140a8161712", + "transactionIndex": "0x7", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000040000000000020000000000000000000800000000000000000000000010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000800000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e5f" + }, + { + "transactionHash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionIndex": "0xd", + "blockHash": "0x6eaa5ed29a93ecffb338b7cfcabda5cca207cb4c78a53debbe59cae7e585656b", + "blockNumber": "0x55f344", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "cumulativeGasUsed": "0xcc9c5", + "gasUsed": "0x10afa", + "contractAddress": null, + "logs": [ + { + "address": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x6eaa5ed29a93ecffb338b7cfcabda5cca207cb4c78a53debbe59cae7e585656b", + "blockNumber": "0x55f344", + "transactionHash": "0x92ed23d7cca729f5e052af7d768046a180c9615b90c71969b8bed89db63e9836", + "transactionIndex": "0xd", + "logIndex": "0xb", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000000000000000000000000000020000000000000000000800000000000000000020000010000200000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000100000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb2d05e60" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712302101, + "chain": 11155111, + "multi": false, + "commit": "7ef18ec" +} \ No newline at end of file diff --git a/deployments/sepolia/.chainId b/deployments/sepolia/.chainId new file mode 100644 index 00000000..bd8d1cd4 --- /dev/null +++ b/deployments/sepolia/.chainId @@ -0,0 +1 @@ +11155111 \ No newline at end of file diff --git a/deployments/sepolia/AXS.json b/deployments/sepolia/AXS.json new file mode 100644 index 00000000..9ad45e1c --- /dev/null +++ b/deployments/sepolia/AXS.json @@ -0,0 +1,448 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "nonpayable" + }, + { + "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": "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": "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": "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": "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": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "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": "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 + } + ], + "address": "0x1d3a9042588F6C1065d4cA51De234BB29F40Fd23", + "args": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000134178696520496e66696e6974792053686172640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034158530000000000000000000000000000000000000000000000000000000000", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MockERC20.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + } + }, + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC20.sol\":\"MockERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockERC20.sol\":{\"keccak256\":\"0x71616dc3d3c909e9f68e85aad48010a46c0a4fb217a55c8e265a0955fd40153a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://134f2a8eedd6a5ba48256ee3412e0e2847ab7cfff88f8fc7a38dde2483c4207e\",\"dweb:/ipfs/QmPBe1HH5v67qTomJXPYoanLh4fp7wbQLfhjzoWJTCsuYg\"]}},\"version\":1}", + "nonce": 6, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 104082, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 104088, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 104090, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 104092, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 104094, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/MainchainBridgeManager.json b/deployments/sepolia/MainchainBridgeManager.json new file mode 100644 index 00000000..07911706 --- /dev/null +++ b/deployments/sepolia/MainchainBridgeManager.json @@ -0,0 +1,2161 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "roninChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bridgeContract", + "type": "address", + "internalType": "address" + }, + { + "name": "callbackRegisters", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "voteWeights", + "type": "uint96[]", + "internalType": "uint96[]" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addBridgeOperators", + "inputs": [ + { + "name": "voteWeights", + "type": "uint96[]", + "internalType": "uint96[]" + }, + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "addeds", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "checkThreshold", + "inputs": [ + { + "name": "_voteWeight", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeOperatorOf", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeOperatorWeight", + "inputs": [ + { + "name": "bridgeOperator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "weight", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeOperators", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getCallbackRegisters", + "inputs": [], + "outputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ], + "outputs": [ + { + "name": "contract_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getFullBridgeOperatorInfos", + "inputs": [], + "outputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorWeight", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "weight", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorWeights", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorsOf", + "inputs": [ + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProposalExpiryDuration", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThreshold", + "inputs": [], + "outputs": [ + { + "name": "num_", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom_", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTotalWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "globalProposalRelayed", + "inputs": [ + { + "name": "_round", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isBridgeOperator", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumVoteWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "registerCallbacks", + "inputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "registereds", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "relayGlobalProposal", + "inputs": [ + { + "name": "globalProposal", + "type": "tuple", + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "relayProposal", + "inputs": [ + { + "name": "proposal", + "type": "tuple", + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeBridgeOperators", + "inputs": [ + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "removeds", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "resolveTargets", + "inputs": [ + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + } + ], + "outputs": [ + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "round", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setThreshold", + "inputs": [ + { + "name": "numerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sumGovernorsWeight", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "sum", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalBridgeOperator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unregisterCallbacks", + "inputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "unregistereds", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateBridgeOperator", + "inputs": [ + { + "name": "newBridgeOperator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateManyTargetOption", + "inputs": [ + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "vote", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "status", + "type": "uint8", + "internalType": "enum VoteStatusConsumer.VoteStatus" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "againstVoteWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "forVoteWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "BridgeOperatorUpdated", + "inputs": [ + { + "name": "governor", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fromBridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "toBridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorsAdded", + "inputs": [ + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "voteWeights", + "type": "uint96[]", + "indexed": false, + "internalType": "uint96[]" + }, + { + "name": "governors", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorsRemoved", + "inputs": [ + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ContractUpdated", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GlobalProposalCreated", + "inputs": [ + { + "name": "round", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "proposal", + "type": "tuple", + "indexed": false, + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "globalProposalHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "globalProposal", + "type": "tuple", + "indexed": false, + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "creator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Notified", + "inputs": [ + { + "name": "callData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "registers", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "returnDatas", + "type": "bytes[]", + "indexed": false, + "internalType": "bytes[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalApproved", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalCreated", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "round", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "proposal", + "type": "tuple", + "indexed": false, + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "creator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExecuted", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "successCalls", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "returnDatas", + "type": "bytes[]", + "indexed": false, + "internalType": "bytes[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExpired", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExpiryDurationChanged", + "inputs": [ + { + "name": "duration", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalRejected", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalVoted", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "voter", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "support", + "type": "uint8", + "indexed": false, + "internalType": "enum Ballot.VoteType" + }, + { + "name": "weight", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TargetOptionUpdated", + "inputs": [ + { + "name": "targetOption", + "type": "uint8", + "indexed": true, + "internalType": "enum GlobalProposal.TargetOption" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThresholdUpdated", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numerator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "previousNumerator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "previousDenominator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrBridgeOperatorAlreadyExisted", + "inputs": [ + { + "name": "bridgeOperator", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrBridgeOperatorUpdateFailed", + "inputs": [ + { + "name": "bridgeOperator", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrContractTypeNotFound", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ] + }, + { + "type": "error", + "name": "ErrCurrentProposalIsNotCompleted", + "inputs": [] + }, + { + "type": "error", + "name": "ErrDuplicated", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInsufficientGas", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidArguments", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidChainId", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidExpiryTimestamp", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidOrder", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidProposalNonce", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidThreshold", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidVoteWeight", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrLengthMismatch", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrOnlySelfCall", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrRelayFailed", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrUnauthorized", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedVoteType", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrVoteIsFinalized", + "inputs": [] + }, + { + "type": "error", + "name": "ErrZeroAddress", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrZeroCodeContract", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "args": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce000000000000000000000000000000000000000000000000000000000000000100000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x60a06040526040516200659938038062006599833981016040819052620000269162001523565b8181600160ff1b8c8c8c8c8c8c8c8c836200004181620001a3565b505060016000805160206200657983398151915255620000628888620002b2565b50620000729050600286620003c7565b604080516020808201839052600c60608301526b212924a223a2afa0a226a4a760a11b6080808401919091528284018a905283518084038201815260a0840185528051908301207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08501527f9d3fa1662ea89365eb7af36506f0ad5413bd7e078960d8481ff4718763aaa8e960e08501527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a56101008501526101208085019190915284518085039091018152610140909301909352815191012090526200015d81838562000471565b50505050505050505062000177816200089160201b60201c565b5062000185600030620008c4565b62000191828262000960565b5050505050505050505050506200196e565b606081620001b18162000a23565b8251806001600160401b03811115620001ce57620001ce62001334565b604051908082528060200260200182016040528015620001f8578160200160208202803683370190505b509250806000036200020b5750620002ac565b6000805160206200653983398151915260006314d72edb60e21b815b84811015620002a6578781815181106200024557620002456200165e565b60200260200101519250620002608362000a5f60201b60201c565b6200026c838362000a97565b62000278848462000c76565b8782815181106200028d576200028d6200165e565b9115156020928302919091019091015260010162000227565b50505050505b50919050565b60008082841115620002ea576040516387f6f09560e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b60008051602062006559833981519152549150620003267fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff5490565b90506200034160008051602062006559833981519152859055565b6200036b7fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff849055565b8284620003876000805160206200657983398151915262000c96565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111562000400576200040062001674565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111562000444576200044462001674565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60606200047f838362000cbe565b6200048a8162000a23565b82518551811480156200049d5750845181145b620004ca576040516306b5667560e21b81526001600160e01b0319600035166004820152602401620002e1565b806001600160401b03811115620004e557620004e562001334565b6040519080825280602002602001820160405280156200050f578160200160208202803683370190505b5092508060000362000522575062000889565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c917f8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3917fd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d917f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3919081908190815b89811015620007db578d8181518110620005e557620005e56200165e565b602002602001015194508c81815181106200060457620006046200165e565b602002602001015193506200061f8562000ddc60201b60201c565b6200062a8462000ddc565b8e81815181106200063f576200063f6200165e565b60200260200101516001600160601b03166000036200068057604051637f11b8a360e11b81526001600160e01b0319600035166004820152602401620002e1565b6200068c898662000e13565b806200069f57506200069f898562000e13565b80620006b25750620006b2878662000e13565b80620006c55750620006c5878562000e13565b158c8281518110620006db57620006db6200165e565b6020026020010190151590811515815250508b81815181106200070257620007026200165e565b602002602001015115620007d2576200071c898662000c76565b5062000729878562000c76565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f90829081106200077257620007726200165e565b6020908102919091018101516001600160601b03169083018190526200079990846200168a565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101620005c7565b50620008087f6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c8362000e36565b5062000840635ebae8a060e01b8d8d6040516020016200082a92919062001728565b60408051601f1981840301815291905262000e50565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f6040516200087794939291906200175a565b60405180910390a15050505050505050505b509392505050565b600281905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b8060036000846004811115620008de57620008de62001674565b6004811115620008f257620008f262001674565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600481111562000933576200093362001674565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60005b825181101562000a1e57306001600160a01b03168282815181106200098c576200098c6200165e565b60200260200101516001600160a01b031603620009cb5760405163053265f160e01b81526001600160e01b0319600035166004820152602401620002e1565b62000a15838281518110620009e457620009e46200165e565b602002602001015183838151811062000a015762000a016200165e565b6020026020010151620008c460201b60201c565b60010162000963565b505050565b62000a2e816200118b565b1562000a5c57604051630d697db160e11b81526001600160e01b0319600035166004820152602401620002e1565b50565b806001600160a01b03163b60000362000a5c57604051630bfc64a360e21b81526001600160a01b0382166004820152602401620002e1565b6040516001600160e01b03198216602482015260009060440160408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169062000afb90859062001810565b600060405180830381855afa9150503d806000811462000b38576040519150601f19603f3d011682016040523d82523d6000602084013e62000b3d565b606091505b50915091508162000c1f57846001600160a01b03168360405160240162000b6591906200185c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525162000b9c919062001810565b600060405180830381855afa9150503d806000811462000bd9576040519150601f19603f3d011682016040523d82523d6000602084013e62000bde565b606091505b5090925090508162000c1f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b8080602001905181019062000c35919062001871565b62000c6f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b5050505050565b600062000c8d836001600160a01b03841662001236565b90505b92915050565b600062000ca1825490565b905062000cb98262000cb58360016200168a565b9055565b919050565b81518151606091908082016001600160401b0381111562000ce35762000ce362001334565b60405190808252806020026020018201604052801562000d0d578160200160208202803683370190505b50925060005b8281101562000d6f5785818151811062000d315762000d316200165e565b602002602001015184828151811062000d4e5762000d4e6200165e565b6001600160a01b039092166020928302919091019091015260010162000d13565b60005b8281101562000dd25785818151811062000d905762000d906200165e565b602002602001015185838151811062000dad5762000dad6200165e565b6001600160a01b03909216602092830291909101909101526001918201910162000d72565b5050505092915050565b6001600160a01b03811662000a5c5760405163104c66df60e31b81526001600160e01b0319600035166004820152602401620002e1565b6001600160a01b0381166000908152600183016020526040812054151562000c8d565b600062000c908362000e49818562001288565b9250829055565b600062000e6c60008051602062006539833981519152620012a8565b8051909150600081900362000e815750505050565b6000816001600160401b0381111562000e9e5762000e9e62001334565b60405190808252806020026020018201604052801562000ec8578160200160208202803683370190505b5090506000826001600160401b0381111562000ee85762000ee862001334565b60405190808252806020026020018201604052801562000f1d57816020015b606081526020019060019003908162000f075790505b5090506000868660405160200162000f3792919062001895565b604051602081830303815290604052905060008160405160240162000f5d91906200185c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015620011415786818151811062000faa5762000faa6200165e565b60200260200101516001600160a01b03168360405162000fcb919062001810565b6000604051808303816000865af19150503d80600081146200100a576040519150601f19603f3d011682016040523d82523d6000602084013e6200100f565b606091505b508683815181106200102557620010256200165e565b602002602001018684815181106200104157620010416200165e565b60200260200101829052821515151581525050508481815181106200106a576200106a6200165e565b602002602001015162001138578681815181106200108c576200108c6200165e565b60200260200101516001600160a01b031682604051620010ad919062001810565b6000604051808303816000865af19150503d8060008114620010ec576040519150601f19603f3d011682016040523d82523d6000602084013e620010f1565b606091505b508683815181106200110757620011076200165e565b602002602001018684815181106200112357620011236200165e565b60200260200101829052821515151581525050505b60010162000f8c565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051620011799493929190620018c8565b60405180910390a15050505050505050565b600081516000036200119f57506000919050565b60005b60018351038110156200122d57600181015b83518110156200122357838181518110620011d357620011d36200165e565b60200260200101516001600160a01b0316848381518110620011f957620011f96200165e565b60200260200101516001600160a01b0316036200121a575060019392505050565b600101620011b4565b50600101620011a2565b50600092915050565b60008181526001830160205260408120546200127f5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000c90565b50600062000c90565b815481018181101562000c9057634e487b7160005260116020526024601cfd5b60606000620012b783620012be565b9392505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156200131057602002820191906000526020600020905b815481526020019060010190808311620012fb575b50505050509050919050565b80516001600160a01b038116811462000cb957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562001375576200137562001334565b604052919050565b60006001600160401b0382111562001399576200139962001334565b5060051b60200190565b600082601f830112620013b557600080fd5b81516020620013ce620013c8836200137d565b6200134a565b8083825260208201915060208460051b870101935086841115620013f157600080fd5b602086015b8481101562001418576200140a816200131c565b8352918301918301620013f6565b509695505050505050565b600082601f8301126200143557600080fd5b8151602062001448620013c8836200137d565b8083825260208201915060208460051b8701019350868411156200146b57600080fd5b602086015b84811015620014185780516001600160601b0381168114620014925760008081fd5b835291830191830162001470565b600082601f830112620014b257600080fd5b81516020620014c5620013c8836200137d565b80838252602082019150600560208560051b880101945087851115620014ea57600080fd5b602087015b8581101562001516578051828110620015085760008081fd5b8452928401928401620014ef565b5090979650505050505050565b6000806000806000806000806000806101408b8d0312156200154457600080fd5b8a51995060208b0151985060408b015197506200156460608c016200131c565b60808c01519097506001600160401b03808211156200158257600080fd5b620015908e838f01620013a3565b975060a08d0151915080821115620015a757600080fd5b620015b58e838f01620013a3565b965060c08d0151915080821115620015cc57600080fd5b620015da8e838f01620013a3565b955060e08d0151915080821115620015f157600080fd5b620015ff8e838f0162001423565b94506101008d01519150808211156200161757600080fd5b620016258e838f01620014a0565b93506101208d01519150808211156200163d57600080fd5b506200164c8d828e01620013a3565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b8082018082111562000c9057634e487b7160e01b600052601160045260246000fd5b60008151808452602080850194506020840160005b83811015620016e85781516001600160a01b031687529582019590820190600101620016c1565b509495945050505050565b60008151808452602080850194506020840160005b83811015620016e857815115158752958201959082019060010162001708565b6040815260006200173d6040830185620016ac565b8281036020840152620017518185620016f3565b95945050505050565b6080815260006200176f6080830187620016f3565b82810360208481019190915286518083528782019282019060005b81811015620017b15784516001600160601b0316835293830193918301916001016200178a565b50508481036040860152620017c78188620016ac565b925050508281036060840152620017df8185620016ac565b979650505050505050565b60005b8381101562001807578181015183820152602001620017ed565b50506000910152565b6000825162001824818460208701620017ea565b9190910192915050565b6000815180845262001848816020860160208601620017ea565b601f01601f19169290920160200192915050565b60208152600062000c8d60208301846200182e565b6000602082840312156200188457600080fd5b81518015158114620012b757600080fd5b6001600160e01b0319831681528151600090620018ba816004850160208701620017ea565b919091016004019392505050565b608081526000620018dd60808301876200182e565b602083820381850152620018f28288620016ac565b91508382036040850152620019088287620016f3565b915083820360608501528185518084528284019150828160051b85010183880160005b838110156200195d57601f198784030185526200194a8383516200182e565b948601949250908501906001016200192b565b50909b9a5050505050505050505050565b608051614ba162001998600039600081816102c5015281816107c501526108510152614ba16000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b1461050c578063e75235b814610537578063e9c034981461053f578063f80b535214610552578063fdc4fa471461055a57600080fd5b8063cc7e6b3b146104be578063d0a50db0146104de578063d78392f8146104e6578063dafae408146104f957600080fd5b8063b9c36209116100e9578063b9c3620914610464578063bc9182fd1461048c578063bc96180b1461049f578063c441c4a8146104a757600080fd5b80639b19dbfd146103db5780639b2ee437146103e3578063b384abef146103f6578063b405aaf21461045157600080fd5b80633644e515116101925780637de5dedd116101615780637de5dedd14610332578063800eaab31461033a578063865e6fd31461034d578063901979d51461036057600080fd5b80633644e515146102c05780635e05cf9e146102e7578063776fb1ec146102fc5780637d465f791461031f57600080fd5b80631f425338116101ce5780631f425338146102675780632d6d7d731461027a57806334d5f37b1461028d57806335da8121146102ad57600080fd5b806301a5f43f1461020057806306aba0e1146102295780630a44fa431461023f5780630f7c318914610252575b600080fd5b61021361020e366004613b79565b61056d565b6040516102209190613c50565b60405180910390f35b610231610620565b604051908152602001610220565b61023161024d366004613c63565b61063d565b61025a6106c2565b6040516102209190613cde565b610213610275366004613c63565b6106db565b61025a610288366004613c63565b610728565b61023161029b366004613cf1565b60006020819052908152604090205481565b6102136102bb366004613c63565b61076c565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6102f5366004613d4e565b6107b2565b005b61030f61030a366004613cf1565b6107f1565b6040519015158152602001610220565b6102fa61032d366004613dea565b61083e565b610231610876565b6102fa610348366004613fe8565b6108f2565b6102fa61035b36600461405a565b610937565b6103c361036e36600461408d565b6001600160a01b039081166000908152600080516020614b0c83398151915260209081526040808320549093168252600080516020614aec83398151915290522054600160a01b90046001600160601b031690565b6040516001600160601b039091168152602001610220565b61025a610952565b6102fa6103f136600461408d565b61095c565b6104406104043660046140a8565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102209594939291906140f0565b61030f61045f36600461408d565b610af3565b6104776104723660046140a8565b610b0d565b60408051928352602083019190915201610220565b61025a61049a36600461411e565b610b2e565b610231610c1f565b6104af610c2a565b6040516102209392919061418c565b6104d16104cc366004613c63565b610c54565b60405161022091906141cf565b610231610c92565b6103c36104f436600461408d565b610cab565b61030f610507366004613cf1565b610cb6565b61051f61051a3660046141e2565b610cf3565b6040516001600160a01b039091168152602001610220565b610477610d6e565b61021361054d366004613c63565b610d9f565b61025a610de5565b61025a610568366004613c63565b610def565b6060610577610ed6565b61061587878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250610f0692505050565b979650505050505050565b6000610638600080516020614b4c8339815191525490565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061067e92508391506112829050565b6106ba8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112ba92505050565b949350505050565b6060610638600080516020614a8c83398151915261133e565b60606106e5610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061134b92505050565b9392505050565b606061072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611416915050565b92915050565b6060610776610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b6107bb33611662565b6107ea85858585857f0000000000000000000000000000000000000000000000000000000000000000336116a4565b5050505050565b60008060008381527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff166004811115610836576108366140ca565b141592915050565b61084733611662565b6107ea85858585857f000000000000000000000000000000000000000000000000000000000000000033611749565b600061088e600080516020614aac8339815191525490565b60016108a6600080516020614aac8339815191525490565b6108d46108bf600080516020614b4c8339815191525490565b600080516020614acc833981519152906117a5565b6108de9190614213565b6108e89190614226565b6106389190614239565b333014610929576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b60405180910390fd5b61093382826117d0565b5050565b61093f610ed6565b6109488161187e565b61093382826118b4565b6060610638611958565b61096533611662565b61096e81611971565b336000908152600080516020614aec83398151915260208190526040909120546001600160a01b0390811690831681036109c657604051630669b93360e31b81526001600160a01b0384166004820152602401610920565b600080516020614b2c83398151915260006109e182846119a6565b80156109f257506109f282866119bb565b905080610a1d5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610920565b6001600160a01b038381166000818152600080516020614b0c8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610ab0906364b18d0960e11b906060015b6040516020818303038152906040526119d0565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b6000610766600080516020614b2c83398151915283611cd8565b600080610b18610ed6565b610b228484611cfa565b915091505b9250929050565b8051606090806001600160401b03811115610b4b57610b4b613e2d565b604051908082528060200260200182016040528015610b74578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110610ba657610ba6614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b0316848281518110610bf757610bf7614270565b6001600160a01b0390921660209283029190910190910152600101610b89565b505050919050565b600061063860025490565b6060806060610c37611def565b9250610c4283610b2e565b9150610c4d83611e1a565b9050909192565b6060610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e1a92505050565b6000610638600080516020614b2c833981519152611f03565b600061076682611f0d565b6000610cd16108bf600080516020614b4c8339815191525490565b600080516020614aac83398151915254610ceb9084614286565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610d2a57610d2a6140ca565b60ff1681526020810191909152604001600020546001600160a01b0316905080610d69578160405163409140df60e11b8152600401610920919061429d565b919050565b600080610d87600080516020614acc8339815191525490565b600080516020614aac83398151915254915091509091565b6060610da9610ed6565b610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611f4592505050565b6060610638611def565b606081806001600160401b03811115610e0a57610e0a613e2d565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b509150600080516020614b0c83398151915260005b82811015610ecd57816000878784818110610e6557610e65614270565b9050602002016020810190610e7a919061408d565b6001600160a01b0390811682526020820192909252604001600020548551911690859083908110610ead57610ead614270565b6001600160a01b0390921660209283029190910190910152600101610e48565b50505092915050565b333014610f04576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b565b6060610f12838361222a565b610f1b81611282565b8251855181148015610f2d5750845181145b610f58576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b806001600160401b03811115610f7057610f70613e2d565b604051908082528060200260200182016040528015610f99578160200160208202803683370190505b50925080600003610faa575061127a565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b0c83398151915291600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156111fb578d818151811061103357611033614270565b602002602001015194508c818151811061104f5761104f614270565b6020026020010151935061106285611971565b61106b84611971565b8e818151811061107d5761107d614270565b60200260200101516001600160601b03166000036110bc576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b6110c68986611cd8565b806110d657506110d68985611cd8565b806110e657506110e68786611cd8565b806110f657506110f68785611cd8565b158c828151811061110957611109614270565b6020026020010190151590811515815250508b818151811061112d5761112d614270565b6020026020010151156111f35761114489866119bb565b5061114f87856119bb565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f908290811061119557611195614270565b6020908102919091018101516001600160601b03169083018190526111ba9084614213565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611019565b50611214600080516020614b4c83398151915283612334565b50611233635ebae8a060e01b8d8d604051602001610a9c9291906142b7565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161126894939291906142e5565b60405180910390a15050505050505050505b509392505050565b61128b8161234b565b156112b7576000356001600160e01b031916604051630d697db160e11b8152600401610920919061425b565b50565b6000816112c681611282565b600080516020614aec83398151915260005b8451811015610c17578160008683815181106112f6576112f6614270565b6020908102919091018101516001600160a01b031682528101919091526040016000205461133490600160a01b90046001600160601b031685614213565b93506001016112d8565b60606000610721836123ea565b60608161135781611282565b8251806001600160401b0381111561137157611371613e2d565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b509250600080516020614a8c83398151915260005b8281101561140d576113e38682815181106113cc576113cc614270565b6020026020010151836119a690919063ffffffff16565b8582815181106113f5576113f5614270565b911515602092830291909101909101526001016113af565b50505050919050565b606082516001600160401b0381111561143157611431613e2d565b60405190808252806020026020018201604052801561145a578160200160208202803683370190505b50905060005b8351811015611569576003600085838151811061147f5761147f614270565b60200260200101516004811115611498576114986140ca565b60048111156114a9576114a96140ca565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114dd576114dd614270565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611535575060006001600160a01b031682828151811061152257611522614270565b60200260200101516001600160a01b0316145b15611561576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b600101611460565b5092915050565b60608161157c81611282565b8251806001600160401b0381111561159657611596613e2d565b6040519080825280602002602001820160405280156115bf578160200160208202803683370190505b509250806000036115d0575061165c565b600080516020614a8c83398151915260006314d72edb60e21b815b848110156116565787818151811061160557611605614270565b602002602001015192506116188361187e565b6116228383612446565b61162c84846119bb565b87828151811061163e5761163e614270565b911515602092830291909101909101526001016115eb565b50505050505b50919050565b61166b81611f0d565b6001600160601b03166000036112b7576000356001600160e01b0319166003604051620f948f60ea1b8152600401610920929190614332565b6116b66116b0886144a3565b826125d9565b5060006116ca6116c5896144a3565b6126df565b905061173f6116d8896144a3565b8888888861172b896116eb89600061281e565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b61173a8a6116eb8a600161281e565b612857565b5050505050505050565b600061175d61175789614577565b83612c4e565b9050600061177261176d8a614577565b612d98565b905061179a828989898961178b8a6116eb89600061281e565b61173a8b6116eb8a600161281e565b505050505050505050565b600082548015611569578281029150808204831461156957634e487b7160005260116020526024601cfd5b60005b825181101561187957306001600160a01b03168282815181106117f8576117f8614270565b60200260200101516001600160a01b031603611835576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b61187183828151811061184a5761184a614270565b602002602001015183838151811061186457611864614270565b6020026020010151612ecf565b6001016117d3565b505050565b806001600160a01b03163b6000036112b757604051630bfc64a360e21b81526001600160a01b0382166004820152602401610920565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156118ea576118ea6140ca565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561192b5761192b6140ca565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6060610638600080516020614b2c83398151915261133e565b6001600160a01b0381166112b7576000356001600160e01b03191660405163104c66df60e31b8152600401610920919061425b565b6000610721836001600160a01b038416612f62565b6000610721836001600160a01b038416613055565b60006119e9600080516020614a8c83398151915261133e565b805190915060008190036119fd5750505050565b6000816001600160401b03811115611a1757611a17613e2d565b604051908082528060200260200182016040528015611a40578160200160208202803683370190505b5090506000826001600160401b03811115611a5d57611a5d613e2d565b604051908082528060200260200182016040528015611a9057816020015b6060815260200190600190039081611a7b5790505b50905060008686604051602001611aa8929190614665565b6040516020818303038152906040529050600081604051602401611acc91906146c2565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015611c9057868181518110611b1557611b15614270565b60200260200101516001600160a01b031683604051611b3491906146d5565b6000604051808303816000865af19150503d8060008114611b71576040519150601f19603f3d011682016040523d82523d6000602084013e611b76565b606091505b50868381518110611b8957611b89614270565b60200260200101868481518110611ba257611ba2614270565b6020026020010182905282151515158152505050848181518110611bc857611bc8614270565b6020026020010151611c8857868181518110611be657611be6614270565b60200260200101516001600160a01b031682604051611c0591906146d5565b6000604051808303816000865af19150503d8060008114611c42576040519150601f19603f3d011682016040523d82523d6000602084013e611c47565b606091505b50868381518110611c5a57611c5a614270565b60200260200101868481518110611c7357611c73614270565b60200260200101829052821515151581525050505b600101611afb565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051611cc6949392919061473e565b60405180910390a15050505050505050565b6001600160a01b03811660009081526001830160205260408120541515610721565b60008082841115611d2c576000356001600160e01b0319166040516387f6f09560e01b8152600401610920919061425b565b600080516020614acc833981519152549150611d54600080516020614aac8339815191525490565b9050611d6d600080516020614acc833981519152859055565b611d84600080516020614aac833981519152849055565b8284611daf7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6130a8565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606106387f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61133e565b8051606090806001600160401b03811115611e3757611e37613e2d565b604051908082528060200260200182016040528015611e60578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110611e9257611e92614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b0316848281518110611ee357611ee3614270565b6001600160601b0390921660209283029190910190910152600101611e75565b6000610766825490565b6001600160a01b03166000908152600080516020614aec8339815191526020526040902054600160a01b90046001600160601b031690565b606081611f5181611282565b8251806001600160401b03811115611f6b57611f6b613e2d565b604051908082528060200260200182016040528015611f94578160200160208202803683370190505b50925080600003611fa5575061165c565b60408051808201909152600080825260208201819052600080516020614b0c833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156121aa578c818151811061202e5761202e614270565b6020908102919091018101516001600160a01b038082166000908152928c90526040909220549091169550935061206485611971565b61206d84611971565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b031691830191909152909350908516146120e1576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b6120eb8785611cd8565b80156120fc57506120fc8886611cd8565b8c828151811061210e5761210e614270565b6020026020010190151590811515815250508b818151811061213257612132614270565b6020026020010151156121a25761214988866119a6565b5061215487856119a6565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b031916905592881682528881529181205582015161219f906001600160601b031684614213565b92505b600101612014565b506121c3600080516020614b4c833981519152836130c3565b506121e263c48549de60e01b8d8d604051602001610a9c9291906142b7565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d60405161221392919061478b565b60405180910390a150505050505050505050919050565b81518151606091908082016001600160401b0381111561224c5761224c613e2d565b604051908082528060200260200182016040528015612275578160200160208202803683370190505b50925060005b828110156122cf5785818151811061229557612295614270565b60200260200101518482815181106122af576122af614270565b6001600160a01b039092166020928302919091019091015260010161227b565b60005b8281101561232a578581815181106122ec576122ec614270565b602002602001015185838151811061230657612306614270565b6001600160a01b0390921660209283029190910190910152600191820191016122d2565b5050505092915050565b60006107668361234485856130d3565b9250829055565b6000815160000361235e57506000919050565b60005b60018351038110156123e157600181015b83518110156123d85783818151811061238d5761238d614270565b60200260200101516001600160a01b03168483815181106123b0576123b0614270565b60200260200101516001600160a01b0316036123d0575060019392505050565b600101612372565b50600101612361565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561243a57602002820191906000526020600020905b815481526020019060010190808311612426575b50505050509050919050565b600081604051602401612459919061425b565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906124a29085906146d5565b600060405180830381855afa9150503d80600081146124dd576040519150601f19603f3d011682016040523d82523d6000602084013e6124e2565b606091505b5091509150816125a457846001600160a01b03168360405160240161250791906146c2565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161253c91906146d5565b600060405180830381855afa9150503d8060008114612577576040519150601f19603f3d011682016040523d82523d6000602084013e61257c565b606091505b509092509050816125a457838560405163069d427960e11b81526004016109209291906147b0565b808060200190518101906125b891906147d3565b6107ea57838560405163069d427960e11b81526004016109209291906147b0565b602082015160009080820361261b5760405163092048d160e11b8152600080356001600160e01b03191660048301526024820152466044820152606401610920565b6002546126299085906130f2565b6000612634856126df565b905061263f82613193565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461269b576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516126cf9291906148e2565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561270d5761270d613e2d565b604051908082528060200260200182016040528015612736578160200160208202803683370190505b5060c086015190915060005b8251811015612795578660a00151818151811061276157612761614270565b60200260200101518051906020012083828151811061278257612782614270565b6020908102919091010152600101612742565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061286557508483145b612890576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b60008080856001600160401b038111156128ac576128ac613e2d565b6040519080825280602002602001820160405280156128d5578160200160208202803683370190505b5090506000866001600160401b038111156128f2576128f2613e2d565b60405190808252806020026020018201604052801561291b578160200160208202803683370190505b50905060008060003660005b8b811015612aac578c8c8281811061294157612941614270565b90506060020191508e8e8281811061295b5761295b614270565b9050602002016020810190612970919061490c565b92506000836001811115612986576129866140ca565b036129f0576129ab8b61299c602085018561492d565b8460200135856040013561322f565b945084878a6129b981614950565b9b50815181106129cb576129cb614270565b60200260200101906001600160a01b031690816001600160a01b031681525050612a61565b6001836001811115612a0457612a046140ca565b03612a3a57612a1a8a61299c602085018561492d565b9450848689612a2881614950565b9a50815181106129cb576129cb614270565b6000356001600160e01b031916604051630612418f60e11b8152600401610920919061425b565b846001600160a01b0316846001600160a01b031610612aa1576000356001600160e01b031916604051635d3dcd3160e01b8152600401610920919061425b565b849350600101612927565b50505085845250508281526020808c015160009081526001825260408082208e51835290925290812090612ade613257565b90506000612aeb85613261565b9050818110612b725780600003612b23576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b66838f61326c565b50505050505050612c45565b600082612b7d6132d9565b612b879190614226565b612b92906001614213565b90506000612b9f86613261565b9050818110612c1e5780600003612bd7576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050612c45565b6000356001600160e01b031916604051634ccfe64360e11b8152600401610920919061425b565b50505050505050565b612c8e6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b612ca7612ca084604001516001611416565b84906132e3565b9050612cbe600254826130f290919063ffffffff16565b6000612cc9826126df565b90506000612cd76000613193565b60008181527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602090815260409091209087015160018201859055600690910155905082518114612d49576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85612d7689612d98565b8989604051612d889493929190614969565b60405180910390a3505092915050565b60608101516040820151608083015151600092919083906001600160401b03811115612dc657612dc6613e2d565b604051908082528060200260200182016040528015612def578160200160208202803683370190505b5060a086015190915060005b8251811015612e4e5786608001518181518110612e1a57612e1a614270565b602002602001015180519060200120838281518110612e3b57612e3b614270565b6020908102919091010152600101612dfb565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b8060036000846004811115612ee657612ee66140ca565b6004811115612ef757612ef76140ca565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826004811115612f3557612f356140ca565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6000818152600183016020526040812054801561304b576000612f86600183614226565b8554909150600090612f9a90600190614226565b9050818114612fff576000866000018281548110612fba57612fba614270565b9060005260206000200154905080876000018481548110612fdd57612fdd614270565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061301057613010614a50565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610766565b6000915050610766565b600081815260018301602052604081205461309c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610766565b506000610766565b9055565b60006130b2825490565b9050610d69826130a4836001614213565b600061076683612344858561340d565b815481018181101561076657634e487b7160005260116020526024601cfd5b60008260600151511180156131105750816080015151826060015151145b801561312557508160a0015151826060015151145b801561313a57508160c0015151826060015151145b613165576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b61316f8142614213565b826040015111156109335760405163ad89be9d60e01b815260040160405180910390fd5b600081815260208190526040812054908190036131c25750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906000825460ff1660048111156131f4576131f46140ca565b036132125760405163757a436360e01b815260040160405180910390fd5b505050600090815260208190526040902080546001019081905590565b6000806000613240878787876135e8565b9150915061324d816136d5565b5095945050505050565b6000610638610876565b6000610766826112ba565b6132758161388b565b1561093357815460ff19166002178255600080613291836138a5565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba83836040516132cb929190614a66565b60405180910390a250505050565b6000610638610620565b6133236040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561335a5761335a613e2d565b604051908082528060200260200182016040528015613383578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b836040015151811015611569578281815181106133cf576133cf614270565b6020026020010151826060015182815181106133ed576133ed614270565b6001600160a01b03909216602092830291909101909101526001016133b0565b600082548281101561342c57634e487b7160005260116020526024601cfd5b9190910392915050565b60048301548110156134e95782600801600084600401838154811061345d5761345d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106134a6576134a6614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613436565b5060005b60058301548110156135a05782600801600084600501838154811061351457613514614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600584018054600786019291908490811061355d5761355d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016134ed565b50815460ff1916825560006001830181905560028301819055600383018190556135ce906004840190613b03565b6135dc600583016000613b03565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136cc565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136cc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561369c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136c5576000600192509250506136cc565b9150600090505b94509492505050565b60008160048111156136e9576136e96140ca565b036136f15750565b6001816004811115613705576137056140ca565b036137525760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610920565b6002816004811115613766576137666140ca565b036137b35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610920565b60038160048111156137c7576137c76140ca565b0361381f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610920565b6004816004811115613833576138336140ca565b036112b75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610920565b600081602001516000148061076657505060200151461490565b6060806138b18361388b565b6138ef57602083015160405163092048d160e11b81526000356001600160e01b03191660048201526024810191909152466044820152606401610920565b8260600151516001600160401b0381111561390c5761390c613e2d565b604051908082528060200260200182016040528015613935578160200160208202803683370190505b5091508260600151516001600160401b0381111561395557613955613e2d565b60405190808252806020026020018201604052801561398857816020015b60608152602001906001900390816139735790505b50905060005b836060015151811015613afd578360c0015181815181106139b1576139b1614270565b60200260200101515a116139e4576139c8846126df565b6040516307aec4ab60e21b815260040161092091815260200190565b836060015181815181106139fa576139fa614270565b60200260200101516001600160a01b031684608001518281518110613a2157613a21614270565b60200260200101518560c001518381518110613a3f57613a3f614270565b6020026020010151908660a001518481518110613a5e57613a5e614270565b6020026020010151604051613a7391906146d5565b600060405180830381858888f193505050503d8060008114613ab1576040519150601f19603f3d011682016040523d82523d6000602084013e613ab6565b606091505b50848381518110613ac957613ac9614270565b60200260200101848481518110613ae257613ae2614270565b6020908102919091010191909152901515905260010161398e565b50915091565b50805460008255906000526020600020908101906112b791905b80821115613b315760008155600101613b1d565b5090565b60008083601f840112613b4757600080fd5b5081356001600160401b03811115613b5e57600080fd5b6020830191508360208260051b8501011115610b2757600080fd5b60008060008060008060608789031215613b9257600080fd5b86356001600160401b0380821115613ba957600080fd5b613bb58a838b01613b35565b90985096506020890135915080821115613bce57600080fd5b613bda8a838b01613b35565b90965094506040890135915080821115613bf357600080fd5b50613c0089828a01613b35565b979a9699509497509295939492505050565b60008151808452602080850194506020840160005b83811015613c45578151151587529582019590820190600101613c27565b509495945050505050565b6020815260006107216020830184613c12565b60008060208385031215613c7657600080fd5b82356001600160401b03811115613c8c57600080fd5b613c9885828601613b35565b90969095509350505050565b60008151808452602080850194506020840160005b83811015613c455781516001600160a01b031687529582019590820190600101613cb9565b6020815260006107216020830184613ca4565b600060208284031215613d0357600080fd5b5035919050565b60008083601f840112613d1c57600080fd5b5081356001600160401b03811115613d3357600080fd5b602083019150836020606083028501011115610b2757600080fd5b600080600080600060608688031215613d6657600080fd5b85356001600160401b0380821115613d7d57600080fd5b9087019060e0828a031215613d9157600080fd5b90955060208701359080821115613da757600080fd5b613db389838a01613b35565b90965094506040880135915080821115613dcc57600080fd5b50613dd988828901613d0a565b969995985093965092949392505050565b600080600080600060608688031215613e0257600080fd5b85356001600160401b0380821115613e1957600080fd5b9087019060c0828a031215613d9157600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613e6557613e65613e2d565b60405290565b60405160c081016001600160401b0381118282101715613e6557613e65613e2d565b604051601f8201601f191681016001600160401b0381118282101715613eb557613eb5613e2d565b604052919050565b60006001600160401b03821115613ed657613ed6613e2d565b5060051b60200190565b600082601f830112613ef157600080fd5b81356020613f06613f0183613ebd565b613e8d565b80838252602082019150600560208560051b880101945087851115613f2a57600080fd5b602087015b85811015613f53578035828110613f465760008081fd5b8452928401928401613f2f565b5090979650505050505050565b80356001600160a01b0381168114610d6957600080fd5b600082601f830112613f8857600080fd5b81356020613f98613f0183613ebd565b8083825260208201915060208460051b870101935086841115613fba57600080fd5b602086015b84811015613fdd57613fd081613f60565b8352918301918301613fbf565b509695505050505050565b60008060408385031215613ffb57600080fd5b82356001600160401b038082111561401257600080fd5b61401e86838701613ee0565b9350602085013591508082111561403457600080fd5b5061404185828601613f77565b9150509250929050565b803560108110610d6957600080fd5b6000806040838503121561406d57600080fd5b6140768361404b565b915061408460208401613f60565b90509250929050565b60006020828403121561409f57600080fd5b61072182613f60565b600080604083850312156140bb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600581106112b7576112b76140ca565b60a081016140fd876140e0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561413057600080fd5b81356001600160401b0381111561414657600080fd5b6106ba84828501613f77565b60008151808452602080850194506020840160005b83811015613c455781516001600160601b031687529582019590820190600101614167565b60608152600061419f6060830186613ca4565b82810360208401526141b18186613ca4565b905082810360408401526141c58185614152565b9695505050505050565b6020815260006107216020830184614152565b6000602082840312156141f457600080fd5b6107218261404b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610766576107666141fd565b81810381811115610766576107666141fd565b60008261425657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610766576107666141fd565b60208101601083106142b1576142b16140ca565b91905290565b6040815260006142ca6040830185613ca4565b82810360208401526142dc8185613c12565b95945050505050565b6080815260006142f86080830187613c12565b828103602084015261430a8187614152565b9050828103604084015261431e8186613ca4565b905082810360608401526106158185613ca4565b6001600160e01b03198316815260408101600b8310614353576143536140ca565b8260208301529392505050565b600082601f83011261437157600080fd5b81356020614381613f0183613ebd565b8083825260208201915060208460051b8701019350868411156143a357600080fd5b602086015b84811015613fdd57803583529183019183016143a8565b6000601f83601f8401126143d257600080fd5b823560206143e2613f0183613ebd565b82815260059290921b8501810191818101908784111561440157600080fd5b8287015b848110156144975780356001600160401b03808211156144255760008081fd5b818a0191508a603f83011261443a5760008081fd5b8582013560408282111561445057614450613e2d565b614461828b01601f19168901613e8d565b92508183528c818386010111156144785760008081fd5b8181850189850137506000908201870152845250918301918301614405565b50979650505050505050565b600060e082360312156144b557600080fd5b6144bd613e43565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156144ef57600080fd5b6144fb36838701613f77565b6060840152608085013591508082111561451457600080fd5b61452036838701614360565b608084015260a085013591508082111561453957600080fd5b614545368387016143bf565b60a084015260c085013591508082111561455e57600080fd5b5061456b36828601614360565b60c08301525092915050565b600060c0823603121561458957600080fd5b614591613e6b565b823581526020830135602082015260408301356001600160401b03808211156145b957600080fd5b6145c536838701613ee0565b604084015260608501359150808211156145de57600080fd5b6145ea36838701614360565b6060840152608085013591508082111561460357600080fd5b61460f368387016143bf565b608084015260a085013591508082111561462857600080fd5b5061463536828601614360565b60a08301525092915050565b60005b8381101561465c578181015183820152602001614644565b50506000910152565b6001600160e01b0319831681528151600090614688816004850160208701614641565b919091016004019392505050565b600081518084526146ae816020860160208601614641565b601f01601f19169290920160200192915050565b6020815260006107216020830184614696565b600082516146e7818460208701614641565b9190910192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015613f5357601f1986840301895261472c838351614696565b98840198925090830190600101614710565b6080815260006147516080830187614696565b82810360208401526147638187613ca4565b905082810360408401526147778186613c12565b9050828103606084015261061581856146f1565b60408152600061479e6040830185613c12565b82810360208401526142dc8185613ca4565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082840312156147e557600080fd5b8151801515811461072157600080fd5b60008151808452602080850194506020840160005b83811015613c455781518752958201959082019060010161480a565b600060e0830182518452602080840151602086015260408401516040860152606084015160e0606087015282815180855261010088019150602083019450600092505b808310156148925784516001600160a01b03168252938301936001929092019190830190614869565b506080860151935086810360808801526148ac81856147f5565b935050505060a083015184820360a08601526148c882826146f1565b91505060c083015184820360c08601526142dc82826147f5565b6040815260006148f56040830185614826565b905060018060a01b03831660208301529392505050565b60006020828403121561491e57600080fd5b81356002811061072157600080fd5b60006020828403121561493f57600080fd5b813560ff8116811461072157600080fd5b600060018201614962576149626141fd565b5060010190565b60808152600061497c6080830187614826565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156149e65783516149d0816140e0565b82529284019260019290920191908401906149bd565b50606089015193508481036060860152614a0081856147f5565b935050505060808601518282036080840152614a1c82826146f1565b91505060a086015182820360a0840152614a3682826147f5565b93505050506142dc60608301846001600160a01b03169052565b634e487b7160e01b600052603160045260246000fd5b604081526000614a796040830185613c12565b82810360208401526142dc81856146f156fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca2646970667358221220cb0e92b2033c9131bafd8c90a491e8241ace110667169406b1c1a69bc857723964736f6c634300081700335da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240c55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d", + "chainId": 11155111, + "contractAbsolutePath": "MainchainBridgeManager.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b1461050c578063e75235b814610537578063e9c034981461053f578063f80b535214610552578063fdc4fa471461055a57600080fd5b8063cc7e6b3b146104be578063d0a50db0146104de578063d78392f8146104e6578063dafae408146104f957600080fd5b8063b9c36209116100e9578063b9c3620914610464578063bc9182fd1461048c578063bc96180b1461049f578063c441c4a8146104a757600080fd5b80639b19dbfd146103db5780639b2ee437146103e3578063b384abef146103f6578063b405aaf21461045157600080fd5b80633644e515116101925780637de5dedd116101615780637de5dedd14610332578063800eaab31461033a578063865e6fd31461034d578063901979d51461036057600080fd5b80633644e515146102c05780635e05cf9e146102e7578063776fb1ec146102fc5780637d465f791461031f57600080fd5b80631f425338116101ce5780631f425338146102675780632d6d7d731461027a57806334d5f37b1461028d57806335da8121146102ad57600080fd5b806301a5f43f1461020057806306aba0e1146102295780630a44fa431461023f5780630f7c318914610252575b600080fd5b61021361020e366004613b79565b61056d565b6040516102209190613c50565b60405180910390f35b610231610620565b604051908152602001610220565b61023161024d366004613c63565b61063d565b61025a6106c2565b6040516102209190613cde565b610213610275366004613c63565b6106db565b61025a610288366004613c63565b610728565b61023161029b366004613cf1565b60006020819052908152604090205481565b6102136102bb366004613c63565b61076c565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6102f5366004613d4e565b6107b2565b005b61030f61030a366004613cf1565b6107f1565b6040519015158152602001610220565b6102fa61032d366004613dea565b61083e565b610231610876565b6102fa610348366004613fe8565b6108f2565b6102fa61035b36600461405a565b610937565b6103c361036e36600461408d565b6001600160a01b039081166000908152600080516020614b0c83398151915260209081526040808320549093168252600080516020614aec83398151915290522054600160a01b90046001600160601b031690565b6040516001600160601b039091168152602001610220565b61025a610952565b6102fa6103f136600461408d565b61095c565b6104406104043660046140a8565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102209594939291906140f0565b61030f61045f36600461408d565b610af3565b6104776104723660046140a8565b610b0d565b60408051928352602083019190915201610220565b61025a61049a36600461411e565b610b2e565b610231610c1f565b6104af610c2a565b6040516102209392919061418c565b6104d16104cc366004613c63565b610c54565b60405161022091906141cf565b610231610c92565b6103c36104f436600461408d565b610cab565b61030f610507366004613cf1565b610cb6565b61051f61051a3660046141e2565b610cf3565b6040516001600160a01b039091168152602001610220565b610477610d6e565b61021361054d366004613c63565b610d9f565b61025a610de5565b61025a610568366004613c63565b610def565b6060610577610ed6565b61061587878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250610f0692505050565b979650505050505050565b6000610638600080516020614b4c8339815191525490565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061067e92508391506112829050565b6106ba8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112ba92505050565b949350505050565b6060610638600080516020614a8c83398151915261133e565b60606106e5610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061134b92505050565b9392505050565b606061072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611416915050565b92915050565b6060610776610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b6107bb33611662565b6107ea85858585857f0000000000000000000000000000000000000000000000000000000000000000336116a4565b5050505050565b60008060008381527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff166004811115610836576108366140ca565b141592915050565b61084733611662565b6107ea85858585857f000000000000000000000000000000000000000000000000000000000000000033611749565b600061088e600080516020614aac8339815191525490565b60016108a6600080516020614aac8339815191525490565b6108d46108bf600080516020614b4c8339815191525490565b600080516020614acc833981519152906117a5565b6108de9190614213565b6108e89190614226565b6106389190614239565b333014610929576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b60405180910390fd5b61093382826117d0565b5050565b61093f610ed6565b6109488161187e565b61093382826118b4565b6060610638611958565b61096533611662565b61096e81611971565b336000908152600080516020614aec83398151915260208190526040909120546001600160a01b0390811690831681036109c657604051630669b93360e31b81526001600160a01b0384166004820152602401610920565b600080516020614b2c83398151915260006109e182846119a6565b80156109f257506109f282866119bb565b905080610a1d5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610920565b6001600160a01b038381166000818152600080516020614b0c8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610ab0906364b18d0960e11b906060015b6040516020818303038152906040526119d0565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b6000610766600080516020614b2c83398151915283611cd8565b600080610b18610ed6565b610b228484611cfa565b915091505b9250929050565b8051606090806001600160401b03811115610b4b57610b4b613e2d565b604051908082528060200260200182016040528015610b74578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110610ba657610ba6614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b0316848281518110610bf757610bf7614270565b6001600160a01b0390921660209283029190910190910152600101610b89565b505050919050565b600061063860025490565b6060806060610c37611def565b9250610c4283610b2e565b9150610c4d83611e1a565b9050909192565b6060610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e1a92505050565b6000610638600080516020614b2c833981519152611f03565b600061076682611f0d565b6000610cd16108bf600080516020614b4c8339815191525490565b600080516020614aac83398151915254610ceb9084614286565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610d2a57610d2a6140ca565b60ff1681526020810191909152604001600020546001600160a01b0316905080610d69578160405163409140df60e11b8152600401610920919061429d565b919050565b600080610d87600080516020614acc8339815191525490565b600080516020614aac83398151915254915091509091565b6060610da9610ed6565b610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611f4592505050565b6060610638611def565b606081806001600160401b03811115610e0a57610e0a613e2d565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b509150600080516020614b0c83398151915260005b82811015610ecd57816000878784818110610e6557610e65614270565b9050602002016020810190610e7a919061408d565b6001600160a01b0390811682526020820192909252604001600020548551911690859083908110610ead57610ead614270565b6001600160a01b0390921660209283029190910190910152600101610e48565b50505092915050565b333014610f04576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b565b6060610f12838361222a565b610f1b81611282565b8251855181148015610f2d5750845181145b610f58576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b806001600160401b03811115610f7057610f70613e2d565b604051908082528060200260200182016040528015610f99578160200160208202803683370190505b50925080600003610faa575061127a565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b0c83398151915291600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156111fb578d818151811061103357611033614270565b602002602001015194508c818151811061104f5761104f614270565b6020026020010151935061106285611971565b61106b84611971565b8e818151811061107d5761107d614270565b60200260200101516001600160601b03166000036110bc576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b6110c68986611cd8565b806110d657506110d68985611cd8565b806110e657506110e68786611cd8565b806110f657506110f68785611cd8565b158c828151811061110957611109614270565b6020026020010190151590811515815250508b818151811061112d5761112d614270565b6020026020010151156111f35761114489866119bb565b5061114f87856119bb565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f908290811061119557611195614270565b6020908102919091018101516001600160601b03169083018190526111ba9084614213565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611019565b50611214600080516020614b4c83398151915283612334565b50611233635ebae8a060e01b8d8d604051602001610a9c9291906142b7565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161126894939291906142e5565b60405180910390a15050505050505050505b509392505050565b61128b8161234b565b156112b7576000356001600160e01b031916604051630d697db160e11b8152600401610920919061425b565b50565b6000816112c681611282565b600080516020614aec83398151915260005b8451811015610c17578160008683815181106112f6576112f6614270565b6020908102919091018101516001600160a01b031682528101919091526040016000205461133490600160a01b90046001600160601b031685614213565b93506001016112d8565b60606000610721836123ea565b60608161135781611282565b8251806001600160401b0381111561137157611371613e2d565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b509250600080516020614a8c83398151915260005b8281101561140d576113e38682815181106113cc576113cc614270565b6020026020010151836119a690919063ffffffff16565b8582815181106113f5576113f5614270565b911515602092830291909101909101526001016113af565b50505050919050565b606082516001600160401b0381111561143157611431613e2d565b60405190808252806020026020018201604052801561145a578160200160208202803683370190505b50905060005b8351811015611569576003600085838151811061147f5761147f614270565b60200260200101516004811115611498576114986140ca565b60048111156114a9576114a96140ca565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114dd576114dd614270565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611535575060006001600160a01b031682828151811061152257611522614270565b60200260200101516001600160a01b0316145b15611561576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b600101611460565b5092915050565b60608161157c81611282565b8251806001600160401b0381111561159657611596613e2d565b6040519080825280602002602001820160405280156115bf578160200160208202803683370190505b509250806000036115d0575061165c565b600080516020614a8c83398151915260006314d72edb60e21b815b848110156116565787818151811061160557611605614270565b602002602001015192506116188361187e565b6116228383612446565b61162c84846119bb565b87828151811061163e5761163e614270565b911515602092830291909101909101526001016115eb565b50505050505b50919050565b61166b81611f0d565b6001600160601b03166000036112b7576000356001600160e01b0319166003604051620f948f60ea1b8152600401610920929190614332565b6116b66116b0886144a3565b826125d9565b5060006116ca6116c5896144a3565b6126df565b905061173f6116d8896144a3565b8888888861172b896116eb89600061281e565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b61173a8a6116eb8a600161281e565b612857565b5050505050505050565b600061175d61175789614577565b83612c4e565b9050600061177261176d8a614577565b612d98565b905061179a828989898961178b8a6116eb89600061281e565b61173a8b6116eb8a600161281e565b505050505050505050565b600082548015611569578281029150808204831461156957634e487b7160005260116020526024601cfd5b60005b825181101561187957306001600160a01b03168282815181106117f8576117f8614270565b60200260200101516001600160a01b031603611835576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b61187183828151811061184a5761184a614270565b602002602001015183838151811061186457611864614270565b6020026020010151612ecf565b6001016117d3565b505050565b806001600160a01b03163b6000036112b757604051630bfc64a360e21b81526001600160a01b0382166004820152602401610920565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156118ea576118ea6140ca565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561192b5761192b6140ca565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6060610638600080516020614b2c83398151915261133e565b6001600160a01b0381166112b7576000356001600160e01b03191660405163104c66df60e31b8152600401610920919061425b565b6000610721836001600160a01b038416612f62565b6000610721836001600160a01b038416613055565b60006119e9600080516020614a8c83398151915261133e565b805190915060008190036119fd5750505050565b6000816001600160401b03811115611a1757611a17613e2d565b604051908082528060200260200182016040528015611a40578160200160208202803683370190505b5090506000826001600160401b03811115611a5d57611a5d613e2d565b604051908082528060200260200182016040528015611a9057816020015b6060815260200190600190039081611a7b5790505b50905060008686604051602001611aa8929190614665565b6040516020818303038152906040529050600081604051602401611acc91906146c2565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015611c9057868181518110611b1557611b15614270565b60200260200101516001600160a01b031683604051611b3491906146d5565b6000604051808303816000865af19150503d8060008114611b71576040519150601f19603f3d011682016040523d82523d6000602084013e611b76565b606091505b50868381518110611b8957611b89614270565b60200260200101868481518110611ba257611ba2614270565b6020026020010182905282151515158152505050848181518110611bc857611bc8614270565b6020026020010151611c8857868181518110611be657611be6614270565b60200260200101516001600160a01b031682604051611c0591906146d5565b6000604051808303816000865af19150503d8060008114611c42576040519150601f19603f3d011682016040523d82523d6000602084013e611c47565b606091505b50868381518110611c5a57611c5a614270565b60200260200101868481518110611c7357611c73614270565b60200260200101829052821515151581525050505b600101611afb565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051611cc6949392919061473e565b60405180910390a15050505050505050565b6001600160a01b03811660009081526001830160205260408120541515610721565b60008082841115611d2c576000356001600160e01b0319166040516387f6f09560e01b8152600401610920919061425b565b600080516020614acc833981519152549150611d54600080516020614aac8339815191525490565b9050611d6d600080516020614acc833981519152859055565b611d84600080516020614aac833981519152849055565b8284611daf7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6130a8565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606106387f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61133e565b8051606090806001600160401b03811115611e3757611e37613e2d565b604051908082528060200260200182016040528015611e60578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110611e9257611e92614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b0316848281518110611ee357611ee3614270565b6001600160601b0390921660209283029190910190910152600101611e75565b6000610766825490565b6001600160a01b03166000908152600080516020614aec8339815191526020526040902054600160a01b90046001600160601b031690565b606081611f5181611282565b8251806001600160401b03811115611f6b57611f6b613e2d565b604051908082528060200260200182016040528015611f94578160200160208202803683370190505b50925080600003611fa5575061165c565b60408051808201909152600080825260208201819052600080516020614b0c833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156121aa578c818151811061202e5761202e614270565b6020908102919091018101516001600160a01b038082166000908152928c90526040909220549091169550935061206485611971565b61206d84611971565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b031691830191909152909350908516146120e1576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b6120eb8785611cd8565b80156120fc57506120fc8886611cd8565b8c828151811061210e5761210e614270565b6020026020010190151590811515815250508b818151811061213257612132614270565b6020026020010151156121a25761214988866119a6565b5061215487856119a6565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b031916905592881682528881529181205582015161219f906001600160601b031684614213565b92505b600101612014565b506121c3600080516020614b4c833981519152836130c3565b506121e263c48549de60e01b8d8d604051602001610a9c9291906142b7565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d60405161221392919061478b565b60405180910390a150505050505050505050919050565b81518151606091908082016001600160401b0381111561224c5761224c613e2d565b604051908082528060200260200182016040528015612275578160200160208202803683370190505b50925060005b828110156122cf5785818151811061229557612295614270565b60200260200101518482815181106122af576122af614270565b6001600160a01b039092166020928302919091019091015260010161227b565b60005b8281101561232a578581815181106122ec576122ec614270565b602002602001015185838151811061230657612306614270565b6001600160a01b0390921660209283029190910190910152600191820191016122d2565b5050505092915050565b60006107668361234485856130d3565b9250829055565b6000815160000361235e57506000919050565b60005b60018351038110156123e157600181015b83518110156123d85783818151811061238d5761238d614270565b60200260200101516001600160a01b03168483815181106123b0576123b0614270565b60200260200101516001600160a01b0316036123d0575060019392505050565b600101612372565b50600101612361565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561243a57602002820191906000526020600020905b815481526020019060010190808311612426575b50505050509050919050565b600081604051602401612459919061425b565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906124a29085906146d5565b600060405180830381855afa9150503d80600081146124dd576040519150601f19603f3d011682016040523d82523d6000602084013e6124e2565b606091505b5091509150816125a457846001600160a01b03168360405160240161250791906146c2565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161253c91906146d5565b600060405180830381855afa9150503d8060008114612577576040519150601f19603f3d011682016040523d82523d6000602084013e61257c565b606091505b509092509050816125a457838560405163069d427960e11b81526004016109209291906147b0565b808060200190518101906125b891906147d3565b6107ea57838560405163069d427960e11b81526004016109209291906147b0565b602082015160009080820361261b5760405163092048d160e11b8152600080356001600160e01b03191660048301526024820152466044820152606401610920565b6002546126299085906130f2565b6000612634856126df565b905061263f82613193565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461269b576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516126cf9291906148e2565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561270d5761270d613e2d565b604051908082528060200260200182016040528015612736578160200160208202803683370190505b5060c086015190915060005b8251811015612795578660a00151818151811061276157612761614270565b60200260200101518051906020012083828151811061278257612782614270565b6020908102919091010152600101612742565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061286557508483145b612890576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b60008080856001600160401b038111156128ac576128ac613e2d565b6040519080825280602002602001820160405280156128d5578160200160208202803683370190505b5090506000866001600160401b038111156128f2576128f2613e2d565b60405190808252806020026020018201604052801561291b578160200160208202803683370190505b50905060008060003660005b8b811015612aac578c8c8281811061294157612941614270565b90506060020191508e8e8281811061295b5761295b614270565b9050602002016020810190612970919061490c565b92506000836001811115612986576129866140ca565b036129f0576129ab8b61299c602085018561492d565b8460200135856040013561322f565b945084878a6129b981614950565b9b50815181106129cb576129cb614270565b60200260200101906001600160a01b031690816001600160a01b031681525050612a61565b6001836001811115612a0457612a046140ca565b03612a3a57612a1a8a61299c602085018561492d565b9450848689612a2881614950565b9a50815181106129cb576129cb614270565b6000356001600160e01b031916604051630612418f60e11b8152600401610920919061425b565b846001600160a01b0316846001600160a01b031610612aa1576000356001600160e01b031916604051635d3dcd3160e01b8152600401610920919061425b565b849350600101612927565b50505085845250508281526020808c015160009081526001825260408082208e51835290925290812090612ade613257565b90506000612aeb85613261565b9050818110612b725780600003612b23576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b66838f61326c565b50505050505050612c45565b600082612b7d6132d9565b612b879190614226565b612b92906001614213565b90506000612b9f86613261565b9050818110612c1e5780600003612bd7576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050612c45565b6000356001600160e01b031916604051634ccfe64360e11b8152600401610920919061425b565b50505050505050565b612c8e6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b612ca7612ca084604001516001611416565b84906132e3565b9050612cbe600254826130f290919063ffffffff16565b6000612cc9826126df565b90506000612cd76000613193565b60008181527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602090815260409091209087015160018201859055600690910155905082518114612d49576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85612d7689612d98565b8989604051612d889493929190614969565b60405180910390a3505092915050565b60608101516040820151608083015151600092919083906001600160401b03811115612dc657612dc6613e2d565b604051908082528060200260200182016040528015612def578160200160208202803683370190505b5060a086015190915060005b8251811015612e4e5786608001518181518110612e1a57612e1a614270565b602002602001015180519060200120838281518110612e3b57612e3b614270565b6020908102919091010152600101612dfb565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b8060036000846004811115612ee657612ee66140ca565b6004811115612ef757612ef76140ca565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826004811115612f3557612f356140ca565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6000818152600183016020526040812054801561304b576000612f86600183614226565b8554909150600090612f9a90600190614226565b9050818114612fff576000866000018281548110612fba57612fba614270565b9060005260206000200154905080876000018481548110612fdd57612fdd614270565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061301057613010614a50565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610766565b6000915050610766565b600081815260018301602052604081205461309c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610766565b506000610766565b9055565b60006130b2825490565b9050610d69826130a4836001614213565b600061076683612344858561340d565b815481018181101561076657634e487b7160005260116020526024601cfd5b60008260600151511180156131105750816080015151826060015151145b801561312557508160a0015151826060015151145b801561313a57508160c0015151826060015151145b613165576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b61316f8142614213565b826040015111156109335760405163ad89be9d60e01b815260040160405180910390fd5b600081815260208190526040812054908190036131c25750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906000825460ff1660048111156131f4576131f46140ca565b036132125760405163757a436360e01b815260040160405180910390fd5b505050600090815260208190526040902080546001019081905590565b6000806000613240878787876135e8565b9150915061324d816136d5565b5095945050505050565b6000610638610876565b6000610766826112ba565b6132758161388b565b1561093357815460ff19166002178255600080613291836138a5565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba83836040516132cb929190614a66565b60405180910390a250505050565b6000610638610620565b6133236040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561335a5761335a613e2d565b604051908082528060200260200182016040528015613383578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b836040015151811015611569578281815181106133cf576133cf614270565b6020026020010151826060015182815181106133ed576133ed614270565b6001600160a01b03909216602092830291909101909101526001016133b0565b600082548281101561342c57634e487b7160005260116020526024601cfd5b9190910392915050565b60048301548110156134e95782600801600084600401838154811061345d5761345d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106134a6576134a6614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613436565b5060005b60058301548110156135a05782600801600084600501838154811061351457613514614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600584018054600786019291908490811061355d5761355d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016134ed565b50815460ff1916825560006001830181905560028301819055600383018190556135ce906004840190613b03565b6135dc600583016000613b03565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136cc565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136cc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561369c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136c5576000600192509250506136cc565b9150600090505b94509492505050565b60008160048111156136e9576136e96140ca565b036136f15750565b6001816004811115613705576137056140ca565b036137525760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610920565b6002816004811115613766576137666140ca565b036137b35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610920565b60038160048111156137c7576137c76140ca565b0361381f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610920565b6004816004811115613833576138336140ca565b036112b75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610920565b600081602001516000148061076657505060200151461490565b6060806138b18361388b565b6138ef57602083015160405163092048d160e11b81526000356001600160e01b03191660048201526024810191909152466044820152606401610920565b8260600151516001600160401b0381111561390c5761390c613e2d565b604051908082528060200260200182016040528015613935578160200160208202803683370190505b5091508260600151516001600160401b0381111561395557613955613e2d565b60405190808252806020026020018201604052801561398857816020015b60608152602001906001900390816139735790505b50905060005b836060015151811015613afd578360c0015181815181106139b1576139b1614270565b60200260200101515a116139e4576139c8846126df565b6040516307aec4ab60e21b815260040161092091815260200190565b836060015181815181106139fa576139fa614270565b60200260200101516001600160a01b031684608001518281518110613a2157613a21614270565b60200260200101518560c001518381518110613a3f57613a3f614270565b6020026020010151908660a001518481518110613a5e57613a5e614270565b6020026020010151604051613a7391906146d5565b600060405180830381858888f193505050503d8060008114613ab1576040519150601f19603f3d011682016040523d82523d6000602084013e613ab6565b606091505b50848381518110613ac957613ac9614270565b60200260200101848481518110613ae257613ae2614270565b6020908102919091010191909152901515905260010161398e565b50915091565b50805460008255906000526020600020908101906112b791905b80821115613b315760008155600101613b1d565b5090565b60008083601f840112613b4757600080fd5b5081356001600160401b03811115613b5e57600080fd5b6020830191508360208260051b8501011115610b2757600080fd5b60008060008060008060608789031215613b9257600080fd5b86356001600160401b0380821115613ba957600080fd5b613bb58a838b01613b35565b90985096506020890135915080821115613bce57600080fd5b613bda8a838b01613b35565b90965094506040890135915080821115613bf357600080fd5b50613c0089828a01613b35565b979a9699509497509295939492505050565b60008151808452602080850194506020840160005b83811015613c45578151151587529582019590820190600101613c27565b509495945050505050565b6020815260006107216020830184613c12565b60008060208385031215613c7657600080fd5b82356001600160401b03811115613c8c57600080fd5b613c9885828601613b35565b90969095509350505050565b60008151808452602080850194506020840160005b83811015613c455781516001600160a01b031687529582019590820190600101613cb9565b6020815260006107216020830184613ca4565b600060208284031215613d0357600080fd5b5035919050565b60008083601f840112613d1c57600080fd5b5081356001600160401b03811115613d3357600080fd5b602083019150836020606083028501011115610b2757600080fd5b600080600080600060608688031215613d6657600080fd5b85356001600160401b0380821115613d7d57600080fd5b9087019060e0828a031215613d9157600080fd5b90955060208701359080821115613da757600080fd5b613db389838a01613b35565b90965094506040880135915080821115613dcc57600080fd5b50613dd988828901613d0a565b969995985093965092949392505050565b600080600080600060608688031215613e0257600080fd5b85356001600160401b0380821115613e1957600080fd5b9087019060c0828a031215613d9157600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613e6557613e65613e2d565b60405290565b60405160c081016001600160401b0381118282101715613e6557613e65613e2d565b604051601f8201601f191681016001600160401b0381118282101715613eb557613eb5613e2d565b604052919050565b60006001600160401b03821115613ed657613ed6613e2d565b5060051b60200190565b600082601f830112613ef157600080fd5b81356020613f06613f0183613ebd565b613e8d565b80838252602082019150600560208560051b880101945087851115613f2a57600080fd5b602087015b85811015613f53578035828110613f465760008081fd5b8452928401928401613f2f565b5090979650505050505050565b80356001600160a01b0381168114610d6957600080fd5b600082601f830112613f8857600080fd5b81356020613f98613f0183613ebd565b8083825260208201915060208460051b870101935086841115613fba57600080fd5b602086015b84811015613fdd57613fd081613f60565b8352918301918301613fbf565b509695505050505050565b60008060408385031215613ffb57600080fd5b82356001600160401b038082111561401257600080fd5b61401e86838701613ee0565b9350602085013591508082111561403457600080fd5b5061404185828601613f77565b9150509250929050565b803560108110610d6957600080fd5b6000806040838503121561406d57600080fd5b6140768361404b565b915061408460208401613f60565b90509250929050565b60006020828403121561409f57600080fd5b61072182613f60565b600080604083850312156140bb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600581106112b7576112b76140ca565b60a081016140fd876140e0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561413057600080fd5b81356001600160401b0381111561414657600080fd5b6106ba84828501613f77565b60008151808452602080850194506020840160005b83811015613c455781516001600160601b031687529582019590820190600101614167565b60608152600061419f6060830186613ca4565b82810360208401526141b18186613ca4565b905082810360408401526141c58185614152565b9695505050505050565b6020815260006107216020830184614152565b6000602082840312156141f457600080fd5b6107218261404b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610766576107666141fd565b81810381811115610766576107666141fd565b60008261425657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610766576107666141fd565b60208101601083106142b1576142b16140ca565b91905290565b6040815260006142ca6040830185613ca4565b82810360208401526142dc8185613c12565b95945050505050565b6080815260006142f86080830187613c12565b828103602084015261430a8187614152565b9050828103604084015261431e8186613ca4565b905082810360608401526106158185613ca4565b6001600160e01b03198316815260408101600b8310614353576143536140ca565b8260208301529392505050565b600082601f83011261437157600080fd5b81356020614381613f0183613ebd565b8083825260208201915060208460051b8701019350868411156143a357600080fd5b602086015b84811015613fdd57803583529183019183016143a8565b6000601f83601f8401126143d257600080fd5b823560206143e2613f0183613ebd565b82815260059290921b8501810191818101908784111561440157600080fd5b8287015b848110156144975780356001600160401b03808211156144255760008081fd5b818a0191508a603f83011261443a5760008081fd5b8582013560408282111561445057614450613e2d565b614461828b01601f19168901613e8d565b92508183528c818386010111156144785760008081fd5b8181850189850137506000908201870152845250918301918301614405565b50979650505050505050565b600060e082360312156144b557600080fd5b6144bd613e43565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156144ef57600080fd5b6144fb36838701613f77565b6060840152608085013591508082111561451457600080fd5b61452036838701614360565b608084015260a085013591508082111561453957600080fd5b614545368387016143bf565b60a084015260c085013591508082111561455e57600080fd5b5061456b36828601614360565b60c08301525092915050565b600060c0823603121561458957600080fd5b614591613e6b565b823581526020830135602082015260408301356001600160401b03808211156145b957600080fd5b6145c536838701613ee0565b604084015260608501359150808211156145de57600080fd5b6145ea36838701614360565b6060840152608085013591508082111561460357600080fd5b61460f368387016143bf565b608084015260a085013591508082111561462857600080fd5b5061463536828601614360565b60a08301525092915050565b60005b8381101561465c578181015183820152602001614644565b50506000910152565b6001600160e01b0319831681528151600090614688816004850160208701614641565b919091016004019392505050565b600081518084526146ae816020860160208601614641565b601f01601f19169290920160200192915050565b6020815260006107216020830184614696565b600082516146e7818460208701614641565b9190910192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015613f5357601f1986840301895261472c838351614696565b98840198925090830190600101614710565b6080815260006147516080830187614696565b82810360208401526147638187613ca4565b905082810360408401526147778186613c12565b9050828103606084015261061581856146f1565b60408152600061479e6040830185613c12565b82810360208401526142dc8185613ca4565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082840312156147e557600080fd5b8151801515811461072157600080fd5b60008151808452602080850194506020840160005b83811015613c455781518752958201959082019060010161480a565b600060e0830182518452602080840151602086015260408401516040860152606084015160e0606087015282815180855261010088019150602083019450600092505b808310156148925784516001600160a01b03168252938301936001929092019190830190614869565b506080860151935086810360808801526148ac81856147f5565b935050505060a083015184820360a08601526148c882826146f1565b91505060c083015184820360c08601526142dc82826147f5565b6040815260006148f56040830185614826565b905060018060a01b03831660208301529392505050565b60006020828403121561491e57600080fd5b81356002811061072157600080fd5b60006020828403121561493f57600080fd5b813560ff8116811461072157600080fd5b600060018201614962576149626141fd565b5060010190565b60808152600061497c6080830187614826565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156149e65783516149d0816140e0565b82529284019260019290920191908401906149bd565b50606089015193508481036060860152614a0081856147f5565b935050505060808601518282036080840152614a1c82826146f1565b91505060a086015182820360a0840152614a3682826147f5565b93505050506142dc60608301846001600160a01b03169052565b634e487b7160e01b600052603160045260246000fd5b604081526000614a796040830185613c12565b82810360208401526142dc81856146f156fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca2646970667358221220cb0e92b2033c9131bafd8c90a491e8241ace110667169406b1c1a69bc857723964736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "addBridgeOperators(uint96[],address[],address[])": { + "details": "Adds multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to add.", + "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." + }, + "returns": { + "addeds": "An array of booleans indicating whether each bridge operator was added successfully. Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators( voteWeights, governors, bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]); const filteredWeights = weights.filter((_, index) => addeds[index]); const filteredGovernors = governors.filter((_, index) => addeds[index]); // ... (Process or use the information as required) ... ```" + } + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "getBridgeOperatorOf(address[])": { + "details": "Returns an array of bridge operators correspoding to governor addresses.", + "returns": { + "bridgeOperators": "An array containing the addresses of all bridge operators." + } + }, + "getBridgeOperatorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific bridge operator.", + "params": { + "bridgeOperator": "The address of the bridge operator to get the vote weight for." + }, + "returns": { + "weight": "The vote weight of the specified bridge operator." + } + }, + "getBridgeOperators()": { + "details": "Returns an array of all bridge operators.", + "returns": { + "_0": "An array containing the addresses of all bridge operators." + } + }, + "getCallbackRegisters()": { + "details": "Retrieves the addresses of registered callbacks.", + "returns": { + "registers": "An array containing the addresses of registered callbacks." + } + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getFullBridgeOperatorInfos()": { + "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", + "returns": { + "bridgeOperators": "An array of addresses representing the registered bridge operators.", + "governors": "An array of addresses representing the governors of each bridge operator.", + "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" + } + }, + "getGovernorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific governor.", + "params": { + "governor": "The address of the governor to get the vote weight for." + }, + "returns": { + "weight": "voteWeight The vote weight of the specified governor." + } + }, + "getGovernorWeights(address[])": { + "details": "Returns the weights of a list of governor addresses." + }, + "getGovernors()": { + "details": "Returns an array of all governors.", + "returns": { + "_0": "An array containing the addresses of all governors." + } + }, + "getGovernorsOf(address[])": { + "details": "Retrieves the governors corresponding to a given array of bridge operators. This external function allows external callers to obtain the governors associated with a given array of bridge operators. The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.", + "params": { + "bridgeOperators": "An array of bridge operator addresses for which governors are to be retrieved." + }, + "returns": { + "governors": "An array of addresses representing the governors corresponding to the provided bridge operators." + } + }, + "getProposalExpiryDuration()": { + "details": "Returns the expiry duration for a new proposal." + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTotalWeight()": { + "details": "Returns total weights." + }, + "globalProposalRelayed(uint256)": { + "details": "Returns whether the voter `_voter` casted vote for the proposal." + }, + "isBridgeOperator(address)": { + "details": "Checks if the given address is a bridge operator.", + "params": { + "addr": "The address to check." + }, + "returns": { + "_0": "A boolean indicating whether the address is a bridge operator." + } + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "registerCallbacks(address[])": { + "details": "Registers multiple callbacks with the bridge.", + "params": { + "registers": "The array of callback addresses to register." + }, + "returns": { + "registereds": "An array indicating the success status of each registration." + } + }, + "relayGlobalProposal((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor." + }, + "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor." + }, + "removeBridgeOperators(address[])": { + "details": "Removes multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to remove." + }, + "returns": { + "removeds": "An array of booleans indicating whether each bridge operator was removed successfully. * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators( bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]); // ... (Process or use the information as required) ... ```" + } + }, + "resolveTargets(uint8[])": { + "details": "Returns corresponding address of target options. Return address(0) on non-existent target." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "sumGovernorsWeight(address[])": { + "details": "Returns total weights of the governor list." + }, + "totalBridgeOperator()": { + "details": "Returns the total number of bridge operators.", + "returns": { + "_0": "The total number of bridge operators." + } + }, + "unregisterCallbacks(address[])": { + "details": "Unregisters multiple callbacks from the bridge.", + "params": { + "registers": "The array of callback addresses to unregister." + }, + "returns": { + "unregistereds": "An array indicating the success status of each unregistration." + } + }, + "updateBridgeOperator(address)": { + "details": "Governor updates their corresponding governor and/or operator address. Requirements: - The caller must the governor of the operator that is requested changes.", + "params": { + "bridgeOperator": "The address of the bridge operator to update." + } + }, + "updateManyTargetOption(uint8[],address[])": { + "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal. " + } + }, + "events": { + "BridgeOperatorUpdated(address,address,address)": { + "details": "Emitted when a bridge operator is updated.", + "params": { + "fromBridgeOperator": "The address of the bridge operator being updated.", + "governor": "The address of the governor initiating the update.", + "toBridgeOperator": "The updated address of the bridge operator." + } + }, + "BridgeOperatorsAdded(bool[],uint96[],address[],address[])": { + "details": "Emitted when new bridge operators are added.", + "params": { + "bridgeOperators": "The array of addresses representing the added bridge operators.", + "governors": "The array of addresses representing the governors associated with the added bridge operators.", + "statuses": "The array of boolean values represents whether the corresponding bridge operator is added successfully.", + "voteWeights": "The array of vote weights assigned to the added bridge operators." + } + }, + "BridgeOperatorsRemoved(bool[],address[])": { + "details": "Emitted when bridge operators are removed.", + "params": { + "bridgeOperators": "The array of addresses representing the removed bridge operators.", + "statuses": "The array of boolean values representing the statuses of the removed bridge operators." + } + }, + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,uint8[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "Notified(bytes,address[],bool[],bytes[])": { + "details": "Emitted when the contract notifies multiple registers with statuses and return data." + }, + "ProposalApproved(bytes32)": { + "details": "Emitted when the proposal is approved" + }, + "ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "ProposalExecuted(bytes32,bool[],bytes[])": { + "details": "Emitted when the proposal is executed" + }, + "ProposalExpired(bytes32)": { + "details": "Emitted when the vote is expired" + }, + "ProposalExpiryDurationChanged(uint256)": { + "details": "Emitted when the proposal expiry duration is changed." + }, + "ProposalRejected(bytes32)": { + "details": "Emitted when the vote is reject" + }, + "ProposalVoted(bytes32,address,uint8,uint256)": { + "details": "Emitted when the proposal is voted" + }, + "TargetOptionUpdated(uint8,address)": { + "details": "Emitted when the target options are updated" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + } + }, + "errors": { + "ErrBridgeOperatorAlreadyExisted(address)": [ + { + "details": "Error thrown when attempting to add a bridge operator that already exists in the contract. This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract." + } + ], + "ErrBridgeOperatorUpdateFailed(address)": [ + { + "details": "Error raised when a bridge operator update operation fails.", + "params": { + "bridgeOperator": "The address of the bridge operator that failed to update." + } + } + ], + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrCurrentProposalIsNotCompleted()": [ + { + "details": "Error thrown when the current proposal is not completed." + } + ], + "ErrDuplicated(bytes4)": [ + { + "details": "Error thrown when a duplicated element is detected in an array.", + "params": { + "msgSig": "The function signature that invoke the error." + } + } + ], + "ErrInsufficientGas(bytes32)": [ + { + "details": "Error thrown when there is insufficient gas to execute a function." + } + ], + "ErrInvalidArguments(bytes4)": [ + { + "details": "Error indicating that arguments are invalid." + } + ], + "ErrInvalidChainId(bytes4,uint256,uint256)": [ + { + "details": "Error indicating that the chain ID is invalid.", + "params": { + "actual": "Current chain ID that executing function.", + "expected": "Expected chain ID required for the tx to success.", + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." + } + } + ], + "ErrInvalidExpiryTimestamp()": [ + { + "details": "Error thrown when an invalid expiry timestamp is provided." + } + ], + "ErrInvalidOrder(bytes4)": [ + { + "details": "Error indicating that an order is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." + } + } + ], + "ErrInvalidProposalNonce(bytes4)": [ + { + "details": "Error indicating that the proposal nonce is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid proposal nonce." + } + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidVoteWeight(bytes4)": [ + { + "details": "Error indicating that a vote weight is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." + } + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrOnlySelfCall(bytes4)": [ + { + "details": "Error indicating that a function can only be called by the contract itself.", + "params": { + "msgSig": "The function signature (bytes4) that can only be called by the contract itself." + } + } + ], + "ErrRelayFailed(bytes4)": [ + { + "details": "Error indicating that a relay call has failed.", + "params": { + "msgSig": "The function signature (bytes4) of the relay call that failed." + } + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedInterface(bytes4,address)": [ + { + "details": "The error indicating an unsupported interface.", + "params": { + "addr": "The address where the unsupported interface was encountered.", + "interfaceId": "The bytes4 interface identifier that is not supported." + } + } + ], + "ErrUnsupportedVoteType(bytes4)": [ + { + "details": "Error indicating that a vote type is not supported.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an unsupported vote type." + } + } + ], + "ErrVoteIsFinalized()": [ + { + "details": "Error thrown when attempting to interact with a finalized vote." + } + ], + "ErrZeroAddress(bytes4)": [ + { + "details": "Error indicating that given address is null when it should not." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"callbackRegisters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"ErrBridgeOperatorAlreadyExisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"ErrBridgeOperatorUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCurrentProposalIsNotCompleted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrDuplicated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ErrInsufficientGas\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidExpiryTimestamp\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidProposalNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidVoteWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrRelayFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrUnsupportedInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnsupportedVoteType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrVoteIsFinalized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromBridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toBridgeOperator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"Notified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"ProposalExpiryDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\",\"name\":\"targetOption\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"TargetOptionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"addBridgeOperators\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getBridgeOperatorOf\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"getBridgeOperatorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCallbackRegisters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullBridgeOperatorInfos\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"getGovernorsOf\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProposalExpiryDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"globalProposalRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isBridgeOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"registerCallbacks\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"registereds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayGlobalProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"removeBridgeOperators\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"removeds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"}],\"name\":\"resolveTargets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"sumGovernorsWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBridgeOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"unregisterCallbacks\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"unregistereds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newBridgeOperator\",\"type\":\"address\"}],\"name\":\"updateBridgeOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateManyTargetOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrBridgeOperatorAlreadyExisted(address)\":[{\"details\":\"Error thrown when attempting to add a bridge operator that already exists in the contract. This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\"}],\"ErrBridgeOperatorUpdateFailed(address)\":[{\"details\":\"Error raised when a bridge operator update operation fails.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator that failed to update.\"}}],\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrCurrentProposalIsNotCompleted()\":[{\"details\":\"Error thrown when the current proposal is not completed.\"}],\"ErrDuplicated(bytes4)\":[{\"details\":\"Error thrown when a duplicated element is detected in an array.\",\"params\":{\"msgSig\":\"The function signature that invoke the error.\"}}],\"ErrInsufficientGas(bytes32)\":[{\"details\":\"Error thrown when there is insufficient gas to execute a function.\"}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidExpiryTimestamp()\":[{\"details\":\"Error thrown when an invalid expiry timestamp is provided.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidProposalNonce(bytes4)\":[{\"details\":\"Error indicating that the proposal nonce is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\"}}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidVoteWeight(bytes4)\":[{\"details\":\"Error indicating that a vote weight is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid vote weight.\"}}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrOnlySelfCall(bytes4)\":[{\"details\":\"Error indicating that a function can only be called by the contract itself.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that can only be called by the contract itself.\"}}],\"ErrRelayFailed(bytes4)\":[{\"details\":\"Error indicating that a relay call has failed.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the relay call that failed.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedInterface(bytes4,address)\":[{\"details\":\"The error indicating an unsupported interface.\",\"params\":{\"addr\":\"The address where the unsupported interface was encountered.\",\"interfaceId\":\"The bytes4 interface identifier that is not supported.\"}}],\"ErrUnsupportedVoteType(bytes4)\":[{\"details\":\"Error indicating that a vote type is not supported.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\"}}],\"ErrVoteIsFinalized()\":[{\"details\":\"Error thrown when attempting to interact with a finalized vote.\"}],\"ErrZeroAddress(bytes4)\":[{\"details\":\"Error indicating that given address is null when it should not.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeOperatorUpdated(address,address,address)\":{\"details\":\"Emitted when a bridge operator is updated.\",\"params\":{\"fromBridgeOperator\":\"The address of the bridge operator being updated.\",\"governor\":\"The address of the governor initiating the update.\",\"toBridgeOperator\":\"The updated address of the bridge operator.\"}},\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\":{\"details\":\"Emitted when new bridge operators are added.\",\"params\":{\"bridgeOperators\":\"The array of addresses representing the added bridge operators.\",\"governors\":\"The array of addresses representing the governors associated with the added bridge operators.\",\"statuses\":\"The array of boolean values represents whether the corresponding bridge operator is added successfully.\",\"voteWeights\":\"The array of vote weights assigned to the added bridge operators.\"}},\"BridgeOperatorsRemoved(bool[],address[])\":{\"details\":\"Emitted when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The array of addresses representing the removed bridge operators.\",\"statuses\":\"The array of boolean values representing the statuses of the removed bridge operators.\"}},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,uint8[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"Notified(bytes,address[],bool[],bytes[])\":{\"details\":\"Emitted when the contract notifies multiple registers with statuses and return data.\"},\"ProposalApproved(bytes32)\":{\"details\":\"Emitted when the proposal is approved\"},\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"ProposalExecuted(bytes32,bool[],bytes[])\":{\"details\":\"Emitted when the proposal is executed\"},\"ProposalExpired(bytes32)\":{\"details\":\"Emitted when the vote is expired\"},\"ProposalExpiryDurationChanged(uint256)\":{\"details\":\"Emitted when the proposal expiry duration is changed.\"},\"ProposalRejected(bytes32)\":{\"details\":\"Emitted when the vote is reject\"},\"ProposalVoted(bytes32,address,uint8,uint256)\":{\"details\":\"Emitted when the proposal is voted\"},\"TargetOptionUpdated(uint8,address)\":{\"details\":\"Emitted when the target options are updated\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"}},\"kind\":\"dev\",\"methods\":{\"addBridgeOperators(uint96[],address[],address[])\":{\"details\":\"Adds multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to add.\",\"governors\":\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\"},\"returns\":{\"addeds\":\"An array of booleans indicating whether each bridge operator was added successfully. Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators( voteWeights, governors, bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]); const filteredWeights = weights.filter((_, index) => addeds[index]); const filteredGovernors = governors.filter((_, index) => addeds[index]); // ... (Process or use the information as required) ... ```\"}},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getBridgeOperatorOf(address[])\":{\"details\":\"Returns an array of bridge operators correspoding to governor addresses.\",\"returns\":{\"bridgeOperators\":\"An array containing the addresses of all bridge operators.\"}},\"getBridgeOperatorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to get the vote weight for.\"},\"returns\":{\"weight\":\"The vote weight of the specified bridge operator.\"}},\"getBridgeOperators()\":{\"details\":\"Returns an array of all bridge operators.\",\"returns\":{\"_0\":\"An array containing the addresses of all bridge operators.\"}},\"getCallbackRegisters()\":{\"details\":\"Retrieves the addresses of registered callbacks.\",\"returns\":{\"registers\":\"An array containing the addresses of registered callbacks.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getFullBridgeOperatorInfos()\":{\"details\":\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\",\"returns\":{\"bridgeOperators\":\"An array of addresses representing the registered bridge operators.\",\"governors\":\"An array of addresses representing the governors of each bridge operator.\",\"weights\":\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\"}},\"getGovernorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific governor.\",\"params\":{\"governor\":\"The address of the governor to get the vote weight for.\"},\"returns\":{\"weight\":\"voteWeight The vote weight of the specified governor.\"}},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getGovernors()\":{\"details\":\"Returns an array of all governors.\",\"returns\":{\"_0\":\"An array containing the addresses of all governors.\"}},\"getGovernorsOf(address[])\":{\"details\":\"Retrieves the governors corresponding to a given array of bridge operators. This external function allows external callers to obtain the governors associated with a given array of bridge operators. The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.\",\"params\":{\"bridgeOperators\":\"An array of bridge operator addresses for which governors are to be retrieved.\"},\"returns\":{\"governors\":\"An array of addresses representing the governors corresponding to the provided bridge operators.\"}},\"getProposalExpiryDuration()\":{\"details\":\"Returns the expiry duration for a new proposal.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTotalWeight()\":{\"details\":\"Returns total weights.\"},\"globalProposalRelayed(uint256)\":{\"details\":\"Returns whether the voter `_voter` casted vote for the proposal.\"},\"isBridgeOperator(address)\":{\"details\":\"Checks if the given address is a bridge operator.\",\"params\":{\"addr\":\"The address to check.\"},\"returns\":{\"_0\":\"A boolean indicating whether the address is a bridge operator.\"}},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"registerCallbacks(address[])\":{\"details\":\"Registers multiple callbacks with the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to register.\"},\"returns\":{\"registereds\":\"An array indicating the success status of each registration.\"}},\"relayGlobalProposal((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor.\"},\"relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor.\"},\"removeBridgeOperators(address[])\":{\"details\":\"Removes multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to remove.\"},\"returns\":{\"removeds\":\"An array of booleans indicating whether each bridge operator was removed successfully. * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators( bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]); // ... (Process or use the information as required) ... ```\"}},\"resolveTargets(uint8[])\":{\"details\":\"Returns corresponding address of target options. Return address(0) on non-existent target.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumGovernorsWeight(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalBridgeOperator()\":{\"details\":\"Returns the total number of bridge operators.\",\"returns\":{\"_0\":\"The total number of bridge operators.\"}},\"unregisterCallbacks(address[])\":{\"details\":\"Unregisters multiple callbacks from the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to unregister.\"},\"returns\":{\"unregistereds\":\"An array indicating the success status of each unregistration.\"}},\"updateBridgeOperator(address)\":{\"details\":\"Governor updates their corresponding governor and/or operator address. Requirements: - The caller must the governor of the operator that is requested changes.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to update.\"}},\"updateManyTargetOption(uint8[],address[])\":{\"details\":\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal. \"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"},\"updateBridgeOperator(address)\":{\"notice\":\"This method checks authorization by querying the corresponding operator of the msg.sender and then attempts to remove it from the `_bridgeOperatorSet` for gas optimization. In case we allow a governor can leave their operator address blank null `address(0)`, consider add authorization check.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainBridgeManager.sol\":\"MainchainBridgeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://383fb7b8181016ac5ccf07bc9cdb7c1b5045ea36e2cc4df52bcbf20396fc7688\",\"dweb:/ipfs/QmYJ7Cg4WmE3rR8KGQxjUCXFfTH6TcwZ2Z1f6tPrq7jHFr\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://96b6d77a20bebd4eb06b801d3d020c7e82be13bd535cb0d0a6b7181c51dab5d5\",\"dweb:/ipfs/QmPUR9Cv9jNFdQX6PtBfaBW1ZCnKwiu65R2VD5kbdanDyn\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://89c2a0f70157c13845be5cb49b078a6374fee3a78fa950052a3af26190255da8\",\"dweb:/ipfs/QmUcvMEQH1oMM2pUyMuDiBUKdvvnTz1NRB8bmPHrVq8725\"]},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8831721b6f4cc26534d190f9f1631c3f59c9ff38efdd911f85e0882b8e360472\",\"dweb:/ipfs/QmQZnLErZNStirSQ13ZNWQgvEYUtGE5tXYwn4QUPaVUfPN\"]},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a6c4477d480bac20d681ade0e712b77ad828acf530a1d5c0abc5fb78068a05a1\",\"dweb:/ipfs/QmdBqsK8CcUceTeWzhHwFDEvKMoHimwtV96Lbim7ZBtCb8\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://39e096c60a6eb1c6a257122d515496bd92d0c6a693a8f07acb6aa4b1263e95d4\",\"dweb:/ipfs/QmPs5trJBacCiSkezP6tpevapuRYWNY6mqSFzsMCJj7e6B\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bf52bdf22a33263f5ca6227a35faeac3b81e7d2c692fbcc6a079d488710c5900\",\"dweb:/ipfs/QmcmsjkP4yq3UhiJbvyzwufaY2EKh1zhHaRK8ATag2cpD2\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d4831d777a29ebdf9f2caecd70e74b97bff1b70e53622fd0a02aed01e21c8271\",\"dweb:/ipfs/QmUqurVVnCc7XkMxb2k23TVQUtuhHZduJ3hTZarTJrqU24\"]},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://370c93bc1e962fcf8eab41d217d901716769f05c51a2cb25aae12abc84e871da\",\"dweb:/ipfs/QmQYL5QrJmXCdi5UN9K7imt1iPm9ydZQm6ifShpt451afd\"]},\"src/extensions/bridge-operator-governance/BridgeManager.sol\":{\"keccak256\":\"0xed4094d87c13f38dc4b76b52b8b238447d99cdc2ad452f322ddc891b1217d572\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c8a37c078764f764094af3e4aba17aeb529e4985a316f7a9902001bb3b0c5872\",\"dweb:/ipfs/QmdSgZNaxS2RfQQ49AZWwo2ZmAt1ViQGShd1zFUTzum7sp\"]},\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\":{\"keccak256\":\"0x0fd58e2e9955d95cfde1ccd8b120fbb3d5bbf7b41143c09217833bd1d01590ce\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a470ffde7a16e1d32cf2ef09fac248bdd012eabd166d3a42e35891d23aa4027d\",\"dweb:/ipfs/QmWjL7fG82GCvg8UFJVb5PMskwqRDKfggk1WwVKQ1heG8e\"]},\"src/extensions/collections/HasContracts.sol\":{\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b8903232a7a609b250a1ff2e9522a2366979652145af74637f9c0089916e3da3\",\"dweb:/ipfs/QmVoxZamJEhjYhr9RKVSAKGzakgqmFLfZXhZcDGor7DZe5\"]},\"src/extensions/collections/HasProxyAdmin.sol\":{\"keccak256\":\"0x0916021d04ea0c93c54978dc2fd46575fd2bd867369fbf9ce49f316939ddaf25\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e220c59eb50b4e206d0a126f8cd2f7f2aa6865f56a0b4b091149e6928bf97b8\",\"dweb:/ipfs/QmRBk5hhn1w2MghZ8pRfaU1CvgRAZN7nZvxySSPDvkVuGp\"]},\"src/extensions/sequential-governance/CoreGovernance.sol\":{\"keccak256\":\"0xc6056209e8f6a0d9edced67388a4037c6fafffb68a3c7b2fe5759c487bb1d81c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://97bcdb2a935279c899a9cc27e4b3f372b255b6851723be8c80b2e9f3865647e9\",\"dweb:/ipfs/QmQdFFXdC2vmwbPyAetmZYNvVbshXGwaWq4waiQRhsmpsT\"]},\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\":{\"keccak256\":\"0x986444cade6313dd1ce4137f3338e4fc296769f5cf669f057cd2838e5ae0e54f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2b742e41b4155f872f00e387f971139713f8d5bc8a4d351b026041b8766af6dc\",\"dweb:/ipfs/QmSz3QV64W8MKvuWmdy6rCQXMBX3bz8vcfV8UKYHsQbuvf\"]},\"src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol\":{\"keccak256\":\"0x80c58038f403fd189647669c2f5f913c9c5dd16be3d1b60b296903ce70c9634b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6fd2c38ba6888b6c6f32365c3d3501e038f727176fcc3329fefdd909996ab247\",\"dweb:/ipfs/QmYZ31EScGv4Moonfahgi8o6TXVLSWUiAKJLZZtrQobUhZ\"]},\"src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\":{\"keccak256\":\"0xe2c192ec663e10953b2754fa154fef64e26b8c470d25272883a9c149623746c8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://41908a736c62c8145e0d5dd74d8495a06e0132e8d9b60618c97df40da7ae39c7\",\"dweb:/ipfs/QmY4qMLFfngaBTCXoE6fcGSYBrs3q8bKVTgEpkFfL43F8Y\"]},\"src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol\":{\"keccak256\":\"0xb21d764010845c562d1554168cf103b332755764107f6510eeddc1f03c82bc33\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cbd0a15ebd973a1ad8122f78b6b5dc14f980e803773b6541220ce43a3cf8b4f8\",\"dweb:/ipfs/QmXNyjv68auW56WDchsyPMMekFr3nLsDvWWRXCTKxSoFkb\"]},\"src/interfaces/IQuorum.sol\":{\"keccak256\":\"0x6b7920b04a73a0e1ff7404aa1a3b5fc738fc0b6154839480f666fd69b55123f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a8c81134e4632e1240aead39fd5393b376a4be53668caf2a390f511f3c6d422d\",\"dweb:/ipfs/QmWPaQPP1WkpdPjLhK7wFXsih8HWs6kRQqjX5zGLu6McGH\"]},\"src/interfaces/bridge/IBridgeManager.sol\":{\"keccak256\":\"0x9339ce2f14bc1e4d0e368a351506ff5735bcbc0a2e41aa633149198bbed76a60\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c234bc4f4faa82434fcfeab5b50af61b7027a75f3f773b70b542860d10607574\",\"dweb:/ipfs/QmYPcxU5UMEEoxQphF8KA6P7jCRuGAXRjvoiu3McYfuxER\"]},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"keccak256\":\"0xfd6868a1041577a463b6c96713edcb18063dc817154d09710abfd5783e4629ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://acaccf9b0280ec924dfdd641d122da9c0d6944c6bcf55019682ab5f7a925ab32\",\"dweb:/ipfs/QmR4ta1PNirxkJEiSqJVfEo9CRxQjvdfKZMGzf84nekZos\"]},\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\":{\"keccak256\":\"0xadbcf65ee9d55f4aa037216d71a279fe41855fe572a4a8734e6f69954aea98f4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db7b04d27323d7c0de57def768f65c448022c500f475985b555a53ae5b0c8249\",\"dweb:/ipfs/QmNq4UJripZ7rWJqrccBU7Yq3raJvuNTqqMQkn73DrQSYp\"]},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c34d339fa8e240c62ea8da11b4fe8745fbe5b6091dbcd40505160ae952f33e16\",\"dweb:/ipfs/QmR6CBz9VAvCSTR7uS3R4yocptsHPz3aodqdDEwSc2xZaE\"]},\"src/interfaces/collections/IHasContracts.sol\":{\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://03390ff29b496e244faf4eab55565712f0aea5fecdcb915e3c5866ef29d5686d\",\"dweb:/ipfs/QmdGpXn3VSxfNvjFBxfho7rc41JTq5m6bonrfmpzShhRVs\"]},\"src/interfaces/consumers/ChainTypeConsumer.sol\":{\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://178ba522d7a09f458f3d6f9b9f3acf2c588304c72b1b0ede593990903a750967\",\"dweb:/ipfs/QmTXgtbHY3s8NH1VZZNnojgRJ8YEa1kVYTQUxVPb9dqNBD\"]},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba168a64188bbbecbac288295bd9d5ce6dc215f876b144271428a6f91cba792a\",\"dweb:/ipfs/QmX3bM7QUo2xHxsXetU9RtXG11sKktvrdGovSJfxPEy5QN\"]},\"src/interfaces/consumers/VoteStatusConsumer.sol\":{\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f183bc758fb7940f123cb2ea15053d1da707cbeb2e3938542673aab624411e5\",\"dweb:/ipfs/QmfCDeKmeMnTX75odzbKTvY7GekebXwNEbXr7beSNYYKrT\"]},\"src/libraries/AddressArrayUtils.sol\":{\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://3a413f290b8e81540bc6feb739bcfbacf56419b2e657bbce5be43826569b4406\",\"dweb:/ipfs/QmWRjGLBXs7WK92oPm51QpjxMYGuMTBx85Pv7QcGbUZE72\"]},\"src/libraries/Ballot.sol\":{\"keccak256\":\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://63338c46e5de170c10778edc9027c803a9e1a351dc90b675aad399136352c31a\",\"dweb:/ipfs/QmbnADhMhgWtVTpcTiBHYwxxym3NqQi6sEcvDyfbopNwyb\"]},\"src/libraries/GlobalProposal.sol\":{\"keccak256\":\"0x2716e1baf467abab71d89efa01ce0dc9164531ab4221d2758233a81b6d906474\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8178e89a15d5afd8abee8cc8d33321dad28f3a28d1684c15e861b8a6294d9ca1\",\"dweb:/ipfs/QmfHoZtWeU4mVw4k7wKVPsKp3Gx5YAUx6yj3oNHRpZEeDt\"]},\"src/libraries/Proposal.sol\":{\"keccak256\":\"0xbc29aa4e69db7eef0034fdb795181124f86bcf2bc07b5e4a202100dbdce7f7a1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://18f09131ea8d57d43a8fdb470c74ccaec1204c7120f15229b616c1e3acba1770\",\"dweb:/ipfs/Qmc3qJgPhoJeKVUEtHwjofnX3r3ndceDsxm82r1hcgzfyd\"]},\"src/mainchain/MainchainBridgeManager.sol\":{\"keccak256\":\"0xb365eb9fefd1c284a86aa97f0bd0d7eb5406d09c87832d1048b2c18d6c08d48a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3a10046c0d4ed56a61f9e4139c7de2b697f67eb51155945508e33a4255dcee33\",\"dweb:/ipfs/Qmen2Wwj8pM6XYdKGAAiJKQ8JZ5JiWRnbHdUmnSBoXSBJY\"]},\"src/types/Types.sol\":{\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://edd3ba3207e3891e18a7287453e2f260c13eb0f0f1998aad8f37479041e9872a\",\"dweb:/ipfs/QmS2AHHdKzp9Z2Y1tgA4v9DFBDF9i4M8oyBVGryYA9ftJQ\"]},\"src/types/operations/LibTUint256Slot.sol\":{\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2fc230e404242474f7433259c92641b34a387b5cfed7690ec495fa87271734c6\",\"dweb:/ipfs/Qme3tC8svJqFBeWHdXgsvbp1DtPycighFXVT4yUBmEcjJg\"]},\"src/utils/CommonErrors.sol\":{\"keccak256\":\"0x22942c8fea2d1ca863ac1f9c1662d714b8ac0856684e36f8aaf19508648c1053\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7e47ff198edb68a65d65938c67f860c041a4b7f64cff5b101a333869096044b\",\"dweb:/ipfs/QmTFwEY7jPiUSKc3GvYDY7qHqXJzUYCmSjoVrcgFhi8gZz\"]},\"src/utils/ContractType.sol\":{\"keccak256\":\"0x7f547a44265f4c4b03d8971f7fc5eaa2e6064ea8cd509c1b761108f9800dab68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://130e3f8353d9f34098fbf2867c3bf812a5184904d0113d55c5c820eb64f2547b\",\"dweb:/ipfs/QmeFSUbPi8fyG1W7kKegFRtCqALjQBXQyVvQ4sjpi6SWH3\"]},\"src/utils/IdentityGuard.sol\":{\"keccak256\":\"0x2d0dfcef3636945bc1785c1fa5a05f5203c79cbb81b2eee92a3ac6a2378c2ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5e4cedc10e50bfaacdc732eab78768b5e0abbc8336eeaffa15de2a7be90de504\",\"dweb:/ipfs/QmR17AgM71NkH5ZeLpmaRMzPyXAKyhafoK2TZUnLw2z3Mv\"]},\"src/utils/RoleAccess.sol\":{\"keccak256\":\"0x7da4631824b53be17e246102ad59458f91f2395710561ac9bface18d35fb2502\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://070d8254ea4d6fde54ae02e121bb84bdb63a3c5a8513d2d364ad5038f6a95493\",\"dweb:/ipfs/QmfXpp3t8XcGFXewoVRmoQMKJb9vPo95Kj4vsGfNBf7gSH\"]}},\"version\":1}", + "nonce": 4, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 135934, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "round", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 135942, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "vote", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)135872_storage))" + }, + { + "astId": 135944, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_proposalExpiryDuration", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 136681, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_targetOptionsMap", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_enum(TargetOption)140705,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32", + "base": "t_address" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(TargetOption)140705": { + "encoding": "inplace", + "label": "enum GlobalProposal.TargetOption", + "numberOfBytes": "1" + }, + "t_enum(VoteStatus)139658": { + "encoding": "inplace", + "label": "enum VoteStatusConsumer.VoteStatus", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(Signature)139649_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SignatureConsumer.Signature)", + "numberOfBytes": "32", + "value": "t_struct(Signature)139649_storage" + }, + "t_mapping(t_enum(TargetOption)140705,t_address)": { + "encoding": "mapping", + "key": "t_enum(TargetOption)140705", + "label": "mapping(enum GlobalProposal.TargetOption => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)135872_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(ProposalVote)135872_storage)" + }, + "t_mapping(t_uint256,t_struct(ProposalVote)135872_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVote)135872_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(ProposalVote)135872_storage": { + "encoding": "inplace", + "label": "struct CoreGovernance.ProposalVote", + "numberOfBytes": "288", + "members": [ + { + "astId": 135848, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(VoteStatus)139658" + }, + { + "astId": 135850, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "hash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 135852, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "againstVoteWeight", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 135854, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "forVoteWeight", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 135857, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "forVoteds", + "offset": 0, + "slot": "4", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 135860, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "againstVoteds", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 135862, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "expiryTimestamp", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 135867, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "sig", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Signature)139649_storage)" + }, + { + "astId": 135871, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "voted", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ] + }, + "t_struct(Signature)139649_storage": { + "encoding": "inplace", + "label": "struct SignatureConsumer.Signature", + "numberOfBytes": "96", + "members": [ + { + "astId": 139644, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "v", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 139646, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "r", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 139648, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "s", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "round(uint256)": { + "notice": "chain id = 0 for global proposal" + }, + "updateBridgeOperator(address)": { + "notice": "This method checks authorization by querying the corresponding operator of the msg.sender and then attempts to remove it from the `_bridgeOperatorSet` for gas optimization. In case we allow a governor can leave their operator address blank null `address(0)`, consider add authorization check." + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/MainchainGatewayV3Logic.json b/deployments/sepolia/MainchainGatewayV3Logic.json new file mode 100644 index 00000000..a805d2f1 --- /dev/null +++ b/deployments/sepolia/MainchainGatewayV3Logic.json @@ -0,0 +1,2928 @@ +{ + "abi": [ + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "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": "WITHDRAWAL_UNLOCKER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "_MAX_PERCENTAGE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "checkHighTierVoteWeightThreshold", + "inputs": [ + { + "name": "_voteWeight", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "checkThreshold", + "inputs": [ + { + "name": "_voteWeight", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "dailyWithdrawalLimit", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "depositCount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "emergencyPauser", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ], + "outputs": [ + { + "name": "contract_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getHighTierVoteWeightThreshold", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "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": "getRoninToken", + "inputs": [ + { + "name": "_mainchainToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "_token", + "type": "tuple", + "internalType": "struct MappedTokenConsumer.MappedToken", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThreshold", + "inputs": [], + "outputs": [ + { + "name": "num_", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom_", + "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": "highTierThreshold", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_roleSetter", + "type": "address", + "internalType": "address" + }, + { + "name": "_wrappedToken", + "type": "address", + "internalType": "contract IWETH" + }, + { + "name": "_roninChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_numerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_highTierVWNumerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_denominator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_addresses", + "type": "address[][3]", + "internalType": "address[][3]" + }, + { + "name": "_thresholds", + "type": "uint256[][4]", + "internalType": "uint256[][4]" + }, + { + "name": "_standards", + "type": "uint8[]", + "internalType": "enum Token.Standard[]" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "initializeV2", + "inputs": [ + { + "name": "bridgeManagerContract", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "lastDateSynced", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "lastSyncedWithdrawal", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "lockedThreshold", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mapTokens", + "inputs": [ + { + "name": "_mainchainTokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_roninTokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_standards", + "type": "uint8[]", + "internalType": "enum Token.Standard[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mapTokensAndThresholds", + "inputs": [ + { + "name": "_mainchainTokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_roninTokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_standards", + "type": "uint8[]", + "internalType": "enum Token.Standard[]" + }, + { + "name": "_thresholds", + "type": "uint256[][4]", + "internalType": "uint256[][4]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "minimumVoteWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonce", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "reachedWithdrawalLimit", + "inputs": [ + { + "name": "_token", + "type": "address", + "internalType": "address" + }, + { + "name": "_quantity", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "receiveEther", + "inputs": [], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "requestDepositFor", + "inputs": [ + { + "name": "_request", + "type": "tuple", + "internalType": "struct Transfer.Request", + "components": [ + { + "name": "recipientAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "roninChainId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setDailyWithdrawalLimits", + "inputs": [ + { + "name": "_tokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_limits", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setEmergencyPauser", + "inputs": [ + { + "name": "_addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setHighTierThresholds", + "inputs": [ + { + "name": "_tokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_thresholds", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setHighTierVoteWeightThreshold", + "inputs": [ + { + "name": "_numerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_denominator", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "_previousNum", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_previousDenom", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLockedThresholds", + "inputs": [ + { + "name": "_tokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_thresholds", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setThreshold", + "inputs": [ + { + "name": "_numerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_denominator", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "_previousNum", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_previousDenom", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setUnlockFeePercentages", + "inputs": [ + { + "name": "_tokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_percentages", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWrappedNativeTokenContract", + "inputs": [ + { + "name": "_wrappedToken", + "type": "address", + "internalType": "contract IWETH" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "submitWithdrawal", + "inputs": [ + { + "name": "_receipt", + "type": "tuple", + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + }, + { + "name": "_signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [ + { + "name": "_locked", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unlockFeePercentages", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unlockWithdrawal", + "inputs": [ + { + "name": "_receipt", + "type": "tuple", + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawalHash", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "withdrawalLocked", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "wrappedNativeToken", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IWETH" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "ContractUpdated", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DailyWithdrawalLimitsUpdated", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "limits", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DepositRequested", + "inputs": [ + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "receipt", + "type": "tuple", + "indexed": false, + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HighTierThresholdsUpdated", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "thresholds", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HighTierVoteWeightThresholdUpdated", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numerator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "previousNumerator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "previousDenominator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LockedThresholdsUpdated", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "thresholds", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "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": "ThresholdUpdated", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numerator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "previousNumerator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "previousDenominator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMapped", + "inputs": [ + { + "name": "mainchainTokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "roninTokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "standards", + "type": "uint8[]", + "indexed": false, + "internalType": "enum Token.Standard[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UnlockFeePercentagesUpdated", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "percentages", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WithdrawalLocked", + "inputs": [ + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "receipt", + "type": "tuple", + "indexed": false, + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WithdrawalUnlocked", + "inputs": [ + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "receipt", + "type": "tuple", + "indexed": false, + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Withdrew", + "inputs": [ + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "receipt", + "type": "tuple", + "indexed": false, + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct Token.Owner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WrappedNativeTokenContractUpdated", + "inputs": [ + { + "name": "weth", + "type": "address", + "indexed": false, + "internalType": "contract IWETH" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrContractTypeNotFound", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ] + }, + { + "type": "error", + "name": "ErrERC20MintingFailed", + "inputs": [] + }, + { + "type": "error", + "name": "ErrERC721MintingFailed", + "inputs": [] + }, + { + "type": "error", + "name": "ErrEmptyArray", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidChainId", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidInfo", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidOrder", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidPercentage", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidReceipt", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidReceiptKind", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidRequest", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidThreshold", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidTokenStandard", + "inputs": [] + }, + { + "type": "error", + "name": "ErrLengthMismatch", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrQueryForApprovedWithdrawal", + "inputs": [] + }, + { + "type": "error", + "name": "ErrQueryForInsufficientVoteWeight", + "inputs": [] + }, + { + "type": "error", + "name": "ErrQueryForProcessedWithdrawal", + "inputs": [] + }, + { + "type": "error", + "name": "ErrReachedDailyWithdrawalLimit", + "inputs": [] + }, + { + "type": "error", + "name": "ErrTokenCouldNotTransfer", + "inputs": [ + { + "name": "tokenInfo", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrTokenCouldNotTransferFrom", + "inputs": [ + { + "name": "tokenInfo", + "type": "tuple", + "internalType": "struct Token.Info", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum Token.Standard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrUnauthorized", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedStandard", + "inputs": [] + }, + { + "type": "error", + "name": "ErrUnsupportedToken", + "inputs": [] + }, + { + "type": "error", + "name": "ErrZeroCodeContract", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "address": "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "args": "0x", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x608060405234801561001057600080fd5b506000805460ff1916905561470d8061002a6000396000f3fe60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614007565b90501115610f1d57610e85610e718680614007565b610e7e6020890189614007565b8787611a1f565b610eab610e928680614007565b8660005b602002810190610ea69190614007565b6123a2565b610ed1610eb88680614007565b8660015b602002810190610ecc9190614007565b61194a565b610ef7610ede8680614007565b8660025b602002810190610ef29190614007565b612477565b610f1d610f048680614007565b8660035b602002810190610f189190614007565b612588565b60005b610f2d6040870187614007565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614007565b84818110610f7757610f77613ff1565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d6110983685900385018561409f565b612843565b90506110b16110983685900385018561409f565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b9083908690614173565b60405180910390a160006111756080850160608601613a7f565b9050600061118b61012086016101008701614200565b600181111561119c5761119c613d3c565b036112635760006111b6368690038601610100870161421d565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc368790038701610100880161421d565b60408301519091506112139061014088013561424f565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a0161421d565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d0929190614173565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f9190614262565b60385461138c9084614262565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e69190614262565b60025461138c9084614262565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b369190614279565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b607680546000918261184983614293565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142ce565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b838110156119e95782828281811061199557611995613ff1565b90506020020135603a60008787858181106119b2576119b2613ff1565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d094939291906143f8565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b85811015611b7c57848482818110611a7557611a75613ff1565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa0613ff1565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd613ff1565b9050602002016020810190611b129190614200565b60786000898985818110611b2857611b28613ff1565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c368890038801610100890161421d565b612c6d565b6001611db36040880160208901614200565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d61012088016101008901614200565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a01614200565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a61409f565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d01614200565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca613ff1565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b36919061439a565b84935061208685613229565b61209090836144be565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d90614173565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611297919061421d565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be929190614173565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b6002546037546123659190614262565b6038546001546123759190614262565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612441578282828181106123ed576123ed613ff1565b905060200201356039600087878581811061240a5761240a613ff1565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d094939291906143f8565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b8381101561255257620f42408383838181106124c6576124c6613ff1565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe613ff1565b90506020020135603b600087878581811061251b5761251b613ff1565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d094939291906143f8565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612627578282828181106125d3576125d3613ff1565b90506020020135603c60008787858181106125f0576125f0613ff1565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d094939291906143f8565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144d1565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144be565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101291906144f3565b60006002546001600254846001546127a69190614262565b6127b091906144be565b6127ba919061424f565b610a7691906144d1565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d8385614262565b610ff991906144d1565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b91906144f3565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061424f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add9190614530565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd9190614530565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d699190614530565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd6919061454c565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b9190614530565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b36949392919061456e565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145a4565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614619565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a1919061464c565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144d1565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144be565b9091555050505050565b600082600001828154811061335c5761335c613ff1565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b369392919061467a565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009286169161349391614530565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef836002614262565b6134fa9060026144be565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b8160008151811061355757613557613ff1565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061358657613586613ff1565b60200101906001600160f81b031916908160001a90535060006135aa846002614262565b6135b59060016144be565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e9613ff1565b1a60f81b8282815181106135ff576135ff613ff1565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146aa565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361424f565b85549091506000906137039060019061424f565b905081811461376857600086600001828154811061372357613723613ff1565b906000526020600020015490508087600001848154811061374657613746613ff1565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146c1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a69190614262565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916138339190614530565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a0919061454c565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b613fc1613ecb565b823560ff81168114613fd257600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261401e57600080fd5b83018035915067ffffffffffffffff82111561403957600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561406357600080fd5b61406b613ecb565b9050813561407881613a5f565b8152602082013561408881613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140b257600080fd5b60405160a0810181811067ffffffffffffffff821117156140e357634e487b7160e01b600052604160045260246000fd5b6040528235815260208301356140f881613f02565b602082015261410a8460408501614051565b604082015261411c8460a08501614051565b606082015261412f846101008501613f0f565b60808201529392505050565b803561414681613a5f565b6001600160a01b03908116835260208201359061416282613a5f565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561419481613f02565b61419d81613d52565b806040840152506141b4606083016040850161413b565b6141c460c0830160a0850161413b565b6101206101008401356141d681613f02565b6141df81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561421257600080fd5b8135610ff981613f02565b60006060828403121561422f57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614239565b8082028115828204841417610a7657610a76614239565b602081016010831061428d5761428d613d3c565b91905290565b6000600182016142a5576142a5614239565b5060010190565b80516142b781613d52565b825260208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516142ef81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143646101208401826142ac565b509392505050565b6001600160e01b03198316815260408101600b831061438d5761438d613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156143ed5781356143d281613a5f565b6001600160a01b0316875295820195908201906001016143bf565b509495945050505050565b60408152600061440c6040830186886143af565b82810360208401528381526001600160fb1b0384111561442b57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061445860608301888a6143af565b6020838203602085015261446d82888a6143af565b848103604086015285815286925060200160005b868110156144af57833561449481613f02565b61449d81613d52565b82529282019290820190600101614481565b509a9950505050505050505050565b80820180821115610a7657610a76614239565b6000826144ee57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561450557600080fd5b5051919050565b60005b8381101561452757818101518382015260200161450f565b50506000910152565b6000825161454281846020870161450c565b9190910192915050565b60006020828403121561455e57600080fd5b81518015158114610ff957600080fd5b60c0810161457c82876142ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516145dc81601785016020880161450c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161460d81602884016020880161450c565b01602801949350505050565b602081526000825180602084015261463881604085016020870161450c565b601f01601f19169190910160400192915050565b60006020828403121561465e57600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a0810161468882866142ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146b9576146b9614239565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec8cc7f89d632f5b6c36d2cdb75ab664383134c4e4a6f2157e2624267b4eadfe64736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MainchainGatewayV3.sol", + "deployedBytecode": "0x60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614007565b90501115610f1d57610e85610e718680614007565b610e7e6020890189614007565b8787611a1f565b610eab610e928680614007565b8660005b602002810190610ea69190614007565b6123a2565b610ed1610eb88680614007565b8660015b602002810190610ecc9190614007565b61194a565b610ef7610ede8680614007565b8660025b602002810190610ef29190614007565b612477565b610f1d610f048680614007565b8660035b602002810190610f189190614007565b612588565b60005b610f2d6040870187614007565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614007565b84818110610f7757610f77613ff1565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d6110983685900385018561409f565b612843565b90506110b16110983685900385018561409f565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b9083908690614173565b60405180910390a160006111756080850160608601613a7f565b9050600061118b61012086016101008701614200565b600181111561119c5761119c613d3c565b036112635760006111b6368690038601610100870161421d565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc368790038701610100880161421d565b60408301519091506112139061014088013561424f565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a0161421d565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d0929190614173565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f9190614262565b60385461138c9084614262565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e69190614262565b60025461138c9084614262565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b369190614279565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b607680546000918261184983614293565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142ce565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b838110156119e95782828281811061199557611995613ff1565b90506020020135603a60008787858181106119b2576119b2613ff1565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d094939291906143f8565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b85811015611b7c57848482818110611a7557611a75613ff1565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa0613ff1565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd613ff1565b9050602002016020810190611b129190614200565b60786000898985818110611b2857611b28613ff1565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c368890038801610100890161421d565b612c6d565b6001611db36040880160208901614200565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d61012088016101008901614200565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a01614200565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a61409f565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d01614200565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca613ff1565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b36919061439a565b84935061208685613229565b61209090836144be565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d90614173565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611297919061421d565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be929190614173565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b6002546037546123659190614262565b6038546001546123759190614262565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612441578282828181106123ed576123ed613ff1565b905060200201356039600087878581811061240a5761240a613ff1565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d094939291906143f8565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b8381101561255257620f42408383838181106124c6576124c6613ff1565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe613ff1565b90506020020135603b600087878581811061251b5761251b613ff1565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d094939291906143f8565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612627578282828181106125d3576125d3613ff1565b90506020020135603c60008787858181106125f0576125f0613ff1565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d094939291906143f8565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144d1565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144be565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101291906144f3565b60006002546001600254846001546127a69190614262565b6127b091906144be565b6127ba919061424f565b610a7691906144d1565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d8385614262565b610ff991906144d1565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b91906144f3565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061424f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add9190614530565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd9190614530565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d699190614530565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd6919061454c565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b9190614530565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b36949392919061456e565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145a4565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614619565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a1919061464c565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144d1565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144be565b9091555050505050565b600082600001828154811061335c5761335c613ff1565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b369392919061467a565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009286169161349391614530565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef836002614262565b6134fa9060026144be565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b8160008151811061355757613557613ff1565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061358657613586613ff1565b60200101906001600160f81b031916908160001a90535060006135aa846002614262565b6135b59060016144be565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e9613ff1565b1a60f81b8282815181106135ff576135ff613ff1565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146aa565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361424f565b85549091506000906137039060019061424f565b905081811461376857600086600001828154811061372357613723613ff1565b906000526020600020015490508087600001848154811061374657613746613ff1565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146c1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a69190614262565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916138339190614530565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a0919061454c565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b613fc1613ecb565b823560ff81168114613fd257600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261401e57600080fd5b83018035915067ffffffffffffffff82111561403957600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561406357600080fd5b61406b613ecb565b9050813561407881613a5f565b8152602082013561408881613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140b257600080fd5b60405160a0810181811067ffffffffffffffff821117156140e357634e487b7160e01b600052604160045260246000fd5b6040528235815260208301356140f881613f02565b602082015261410a8460408501614051565b604082015261411c8460a08501614051565b606082015261412f846101008501613f0f565b60808201529392505050565b803561414681613a5f565b6001600160a01b03908116835260208201359061416282613a5f565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561419481613f02565b61419d81613d52565b806040840152506141b4606083016040850161413b565b6141c460c0830160a0850161413b565b6101206101008401356141d681613f02565b6141df81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561421257600080fd5b8135610ff981613f02565b60006060828403121561422f57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614239565b8082028115828204841417610a7657610a76614239565b602081016010831061428d5761428d613d3c565b91905290565b6000600182016142a5576142a5614239565b5060010190565b80516142b781613d52565b825260208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516142ef81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143646101208401826142ac565b509392505050565b6001600160e01b03198316815260408101600b831061438d5761438d613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156143ed5781356143d281613a5f565b6001600160a01b0316875295820195908201906001016143bf565b509495945050505050565b60408152600061440c6040830186886143af565b82810360208401528381526001600160fb1b0384111561442b57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061445860608301888a6143af565b6020838203602085015261446d82888a6143af565b848103604086015285815286925060200160005b868110156144af57833561449481613f02565b61449d81613d52565b82529282019290820190600101614481565b509a9950505050505050505050565b80820180821115610a7657610a76614239565b6000826144ee57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561450557600080fd5b5051919050565b60005b8381101561452757818101518382015260200161450f565b50506000910152565b6000825161454281846020870161450c565b9190910192915050565b60006020828403121561455e57600080fd5b81518015158114610ff957600080fd5b60c0810161457c82876142ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516145dc81601785016020880161450c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161460d81602884016020880161450c565b01602801949350505050565b602081526000825180602084015261463881604085016020870161450c565b601f01601f19169190910160400192915050565b60006020828403121561465e57600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a0810161468882866142ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146b9576146b9614239565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec8cc7f89d632f5b6c36d2cdb75ab664383134c4e4a6f2157e2624267b4eadfe64736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "Returns the domain seperator." + }, + "checkHighTierVoteWeightThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the high-tier vote weight threshold." + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getHighTierVoteWeightThreshold()": { + "details": "Returns the high-tier vote weight threshold." + }, + "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." + }, + "getRoninToken(address)": { + "details": "Returns token address on Ronin network. Note: Reverts for unsupported token." + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "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. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])": { + "details": "Initializes contract storage." + }, + "mapTokens(address[],address[],uint8[])": { + "details": "Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." + }, + "mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])": { + "details": "Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "pause()": { + "details": "Triggers paused state." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "reachedWithdrawalLimit(address,uint256)": { + "details": "Checks whether the withdrawal reaches the limitation." + }, + "receiveEther()": { + "details": "Receives ether without doing anything. Use this function to topup native token." + }, + "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "requestDepositFor((address,address,(uint8,uint256,uint256)))": { + "details": "Locks the assets and request deposit." + }, + "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. May emit a {RoleRevoked} event." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setDailyWithdrawalLimits(address[],uint256[])": { + "details": "Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event." + }, + "setEmergencyPauser(address)": { + "details": "Grant emergency pauser role for `_addr`." + }, + "setHighTierThresholds(address[],uint256[])": { + "details": "Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event." + }, + "setHighTierVoteWeightThreshold(uint256,uint256)": { + "details": "Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event." + }, + "setLockedThresholds(address[],uint256[])": { + "details": "Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event." + }, + "setThreshold(uint256,uint256)": { + "details": "Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold." + }, + "setUnlockFeePercentages(address[],uint256[])": { + "details": "Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event." + }, + "setWrappedNativeTokenContract(address)": { + "details": "Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event." + }, + "submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])": { + "details": "Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released." + }, + "unpause()": { + "details": "Triggers unpaused state." + } + }, + "events": { + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "DailyWithdrawalLimitsUpdated(address[],uint256[])": { + "details": "Emitted when the daily limit thresholds are updated" + }, + "DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the deposit is requested" + }, + "HighTierThresholdsUpdated(address[],uint256[])": { + "details": "Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated" + }, + "HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the high-tier vote weight threshold is updated" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "LockedThresholdsUpdated(address[],uint256[])": { + "details": "Emitted when the thresholds for locked withdrawals are updated" + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + }, + "TokenMapped(address[],address[],uint8[])": { + "details": "Emitted when the tokens are mapped" + }, + "UnlockFeePercentagesUpdated(address[],uint256[])": { + "details": "Emitted when the fee percentages to unlock withdraw are updated" + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + }, + "WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the withdrawal is locked" + }, + "WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the withdrawal is unlocked" + }, + "Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the assets are withdrawn" + }, + "WrappedNativeTokenContractUpdated(address)": { + "details": "Emitted when the wrapped native token contract is updated" + } + }, + "errors": { + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrERC20MintingFailed()": [ + { + "details": "Error indicating that the minting of ERC20 tokens has failed." + } + ], + "ErrERC721MintingFailed()": [ + { + "details": "Error indicating that the minting of ERC721 tokens has failed." + } + ], + "ErrEmptyArray()": [ + { + "details": "Error indicating that an array is empty when it should contain elements." + } + ], + "ErrInvalidChainId(bytes4,uint256,uint256)": [ + { + "details": "Error indicating that the chain ID is invalid.", + "params": { + "actual": "Current chain ID that executing function.", + "expected": "Expected chain ID required for the tx to success.", + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." + } + } + ], + "ErrInvalidInfo()": [ + { + "details": "Error indicating that the provided information is invalid." + } + ], + "ErrInvalidOrder(bytes4)": [ + { + "details": "Error indicating that an order is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." + } + } + ], + "ErrInvalidPercentage()": [ + { + "details": "Error of invalid percentage." + } + ], + "ErrInvalidReceipt()": [ + { + "details": "Error indicating that a receipt is invalid." + } + ], + "ErrInvalidReceiptKind()": [ + { + "details": "Error indicating that a receipt kind is invalid." + } + ], + "ErrInvalidRequest()": [ + { + "details": "Error indicating that a request is invalid." + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidTokenStandard()": [ + { + "details": "Error indicating that a token standard is invalid." + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrQueryForApprovedWithdrawal()": [ + { + "details": "Error indicating that a query was made for an approved withdrawal." + } + ], + "ErrQueryForInsufficientVoteWeight()": [ + { + "details": "Error indicating that a query was made for insufficient vote weight." + } + ], + "ErrQueryForProcessedWithdrawal()": [ + { + "details": "Error indicating that a query was made for a processed withdrawal." + } + ], + "ErrReachedDailyWithdrawalLimit()": [ + { + "details": "Error indicating that the daily withdrawal limit has been reached." + } + ], + "ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)": [ + { + "details": "Error indicating that the `transfer` has failed.", + "params": { + "to": "Receiver of the token value.", + "token": "Address of the token.", + "tokenInfo": "Info of the token including ERC standard, id or quantity." + } + } + ], + "ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)": [ + { + "details": "Error indicating that the `transferFrom` has failed.", + "params": { + "from": "Owner of the token value.", + "to": "Receiver of the token value.", + "token": "Address of the token.", + "tokenInfo": "Info of the token including ERC standard, id or quantity." + } + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedStandard()": [ + { + "details": "Error indicating that an unsupported standard is encountered." + } + ], + "ErrUnsupportedToken()": [ + { + "details": "Error indicating that a token is not supported." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForApprovedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForInsufficientVoteWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForProcessedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrReachedDailyWithdrawalLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum Token.Standard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"_mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"_token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidPercentage()\":[{\"details\":\"Error of invalid percentage.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForApprovedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for an approved withdrawal.\"}],\"ErrQueryForInsufficientVoteWeight()\":[{\"details\":\"Error indicating that a query was made for insufficient vote weight.\"}],\"ErrQueryForProcessedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for a processed withdrawal.\"}],\"ErrReachedDailyWithdrawalLimit()\":[{\"details\":\"Error indicating that the daily withdrawal limit has been reached.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `transferFrom` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"DailyWithdrawalLimitsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the daily limit thresholds are updated\"},\"DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the deposit is requested\"},\"HighTierThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\"},\"HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the high-tier vote weight threshold is updated\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LockedThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for locked withdrawals are updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"TokenMapped(address[],address[],uint8[])\":{\"details\":\"Emitted when the tokens are mapped\"},\"UnlockFeePercentagesUpdated(address[],uint256[])\":{\"details\":\"Emitted when the fee percentages to unlock withdraw are updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is locked\"},\"WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is unlocked\"},\"Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are withdrawn\"},\"WrappedNativeTokenContractUpdated(address)\":{\"details\":\"Emitted when the wrapped native token contract is updated\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"______deprecatedBridgeOperatorAddedBlock\":{\"custom:deprecated\":\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\"},\"______deprecatedBridgeOperators\":{\"custom:deprecated\":\"Previously `_bridgeOperators` (uint256[])\"},\"_domainSeparator\":{\"details\":\"Domain seperator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainGatewayV3.sol\":\"MainchainGatewayV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba8eb2d22f9321bd4660f6617c181d9611ff30a9b089408b8c6e2216d6d5cdc5\",\"dweb:/ipfs/QmTSJvhjHfnUV1j4hsqDv8PmLvGBLRs9gHLjTUXrUJ5Y9q\"]},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7ee05f28f549a5d6515e152580716b87636ed4bfab9812499a6e3803df88288b\",\"dweb:/ipfs/QmeEnhdwY1t5Y3YU5a4ffzgXuToydH2PNdNxV9W7dEPRQJ\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3dcc7b09bfa6e18aab262ca372f4a9b1fc82e294b430706a4e1378cf58e6a276\",\"dweb:/ipfs/QmT8oSAcesdctR15HMLhr2a1HRpXymxdjTfdtfTYJcj2N2\"]},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://383fb7b8181016ac5ccf07bc9cdb7c1b5045ea36e2cc4df52bcbf20396fc7688\",\"dweb:/ipfs/QmYJ7Cg4WmE3rR8KGQxjUCXFfTH6TcwZ2Z1f6tPrq7jHFr\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://96b6d77a20bebd4eb06b801d3d020c7e82be13bd535cb0d0a6b7181c51dab5d5\",\"dweb:/ipfs/QmPUR9Cv9jNFdQX6PtBfaBW1ZCnKwiu65R2VD5kbdanDyn\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://89c2a0f70157c13845be5cb49b078a6374fee3a78fa950052a3af26190255da8\",\"dweb:/ipfs/QmUcvMEQH1oMM2pUyMuDiBUKdvvnTz1NRB8bmPHrVq8725\"]},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8831721b6f4cc26534d190f9f1631c3f59c9ff38efdd911f85e0882b8e360472\",\"dweb:/ipfs/QmQZnLErZNStirSQ13ZNWQgvEYUtGE5tXYwn4QUPaVUfPN\"]},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a6c4477d480bac20d681ade0e712b77ad828acf530a1d5c0abc5fb78068a05a1\",\"dweb:/ipfs/QmdBqsK8CcUceTeWzhHwFDEvKMoHimwtV96Lbim7ZBtCb8\"]},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3313a8f9bb1f9476857c9050067b31982bf2140b83d84f3bc0cec1f62bbe947f\",\"dweb:/ipfs/Qma17Pk8NRe7aB4UD3jjVxk7nSFaov3eQyv86hcyqkwJRV\"]},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ddabb16009cd17eaca3143feadf450ac13e72919ebe2ca50e00f61cb78bc004\",\"dweb:/ipfs/QmSPwPxX7d6TTWakN5jy5wsaGkS1y9TW8fuhGSraMkLk2B\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://20a97f891d06f0fe91560ea1a142aaa26fdd22bed1b51606b7d48f670deeb50f\",\"dweb:/ipfs/QmTbCtZKChpaX5H2iRiTDMcSz29GSLCpTCDgJpcMR4wg8x\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://39e096c60a6eb1c6a257122d515496bd92d0c6a693a8f07acb6aa4b1263e95d4\",\"dweb:/ipfs/QmPs5trJBacCiSkezP6tpevapuRYWNY6mqSFzsMCJj7e6B\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bf52bdf22a33263f5ca6227a35faeac3b81e7d2c692fbcc6a079d488710c5900\",\"dweb:/ipfs/QmcmsjkP4yq3UhiJbvyzwufaY2EKh1zhHaRK8ATag2cpD2\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d4831d777a29ebdf9f2caecd70e74b97bff1b70e53622fd0a02aed01e21c8271\",\"dweb:/ipfs/QmUqurVVnCc7XkMxb2k23TVQUtuhHZduJ3hTZarTJrqU24\"]},\"src/extensions/GatewayV3.sol\":{\"keccak256\":\"0xfcb8d4fa4358387c477a40da4d8a5108c298f23333c4161ce939c1b27a09ffde\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c29d478e6cc8a5a36a6986ba2a8bd39cea69c9171488cf0a8f8043fd5c3622a\",\"dweb:/ipfs/QmXUn3Y2AXDca9VAGzvWoYK6kV9NMXJ7Dh4DMf1LUPJgGn\"]},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://370c93bc1e962fcf8eab41d217d901716769f05c51a2cb25aae12abc84e871da\",\"dweb:/ipfs/QmQYL5QrJmXCdi5UN9K7imt1iPm9ydZQm6ifShpt451afd\"]},\"src/extensions/WithdrawalLimitation.sol\":{\"keccak256\":\"0xb574848e6c3fa2ceeb7f5e907bc76dc096ef577315dbf78452f9640bd92d8a32\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0bf1b3bd2046f7b5faa55da45b80ab972135d931b31c5a54c66415707089bbc6\",\"dweb:/ipfs/QmRDLTzXTG2UnSv8zqLfiPak3Ayx8U256Thytr8NKaNiC8\"]},\"src/extensions/collections/HasContracts.sol\":{\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b8903232a7a609b250a1ff2e9522a2366979652145af74637f9c0089916e3da3\",\"dweb:/ipfs/QmVoxZamJEhjYhr9RKVSAKGzakgqmFLfZXhZcDGor7DZe5\"]},\"src/extensions/collections/HasProxyAdmin.sol\":{\"keccak256\":\"0x0916021d04ea0c93c54978dc2fd46575fd2bd867369fbf9ce49f316939ddaf25\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e220c59eb50b4e206d0a126f8cd2f7f2aa6865f56a0b4b091149e6928bf97b8\",\"dweb:/ipfs/QmRBk5hhn1w2MghZ8pRfaU1CvgRAZN7nZvxySSPDvkVuGp\"]},\"src/interfaces/IMainchainGatewayV3.sol\":{\"keccak256\":\"0xa82b8172f40ec733e5a03b019a8a7d597af284779c872c620ecc91a28af55461\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cb6989a96dea2d796752c6c8d9a54e6551b158a21c5d22702abd5d9fa715d4c4\",\"dweb:/ipfs/Qmd1mMZz7H3WtJ4ckKRjfc98opazaKhnq6WDnKD3e4U9yJ\"]},\"src/interfaces/IQuorum.sol\":{\"keccak256\":\"0x6b7920b04a73a0e1ff7404aa1a3b5fc738fc0b6154839480f666fd69b55123f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a8c81134e4632e1240aead39fd5393b376a4be53668caf2a390f511f3c6d422d\",\"dweb:/ipfs/QmWPaQPP1WkpdPjLhK7wFXsih8HWs6kRQqjX5zGLu6McGH\"]},\"src/interfaces/IWETH.sol\":{\"keccak256\":\"0x8acead2ae4364dee80c9bc76d52cc04d3763105e1743728e67d237f816155142\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c90c7fa5b39a2ca17297cd3548a2d9763c7ab1c2873d8c202c3633f7be98d7b\",\"dweb:/ipfs/QmUPRnUXTrJRR7aogvDrfgjzj9haHfcmMqksoTDxC3ZbgQ\"]},\"src/interfaces/bridge/IBridgeManager.sol\":{\"keccak256\":\"0x9339ce2f14bc1e4d0e368a351506ff5735bcbc0a2e41aa633149198bbed76a60\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c234bc4f4faa82434fcfeab5b50af61b7027a75f3f773b70b542860d10607574\",\"dweb:/ipfs/QmYPcxU5UMEEoxQphF8KA6P7jCRuGAXRjvoiu3McYfuxER\"]},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"keccak256\":\"0xfd6868a1041577a463b6c96713edcb18063dc817154d09710abfd5783e4629ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://acaccf9b0280ec924dfdd641d122da9c0d6944c6bcf55019682ab5f7a925ab32\",\"dweb:/ipfs/QmR4ta1PNirxkJEiSqJVfEo9CRxQjvdfKZMGzf84nekZos\"]},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c34d339fa8e240c62ea8da11b4fe8745fbe5b6091dbcd40505160ae952f33e16\",\"dweb:/ipfs/QmR6CBz9VAvCSTR7uS3R4yocptsHPz3aodqdDEwSc2xZaE\"]},\"src/interfaces/collections/IHasContracts.sol\":{\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://03390ff29b496e244faf4eab55565712f0aea5fecdcb915e3c5866ef29d5686d\",\"dweb:/ipfs/QmdGpXn3VSxfNvjFBxfho7rc41JTq5m6bonrfmpzShhRVs\"]},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"keccak256\":\"0xfa220e968221af9b789e6c1dc4133631e90600c4a2bd63b7f01e96cb01f13e9b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://29643ec9bc5ac71e1500bd752585bff52e58ec42da4e892a9f01e7be5bf1fbf7\",\"dweb:/ipfs/QmetcnBNnvrUVonAKawF9mS3JzeDwAsBdp4tG3kC2qwoMA\"]},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba168a64188bbbecbac288295bd9d5ce6dc215f876b144271428a6f91cba792a\",\"dweb:/ipfs/QmX3bM7QUo2xHxsXetU9RtXG11sKktvrdGovSJfxPEy5QN\"]},\"src/libraries/AddressArrayUtils.sol\":{\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://3a413f290b8e81540bc6feb739bcfbacf56419b2e657bbce5be43826569b4406\",\"dweb:/ipfs/QmWRjGLBXs7WK92oPm51QpjxMYGuMTBx85Pv7QcGbUZE72\"]},\"src/libraries/Token.sol\":{\"keccak256\":\"0x8d11e48d878ba37ea2ca7395dceaa5591bb9ba2d4e5fdac1565760456e104991\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9d5cc02a0ba8d1bb1e757321ce6b4a2a3100dfd9ba2b7d2eb1510017c80b0cb0\",\"dweb:/ipfs/QmUzXg9R4v9Er3CYeNeL3ZCouPxCe9pJP6mCmZ8RVXFHsP\"]},\"src/libraries/Transfer.sol\":{\"keccak256\":\"0xe73e11942bcae9034abc2058e9976a583e3518bdfeefa863e97cb6e51edf4522\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ccacabe19f50e8a76618eda6c8296f2f732a7c67fcbb925c8d66657f5c53703e\",\"dweb:/ipfs/QmXc6cdqnaApGPrPk34hqfzQ3aDan3rTacPezqmChgLMvd\"]},\"src/mainchain/MainchainGatewayV3.sol\":{\"keccak256\":\"0x6d9923fbf928b82fcf10506e5637fe851e87db9a6d9cbc4297c8e2d9ac1f11d5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://00dd9001904b7cc0196c7035972db0d5b38ec77e804bd8cd58b620b2cc23b153\",\"dweb:/ipfs/QmSMkGX4MRryJ3Lsf6NiuG5SZrV2L5T8DqgQFRQmLwgi8R\"]},\"src/utils/CommonErrors.sol\":{\"keccak256\":\"0x22942c8fea2d1ca863ac1f9c1662d714b8ac0856684e36f8aaf19508648c1053\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7e47ff198edb68a65d65938c67f860c041a4b7f64cff5b101a333869096044b\",\"dweb:/ipfs/QmTFwEY7jPiUSKc3GvYDY7qHqXJzUYCmSjoVrcgFhi8gZz\"]},\"src/utils/ContractType.sol\":{\"keccak256\":\"0x7f547a44265f4c4b03d8971f7fc5eaa2e6064ea8cd509c1b761108f9800dab68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://130e3f8353d9f34098fbf2867c3bf812a5184904d0113d55c5c820eb64f2547b\",\"dweb:/ipfs/QmeFSUbPi8fyG1W7kKegFRtCqALjQBXQyVvQ4sjpi6SWH3\"]},\"src/utils/IdentityGuard.sol\":{\"keccak256\":\"0x2d0dfcef3636945bc1785c1fa5a05f5203c79cbb81b2eee92a3ac6a2378c2ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5e4cedc10e50bfaacdc732eab78768b5e0abbc8336eeaffa15de2a7be90de504\",\"dweb:/ipfs/QmR17AgM71NkH5ZeLpmaRMzPyXAKyhafoK2TZUnLw2z3Mv\"]},\"src/utils/RoleAccess.sol\":{\"keccak256\":\"0x7da4631824b53be17e246102ad59458f91f2395710561ac9bface18d35fb2502\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://070d8254ea4d6fde54ae02e121bb84bdb63a3c5a8513d2d364ad5038f6a95493\",\"dweb:/ipfs/QmfXpp3t8XcGFXewoVRmoQMKJb9vPo95Kj4vsGfNBf7gSH\"]}},\"version\":1}", + "nonce": 2, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 103687, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_paused", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 132559, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_num", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 132561, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_denom", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 132563, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "______deprecated", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 132565, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "nonce", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 132567, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "emergencyPauser", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 132572, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "______gap", + "offset": 0, + "slot": "6", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 133120, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_highTierVWNum", + "offset": 0, + "slot": "55", + "type": "t_uint256" + }, + { + "astId": 133122, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_highTierVWDenom", + "offset": 0, + "slot": "56", + "type": "t_uint256" + }, + { + "astId": 133127, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "highTierThreshold", + "offset": 0, + "slot": "57", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 133132, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "lockedThreshold", + "offset": 0, + "slot": "58", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 133137, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "unlockFeePercentages", + "offset": 0, + "slot": "59", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 133142, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "dailyWithdrawalLimit", + "offset": 0, + "slot": "60", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 133147, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "lastSyncedWithdrawal", + "offset": 0, + "slot": "61", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 133152, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "lastDateSynced", + "offset": 0, + "slot": "62", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 133157, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "______gap", + "offset": 0, + "slot": "63", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 103525, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_initialized", + "offset": 0, + "slot": "113", + "type": "t_uint8" + }, + { + "astId": 103528, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_initializing", + "offset": 1, + "slot": "113", + "type": "t_bool" + }, + { + "astId": 102425, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_roles", + "offset": 0, + "slot": "114", + "type": "t_mapping(t_bytes32,t_struct(RoleData)102420_storage)" + }, + { + "astId": 102739, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_roleMembers", + "offset": 0, + "slot": "115", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)106833_storage)" + }, + { + "astId": 142559, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "wrappedNativeToken", + "offset": 0, + "slot": "116", + "type": "t_contract(IWETH)138987" + }, + { + "astId": 142562, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "roninChainId", + "offset": 0, + "slot": "117", + "type": "t_uint256" + }, + { + "astId": 142565, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "depositCount", + "offset": 0, + "slot": "118", + "type": "t_uint256" + }, + { + "astId": 142568, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_domainSeparator", + "offset": 0, + "slot": "119", + "type": "t_bytes32" + }, + { + "astId": 142574, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_roninToken", + "offset": 0, + "slot": "120", + "type": "t_mapping(t_address,t_struct(MappedToken)139639_storage)" + }, + { + "astId": 142579, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "withdrawalHash", + "offset": 0, + "slot": "121", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 142584, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "withdrawalLocked", + "offset": 0, + "slot": "122", + "type": "t_mapping(t_uint256,t_bool)" + }, + { + "astId": 142587, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "______deprecatedBridgeOperatorAddedBlock", + "offset": 0, + "slot": "123", + "type": "t_uint256" + }, + { + "astId": 142590, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "______deprecatedBridgeOperators", + "offset": 0, + "slot": "124", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32", + "base": "t_bytes32" + }, + "t_array(t_uint256)49_storage": { + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568", + "base": "t_uint256" + }, + "t_array(t_uint256)50_storage": { + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600", + "base": "t_uint256" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IWETH)138987": { + "encoding": "inplace", + "label": "contract IWETH", + "numberOfBytes": "20" + }, + "t_enum(Standard)141582": { + "encoding": "inplace", + "label": "enum Token.Standard", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(MappedToken)139639_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct MappedTokenConsumer.MappedToken)", + "numberOfBytes": "32", + "value": "t_struct(MappedToken)139639_storage" + }, + "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_struct(AddressSet)106833_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)106833_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)102420_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)102420_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_bool)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_struct(AddressSet)106833_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.AddressSet", + "numberOfBytes": "64", + "members": [ + { + "astId": 106832, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)106532_storage" + } + ] + }, + "t_struct(MappedToken)139639_storage": { + "encoding": "inplace", + "label": "struct MappedTokenConsumer.MappedToken", + "numberOfBytes": "32", + "members": [ + { + "astId": 139636, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "erc", + "offset": 0, + "slot": "0", + "type": "t_enum(Standard)141582" + }, + { + "astId": 139638, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "tokenAddr", + "offset": 1, + "slot": "0", + "type": "t_address" + } + ] + }, + "t_struct(RoleData)102420_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", + "members": [ + { + "astId": 102417, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 102419, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ] + }, + "t_struct(Set)106532_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "numberOfBytes": "64", + "members": [ + { + "astId": 106527, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 106531, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "unlockFeePercentages(address)": { + "notice": "Values 0-1,000,000 map to 0%-100%" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/MainchainGatewayV3Proxy.json b/deployments/sepolia/MainchainGatewayV3Proxy.json new file mode 100644 index 00000000..f99080cb --- /dev/null +++ b/deployments/sepolia/MainchainGatewayV3Proxy.json @@ -0,0 +1,218 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "admin", + "inputs": [], + "outputs": [ + { + "name": "admin_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "changeAdmin", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "functionDelegateCall", + "inputs": [ + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "implementation", + "inputs": [], + "outputs": [ + { + "name": "implementation_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeTo", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ], + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "args": "0x", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "chainId": 11155111, + "contractAbsolutePath": "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "deployedBytecode": "0x6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://383fb7b8181016ac5ccf07bc9cdb7c1b5045ea36e2cc4df52bcbf20396fc7688\",\"dweb:/ipfs/QmYJ7Cg4WmE3rR8KGQxjUCXFfTH6TcwZ2Z1f6tPrq7jHFr\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://96b6d77a20bebd4eb06b801d3d020c7e82be13bd535cb0d0a6b7181c51dab5d5\",\"dweb:/ipfs/QmPUR9Cv9jNFdQX6PtBfaBW1ZCnKwiu65R2VD5kbdanDyn\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://89c2a0f70157c13845be5cb49b078a6374fee3a78fa950052a3af26190255da8\",\"dweb:/ipfs/QmUcvMEQH1oMM2pUyMuDiBUKdvvnTz1NRB8bmPHrVq8725\"]},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8831721b6f4cc26534d190f9f1631c3f59c9ff38efdd911f85e0882b8e360472\",\"dweb:/ipfs/QmQZnLErZNStirSQ13ZNWQgvEYUtGE5tXYwn4QUPaVUfPN\"]},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a6c4477d480bac20d681ade0e712b77ad828acf530a1d5c0abc5fb78068a05a1\",\"dweb:/ipfs/QmdBqsK8CcUceTeWzhHwFDEvKMoHimwtV96Lbim7ZBtCb8\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://39e096c60a6eb1c6a257122d515496bd92d0c6a693a8f07acb6aa4b1263e95d4\",\"dweb:/ipfs/QmPs5trJBacCiSkezP6tpevapuRYWNY6mqSFzsMCJj7e6B\"]},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://370c93bc1e962fcf8eab41d217d901716769f05c51a2cb25aae12abc84e871da\",\"dweb:/ipfs/QmQYL5QrJmXCdi5UN9K7imt1iPm9ydZQm6ifShpt451afd\"]}},\"version\":1}", + "nonce": 3, + "numDeployments": 1, + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/MockERC721.json b/deployments/sepolia/MockERC721.json new file mode 100644 index 00000000..c46a267c --- /dev/null +++ b/deployments/sepolia/MockERC721.json @@ -0,0 +1,544 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getApproved", + "inputs": [ + { + "name": "tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isApprovedForAll", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setApprovalForAll", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenURI", + "inputs": [ + { + "name": "tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "approved", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ApprovalForAll", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } + ], + "address": "0xAad5541Eb4e5DE1f353BCc8EaBD124fc42107507", + "args": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b4d6f636b2045524337323100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d5f455243373231000000000000000000000000000000000000000000000000", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x60806040523480156200001157600080fd5b506040516200158238038062001582833981016040819052620000349162000126565b8181600062000044838262000221565b50600162000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61128580620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101e1578063b88d4fde146101f4578063c87b56dd14610207578063e985e9c51461021a57600080fd5b80636352211e146101a557806370a08231146101b857806395d89b41146101d957600080fd5b8063095ea7b3116100c8578063095ea7b31461015757806323b872dd1461016c57806340c10f191461017f57806342842e0e1461019257600080fd5b806301ffc9a7146100ef57806306fdde0314610117578063081812fc1461012c575b600080fd5b6101026100fd366004610dac565b61022d565b60405190151581526020015b60405180910390f35b61011f61027f565b60405161010e9190610e19565b61013f61013a366004610e2c565b610311565b6040516001600160a01b03909116815260200161010e565b61016a610165366004610e61565b610338565b005b61016a61017a366004610e8b565b610452565b61016a61018d366004610e61565b610483565b61016a6101a0366004610e8b565b610491565b61013f6101b3366004610e2c565b6104ac565b6101cb6101c6366004610ec7565b61050c565b60405190815260200161010e565b61011f610592565b61016a6101ef366004610ee2565b6105a1565b61016a610202366004610f34565b6105ac565b61011f610215366004610e2c565b6105e4565b610102610228366004611010565b610658565b60006001600160e01b031982166380ac58cd60e01b148061025e57506001600160e01b03198216635b5e139f60e01b145b8061027957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028e90611043565b80601f01602080910402602001604051908101604052809291908181526020018280546102ba90611043565b80156103075780601f106102dc57610100808354040283529160200191610307565b820191906000526020600020905b8154815290600101906020018083116102ea57829003601f168201915b5050505050905090565b600061031c82610686565b506000908152600460205260409020546001600160a01b031690565b6000610343826104ac565b9050806001600160a01b0316836001600160a01b0316036103b55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103d157506103d18133610658565b6104435760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016103ac565b61044d83836106e8565b505050565b61045c3382610756565b6104785760405162461bcd60e51b81526004016103ac9061107d565b61044d8383836107b5565b61048d8282610951565b5050565b61044d838383604051806020016040528060008152506105ac565b6000818152600260205260408120546001600160a01b0316806102795760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b60006001600160a01b0382166105765760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103ac565b506001600160a01b031660009081526003602052604090205490565b60606001805461028e90611043565b61048d338383610a93565b6105b63383610756565b6105d25760405162461bcd60e51b81526004016103ac9061107d565b6105de84848484610b61565b50505050565b60606105ef82610686565b600061060660408051602081019091526000815290565b905060008151116106265760405180602001604052806000815250610651565b8061063084610b94565b6040516020016106419291906110cb565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600260205260409020546001600160a01b03166106e55760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061071d826104ac565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610762836104ac565b9050806001600160a01b0316846001600160a01b0316148061078957506107898185610658565b806107ad5750836001600160a01b03166107a284610311565b6001600160a01b0316145b949350505050565b826001600160a01b03166107c8826104ac565b6001600160a01b03161461082c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016103ac565b6001600160a01b03821661088e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103ac565b6108996000826106e8565b6001600160a01b03831660009081526003602052604081208054600192906108c2908490611110565b90915550506001600160a01b03821660009081526003602052604081208054600192906108f0908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b0382166109a75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016103ac565b6000818152600260205260409020546001600160a01b031615610a0c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016103ac565b6001600160a01b0382166000908152600360205260408120805460019290610a35908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603610af45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103ac565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610b6c8484846107b5565b610b7884848484610c95565b6105de5760405162461bcd60e51b81526004016103ac90611136565b606081600003610bbb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610be55780610bcf81611188565b9150610bde9050600a836111b7565b9150610bbf565b60008167ffffffffffffffff811115610c0057610c00610f1e565b6040519080825280601f01601f191660200182016040528015610c2a576020820181803683370190505b5090505b84156107ad57610c3f600183611110565b9150610c4c600a866111cb565b610c57906030611123565b60f81b818381518110610c6c57610c6c6111df565b60200101906001600160f81b031916908160001a905350610c8e600a866111b7565b9450610c2e565b60006001600160a01b0384163b15610d8b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610cd99033908990889088906004016111f5565b6020604051808303816000875af1925050508015610d14575060408051601f3d908101601f19168201909252610d1191810190611232565b60015b610d71573d808015610d42576040519150601f19603f3d011682016040523d82523d6000602084013e610d47565b606091505b508051600003610d695760405162461bcd60e51b81526004016103ac90611136565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107ad565b506001949350505050565b6001600160e01b0319811681146106e557600080fd5b600060208284031215610dbe57600080fd5b813561065181610d96565b60005b83811015610de4578181015183820152602001610dcc565b50506000910152565b60008151808452610e05816020860160208601610dc9565b601f01601f19169290920160200192915050565b6020815260006106516020830184610ded565b600060208284031215610e3e57600080fd5b5035919050565b80356001600160a01b0381168114610e5c57600080fd5b919050565b60008060408385031215610e7457600080fd5b610e7d83610e45565b946020939093013593505050565b600080600060608486031215610ea057600080fd5b610ea984610e45565b9250610eb760208501610e45565b9150604084013590509250925092565b600060208284031215610ed957600080fd5b61065182610e45565b60008060408385031215610ef557600080fd5b610efe83610e45565b915060208301358015158114610f1357600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610f4a57600080fd5b610f5385610e45565b9350610f6160208601610e45565b925060408501359150606085013567ffffffffffffffff80821115610f8557600080fd5b818701915087601f830112610f9957600080fd5b813581811115610fab57610fab610f1e565b604051601f8201601f19908116603f01168101908382118183101715610fd357610fd3610f1e565b816040528281528a6020848701011115610fec57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561102357600080fd5b61102c83610e45565b915061103a60208401610e45565b90509250929050565b600181811c9082168061105757607f821691505b60208210810361107757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600083516110dd818460208801610dc9565b8351908301906110f1818360208801610dc9565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610279576102796110fa565b80820180821115610279576102796110fa565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60006001820161119a5761119a6110fa565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826111c6576111c66111a1565b500490565b6000826111da576111da6111a1565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061122890830184610ded565b9695505050505050565b60006020828403121561124457600080fd5b815161065181610d9656fea2646970667358221220cb618065662e7edd32746d846fe974bcdec24b45727d8217ab8bb697460c03b464736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MockERC721.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101e1578063b88d4fde146101f4578063c87b56dd14610207578063e985e9c51461021a57600080fd5b80636352211e146101a557806370a08231146101b857806395d89b41146101d957600080fd5b8063095ea7b3116100c8578063095ea7b31461015757806323b872dd1461016c57806340c10f191461017f57806342842e0e1461019257600080fd5b806301ffc9a7146100ef57806306fdde0314610117578063081812fc1461012c575b600080fd5b6101026100fd366004610dac565b61022d565b60405190151581526020015b60405180910390f35b61011f61027f565b60405161010e9190610e19565b61013f61013a366004610e2c565b610311565b6040516001600160a01b03909116815260200161010e565b61016a610165366004610e61565b610338565b005b61016a61017a366004610e8b565b610452565b61016a61018d366004610e61565b610483565b61016a6101a0366004610e8b565b610491565b61013f6101b3366004610e2c565b6104ac565b6101cb6101c6366004610ec7565b61050c565b60405190815260200161010e565b61011f610592565b61016a6101ef366004610ee2565b6105a1565b61016a610202366004610f34565b6105ac565b61011f610215366004610e2c565b6105e4565b610102610228366004611010565b610658565b60006001600160e01b031982166380ac58cd60e01b148061025e57506001600160e01b03198216635b5e139f60e01b145b8061027957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028e90611043565b80601f01602080910402602001604051908101604052809291908181526020018280546102ba90611043565b80156103075780601f106102dc57610100808354040283529160200191610307565b820191906000526020600020905b8154815290600101906020018083116102ea57829003601f168201915b5050505050905090565b600061031c82610686565b506000908152600460205260409020546001600160a01b031690565b6000610343826104ac565b9050806001600160a01b0316836001600160a01b0316036103b55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103d157506103d18133610658565b6104435760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016103ac565b61044d83836106e8565b505050565b61045c3382610756565b6104785760405162461bcd60e51b81526004016103ac9061107d565b61044d8383836107b5565b61048d8282610951565b5050565b61044d838383604051806020016040528060008152506105ac565b6000818152600260205260408120546001600160a01b0316806102795760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b60006001600160a01b0382166105765760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103ac565b506001600160a01b031660009081526003602052604090205490565b60606001805461028e90611043565b61048d338383610a93565b6105b63383610756565b6105d25760405162461bcd60e51b81526004016103ac9061107d565b6105de84848484610b61565b50505050565b60606105ef82610686565b600061060660408051602081019091526000815290565b905060008151116106265760405180602001604052806000815250610651565b8061063084610b94565b6040516020016106419291906110cb565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600260205260409020546001600160a01b03166106e55760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103ac565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061071d826104ac565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610762836104ac565b9050806001600160a01b0316846001600160a01b0316148061078957506107898185610658565b806107ad5750836001600160a01b03166107a284610311565b6001600160a01b0316145b949350505050565b826001600160a01b03166107c8826104ac565b6001600160a01b03161461082c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016103ac565b6001600160a01b03821661088e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103ac565b6108996000826106e8565b6001600160a01b03831660009081526003602052604081208054600192906108c2908490611110565b90915550506001600160a01b03821660009081526003602052604081208054600192906108f0908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b0382166109a75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016103ac565b6000818152600260205260409020546001600160a01b031615610a0c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016103ac565b6001600160a01b0382166000908152600360205260408120805460019290610a35908490611123565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603610af45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103ac565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610b6c8484846107b5565b610b7884848484610c95565b6105de5760405162461bcd60e51b81526004016103ac90611136565b606081600003610bbb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610be55780610bcf81611188565b9150610bde9050600a836111b7565b9150610bbf565b60008167ffffffffffffffff811115610c0057610c00610f1e565b6040519080825280601f01601f191660200182016040528015610c2a576020820181803683370190505b5090505b84156107ad57610c3f600183611110565b9150610c4c600a866111cb565b610c57906030611123565b60f81b818381518110610c6c57610c6c6111df565b60200101906001600160f81b031916908160001a905350610c8e600a866111b7565b9450610c2e565b60006001600160a01b0384163b15610d8b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610cd99033908990889088906004016111f5565b6020604051808303816000875af1925050508015610d14575060408051601f3d908101601f19168201909252610d1191810190611232565b60015b610d71573d808015610d42576040519150601f19603f3d011682016040523d82523d6000602084013e610d47565b606091505b508051600003610d695760405162461bcd60e51b81526004016103ac90611136565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107ad565b506001949350505050565b6001600160e01b0319811681146106e557600080fd5b600060208284031215610dbe57600080fd5b813561065181610d96565b60005b83811015610de4578181015183820152602001610dcc565b50506000910152565b60008151808452610e05816020860160208601610dc9565b601f01601f19169290920160200192915050565b6020815260006106516020830184610ded565b600060208284031215610e3e57600080fd5b5035919050565b80356001600160a01b0381168114610e5c57600080fd5b919050565b60008060408385031215610e7457600080fd5b610e7d83610e45565b946020939093013593505050565b600080600060608486031215610ea057600080fd5b610ea984610e45565b9250610eb760208501610e45565b9150604084013590509250925092565b600060208284031215610ed957600080fd5b61065182610e45565b60008060408385031215610ef557600080fd5b610efe83610e45565b915060208301358015158114610f1357600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610f4a57600080fd5b610f5385610e45565b9350610f6160208601610e45565b925060408501359150606085013567ffffffffffffffff80821115610f8557600080fd5b818701915087601f830112610f9957600080fd5b813581811115610fab57610fab610f1e565b604051601f8201601f19908116603f01168101908382118183101715610fd357610fd3610f1e565b816040528281528a6020848701011115610fec57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561102357600080fd5b61102c83610e45565b915061103a60208401610e45565b90509250929050565b600181811c9082168061105757607f821691505b60208210810361107757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600083516110dd818460208801610dc9565b8351908301906110f1818360208801610dc9565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610279576102796110fa565b80820180821115610279576102796110fa565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60006001820161119a5761119a6110fa565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826111c6576111c66111a1565b500490565b6000826111da576111da6111a1565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061122890830184610ded565b9695505050505050565b60006020828403121561124457600080fd5b815161065181610d9656fea2646970667358221220cb618065662e7edd32746d846fe974bcdec24b45727d8217ab8bb697460c03b464736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-ownerOf}." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenURI(uint256)": { + "details": "See {IERC721Metadata-tokenURI}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + } + }, + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token." + }, + "ApprovalForAll(address,address,bool)": { + "details": "Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `tokenId` token is transferred from `from` to `to`." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC721.sol\":\"MockERC721\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol\":{\"keccak256\":\"0x0b606994df12f0ce35f6d2f6dcdde7e55e6899cdef7e00f180980caa81e3844e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4c827c981a552d1c76c96060e92f56b52bc20c6f9b4dbf911fe99ddbfb41f2ea\",\"dweb:/ipfs/QmW8xvJdzHrr8Ry34C7viBsgG2b8T1mL4BQWJ5CdfD9JLB\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://20a97f891d06f0fe91560ea1a142aaa26fdd22bed1b51606b7d48f670deeb50f\",\"dweb:/ipfs/QmTbCtZKChpaX5H2iRiTDMcSz29GSLCpTCDgJpcMR4wg8x\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e75cf83beb757b8855791088546b8337e9d4684e169400c20d44a515353b708\",\"dweb:/ipfs/QmYvPafLfoquiDMEj7CKHtvbgHu7TJNPSVPSCjrtjV8HjV\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a0a107160525724f9e1bbbab031defc2f298296dd9e331f16a6f7130cec32146\",\"dweb:/ipfs/QmemujxSd7gX8A9M8UwmNbz4Ms3U9FG9QfudUgxwvTmPWf\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"src/mocks/token/MockERC721.sol\":{\"keccak256\":\"0x47f06d3240ad7ef724569c87fee4e0888d2136d58db6eb76459d59f26bac109c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc6ff2b16909f7c2356475f60600c42c0e7e329634fa64ee2b21c7f839d6d9ef\",\"dweb:/ipfs/QmQpvErV6wkCQif5edyztwaBPmSvTgrgR5rkutSjLYFfW5\"]}},\"version\":1}", + "nonce": 9, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 104998, + "contract": "src/mocks/token/MockERC721.sol:MockERC721", + "label": "_name", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 105000, + "contract": "src/mocks/token/MockERC721.sol:MockERC721", + "label": "_symbol", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 105004, + "contract": "src/mocks/token/MockERC721.sol:MockERC721", + "label": "_owners", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 105008, + "contract": "src/mocks/token/MockERC721.sol:MockERC721", + "label": "_balances", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 105012, + "contract": "src/mocks/token/MockERC721.sol:MockERC721", + "label": "_tokenApprovals", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 105018, + "contract": "src/mocks/token/MockERC721.sol:MockERC721", + "label": "_operatorApprovals", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/PauseEnforcerLogic.json b/deployments/sepolia/PauseEnforcerLogic.json new file mode 100644 index 00000000..f5b1c2a0 --- /dev/null +++ b/deployments/sepolia/PauseEnforcerLogic.json @@ -0,0 +1,723 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SENTRY_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "changeTarget", + "inputs": [ + { + "name": "_target", + "type": "address", + "internalType": "contract IPauseTarget" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "emergency", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "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": "grantSentry", + "inputs": [ + { + "name": "_sentry", + "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": [ + { + "name": "_target", + "type": "address", + "internalType": "contract IPauseTarget" + }, + { + "name": "_admin", + "type": "address", + "internalType": "address" + }, + { + "name": "_sentries", + "type": "address[]", + "internalType": "address[]" + } + ], + "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": "revokeSentry", + "inputs": [ + { + "name": "_sentry", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "target", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IPauseTarget" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "triggerPause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "triggerUnpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "EmergencyPaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EmergencyUnpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "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": "TargetChanged", + "inputs": [ + { + "name": "target", + "type": "address", + "indexed": false, + "internalType": "contract IPauseTarget" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrNotOnEmergencyPause", + "inputs": [] + }, + { + "type": "error", + "name": "ErrTargetIsNotOnPaused", + "inputs": [] + }, + { + "type": "error", + "name": "ErrTargetIsOnPaused", + "inputs": [] + } + ], + "address": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "args": "0x", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca264697066735822122024939a448abbecaf74c9f8ef1d3326da17dd252cccddf0ade66be800061b239364736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "PauseEnforcer.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca264697066735822122024939a448abbecaf74c9f8ef1d3326da17dd252cccddf0ade66be800061b239364736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "changeTarget(address)": { + "details": "Setter for `target`. Requirements: - Only admin can call this method." + }, + "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. May emit a {RoleGranted} event." + }, + "grantSentry(address)": { + "details": "Grants the SENTRY_ROLE to the specified address." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,address[])": { + "details": "Initializes the contract storage." + }, + "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "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. May emit a {RoleRevoked} event." + }, + "revokeSentry(address)": { + "details": "Revokes the SENTRY_ROLE from the specified address." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "triggerPause()": { + "details": "Triggers a pause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is not already paused." + }, + "triggerUnpause()": { + "details": "Triggers an unpause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is already paused. - The target contract is paused in emergency mode." + } + }, + "events": { + "EmergencyPaused(address)": { + "details": "Emitted when the emergency ppause is triggered by `account`." + }, + "EmergencyUnpaused(address)": { + "details": "Emitted when the emergency unpause is triggered by `account`." + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "TargetChanged(address)": { + "details": "Emitted when the target is changed." + } + }, + "errors": { + "ErrNotOnEmergencyPause()": [ + { + "details": "Error thrown when the contract is not on emergency pause." + } + ], + "ErrTargetIsNotOnPaused()": [ + { + "details": "Error thrown when the target is not on paused state." + } + ], + "ErrTargetIsOnPaused()": [ + { + "details": "Error thrown when the target is already on paused state." + } + ] + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrNotOnEmergencyPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsNotOnPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsOnPaused\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"contract IPauseTarget\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SENTRY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"changeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergency\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"grantSentry\",\"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\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_sentries\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"revokeSentry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerUnpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrNotOnEmergencyPause()\":[{\"details\":\"Error thrown when the contract is not on emergency pause.\"}],\"ErrTargetIsNotOnPaused()\":[{\"details\":\"Error thrown when the target is not on paused state.\"}],\"ErrTargetIsOnPaused()\":[{\"details\":\"Error thrown when the target is already on paused state.\"}]},\"events\":{\"EmergencyPaused(address)\":{\"details\":\"Emitted when the emergency ppause is triggered by `account`.\"},\"EmergencyUnpaused(address)\":{\"details\":\"Emitted when the emergency unpause is triggered by `account`.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"TargetChanged(address)\":{\"details\":\"Emitted when the target is changed.\"}},\"kind\":\"dev\",\"methods\":{\"changeTarget(address)\":{\"details\":\"Setter for `target`. Requirements: - Only admin can call this method.\"},\"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. May emit a {RoleGranted} event.\"},\"grantSentry(address)\":{\"details\":\"Grants the SENTRY_ROLE to the specified address.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address[])\":{\"details\":\"Initializes the contract storage.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"revokeSentry(address)\":{\"details\":\"Revokes the SENTRY_ROLE from the specified address.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"triggerPause()\":{\"details\":\"Triggers a pause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is not already paused.\"},\"triggerUnpause()\":{\"details\":\"Triggers an unpause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is already paused. - The target contract is paused in emergency mode.\"}},\"stateVariables\":{\"emergency\":{\"details\":\"Indicating whether or not the target contract is paused in emergency mode.\"},\"target\":{\"details\":\"The contract that can be paused or unpaused by the SENTRY_ROLE.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/PauseEnforcer.sol\":\"PauseEnforcer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba8eb2d22f9321bd4660f6617c181d9611ff30a9b089408b8c6e2216d6d5cdc5\",\"dweb:/ipfs/QmTSJvhjHfnUV1j4hsqDv8PmLvGBLRs9gHLjTUXrUJ5Y9q\"]},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7ee05f28f549a5d6515e152580716b87636ed4bfab9812499a6e3803df88288b\",\"dweb:/ipfs/QmeEnhdwY1t5Y3YU5a4ffzgXuToydH2PNdNxV9W7dEPRQJ\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3dcc7b09bfa6e18aab262ca372f4a9b1fc82e294b430706a4e1378cf58e6a276\",\"dweb:/ipfs/QmT8oSAcesdctR15HMLhr2a1HRpXymxdjTfdtfTYJcj2N2\"]},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3313a8f9bb1f9476857c9050067b31982bf2140b83d84f3bc0cec1f62bbe947f\",\"dweb:/ipfs/Qma17Pk8NRe7aB4UD3jjVxk7nSFaov3eQyv86hcyqkwJRV\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d4831d777a29ebdf9f2caecd70e74b97bff1b70e53622fd0a02aed01e21c8271\",\"dweb:/ipfs/QmUqurVVnCc7XkMxb2k23TVQUtuhHZduJ3hTZarTJrqU24\"]},\"src/interfaces/IPauseTarget.sol\":{\"keccak256\":\"0xc91073e61da572de0087b41018fd30b03661d58e0c5061e7b9d1c9235cd7c1c3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0800b40eb3f323d0e450ca7e47f1eb68518d0bc71a4143d6026bf5ad8c9814a6\",\"dweb:/ipfs/QmeJS39F9UTNo9cFhbfgiYDNfvuMKMFnM8XHrj9x3iqbjo\"]},\"src/ronin/gateway/PauseEnforcer.sol\":{\"keccak256\":\"0x22412c51c9877e24696d4bf2e0ce86c2cd2a27c6dbd2633e6e9843f720d960e1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ff67aa9238c6f93a5722607b92fc5c9b4acf634d16acafe078d973784723eba8\",\"dweb:/ipfs/QmcxFuocVK5tnSkDvs7VMBZaFp3YCFLSFzrpNmqG98cCEo\"]}},\"version\":1}", + "nonce": 0, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 102425, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)102420_storage)" + }, + { + "astId": 102739, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "_roleMembers", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)106833_storage)" + }, + { + "astId": 103525, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "_initialized", + "offset": 0, + "slot": "2", + "type": "t_uint8" + }, + { + "astId": 103528, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "_initializing", + "offset": 1, + "slot": "2", + "type": "t_bool" + }, + { + "astId": 147977, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "target", + "offset": 2, + "slot": "2", + "type": "t_contract(IPauseTarget)138692" + }, + { + "astId": 147980, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "emergency", + "offset": 22, + "slot": "2", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32", + "base": "t_bytes32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IPauseTarget)138692": { + "encoding": "inplace", + "label": "contract IPauseTarget", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)106833_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)106833_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)102420_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)102420_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(AddressSet)106833_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.AddressSet", + "numberOfBytes": "64", + "members": [ + { + "astId": 106832, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)106532_storage" + } + ] + }, + "t_struct(RoleData)102420_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", + "members": [ + { + "astId": 102417, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 102419, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ] + }, + "t_struct(Set)106532_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "numberOfBytes": "64", + "members": [ + { + "astId": 106527, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 106531, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/PauseEnforcerProxy.json b/deployments/sepolia/PauseEnforcerProxy.json new file mode 100644 index 00000000..f230ee5b --- /dev/null +++ b/deployments/sepolia/PauseEnforcerProxy.json @@ -0,0 +1,218 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "admin", + "inputs": [], + "outputs": [ + { + "name": "admin_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "changeAdmin", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "functionDelegateCall", + "inputs": [ + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "implementation", + "inputs": [], + "outputs": [ + { + "name": "implementation_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeTo", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ], + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "args": "0x", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "chainId": 11155111, + "contractAbsolutePath": "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "deployedBytecode": "0x6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207368c3c0a1d867bfaee9f126ffe6aed624c9697b9bf746f1d154567963f4a84164736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://383fb7b8181016ac5ccf07bc9cdb7c1b5045ea36e2cc4df52bcbf20396fc7688\",\"dweb:/ipfs/QmYJ7Cg4WmE3rR8KGQxjUCXFfTH6TcwZ2Z1f6tPrq7jHFr\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://96b6d77a20bebd4eb06b801d3d020c7e82be13bd535cb0d0a6b7181c51dab5d5\",\"dweb:/ipfs/QmPUR9Cv9jNFdQX6PtBfaBW1ZCnKwiu65R2VD5kbdanDyn\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://89c2a0f70157c13845be5cb49b078a6374fee3a78fa950052a3af26190255da8\",\"dweb:/ipfs/QmUcvMEQH1oMM2pUyMuDiBUKdvvnTz1NRB8bmPHrVq8725\"]},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8831721b6f4cc26534d190f9f1631c3f59c9ff38efdd911f85e0882b8e360472\",\"dweb:/ipfs/QmQZnLErZNStirSQ13ZNWQgvEYUtGE5tXYwn4QUPaVUfPN\"]},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a6c4477d480bac20d681ade0e712b77ad828acf530a1d5c0abc5fb78068a05a1\",\"dweb:/ipfs/QmdBqsK8CcUceTeWzhHwFDEvKMoHimwtV96Lbim7ZBtCb8\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://39e096c60a6eb1c6a257122d515496bd92d0c6a693a8f07acb6aa4b1263e95d4\",\"dweb:/ipfs/QmPs5trJBacCiSkezP6tpevapuRYWNY6mqSFzsMCJj7e6B\"]},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://370c93bc1e962fcf8eab41d217d901716769f05c51a2cb25aae12abc84e871da\",\"dweb:/ipfs/QmQYL5QrJmXCdi5UN9K7imt1iPm9ydZQm6ifShpt451afd\"]}},\"version\":1}", + "nonce": 1, + "numDeployments": 1, + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/SLP.json b/deployments/sepolia/SLP.json new file mode 100644 index 00000000..fdbad2b3 --- /dev/null +++ b/deployments/sepolia/SLP.json @@ -0,0 +1,448 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "nonpayable" + }, + { + "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": "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": "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": "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": "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": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "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": "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 + } + ], + "address": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", + "args": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MockERC20.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + } + }, + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC20.sol\":\"MockERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockERC20.sol\":{\"keccak256\":\"0x71616dc3d3c909e9f68e85aad48010a46c0a4fb217a55c8e265a0955fd40153a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://134f2a8eedd6a5ba48256ee3412e0e2847ab7cfff88f8fc7a38dde2483c4207e\",\"dweb:/ipfs/QmPBe1HH5v67qTomJXPYoanLh4fp7wbQLfhjzoWJTCsuYg\"]}},\"version\":1}", + "nonce": 8, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 104082, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 104088, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 104090, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 104092, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 104094, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/USDC.json b/deployments/sepolia/USDC.json new file mode 100644 index 00000000..2fc4ba6c --- /dev/null +++ b/deployments/sepolia/USDC.json @@ -0,0 +1,448 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "nonpayable" + }, + { + "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": "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": "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": "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": "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": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "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": "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 + } + ], + "address": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "args": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MockERC20.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + } + }, + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC20.sol\":\"MockERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockERC20.sol\":{\"keccak256\":\"0x71616dc3d3c909e9f68e85aad48010a46c0a4fb217a55c8e265a0955fd40153a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://134f2a8eedd6a5ba48256ee3412e0e2847ab7cfff88f8fc7a38dde2483c4207e\",\"dweb:/ipfs/QmPBe1HH5v67qTomJXPYoanLh4fp7wbQLfhjzoWJTCsuYg\"]}},\"version\":1}", + "nonce": 7, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 104082, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 104088, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 104090, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 104092, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 104094, + "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/WETH.json b/deployments/sepolia/WETH.json new file mode 100644 index 00000000..64bcc8f7 --- /dev/null +++ b/deployments/sepolia/WETH.json @@ -0,0 +1,429 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "name_", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol_", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "guy", + "type": "address", + "internalType": "address" + }, + { + "name": "wad", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "account", + "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": "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": "dst", + "type": "address", + "internalType": "address" + }, + { + "name": "wad", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "src", + "type": "address", + "internalType": "address" + }, + { + "name": "dst", + "type": "address", + "internalType": "address" + }, + { + "name": "wad", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "wad", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "src", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "guy", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "wad", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Deposit", + "inputs": [ + { + "name": "dst", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "wad", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "src", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "dst", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "wad", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Withdrawal", + "inputs": [ + { + "name": "src", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "wad", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } + ], + "address": "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08", + "args": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c577261707065642057455448000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000", + "ast": "", + "blockNumber": 5632711, + "bytecode": "0x60806040526002805460ff191660121790553480156200001e57600080fd5b5060405162000bb738038062000bb783398101604081905262000041916200012f565b60006200004f83826200022a565b5060016200005e82826200022a565b505050620002f6565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008f57600080fd5b81516001600160401b0380821115620000ac57620000ac62000067565b604051601f8301601f19908116603f01168101908282118183101715620000d757620000d762000067565b8160405283815260209250866020858801011115620000f557600080fd5b600091505b83821015620001195785820183015181830184015290820190620000fa565b6000602085830101528094505050505092915050565b600080604083850312156200014357600080fd5b82516001600160401b03808211156200015b57600080fd5b62000169868387016200007d565b935060208501519150808211156200018057600080fd5b506200018f858286016200007d565b9150509250929050565b600181811c90821680620001ae57607f821691505b602082108103620001cf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000225576000816000526020600020601f850160051c81016020861015620002005750805b601f850160051c820191505b8181101562000221578281556001016200020c565b5050505b505050565b81516001600160401b0381111562000246576200024662000067565b6200025e8162000257845462000199565b84620001d5565b602080601f8311600181146200029657600084156200027d5750858301515b600019600386901b1c1916600185901b17855562000221565b600085815260208120601f198616915b82811015620002c757888601518255948401946001909101908401620002a6565b5085821015620002e65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6108b180620003066000396000f3fe6080604052600436106100ab5760003560e01c806340c10f191161006457806340c10f19146101a657806370a08231146101c657806395d89b41146101f3578063a9059cbb14610208578063d0e30db0146100ba578063dd62ed3e14610228576100ba565b806306fdde03146100c2578063095ea7b3146100ed57806318160ddd1461011d57806323b872dd1461013a5780632e1a7d4d1461015a578063313ce5671461017a576100ba565b366100ba576100b8610260565b005b6100b8610260565b3480156100ce57600080fd5b506100d76102bb565b6040516100e491906106cd565b60405180910390f35b3480156100f957600080fd5b5061010d610108366004610738565b610349565b60405190151581526020016100e4565b34801561012957600080fd5b50475b6040519081526020016100e4565b34801561014657600080fd5b5061010d610155366004610762565b6103b6565b34801561016657600080fd5b506100b861017536600461079e565b61053a565b34801561018657600080fd5b506002546101949060ff1681565b60405160ff90911681526020016100e4565b3480156101b257600080fd5b506100b86101c1366004610738565b6105e0565b3480156101d257600080fd5b5061012c6101e13660046107b7565b60036020526000908152604090205481565b3480156101ff57600080fd5b506100d76106ac565b34801561021457600080fd5b5061010d610223366004610738565b6106b9565b34801561023457600080fd5b5061012c6102433660046107d2565b600460209081526000928352604080842090915290825290205481565b336000908152600360205260408120805434929061027f90849061081b565b909155505060405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600080546102c89061082e565b80601f01602080910402602001604051908101604052809291908181526020018280546102f49061082e565b80156103415780601f1061031657610100808354040283529160200191610341565b820191906000526020600020905b81548152906001019060200180831161032457829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103a49086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600360205260408120548211156103db57600080fd5b6001600160a01b038416331480159061041957506001600160a01b038416600090815260046020908152604080832033845290915290205460001914155b15610487576001600160a01b038416600090815260046020908152604080832033845290915290205482111561044e57600080fd5b6001600160a01b038416600090815260046020908152604080832033845290915281208054849290610481908490610868565b90915550505b6001600160a01b038416600090815260036020526040812080548492906104af908490610868565b90915550506001600160a01b038316600090815260036020526040812080548492906104dc90849061081b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161052891815260200190565b60405180910390a35060019392505050565b3360009081526003602052604090205481111561055657600080fd5b3360009081526003602052604081208054839290610575908490610868565b9091555050604051339082156108fc029083906000818181858888f193505050501580156105a7573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b6001600160a01b03821661063a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b6001600160a01b0382166000908152600360205260408120805483929061066290849061081b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600180546102c89061082e565b60006106c63384846103b6565b9392505050565b60006020808352835180602085015260005b818110156106fb578581018301518582016040015282016106df565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073357600080fd5b919050565b6000806040838503121561074b57600080fd5b6107548361071c565b946020939093013593505050565b60008060006060848603121561077757600080fd5b6107808461071c565b925061078e6020850161071c565b9150604084013590509250925092565b6000602082840312156107b057600080fd5b5035919050565b6000602082840312156107c957600080fd5b6106c68261071c565b600080604083850312156107e557600080fd5b6107ee8361071c565b91506107fc6020840161071c565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103b0576103b0610805565b600181811c9082168061084257607f821691505b60208210810361086257634e487b7160e01b600052602260045260246000fd5b50919050565b818103818111156103b0576103b061080556fea264697066735822122095d4930cf27620bcea5a7285e58e73054c5baacb40c41af0a6f7a73e87199e6e64736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MockWrappedToken.sol", + "deployedBytecode": "0x6080604052600436106100ab5760003560e01c806340c10f191161006457806340c10f19146101a657806370a08231146101c657806395d89b41146101f3578063a9059cbb14610208578063d0e30db0146100ba578063dd62ed3e14610228576100ba565b806306fdde03146100c2578063095ea7b3146100ed57806318160ddd1461011d57806323b872dd1461013a5780632e1a7d4d1461015a578063313ce5671461017a576100ba565b366100ba576100b8610260565b005b6100b8610260565b3480156100ce57600080fd5b506100d76102bb565b6040516100e491906106cd565b60405180910390f35b3480156100f957600080fd5b5061010d610108366004610738565b610349565b60405190151581526020016100e4565b34801561012957600080fd5b50475b6040519081526020016100e4565b34801561014657600080fd5b5061010d610155366004610762565b6103b6565b34801561016657600080fd5b506100b861017536600461079e565b61053a565b34801561018657600080fd5b506002546101949060ff1681565b60405160ff90911681526020016100e4565b3480156101b257600080fd5b506100b86101c1366004610738565b6105e0565b3480156101d257600080fd5b5061012c6101e13660046107b7565b60036020526000908152604090205481565b3480156101ff57600080fd5b506100d76106ac565b34801561021457600080fd5b5061010d610223366004610738565b6106b9565b34801561023457600080fd5b5061012c6102433660046107d2565b600460209081526000928352604080842090915290825290205481565b336000908152600360205260408120805434929061027f90849061081b565b909155505060405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600080546102c89061082e565b80601f01602080910402602001604051908101604052809291908181526020018280546102f49061082e565b80156103415780601f1061031657610100808354040283529160200191610341565b820191906000526020600020905b81548152906001019060200180831161032457829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103a49086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600360205260408120548211156103db57600080fd5b6001600160a01b038416331480159061041957506001600160a01b038416600090815260046020908152604080832033845290915290205460001914155b15610487576001600160a01b038416600090815260046020908152604080832033845290915290205482111561044e57600080fd5b6001600160a01b038416600090815260046020908152604080832033845290915281208054849290610481908490610868565b90915550505b6001600160a01b038416600090815260036020526040812080548492906104af908490610868565b90915550506001600160a01b038316600090815260036020526040812080548492906104dc90849061081b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161052891815260200190565b60405180910390a35060019392505050565b3360009081526003602052604090205481111561055657600080fd5b3360009081526003602052604081208054839290610575908490610868565b9091555050604051339082156108fc029083906000818181858888f193505050501580156105a7573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b6001600160a01b03821661063a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b6001600160a01b0382166000908152600360205260408120805483929061066290849061081b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600180546102c89061082e565b60006106c63384846103b6565b9392505050565b60006020808352835180602085015260005b818110156106fb578581018301518582016040015282016106df565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073357600080fd5b919050565b6000806040838503121561074b57600080fd5b6107548361071c565b946020939093013593505050565b60008060006060848603121561077757600080fd5b6107808461071c565b925061078e6020850161071c565b9150604084013590509250925092565b6000602082840312156107b057600080fd5b5035919050565b6000602082840312156107c957600080fd5b6106c68261071c565b600080604083850312156107e557600080fd5b6107ee8361071c565b91506107fc6020840161071c565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103b0576103b0610805565b600181811c9082168061084257607f821691505b60208210810361086257634e487b7160e01b600052602260045260246000fd5b50919050565b818103818111156103b0576103b061080556fea264697066735822122095d4930cf27620bcea5a7285e58e73054c5baacb40c41af0a6f7a73e87199e6e64736f6c63430008170033", + "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "devdoc": { + "version": 1, + "kind": "dev" + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This contract MUST BE used in development only.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockWrappedToken.sol\":\"MockWrappedToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"src/mocks/token/MockWrappedToken.sol\":{\"keccak256\":\"0x90b86ed2c6a2abf0b17080b5bb7966c5b7799ee2469d9f352f18347bfdbb37ce\",\"license\":\"GNU\",\"urls\":[\"bzz-raw://1d9b25925f4cbfca4262ab8816facdd825ae616de2bf5c26e947a788a926a701\",\"dweb:/ipfs/QmRpx1Nfx6cWqro7rhZpZ5PWC9p9ZUZ74GJsSPhiFX2rCg\"]}},\"version\":1}", + "nonce": 5, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 152087, + "contract": "src/mocks/token/MockWrappedToken.sol:MockWrappedToken", + "label": "name", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 152089, + "contract": "src/mocks/token/MockWrappedToken.sol:MockWrappedToken", + "label": "symbol", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 152092, + "contract": "src/mocks/token/MockWrappedToken.sol:MockWrappedToken", + "label": "decimals", + "offset": 0, + "slot": "2", + "type": "t_uint8" + }, + { + "astId": 152124, + "contract": "src/mocks/token/MockWrappedToken.sol:MockWrappedToken", + "label": "balanceOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 152130, + "contract": "src/mocks/token/MockWrappedToken.sol:MockWrappedToken", + "label": "allowance", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1712300364, + "userdoc": { + "version": 1, + "kind": "user", + "notice": "This contract MUST BE used in development only." + } +} \ No newline at end of file From cb604b32eddff0b5ef029e57365121420f8bd196 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 8 Apr 2024 10:57:20 +0700 Subject: [PATCH 137/305] script: map usdc testnet --- .../11155111/run-1712313532.json | 192 ++++++++++++++++++ .../20240405-maptoken-usdc-mainchain.s.sol | 153 ++++++++++++++ .../deploy-sepolia.s.sol | 4 + .../maptoken-usdc-configs.s.sol | 18 ++ script/GeneralConfig.sol | 2 +- 5 files changed, 368 insertions(+), 1 deletion(-) create mode 100644 broadcast/20240405-maptoken-usdc-mainchain.s.sol/11155111/run-1712313532.json create mode 100644 script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol create mode 100644 script/20240403-deploy-sepolia/maptoken-usdc-configs.s.sol diff --git a/broadcast/20240405-maptoken-usdc-mainchain.s.sol/11155111/run-1712313532.json b/broadcast/20240405-maptoken-usdc-mainchain.s.sol/11155111/run-1712313532.json new file mode 100644 index 00000000..7c568bae --- /dev/null +++ b/broadcast/20240405-maptoken-usdc-mainchain.s.sol/11155111/run-1712313532.json @@ -0,0 +1,192 @@ +{ + "transactions": [ + { + "hash": "0x989435ffe8575eaa1117e04c2da4a7062e0e86af3d73333ca2cfe638d18d0fc5", + "transactionType": "CREATE", + "contractName": "MockUSDC", + "contractAddress": "0x1C27983FBf738494F167A1eD31F2974ad45d28e4", + "function": null, + "arguments": [ + "\"USD Coin\"", + "\"USDC\"" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x1367f8", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600681526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220d98af5d0f19b4cc3b5dfb6a5df119742220a32a07bdcf9264500eebf07718a1464736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0x3", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x78ce571f6e1c1ac91b1d7f3cf0541cfaab40f1fcca0acd401485bffad3c7e5ed", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001c27983fbf738494f167a1ed31f2974ad45d28e4000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde7700000000000000000000000000000000000000000000000000000000000000002000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000035a4e900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000017d7840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x3a97c", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000003a4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001c27983fbf738494f167a1ed31f2974ad45d28e4000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde7700000000000000000000000000000000000000000000000000000000000000002000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000035a4e900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000017d7840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x4", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xd56a02304b839535678eb8b2d66107dc496c7990ed583735ad5dc6e58e0d5c87", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0x3e70838b00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x19dbc", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000243e70838b00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df00000000000000000000000000000000000000000000000000000000", + "nonce": "0x5", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x989435ffe8575eaa1117e04c2da4a7062e0e86af3d73333ca2cfe638d18d0fc5", + "transactionIndex": "0x6", + "blockHash": "0x687ad10bacdc5b9d7356c0d3d73ed42bd0d093dafa9c41d45b2804e16d0ec9c0", + "blockNumber": "0x55f6dc", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x10ccdf", + "gasUsed": "0x9befa", + "contractAddress": "0x1C27983FBf738494F167A1eD31F2974ad45d28e4", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0x8424eb65f" + }, + { + "transactionHash": "0x78ce571f6e1c1ac91b1d7f3cf0541cfaab40f1fcca0acd401485bffad3c7e5ed", + "transactionIndex": "0x7", + "blockHash": "0x687ad10bacdc5b9d7356c0d3d73ed42bd0d093dafa9c41d45b2804e16d0ec9c0", + "blockNumber": "0x55f6dc", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x1373ef", + "gasUsed": "0x2a710", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001c27983fbf738494f167a1ed31f2974ad45d28e4000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde7700000000000000000000000000000000000000000000000000000000000000002000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x687ad10bacdc5b9d7356c0d3d73ed42bd0d093dafa9c41d45b2804e16d0ec9c0", + "blockNumber": "0x55f6dc", + "transactionHash": "0x78ce571f6e1c1ac91b1d7f3cf0541cfaab40f1fcca0acd401485bffad3c7e5ed", + "transactionIndex": "0x7", + "logIndex": "0x9", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001c27983fbf738494f167a1ed31f2974ad45d28e4000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde77000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000035a4e9000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x687ad10bacdc5b9d7356c0d3d73ed42bd0d093dafa9c41d45b2804e16d0ec9c0", + "blockNumber": "0x55f6dc", + "transactionHash": "0x78ce571f6e1c1ac91b1d7f3cf0541cfaab40f1fcca0acd401485bffad3c7e5ed", + "transactionIndex": "0x7", + "logIndex": "0xa", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001c27983fbf738494f167a1ed31f2974ad45d28e4000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde77000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000017d784000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x687ad10bacdc5b9d7356c0d3d73ed42bd0d093dafa9c41d45b2804e16d0ec9c0", + "blockNumber": "0x55f6dc", + "transactionHash": "0x78ce571f6e1c1ac91b1d7f3cf0541cfaab40f1fcca0acd401485bffad3c7e5ed", + "transactionIndex": "0x7", + "logIndex": "0xb", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001c27983fbf738494f167a1ed31f2974ad45d28e4000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde7700000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x687ad10bacdc5b9d7356c0d3d73ed42bd0d093dafa9c41d45b2804e16d0ec9c0", + "blockNumber": "0x55f6dc", + "transactionHash": "0x78ce571f6e1c1ac91b1d7f3cf0541cfaab40f1fcca0acd401485bffad3c7e5ed", + "transactionIndex": "0x7", + "logIndex": "0xc", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001c27983fbf738494f167a1ed31f2974ad45d28e4000000000000000000000000523e8d078be0769e806b8a154f0f7ac6f4cde7700000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x687ad10bacdc5b9d7356c0d3d73ed42bd0d093dafa9c41d45b2804e16d0ec9c0", + "blockNumber": "0x55f6dc", + "transactionHash": "0x78ce571f6e1c1ac91b1d7f3cf0541cfaab40f1fcca0acd401485bffad3c7e5ed", + "transactionIndex": "0x7", + "logIndex": "0xd", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008200000000000000000000000000008000000002000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000040000000000000000020000000000000000000000000000001000000000000000000000000000000000400000000000008000000000000000000000000000020000000000000000000000000000060000002000000000000008000100000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0x8424eb65f" + }, + { + "transactionHash": "0xd56a02304b839535678eb8b2d66107dc496c7990ed583735ad5dc6e58e0d5c87", + "transactionIndex": "0x8", + "blockHash": "0x687ad10bacdc5b9d7356c0d3d73ed42bd0d093dafa9c41d45b2804e16d0ec9c0", + "blockNumber": "0x55f6dc", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x143fbd", + "gasUsed": "0xcbce", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0x8424eb65f" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712313532, + "chain": 11155111, + "commit": "e3d86c3" +} \ No newline at end of file diff --git a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol new file mode 100644 index 00000000..e407e202 --- /dev/null +++ b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; +import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; + +import "./maptoken-usdc-configs.s.sol"; +import "../BridgeMigration.sol"; + +contract Migration__20240405_MapTokenUsdcMainchain is BridgeMigration, Migration__MapToken_Usdc_Config { + address internal _mainchainPauseEnforcer; + address internal _mainchainGatewayV3; + address internal _mainchainBridgeManager; + + MainchainBridgeAdminUtils _mainchainProposalUtils; + + function setUp() public override { + super.setUp(); + + _mainchainPauseEnforcer = 0x61eC0ebf966AE84C414BDA715E17CeF657e039DF; + _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + _mainchainBridgeManager = 0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d; + } + + function run() public { + address[] memory mainchainTokens = new address[](2); + address[] memory roninTokens = new address[](2); + Token.Standard[] memory standards = new Token.Standard[](2); + uint256[][4] memory thresholds; + thresholds[0] = new uint256[](2); + thresholds[1] = new uint256[](2); + thresholds[2] = new uint256[](2); + thresholds[3] = new uint256[](2); + + uint256 expiredTime = block.timestamp + 10 days; + address[] memory targets = new address[](2); + uint256[] memory values = new uint256[](2); + bytes[] memory calldatas = new bytes[](2); + uint256[] memory gasAmounts = new uint256[](2); + + // ================ USDC ERC-20 ====================== + + MockUSDC _mainchainUsdc = new USDCDeploy().run(); + + mainchainTokens[0] = address(_mainchainUsdc); + roninTokens[0] = _usdcRoninToken; + standards[0] = Token.Standard.ERC20; + thresholds[0][0] = _highTierThreshold; + thresholds[1][0] = _lockedThreshold; + thresholds[2][0] = _unlockFeePercentages; + thresholds[3][0] = _dailyWithdrawalLimit; + + mainchainTokens[1] = address(0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770); + roninTokens[1] = address(0); + standards[1] = Token.Standard(uint8(0)); + thresholds[0][1] = 0; + thresholds[1][1] = 0; + thresholds[2][1] = 0; + thresholds[3][1] = 0; + + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, ( + mainchainTokens, + roninTokens, + standards, + thresholds + )); + + bytes memory setEmergencyPauserInnerData = abi.encodeCall(GatewayV3.setEmergencyPauser, ( + _mainchainPauseEnforcer + )); + + vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); + address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)",innerData)); + address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)",setEmergencyPauserInnerData)); + + return; + + + + + + + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[0] = _mainchainGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + targets[1] = _mainchainGatewayV3; + values[1] = 0; + calldatas[1] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(GatewayV3.setEmergencyPauser, ( + _mainchainPauseEnforcer + ))); + gasAmounts[1] = 1_000_000; + + // ================ VERIFY AND EXECUTE PROPOSAL =============== + + uint256[] memory governorPKs = new uint256[](4); + governorPKs[3] = 0x00; + governorPKs[2] = 0x00; + governorPKs[0] = 0x00; + governorPKs[1] = 0x00; + + address[] memory governors = new address[](4); + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + _mainchainProposalUtils = new MainchainBridgeAdminUtils( + 2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0] + ); + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); + supports_[0] = Ballot.VoteType.For; + supports_[1] = Ballot.VoteType.For; + supports_[2] = Ballot.VoteType.For; + supports_[3] = Ballot.VoteType.For; + + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, governorPKs); + + vm.broadcast(governors[0]); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal(proposal, supports_, signatures); + } +} diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 8a3b34ec..e6ea2b0c 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -69,6 +69,7 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { _deployContractsOnMainchain(); _mainchainGatewayV3Initialize(); + // _mainchainPauseEnforcerInitialize(); _correctGVs(); _grantFundForGateway(); } @@ -129,6 +130,9 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { vm.broadcast(sender()); _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); + + vm.broadcast(sender()); + _mainchainGatewayV3.setEmergencyPauser(address(_mainchainPauseEnforcer)); } function _correctGVs() internal { diff --git a/script/20240403-deploy-sepolia/maptoken-usdc-configs.s.sol b/script/20240403-deploy-sepolia/maptoken-usdc-configs.s.sol new file mode 100644 index 00000000..79205270 --- /dev/null +++ b/script/20240403-deploy-sepolia/maptoken-usdc-configs.s.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__MapToken_Usdc_Config { + address constant _usdcRoninToken = address(0x067FBFf8990c58Ab90BaE3c97241C5d736053F77); + // address constant _usdcMainchainToken = address(0x3429d03c6F7521AeC737a0BBF2E5ddcef2C3Ae31); + + // The decimal of USDC token is 18 + uint256 constant _highTierThreshold = 900 * 1e6; + uint256 constant _lockedThreshold = 400 * 1e6; + // The MAX_PERCENTAGE is 100_0000 + uint256 constant _unlockFeePercentages = 10; // 0.001%. Max percentage is 1e6 so 10 is 0.001% (`10 / 1e6 = 0.001 * 100`) + uint256 constant _dailyWithdrawalLimit = 1000 * 1e6; + + // uint256 constant _usdcMinThreshold = 10 ether; + + address internal _governor = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // TODO: replace by address of the SV governor +} \ No newline at end of file diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 668b4804..fc1796de 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -54,7 +54,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _contractNameMap[Contract.WRON.key()] = "MockWrappedToken"; _contractNameMap[Contract.AXS.key()] = "MockERC20"; _contractNameMap[Contract.SLP.key()] = "MockERC20"; - _contractNameMap[Contract.USDC.key()] = "MockERC20"; + _contractNameMap[Contract.USDC.key()] = "MockUSDC"; _contractNameMap[Contract.RoninPauseEnforcer.key()] = "PauseEnforcer"; _contractNameMap[Contract.MainchainPauseEnforcer.key()] = "PauseEnforcer"; From a0e66069f4d2505d9a5547a4cac81127b7c272f8 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 8 Apr 2024 13:39:43 +0700 Subject: [PATCH 138/305] fix: typehash --- src/libraries/GlobalProposal.sol | 2 +- src/libraries/Proposal.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/GlobalProposal.sol b/src/libraries/GlobalProposal.sol index 823c8df7..fafab22d 100644 --- a/src/libraries/GlobalProposal.sol +++ b/src/libraries/GlobalProposal.sol @@ -29,7 +29,7 @@ library GlobalProposal { } // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); - bytes32 internal constant TYPE_HASH = 0x8fdb3bc7211cb44f39a2cae84127672c4570a00720dfbf2bb58285070faa28da; + bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a; /** * @dev Returns struct hash of the proposal. diff --git a/src/libraries/Proposal.sol b/src/libraries/Proposal.sol index b6aca9d8..e4a58469 100644 --- a/src/libraries/Proposal.sol +++ b/src/libraries/Proposal.sol @@ -36,7 +36,7 @@ library Proposal { } // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); - bytes32 internal constant TYPE_HASH = 0x98e2bc443e89d620038081eb862bc4dd7a26e2eba7a2a87201642f9419340a57; + bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12; /** * @dev Validates the proposal. From 04ea5251f49aa4c29fa5ecce8c2fab4b2ec1159d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 8 Apr 2024 13:39:53 +0700 Subject: [PATCH 139/305] chore: add chmod --- upload-sig.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 upload-sig.sh diff --git a/upload-sig.sh b/upload-sig.sh old mode 100644 new mode 100755 From 631700551beeda49ef2392bc9002d475dceaffe3 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 8 Apr 2024 14:01:20 +0700 Subject: [PATCH 140/305] chore: enable literal content --- foundry.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/foundry.toml b/foundry.toml index ce1b284d..4c96ae7a 100644 --- a/foundry.toml +++ b/foundry.toml @@ -5,10 +5,7 @@ optimizer = true optimizer_runs = 200 ffi = true -libs = [ - 'lib', - 'node_modules/hardhat', -] +libs = ['lib', 'node_modules/hardhat'] # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options @@ -17,6 +14,7 @@ extra_output = ["devdoc", "userdoc", "storagelayout"] fs_permissions = [{ access = "read-write", path = "./" }] evm_version = 'istanbul' verbosity = 4 +use_literal_content = true [profile.ronin] evm_version = 'istanbul' From aeeab87a7bae1be69f6ddbec17f68ef13012ab21 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 8 Apr 2024 14:56:47 +0700 Subject: [PATCH 141/305] chore: add usdc artifact --- deployments/sepolia/USDC.json | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/deployments/sepolia/USDC.json b/deployments/sepolia/USDC.json index 2fc4ba6c..42fab9d8 100644 --- a/deployments/sepolia/USDC.json +++ b/deployments/sepolia/USDC.json @@ -94,7 +94,7 @@ "internalType": "uint8" } ], - "stateMutability": "view" + "stateMutability": "pure" }, { "type": "function", @@ -305,15 +305,15 @@ "anonymous": false } ], - "address": "0x523E8d078BE0769e806b8a154F0f7ac6F4Cde770", + "address": "0x1C27983FBf738494F167A1eD31F2974ad45d28e4", "args": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", "ast": "", - "blockNumber": 5632711, - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", + "blockNumber": 5633519, + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600681526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220d98af5d0f19b4cc3b5dfb6a5df119742220a32a07bdcf9264500eebf07718a1464736f6c63430008170033", "chainId": 11155111, - "contractAbsolutePath": "MockERC20.sol", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", - "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "contractAbsolutePath": "MockUSDC.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600681526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220d98af5d0f19b4cc3b5dfb6a5df119742220a32a07bdcf9264500eebf07718a1464736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, "kind": "dev", @@ -328,7 +328,7 @@ "details": "See {IERC20-balanceOf}." }, "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + "details": "USDC always have decimal is 6" }, "decreaseAllowance(address,uint256)": { "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." @@ -362,46 +362,46 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC20.sol\":\"MockERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockERC20.sol\":{\"keccak256\":\"0x71616dc3d3c909e9f68e85aad48010a46c0a4fb217a55c8e265a0955fd40153a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://134f2a8eedd6a5ba48256ee3412e0e2847ab7cfff88f8fc7a38dde2483c4207e\",\"dweb:/ipfs/QmPBe1HH5v67qTomJXPYoanLh4fp7wbQLfhjzoWJTCsuYg\"]}},\"version\":1}", - "nonce": 7, - "numDeployments": 1, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"USDC always have decimal is 6\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockUSDC.sol\":\"MockUSDC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockUSDC.sol\":{\"keccak256\":\"0xf48ab25a06ee0dabceb570458a7cf800988349916e55d64f0e255c34da854c0d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cf2a1b266976ac0d672144c76c16267f02a238c974bde513aa28886d247ab2ba\",\"dweb:/ipfs/QmY4Fga5yuVKjrXooCkvt5Lui1PuLdJoKU7FtE8LngfEC8\"]}},\"version\":1}", + "nonce": 3, + "numDeployments": 2, "storageLayout": { "storage": [ { - "astId": 104082, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100546, + "contract": "src/mocks/token/MockUSDC.sol:MockUSDC", "label": "_balances", "offset": 0, "slot": "0", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 104088, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100552, + "contract": "src/mocks/token/MockUSDC.sol:MockUSDC", "label": "_allowances", "offset": 0, "slot": "1", "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 104090, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100554, + "contract": "src/mocks/token/MockUSDC.sol:MockUSDC", "label": "_totalSupply", "offset": 0, "slot": "2", "type": "t_uint256" }, { - "astId": 104092, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100556, + "contract": "src/mocks/token/MockUSDC.sol:MockUSDC", "label": "_name", "offset": 0, "slot": "3", "type": "t_string_storage" }, { - "astId": 104094, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100558, + "contract": "src/mocks/token/MockUSDC.sol:MockUSDC", "label": "_symbol", "offset": 0, "slot": "4", @@ -440,7 +440,7 @@ } } }, - "timestamp": 1712300364, + "timestamp": 1712310516, "userdoc": { "version": 1, "kind": "user" From d76980948f4aeb1ec9b94418b692c3a2eb765968 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Wed, 3 Apr 2024 11:25:58 +0700 Subject: [PATCH 142/305] forge install: foundry-deployment-kit v0.2.0 --- lib/foundry-deployment-kit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index 8c728424..2f48f7db 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit 8c728424858f8c8358f2e0f9374a6ea581f46486 +Subproject commit 2f48f7dbed4b99688ecd2b42109e3400d296b3a3 From 935acb3684ae1dbedd59492a4bf5801c180a30f0 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Thu, 4 Apr 2024 10:10:23 +0700 Subject: [PATCH 143/305] script: add post check --- foundry.toml | 2 + lib/forge-std | 2 +- remappings.txt | 2 +- .../20231218-maptoken-mainchain.s.sol | 42 +-- .../20231218-maptoken-roninchain.s.sol | 19 +- .../20240115-maptoken-mainchain.s.sol | 29 +- .../20240115-maptoken-roninchain.s.sol | 35 ++- .../20240131-maptoken-pixel-mainchain.s.sol | 32 +- .../20240131-maptoken-pixel-roninchain.s.sol | 24 +- .../maptoken-pixel-configs.s.sol | 2 +- .../update-axiechat-config.s.sol | 16 +- .../20240206-maptoken-banana-mainchain.s.sol | 33 +- .../20240206-maptoken-banana-roninchain.s.sol | 67 ++-- .../changeGV-stablenode-config.s.sol | 2 +- script/BaseMigrationV2.sol | 47 --- script/BridgeMigration.sol | 142 --------- script/GeneralConfig.sol | 40 ++- script/GeneralConfigExtended.sol | 53 ---- script/Migration.s.sol | 169 ++++++++-- script/PostChecker.sol | 37 +++ .../MainchainBridgeManagerDeploy.s.sol | 20 -- .../MainchainWethUnwrapperDeploy.s.sol | 7 +- .../deploy-v0.3.1/01_Deploy_RoninBridge.s.sol | 104 +++++++ .../02_Deploy_MainchainBridge.s.sol | 76 +++++ script/deploy-v0.3.1/Deploy.v0.3.1.s.sol | 46 +++ .../IGeneralConfigExtended.sol | 7 +- script/interfaces/ISharedArgument.sol | 4 +- script/libraries/LibArray.sol | 23 +- script/post-check/BasePostCheck.s.sol | 35 +++ .../BridgeManager.post_check.tree | 66 ++++ .../PostCheck_BridgeManager.s.sol | 18 ++ ...ridgeManager_CRUD_addBridgeOperators.s.sol | 119 +++++++ ...geManager_CRUD_removeBridgeOperators.s.sol | 81 +++++ .../PostCheck_BridgeManager_Proposal.s.sol | 97 ++++++ script/shared/libraries/LibArray.sol | 293 ++++++++++++++++++ .../shared/libraries/LibCompanionNetwork.sol | 36 +++ script/shared/libraries/LibProposal.sol | 269 ++++++++++++++++ script/shared/libraries/LibRandom.sol | 49 +++ script/shared/libraries/LibTimeWarper.sol | 41 +++ script/utils/Contract.sol | 2 +- script/utils/Network.sol | 11 +- src/extensions/GatewayV3.sol | 10 +- src/extensions/MinimumWithdrawal.sol | 2 +- src/extensions/RONTransferHelper.sol | 10 +- .../TransparentUpgradeableProxyV2.sol | 14 +- src/extensions/WithdrawalLimitation.sol | 34 +- .../BridgeTrackingHelper.sol | 6 +- src/interfaces/IBridgeAdminProposal.sol | 5 +- src/interfaces/IMainchainGatewayV3.sol | 11 +- src/interfaces/IQuorum.sol | 13 +- src/interfaces/IRoninGatewayV3.sol | 11 +- .../bridge/IBridgeManagerCallback.sol | 11 +- src/interfaces/bridge/IBridgeSlash.sol | 8 +- src/interfaces/bridge/IBridgeTracking.sol | 5 +- .../validator/ICandidateManager.sol | 7 +- .../validator/ICoinbaseExecution.sol | 40 +-- src/interfaces/validator/IEmergencyExit.sol | 13 +- .../validator/IRoninValidatorSet.sol | 8 +- .../validator/info-fragments/IJailingInfo.sol | 9 +- src/libraries/BridgeOperatorsBallot.sol | 5 +- src/libraries/GlobalProposal.sol | 15 +- src/libraries/Token.sol | 34 +- src/mocks/ronin/MockBridgeReward.sol | 23 +- src/mocks/ronin/MockBridgeSlash.sol | 6 +- .../ronin/MockRoninGatewayV3Extended.sol | 16 +- src/mocks/types/MockTUint256Slot.sol | 3 +- src/ronin/gateway/BridgeSlash.sol | 40 +-- src/ronin/gateway/BridgeTracking.sol | 5 +- src/ronin/gateway/PauseEnforcer.sol | 2 +- src/ronin/gateway/RoninGatewayV3.sol | 53 +--- src/utils/ContractType.sol | 48 ++- src/utils/IdentityGuard.sol | 4 +- src/utils/RoleAccess.sol | 33 +- test/bridge/integration/BaseIntegration.t.sol | 4 +- ...IsApprovedInLastEpoch.BridgeTracking.t.sol | 6 +- ...otApprovedInLastEpoch.BridgeTracking.t.sol | 15 +- ...l.MainchainGatewayV3.erc20.benchmark.t.sol | 2 +- .../emergencyAction.PauseEnforcer.t.sol | 3 +- .../set-config/setConfig.PauseEnforcer.t.sol | 3 +- .../depositVote.RoninGatewayV3.t.sol | 1 - .../concrete/bridge-manager/constructor.t.sol | 15 +- .../fuzz/bridge-manager/BridgeReward.t.sol | 50 +-- .../fuzz/bridge-manager/BridgeSlash.t.sol | 96 ++---- test/helpers/LibArrayUtils.t.sol | 8 +- test/helpers/Randomizer.t.sol | 11 +- test/mocks/MockBridgeSlash.sol | 22 +- test/mocks/MockBridgeTracking.sol | 18 +- 87 files changed, 1970 insertions(+), 987 deletions(-) delete mode 100644 script/BaseMigrationV2.sol delete mode 100644 script/BridgeMigration.sol delete mode 100644 script/GeneralConfigExtended.sol create mode 100644 script/PostChecker.sol create mode 100644 script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol create mode 100644 script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol create mode 100644 script/deploy-v0.3.1/Deploy.v0.3.1.s.sol rename script/{ => interfaces}/IGeneralConfigExtended.sol (62%) create mode 100644 script/post-check/BasePostCheck.s.sol create mode 100644 script/post-check/bridge-manager/BridgeManager.post_check.tree create mode 100644 script/post-check/bridge-manager/PostCheck_BridgeManager.s.sol create mode 100644 script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol create mode 100644 script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_removeBridgeOperators.s.sol create mode 100644 script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol create mode 100644 script/shared/libraries/LibArray.sol create mode 100644 script/shared/libraries/LibCompanionNetwork.sol create mode 100644 script/shared/libraries/LibProposal.sol create mode 100644 script/shared/libraries/LibRandom.sol create mode 100644 script/shared/libraries/LibTimeWarper.sol diff --git a/foundry.toml b/foundry.toml index 4c96ae7a..b8e519be 100644 --- a/foundry.toml +++ b/foundry.toml @@ -55,7 +55,9 @@ runs = 1_000 runs = 1_000 [rpc_endpoints] +localhost = "http://localhost:8545" ethereum = "https://eth.llamarpc.com" +sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}" goerli = "https://ethereum-goerli.publicnode.com" ronin-mainnet = "https://api-partner.roninchain.com/rpc" ronin-testnet = "https://saigon-archive.roninchain.com/rpc" diff --git a/lib/forge-std b/lib/forge-std index 4d9985c9..e4aef94c 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 4d9985c9fb046e5c8572bb173662109aae09d7de +Subproject commit e4aef94c1768803a16fe19f7ce8b65defd027cfd diff --git a/remappings.txt b/remappings.txt index 9b4fbfd9..7caef984 100644 --- a/remappings.txt +++ b/remappings.txt @@ -8,4 +8,4 @@ hardhat/=node_modules/hardhat/ @prb/test/=lib/prb-test/src/ @prb/math/=lib/prb-math/ solady/=lib/solady/src/ -foundry-deployment-kit/=lib/foundry-deployment-kit/script/ +@fdk/=lib/foundry-deployment-kit/script/ diff --git a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol index ac16b2e6..c6d92467 100644 --- a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol @@ -3,18 +3,23 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; -import { Network } from "../utils/Network.sol"; +import { Migration } from "../Migration.s.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { LibArray } from "script/shared/libraries/LibArray.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; + +contract Migration__20231215_MapTokenMainchain is Migration { + using LibArray for *; + using LibProposal for *; + using LibCompanionNetwork for *; -contract Migration__20231215_MapTokenMainchain is BridgeMigration { RoninBridgeManager internal _roninBridgeManager; address constant _aggRoninToken = address(0x294311a8C37F0744F99EB152c419D4D3D6FEC1C7); address constant _aggMainchainToken = address(0xFB0489e9753B045DdB35e39c6B0Cc02EC6b99AC5); @@ -30,8 +35,8 @@ contract Migration__20231215_MapTokenMainchain is BridgeMigration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); + _roninBridgeManager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); } function run() public { @@ -66,20 +71,21 @@ contract Migration__20231215_MapTokenMainchain is BridgeMigration { bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); uint256 expiredTime = block.timestamp + 10 days; - address[] memory targets = new address[](1); - targets[0] = _mainchainGatewayV3; + address[] memory targets = _mainchainGatewayV3.toSingletonArray(); uint256[] memory values = new uint256[](1); - values[0] = 0; - bytes[] memory calldatas = new bytes[](1); - calldatas[0] = proxyData; - uint256[] memory gasAmounts = new uint256[](1); - gasAmounts[0] = 1_000_000; - - _verifyMainchainProposalGasAmount(targets, values, calldatas, gasAmounts); + bytes[] memory calldatas = proxyData.toSingletonArray(); + uint256[] memory gasAmounts = uint256(1_000_000).toSingletonArray(); - uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + uint256 companionChainId = block.chainid; + LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + config.switchTo(currentNetwork); vm.broadcast(sender()); - _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(companionChainId, expiredTime, targets, values, calldatas, gasAmounts); } } diff --git a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol index 9a7d2a2c..7ce9d7b3 100644 --- a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol @@ -3,17 +3,20 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { Migration } from "../Migration.s.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; -contract Migration__20231215_MapTokenRoninchain is BridgeMigration { +contract Migration__20231215_MapTokenRoninchain is Migration { + using LibProposal for *; + RoninBridgeManager internal _roninBridgeManager; address constant _aggRoninToken = address(0x294311a8C37F0744F99EB152c419D4D3D6FEC1C7); address constant _aggMainchainToken = address(0xFB0489e9753B045DdB35e39c6B0Cc02EC6b99AC5); @@ -21,8 +24,8 @@ contract Migration__20231215_MapTokenRoninchain is BridgeMigration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _roninBridgeManager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = loadContract(Contract.RoninGatewayV3.key()); } function run() public { @@ -31,7 +34,7 @@ contract Migration__20231215_MapTokenRoninchain is BridgeMigration { address[] memory mainchainTokens = new address[](1); mainchainTokens[0] = _aggMainchainToken; uint256[] memory chainIds = new uint256[](1); - chainIds[0] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[0] = config.getNetworkData(config.getCompanionNetwork(network())).chainId; Token.Standard[] memory standards = new Token.Standard[](1); standards[0] = Token.Standard.ERC20; @@ -54,7 +57,7 @@ contract Migration__20231215_MapTokenRoninchain is BridgeMigration { uint256[] memory gasAmounts = new uint256[](1); gasAmounts[0] = 1_000_000; - _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); + LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); vm.broadcast(sender()); _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index 18cde061..fa9dc042 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -3,19 +3,18 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; -import { Network } from "../utils/Network.sol"; +import { Migration } from "../Migration.s.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; -contract Migration__MapTokenMainchain is BridgeMigration { +contract Migration__MapTokenMainchain is Migration { RoninBridgeManager internal _roninBridgeManager; address constant _pixelRoninToken = address(0x8b50c162494567B3c8B7F00F6031341861c8dEeD); @@ -42,10 +41,9 @@ contract Migration__MapTokenMainchain is BridgeMigration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); - _mainchainBridgeManager = - _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainBridgeManager.key()); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _mainchainGatewayV3 = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainBridgeManager.key()); } function _mapFarmlandToken() internal pure returns (bytes memory) { @@ -147,11 +145,16 @@ contract Migration__MapTokenMainchain is BridgeMigration { calldatas[3] = _addAxieChatGovernorAddress(); gasAmounts[3] = 1_000_000; - _verifyMainchainProposalGasAmount(targets, values, calldatas, gasAmounts); - - uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + uint256 companionChainId = block.chainid; + LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + config.switchTo(currentNetwork); vm.broadcast(sender()); - _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(companionChainId, expiredTime, targets, values, calldatas, gasAmounts); } } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index 07e09cce..91f1e3ae 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -3,18 +3,21 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; -import { Network } from "../utils/Network.sol"; +import { Migration } from "../Migration.s.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; -contract Migration__MapTokenRoninchain is BridgeMigration { +contract Migration__MapTokenRoninchain is Migration { + using LibProposal for *; + using LibCompanionNetwork for *; + RoninBridgeManager internal _roninBridgeManager; address constant _pixelRoninToken = address(0x8b50c162494567B3c8B7F00F6031341861c8dEeD); @@ -32,24 +35,25 @@ contract Migration__MapTokenRoninchain is BridgeMigration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); } - function _mapTokens() internal view returns (bytes memory) { + function _mapTokens() internal returns (bytes memory) { address[] memory mainchainTokens = new address[](2); address[] memory roninTokens = new address[](2); uint256[] memory chainIds = new uint256[](2); Token.Standard[] memory standards = new Token.Standard[](2); + uint256 companionChainId = network().companionChainId(); mainchainTokens[0] = _farmlandMainchainToken; roninTokens[0] = _farmlandRoninToken; - chainIds[0] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[0] = companionChainId; standards[0] = Token.Standard.ERC721; mainchainTokens[1] = _pixelMainchainToken; roninTokens[1] = _pixelRoninToken; - chainIds[1] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[1] = companionChainId; standards[1] = Token.Standard.ERC20; // function mapTokens( @@ -114,9 +118,16 @@ contract Migration__MapTokenRoninchain is BridgeMigration { calldatas[2] = _addAxieChatGovernorAddress(); gasAmounts[2] = 1_000_000; - _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + uint256 companionChainId = block.chainid; + LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + config.switchTo(currentNetwork); vm.broadcast(sender()); - _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, targets, values, calldatas, gasAmounts); } } diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol index 3c81b866..4bea0602 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol @@ -3,21 +3,23 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; -import { Network } from "../utils/Network.sol"; +import { Migration } from "../Migration.s.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; import "./maptoken-pixel-configs.s.sol"; import "./update-axiechat-config.s.sol"; -contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migration__MapToken_Pixel_Config, Migration__Update_AxieChat_Config { +contract Migration__20240131_MapTokenPixelMainchain is Migration, Migration__MapToken_Pixel_Config, Migration__Update_AxieChat_Config { + using LibProposal for *; + RoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; @@ -25,10 +27,9 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); - _mainchainBridgeManager = - _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainBridgeManager.key()); + _roninBridgeManager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _mainchainGatewayV3 = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainBridgeManager.key()); } function run() public { @@ -111,11 +112,16 @@ contract Migration__20240131_MapTokenPixelMainchain is BridgeMigration, Migratio // ================ VERIFY AND EXECUTE PROPOSAL =============== - _verifyMainchainProposalGasAmount(targets, values, calldatas, gasAmounts); - - uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + uint256 companionChainId = block.chainid; + LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + config.switchTo(currentNetwork); vm.broadcast(_governor); - _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(companionChainId, expiredTime, targets, values, calldatas, gasAmounts); } } diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol index 96c309bb..65e24b72 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; @@ -13,24 +13,25 @@ import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; +import { Migration } from "../Migration.s.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; - +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; import "forge-std/console2.sol"; import "./maptoken-pixel-configs.s.sol"; import "./update-axiechat-config.s.sol"; -contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migration__MapToken_Pixel_Config, Migration__Update_AxieChat_Config { +contract Migration__20240131_MapTokenPixelRoninchain is Migration, Migration__MapToken_Pixel_Config, Migration__Update_AxieChat_Config { + using LibProposal for *; + RoninBridgeManager internal _roninBridgeManager; address internal _roninGatewayV3; function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _roninBridgeManager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = loadContract(Contract.RoninGatewayV3.key()); _cheatWeightOperator(_governor); } @@ -60,12 +61,12 @@ contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migrati roninTokens[0] = _pixelRoninToken; mainchainTokens[0] = _pixelMainchainToken; - chainIds[0] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[0] = config.getNetworkData(config.getCompanionNetwork(network())).chainId; standards[0] = Token.Standard.ERC20; roninTokens[1] = _farmlandRoninToken; mainchainTokens[1] = _farmlandMainchainToken; - chainIds[1] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[1] = config.getNetworkData(config.getCompanionNetwork(network())).chainId; standards[1] = Token.Standard.ERC721; // function mapTokens( @@ -116,10 +117,9 @@ contract Migration__20240131_MapTokenPixelRoninchain is BridgeMigration, Migrati gasAmounts[3] = 1_000_000; // ================ VERIFY AND EXECUTE PROPOSAL =============== - - _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); + LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); vm.broadcast(_governor); - _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, targets, values, calldatas, gasAmounts); } } diff --git a/script/20240131-maptoken-pixel/maptoken-pixel-configs.s.sol b/script/20240131-maptoken-pixel/maptoken-pixel-configs.s.sol index 7ba0fbfd..0ef79aa9 100644 --- a/script/20240131-maptoken-pixel/maptoken-pixel-configs.s.sol +++ b/script/20240131-maptoken-pixel/maptoken-pixel-configs.s.sol @@ -21,4 +21,4 @@ contract Migration__MapToken_Pixel_Config { uint256 constant _aggMinThreshold = 1000 ether; address internal _governor = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // TODO: replace by address of the SV governor -} \ No newline at end of file +} diff --git a/script/20240131-maptoken-pixel/update-axiechat-config.s.sol b/script/20240131-maptoken-pixel/update-axiechat-config.s.sol index 85afd74d..485ac114 100644 --- a/script/20240131-maptoken-pixel/update-axiechat-config.s.sol +++ b/script/20240131-maptoken-pixel/update-axiechat-config.s.sol @@ -7,7 +7,7 @@ contract Migration__Update_AxieChat_Config { address constant _axieChatBridgeOperator = address(0x772112C7e5dD4ed663e844e79d77c1569a2E88ce); address constant _axieChatGovernor = address(0x5832C3219c1dA998e828E1a2406B73dbFC02a70C); - function _removeAxieChatGovernorAddress() pure internal returns (bytes memory) { + function _removeAxieChatGovernorAddress() internal pure returns (bytes memory) { address[] memory bridgeOperator = new address[](1); bridgeOperator[0] = _axieChatBridgeOperator; @@ -15,12 +15,10 @@ contract Migration__Update_AxieChat_Config { // address[] calldata bridgeOperators // ) - return abi.encodeCall(IBridgeManager.removeBridgeOperators, ( - bridgeOperator - )); + return abi.encodeCall(IBridgeManager.removeBridgeOperators, (bridgeOperator)); } - function _addAxieChatGovernorAddress() pure internal returns (bytes memory) { + function _addAxieChatGovernorAddress() internal pure returns (bytes memory) { uint96[] memory voteWeight = new uint96[](1); address[] memory governor = new address[](1); address[] memory bridgeOperator = new address[](1); @@ -35,10 +33,6 @@ contract Migration__Update_AxieChat_Config { // address[] calldata bridgeOperators // ) - return abi.encodeCall(IBridgeManager.addBridgeOperators, ( - voteWeight, - governor, - bridgeOperator - )); + return abi.encodeCall(IBridgeManager.addBridgeOperators, (voteWeight, governor, bridgeOperator)); } -} \ No newline at end of file +} diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index d5b28654..23d7526a 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -3,17 +3,16 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; -import { Network } from "../utils/Network.sol"; -import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; +import { Migration } from "../Migration.s.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; import "./maptoken-banana-configs.s.sol"; import "./maptoken-genkai-configs.s.sol"; @@ -21,7 +20,7 @@ import "./maptoken-vx-configs.s.sol"; import "./changeGV-stablenode-config.s.sol"; contract Migration__20240206_MapTokenBananaMainchain is - BridgeMigration, + Migration, Migration__MapToken_Banana_Config, Migration__MapToken_Vx_Config, Migration__MapToken_Genkai_Config, @@ -31,13 +30,12 @@ contract Migration__20240206_MapTokenBananaMainchain is address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; - function setUp() public override { + function setUp() public virtual override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); - _mainchainBridgeManager = - _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainBridgeManager.key()); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _mainchainGatewayV3 = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainBridgeManager.key()); } function run() public onlyOn(DefaultNetwork.RoninMainnet.key()) { @@ -140,13 +138,18 @@ contract Migration__20240206_MapTokenBananaMainchain is // ================ VERIFY AND EXECUTE PROPOSAL =============== - _verifyMainchainProposalGasAmount(targets, values, calldatas, gasAmounts); - - uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + uint256 companionChainId = block.chainid; + LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + config.switchTo(currentNetwork); console2.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); - _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(companionChainId, expiredTime, targets, values, calldatas, gasAmounts); } } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index f0a2bdb8..a332d93d 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -1,26 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {console2} from "forge-std/console2.sol"; -import {StdStyle} from "forge-std/StdStyle.sol"; -import {BaseMigration} from "foundry-deployment-kit/BaseMigration.s.sol"; -import {DefaultNetwork} from "foundry-deployment-kit/utils/DefaultNetwork.sol"; - -import {RoninBridgeManager} from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -import {IRoninGatewayV3} from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; -import {MinimumWithdrawal} from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; -import {Token} from "@ronin/contracts/libraries/Token.sol"; -import {Ballot} from "@ronin/contracts/libraries/Ballot.sol"; -import {GlobalProposal} from "@ronin/contracts/libraries/GlobalProposal.sol"; -import {Proposal} from "@ronin/contracts/libraries/Proposal.sol"; - -import {Contract} from "../utils/Contract.sol"; -import {BridgeMigration} from "../BridgeMigration.sol"; -import {Network} from "../utils/Network.sol"; -import {Contract} from "../utils/Contract.sol"; -import {IGeneralConfigExtended} from "../IGeneralConfigExtended.sol"; - -import "forge-std/console2.sol"; +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; + +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; +import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; + +import { Contract } from "../utils/Contract.sol"; +import { Migration } from "../Migration.s.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { Contract } from "../utils/Contract.sol"; import "./maptoken-banana-configs.s.sol"; import "./maptoken-genkai-configs.s.sol"; @@ -28,12 +26,15 @@ import "./maptoken-vx-configs.s.sol"; import "./changeGV-stablenode-config.s.sol"; contract Migration__20240206_MapTokenBananaRoninChain is - BridgeMigration, + Migration, Migration__MapToken_Banana_Config, Migration__MapToken_Vx_Config, Migration__MapToken_Genkai_Config, Migration__ChangeGV_StableNode_Config { + using LibProposal for *; + using LibCompanionNetwork for *; + RoninBridgeManager internal _roninBridgeManager; address internal _roninGatewayV3; @@ -45,10 +46,10 @@ contract Migration__20240206_MapTokenBananaRoninChain is address aggMainchainToken = 0xFB0489e9753B045DdB35e39c6B0Cc02EC6b99AC5; uint256 aggMinThreshold = 1000 ether; - function setUp() public override { + function setUp() public virtual override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); } function _cheatWeightOperator(address gov) internal { @@ -74,19 +75,20 @@ contract Migration__20240206_MapTokenBananaRoninChain is // ============= MAP NEW BANANA, VX, GENKAI TOKEN =========== + uint256 companionChainId = network().companionChainId(); roninTokens[0] = _bananaRoninToken; mainchainTokens[0] = _bananaMainchainToken; - chainIds[0] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[0] = companionChainId; standards[0] = Token.Standard.ERC20; roninTokens[1] = _VxRoninToken; mainchainTokens[1] = _VxMainchainToken; - chainIds[1] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[1] = companionChainId; standards[1] = Token.Standard.ERC721; roninTokens[2] = _genkaiRoninToken; mainchainTokens[2] = _genkaiMainchainToken; - chainIds[2] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[2] = companionChainId; standards[2] = Token.Standard.ERC721; // function mapTokens( @@ -95,8 +97,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is // uint256[] calldata chainIds, // Token.Standard[] calldata _standards // ) - bytes memory innerData = - abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); targets[0] = _roninGatewayV3; @@ -148,7 +149,13 @@ contract Migration__20240206_MapTokenBananaRoninChain is // ================ VERIFY AND EXECUTE PROPOSAL =============== - _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + config.switchTo(currentNetwork); console2.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); diff --git a/script/20240206-maptoken-banana/changeGV-stablenode-config.s.sol b/script/20240206-maptoken-banana/changeGV-stablenode-config.s.sol index ce9ce487..d727a47b 100644 --- a/script/20240206-maptoken-banana/changeGV-stablenode-config.s.sol +++ b/script/20240206-maptoken-banana/changeGV-stablenode-config.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {IBridgeManager} from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; contract Migration__ChangeGV_StableNode_Config { address constant _stableNodeBridgeOperator = address(0x564DcB855Eb360826f27D1Eb9c57cbbe6C76F50F); diff --git a/script/BaseMigrationV2.sol b/script/BaseMigrationV2.sol deleted file mode 100644 index df622324..00000000 --- a/script/BaseMigrationV2.sol +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.23; - -import "foundry-deployment-kit/BaseMigration.s.sol"; - -abstract contract BaseMigrationV2 is BaseMigration { - using StdStyle for *; - using LibString for bytes32; - using LibProxy for address payable; - - function _deployProxy(TContract contractType, bytes memory args) - internal - virtual - override - logFn(string.concat("_deployProxy ", TContract.unwrap(contractType).unpackOne())) - returns (address payable deployed) - { - string memory contractName = CONFIG.getContractName(contractType); - - address logic = _deployLogic(contractType); - string memory proxyAbsolutePath = "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2"; - uint256 proxyNonce; - address proxyAdmin = _getProxyAdmin(); - assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); - - (deployed, proxyNonce) = _deployRaw(proxyAbsolutePath, abi.encode(logic, proxyAdmin, args)); - - // validate proxy admin - address actualProxyAdmin = deployed.getProxyAdmin(); - assertEq( - actualProxyAdmin, - proxyAdmin, - string.concat( - "BaseMigration: Invalid proxy admin\n", - "Actual: ", - vm.toString(actualProxyAdmin), - "\nExpected: ", - vm.toString(proxyAdmin) - ) - ); - - CONFIG.setAddress(network(), contractType, deployed); - ARTIFACT_FACTORY.generateArtifact( - sender(), deployed, proxyAbsolutePath, string.concat(contractName, "Proxy"), args, proxyNonce - ); - } -} diff --git a/script/BridgeMigration.sol b/script/BridgeMigration.sol deleted file mode 100644 index 4cde39f8..00000000 --- a/script/BridgeMigration.sol +++ /dev/null @@ -1,142 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import { console2 } from "forge-std/console2.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; -import { TNetwork } from "foundry-deployment-kit/types/Types.sol"; - - -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -import { ErrorHandler } from "@ronin/contracts/libraries/ErrorHandler.sol"; -import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; - -import { GeneralConfigExtended } from "./GeneralConfigExtended.sol"; -import { IGeneralConfigExtended } from "./IGeneralConfigExtended.sol"; -import { Network } from "./utils/Network.sol"; -import { Contract } from "./utils/Contract.sol"; -import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; - -contract BridgeMigration is BaseMigration { - using ErrorHandler for bool; - - error ErrProposalOutOfGas(bytes4 sig, uint256 expectedGas); - - IGeneralConfigExtended internal constant _config = IGeneralConfigExtended(address(CONFIG)); - - function _configByteCode() internal virtual override returns (bytes memory) { - return abi.encodePacked(type(GeneralConfigExtended).creationCode); - } - - function _sharedArguments() internal virtual override returns (bytes memory rawArgs) { - return ""; - } - - function _verifyGlobalProposalGasAmount( - GlobalProposal.TargetOption[] memory targetOptions, - uint256[] memory values, - bytes[] memory calldatas, - uint256[] memory gasAmounts - ) internal { - address[] memory roninTargets = new address[](targetOptions.length); - address[] memory mainchainTargets = new address[](targetOptions.length); - for (uint i; i < roninTargets.length; i++) { - roninTargets[i] = _resolveRoninTarget(targetOptions[i]); - mainchainTargets[i] = _resolveMainchainTarget(targetOptions[i]); - } - _verifyRoninProposalGasAmount(roninTargets, values, calldatas, gasAmounts); - _verifyMainchainProposalGasAmount(mainchainTargets, values, calldatas, gasAmounts); - } - - function _resolveRoninTarget(GlobalProposal.TargetOption targetOption) internal returns (address) { - _config.switchTo(DefaultNetwork.RoninMainnet.key()); - if (targetOption == GlobalProposal.TargetOption.BridgeManager) - return _config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); - - if (targetOption == GlobalProposal.TargetOption.GatewayContract) - return _config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); - - if (targetOption == GlobalProposal.TargetOption.BridgeReward) - return _config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); - - if (targetOption == GlobalProposal.TargetOption.BridgeSlash) - return _config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - - if (targetOption == GlobalProposal.TargetOption.BridgeTracking) - return _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - - return address(0); - } - - function _resolveMainchainTarget(GlobalProposal.TargetOption targetOption) internal returns (address) { - _config.createFork(Network.EthMainnet.key()); - _config.switchTo(Network.EthMainnet.key()); - if (targetOption == GlobalProposal.TargetOption.BridgeManager) - return _config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); - - if (targetOption == GlobalProposal.TargetOption.GatewayContract) - return _config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); - - return address(0); - } - - function _verifyRoninProposalGasAmount( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - uint256[] memory gasAmounts - ) internal { - _config.switchTo(DefaultNetwork.RoninMainnet.key()); - - address roninBridgeManager = _config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); - uint256 snapshotId = vm.snapshot(); - vm.startPrank(address(roninBridgeManager)); - _verifyProposalGasAmount(roninBridgeManager, targets, values, calldatas, gasAmounts); - vm.stopPrank(); - vm.revertTo(snapshotId); - } - - function _verifyMainchainProposalGasAmount( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - uint256[] memory gasAmounts - ) internal { - _config.createFork(Network.EthMainnet.key()); - _config.switchTo(Network.EthMainnet.key()); - - address mainchainBridgeManager = _config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); - uint256 snapshotId = vm.snapshot(); - - vm.startPrank(address(mainchainBridgeManager)); - _verifyProposalGasAmount(mainchainBridgeManager, targets, values, calldatas, gasAmounts); - vm.stopPrank(); - vm.revertTo(snapshotId); - - _config.switchTo(DefaultNetwork.RoninMainnet.key()); - } - - function _verifyProposalGasAmount( - address bridgeManager, - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - uint256[] memory gasAmounts - ) private { - for (uint256 i; i < targets.length; i++) { - vm.deal(address(bridgeManager), values[i]); - uint256 gasUsed = gasleft(); - (bool success, bytes memory returnOrRevertData) = targets[i].call{ value: values[i] }(calldatas[i]); - gasUsed = gasUsed - gasleft(); - if (success) { - console2.log("Call", i, ": gasUsed", gasUsed); - } else { - console2.log("Call", i, unicode": reverted. ❗ GasUsed", gasUsed); - } - success.handleRevert(bytes4(calldatas[i]), returnOrRevertData); - - if (gasUsed > gasAmounts[i]) { - revert ErrProposalOutOfGas(bytes4(calldatas[i]), gasUsed); - } - } - } -} \ No newline at end of file diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 7e2dbfdc..e5e29e1d 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -2,10 +2,10 @@ pragma solidity ^0.8.23; import { console2 as console } from "forge-std/console2.sol"; -import { BaseGeneralConfig } from "foundry-deployment-kit/BaseGeneralConfig.sol"; -import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; +import { BaseGeneralConfig } from "@fdk/BaseGeneralConfig.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { Contract } from "./utils/Contract.sol"; -import { Network } from "./utils/Network.sol"; +import { TNetwork, Network } from "./utils/Network.sol"; import { Utils } from "./utils/Utils.sol"; contract GeneralConfig is BaseGeneralConfig, Utils { @@ -38,11 +38,28 @@ contract GeneralConfig is BaseGeneralConfig, Utils { ); } + function getCompanionNetwork(TNetwork network) public view virtual returns (TNetwork companionNetwork) { + if (network == DefaultNetwork.RoninMainnet.key()) { + return Network.EthMainnet.key(); + } else if (network == Network.EthMainnet.key()) { + return DefaultNetwork.RoninMainnet.key(); + } else if (network == DefaultNetwork.RoninTestnet.key()) { + return Network.Goerli.key(); + } else if (network == Network.Goerli.key()) { + return DefaultNetwork.RoninTestnet.key(); + } else if (network == DefaultNetwork.Local.key()) { + return DefaultNetwork.Local.key(); + } + + return network; + } + function _setUpContracts() internal virtual override { // map contract name - _mapContractName(Contract.BridgeTracking); _mapContractName(Contract.BridgeSlash); + _mapContractName(Contract.MockERC721); _mapContractName(Contract.BridgeReward); + _mapContractName(Contract.BridgeTracking); _mapContractName(Contract.RoninGatewayV3); _mapContractName(Contract.RoninBridgeManager); _mapContractName(Contract.MainchainGatewayV3); @@ -50,16 +67,25 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _mapContractName(Contract.MockERC721); _mapContractName(Contract.RoninBridgeManagerConstructor); - _contractNameMap[Contract.WETH.key()] = "MockWrappedToken"; - _contractNameMap[Contract.WRON.key()] = "MockWrappedToken"; _contractNameMap[Contract.AXS.key()] = "MockERC20"; _contractNameMap[Contract.SLP.key()] = "MockERC20"; _contractNameMap[Contract.USDC.key()] = "MockERC20"; + _contractNameMap[Contract.WRON.key()] = "MockWrappedToken"; + _contractNameMap[Contract.WETH.key()] = "MockWrappedToken"; + _contractNameMap[Contract.MainchainWethUnwrapper.key()] = "WethUnwrapper"; _contractNameMap[Contract.RoninPauseEnforcer.key()] = "PauseEnforcer"; _contractNameMap[Contract.MainchainPauseEnforcer.key()] = "PauseEnforcer"; - _contractNameMap[Contract.MainchainWethUnwrapper.key()] = "WethUnwrapper"; + _contractAddrMap[Network.Goerli.chainId()][Contract.WETH.name()] = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; + _contractAddrMap[Network.Sepolia.chainId()][Contract.WETH.name()] = 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9; + _contractAddrMap[Network.EthMainnet.chainId()][Contract.WETH.name()] = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; + + _contractAddrMap[DefaultNetwork.RoninMainnet.chainId()][Contract.WETH.name()] = 0xc99a6A985eD2Cac1ef41640596C5A5f9F4E19Ef5; + _contractAddrMap[DefaultNetwork.RoninMainnet.chainId()][Contract.WRON.name()] = 0xe514d9DEB7966c8BE0ca922de8a064264eA6bcd4; + + _contractAddrMap[DefaultNetwork.RoninTestnet.chainId()][Contract.WETH.name()] = 0x29C6F8349A028E1bdfC68BFa08BDee7bC5D47E16; + _contractAddrMap[DefaultNetwork.RoninTestnet.chainId()][Contract.WRON.name()] = 0xA959726154953bAe111746E265E6d754F48570E6; } function _mapContractName(Contract contractEnum) internal { diff --git a/script/GeneralConfigExtended.sol b/script/GeneralConfigExtended.sol deleted file mode 100644 index 1d2f5ccb..00000000 --- a/script/GeneralConfigExtended.sol +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import { console2 as console } from "forge-std/console2.sol"; -import { TContract } from "foundry-deployment-kit/types/Types.sol"; -import { BaseGeneralConfig } from "foundry-deployment-kit/BaseGeneralConfig.sol"; -import { TNetwork } from "foundry-deployment-kit/types/Types.sol"; -import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; -import { Network } from "./utils/Network.sol"; -import { Contract } from "./utils/Contract.sol"; - -contract GeneralConfigExtended is BaseGeneralConfig { - constructor() BaseGeneralConfig("", "deployments/") { } - - function _setUpNetworks() internal virtual override { - setNetworkInfo( - Network.Goerli.chainId(), - Network.Goerli.key(), - Network.Goerli.chainAlias(), - Network.Goerli.deploymentDir(), - Network.Goerli.envLabel(), - Network.Goerli.explorer() - ); - setNetworkInfo( - Network.EthMainnet.chainId(), - Network.EthMainnet.key(), - Network.EthMainnet.chainAlias(), - Network.EthMainnet.deploymentDir(), - Network.EthMainnet.envLabel(), - Network.EthMainnet.explorer() - ); - } - - function _setUpContracts() internal virtual override { - _mapContractname(Contract.BridgeReward); - _mapContractname(Contract.BridgeSlash); - _mapContractname(Contract.BridgeTracking); - _mapContractname(Contract.RoninBridgeManager); - _mapContractname(Contract.RoninGatewayV3); - _mapContractname(Contract.MainchainBridgeManager); - _mapContractname(Contract.MainchainGatewayV3); - } - - function _mapContractname(Contract contractEnum) internal { - _contractNameMap[contractEnum.key()] = contractEnum.name(); - } - - function getCompanionNetwork(TNetwork network) external pure returns (Network) { - if (network == DefaultNetwork.RoninTestnet.key()) return Network.Goerli; - if (network == DefaultNetwork.RoninMainnet.key()) return Network.EthMainnet; - revert("Network: Unknown companion network"); - } -} diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 0ca03767..300cb7f1 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -1,19 +1,38 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { BaseMigrationV2 } from "./BaseMigrationV2.sol"; -import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; +import { ProxyAdmin } from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import { LibString } from "solady/utils/LibString.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { console2 as console } from "forge-std/console2.sol"; +import { BaseMigration } from "@fdk/BaseMigration.s.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { GeneralConfig } from "./GeneralConfig.sol"; import { ISharedArgument } from "./interfaces/ISharedArgument.sol"; -import { Network } from "./utils/Network.sol"; +import { TNetwork, Network } from "./utils/Network.sol"; import { Utils } from "./utils/Utils.sol"; -import { Contract } from "./utils/Contract.sol"; -import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Contract, TContract } from "./utils/Contract.sol"; +import { GlobalProposal, Proposal, LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { TransparentUpgradeableProxy, TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; -import { LibArray } from "./libraries/LibArray.sol"; +import { LibArray } from "script/shared/libraries/LibArray.sol"; +import { PostChecker } from "./PostChecker.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -contract Migration is BaseMigrationV2, Utils { - ISharedArgument public constant config = ISharedArgument(address(CONFIG)); +contract Migration is PostChecker, Utils { + using LibProxy for *; + using LibArray for *; + using StdStyle for *; + using LibString for *; + using LibProposal for *; + + uint256 internal constant DEFAULT_PROPOSAL_GAS = 1_000_000; + ISharedArgument internal constant config = ISharedArgument(address(CONFIG)); + + function setUp() public virtual override { + super.setUp(); + } function _configByteCode() internal virtual override returns (bytes memory) { return abi.encodePacked(type(GeneralConfig).creationCode); @@ -46,7 +65,7 @@ contract Migration is BaseMigrationV2, Utils { param.mockErc721.name = "Mock ERC721"; param.mockErc721.symbol = "M_ERC721"; - uint256 num = 22; + uint256 num = 6; address[] memory operatorAddrs = new address[](num); address[] memory governorAddrs = new address[](num); uint256[] memory operatorPKs = new uint256[](num); @@ -66,8 +85,8 @@ contract Migration is BaseMigrationV2, Utils { voteWeights[i] = 100; } - LibArray.inlineSortByValue(operatorPKs, LibArray.toUint256s(operatorAddrs)); - LibArray.inlineSortByValue(governorPKs, LibArray.toUint256s(governorAddrs)); + operatorPKs.inplaceSortByValue(operatorAddrs.toUint256s()); + governorPKs.inplaceSortByValue(governorAddrs.toUint256s()); param.test.operatorPKs = operatorPKs; param.test.governorPKs = governorPKs; @@ -86,31 +105,37 @@ contract Migration is BaseMigrationV2, Utils { param.roninPauseEnforcer.sentries = wrapAddress(makeAddr("pause-enforcer-sentry")); // Ronin Gateway V3 - param.roninGatewayV3.numerator = 7; - param.roninGatewayV3.denominator = 10; - param.roninGatewayV3.trustedNumerator = 9; - param.roninGatewayV3.trustedDenominator = 10; + param.roninGatewayV3.numerator = 3; + param.roninGatewayV3.denominator = 6; + param.roninGatewayV3.trustedNumerator = 2; + param.roninGatewayV3.trustedDenominator = 3; // Ronin Bridge Manager - param.roninBridgeManager.num = 7; - param.roninBridgeManager.denom = 10; + param.roninBridgeManager.num = 2; + param.roninBridgeManager.denom = 4; + param.roninBridgeManager.roninChainId = 0; param.roninBridgeManager.roninChainId = block.chainid; - param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.roninBridgeManager.expiryDuration = 14 days; param.roninBridgeManager.bridgeOperators = operatorAddrs; param.roninBridgeManager.governors = governorAddrs; param.roninBridgeManager.voteWeights = voteWeights; param.roninBridgeManager.targetOptions = options; param.roninBridgeManager.targets = targets; + // Mainchain Gateway Pause Enforcer + param.mainchainPauseEnforcer.admin = makeAddr("pause-enforcer-admin"); + param.mainchainPauseEnforcer.sentries = wrapAddress(makeAddr("pause-enforcer-sentry")); + // Mainchain Gateway V3 param.mainchainGatewayV3.roninChainId = block.chainid; - param.mainchainGatewayV3.numerator = 7; - param.mainchainGatewayV3.highTierVWNumerator = 9; + param.mainchainGatewayV3.numerator = 1; + param.mainchainGatewayV3.highTierVWNumerator = 10; param.mainchainGatewayV3.denominator = 10; // Mainchain Bridge Manager - param.mainchainBridgeManager.num = 7; - param.mainchainBridgeManager.denom = 10; + param.mainchainBridgeManager.num = 2; + param.mainchainBridgeManager.denom = 4; + param.mainchainBridgeManager.roninChainId = 0; param.mainchainBridgeManager.roninChainId = block.chainid; param.mainchainBridgeManager.bridgeOperators = operatorAddrs; param.mainchainBridgeManager.governors = governorAddrs; @@ -128,4 +153,104 @@ contract Migration is BaseMigrationV2, Utils { bool isLocalNetwork = network() == DefaultNetwork.Local.key(); return isLocalNetwork ? payable(config.sharedArguments().test.proxyAdmin) : super._getProxyAdmin(); } + + function _getProxyAdminFromCurrentNetwork() internal view virtual returns (address proxyAdmin) { + TNetwork currentNetwork = network(); + if (currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key()) { + proxyAdmin = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + } else if (currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { + proxyAdmin = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + } else { + revert("BridgeMigration(_getProxyAdminFromCurrentNetwork): Unhandled case"); + } + } + + function _upgradeRaw(address proxyAdmin, address payable proxy, address logic, bytes memory args) internal virtual override { + if (logic.codehash == payable(proxy).getProxyImplementation({ nullCheck: true }).codehash) { + console.log("BaseMigration: Logic is already upgraded!".yellow()); + return; + } + + assertTrue(proxyAdmin != address(0x0), "BridgeMigration: Invalid {proxyAdmin} or {proxy} is not a Proxy contract"); + address admin = _getProxyAdminFromCurrentNetwork(); + TNetwork currentNetwork = network(); + + if (proxyAdmin == admin) { + // in case proxyAdmin is GovernanceAdmin + if ( + currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key() + || currentNetwork == Network.RoninDevnet.key() + ) { + // handle for ronin network + console.log(StdStyle.yellow("Voting on RoninBridgeManager for upgrading...")); + + RoninBridgeManager manager = RoninBridgeManager(admin); + bytes[] memory callDatas = new bytes[](1); + uint256[] memory values = new uint256[](1); + address[] memory targets = new address[](1); + + targets[0] = proxy; + callDatas[0] = args.length == 0 + ? abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logic)) + : abi.encodeCall(TransparentUpgradeableProxy.upgradeToAndCall, (logic, args)); + + Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ + nonce: manager.round(block.chainid) + 1, + expiryTimestamp: block.timestamp + 10 minutes, + targets: targets, + values: values, + calldatas: callDatas, + gasAmounts: uint256(DEFAULT_PROPOSAL_GAS).toSingletonArray() + }); + + manager.executeProposal(proposal); + assertEq(proxy.getProxyImplementation(), logic, "BridgeMigration: Upgrade failed"); + } else if (currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { + // handle for ethereum + revert("BridgeMigration: Unhandled case for ETH"); + } else { + revert("BridgeMigration: Unhandled case"); + } + } else if (proxyAdmin.code.length == 0) { + // in case proxyAdmin is an eoa + console.log(StdStyle.yellow("Upgrading with EOA wallet...")); + _prankOrBroadcast(address(proxyAdmin)); + if (args.length == 0) TransparentUpgradeableProxyV2(proxy).upgradeTo(logic); + else TransparentUpgradeableProxyV2(proxy).upgradeToAndCall(logic, args); + } else { + console.log(StdStyle.yellow("Upgrading with owner of ProxyAdmin contract...")); + // in case proxyAdmin is a ProxyAdmin contract + ProxyAdmin proxyAdminContract = ProxyAdmin(proxyAdmin); + address authorizedWallet = proxyAdminContract.owner(); + _prankOrBroadcast(authorizedWallet); + if (args.length == 0) proxyAdminContract.upgrade(TransparentUpgradeableProxy(proxy), logic); + else proxyAdminContract.upgradeAndCall(TransparentUpgradeableProxy(proxy), logic, args); + } + } + + function _deployProxy( + TContract contractType, + bytes memory args + ) internal virtual override logFn(string.concat("_deployProxy ", TContract.unwrap(contractType).unpackOne())) returns (address payable deployed) { + string memory contractName = config.getContractName(contractType); + + address logic = _deployLogic(contractType); + string memory proxyAbsolutePath = "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2"; + uint256 proxyNonce; + address proxyAdmin = _getProxyAdmin(); + assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); + + (deployed, proxyNonce) = _deployRaw(proxyAbsolutePath, abi.encode(logic, proxyAdmin, args)); + + // validate proxy admin + address actualProxyAdmin = deployed.getProxyAdmin(); + assertEq( + actualProxyAdmin, + proxyAdmin, + string.concat("BaseMigration: Invalid proxy admin\n", "Actual: ", vm.toString(actualProxyAdmin), "\nExpected: ", vm.toString(proxyAdmin)) + ); + + config.setAddress(network(), contractType, deployed); + ARTIFACT_FACTORY.generateArtifact(sender(), deployed, proxyAbsolutePath, string.concat(contractName, "Proxy"), args, proxyNonce); + } } diff --git a/script/PostChecker.sol b/script/PostChecker.sol new file mode 100644 index 00000000..4a1ae8c4 --- /dev/null +++ b/script/PostChecker.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { BaseMigration } from "@fdk/BaseMigration.s.sol"; +import { Contract } from "script/utils/Contract.sol"; +import { Network } from "script/utils/Network.sol"; +import { TNetwork, DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { PostCheck_BridgeManager } from "./post-check/bridge-manager/PostCheck_BridgeManager.s.sol"; + +abstract contract PostChecker is BaseMigration, PostCheck_BridgeManager { + using LibCompanionNetwork for *; + + function _postCheck() internal override { + _loadSysContract(); + _validate_BridgeManager(); + } + + function _loadSysContract() private { + TNetwork currentNetwork = network(); + if ( + currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() + || currentNetwork == DefaultNetwork.Local.key() + ) { + __bridgeSlash = loadContract(Contract.BridgeSlash.key()); + __bridgeReward = loadContract(Contract.BridgeReward.key()); + _gateway[block.chainid] = loadContract(Contract.RoninGatewayV3.key()); + _manager[block.chainid] = loadContract(Contract.RoninBridgeManager.key()); + + (uint256 companionChainId, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); + _gateway[companionChainId] = CONFIG.getAddress(companionNetwork, Contract.MainchainGatewayV3.key()); + _manager[companionChainId] = CONFIG.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + } else { + revert(string.concat("Unsupported network: ", currentNetwork.networkName())); + } + } +} diff --git a/script/contracts/MainchainBridgeManagerDeploy.s.sol b/script/contracts/MainchainBridgeManagerDeploy.s.sol index c91bb2e9..a0b36941 100644 --- a/script/contracts/MainchainBridgeManagerDeploy.s.sol +++ b/script/contracts/MainchainBridgeManagerDeploy.s.sol @@ -9,26 +9,6 @@ import { Migration } from "../Migration.s.sol"; import { MainchainGatewayV3Deploy } from "./MainchainGatewayV3Deploy.s.sol"; contract MainchainBridgeManagerDeploy is Migration { - function _defaultArguments() internal virtual override returns (bytes memory args) { - ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; - - args = abi.encodeCall( - MainchainBridgeManager.initialize, - ( - param.num, - param.denom, - param.roninChainId, - param.bridgeContract, - param.callbackRegisters, - param.bridgeOperators, - param.governors, - param.voteWeights, - param.targetOptions, - param.targets - ) - ); - } - function run() public virtual returns (MainchainBridgeManager) { return MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key())); } diff --git a/script/contracts/MainchainWethUnwrapperDeploy.s.sol b/script/contracts/MainchainWethUnwrapperDeploy.s.sol index bdce4293..b550c7f8 100644 --- a/script/contracts/MainchainWethUnwrapperDeploy.s.sol +++ b/script/contracts/MainchainWethUnwrapperDeploy.s.sol @@ -3,14 +3,19 @@ pragma solidity ^0.8.19; import { WethUnwrapper } from "@ronin/contracts/extensions/WethUnwrapper.sol"; import { Contract } from "../utils/Contract.sol"; +import { WETHDeploy } from "./token/WETHDeploy.s.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import { Migration } from "../Migration.s.sol"; contract MainchainWethUnwrapperDeploy is Migration { + function _injectDependencies() internal virtual override { + _setDependencyDeployScript(Contract.WETH.key(), new WETHDeploy()); + } + function _defaultArguments() internal virtual override returns (bytes memory args) { ISharedArgument.WethUnwrapperParam memory param = config.sharedArguments().mainchainWethUnwrapper; - args = abi.encode(param.weth); + args = abi.encode(param.weth == address(0x0) ? loadContractOrDeploy(Contract.WETH.key()) : param.weth); } function run() public virtual returns (WethUnwrapper) { diff --git a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol new file mode 100644 index 00000000..a515b6e3 --- /dev/null +++ b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { Migration } from "../Migration.s.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { BridgeSlash, BridgeSlashDeploy } from "../contracts/BridgeSlashDeploy.s.sol"; +import { BridgeReward, BridgeRewardDeploy } from "../contracts/BridgeRewardDeploy.s.sol"; +import { BridgeTracking, BridgeTrackingDeploy } from "../contracts/BridgeTrackingDeploy.s.sol"; +import { RoninGatewayV3, RoninGatewayV3Deploy } from "../contracts/RoninGatewayV3Deploy.s.sol"; +import { RoninBridgeManager, RoninBridgeManagerDeploy } from "../contracts/RoninBridgeManagerDeploy.s.sol"; + +contract Migration_01_Deploy_RoninBridge is Migration { + BridgeSlash private _bridgeSlash; + BridgeReward private _bridgeReward; + RoninGatewayV3 private _roninGatewayV3; + BridgeTracking private _bridgeTracking; + RoninBridgeManager private _roninBridgeManager; + address private _validatorSet; + + function run() external { + _roninGatewayV3 = new RoninGatewayV3Deploy().run(); + _bridgeSlash = new BridgeSlashDeploy().run(); + _bridgeReward = new BridgeRewardDeploy().run(); + _bridgeTracking = new BridgeTrackingDeploy().run(); + _roninBridgeManager = new RoninBridgeManagerDeploy().run(); + + _initBridgeReward(); + _initBridgeSlash(); + _initRoninGatewayV3(); + _initBridgeTracking(); + _initRoninBridgeManager(); + } + + function _initRoninBridgeManager() internal logFn("Init RoninBridgeManager") { + ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; + // address[] memory callbackRegisters = new address[](1); + // callbackRegisters[0] = address(_bridgeSlash); + // callbackRegisters[1] = address(_roninGatewayV3); + + _roninBridgeManager.initialize({ + num: param.num, + denom: param.denom, + roninChainId: block.chainid, + expiryDuration: param.expiryDuration, + bridgeContract: address(_roninGatewayV3), + callbackRegisters: param.callbackRegisters, + bridgeOperators: param.bridgeOperators, + governors: param.governors, + voteWeights: param.voteWeights, + targetOptions: param.targetOptions, + targets: param.targets + }); + } + + function _initBridgeTracking() internal logFn("Init BridgeTracking") { + _bridgeTracking.initialize({ bridgeContract: address(_roninGatewayV3), validatorContract: _validatorSet, startedAtBlock_: 0 }); + _bridgeTracking.initializeV3({ + bridgeManager: address(_roninBridgeManager), + bridgeSlash: address(_bridgeSlash), + bridgeReward: address(_bridgeReward), + dposGA: address(0x0) + }); + } + + function _initBridgeReward() internal logFn("Init BridgeReward") { + ISharedArgument.BridgeRewardParam memory param = config.sharedArguments().bridgeReward; + _bridgeReward.initialize({ + bridgeManagerContract: address(_roninBridgeManager), + bridgeTrackingContract: address(_bridgeTracking), + bridgeSlashContract: address(_bridgeSlash), + validatorSetContract: _validatorSet, + dposGA: address(0x0), + rewardPerPeriod: param.rewardPerPeriod + }); + // _bridgeReward.initializeREP2(); + _bridgeReward.initializeV2(); + } + + function _initBridgeSlash() internal logFn("Init BridgeSlash") { + _bridgeSlash.initialize({ + validatorContract: _validatorSet, + bridgeManagerContract: address(_roninBridgeManager), + bridgeTrackingContract: address(_bridgeTracking), + dposGA: address(0x0) + }); + } + + function _initRoninGatewayV3() internal logFn("Init RoninGatewayV3") { + ISharedArgument.RoninGatewayV3Param memory param = config.sharedArguments().roninGatewayV3; + + _roninGatewayV3.initialize( + param.roleSetter, + param.numerator, + param.denominator, + param.trustedNumerator, + param.trustedDenominator, + param.withdrawalMigrators, + param.packedAddresses, + param.packedNumbers, + param.standards + ); + _roninGatewayV3.initializeV3(address(_roninBridgeManager)); + } +} diff --git a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol new file mode 100644 index 00000000..f744a059 --- /dev/null +++ b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { Migration } from "../Migration.s.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; +import { WETHDeploy } from "../contracts/token/WETHDeploy.s.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { MainchainGatewayV3, MainchainGatewayV3Deploy } from "../contracts/MainchainGatewayV3Deploy.s.sol"; +import { WethUnwrapper, MainchainWethUnwrapperDeploy } from "../contracts/MainchainWethUnwrapperDeploy.s.sol"; +import { MainchainBridgeManager, MainchainBridgeManagerDeploy } from "../contracts/MainchainBridgeManagerDeploy.s.sol"; + +contract Migration_02_Deploy_MainchainBridge is Migration { + using LibCompanionNetwork for *; + + address private _weth; + WethUnwrapper private _mainchainWethUnwrapper; + MainchainGatewayV3 private _mainchainGatewayV3; + MainchainBridgeManager private _mainchainBridgeManager; + + function _injectDependencies() internal virtual override { + _setDependencyDeployScript(Contract.WETH.key(), new WETHDeploy()); + } + + function run() external { + _weth = loadContractOrDeploy(Contract.WETH.key()); + _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); + _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); + _mainchainWethUnwrapper = new MainchainWethUnwrapperDeploy().run(); + + _initMainchainGatewayV3(); + _initMainchainBridgeManager(); + } + + function _initMainchainBridgeManager() internal logFn("Init RoninBridgeManager") { + ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; + // address[] memory callbackRegisters = new address[](1); + // callbackRegisters[0] = address(_bridgeSlash); + // callbackRegisters[1] = address(_roninGatewayV3); + + uint256 companionChainId = network().companionChainId(); + _mainchainBridgeManager.initialize({ + num: param.num, + denom: param.denom, + roninChainId: companionChainId, + bridgeContract: address(_mainchainGatewayV3), + callbackRegisters: param.callbackRegisters, + bridgeOperators: param.bridgeOperators, + governors: param.governors, + voteWeights: param.voteWeights, + targetOptions: param.targetOptions, + targets: param.targets + }); + } + + function _initMainchainGatewayV3() internal logFn("Init MainchainGatewayV3") { + ISharedArgument.MainchainGatewayV3Param memory param = config.sharedArguments().mainchainGatewayV3; + + uint256 companionChainId = network().companionChainId(); + _mainchainGatewayV3.initialize( + param.roleSetter, + IWETH(_weth), + companionChainId, + param.numerator, + param.highTierVWNumerator, + param.denominator, + param.addresses, + param.thresholds, + param.standards + ); + _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); + _mainchainGatewayV3.initializeV3(); + _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethUnwrapper))); + } +} diff --git a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol new file mode 100644 index 00000000..ad534228 --- /dev/null +++ b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { Migration } from "../Migration.s.sol"; +import { Contract } from "../utils/Contract.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { Migration_01_Deploy_RoninBridge } from "./01_Deploy_RoninBridge.s.sol"; +import { LibCompanionNetwork } from "../shared/libraries/LibCompanionNetwork.sol"; +import { Migration_02_Deploy_MainchainBridge } from "./02_Deploy_MainchainBridge.s.sol"; + +contract Deploy_v0_3_1 is Migration { + using LibCompanionNetwork for *; + + function run() external { + TNetwork currentNetwork = network(); + TNetwork companionNetwork = currentNetwork.companionNetwork(); + + if ( + currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() + ) { + new Migration_01_Deploy_RoninBridge().run(); + + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + + new Migration_02_Deploy_MainchainBridge().run(); + + config.switchTo(currentNetwork); + } else if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + + new Migration_01_Deploy_RoninBridge().run(); + + config.switchTo(currentNetwork); + + new Migration_02_Deploy_MainchainBridge().run(); + } else if (currentNetwork == DefaultNetwork.Local.key()) { + new Migration_01_Deploy_RoninBridge().run(); + new Migration_02_Deploy_MainchainBridge().run(); + } else { + revert("Unsupported network"); + } + } +} diff --git a/script/IGeneralConfigExtended.sol b/script/interfaces/IGeneralConfigExtended.sol similarity index 62% rename from script/IGeneralConfigExtended.sol rename to script/interfaces/IGeneralConfigExtended.sol index 78a02582..257b80aa 100644 --- a/script/IGeneralConfigExtended.sol +++ b/script/interfaces/IGeneralConfigExtended.sol @@ -1,9 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { IGeneralConfig } from "foundry-deployment-kit/interfaces/IGeneralConfig.sol"; -import { TNetwork } from "foundry-deployment-kit/types/Types.sol"; -import { Network } from "./utils/Network.sol"; +import { IGeneralConfig } from "@fdk/interfaces/IGeneralConfig.sol"; +import { TNetwork } from "@fdk/types/Types.sol"; interface IGeneralConfigExtended is IGeneralConfig { /** @@ -13,5 +12,5 @@ interface IGeneralConfigExtended is IGeneralConfig { * Output: companion mainchain network of roninchain * */ - function getCompanionNetwork(TNetwork network) external pure returns (Network); + function getCompanionNetwork(TNetwork network) external pure returns (TNetwork); } diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index 6b7f87b8..deab1709 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { IGeneralConfig } from "foundry-deployment-kit/interfaces/IGeneralConfig.sol"; +import { IGeneralConfigExtended } from "./IGeneralConfigExtended.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Token } from "@ronin/contracts/libraries/Token.sol"; -interface ISharedArgument is IGeneralConfig { +interface ISharedArgument is IGeneralConfigExtended { struct BridgeManagerParam { uint256 num; uint256 denom; diff --git a/script/libraries/LibArray.sol b/script/libraries/LibArray.sol index d9630afa..afd37758 100644 --- a/script/libraries/LibArray.sol +++ b/script/libraries/LibArray.sol @@ -59,9 +59,9 @@ library LibArray { let dataElementLocation := add(data, 0x20) // Iterate until the bound is not met. - for { let end := add(dataElementLocation, mul(len, 0x20)) } lt(dataElementLocation, end) { - dataElementLocation := add(dataElementLocation, 0x20) - } { result := add(result, mload(dataElementLocation)) } + for { let end := add(dataElementLocation, mul(len, 0x20)) } lt(dataElementLocation, end) { dataElementLocation := add(dataElementLocation, 0x20) } { + result := add(result, mload(dataElementLocation)) + } } } @@ -105,11 +105,7 @@ library LibArray { * @notice This function modify `self` and `values` * @return sorted The sorted array. */ - function inlineSortByValue(uint256[] memory self, uint256[] memory values) - internal - pure - returns (uint256[] memory sorted) - { + function inlineSortByValue(uint256[] memory self, uint256[] memory values) internal pure returns (uint256[] memory sorted) { return inlineQuickSortByValue(self, values); } @@ -120,11 +116,7 @@ library LibArray { * @notice This function modify `self` and `values` * @return sorted The sorted array. */ - function inlineQuickSortByValue(uint256[] memory self, uint256[] memory values) - internal - pure - returns (uint256[] memory sorted) - { + function inlineQuickSortByValue(uint256[] memory self, uint256[] memory values) internal pure returns (uint256[] memory sorted) { uint256 length = self.length; if (length != values.length) revert LengthMismatch(); unchecked { @@ -144,10 +136,7 @@ library LibArray { * @param right The right index of the subarray to be sorted. * @notice This function modify `arr` and `values` */ - function inlineQuickSortByValue(uint256[] memory arr, uint256[] memory values, int256 left, int256 right) - private - pure - { + function inlineQuickSortByValue(uint256[] memory arr, uint256[] memory values, int256 left, int256 right) private pure { unchecked { if (left == right) return; int256 i = left; diff --git a/script/post-check/BasePostCheck.s.sol b/script/post-check/BasePostCheck.s.sol new file mode 100644 index 00000000..7b9219f8 --- /dev/null +++ b/script/post-check/BasePostCheck.s.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Vm } from "forge-std/Vm.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { console2 as console } from "forge-std/console2.sol"; +import { BaseMigration } from "@fdk/BaseMigration.s.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; + +abstract contract BasePostCheck is BaseMigration { + using StdStyle for *; + + uint256 internal seed = vm.unixTime(); + address internal __bridgeSlash; + address internal __bridgeReward; + address internal __bridgeTracking; + mapping(uint256 chainId => address manager) internal _manager; + mapping(uint256 chainId => address gateway) internal _gateway; + + modifier onPostCheck(string memory postCheckLabel) { + uint256 snapshotId = _beforePostCheck(postCheckLabel); + _; + _afterPostCheck(postCheckLabel, snapshotId); + } + + function _beforePostCheck(string memory postCheckLabel) private returns (uint256 snapshotId) { + snapshotId = vm.snapshot(); + console.log("\n> ".cyan(), postCheckLabel.blue().italic(), "..."); + } + + function _afterPostCheck(string memory postCheckLabel, uint256 snapshotId) private { + console.log(string.concat("Postcheck ", postCheckLabel.italic(), " successful!\n").green()); + vm.revertTo(snapshotId); + } +} diff --git a/script/post-check/bridge-manager/BridgeManager.post_check.tree b/script/post-check/bridge-manager/BridgeManager.post_check.tree new file mode 100644 index 00000000..a42faa0a --- /dev/null +++ b/script/post-check/bridge-manager/BridgeManager.post_check.tree @@ -0,0 +1,66 @@ +BridgeManager + CRUD + add + when not self-called + it should revert + when self-called + when the list has duplicate + it should revert + when the list has null value + it should revert + when three input array mismatch + it should revert + when vote weight is zero + it should revert + when the valid input + governor should be in governor list + it should increase the total weight + governor should have expected weight + operator should have expected weight + it should map governor => bridge operator + it should map bridge operator => governor + bridge operator should be in operator list + it should notify proxy contract with valid data + it should notify immutable contract with valid data + remove + when not self-called + it should revert + when self-called + when the list has duplicate + it should revert + when the list has null value + it should revert + when operator is not in the operator list + it should not remove + when operator is in the list + governor should have 0 weight + it should decrease the total weight + bridge operator should have 0 weight + orders of other governors must unchanged + orders of other bridge operators must unchanged + it should notify proxy contract with valid data + it should notify immutable contract with valid data + it should remove the operator from the operator list + it should remove corresponding governor from the list + it should remove the mapping governor => bridge operator + it should remove the mapping bridge operator => governor + + Proposal + GlobalProposal + when the nonce is invalid + it should revert + when the caller is not the governor + it should verify signature with correct governor + when the target is BridgeManager + it should self call + ProposalForCurrentNetwork + when the nonce is invalid + it should revert + when the caller is not the governor + when the calldata includes signature + it should verify correct signature + when the calldata not includes signature + it should revert + when the target is BridgeManager + it should self call + \ No newline at end of file diff --git a/script/post-check/bridge-manager/PostCheck_BridgeManager.s.sol b/script/post-check/bridge-manager/PostCheck_BridgeManager.s.sol new file mode 100644 index 00000000..24e113d4 --- /dev/null +++ b/script/post-check/bridge-manager/PostCheck_BridgeManager.s.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { PostCheck_BridgeManager_CRUD_AddBridgeOperators } from "./crud/PostCheck_BridgeManager_CRUD_AddBridgeOperators.s.sol"; +import { PostCheck_BridgeManager_CRUD_RemoveBridgeOperators } from "./crud/PostCheck_BridgeManager_CRUD_RemoveBridgeOperators.s.sol"; +import { PostCheck_BridgeManager_Proposal } from "./proposal/PostCheck_BridgeManager_Proposal.s.sol"; + +abstract contract PostCheck_BridgeManager is + PostCheck_BridgeManager_Proposal, + PostCheck_BridgeManager_CRUD_AddBridgeOperators, + PostCheck_BridgeManager_CRUD_RemoveBridgeOperators +{ + function _validate_BridgeManager() internal onPostCheck("validate_BridgeManager") { + _validate_BridgeManager_CRUD_addBridgeOperators(); + _validate_BridgeManager_CRUD_removeBridgeOperators(); + _validate_BridgeManager_Proposal(); + } +} diff --git a/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol new file mode 100644 index 00000000..b8102be0 --- /dev/null +++ b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { BasePostCheck } from "script/post-check/BasePostCheck.s.sol"; +import { LibArray } from "script/shared/libraries/LibArray.sol"; + +/** + * @title PostCheck_BridgeManager_CRUD_AddBridgeOperators + * @dev This contract contains post-check functions for adding bridge operators in the BridgeManager contract. + */ +abstract contract PostCheck_BridgeManager_CRUD_AddBridgeOperators is BasePostCheck { + using LibArray for *; + + uint256 private voteWeight = 100; + string private seedStr = vm.toString(seed); + address private any = makeAddr(string.concat("any", seedStr)); + address private operator = makeAddr(string.concat("operator-", seedStr)); + address private governor = makeAddr(string.concat("governor-", seedStr)); + + function _validate_BridgeManager_CRUD_addBridgeOperators() internal { + validate_RevertWhen_NotSelfCalled_addBridgeOperators(); + validate_RevertWhen_SelfCalled_TheListHasDuplicate_addBridgeOperators(); + validate_RevertWhen_SelfCalled_InputArrayLengthMismatch_addBridgeOperators(); + validate_RevertWhen_SelfCalled_ContainsNullVoteWeight_addBridgeOperators(); + validate_addBridgeOperators(); + } + + /** + * @dev Validates that the function `addBridgeOperators` reverts when it is not self-called. + */ + function validate_RevertWhen_NotSelfCalled_addBridgeOperators() private onPostCheck("validate_RevertWhen_NotSelfCalled_addBridgeOperators") { + vm.expectRevert(); + vm.prank(any); + bool[] memory addeds = IBridgeManager(_manager[block.chainid]).addBridgeOperators( + voteWeight.toSingletonArray().toUint96sUnsafe(), operator.toSingletonArray(), governor.toSingletonArray() + ); + } + + /** + * @dev Validates that the function `addBridgeOperators` reverts when the list of operators contains duplicates. + */ + function validate_RevertWhen_SelfCalled_TheListHasDuplicate_addBridgeOperators() + private + onPostCheck("validate_RevertWhen_SelfCalled_TheListHasDuplicate_addBridgeOperators") + { + vm.expectRevert(); + vm.prank(_manager[block.chainid]); + bool[] memory addeds = IBridgeManager(_manager[block.chainid]).addBridgeOperators( + voteWeight.toSingletonArray().toUint96sUnsafe(), operator.toSingletonArray(), operator.toSingletonArray() + ); + + vm.expectRevert(); + vm.prank(_manager[block.chainid]); + addeds = IBridgeManager(_manager[block.chainid]).addBridgeOperators( + voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), governor.toSingletonArray() + ); + + vm.expectRevert(); + vm.prank(_manager[block.chainid]); + addeds = IBridgeManager(_manager[block.chainid]).addBridgeOperators( + voteWeight.toSingletonArray().toUint96sUnsafe(), + governor.toSingletonArray().extend(operator.toSingletonArray()), + operator.toSingletonArray().extend(governor.toSingletonArray()) + ); + } + + /** + * @dev Validates that the function `addBridgeOperators` reverts when the input array lengths mismatch. + */ + function validate_RevertWhen_SelfCalled_InputArrayLengthMismatch_addBridgeOperators() + private + onPostCheck("validate_RevertWhen_SelfCalled_InputArrayLengthMismatch_addBridgeOperators") + { + vm.prank(_manager[block.chainid]); + vm.expectRevert(); + IBridgeManager(_manager[block.chainid]).addBridgeOperators( + voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray().extend(governor.toSingletonArray()) + ); + } + + /** + * @dev Validates that the function `addBridgeOperators` reverts when the input array contains a null vote weight. + */ + function validate_RevertWhen_SelfCalled_ContainsNullVoteWeight_addBridgeOperators() + private + onPostCheck("validate_RevertWhen_SelfCalled_ContainsNullVoteWeight_addBridgeOperators") + { + vm.prank(_manager[block.chainid]); + vm.expectRevert(); + IBridgeManager(_manager[block.chainid]).addBridgeOperators( + uint256(0).toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray().extend(governor.toSingletonArray()) + ); + } + + /** + * @dev Validates that the function `addBridgeOperators`. + */ + function validate_addBridgeOperators() private onPostCheck("validate_addBridgeOperators") { + address manager = _manager[block.chainid]; + uint256 totalWeightBefore = IBridgeManager(manager).getTotalWeight(); + uint256 totalBridgeOperatorsBefore = IBridgeManager(manager).getBridgeOperators().length; + + vm.prank(manager); + bool[] memory addeds = + IBridgeManager(manager).addBridgeOperators(voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray()); + + assertTrue(addeds[0], "addeds[0] == false"); + assertTrue(IBridgeManager(manager).isBridgeOperator(operator), "isBridgeOperator(operator) == false"); + assertEq(IBridgeManager(manager).getTotalWeight(), totalWeightBefore + voteWeight, "getTotalWeight() != totalWeightBefore + voteWeight"); + assertEq( + IBridgeManager(manager).getBridgeOperators().length, totalBridgeOperatorsBefore + 1, "getBridgeOperators().length != totalBridgeOperatorsBefore + 1" + ); + // Deprecated + // assertEq(IBridgeManager(manager).getGovernorsOf(operator.toSingletonArray())[0], governor, "getGovernorsOf(operator)[0] != governor"); + // Deprecated + // assertEq(IBridgeManager(manager).getBridgeOperatorOf(governor.toSingletonArray())[0], operator, "getBridgeOperatorOf(governor)[0] != operator"); + } +} diff --git a/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_removeBridgeOperators.s.sol b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_removeBridgeOperators.s.sol new file mode 100644 index 00000000..1abcd2fc --- /dev/null +++ b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_removeBridgeOperators.s.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { BasePostCheck } from "script/post-check/BasePostCheck.s.sol"; +import { LibArray } from "script/shared/libraries/LibArray.sol"; + +abstract contract PostCheck_BridgeManager_CRUD_RemoveBridgeOperators is BasePostCheck { + using LibArray for *; + + string private seedStr = vm.toString(seed); + address private operatorToRemove; + uint256 private voteWeightToRemove; + address private any = makeAddr(string.concat("any", seedStr)); + + function _validate_BridgeManager_CRUD_removeBridgeOperators() internal { + address manager = _manager[block.chainid]; + address[] memory operators = IBridgeManager(manager).getBridgeOperators(); + uint256 idx = _bound(seed, 0, operators.length - 1); + + operatorToRemove = operators[idx]; + voteWeightToRemove = IBridgeManager(manager).getBridgeOperatorWeight(operatorToRemove); + + validate_RevertWhen_NotSelfCalled_removeBridgeOperators(); + validate_RevertWhen_SelfCalled_TheListHasDuplicate_removeBridgeOperators(); + validate_RevertWhen_SelfCalled_TheListHasNull_removeBridgeOperators(); + validate_RevertWhen_SelfCalled_RemovedOperatorIsNotInTheList_removeBridgeOperators(); + validate_removeBridgeOperators(); + } + + function validate_RevertWhen_NotSelfCalled_removeBridgeOperators() private onPostCheck("validate_RevertWhen_NotSelfCalled_removeBridgeOperators") { + vm.prank(any); + vm.expectRevert(); + IBridgeManager(_manager[block.chainid]).removeBridgeOperators(operatorToRemove.toSingletonArray()); + } + + function validate_RevertWhen_SelfCalled_TheListHasDuplicate_removeBridgeOperators() + private + onPostCheck("validate_RevertWhen_SelfCalled_TheListHasDuplicate_removeBridgeOperators") + { + vm.prank(_manager[block.chainid]); + vm.expectRevert(); + IBridgeManager(_manager[block.chainid]).removeBridgeOperators(operatorToRemove.toSingletonArray().extend(operatorToRemove.toSingletonArray())); + } + + function validate_RevertWhen_SelfCalled_TheListHasNull_removeBridgeOperators() + private + onPostCheck("validate_RevertWhen_SelfCalled_TheListHasNull_removeBridgeOperators") + { + vm.prank(_manager[block.chainid]); + vm.expectRevert(); + IBridgeManager(_manager[block.chainid]).removeBridgeOperators(address(0).toSingletonArray()); + } + + function validate_RevertWhen_SelfCalled_RemovedOperatorIsNotInTheList_removeBridgeOperators() + private + onPostCheck("validate_RevertWhen_SelfCalled_RemovedOperatorIsNotInTheList_removeBridgeOperators") + { + vm.expectRevert(); + vm.prank(_manager[block.chainid]); + IBridgeManager(_manager[block.chainid]).removeBridgeOperators(any.toSingletonArray()); + } + + function validate_removeBridgeOperators() private onPostCheck("validate_removeBridgeOperators") { + address manager = _manager[block.chainid]; + uint256 total = IBridgeManager(manager).totalBridgeOperator(); + uint256 totalWeightBefore = IBridgeManager(manager).getTotalWeight(); + uint256 expected = total - 1; + + vm.prank(manager); + IBridgeManager(manager).removeBridgeOperators(operatorToRemove.toSingletonArray()); + uint256 actual = IBridgeManager(manager).totalBridgeOperator(); + + assertEq(actual, expected, "Bridge operator is not removed"); + assertEq(IBridgeManager(manager).getTotalWeight(), totalWeightBefore - voteWeightToRemove, "Bridge operator is not removed"); + assertFalse(IBridgeManager(manager).isBridgeOperator(operatorToRemove), "Bridge operator is not removed"); + assertEq(IBridgeManager(manager).getBridgeOperatorWeight(operatorToRemove), 0, "Bridge operator is not removed"); + // Deprecated + // assertEq(IBridgeManager(manager).getGovernorsOf(operatorToRemove.toSingletonArray()), address(0).toSingletonArray(), "Bridge operator is not removed"); + } +} diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol new file mode 100644 index 00000000..ac0a47a4 --- /dev/null +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { BasePostCheck } from "../../BasePostCheck.s.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { TContract, Contract } from "script/utils/Contract.sol"; +import "script/shared/libraries/LibProposal.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; + +abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { + using LibArray for *; + using LibProxy for *; + using LibProposal for *; + + uint96[] private _voteWeights = [100, 100]; + address[] private _addingGovernors = [makeAddr("governor-1"), makeAddr("governor-2")]; + address[] private _addingOperators = [makeAddr("operator-1"), makeAddr("operator-2")]; + address[] private _proxyTargets; + + modifier onlyOnRoninNetwork() { + require( + block.chainid == DefaultNetwork.RoninMainnet.chainId() || block.chainid == DefaultNetwork.RoninTestnet.chainId() + || block.chainid == Network.RoninDevnet.chainId() || block.chainid == DefaultNetwork.Local.chainId(), + "chainid != RoninMainnet or RoninTestnet" + ); + _; + } + + function _validate_BridgeManager_Proposal() internal { + validate_ProposeGlobalProposalAndRelay_addBridgeOperator(); + validate_canExecuteUpgradeSingleProposal(); + } + + function validate_ProposeGlobalProposalAndRelay_addBridgeOperator() private onPostCheck("validate_ProposeGlobalProposalAndRelay_addBridgeOperator") { + RoninBridgeManager manager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + uint256 totalVoteWeight = manager.getTotalWeight(); + + uint256 cheatVoteWeight = totalVoteWeight * 2; + address cheatOperator = makeAddr(string.concat("operator-", vm.toString(seed))); + (address cheatGovernor, uint256 cheatGovernorPk) = makeAddrAndKey(string.concat("governor-", vm.toString(seed))); + + vm.prank(address(manager)); + bool[] memory addeds = + manager.addBridgeOperators(cheatVoteWeight.toSingletonArray().toUint96sUnsafe(), cheatGovernor.toSingletonArray(), cheatOperator.toSingletonArray()); + assertTrue(addeds[0], "addeds[0] == false"); + + GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); + targetOptions[0] = GlobalProposal.TargetOption.BridgeManager; + + GlobalProposal.GlobalProposalDetail memory globalProposal = LibProposal.createGlobalProposal({ + expiryTimestamp: block.timestamp + 20 minutes, + targetOptions: targetOptions, + values: uint256(0).toSingletonArray(), + calldatas: abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)).toSingletonArray(), + gasAmounts: uint256(1_000_000).toSingletonArray(), + nonce: manager.round(block.chainid) + 1 + }); + + SignatureConsumer.Signature[] memory signatures = globalProposal.generateSignaturesGlobal(cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); + Ballot.VoteType[] memory _supports = new Ballot.VoteType[](signatures.length); + + vm.prank(cheatGovernor); + manager.proposeGlobalProposalStructAndCastVotes(globalProposal, _supports, signatures); + + // Check if the proposal is voted + assertEq(manager.globalProposalVoted(globalProposal.nonce, cheatGovernor), true); + // Check if the operator is added + assertTrue(manager.isBridgeOperator(cheatOperator), "operator not added"); + // Check if the governor is added + assertTrue(manager.isBridgeGovernor(cheatGovernor), "governor not added"); + + } + + function validate_canExecuteUpgradeSingleProposal() private onlyOnRoninNetwork onPostCheck("validate_canExecuteUpgradeProposal") { + address manager = loadContract(Contract.RoninBridgeManager.key()); + // Get all contracts deployed from the current network + address payable[] memory addrs = CONFIG.getAllAddresses(network()); + + // Identify proxy targets to upgrade with proposal + for (uint256 i; i < addrs.length; ++i) { + address payable proxy = addrs[i].getProxyAdmin({ nullCheck: false }); + if (proxy == manager) { + console.log("Target Proxy to test upgrade with proposal", vm.getLabel(addrs[i])); + _proxyTargets.push(addrs[i]); + } + } + + address[] memory targets = _proxyTargets; + for (uint256 i; i < targets.length; ++i) { + TContract contractType = CONFIG.getContractTypeFromCurrentNetwok(targets[i]); + console.log("Upgrading contract:", vm.getLabel(targets[i])); + _upgradeProxy(contractType); + } + } +} diff --git a/script/shared/libraries/LibArray.sol b/script/shared/libraries/LibArray.sol new file mode 100644 index 00000000..4152024e --- /dev/null +++ b/script/shared/libraries/LibArray.sol @@ -0,0 +1,293 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/** + * @title LibArray + * @dev A library for array-related utility functions in Solidity. + */ +library LibArray { + /** + * @dev Error indicating a length mismatch between two arrays. + */ + error LengthMismatch(); + + function repeat(uint256 value, uint256 length) internal pure returns (uint256[] memory arr) { + arr = new uint256[](length); + for (uint256 i; i < length; ++i) { + arr[i] = value; + } + } + + function toSingletonArray(address self) internal pure returns (address[] memory arr) { + arr = new address[](1); + arr[0] = self; + } + + function toSingletonArray(bytes memory self) internal pure returns (bytes[] memory arr) { + arr = new bytes[](1); + arr[0] = self; + } + + function toSingletonArray(bytes32 self) internal pure returns (bytes32[] memory arr) { + arr = new bytes32[](1); + arr[0] = self; + } + + function toSingletonArray(uint256 self) internal pure returns (uint256[] memory arr) { + arr = new uint256[](1); + arr[0] = self; + } + + /** + * @dev Returns whether or not there's a duplicate. Runs in O(n^2). + * @param arr Array to search + * @return Returns true if duplicate, false otherwise + */ + function hasDuplicate(uint256[] memory arr) internal pure returns (bool) { + if (arr.length == 0) return false; + + unchecked { + for (uint256 i; i < arr.length - 1; ++i) { + for (uint256 j = i + 1; j < arr.length; ++j) { + if (arr[i] == arr[j]) return true; + } + } + } + + return false; + } + + /** + * @dev Returns whether two arrays of addresses are equal or not. + */ + function isEqual(uint256[] memory self, uint256[] memory other) internal pure returns (bool yes) { + yes = hash(self) == hash(other); + } + + /** + * @dev Return the concatenated array from a and b. + */ + function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) { + unchecked { + uint256 lengthA = a.length; + uint256 lengthB = b.length; + c = new address[](lengthA + lengthB); + + uint256 i; + for (; i < lengthA;) { + c[i] = a[i]; + ++i; + } + for (uint256 j; j < lengthB;) { + c[i] = b[j]; + ++i; + ++j; + } + } + } + + /** + * @dev Converts an array of uint8 to an array of uint256. + * @param self The array of uint8. + * @return uint256s The resulting array of uint256s. + */ + function toUint256s(uint8[] memory self) internal pure returns (uint256[] memory uint256s) { + assembly ("memory-safe") { + uint256s := self + } + } + + /** + * @dev Converts an array of uint96 to an array of uint256. + * @param self The array of uint96. + * @return uint256s The resulting array of uint256s. + */ + function toUint256s(uint96[] memory self) internal pure returns (uint256[] memory uint256s) { + assembly ("memory-safe") { + uint256s := self + } + } + + /** + * @dev Down cast an array of uint256 to an array of uint8. + * @param self The array of uint256. + * @return uint8s The resulting array of uint256s. + * This function will result in invalid data if value in array is greater than 255. + * Use it as caution. + */ + function toUint8sUnsafe(uint256[] memory self) internal pure returns (uint8[] memory uint8s) { + assembly ("memory-safe") { + uint8s := self + } + } + + function toUint96sUnsafe(uint256[] memory self) internal pure returns (uint96[] memory uint96s) { + assembly ("memory-safe") { + uint96s := self + } + } + + function toAddressesUnsafe(uint256[] memory self) internal pure returns (address[] memory addrs) { + assembly ("memory-safe") { + addrs := self + } + } + + /** + * @dev Create an array of indices with provided range. + * @param length The array size + * @return data an array of indices + */ + function arange(uint256 length) internal pure returns (uint256[] memory data) { + data = new uint256[](length); + for (uint256 i; i < length; ++i) { + data[i] = i; + } + } + + /** + * @dev Converts an array of uint256 to an array of bytes32. + * @param self The array of uint256. + * @return bytes32s The resulting array of bytes32. + */ + function toBytes32s(uint256[] memory self) internal pure returns (bytes32[] memory bytes32s) { + assembly ("memory-safe") { + bytes32s := self + } + } + + /** + * @dev Hash dynamic size array + * @param self The array of uint256 + * @return digest The hash result of the array + */ + function hash(uint256[] memory self) internal pure returns (bytes32 digest) { + assembly ("memory-safe") { + digest := keccak256(add(self, 0x20), mul(mload(self), 0x20)) + } + } + + /** + * @dev Calculates the sum of an array of uint256 values. + * @param data The array of uint256 values for which the sum is calculated. + * @return result The sum of the provided array. + */ + function sum(uint256[] memory data) internal pure returns (uint256 result) { + assembly ("memory-safe") { + // Load the length (first 32 bytes) + let len := mload(data) + let dataElementLocation := add(data, 0x20) + + // Iterate until the bound is not met. + for { let end := add(dataElementLocation, mul(len, 0x20)) } lt(dataElementLocation, end) { dataElementLocation := add(dataElementLocation, 0x20) } { + result := add(result, mload(dataElementLocation)) + } + } + } + + /** + * @dev Converts an array of bytes32 to an array of uint256. + * @param self The array of bytes32. + * @return uint256s The resulting array of uint256. + */ + function toUint256s(bytes32[] memory self) internal pure returns (uint256[] memory uint256s) { + assembly ("memory-safe") { + uint256s := self + } + } + + /** + * @dev Converts an array of bool to an array of uint256. + * @param self The array of bool. + * @return uint256s The resulting array of uint256. + */ + function toUint256s(bool[] memory self) internal pure returns (uint256[] memory uint256s) { + assembly ("memory-safe") { + uint256s := self + } + } + + /** + * @dev Converts an array of uint64 to an array of uint256. + * @param self The array of uint64. + * @return uint256s The resulting array of uint256. + */ + function toUint256s(uint64[] memory self) internal pure returns (uint256[] memory uint256s) { + assembly ("memory-safe") { + uint256s := self + } + } + + /** + * @dev Converts an array of address to an array of uint256. + * @param self The array of address. + * @return uint256s The resulting array of uint256. + */ + function toUint256s(address[] memory self) internal pure returns (uint256[] memory uint256s) { + assembly ("memory-safe") { + uint256s := self + } + } + + /** + * @dev Sorts an array of uint256 values based on a corresponding array of values using the specified sorting mode. + * @param self The array to be sorted. + * @param values The corresponding array of values used for sorting. + * @notice This function modify `self` and `values` + * @return sorted The sorted array. + */ + function inplaceSortByValue(uint256[] memory self, uint256[] memory values) internal pure returns (uint256[] memory sorted) { + return inplaceQuickSortByValue(self, values); + } + + /** + * @dev Sorts an array of uint256 based on a corresponding array of values. + * @param self The array to be sorted. + * @param values The corresponding array of values used for sorting. + * @notice This function modify `self` and `values` + * @return sorted The sorted array. + */ + function inplaceQuickSortByValue(uint256[] memory self, uint256[] memory values) internal pure returns (uint256[] memory sorted) { + uint256 length = self.length; + if (length != values.length) revert LengthMismatch(); + unchecked { + if (length > 1) inplaceQuickSortByValue(self, values, 0, int256(length - 1)); + } + + assembly ("memory-safe") { + sorted := self + } + } + + /** + * @dev Internal function to perform quicksort on an array of uint256 values based on a corresponding array of values. + * @param arr The array to be sorted. + * @param values The corresponding array of values used for sorting. + * @param left The left index of the subarray to be sorted. + * @param right The right index of the subarray to be sorted. + * @notice This function modify `arr` and `values` + */ + function inplaceQuickSortByValue(uint256[] memory arr, uint256[] memory values, int256 left, int256 right) private pure { + unchecked { + if (left == right) return; + int256 i = left; + int256 j = right; + uint256 pivot = values[uint256(left + right) >> 1]; + + while (i <= j) { + while (pivot > values[uint256(i)]) ++i; + while (pivot < values[uint256(j)]) --j; + + if (i <= j) { + (arr[uint256(i)], arr[uint256(j)]) = (arr[uint256(j)], arr[uint256(i)]); + (values[uint256(i)], values[uint256(j)]) = (values[uint256(j)], values[uint256(i)]); + ++i; + --j; + } + } + + if (left < j) inplaceQuickSortByValue(arr, values, left, j); + if (i < right) inplaceQuickSortByValue(arr, values, i, right); + } + } +} diff --git a/script/shared/libraries/LibCompanionNetwork.sol b/script/shared/libraries/LibCompanionNetwork.sol new file mode 100644 index 00000000..60de2cb9 --- /dev/null +++ b/script/shared/libraries/LibCompanionNetwork.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; +import { IGeneralConfigExtended } from "script/interfaces/IGeneralConfigExtended.sol"; +import { TNetwork } from "@fdk/types/Types.sol"; + +library LibCompanionNetwork { + IGeneralConfigExtended private constant config = IGeneralConfigExtended(LibSharedAddress.CONFIG); + + function companionChainId() internal returns (uint256 chainId) { + (chainId,) = companionNetworkData(); + } + + function companionChainId(TNetwork network) internal returns (uint256 chainId) { + (chainId,) = companionNetworkData(network); + } + + function companionNetwork() internal returns (TNetwork network) { + (, network) = companionNetworkData(); + } + + function companionNetwork(TNetwork network) internal returns (TNetwork companionTNetwork) { + (, companionTNetwork) = companionNetworkData(network); + } + + function companionNetworkData() internal returns (uint256, TNetwork) { + return companionNetworkData(config.getCurrentNetwork()); + } + + function companionNetworkData(TNetwork network) internal returns (uint256 chainId, TNetwork companionTNetwork) { + companionTNetwork = config.getCompanionNetwork(network); + config.switchTo(companionTNetwork); + chainId = block.chainid; + } +} diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol new file mode 100644 index 00000000..55a621be --- /dev/null +++ b/script/shared/libraries/LibProposal.sol @@ -0,0 +1,269 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import { Vm } from "forge-std/Vm.sol"; +import { console2 as console } from "forge-std/console2.sol"; +import { IGeneralConfigExtended } from "script/interfaces/IGeneralConfigExtended.sol"; +import { TNetwork, Network } from "script/utils/Network.sol"; +import { Contract } from "script/utils/Contract.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { CoreGovernance } from "@ronin/contracts/extensions/sequential-governance/CoreGovernance.sol"; +import { LibArray } from "./LibArray.sol"; +import { LibErrorHandler } from "lib/foundry-deployment-kit/lib/contract-libs/src/LibErrorHandler.sol"; +import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; + +library LibProposal { + using LibArray for *; + using ECDSA for bytes32; + using LibErrorHandler for bool; + using Proposal for Proposal.ProposalDetail; + using GlobalProposal for GlobalProposal.GlobalProposalDetail; + + error ErrProposalOutOfGas(uint256 chainId, bytes4 msgSig, uint256 gasUsed); + + uint256 internal constant DEFAULT_PROPOSAL_GAS = 1_000_000; + Vm private constant vm = Vm(LibSharedAddress.VM); + IGeneralConfigExtended private constant config = IGeneralConfigExtended(LibSharedAddress.CONFIG); + + modifier preserveState() { + uint256 snapshotId = vm.snapshot(); + _; + vm.revertTo(snapshotId); + } + + function getBridgeManagerDomain() internal view returns (bytes32) { + return keccak256( + abi.encode( + keccak256("EIP712Domain(string name,string version,bytes32 salt)"), + keccak256("BridgeAdmin"), // name hash + keccak256("2"), // version hash + keccak256(abi.encode("BRIDGE_ADMIN", block.chainid)) // salt + ) + ); + } + + function createProposal( + uint256 nonce, + uint256 expiryTimestamp, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory gasAmounts + ) internal returns (Proposal.ProposalDetail memory proposal) { + address manager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + verifyProposalGasAmount(manager, targets, values, calldatas, gasAmounts); + + proposal = Proposal.ProposalDetail({ + nonce: nonce, + chainId: block.chainid, + expiryTimestamp: expiryTimestamp, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + } + + function createGlobalProposal( + uint256 nonce, + uint256 expiryTimestamp, + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory gasAmounts, + GlobalProposal.TargetOption[] memory targetOptions + ) internal returns (GlobalProposal.GlobalProposalDetail memory proposal) { + verifyGlobalProposalGasAmount(values, calldatas, gasAmounts, targetOptions); + proposal = GlobalProposal.GlobalProposalDetail({ + nonce: nonce, + expiryTimestamp: expiryTimestamp, + targetOptions: targetOptions, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + } + + function executeProposal(RoninBridgeManager manager, Proposal.ProposalDetail memory proposal) internal { + Ballot.VoteType support = Ballot.VoteType.For; + address[] memory governors = manager.getGovernors(); + + bool shouldPrankOnly = config.isPostChecking(); + address governor0 = governors[0]; + + if (shouldPrankOnly) { + vm.prank(governor0); + } else { + vm.broadcast(governor0); + } + manager.proposeProposalForCurrentNetwork(proposal.expiryTimestamp, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts, support); + + uint256 totalGas = proposal.gasAmounts.sum(); + // 20% more gas for each governor + totalGas += totalGas * 20_00 / 100_00; + // if totalGas is less than DEFAULT_PROPOSAL_GAS, set it to 120% of DEFAULT_PROPOSAL_GAS + if (totalGas < DEFAULT_PROPOSAL_GAS) totalGas = DEFAULT_PROPOSAL_GAS * 120_00 / 100_00; + + for (uint256 i = 1; i < governors.length; ++i) { + (VoteStatusConsumer.VoteStatus status,,,,) = manager.vote(block.chainid, proposal.nonce); + if (status != VoteStatusConsumer.VoteStatus.Pending) break; + + address governor = governors[i]; + if (shouldPrankOnly) { + vm.prank(governor); + } else { + vm.broadcast(governor); + } + + manager.castProposalVoteForCurrentNetwork{ gas: totalGas }(proposal, support); + } + } + + function verifyGlobalProposalGasAmount( + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory gasAmounts, + GlobalProposal.TargetOption[] memory targetOptions + ) internal { + address manager; + address companionManager; + TNetwork currentNetwork = config.getCurrentNetwork(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + address[] memory roninTargets = new address[](targetOptions.length); + address[] memory mainchainTargets = new address[](targetOptions.length); + + if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key()) { + manager = config.getAddress(currentNetwork, Contract.MainchainBridgeManager.key()); + companionManager = config.getAddress(companionNetwork, Contract.RoninBridgeManager.key()); + } else { + manager = config.getAddress(currentNetwork, Contract.RoninBridgeManager.key()); + companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + } + + for (uint256 i; i < roninTargets.length; i++) { + roninTargets[i] = resolveRoninTarget(targetOptions[i]); + mainchainTargets[i] = resolveMainchainTarget(targetOptions[i]); + } + + // Verify gas amount for ronin targets + verifyProposalGasAmount(manager, roninTargets, values, calldatas, gasAmounts); + + // Verify gas amount for mainchain targets + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + + // Verify gas amount for mainchain targets + verifyProposalGasAmount(companionManager, mainchainTargets, values, calldatas, gasAmounts); + + config.switchTo(currentNetwork); + } + + function verifyProposalGasAmount( + address governance, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory gasAmounts + ) internal preserveState { + for (uint256 i; i < targets.length; i++) { + vm.deal(governance, values[i]); + vm.prank(governance); + + uint256 gasUsed = gasleft(); + (bool success, bytes memory returnOrRevertData) = targets[i].call{ value: values[i], gas: gasAmounts[i] }(calldatas[i]); + gasUsed = gasUsed - gasleft(); + + if (success) { + console.log("Call", i, ": gasUsed", gasUsed); + } else { + console.log("Call", i, unicode": reverted. ❗ GasUsed", gasUsed); + } + success.handleRevert(bytes4(calldatas[i]), returnOrRevertData); + + if (gasUsed > gasAmounts[i]) revert ErrProposalOutOfGas(block.chainid, bytes4(calldatas[i]), gasUsed); + } + } + + function generateSignatures( + Proposal.ProposalDetail memory proposal, + uint256[] memory signerPKs, + Ballot.VoteType support + ) internal view returns (SignatureConsumer.Signature[] memory sigs) { + return generateSignaturesFor(proposal.hash(), signerPKs, support); + } + + function generateSignaturesGlobal( + GlobalProposal.GlobalProposalDetail memory proposal, + uint256[] memory signerPKs, + Ballot.VoteType support + ) internal view returns (SignatureConsumer.Signature[] memory sigs) { + return generateSignaturesFor(proposal.hash(), signerPKs, support); + } + + function generateSignaturesFor( + bytes32 proposalHash, + uint256[] memory signerPKs, + Ballot.VoteType support + ) internal view returns (SignatureConsumer.Signature[] memory sigs) { + sigs = new SignatureConsumer.Signature[](signerPKs.length); + bytes32 domain = getBridgeManagerDomain(); + for (uint256 i; i < signerPKs.length; i++) { + bytes32 digest = domain.toTypedDataHash(Ballot.hash(proposalHash, support)); + sigs[i] = sign(signerPKs[i], digest); + } + } + + function resolveRoninTarget(GlobalProposal.TargetOption targetOption) internal view returns (address) { + TNetwork network = config.getCurrentNetwork(); + if (!(network == DefaultNetwork.RoninMainnet.key() || network == DefaultNetwork.RoninTestnet.key())) { + network = config.getCompanionNetwork(network); + } + + if (targetOption == GlobalProposal.TargetOption.BridgeManager) { + return config.getAddress(network, Contract.RoninBridgeManager.key()); + } + if (targetOption == GlobalProposal.TargetOption.GatewayContract) { + return config.getAddress(network, Contract.RoninGatewayV3.key()); + } + if (targetOption == GlobalProposal.TargetOption.BridgeReward) { + return config.getAddress(network, Contract.BridgeReward.key()); + } + if (targetOption == GlobalProposal.TargetOption.BridgeSlash) { + return config.getAddress(network, Contract.BridgeSlash.key()); + } + if (targetOption == GlobalProposal.TargetOption.BridgeTracking) { + return config.getAddress(network, Contract.BridgeTracking.key()); + } + + return address(0); + } + + function resolveMainchainTarget(GlobalProposal.TargetOption targetOption) internal view returns (address) { + TNetwork network = config.getCurrentNetwork(); + if (!(network == Network.EthMainnet.key() || network == Network.Goerli.key())) { + network = config.getCompanionNetwork(network); + } + + if (targetOption == GlobalProposal.TargetOption.BridgeManager) { + return config.getAddress(network, Contract.MainchainBridgeManager.key()); + } + if (targetOption == GlobalProposal.TargetOption.GatewayContract) { + return config.getAddress(network, Contract.MainchainGatewayV3.key()); + } + + return address(0); + } + + function sign(uint256 pk, bytes32 digest) private pure returns (SignatureConsumer.Signature memory sig) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); + sig.v = v; + sig.r = r; + sig.s = s; + } +} diff --git a/script/shared/libraries/LibRandom.sol b/script/shared/libraries/LibRandom.sol new file mode 100644 index 00000000..1ae0d1f9 --- /dev/null +++ b/script/shared/libraries/LibRandom.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; +import { Vm } from "forge-std/Vm.sol"; +import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; + +library LibRandom { + Vm private constant vm = Vm(LibSharedAddress.VM); + + function generateSeed() internal returns (uint256) { + return uint256(keccak256(abi.encode(vm.unixTime()))); + } + + function randomize(uint256 seed, uint256 min, uint256 max) internal pure returns (uint256 r) { + r = Math.max(r, min); + r = Math.min(seed, max); + } + + function createRandomAddresses(uint256 seed, uint256 amount) internal returns (address[] memory addrs) { + addrs = new address[](amount); + + for (uint256 i; i < amount;) { + seed = uint256(keccak256(abi.encode(seed))); + addrs[i] = vm.addr(seed); + vm.etch(addrs[i], abi.encode()); + vm.deal(addrs[i], 1 ether); + + unchecked { + ++i; + } + } + } + + function createRandomNumbers(uint256 seed, uint256 amount, uint256 min, uint256 max) internal pure returns (uint256[] memory nums) { + uint256 r; + nums = new uint256[](amount); + + for (uint256 i; i < amount;) { + r = randomize(seed, min, max); + nums[i] = r; + seed = r; + + unchecked { + ++i; + } + } + } +} diff --git a/script/shared/libraries/LibTimeWarper.sol b/script/shared/libraries/LibTimeWarper.sol new file mode 100644 index 00000000..c83166dd --- /dev/null +++ b/script/shared/libraries/LibTimeWarper.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { Vm } from "forge-std/Vm.sol"; +import { IGeneralConfig } from "@fdk/interfaces/IGeneralConfig.sol"; +import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; + +library LibTimeWarper { + Vm private constant vm = Vm(LibSharedAddress.VM); + IGeneralConfig private constant config = IGeneralConfig(LibSharedAddress.CONFIG); + uint256 private constant PERIOD_DURATION = 1 days; + uint256 private constant TIMESTAMP_PER_BLOCK = 3; + uint256 private constant NUMBER_OF_BLOCKS_IN_EPOCH = 200; + + function warpNextPeriod() internal { + uint256 epochEndingBlockNumber = block.number + (NUMBER_OF_BLOCKS_IN_EPOCH - 1) - (block.number % NUMBER_OF_BLOCKS_IN_EPOCH); + uint256 nextDayTimestamp = block.timestamp + 1 days; + + // fast forward to next day + vm.warp(nextDayTimestamp); + vm.roll(epochEndingBlockNumber); + } + + function isPeriodEnding() internal view returns (bool) { + return block.number % NUMBER_OF_BLOCKS_IN_EPOCH == NUMBER_OF_BLOCKS_IN_EPOCH - 1; + } + + function epochOf(uint256 blockNumber) internal pure returns (uint256) { + return blockNumber / NUMBER_OF_BLOCKS_IN_EPOCH + 1; + } + + function computePeriod(uint256 timestamp) internal pure returns (uint256) { + return timestamp / PERIOD_DURATION; + } + + function warp(uint256 numPeriod) internal { + for (uint256 i; i < numPeriod; i++) { + warpNextPeriod(); + } + } +} diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index bdaa906e..c8b4b689 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { LibString, TContract } from "foundry-deployment-kit/types/Types.sol"; +import { LibString, TContract } from "@fdk/types/Types.sol"; enum Contract { WETH, diff --git a/script/utils/Network.sol b/script/utils/Network.sol index 9eda031a..f9d9a722 100644 --- a/script/utils/Network.sol +++ b/script/utils/Network.sol @@ -1,10 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { LibString, TNetwork } from "foundry-deployment-kit/types/Types.sol"; +import { LibString, TNetwork } from "@fdk/types/Types.sol"; enum Network { Goerli, + Sepolia, EthMainnet, RoninDevnet } @@ -14,6 +15,7 @@ using { key, name, chainId, chainAlias, envLabel, deploymentDir, explorer } for function chainId(Network network) pure returns (uint256) { if (network == Network.Goerli) return 5; if (network == Network.EthMainnet) return 1; + if (network == Network.Sepolia) return 11155111; if (network == Network.RoninDevnet) return 2022; revert("Network: Unknown chain id"); @@ -24,12 +26,14 @@ function key(Network network) pure returns (TNetwork) { } function explorer(Network network) pure returns (string memory link) { - if (network == Network.Goerli) return "https://goerli.etherscan.io/"; if (network == Network.EthMainnet) return "https://etherscan.io/"; + if (network == Network.Goerli) return "https://goerli.etherscan.io/"; + if (network == Network.Sepolia) return "hhttps://sepolia.etherscan.io/"; } function name(Network network) pure returns (string memory) { if (network == Network.Goerli) return "Goerli"; + if (network == Network.Sepolia) return "Sepolia"; if (network == Network.RoninDevnet) return "RoninDevnet"; if (network == Network.EthMainnet) return "EthMainnet"; @@ -38,6 +42,7 @@ function name(Network network) pure returns (string memory) { function deploymentDir(Network network) pure returns (string memory) { if (network == Network.Goerli) return "goerli/"; + if (network == Network.Sepolia) return "sepolia/"; if (network == Network.EthMainnet) return "ethereum/"; if (network == Network.RoninDevnet) return "ronin-devnet/"; @@ -46,6 +51,7 @@ function deploymentDir(Network network) pure returns (string memory) { function envLabel(Network network) pure returns (string memory) { if (network == Network.Goerli) return "TESTNET_PK"; + if (network == Network.Sepolia) return "TESTNET_PK"; if (network == Network.RoninDevnet) return "DEVNET_PK"; if (network == Network.EthMainnet) return "MAINNET_PK"; @@ -53,6 +59,7 @@ function envLabel(Network network) pure returns (string memory) { } function chainAlias(Network network) pure returns (string memory) { + if (network == Network.Sepolia) return "sepolia"; if (network == Network.Goerli) return "goerli"; if (network == Network.EthMainnet) return "ethereum"; if (network == Network.RoninDevnet) return "ronin-devnet"; diff --git a/src/extensions/GatewayV3.sol b/src/extensions/GatewayV3.sol index 6b10b19e..43c55b9e 100644 --- a/src/extensions/GatewayV3.sol +++ b/src/extensions/GatewayV3.sol @@ -44,10 +44,7 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { /** * @inheritdoc IQuorum */ - function setThreshold( - uint256 _numerator, - uint256 _denominator - ) external virtual onlyAdmin returns (uint256, uint256) { + function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyAdmin returns (uint256, uint256) { return _setThreshold(_numerator, _denominator); } @@ -80,10 +77,7 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { * Emits the `ThresholdUpdated` event. * */ - function _setThreshold( - uint256 _numerator, - uint256 _denominator - ) internal virtual returns (uint256 _previousNum, uint256 _previousDenom) { + function _setThreshold(uint256 _numerator, uint256 _denominator) internal virtual returns (uint256 _previousNum, uint256 _previousDenom) { if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig); _previousNum = _num; _previousDenom = _denom; diff --git a/src/extensions/MinimumWithdrawal.sol b/src/extensions/MinimumWithdrawal.sol index fa717926..6ac1f530 100644 --- a/src/extensions/MinimumWithdrawal.sol +++ b/src/extensions/MinimumWithdrawal.sol @@ -47,7 +47,7 @@ abstract contract MinimumWithdrawal is HasProxyAdmin { function _setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual { if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { minimumThreshold[_tokens[_i]] = _thresholds[_i]; unchecked { diff --git a/src/extensions/RONTransferHelper.sol b/src/extensions/RONTransferHelper.sol index 5fc77b24..95fe234a 100644 --- a/src/extensions/RONTransferHelper.sol +++ b/src/extensions/RONTransferHelper.sol @@ -40,17 +40,13 @@ abstract contract RONTransferHelper { * */ function _unsafeSendRON(address payable recipient, uint256 amount) internal returns (bool success) { - (success, ) = recipient.call{ value: amount }(""); + (success,) = recipient.call{ value: amount }(""); } /** * @dev Same purpose with {_unsafeSendRONLimitGas(address,uin256)} but containing gas limit stipend forwarded in the call. */ - function _unsafeSendRONLimitGas( - address payable recipient, - uint256 amount, - uint256 gas - ) internal returns (bool success) { - (success, ) = recipient.call{ value: amount, gas: gas }(""); + function _unsafeSendRONLimitGas(address payable recipient, uint256 amount, uint256 gas) internal returns (bool success) { + (success,) = recipient.call{ value: amount, gas: gas }(""); } } diff --git a/src/extensions/TransparentUpgradeableProxyV2.sol b/src/extensions/TransparentUpgradeableProxyV2.sol index 96963683..af851ca3 100644 --- a/src/extensions/TransparentUpgradeableProxyV2.sol +++ b/src/extensions/TransparentUpgradeableProxyV2.sol @@ -4,11 +4,7 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; contract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy { - constructor( - address _logic, - address admin_, - bytes memory _data - ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {} + constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { } /** * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. @@ -27,12 +23,8 @@ contract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy { let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0) returndatacopy(0, 0, returndatasize()) switch _result - case 0 { - revert(0, returndatasize()) - } - default { - return(0, returndatasize()) - } + case 0 { revert(0, returndatasize()) } + default { return(0, returndatasize()) } } } } diff --git a/src/extensions/WithdrawalLimitation.sol b/src/extensions/WithdrawalLimitation.sol index dc95c86f..586af812 100644 --- a/src/extensions/WithdrawalLimitation.sol +++ b/src/extensions/WithdrawalLimitation.sol @@ -9,11 +9,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { /// @dev Emitted when the high-tier vote weight threshold is updated event HighTierVoteWeightThresholdUpdated( - uint256 indexed nonce, - uint256 indexed numerator, - uint256 indexed denominator, - uint256 previousNumerator, - uint256 previousDenominator + uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator ); /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds); @@ -56,10 +52,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * - The high-tier vote weight threshold must equal to or larger than the normal threshold. * */ - function setThreshold( - uint256 _numerator, - uint256 _denominator - ) external virtual override onlyAdmin returns (uint256 _previousNum, uint256 _previousDenom) { + function setThreshold(uint256 _numerator, uint256 _denominator) external virtual override onlyAdmin returns (uint256 _previousNum, uint256 _previousDenom) { (_previousNum, _previousDenom) = _setThreshold(_numerator, _denominator); _verifyThresholds(); } @@ -106,10 +99,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `HighTierThresholdsUpdated` event. * */ - function setHighTierThresholds( - address[] calldata _tokens, - uint256[] calldata _thresholds - ) external virtual onlyAdmin { + function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setHighTierThresholds(_tokens, _thresholds); } @@ -139,10 +129,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `UnlockFeePercentagesUpdated` event. * */ - function setUnlockFeePercentages( - address[] calldata _tokens, - uint256[] calldata _percentages - ) external virtual onlyAdmin { + function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setUnlockFeePercentages(_tokens, _percentages); } @@ -175,10 +162,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `HighTierVoteWeightThresholdUpdated` event. * */ - function _setHighTierVoteWeightThreshold( - uint256 _numerator, - uint256 _denominator - ) internal returns (uint256 _previousNum, uint256 _previousDenom) { + function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) { if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig); _previousNum = _highTierVWNum; @@ -203,7 +187,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual { if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { highTierThreshold[_tokens[_i]] = _thresholds[_i]; unchecked { @@ -225,7 +209,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual { if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { lockedThreshold[_tokens[_i]] = _thresholds[_i]; unchecked { @@ -248,7 +232,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual { if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage(); unlockFeePercentages[_tokens[_i]] = _percentages[_i]; @@ -272,7 +256,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual { if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { dailyWithdrawalLimit[_tokens[_i]] = _limits[_i]; unchecked { diff --git a/src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol b/src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol index 4512c58f..f729f5ff 100644 --- a/src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol +++ b/src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol @@ -14,11 +14,7 @@ abstract contract BridgeTrackingHelper { * @notice The function checks if each individual ballot count is not greater than the total votes recorded. * @notice It also verifies that the sum of all individual ballot counts does not exceed the total available ballots. */ - function _isValidBridgeTrackingResponse( - uint256 totalBallot, - uint256 totalVote, - uint256[] memory ballots - ) internal pure returns (bool valid) { + function _isValidBridgeTrackingResponse(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) internal pure returns (bool valid) { valid = true; uint256 sumBallot; uint256 length = ballots.length; diff --git a/src/interfaces/IBridgeAdminProposal.sol b/src/interfaces/IBridgeAdminProposal.sol index b6c22fb6..cf0b0149 100644 --- a/src/interfaces/IBridgeAdminProposal.sol +++ b/src/interfaces/IBridgeAdminProposal.sol @@ -15,8 +15,5 @@ interface IBridgeAdminProposal { /** * @dev Returns the synced bridge operator set info. */ - function lastSyncedBridgeOperatorSetInfo() - external - view - returns (BridgeOperatorsBallot.BridgeOperatorSet memory bridgeOperatorSetInfo); + function lastSyncedBridgeOperatorSetInfo() external view returns (BridgeOperatorsBallot.BridgeOperatorSet memory bridgeOperatorSetInfo); } diff --git a/src/interfaces/IMainchainGatewayV3.sol b/src/interfaces/IMainchainGatewayV3.sol index 5613d096..d609494d 100644 --- a/src/interfaces/IMainchainGatewayV3.sol +++ b/src/interfaces/IMainchainGatewayV3.sol @@ -83,10 +83,7 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { * Emits the `Withdrew` once the assets are released. * */ - function submitWithdrawal( - Transfer.Receipt memory _receipt, - Signature[] memory _signatures - ) external returns (bool _locked); + function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked); /** * @dev Approves a specific withdrawal. @@ -109,11 +106,7 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { * Emits the `TokenMapped` event. * */ - function mapTokens( - address[] calldata _mainchainTokens, - address[] calldata _roninTokens, - Token.Standard[] calldata _standards - ) external; + function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, Token.Standard[] calldata _standards) external; /** * @dev Maps mainchain tokens to Ronin network and sets thresholds. diff --git a/src/interfaces/IQuorum.sol b/src/interfaces/IQuorum.sol index 29c8f462..97619626 100644 --- a/src/interfaces/IQuorum.sol +++ b/src/interfaces/IQuorum.sol @@ -3,13 +3,7 @@ pragma solidity ^0.8.0; interface IQuorum { /// @dev Emitted when the threshold is updated - event ThresholdUpdated( - uint256 indexed nonce, - uint256 indexed numerator, - uint256 indexed denominator, - uint256 previousNumerator, - uint256 previousDenominator - ); + event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator); /** * @dev Returns the threshold. @@ -35,8 +29,5 @@ interface IQuorum { * Emits the `ThresholdUpdated` event. * */ - function setThreshold( - uint256 _numerator, - uint256 _denominator - ) external returns (uint256 _previousNum, uint256 _previousDenom); + function setThreshold(uint256 _numerator, uint256 _denominator) external returns (uint256 _previousNum, uint256 _previousDenom); } diff --git a/src/interfaces/IRoninGatewayV3.sol b/src/interfaces/IRoninGatewayV3.sol index 7e72bcfa..c3a9daa9 100644 --- a/src/interfaces/IRoninGatewayV3.sol +++ b/src/interfaces/IRoninGatewayV3.sol @@ -32,11 +32,7 @@ interface IRoninGatewayV3 is MappedTokenConsumer { event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, Token.Standard[] standards); /// @dev Emitted when the threshold is updated event TrustedThresholdUpdated( - uint256 indexed nonce, - uint256 indexed numerator, - uint256 indexed denominator, - uint256 previousNumerator, - uint256 previousDenominator + uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator ); /// @dev Emitted when a deposit is voted event DepositVoted(address indexed bridgeOperator, uint256 indexed id, uint256 indexed chainId, bytes32 receiptHash); @@ -49,10 +45,7 @@ interface IRoninGatewayV3 is MappedTokenConsumer { /** * @dev Returns withdrawal signatures. */ - function getWithdrawalSignatures( - uint256 _withdrawalId, - address[] calldata _validators - ) external view returns (bytes[] memory); + function getWithdrawalSignatures(uint256 _withdrawalId, address[] calldata _validators) external view returns (bytes[] memory); /** * @dev Deposits based on the receipt. diff --git a/src/interfaces/bridge/IBridgeManagerCallback.sol b/src/interfaces/bridge/IBridgeManagerCallback.sol index 9d63f0f8..22c0d730 100644 --- a/src/interfaces/bridge/IBridgeManagerCallback.sol +++ b/src/interfaces/bridge/IBridgeManagerCallback.sol @@ -14,11 +14,7 @@ interface IBridgeManagerCallback is IERC165 { * @param addeds The corresponding boolean values indicating whether the operators were added or not. * @return selector The selector of the function being called. */ - function onBridgeOperatorsAdded( - address[] memory bridgeOperators, - uint96[] calldata weights, - bool[] memory addeds - ) external returns (bytes4 selector); + function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector); /** * @dev Handles the event when bridge operators are removed. @@ -26,8 +22,5 @@ interface IBridgeManagerCallback is IERC165 { * @param removeds The corresponding boolean values indicating whether the operators were removed or not. * @return selector The selector of the function being called. */ - function onBridgeOperatorsRemoved( - address[] memory bridgeOperators, - bool[] memory removeds - ) external returns (bytes4 selector); + function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector); } diff --git a/src/interfaces/bridge/IBridgeSlash.sol b/src/interfaces/bridge/IBridgeSlash.sol index fd90f78a..d2d60b1b 100644 --- a/src/interfaces/bridge/IBridgeSlash.sol +++ b/src/interfaces/bridge/IBridgeSlash.sol @@ -12,13 +12,7 @@ interface IBridgeSlash is IBridgeSlashEvents { * @dev Slashes the unavailability of bridge operators during a specific period. * @param period The period to slash the bridge operators for. */ - function execSlashBridgeOperators( - address[] calldata operators, - uint256[] calldata ballots, - uint256 totalBallot, - uint256 totalVote, - uint256 period - ) external; + function execSlashBridgeOperators(address[] calldata operators, uint256[] calldata ballots, uint256 totalBallot, uint256 totalVote, uint256 period) external; /** * @dev Returns the penalize durations for the specified bridge operators. diff --git a/src/interfaces/bridge/IBridgeTracking.sol b/src/interfaces/bridge/IBridgeTracking.sol index 1b86b232..32ee5386 100644 --- a/src/interfaces/bridge/IBridgeTracking.sol +++ b/src/interfaces/bridge/IBridgeTracking.sol @@ -33,10 +33,7 @@ interface IBridgeTracking { /** * @dev Returns the total number of ballots of bridge operators at the specific period `_period`. */ - function getManyTotalBallots( - uint256 _period, - address[] calldata _bridgeOperators - ) external view returns (uint256[] memory); + function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators) external view returns (uint256[] memory); /** * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`. diff --git a/src/interfaces/validator/ICandidateManager.sol b/src/interfaces/validator/ICandidateManager.sol index 2ccb5bee..7d52576e 100644 --- a/src/interfaces/validator/ICandidateManager.sol +++ b/src/interfaces/validator/ICandidateManager.sol @@ -110,12 +110,7 @@ interface ICandidateManager { * Emits the event `CandidateGranted`. * */ - function execApplyValidatorCandidate( - address _admin, - address _consensusAddr, - address payable _treasuryAddr, - uint256 _commissionRate - ) external; + function execApplyValidatorCandidate(address _admin, address _consensusAddr, address payable _treasuryAddr, uint256 _commissionRate) external; /** * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds. diff --git a/src/interfaces/validator/ICoinbaseExecution.sol b/src/interfaces/validator/ICoinbaseExecution.sol index c1946d16..15d92f06 100644 --- a/src/interfaces/validator/ICoinbaseExecution.sol +++ b/src/interfaces/validator/ICoinbaseExecution.sol @@ -19,59 +19,31 @@ interface ICoinbaseExecution is ISlashingExecution { event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators); /// @dev Emitted when the reward of the block producer is deprecated. - event BlockRewardDeprecated( - address indexed coinbaseAddr, - uint256 rewardAmount, - BlockRewardDeprecatedType deprecatedType - ); + event BlockRewardDeprecated(address indexed coinbaseAddr, uint256 rewardAmount, BlockRewardDeprecatedType deprecatedType); /// @dev Emitted when the block reward is submitted. event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount); /// @dev Emitted when the block producer reward is distributed. event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount); /// @dev Emitted when the contract fails when distributing the block producer reward. - event MiningRewardDistributionFailed( - address indexed consensusAddr, - address indexed recipient, - uint256 amount, - uint256 contractBalance - ); + event MiningRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance); /// @dev Emitted when the bridge operator reward is distributed. - event BridgeOperatorRewardDistributed( - address indexed consensusAddr, - address indexed bridgeOperator, - address indexed recipientAddr, - uint256 amount - ); + event BridgeOperatorRewardDistributed(address indexed consensusAddr, address indexed bridgeOperator, address indexed recipientAddr, uint256 amount); /// @dev Emitted when the contract fails when distributing the bridge operator reward. event BridgeOperatorRewardDistributionFailed( - address indexed consensusAddr, - address indexed bridgeOperator, - address indexed recipient, - uint256 amount, - uint256 contractBalance + address indexed consensusAddr, address indexed bridgeOperator, address indexed recipient, uint256 amount, uint256 contractBalance ); /// @dev Emitted when the fast finality reward is distributed. event FastFinalityRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount); /// @dev Emitted when the contract fails when distributing the fast finality reward. - event FastFinalityRewardDistributionFailed( - address indexed consensusAddr, - address indexed recipient, - uint256 amount, - uint256 contractBalance - ); + event FastFinalityRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance); /// @dev Emitted when the amount of RON reward is distributed to staking contract. event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts); /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract. - event StakingRewardDistributionFailed( - uint256 totalAmount, - address[] consensusAddrs, - uint256[] amounts, - uint256 contractBalance - ); + event StakingRewardDistributionFailed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts, uint256 contractBalance); /// @dev Emitted when the epoch is wrapped up. event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding); diff --git a/src/interfaces/validator/IEmergencyExit.sol b/src/interfaces/validator/IEmergencyExit.sol index d6a2cb5e..33c59060 100644 --- a/src/interfaces/validator/IEmergencyExit.sol +++ b/src/interfaces/validator/IEmergencyExit.sol @@ -6,18 +6,9 @@ interface IEmergencyExit { /// @dev Emitted when the fund is locked from an emergency exit request event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount); /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient. - event EmergencyExitLockedFundReleased( - address indexed consensusAddr, - address indexed recipient, - uint256 unlockedAmount - ); + event EmergencyExitLockedFundReleased(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount); /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back. - event EmergencyExitLockedFundReleasingFailed( - address indexed consensusAddr, - address indexed recipient, - uint256 unlockedAmount, - uint256 contractBalance - ); + event EmergencyExitLockedFundReleasingFailed(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount, uint256 contractBalance); /// @dev Emitted when the emergency exit locked amount is updated. event EmergencyExitLockedAmountUpdated(uint256 amount); diff --git a/src/interfaces/validator/IRoninValidatorSet.sol b/src/interfaces/validator/IRoninValidatorSet.sol index 6628bf13..7e7f9f15 100644 --- a/src/interfaces/validator/IRoninValidatorSet.sol +++ b/src/interfaces/validator/IRoninValidatorSet.sol @@ -8,10 +8,4 @@ import "./ICoinbaseExecution.sol"; import "./ISlashingExecution.sol"; import "./IEmergencyExit.sol"; -interface IRoninValidatorSet is - ICandidateManager, - ICommonInfo, - ISlashingExecution, - ICoinbaseExecution, - IEmergencyExit -{} +interface IRoninValidatorSet is ICandidateManager, ICommonInfo, ISlashingExecution, ICoinbaseExecution, IEmergencyExit { } diff --git a/src/interfaces/validator/info-fragments/IJailingInfo.sol b/src/interfaces/validator/info-fragments/IJailingInfo.sol index e838df9c..b9735430 100644 --- a/src/interfaces/validator/info-fragments/IJailingInfo.sol +++ b/src/interfaces/validator/info-fragments/IJailingInfo.sol @@ -11,9 +11,7 @@ interface IJailingInfo { /** * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail. */ - function getJailedTimeLeft( - address _addr - ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_); + function getJailedTimeLeft(address _addr) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_); /** * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block. @@ -23,10 +21,7 @@ interface IJailingInfo { /** * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail. */ - function getJailedTimeLeftAtBlock( - address _addr, - uint256 _blockNum - ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_); + function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_); /** * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period. diff --git a/src/libraries/BridgeOperatorsBallot.sol b/src/libraries/BridgeOperatorsBallot.sol index 347942ad..91499b9f 100644 --- a/src/libraries/BridgeOperatorsBallot.sol +++ b/src/libraries/BridgeOperatorsBallot.sol @@ -17,8 +17,7 @@ library BridgeOperatorsBallot { } // keccak256("BridgeOperatorsBallot(uint256 period,uint256 epoch,address[] operators)"); - bytes32 public constant BRIDGE_OPERATORS_BALLOT_TYPEHASH = - 0xd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a; + bytes32 public constant BRIDGE_OPERATORS_BALLOT_TYPEHASH = 0xd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a; /** * @dev Verifies whether the ballot is valid or not. @@ -32,7 +31,7 @@ library BridgeOperatorsBallot { if (_ballot.operators.length == 0) revert ErrEmptyArray(); address _addr = _ballot.operators[0]; - for (uint _i = 1; _i < _ballot.operators.length; ) { + for (uint _i = 1; _i < _ballot.operators.length;) { if (_addr >= _ballot.operators[_i]) revert ErrInvalidOrderOfBridgeOperator(); _addr = _ballot.operators[_i]; unchecked { diff --git a/src/libraries/GlobalProposal.sol b/src/libraries/GlobalProposal.sol index fafab22d..d31eb09b 100644 --- a/src/libraries/GlobalProposal.sol +++ b/src/libraries/GlobalProposal.sol @@ -10,11 +10,16 @@ library GlobalProposal { error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber); enum TargetOption { - /* 0 */ BridgeManager, - /* 1 */ GatewayContract, - /* 2 */ BridgeReward, - /* 3 */ BridgeSlash, - /* 4 */ BridgeTracking + /* 0 */ + BridgeManager, + /* 1 */ + GatewayContract, + /* 2 */ + BridgeReward, + /* 3 */ + BridgeSlash, + /* 4 */ + BridgeTracking } struct GlobalProposalDetail { diff --git a/src/libraries/Token.sol b/src/libraries/Token.sol index 49e2fa77..c475cc98 100644 --- a/src/libraries/Token.sol +++ b/src/libraries/Token.sol @@ -70,10 +70,9 @@ library Token { * @dev Validates the token info. */ function validate(Info memory _info) internal pure { - if ( - !((_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) || - (_info.erc == Standard.ERC721 && _info.quantity == 0)) - ) revert ErrInvalidInfo(); + if (!((_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) || (_info.erc == Standard.ERC721 && _info.quantity == 0))) { + revert ErrInvalidInfo(); + } } /** @@ -91,8 +90,10 @@ library Token { _success = _success && (_data.length == 0 || abi.decode(_data, (bool))); } else if (_info.erc == Standard.ERC721) { // bytes4(keccak256("transferFrom(address,address,uint256)")) - (_success, ) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id)); - } else revert ErrUnsupportedStandard(); + (_success,) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id)); + } else { + revert ErrUnsupportedStandard(); + } if (!_success) revert ErrTokenCouldNotTransferFrom(_info, _from, _to, _token); } @@ -101,7 +102,7 @@ library Token { * @dev Transfers ERC721 token and returns the result. */ function tryTransferERC721(address _token, address _to, uint256 _id) internal returns (bool _success) { - (_success, ) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id)); + (_success,) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id)); } /** @@ -122,7 +123,9 @@ library Token { _success = tryTransferERC20(_token, _to, _info.quantity); } else if (_info.erc == Standard.ERC721) { _success = tryTransferERC721(_token, _to, _info.id); - } else revert ErrUnsupportedStandard(); + } else { + revert ErrUnsupportedStandard(); + } if (!_success) revert ErrTokenCouldNotTransfer(_info, _to, _token); } @@ -133,12 +136,7 @@ library Token { * @notice Prioritizes transfer native token if the token is wrapped. * */ - function handleAssetTransfer( - Info memory _info, - address payable _to, - address _token, - IWETH _wrappedNativeToken - ) internal { + function handleAssetTransfer(Info memory _info, address payable _to, address _token, IWETH _wrappedNativeToken) internal { bool _success; if (_token == address(_wrappedNativeToken)) { // Try sending the native token before transferring the wrapped token @@ -151,7 +149,7 @@ library Token { if (_balance < _info.quantity) { // bytes4(keccak256("mint(address,uint256)")) - (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance)); + (_success,) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance)); if (!_success) revert ErrERC20MintingFailed(); } @@ -159,10 +157,12 @@ library Token { } else if (_info.erc == Token.Standard.ERC721) { if (!tryTransferERC721(_token, _to, _info.id)) { // bytes4(keccak256("mint(address,uint256)")) - (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id)); + (_success,) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id)); if (!_success) revert ErrERC721MintingFailed(); } - } else revert ErrUnsupportedStandard(); + } else { + revert ErrUnsupportedStandard(); + } } struct Owner { diff --git a/src/mocks/ronin/MockBridgeReward.sol b/src/mocks/ronin/MockBridgeReward.sol index ef7fc602..87ca3c88 100644 --- a/src/mocks/ronin/MockBridgeReward.sol +++ b/src/mocks/ronin/MockBridgeReward.sol @@ -13,16 +13,7 @@ contract MockBridgeReward is BridgeReward { uint256 period, uint256 slashUntilPeriod ) external pure returns (uint256 reward, bool isSlashed) { - return - _calcRewardAndCheckSlashedStatus( - isValidTrackingResponse, - numBridgeOperators, - rewardPerPeriod, - ballot, - totalBallot, - period, - slashUntilPeriod - ); + return _calcRewardAndCheckSlashedStatus(isValidTrackingResponse, numBridgeOperators, rewardPerPeriod, ballot, totalBallot, period, slashUntilPeriod); } function calcReward( @@ -35,19 +26,11 @@ contract MockBridgeReward is BridgeReward { reward = _calcReward(isValidTrackingResponse, numBridgeOperators, rewardPerPeriod, ballot, totalBallot); } - function isValidBridgeTrackingResponse( - uint256 totalBallot, - uint256 totalVote, - uint256[] memory ballots - ) external pure returns (bool valid) { + function isValidBridgeTrackingResponse(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) external pure returns (bool valid) { return _isValidBridgeTrackingResponse(totalBallot, totalVote, ballots); } - function shouldShareEqually( - uint256 totalBallot, - uint256 totalVote, - uint256[] memory ballots - ) external returns (bool shareEqually) { + function shouldShareEqually(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) external returns (bool shareEqually) { return _shouldShareEqually(totalBallot, totalVote, ballots); } diff --git a/src/mocks/ronin/MockBridgeSlash.sol b/src/mocks/ronin/MockBridgeSlash.sol index 2210b20e..e4c0f0d9 100644 --- a/src/mocks/ronin/MockBridgeSlash.sol +++ b/src/mocks/ronin/MockBridgeSlash.sol @@ -4,11 +4,7 @@ pragma solidity ^0.8.0; import { IBridgeSlash, BridgeSlash } from "../../ronin/gateway/BridgeSlash.sol"; contract MockBridgeSlash is BridgeSlash { - function calcSlashUntilPeriod( - Tier tier, - uint256 period, - uint256 slashUntilPeriod - ) external pure returns (uint256 newSlashUntilPeriod) { + function calcSlashUntilPeriod(Tier tier, uint256 period, uint256 slashUntilPeriod) external pure returns (uint256 newSlashUntilPeriod) { newSlashUntilPeriod = _calcSlashUntilPeriod(tier, period, slashUntilPeriod, _getPenaltyDurations()); } diff --git a/src/mocks/ronin/MockRoninGatewayV3Extended.sol b/src/mocks/ronin/MockRoninGatewayV3Extended.sol index de7c9c9b..e988c854 100644 --- a/src/mocks/ronin/MockRoninGatewayV3Extended.sol +++ b/src/mocks/ronin/MockRoninGatewayV3Extended.sol @@ -7,31 +7,21 @@ contract MockRoninGatewayV3Extended is RoninGatewayV3 { /* * @dev Returns the vote weight for a deposit based on its corressponding hash. */ - function getDepositVoteWeight( - uint256 _chainId, - uint256 _depositId, - bytes32 _hash - ) external view returns (uint256 totalWeight) { + function getDepositVoteWeight(uint256 _chainId, uint256 _depositId, bytes32 _hash) external view returns (uint256 totalWeight) { totalWeight = _getVoteWeight(depositVote[_chainId][_depositId], _hash); } /** * @dev Returns the vote weight for a mainchain withdrew acknowledgement based on its corressponding hash. */ - function getMainchainWithdrewVoteWeight( - uint256 _withdrawalId, - bytes32 _hash - ) external view returns (uint256 totalWeight) { + function getMainchainWithdrewVoteWeight(uint256 _withdrawalId, bytes32 _hash) external view returns (uint256 totalWeight) { totalWeight = _getVoteWeight(mainchainWithdrewVote[_withdrawalId], _hash); } /** * @dev Returns the vote weight for a withdraw stats based on its corressponding hash. */ - function getWithdrawalStatVoteWeight( - uint256 _withdrawalId, - bytes32 _hash - ) external view returns (uint256 totalWeight) { + function getWithdrawalStatVoteWeight(uint256 _withdrawalId, bytes32 _hash) external view returns (uint256 totalWeight) { totalWeight = _getVoteWeight(withdrawalStatVote[_withdrawalId], _hash); } } diff --git a/src/mocks/types/MockTUint256Slot.sol b/src/mocks/types/MockTUint256Slot.sol index 343775db..1be35e20 100644 --- a/src/mocks/types/MockTUint256Slot.sol +++ b/src/mocks/types/MockTUint256Slot.sol @@ -4,8 +4,7 @@ pragma solidity ^0.8.0; import { TUint256Slot } from "../../types/Types.sol"; contract MockTUint256Slot { - TUint256Slot private constant CUSTOM_SLOT_UINT256 = - TUint256Slot.wrap(keccak256(abi.encode(type(MockTUint256Slot).name))); + TUint256Slot private constant CUSTOM_SLOT_UINT256 = TUint256Slot.wrap(keccak256(abi.encode(type(MockTUint256Slot).name))); uint256 private _primitiveUint256; diff --git a/src/ronin/gateway/BridgeSlash.sol b/src/ronin/gateway/BridgeSlash.sol index 62a834b3..74eb0ecf 100644 --- a/src/ronin/gateway/BridgeSlash.sol +++ b/src/ronin/gateway/BridgeSlash.sol @@ -17,14 +17,7 @@ import { ErrLengthMismatch } from "../../utils/CommonErrors.sol"; * @title BridgeSlash * @dev A contract that implements slashing functionality for bridge operators based on their availability. */ -contract BridgeSlash is - IBridgeSlash, - IBridgeManagerCallback, - BridgeTrackingHelper, - IdentityGuard, - Initializable, - HasContracts -{ +contract BridgeSlash is IBridgeSlash, IBridgeManagerCallback, BridgeTrackingHelper, IdentityGuard, Initializable, HasContracts { /// @inheritdoc IBridgeSlash uint256 public constant TIER_1_PENALTY_DURATION = 1; /// @inheritdoc IBridgeSlash @@ -66,12 +59,7 @@ contract BridgeSlash is _disableInitializers(); } - function initialize( - address validatorContract, - address bridgeManagerContract, - address bridgeTrackingContract, - address dposGA - ) external initializer { + function initialize(address validatorContract, address bridgeManagerContract, address bridgeTrackingContract, address dposGA) external initializer { _setContract(ContractType.VALIDATOR, validatorContract); _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract); _setContract(ContractType.BRIDGE_TRACKING, bridgeTrackingContract); @@ -93,7 +81,7 @@ contract BridgeSlash is */ function onBridgeOperatorsAdded( address[] calldata bridgeOperators, - uint96[] calldata /* weights */, + uint96[] calldata, /* weights */ bool[] memory addeds ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { uint256 length = bridgeOperators.length; @@ -105,7 +93,7 @@ contract BridgeSlash is mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos(); uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { unchecked { if (addeds[i]) { _bridgeSlashInfos[bridgeOperators[i]].newlyAddedAtPeriod = uint128(currentPeriod); @@ -146,7 +134,7 @@ contract BridgeSlash is address bridgeOperator; Tier tier; - for (uint256 i; i < operators.length; ) { + for (uint256 i; i < operators.length;) { bridgeOperator = operators[i]; status = _bridgeSlashInfos[bridgeOperator]; @@ -185,10 +173,7 @@ contract BridgeSlash is /** * @inheritdoc IBridgeManagerCallback */ - function onBridgeOperatorsRemoved( - address[] calldata, - bool[] calldata - ) external view onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { + function onBridgeOperatorsRemoved(address[] calldata, bool[] calldata) external view onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector; } @@ -202,14 +187,12 @@ contract BridgeSlash is /** * @inheritdoc IBridgeSlash */ - function getSlashUntilPeriodOf( - address[] calldata bridgeOperators - ) external view returns (uint256[] memory untilPeriods) { + function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory untilPeriods) { uint256 length = bridgeOperators.length; untilPeriods = new uint256[](length); mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos(); - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { untilPeriods[i] = _bridgeSlashInfos[bridgeOperators[i]].slashUntilPeriod; unchecked { ++i; @@ -225,7 +208,7 @@ contract BridgeSlash is addedPeriods = new uint256[](length); mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos(); - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { addedPeriods[i] = _bridgeSlashInfos[bridgeOperators[i]].newlyAddedAtPeriod; unchecked { ++i; @@ -253,10 +236,7 @@ contract BridgeSlash is * @param period The current period. * @return met A boolean indicates that the threshold for removal is met. */ - function _isSlashDurationMetRemovalThreshold( - uint256 slashUntilPeriod, - uint256 period - ) internal pure returns (bool met) { + function _isSlashDurationMetRemovalThreshold(uint256 slashUntilPeriod, uint256 period) internal pure returns (bool met) { met = slashUntilPeriod - (period - 1) >= REMOVE_DURATION_THRESHOLD; } diff --git a/src/ronin/gateway/BridgeTracking.sol b/src/ronin/gateway/BridgeTracking.sol index 7dd21a1f..aeb9f7f9 100644 --- a/src/ronin/gateway/BridgeTracking.sol +++ b/src/ronin/gateway/BridgeTracking.sol @@ -220,9 +220,8 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr uint256 totalBallot_ = totalBallot(lastSyncPeriod); address bridgeSlashContract = getContract(ContractType.BRIDGE_SLASH); - (bool success, bytes memory returnOrRevertData) = bridgeSlashContract.call( - abi.encodeCall(IBridgeSlash.execSlashBridgeOperators, (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod)) - ); + (bool success, bytes memory returnOrRevertData) = + bridgeSlashContract.call(abi.encodeCall(IBridgeSlash.execSlashBridgeOperators, (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod))); if (!success) { emit ExternalCallFailed(bridgeSlashContract, IBridgeSlash.execSlashBridgeOperators.selector, returnOrRevertData); } diff --git a/src/ronin/gateway/PauseEnforcer.sol b/src/ronin/gateway/PauseEnforcer.sol index 28480cdb..7e9b860f 100644 --- a/src/ronin/gateway/PauseEnforcer.sol +++ b/src/ronin/gateway/PauseEnforcer.sol @@ -63,7 +63,7 @@ contract PauseEnforcer is AccessControlEnumerable, Initializable { function initialize(IPauseTarget _target, address _admin, address[] memory _sentries) external initializer { _changeTarget(_target); _setupRole(DEFAULT_ADMIN_ROLE, _admin); - for (uint _i; _i < _sentries.length; ) { + for (uint _i; _i < _sentries.length;) { _grantRole(SENTRY_ROLE, _sentries[_i]); unchecked { diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 565e1f27..d7a129e8 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -15,15 +15,7 @@ import "../../interfaces/validator/IRoninValidatorSet.sol"; import "../../libraries/IsolatedGovernance.sol"; import "../../interfaces/bridge/IBridgeManager.sol"; -contract RoninGatewayV3 is - GatewayV3, - Initializable, - MinimumWithdrawal, - AccessControlEnumerable, - VoteStatusConsumer, - IRoninGatewayV3, - HasContracts -{ +contract RoninGatewayV3 is GatewayV3, Initializable, MinimumWithdrawal, AccessControlEnumerable, VoteStatusConsumer, IRoninGatewayV3, HasContracts { using Token for Token.Info; using Transfer for Transfer.Request; using Transfer for Transfer.Receipt; @@ -123,10 +115,7 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function getWithdrawalSignatures( - uint256 withdrawalId, - address[] calldata operators - ) external view returns (bytes[] memory _signatures) { + function getWithdrawalSignatures(uint256 withdrawalId, address[] calldata operators) external view returns (bytes[] memory _signatures) { _signatures = new bytes[](operators.length); for (uint256 _i = 0; _i < operators.length;) { _signatures[_i] = _withdrawalSig[withdrawalId][operators[_i]]; @@ -147,11 +136,7 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) - external - onlyBridgeOperator - returns (bool[] memory _executedReceipts) - { + function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external onlyBridgeOperator returns (bool[] memory _executedReceipts) { address governor = msg.sender; uint256 minVoteWeight = minimumVoteWeight(); @@ -183,12 +168,7 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function tryBulkDepositFor(Transfer.Receipt[] calldata receipts) - external - whenNotPaused - onlyBridgeOperator - returns (bool[] memory _executedReceipts) - { + function tryBulkDepositFor(Transfer.Receipt[] calldata receipts) external whenNotPaused onlyBridgeOperator returns (bool[] memory _executedReceipts) { uint length = receipts.length; _executedReceipts = new bool[](length); uint256 minVoteWeight = minimumVoteWeight(); @@ -240,10 +220,7 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function bulkSubmitWithdrawalSignatures( - uint256[] calldata withdrawals, - bytes[] calldata signatures - ) external whenNotPaused onlyBridgeOperator { + function bulkSubmitWithdrawalSignatures(uint256[] calldata withdrawals, bytes[] calldata signatures) external whenNotPaused onlyBridgeOperator { address operator = msg.sender; uint length = withdrawals.length; @@ -410,8 +387,7 @@ contract RoninGatewayV3 is address _mainchainTokenAddr ) internal returns (uint256 _withdrawalId) { _withdrawalId = withdrawalCount++; - Transfer.Receipt memory _receipt = - _request.into_withdrawal_receipt(_requester, _withdrawalId, _mainchainTokenAddr, _chainId); + Transfer.Receipt memory _receipt = _request.into_withdrawal_receipt(_requester, _withdrawalId, _mainchainTokenAddr, _chainId); withdrawal[_withdrawalId] = _receipt; emit WithdrawalRequested(_receipt.hash(), _receipt); } @@ -452,12 +428,8 @@ contract RoninGatewayV3 is /** * @dev Returns the vote weight for a specified hash. */ - function _getVoteWeight( - IsolatedGovernance.Vote storage _v, - bytes32 _hash - ) internal view returns (uint256 _totalWeight) { - (, address[] memory bridgeOperators, uint96[] memory weights) = - IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getFullBridgeOperatorInfos(); + function _getVoteWeight(IsolatedGovernance.Vote storage _v, bytes32 _hash) internal view returns (uint256 _totalWeight) { + (, address[] memory bridgeOperators, uint96[] memory weights) = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getFullBridgeOperatorInfos(); uint256 length = bridgeOperators.length; unchecked { for (uint _i; _i < length; ++_i) { @@ -468,10 +440,7 @@ contract RoninGatewayV3 is } } - function setTrustedThreshold( - uint256 _trustedNumerator, - uint256 _trustedDenominator - ) external virtual onlyAdmin returns (uint256, uint256) { + function setTrustedThreshold(uint256 _trustedNumerator, uint256 _trustedDenominator) external virtual onlyAdmin returns (uint256, uint256) { return _setTrustedThreshold(_trustedNumerator, _trustedDenominator); } @@ -499,9 +468,7 @@ contract RoninGatewayV3 is _trustedNum = _trustedNumerator; _trustedDenom = _trustedDenominator; unchecked { - emit TrustedThresholdUpdated( - nonce++, _trustedNumerator, _trustedDenominator, _previousTrustedNum, _previousTrustedDenom - ); + emit TrustedThresholdUpdated(nonce++, _trustedNumerator, _trustedDenominator, _previousTrustedNum, _previousTrustedDenom); } } diff --git a/src/utils/ContractType.sol b/src/utils/ContractType.sol index 2fcb32f6..928c6354 100644 --- a/src/utils/ContractType.sol +++ b/src/utils/ContractType.sol @@ -2,20 +2,36 @@ pragma solidity ^0.8.0; enum ContractType { - /* 0 */ UNKNOWN, - /* 1 */ PAUSE_ENFORCER, - /* 2 */ BRIDGE, - /* 3 */ BRIDGE_TRACKING, - /* 4 */ GOVERNANCE_ADMIN, - /* 5 */ MAINTENANCE, - /* 6 */ SLASH_INDICATOR, - /* 7 */ STAKING_VESTING, - /* 8 */ VALIDATOR, - /* 9 */ STAKING, - /* 10 */ RONIN_TRUSTED_ORGANIZATION, - /* 11 */ BRIDGE_MANAGER, - /* 12 */ BRIDGE_SLASH, - /* 13 */ BRIDGE_REWARD, - /* 14 */ FAST_FINALITY_TRACKING, - /* 15 */ PROFILE + /* 0 */ + UNKNOWN, + /* 1 */ + PAUSE_ENFORCER, + /* 2 */ + BRIDGE, + /* 3 */ + BRIDGE_TRACKING, + /* 4 */ + GOVERNANCE_ADMIN, + /* 5 */ + MAINTENANCE, + /* 6 */ + SLASH_INDICATOR, + /* 7 */ + STAKING_VESTING, + /* 8 */ + VALIDATOR, + /* 9 */ + STAKING, + /* 10 */ + RONIN_TRUSTED_ORGANIZATION, + /* 11 */ + BRIDGE_MANAGER, + /* 12 */ + BRIDGE_SLASH, + /* 13 */ + BRIDGE_REWARD, + /* 14 */ + FAST_FINALITY_TRACKING, + /* 15 */ + PROFILE } diff --git a/src/utils/IdentityGuard.sol b/src/utils/IdentityGuard.sol index 4edbc32d..c84224b8 100644 --- a/src/utils/IdentityGuard.sol +++ b/src/utils/IdentityGuard.sol @@ -92,9 +92,7 @@ abstract contract IdentityGuard { bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId)); (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams); if (!success) { - (success, returnOrRevertData) = contractAddr.staticcall( - abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)) - ); + (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams))); if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr); } if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr); diff --git a/src/utils/RoleAccess.sol b/src/utils/RoleAccess.sol index a96c8b0f..4ea496c3 100644 --- a/src/utils/RoleAccess.sol +++ b/src/utils/RoleAccess.sol @@ -2,15 +2,26 @@ pragma solidity ^0.8.0; enum RoleAccess { - /* 0 */ UNKNOWN, - /* 1 */ ADMIN, - /* 2 */ COINBASE, - /* 3 */ GOVERNOR, - /* 4 */ CANDIDATE_ADMIN, - /* 5 */ WITHDRAWAL_MIGRATOR, - /* 6 */ __DEPRECATED_BRIDGE_OPERATOR, - /* 7 */ BLOCK_PRODUCER, - /* 8 */ VALIDATOR_CANDIDATE, - /* 9 */ CONSENSUS, - /* 10 */ TREASURY + /* 0 */ + UNKNOWN, + /* 1 */ + ADMIN, + /* 2 */ + COINBASE, + /* 3 */ + GOVERNOR, + /* 4 */ + CANDIDATE_ADMIN, + /* 5 */ + WITHDRAWAL_MIGRATOR, + /* 6 */ + __DEPRECATED_BRIDGE_OPERATOR, + /* 7 */ + BLOCK_PRODUCER, + /* 8 */ + VALIDATOR_CANDIDATE, + /* 9 */ + CONSENSUS, + /* 10 */ + TREASURY } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index d2c84f31..1bf04d90 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.19; import { console2 as console } from "forge-std/console2.sol"; import { Base_Test } from "../../Base.t.sol"; -import { LibSharedAddress } from "foundry-deployment-kit/libraries/LibSharedAddress.sol"; +import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; import { ISharedArgument } from "@ronin/script/interfaces/ISharedArgument.sol"; -import { IGeneralConfig } from "foundry-deployment-kit/interfaces/IGeneralConfig.sol"; +import { IGeneralConfig } from "@fdk/interfaces/IGeneralConfig.sol"; import { GeneralConfig } from "@ronin/script/GeneralConfig.sol"; import { Network } from "@ronin/script/utils/Network.sol"; diff --git a/test/bridge/integration/bridge-tracking/EpochE1_VoteIsApprovedInLastEpoch.BridgeTracking.t.sol b/test/bridge/integration/bridge-tracking/EpochE1_VoteIsApprovedInLastEpoch.BridgeTracking.t.sol index c4997634..2d227f36 100644 --- a/test/bridge/integration/bridge-tracking/EpochE1_VoteIsApprovedInLastEpoch.BridgeTracking.t.sol +++ b/test/bridge/integration/bridge-tracking/EpochE1_VoteIsApprovedInLastEpoch.BridgeTracking.t.sol @@ -5,8 +5,7 @@ import { IBridgeTracking } from "@ronin/contracts/interfaces/bridge/IBridgeTrack import { MockGatewayForTracking } from "@ronin/contracts/mocks/MockGatewayForTracking.sol"; import "../BaseIntegration.t.sol"; -import { EpochE2_VoteIsNotApprovedInLastEpoch_BridgeTracking_Test } from - "./EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol"; +import { EpochE2_VoteIsNotApprovedInLastEpoch_BridgeTracking_Test } from "./EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol"; // Epoch e-1 test: Vote is approved in the last epoch of period contract EpochE1_VoteIsApprovedInLastEpoch_BridgeTracking_Test is BaseIntegration_Test { @@ -30,8 +29,7 @@ contract EpochE1_VoteIsApprovedInLastEpoch_BridgeTracking_Test is BaseIntegratio // upgrade ronin gateway v3 _mockRoninGatewayV3 = new MockGatewayForTracking(address(_bridgeTracking)); - bytes memory calldata_ = - abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, address(_mockRoninGatewayV3))); + bytes memory calldata_ = abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, address(_mockRoninGatewayV3))); _roninProposalUtils.functionDelegateCall(address(_bridgeTracking), calldata_); vm.deal(address(_bridgeReward), 10 ether); diff --git a/test/bridge/integration/bridge-tracking/EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol b/test/bridge/integration/bridge-tracking/EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol index 5f487d0d..2b39e6d0 100644 --- a/test/bridge/integration/bridge-tracking/EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol +++ b/test/bridge/integration/bridge-tracking/EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol @@ -22,8 +22,7 @@ contract EpochE2_VoteIsNotApprovedInLastEpoch_BridgeTracking_Test is BaseIntegra // upgrade ronin gateway v3 _mockRoninGatewayV3 = new MockGatewayForTracking(address(_bridgeTracking)); - bytes memory calldata_ = - abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, address(_mockRoninGatewayV3))); + bytes memory calldata_ = abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, address(_mockRoninGatewayV3))); _roninProposalUtils.functionDelegateCall(address(_bridgeTracking), calldata_); vm.deal(address(_bridgeReward), 10 ether); @@ -102,15 +101,9 @@ contract EpochE2_VoteIsNotApprovedInLastEpoch_BridgeTracking_Test is BaseIntegra uint256 expectedTotalVotes = 1; assertEq(_bridgeTracking.totalVote(lastPeriod), expectedTotalVotes); assertEq(_bridgeTracking.totalBallot(lastPeriod), expectedTotalVotes * 3); - assertEq( - _bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[0]), expectedTotalVotes - ); - assertEq( - _bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[1]), expectedTotalVotes - ); - assertEq( - _bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[2]), expectedTotalVotes - ); + assertEq(_bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[0]), expectedTotalVotes); + assertEq(_bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[1]), expectedTotalVotes); + assertEq(_bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[2]), expectedTotalVotes); assertEq(_bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[3]), 0); _period = newPeriod; diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol index 04b549c9..2341b708 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol @@ -8,7 +8,7 @@ import { Token } from "@ronin/contracts/libraries/Token.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import "../../BaseIntegration.t.sol"; -contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegration_Test{ +contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegration_Test { using Transfer for Transfer.Receipt; Transfer.Receipt _withdrawalReceipt; diff --git a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol index fec87e77..59416233 100644 --- a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol +++ b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol @@ -69,8 +69,7 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { info: Token.Info({ erc: Token.Standard.ERC20, id: 0, quantity: 100 }) }); - uint256 numOperatorsForVoteExecuted = - _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; + uint256 numOperatorsForVoteExecuted = _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; for (uint256 i; i < numOperatorsForVoteExecuted; i++) { vm.prank(_param.roninBridgeManager.bridgeOperators[i]); _roninGatewayV3.depositFor(receipt); diff --git a/test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol b/test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol index 60e7dd9c..b3fe1f9e 100644 --- a/test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol +++ b/test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol @@ -22,8 +22,7 @@ contract SetConfig_PauseEnforcer_Test is BaseIntegration_Test { } function test_sentryEnforcerRole() public { - bool isSentryRole = - _roninPauseEnforcer.hasRole(_roninPauseEnforcer.SENTRY_ROLE(), _param.roninPauseEnforcer.sentries[0]); + bool isSentryRole = _roninPauseEnforcer.hasRole(_roninPauseEnforcer.SENTRY_ROLE(), _param.roninPauseEnforcer.sentries[0]); assertEq(isSentryRole, true); } diff --git a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol index 8a8b18b7..9b0c3b52 100644 --- a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol +++ b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol @@ -33,7 +33,6 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { receipt.id = 1; _depositReceipts.push(receipt); - _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; } diff --git a/test/bridge/unit/concrete/bridge-manager/constructor.t.sol b/test/bridge/unit/concrete/bridge-manager/constructor.t.sol index 16dd066f..ccb6d51b 100644 --- a/test/bridge/unit/concrete/bridge-manager/constructor.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/constructor.t.sol @@ -38,17 +38,10 @@ contract Constructor_BridgeManager_Unit_Concrete_Test is BridgeManager_Unit_Conc } function test_GetFullBridgeOperatorInfos() external { - ( - address[] memory expectingBridgeOperators, - address[] memory expectingGovernors, - uint96[] memory expectingVoteWeights - ) = _getBridgeMembers(); - - ( - address[] memory returnedGovernors, - address[] memory returnedBridgeOperators, - uint96[] memory returnedVoteWeights - ) = _bridgeManager.getFullBridgeOperatorInfos(); + (address[] memory expectingBridgeOperators, address[] memory expectingGovernors, uint96[] memory expectingVoteWeights) = _getBridgeMembers(); + + (address[] memory returnedGovernors, address[] memory returnedBridgeOperators, uint96[] memory returnedVoteWeights) = + _bridgeManager.getFullBridgeOperatorInfos(); _assertBridgeMembers({ comparingOperators: returnedBridgeOperators, diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol index 9514e0fb..76771ee5 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol @@ -52,7 +52,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils period = _bound(period, 1, type(uint64).max); // Decode the default bridge manager inputs - (address[] memory bridgeOperators, , ) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); + (address[] memory bridgeOperators,,) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); // Generate random numbers for slashUntils and ballots uint256[] memory slashUntils = _createRandomNumbers(r1, bridgeOperators.length, 0, MAX_FUZZ_INPUTS); @@ -73,13 +73,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils if (shouldShareEqually) { _assertCalculateRewardEqually(shouldShareEqually, rewardPerPeriod, totalBallot, bridgeRewardContract, ballots); } else { - _assertCalculateRewardProportionally( - shouldShareEqually, - rewardPerPeriod, - totalBallot, - bridgeRewardContract, - ballots - ); + _assertCalculateRewardProportionally(shouldShareEqually, rewardPerPeriod, totalBallot, bridgeRewardContract, ballots); } // Assert the slashing of bridge operators for the given period _assertSlashBridgeOperators(period, slashUntils, bridgeRewardContract); @@ -95,7 +89,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils MockBridgeReward bridgeRewardContract = MockBridgeReward(payable(_bridgeRewardContract)); // Decode the default bridge manager inputs - (address[] memory bridgeOperators, , ) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); + (address[] memory bridgeOperators,,) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); // Create an empty array for ballots uint256[] memory ballots = new uint256[](bridgeOperators.length); // Calculate the total number of ballots @@ -132,7 +126,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils uint256 actual; uint256 expected; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { console.log("actual", actual); console.log("expected", expected); @@ -170,7 +164,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils uint256 length = ballots.length; uint256 expected = rewardPerPeriod / length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { console.log("actual", actual); console.log("expected", expected); @@ -191,13 +185,9 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils * @param slashUntils The array of slash until periods for bridge operators. * @param bridgeRewardContract The mock bridge reward contract. */ - function _assertSlashBridgeOperators( - uint256 period, - uint256[] memory slashUntils, - MockBridgeReward bridgeRewardContract - ) internal { + function _assertSlashBridgeOperators(uint256 period, uint256[] memory slashUntils, MockBridgeReward bridgeRewardContract) internal { uint256 length = slashUntils.length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { // Check if the bridge operator is slashed for the current period if (period <= slashUntils[i]) { // Assert that the bridge operator is slashed for the current period @@ -215,18 +205,14 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils _validatorContract = address(new MockValidatorContract_OnlyTiming_ForHardhatTest(200)); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - DEFAULT_R1, - DEFAULT_R2, - DEFAULT_R3, - DEFAULT_NUM_BRIDGE_OPERATORS - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); _defaultBridgeManagerInputs = abi.encode(bridgeOperators, governors, voteWeights); _bridgeManagerLogic = address(new MockBridgeManager()); _bridgeManagerContract = address( - new TransparentUpgradeableProxy(_bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) + new TransparentUpgradeableProxy(_bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) ); _bridgeTrackingLogic = address(new BridgeTracking()); @@ -235,12 +221,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils _bridgeSlashLogic = address(new MockBridgeSlash()); _bridgeSlashContract = address( new TransparentUpgradeableProxy( - _bridgeSlashLogic, - _admin, - abi.encodeCall( - BridgeSlash.initialize, - (_validatorContract, _bridgeManagerContract, _bridgeTrackingContract, address(0)) - ) + _bridgeSlashLogic, _admin, abi.encodeCall(BridgeSlash.initialize, (_validatorContract, _bridgeManagerContract, _bridgeTrackingContract, address(0))) ) ); @@ -251,14 +232,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils _admin, abi.encodeCall( BridgeReward.initialize, - ( - _bridgeManagerContract, - _bridgeTrackingContract, - _bridgeSlashContract, - _validatorContract, - address(0), - DEFAULT_REWARD_PER_PERIOD - ) + (_bridgeManagerContract, _bridgeTrackingContract, _bridgeSlashContract, _validatorContract, address(0), DEFAULT_REWARD_PER_PERIOD) ) ) ); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol index 995cb5b1..c3ee142a 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol @@ -61,11 +61,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { IBridgeSlash bridgeSlashContract = IBridgeSlash(_bridgeSlashContract); IBridgeSlash.Tier tier = bridgeSlashContract.getSlashTier(ballot, totalVote); // Calculate the new slash until period using the mock bridge slash contract - uint256 newSlashUntilPeriod = MockBridgeSlash(payable(_bridgeSlashContract)).calcSlashUntilPeriod( - tier, - period, - slashUntilPeriod - ); + uint256 newSlashUntilPeriod = MockBridgeSlash(payable(_bridgeSlashContract)).calcSlashUntilPeriod(tier, period, slashUntilPeriod); // Log the tier and slash period information console.log("tier", "period", "slashUntilPeriod", "newSlashUntilPeriod"); @@ -84,9 +80,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { assertTrue(newSlashUntilPeriod == uint256(slashUntilPeriod) + bridgeSlashContract.TIER_2_PENALTY_DURATION()); // Check if the slash duration meets the removal threshold - if ( - MockBridgeSlash(payable(_bridgeSlashContract)).isSlashDurationMetRemovalThreshold(newSlashUntilPeriod, period) - ) { + if (MockBridgeSlash(payable(_bridgeSlashContract)).isSlashDurationMetRemovalThreshold(newSlashUntilPeriod, period)) { assertTrue(newSlashUntilPeriod - period + 1 >= bridgeSlashContract.REMOVE_DURATION_THRESHOLD()); } } else { @@ -104,13 +98,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { * @param numBridgeOperators The number of bridge operators to add. * @param period The current period. */ - function test_bridgeSlash_recordEvents_onBridgeOperatorsAdded( - uint256 r1, - uint256 r2, - uint256 r3, - uint256 numBridgeOperators, - uint256 period - ) external { + function test_bridgeSlash_recordEvents_onBridgeOperatorsAdded(uint256 r1, uint256 r2, uint256 r3, uint256 numBridgeOperators, uint256 period) external { // Assume the input values are not equal to the default values vm.assume(r1 != DEFAULT_R1 && r2 != DEFAULT_R2 && r3 != DEFAULT_R3); // Bound the period between 1 and the maximum value of uint64 @@ -126,20 +114,15 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { MockBridgeManager(payable(_bridgeManagerContract)).registerCallbacks(registers); // Generate valid inputs for bridge operators - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidAndNonExistingInputs( - _bridgeManagerContract, - r1, - r2, - r3, - numBridgeOperators - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidAndNonExistingInputs(_bridgeManagerContract, r1, r2, r3, numBridgeOperators); _addBridgeOperators(_bridgeManagerContract, _bridgeManagerContract, voteWeights, governors, bridgeOperators); // Retrieve the added periods for the bridge operators uint256[] memory addedPeriods = IBridgeSlash(_bridgeSlashContract).getAddedPeriodOf(bridgeOperators); // Check that the added periods match the current period - for (uint256 i; i < addedPeriods.length; ) { + for (uint256 i; i < addedPeriods.length;) { assertEq(addedPeriods[i], period); unchecked { ++i; @@ -154,12 +137,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { * @param duration The duration of the test. * @param newlyAddedSize The number of newly added operators. */ - function test_ExcludeNewlyAddedOperators_ExecSlashBridgeOperators( - uint256 r1, - uint256 period, - uint256 duration, - uint256 newlyAddedSize - ) external { + function test_ExcludeNewlyAddedOperators_ExecSlashBridgeOperators(uint256 r1, uint256 period, uint256 duration, uint256 newlyAddedSize) external { vm.assume(r1 != 0); vm.assume(r1 != DEFAULT_R1 && r1 != DEFAULT_R2 && r1 != DEFAULT_R3); // Bound the period, duration, and newlyAddedSize values @@ -174,9 +152,9 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { MockBridgeManager(payable(_bridgeManagerContract)).registerCallbacks(registers); // Decode the default bridge manager inputs to retrieve bridge operators - (address[] memory bridgeOperators, , ) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); + (address[] memory bridgeOperators,,) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); - for (uint256 i; i < duration; ) { + for (uint256 i; i < duration;) { // Set the current period in the mock validator contract MockValidatorSet_ForFoundryTest(payable(_validatorContract)).setCurrentPeriod(period); // Generate valid inputs for newly added operators @@ -185,20 +163,11 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { { address[] memory newlyAddedGovernors; uint96[] memory newlyAddedWeights; - (newlyAddedOperators, newlyAddedGovernors, newlyAddedWeights) = getValidInputs( - r1, - ~r1, - r1 << 1, - newlyAddedSize - ); + (newlyAddedOperators, newlyAddedGovernors, newlyAddedWeights) = getValidInputs(r1, ~r1, r1 << 1, newlyAddedSize); // Add the newly added operators using the bridge manager contract vm.prank(_bridgeManagerContract, _bridgeManagerContract); - bool[] memory addeds = IBridgeManager(_bridgeManagerContract).addBridgeOperators( - newlyAddedWeights, - newlyAddedGovernors, - newlyAddedOperators - ); + bool[] memory addeds = IBridgeManager(_bridgeManagerContract).addBridgeOperators(newlyAddedWeights, newlyAddedGovernors, newlyAddedOperators); vm.assume(addeds.sum() == addeds.length); // Retrieve the added periods for the newly added operators newlyAddedAtPeriods = IBridgeSlash(_bridgeSlashContract).getAddedPeriodOf(newlyAddedOperators); @@ -208,20 +177,12 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { uint256[] memory ballots = _createRandomNumbers(r1, bridgeOperators.length + newlyAddedSize, 0, MAX_FUZZ_INPUTS); // Execute slashBridgeOperators for all operators vm.prank(_bridgeTrackingContract, _bridgeTrackingContract); - IBridgeSlash(_bridgeSlashContract).execSlashBridgeOperators( - bridgeOperators.extend(newlyAddedOperators), - ballots, - ballots.sum(), - ballots.sum(), - period - ); + IBridgeSlash(_bridgeSlashContract).execSlashBridgeOperators(bridgeOperators.extend(newlyAddedOperators), ballots, ballots.sum(), ballots.sum(), period); // Check that the slashUntilPeriods and newlyAddedAtPeriods are correctly set uint256 length = newlyAddedAtPeriods.length; - uint256[] memory slashUntilPeriods = IBridgeSlash(_bridgeSlashContract).getSlashUntilPeriodOf( - newlyAddedOperators - ); - for (uint256 j; j < length; ) { + uint256[] memory slashUntilPeriods = IBridgeSlash(_bridgeSlashContract).getSlashUntilPeriodOf(newlyAddedOperators); + for (uint256 j; j < length;) { assertEq(slashUntilPeriods[j], 0); assertEq(newlyAddedAtPeriods[j], period); unchecked { @@ -251,14 +212,14 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { duration = _bound(duration, MIN_PERIOD_DURATION, MAX_PERIOD_DURATION); // Decode the default bridge manager inputs to retrieve bridge operators - (address[] memory bridgeOperators, , ) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); + (address[] memory bridgeOperators,,) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); vm.startPrank(_bridgeTrackingContract, _bridgeTrackingContract); uint256[] memory ballots; uint256 totalBallotForPeriod; IBridgeSlash bridgeSlashContract = IBridgeSlash(_bridgeSlashContract); MockValidatorSet_ForFoundryTest validatorContract = MockValidatorSet_ForFoundryTest(payable(_validatorContract)); - for (uint256 i; i < duration; ) { + for (uint256 i; i < duration;) { // Generate random ballots for bridge operators ballots = _createRandomNumbers(r1, bridgeOperators.length, 0, MAX_FUZZ_INPUTS); totalBallotForPeriod = ballots.sum(); @@ -267,13 +228,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { validatorContract.setCurrentPeriod(period); // Execute the `execSlashBridgeOperators` function - bridgeSlashContract.execSlashBridgeOperators( - bridgeOperators, - ballots, - totalBallotForPeriod, - totalBallotForPeriod, - period - ); + bridgeSlashContract.execSlashBridgeOperators(bridgeOperators, ballots, totalBallotForPeriod, totalBallotForPeriod, period); // Generate the next random number for r1 using the keccak256 hash function r1 = uint256(keccak256(abi.encode(r1))); @@ -289,12 +244,8 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { function _setUp() internal virtual { _admin = makeAddr("central-admin"); _validatorContract = address(new MockValidatorSet_ForFoundryTest()); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - DEFAULT_R1, - DEFAULT_R2, - DEFAULT_R3, - DEFAULT_NUM_BRIDGE_OPERATORS - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); _defaultBridgeManagerInputs = abi.encode(bridgeOperators, governors, voteWeights); _bridgeManagerLogic = address(new MockBridgeManager()); @@ -306,19 +257,14 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { _gatewayContract = address(new TransparentUpgradeableProxyV2(_gatewayLogic, _admin, "")); _bridgeTrackingLogic = address(new BridgeTracking()); - _bridgeTrackingContract = address( - new TransparentUpgradeableProxyV2(_bridgeTrackingLogic, _bridgeManagerContract, "") - ); + _bridgeTrackingContract = address(new TransparentUpgradeableProxyV2(_bridgeTrackingLogic, _bridgeManagerContract, "")); _bridgeSlashLogic = address(new MockBridgeSlash()); _bridgeSlashContract = address( new TransparentUpgradeableProxyV2( _bridgeSlashLogic, _bridgeManagerContract, - abi.encodeCall( - BridgeSlash.initialize, - (_validatorContract, _bridgeManagerContract, _bridgeTrackingContract, address(0)) - ) + abi.encodeCall(BridgeSlash.initialize, (_validatorContract, _bridgeManagerContract, _bridgeTrackingContract, address(0))) ) ); } diff --git a/test/helpers/LibArrayUtils.t.sol b/test/helpers/LibArrayUtils.t.sol index 8ca5451a..e4442799 100644 --- a/test/helpers/LibArrayUtils.t.sol +++ b/test/helpers/LibArrayUtils.t.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.0; library LibArrayUtils { function sum(bool[] memory arr) internal pure returns (uint256 total) { uint256 length = arr.length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { if (arr[i]) total++; unchecked { ++i; @@ -14,7 +14,7 @@ library LibArrayUtils { function sum(uint256[] memory arr) internal pure returns (uint256 total) { uint256 length = arr.length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { total += arr[i]; unchecked { ++i; @@ -39,7 +39,7 @@ library LibArrayUtils { c[i] = a[i]; } - for (uint j; j < b.length; ) { + for (uint j; j < b.length;) { c[i] = b[j]; ++i; ++j; @@ -54,7 +54,7 @@ library LibArrayUtils { c[i] = a[i]; } - for (uint j; j < b.length; ) { + for (uint j; j < b.length;) { c[i] = b[j]; ++i; ++j; diff --git a/test/helpers/Randomizer.t.sol b/test/helpers/Randomizer.t.sol index af11ba36..9e317c47 100644 --- a/test/helpers/Randomizer.t.sol +++ b/test/helpers/Randomizer.t.sol @@ -11,7 +11,7 @@ abstract contract Randomizer is Base_Test { function _createRandomAddresses(uint256 seed, uint256 amount) internal returns (address[] memory addrs) { addrs = new address[](amount); - for (uint256 i; i < amount; ) { + for (uint256 i; i < amount;) { seed = uint256(keccak256(abi.encode(seed))); addrs[i] = vm.addr(seed); vm.etch(addrs[i], abi.encode()); @@ -23,16 +23,11 @@ abstract contract Randomizer is Base_Test { } } - function _createRandomNumbers( - uint256 seed, - uint256 amount, - uint256 min, - uint256 max - ) internal pure returns (uint256[] memory nums) { + function _createRandomNumbers(uint256 seed, uint256 amount, uint256 min, uint256 max) internal pure returns (uint256[] memory nums) { uint256 r; nums = new uint256[](amount); - for (uint256 i; i < amount; ) { + for (uint256 i; i < amount;) { r = _randomize(seed, min, max); nums[i] = r; seed = r; diff --git a/test/mocks/MockBridgeSlash.sol b/test/mocks/MockBridgeSlash.sol index 462aa12f..f605e621 100644 --- a/test/mocks/MockBridgeSlash.sol +++ b/test/mocks/MockBridgeSlash.sol @@ -6,27 +6,21 @@ import { IBridgeSlash } from "@ronin/contracts/interfaces/bridge/IBridgeSlash.so contract MockBridgeSlash is IBridgeSlash { mapping(address => uint256) internal _slashMap; - function MINIMUM_VOTE_THRESHOLD() external view returns (uint256) {} + function MINIMUM_VOTE_THRESHOLD() external view returns (uint256) { } - function REMOVE_DURATION_THRESHOLD() external view returns (uint256) {} + function REMOVE_DURATION_THRESHOLD() external view returns (uint256) { } - function TIER_1_PENALTY_DURATION() external view returns (uint256) {} + function TIER_1_PENALTY_DURATION() external view returns (uint256) { } - function TIER_2_PENALTY_DURATION() external view returns (uint256) {} + function TIER_2_PENALTY_DURATION() external view returns (uint256) { } - function execSlashBridgeOperators( - address[] calldata operators, - uint256[] calldata ballots, - uint256 totalBallot, - uint256 totalVote, - uint256 period - ) external {} + function execSlashBridgeOperators(address[] calldata operators, uint256[] calldata ballots, uint256 totalBallot, uint256 totalVote, uint256 period) external { } - function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods) {} + function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods) { } - function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations) {} + function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations) { } - function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier) {} + function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier) { } function getSlashUntilPeriodOf(address[] calldata operators) external view returns (uint256[] memory untilPeriods) { untilPeriods = new uint256[](operators.length); diff --git a/test/mocks/MockBridgeTracking.sol b/test/mocks/MockBridgeTracking.sol index e279d409..95a76cc7 100644 --- a/test/mocks/MockBridgeTracking.sol +++ b/test/mocks/MockBridgeTracking.sol @@ -13,12 +13,7 @@ contract MockBridgeTracking is IBridgeTracking { // Mapping from period number => period tracking mapping(uint256 => PeriodTracking) _tracks; - function cheat_setPeriodTracking( - uint256 period, - address[] memory operators, - uint256[] calldata ballots, - uint256 totalVote_ - ) external { + function cheat_setPeriodTracking(uint256 period, address[] memory operators, uint256[] calldata ballots, uint256 totalVote_) external { require(operators.length == ballots.length, "mismatch length"); PeriodTracking storage _sTrack = _tracks[period]; _sTrack.operators = operators; @@ -39,10 +34,7 @@ contract MockBridgeTracking is IBridgeTracking { } } - function getManyTotalBallots( - uint256 period, - address[] calldata operators - ) external view returns (uint256[] memory ballots_) { + function getManyTotalBallots(uint256 period, address[] calldata operators) external view returns (uint256[] memory ballots_) { ballots_ = new uint256[](operators.length); PeriodTracking storage _sTrack = _tracks[period]; for (uint i; i < operators.length; i++) { @@ -54,11 +46,11 @@ contract MockBridgeTracking is IBridgeTracking { return _ballotOf(_tracks[period], operator); } - function handleVoteApproved(VoteKind _kind, uint256 _requestId) external {} + function handleVoteApproved(VoteKind _kind, uint256 _requestId) external { } - function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external {} + function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external { } - function startedAtBlock() external view returns (uint256) {} + function startedAtBlock() external view returns (uint256) { } function _ballotOf(PeriodTracking storage _sTrack, address operator) private view returns (uint256) { return _sTrack.ballotMap[operator]; From 09f542c6ac37ff158fb3833d9b849a22db1b7003 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 9 Apr 2024 16:49:41 +0700 Subject: [PATCH 144/305] script: resolve conflict --- script/contracts/RoninBridgeManagerDeploy.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index 951f0745..764651c8 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -6,7 +6,7 @@ import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeMa import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import { Migration } from "../Migration.s.sol"; -import { LibProxy } from "foundry-deployment-kit/libraries/LibProxy.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { RoninGatewayV3Deploy } from "./RoninGatewayV3Deploy.s.sol"; import { BridgeSlashDeploy } from "./BridgeSlashDeploy.s.sol"; From 8d9999d006dea42f5aa2fa955817322dda33aa29 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 9 Apr 2024 17:02:10 +0700 Subject: [PATCH 145/305] script: add slp decimal 0 script --- .../20240409-maptoken-slp-mainchain.s.sol | 140 ++++++++++++++++++ .../deploy-sepolia.s.sol | 3 +- .../maptoken-slp-configs.s.sol | 17 +++ script/contracts/token/SLPDeploy.s.sol | 21 ++- src/mocks/token/MockSLP.sol | 19 +++ test/bridge/integration/BaseIntegration.t.sol | 5 +- 6 files changed, 197 insertions(+), 8 deletions(-) create mode 100644 script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol create mode 100644 script/20240403-deploy-sepolia/maptoken-slp-configs.s.sol create mode 100644 src/mocks/token/MockSLP.sol diff --git a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol new file mode 100644 index 00000000..8d5882a7 --- /dev/null +++ b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; + +import "./maptoken-slp-configs.s.sol"; +import "../BridgeMigration.sol"; + +contract Migration__20240409_MapTokenSlpMainchain is BridgeMigration, Migration__MapToken_Slp_Config { + address internal _mainchainPauseEnforcer; + address internal _mainchainGatewayV3; + address internal _mainchainBridgeManager; + + MainchainBridgeAdminUtils _mainchainProposalUtils; + + function setUp() public override { + super.setUp(); + + _mainchainPauseEnforcer = 0x61eC0ebf966AE84C414BDA715E17CeF657e039DF; + _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + _mainchainBridgeManager = 0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d; + } + + function run() public { + address[] memory mainchainTokens = new address[](1); + address[] memory roninTokens = new address[](1); + Token.Standard[] memory standards = new Token.Standard[](1); + uint256[][4] memory thresholds; + thresholds[0] = new uint256[](1); + thresholds[1] = new uint256[](1); + thresholds[2] = new uint256[](1); + thresholds[3] = new uint256[](1); + + uint256 expiredTime = block.timestamp + 10 days; + address[] memory targets = new address[](1); + uint256[] memory values = new uint256[](1); + bytes[] memory calldatas = new bytes[](1); + uint256[] memory gasAmounts = new uint256[](1); + + // ================ SLP ERC-20 ====================== + + MockSLP _mainchainSlp = new SLPDeploy().run(); + + mainchainTokens[0] = address(_mainchainSlp); + roninTokens[0] = _slpRoninToken; + standards[0] = Token.Standard.ERC20; + thresholds[0][0] = _highTierThreshold; + thresholds[1][0] = _lockedThreshold; + thresholds[2][0] = _unlockFeePercentages; + thresholds[3][0] = _dailyWithdrawalLimit; + + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, ( + mainchainTokens, + roninTokens, + standards, + thresholds + )); + + vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); + address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)",innerData)); + + return; + + + + + + + // bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + // targets[0] = _mainchainGatewayV3; + // values[0] = 0; + // calldatas[0] = proxyData; + // gasAmounts[0] = 1_000_000; + + // targets[1] = _mainchainGatewayV3; + // values[1] = 0; + // calldatas[1] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(GatewayV3.setEmergencyPauser, ( + // _mainchainPauseEnforcer + // ))); + // gasAmounts[1] = 1_000_000; + + // // ================ VERIFY AND EXECUTE PROPOSAL =============== + + // uint256[] memory governorPKs = new uint256[](4); + // governorPKs[3] = 0x00; + // governorPKs[2] = 0x00; + // governorPKs[0] = 0x00; + // governorPKs[1] = 0x00; + + // address[] memory governors = new address[](4); + // governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + // governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + // governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + // governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + // _mainchainProposalUtils = new MainchainBridgeAdminUtils( + // 2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0] + // ); + + // Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + // nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + // chainId: block.chainid, + // expiryTimestamp: expiredTime, + // targets: targets, + // values: values, + // calldatas: calldatas, + // gasAmounts: gasAmounts + // }); + + // Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); + // supports_[0] = Ballot.VoteType.For; + // supports_[1] = Ballot.VoteType.For; + // supports_[2] = Ballot.VoteType.For; + // supports_[3] = Ballot.VoteType.For; + + // SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, governorPKs); + + // vm.broadcast(governors[0]); + // MainchainBridgeManager(_mainchainBridgeManager).relayProposal(proposal, supports_, signatures); + } +} diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index e6ea2b0c..11c3590f 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -8,6 +8,7 @@ import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/ronin/gateway/PauseEnforcer.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; import { MockWrappedToken } from "@ronin/contracts/mocks/token/MockWrappedToken.sol"; @@ -42,7 +43,7 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { MockWrappedToken _mainchainWeth; MockERC20 _mainchainAxs; MockUSDC _mainchainUsdc; - MockERC20 _mainchainSlp; + MockSLP _mainchainSlp; MockERC721 _mainchainMockERC721; MainchainBridgeAdminUtils _mainchainProposalUtils; diff --git a/script/20240403-deploy-sepolia/maptoken-slp-configs.s.sol b/script/20240403-deploy-sepolia/maptoken-slp-configs.s.sol new file mode 100644 index 00000000..6b4c9406 --- /dev/null +++ b/script/20240403-deploy-sepolia/maptoken-slp-configs.s.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__MapToken_Slp_Config { + address constant _slpRoninToken = address(0x82f5483623D636BC3deBA8Ae67E1751b6CF2Bad2); + + // The decimal of SLP token is 0 + uint256 constant _highTierThreshold = 150_000; + uint256 constant _lockedThreshold = 80_000; + // The MAX_PERCENTAGE is 100_0000 + uint256 constant _unlockFeePercentages = 10; // 0.001%. Max percentage is 1e6 so 10 is 0.001% (`10 / 1e6 = 0.001 * 100`) + uint256 constant _dailyWithdrawalLimit = 200_000; + + // uint256 constant _slpMinThreshold = 1000; + + address internal _governor = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // TODO: replace by address of the SV governor +} \ No newline at end of file diff --git a/script/contracts/token/SLPDeploy.s.sol b/script/contracts/token/SLPDeploy.s.sol index cbf329a3..a5438b1e 100644 --- a/script/contracts/token/SLPDeploy.s.sol +++ b/script/contracts/token/SLPDeploy.s.sol @@ -1,16 +1,27 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; import { Contract } from "../../utils/Contract.sol"; import { ISharedArgument } from "../../interfaces/ISharedArgument.sol"; -import { MockERC20Deploy } from "./MockERC20Deploy.s.sol"; +import { Migration } from "../../Migration.s.sol"; -contract SLPDeploy is MockERC20Deploy { - function _arguments() internal virtual override returns (ISharedArgument.MockERC20Param memory) { - return config.sharedArguments().slp; +contract SLPDeploy is Migration { + function _defaultArguments() internal virtual override returns (bytes memory args) { + ISharedArgument.MockERC20Param memory param = _arguments(); + + args = abi.encode(param.name, param.symbol); + } + + function _arguments() internal virtual returns (ISharedArgument.MockERC20Param memory) { + return config.sharedArguments().usdc; } - function _getContract() internal virtual override returns (Contract) { + function _getContract() internal pure returns (Contract) { return Contract.SLP; } + + function run() public virtual returns (MockSLP) { + return MockSLP(_deployImmutable(_getContract().key())); + } } diff --git a/src/mocks/token/MockSLP.sol b/src/mocks/token/MockSLP.sol new file mode 100644 index 00000000..251c3ee0 --- /dev/null +++ b/src/mocks/token/MockSLP.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract MockSLP is ERC20 { + constructor(string memory name, string memory symbol) ERC20(name, symbol) { } + + function mint(address to, uint256 amount) external { + _mint(to, amount); + } + + /** + * @dev SLP always have decimal is 0 + */ + function decimals() public pure override returns (uint8) { + return 0; + } +} diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index d83ec976..a7a64613 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -16,6 +16,7 @@ import { BridgeSlash } from "@ronin/contracts/ronin/gateway/BridgeSlash.sol"; import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; import { MockERC721 } from "@ronin/contracts/mocks/token/MockERC721.sol"; @@ -76,13 +77,13 @@ contract BaseIntegration_Test is Base_Test { MockWrappedToken _roninWeth; MockWrappedToken _roninWron; MockERC20 _roninAxs; - MockERC20 _roninSlp; + MockSLP _roninSlp; MockUSDC _roninUsdc; MockERC721 _roninMockERC721; MockWrappedToken _mainchainWeth; MockERC20 _mainchainAxs; - MockERC20 _mainchainSlp; + MockSLP _mainchainSlp; MockUSDC _mainchainUsdc; MockERC721 _mainchainMockERC721; From b3fc186d39c020e6dd600f7db2545d528f4a234f Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 9 Apr 2024 17:03:46 +0700 Subject: [PATCH 146/305] chore: add slp artifact --- .../11155111/run-1712656954.json | 56 +++++++ .../11155111/run-1712656974.json | 152 ++++++++++++++++++ deployments/sepolia/SLP.json | 30 ++-- 3 files changed, 223 insertions(+), 15 deletions(-) create mode 100644 broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712656954.json create mode 100644 broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712656974.json diff --git a/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712656954.json b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712656954.json new file mode 100644 index 00000000..fc04951c --- /dev/null +++ b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712656954.json @@ -0,0 +1,56 @@ +{ + "transactions": [ + { + "hash": "0xf9efee3cdc34da83fbc998b88035df3572ed31223116fd92d02a124e41382cfe", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0xa43CAa43a791BAF3245d7213B0c226f4177bea56", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x136810", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220bec55b3b8f250b31b1e17f67e6167feaec1ac66041e06df80e1cc03e9057094f64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0x9", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea56000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x53b54", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea56000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000", + "nonce": "0xa", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [ + "0xf9efee3cdc34da83fbc998b88035df3572ed31223116fd92d02a124e41382cfe", + "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0" + ], + "returns": {}, + "timestamp": 1712656954, + "chain": 11155111, + "multi": false, + "commit": "8d9999d" +} \ No newline at end of file diff --git a/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712656974.json b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712656974.json new file mode 100644 index 00000000..7bf44e53 --- /dev/null +++ b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712656974.json @@ -0,0 +1,152 @@ +{ + "transactions": [ + { + "hash": "0xf9efee3cdc34da83fbc998b88035df3572ed31223116fd92d02a124e41382cfe", + "transactionType": "CREATE", + "contractName": null, + "contractAddress": "0xa43CAa43a791BAF3245d7213B0c226f4177bea56", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x136810", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220bec55b3b8f250b31b1e17f67e6167feaec1ac66041e06df80e1cc03e9057094f64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0x9", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea56000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x53b54", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea56000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000", + "nonce": "0xa", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0xf9efee3cdc34da83fbc998b88035df3572ed31223116fd92d02a124e41382cfe", + "transactionIndex": "0x9", + "blockHash": "0x223ed40590ba75027dab837d3d2100ea709208711e17a6080ebb6a6146d366a6", + "blockNumber": "0x565f50", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0xf62c3", + "gasUsed": "0x9bf06", + "contractAddress": "0xa43CAa43a791BAF3245d7213B0c226f4177bea56", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb340044e" + }, + { + "transactionHash": "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0", + "transactionIndex": "0xa", + "blockHash": "0x223ed40590ba75027dab837d3d2100ea709208711e17a6080ebb6a6146d366a6", + "blockNumber": "0x565f50", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x11e549", + "gasUsed": "0x28286", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea56000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x223ed40590ba75027dab837d3d2100ea709208711e17a6080ebb6a6146d366a6", + "blockNumber": "0x565f50", + "transactionHash": "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0", + "transactionIndex": "0xa", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea56000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0", + "blockHash": "0x223ed40590ba75027dab837d3d2100ea709208711e17a6080ebb6a6146d366a6", + "blockNumber": "0x565f50", + "transactionHash": "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0", + "transactionIndex": "0xa", + "logIndex": "0x6", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea5600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000013880", + "blockHash": "0x223ed40590ba75027dab837d3d2100ea709208711e17a6080ebb6a6146d366a6", + "blockNumber": "0x565f50", + "transactionHash": "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0", + "transactionIndex": "0xa", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea560000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a", + "blockHash": "0x223ed40590ba75027dab837d3d2100ea709208711e17a6080ebb6a6146d366a6", + "blockNumber": "0x565f50", + "transactionHash": "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0", + "transactionIndex": "0xa", + "logIndex": "0x8", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a43caa43a791baf3245d7213b0c226f4177bea5600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40", + "blockHash": "0x223ed40590ba75027dab837d3d2100ea709208711e17a6080ebb6a6146d366a6", + "blockNumber": "0x565f50", + "transactionHash": "0x340add491256a42277913f74f525c09272c385a05eb0f4ddd5ddec5d2dee17a0", + "transactionIndex": "0xa", + "logIndex": "0x9", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008200000000000000000000000000008000000002000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000040000000000000000020000000000000000000000000000001000000000000000000000000000000000400000000000008000000000000000000000000000020000000000000000000000000000060000002000000000000008000100000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb340044e" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712656974, + "chain": 11155111, + "multi": false, + "commit": "8d9999d" +} \ No newline at end of file diff --git a/deployments/sepolia/SLP.json b/deployments/sepolia/SLP.json index fdbad2b3..f6e20f82 100644 --- a/deployments/sepolia/SLP.json +++ b/deployments/sepolia/SLP.json @@ -305,15 +305,15 @@ "anonymous": false } ], - "address": "0x591a38bA0f6C4110057B0A4842b87e9796b3ed94", - "args": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "address": "0xa43CAa43a791BAF3245d7213B0c226f4177bea56", + "args": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", "ast": "", - "blockNumber": 5632711, - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", + "blockNumber": 5660407, + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220bec55b3b8f250b31b1e17f67e6167feaec1ac66041e06df80e1cc03e9057094f64736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "MockERC20.sol", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220c522df4763453ed850bcc2283d61aa9bb2af15d2c9dae30f046408964e3686b364736f6c63430008170033", - "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220bec55b3b8f250b31b1e17f67e6167feaec1ac66041e06df80e1cc03e9057094f64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, "kind": "dev", @@ -362,13 +362,13 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC20.sol\":\"MockERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockERC20.sol\":{\"keccak256\":\"0x71616dc3d3c909e9f68e85aad48010a46c0a4fb217a55c8e265a0955fd40153a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://134f2a8eedd6a5ba48256ee3412e0e2847ab7cfff88f8fc7a38dde2483c4207e\",\"dweb:/ipfs/QmPBe1HH5v67qTomJXPYoanLh4fp7wbQLfhjzoWJTCsuYg\"]}},\"version\":1}", - "nonce": 8, - "numDeployments": 1, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC20.sol\":\"MockERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockERC20.sol\":{\"keccak256\":\"0x71616dc3d3c909e9f68e85aad48010a46c0a4fb217a55c8e265a0955fd40153a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://134f2a8eedd6a5ba48256ee3412e0e2847ab7cfff88f8fc7a38dde2483c4207e\",\"dweb:/ipfs/QmPBe1HH5v67qTomJXPYoanLh4fp7wbQLfhjzoWJTCsuYg\"]}},\"version\":1}", + "nonce": 9, + "numDeployments": 2, "storageLayout": { "storage": [ { - "astId": 104082, + "astId": 100546, "contract": "src/mocks/token/MockERC20.sol:MockERC20", "label": "_balances", "offset": 0, @@ -376,7 +376,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 104088, + "astId": 100552, "contract": "src/mocks/token/MockERC20.sol:MockERC20", "label": "_allowances", "offset": 0, @@ -384,7 +384,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 104090, + "astId": 100554, "contract": "src/mocks/token/MockERC20.sol:MockERC20", "label": "_totalSupply", "offset": 0, @@ -392,7 +392,7 @@ "type": "t_uint256" }, { - "astId": 104092, + "astId": 100556, "contract": "src/mocks/token/MockERC20.sol:MockERC20", "label": "_name", "offset": 0, @@ -400,7 +400,7 @@ "type": "t_string_storage" }, { - "astId": 104094, + "astId": 100558, "contract": "src/mocks/token/MockERC20.sol:MockERC20", "label": "_symbol", "offset": 0, @@ -440,7 +440,7 @@ } } }, - "timestamp": 1712300364, + "timestamp": 1712655828, "userdoc": { "version": 1, "kind": "user" From f9da03d1f0ecb2a79943e2394958a775c487e8d9 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 9 Apr 2024 17:21:27 +0700 Subject: [PATCH 147/305] chore: replace new slp artifact with 0 decimal --- .../11155111/run-1712657878.json | 107 +++++++ .../11155111/run-1712657885.json | 265 ++++++++++++++++++ .../11155111/run-1712657909.json | 265 ++++++++++++++++++ deployments/sepolia/SLP.json | 42 +-- .../20240409-maptoken-slp-mainchain.s.sol | 15 +- script/GeneralConfig.sol | 2 +- 6 files changed, 669 insertions(+), 27 deletions(-) create mode 100644 broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657878.json create mode 100644 broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657885.json create mode 100644 broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657909.json diff --git a/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657878.json b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657878.json new file mode 100644 index 00000000..cbaeaa35 --- /dev/null +++ b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657878.json @@ -0,0 +1,107 @@ +{ + "transactions": [ + { + "hash": "0x2203861795d9f2984e8cf454fbb549555e64fb70f9567fbfe3e3bd093053b5ce", + "transactionType": "CREATE", + "contractName": "MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": null, + "arguments": [ + "\"USD Coin\"", + "\"USDC\"" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x1367f8", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220911759f5c9fad1a27b213cd7dfb739b1d142608781e3564fb91da4d8c714164f64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0xb", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x53b54", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000", + "nonce": "0xc", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x89931275d08c1bf56e4e44f595ca23fb365ce7d556f51458e2f0e235b2f2a282", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8fd00610153d22b9a4bbeb52da4ff4e72b41e819", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e0000000000000000000000000000000000000000000000000000000002faf080", + "nonce": "0xd", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xc7c0ca3a911f3208a87b0236f79601ef9ba5a13bfd1e10a3d4f26d7f188bcb05", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": "mint(address,uint256)", + "arguments": [ + "0xC65C6BEA96666f150BEF9b936630f6355BfFCC06", + "100000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8fd00610153d22b9a4bbeb52da4ff4e72b41e819", + "gas": "0x1bdcc", + "value": "0x0", + "data": "0x40c10f19000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc0600000000000000000000000000000000000000000000000000000000000186a0", + "nonce": "0xe", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [ + "0x2203861795d9f2984e8cf454fbb549555e64fb70f9567fbfe3e3bd093053b5ce", + "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "0x89931275d08c1bf56e4e44f595ca23fb365ce7d556f51458e2f0e235b2f2a282", + "0xc7c0ca3a911f3208a87b0236f79601ef9ba5a13bfd1e10a3d4f26d7f188bcb05" + ], + "returns": {}, + "timestamp": 1712657878, + "chain": 11155111, + "multi": false, + "commit": "b3fc186" +} \ No newline at end of file diff --git a/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657885.json b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657885.json new file mode 100644 index 00000000..d167049e --- /dev/null +++ b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657885.json @@ -0,0 +1,265 @@ +{ + "transactions": [ + { + "hash": "0x2203861795d9f2984e8cf454fbb549555e64fb70f9567fbfe3e3bd093053b5ce", + "transactionType": "CREATE", + "contractName": "MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": null, + "arguments": [ + "\"USD Coin\"", + "\"USDC\"" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x1367f8", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220911759f5c9fad1a27b213cd7dfb739b1d142608781e3564fb91da4d8c714164f64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0xb", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x53b54", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000", + "nonce": "0xc", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x89931275d08c1bf56e4e44f595ca23fb365ce7d556f51458e2f0e235b2f2a282", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8fd00610153d22b9a4bbeb52da4ff4e72b41e819", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e0000000000000000000000000000000000000000000000000000000002faf080", + "nonce": "0xd", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xc7c0ca3a911f3208a87b0236f79601ef9ba5a13bfd1e10a3d4f26d7f188bcb05", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": "mint(address,uint256)", + "arguments": [ + "0xC65C6BEA96666f150BEF9b936630f6355BfFCC06", + "100000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8fd00610153d22b9a4bbeb52da4ff4e72b41e819", + "gas": "0x1bdcc", + "value": "0x0", + "data": "0x40c10f19000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc0600000000000000000000000000000000000000000000000000000000000186a0", + "nonce": "0xe", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x2203861795d9f2984e8cf454fbb549555e64fb70f9567fbfe3e3bd093053b5ce", + "transactionIndex": "0x9", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x10ec15", + "gasUsed": "0x9befa", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb3e54035" + }, + { + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x136e9b", + "gasUsed": "0x28286", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e81900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000013880", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x6", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e8190000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e81900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x8", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008200000000000000000000000000008000000002000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000040000000000000000020000000000000000000000000000001000000000000000000000000000000000400000000000008000000000000000000000000000020000000000000000000000000000060000002000000000000008000100000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb3e54035" + }, + { + "transactionHash": "0x89931275d08c1bf56e4e44f595ca23fb365ce7d556f51458e2f0e235b2f2a282", + "transactionIndex": "0xb", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "cumulativeGasUsed": "0x147989", + "gasUsed": "0x10aee", + "contractAddress": null, + "logs": [ + { + "address": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000002faf080", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0x89931275d08c1bf56e4e44f595ca23fb365ce7d556f51458e2f0e235b2f2a282", + "transactionIndex": "0xb", + "logIndex": "0x9", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000040000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000021000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb3e54035" + }, + { + "transactionHash": "0xc7c0ca3a911f3208a87b0236f79601ef9ba5a13bfd1e10a3d4f26d7f188bcb05", + "transactionIndex": "0xc", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "cumulativeGasUsed": "0x15419f", + "gasUsed": "0xc816", + "contractAddress": null, + "logs": [ + { + "address": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc06" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000186a0", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xc7c0ca3a911f3208a87b0236f79601ef9ba5a13bfd1e10a3d4f26d7f188bcb05", + "transactionIndex": "0xc", + "logIndex": "0xa", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000040000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000040000000000000020000000000021004000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb3e54035" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712657885, + "chain": 11155111, + "multi": false, + "commit": "b3fc186" +} \ No newline at end of file diff --git a/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657909.json b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657909.json new file mode 100644 index 00000000..c4508623 --- /dev/null +++ b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712657909.json @@ -0,0 +1,265 @@ +{ + "transactions": [ + { + "hash": "0x2203861795d9f2984e8cf454fbb549555e64fb70f9567fbfe3e3bd093053b5ce", + "transactionType": "CREATE", + "contractName": "MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": null, + "arguments": [ + "\"USD Coin\"", + "\"USDC\"" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x1367f8", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220911759f5c9fad1a27b213cd7dfb739b1d142608781e3564fb91da4d8c714164f64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "nonce": "0xb", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x53b54", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000", + "nonce": "0xc", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x89931275d08c1bf56e4e44f595ca23fb365ce7d556f51458e2f0e235b2f2a282", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8fd00610153d22b9a4bbeb52da4ff4e72b41e819", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e0000000000000000000000000000000000000000000000000000000002faf080", + "nonce": "0xd", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xc7c0ca3a911f3208a87b0236f79601ef9ba5a13bfd1e10a3d4f26d7f188bcb05", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "function": "mint(address,uint256)", + "arguments": [ + "0xC65C6BEA96666f150BEF9b936630f6355BfFCC06", + "100000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8fd00610153d22b9a4bbeb52da4ff4e72b41e819", + "gas": "0x1bdcc", + "value": "0x0", + "data": "0x40c10f19000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc0600000000000000000000000000000000000000000000000000000000000186a0", + "nonce": "0xe", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x2203861795d9f2984e8cf454fbb549555e64fb70f9567fbfe3e3bd093053b5ce", + "transactionIndex": "0x9", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x10ec15", + "gasUsed": "0x9befa", + "contractAddress": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb3e54035" + }, + { + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x136e9b", + "gasUsed": "0x28286", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e819000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e81900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000013880", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x6", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e8190000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008fd00610153d22b9a4bbeb52da4ff4e72b41e81900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xd85311503828895e0f3ec0875ec17a77138b4804adf70c109ce1ba8b7d1baf43", + "transactionIndex": "0xa", + "logIndex": "0x8", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008200000000000000000000000000008000000002000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000040000000000000000020000000000000000000000000000001000000000000000000000000000000000400000000000008000000000000000000000000000020000000000000000000000000000060000002000000000000008000100000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb3e54035" + }, + { + "transactionHash": "0x89931275d08c1bf56e4e44f595ca23fb365ce7d556f51458e2f0e235b2f2a282", + "transactionIndex": "0xb", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "cumulativeGasUsed": "0x147989", + "gasUsed": "0x10aee", + "contractAddress": null, + "logs": [ + { + "address": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000002faf080", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0x89931275d08c1bf56e4e44f595ca23fb365ce7d556f51458e2f0e235b2f2a282", + "transactionIndex": "0xb", + "logIndex": "0x9", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000002000000000000040000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000021000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb3e54035" + }, + { + "transactionHash": "0xc7c0ca3a911f3208a87b0236f79601ef9ba5a13bfd1e10a3d4f26d7f188bcb05", + "transactionIndex": "0xc", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "cumulativeGasUsed": "0x15419f", + "gasUsed": "0xc816", + "contractAddress": null, + "logs": [ + { + "address": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc06" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000186a0", + "blockHash": "0xccdcb756afd280d69473198fd98fc0fdcbe70efddfe14393973945e2c85d208b", + "blockNumber": "0x565f9a", + "transactionHash": "0xc7c0ca3a911f3208a87b0236f79601ef9ba5a13bfd1e10a3d4f26d7f188bcb05", + "transactionIndex": "0xc", + "logIndex": "0xa", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000040000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000040000000000000020000000000021004000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xb3e54035" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712657909, + "chain": 11155111, + "multi": false, + "commit": "b3fc186" +} \ No newline at end of file diff --git a/deployments/sepolia/SLP.json b/deployments/sepolia/SLP.json index f6e20f82..aff77cde 100644 --- a/deployments/sepolia/SLP.json +++ b/deployments/sepolia/SLP.json @@ -94,7 +94,7 @@ "internalType": "uint8" } ], - "stateMutability": "view" + "stateMutability": "pure" }, { "type": "function", @@ -305,14 +305,14 @@ "anonymous": false } ], - "address": "0xa43CAa43a791BAF3245d7213B0c226f4177bea56", + "address": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", "args": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", "ast": "", - "blockNumber": 5660407, - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220bec55b3b8f250b31b1e17f67e6167feaec1ac66041e06df80e1cc03e9057094f64736f6c63430008170033", + "blockNumber": 5660542, + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220911759f5c9fad1a27b213cd7dfb739b1d142608781e3564fb91da4d8c714164f64736f6c63430008170033", "chainId": 11155111, - "contractAbsolutePath": "MockERC20.sol", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051601281526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220bec55b3b8f250b31b1e17f67e6167feaec1ac66041e06df80e1cc03e9057094f64736f6c63430008170033", + "contractAbsolutePath": "MockSLP.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220911759f5c9fad1a27b213cd7dfb739b1d142608781e3564fb91da4d8c714164f64736f6c63430008170033", "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, @@ -328,7 +328,7 @@ "details": "See {IERC20-balanceOf}." }, "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + "details": "SLP always have decimal is 0" }, "decreaseAllowance(address,uint256)": { "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." @@ -362,46 +362,46 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC20.sol\":\"MockERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockERC20.sol\":{\"keccak256\":\"0x71616dc3d3c909e9f68e85aad48010a46c0a4fb217a55c8e265a0955fd40153a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://134f2a8eedd6a5ba48256ee3412e0e2847ab7cfff88f8fc7a38dde2483c4207e\",\"dweb:/ipfs/QmPBe1HH5v67qTomJXPYoanLh4fp7wbQLfhjzoWJTCsuYg\"]}},\"version\":1}", - "nonce": 9, - "numDeployments": 2, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"SLP always have decimal is 0\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockSLP.sol\":\"MockSLP\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockSLP.sol\":{\"keccak256\":\"0xd53609f603c42c0d910fb1a7a584be2904a1f13d85fdcdee7ee988426668936a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46133f8e0cba69edc9b0abe3514ccdae71f6979c207c7d73d012d704300f1fb7\",\"dweb:/ipfs/QmcN6cCwvFcYsGmFAYrWFGdjShtg1875WSANCXVy7Zftr8\"]}},\"version\":1}", + "nonce": 11, + "numDeployments": 3, "storageLayout": { "storage": [ { - "astId": 100546, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100534, + "contract": "src/mocks/token/MockSLP.sol:MockSLP", "label": "_balances", "offset": 0, "slot": "0", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 100552, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100540, + "contract": "src/mocks/token/MockSLP.sol:MockSLP", "label": "_allowances", "offset": 0, "slot": "1", "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 100554, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100542, + "contract": "src/mocks/token/MockSLP.sol:MockSLP", "label": "_totalSupply", "offset": 0, "slot": "2", "type": "t_uint256" }, { - "astId": 100556, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100544, + "contract": "src/mocks/token/MockSLP.sol:MockSLP", "label": "_name", "offset": 0, "slot": "3", "type": "t_string_storage" }, { - "astId": 100558, - "contract": "src/mocks/token/MockERC20.sol:MockERC20", + "astId": 100546, + "contract": "src/mocks/token/MockSLP.sol:MockSLP", "label": "_symbol", "offset": 0, "slot": "4", @@ -440,7 +440,7 @@ } } }, - "timestamp": 1712655828, + "timestamp": 1712657532, "userdoc": { "version": 1, "kind": "user" diff --git a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol index 8d5882a7..7128c20a 100644 --- a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol @@ -49,16 +49,18 @@ contract Migration__20240409_MapTokenSlpMainchain is BridgeMigration, Migration_ thresholds[2] = new uint256[](1); thresholds[3] = new uint256[](1); - uint256 expiredTime = block.timestamp + 10 days; - address[] memory targets = new address[](1); - uint256[] memory values = new uint256[](1); - bytes[] memory calldatas = new bytes[](1); - uint256[] memory gasAmounts = new uint256[](1); + // uint256 expiredTime = block.timestamp + 10 days; + // address[] memory targets = new address[](1); + // uint256[] memory values = new uint256[](1); + // bytes[] memory calldatas = new bytes[](1); + // uint256[] memory gasAmounts = new uint256[](1); // ================ SLP ERC-20 ====================== MockSLP _mainchainSlp = new SLPDeploy().run(); + assertEq(_mainchainSlp.decimals(), 0); + mainchainTokens[0] = address(_mainchainSlp); roninTokens[0] = _slpRoninToken; standards[0] = Token.Standard.ERC20; @@ -77,6 +79,9 @@ contract Migration__20240409_MapTokenSlpMainchain is BridgeMigration, Migration_ vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)",innerData)); + _mainchainSlp.mint(address(_mainchainGatewayV3), 50_000_000); + _mainchainSlp.mint(address(0xC65C6BEA96666f150BEF9b936630f6355BfFCC06), 100_000); + return; diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index fc1796de..39e6978d 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -53,7 +53,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _contractNameMap[Contract.WETH.key()] = "MockWrappedToken"; _contractNameMap[Contract.WRON.key()] = "MockWrappedToken"; _contractNameMap[Contract.AXS.key()] = "MockERC20"; - _contractNameMap[Contract.SLP.key()] = "MockERC20"; + _contractNameMap[Contract.SLP.key()] = "MockSLP"; _contractNameMap[Contract.USDC.key()] = "MockUSDC"; _contractNameMap[Contract.RoninPauseEnforcer.key()] = "PauseEnforcer"; From 9876e3efffbc84ba1aafb6ab5bf00d9fac3aef3a Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 9 Apr 2024 17:35:20 +0700 Subject: [PATCH 148/305] script: fix SLP symbol --- .../20240409-maptoken-slp-mainchain.s.sol | 1 + script/contracts/token/SLPDeploy.s.sol | 2 +- src/mocks/token/MockSLP.sol | 2 +- src/mocks/token/MockUSDC.sol | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol index 7128c20a..f29fbcad 100644 --- a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol @@ -60,6 +60,7 @@ contract Migration__20240409_MapTokenSlpMainchain is BridgeMigration, Migration_ MockSLP _mainchainSlp = new SLPDeploy().run(); assertEq(_mainchainSlp.decimals(), 0); + assertEq(_mainchainSlp.symbol(), "SLP"); mainchainTokens[0] = address(_mainchainSlp); roninTokens[0] = _slpRoninToken; diff --git a/script/contracts/token/SLPDeploy.s.sol b/script/contracts/token/SLPDeploy.s.sol index a5438b1e..6256e513 100644 --- a/script/contracts/token/SLPDeploy.s.sol +++ b/script/contracts/token/SLPDeploy.s.sol @@ -14,7 +14,7 @@ contract SLPDeploy is Migration { } function _arguments() internal virtual returns (ISharedArgument.MockERC20Param memory) { - return config.sharedArguments().usdc; + return config.sharedArguments().slp; } function _getContract() internal pure returns (Contract) { diff --git a/src/mocks/token/MockSLP.sol b/src/mocks/token/MockSLP.sol index 251c3ee0..b0d011fe 100644 --- a/src/mocks/token/MockSLP.sol +++ b/src/mocks/token/MockSLP.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.0; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract MockSLP is ERC20 { - constructor(string memory name, string memory symbol) ERC20(name, symbol) { } + constructor() ERC20("Smooth Love Potion", "SLP") { } function mint(address to, uint256 amount) external { _mint(to, amount); diff --git a/src/mocks/token/MockUSDC.sol b/src/mocks/token/MockUSDC.sol index d7c7cfe7..3d14cb44 100644 --- a/src/mocks/token/MockUSDC.sol +++ b/src/mocks/token/MockUSDC.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.0; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract MockUSDC is ERC20 { - constructor(string memory name, string memory symbol) ERC20(name, symbol) { } + constructor() ERC20("USD Coin", "USDC") { } function mint(address to, uint256 amount) external { _mint(to, amount); From 4335429f7e12561481d0178c9c489f46dd1910c2 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 9 Apr 2024 17:41:19 +0700 Subject: [PATCH 149/305] chore: add final SLP --- .../11155111/run-1712659165.json | 104 +++++++ .../11155111/run-1712659191.json | 262 ++++++++++++++++++ .../11155111/run-1712659241.json | 262 ++++++++++++++++++ deployments/sepolia/SLP.json | 31 +-- 4 files changed, 638 insertions(+), 21 deletions(-) create mode 100644 broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659165.json create mode 100644 broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659191.json create mode 100644 broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659241.json diff --git a/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659165.json b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659165.json new file mode 100644 index 00000000..fac8378a --- /dev/null +++ b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659165.json @@ -0,0 +1,104 @@ +{ + "transactions": [ + { + "hash": "0x94a678fb529163fbf745a8b156234570389a8076be74b64ccee310527ca2fa90", + "transactionType": "CREATE", + "contractName": "MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": null, + "arguments": [], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x134086", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b506040518060400160405280601281526020017129b6b7b7ba34102637bb32902837ba34b7b760711b815250604051806040016040528060038152602001620534c560ec1b8152508160039081610067919061011d565b506004610074828261011d565b5050506101dc565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806100a657607f821691505b6020821081036100c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610118576000816000526020600020601f850160051c810160208610156100f55750805b601f850160051c820191505b8181101561011457828155600101610101565b5050505b505050565b81516001600160401b038111156101365761013661007c565b61014a816101448454610092565b846100cc565b602080601f83116001811461017f57600084156101675750858301515b600019600386901b1c1916600185901b178555610114565b600085815260208120601f198616915b828110156101ae5788860151825594840194600190910190840161018f565b50858210156101cc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a806101eb6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220aa700d2a84d76b663b0e6e64e2262db97093227329c49f33043ce4f78e870c6c64736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0xf", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x53b54", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000", + "nonce": "0x10", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x842b22a3446d90c67b9f41d11a5ac087f354e1dfb2ef18d3739a28f960060747", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x857d7ccfcef3a7ff8245f57daeb042440fd513e8", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e0000000000000000000000000000000000000000000000000000000002faf080", + "nonce": "0x11", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x6073589ab06f05737ef7984ab356dafe17d0c0837553d4216598ba62f6d3155c", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": "mint(address,uint256)", + "arguments": [ + "0xC65C6BEA96666f150BEF9b936630f6355BfFCC06", + "100000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x857d7ccfcef3a7ff8245f57daeb042440fd513e8", + "gas": "0x1bdcc", + "value": "0x0", + "data": "0x40c10f19000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc0600000000000000000000000000000000000000000000000000000000000186a0", + "nonce": "0x12", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [ + "0x94a678fb529163fbf745a8b156234570389a8076be74b64ccee310527ca2fa90", + "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "0x842b22a3446d90c67b9f41d11a5ac087f354e1dfb2ef18d3739a28f960060747", + "0x6073589ab06f05737ef7984ab356dafe17d0c0837553d4216598ba62f6d3155c" + ], + "returns": {}, + "timestamp": 1712659165, + "chain": 11155111, + "multi": false, + "commit": "9876e3e" +} \ No newline at end of file diff --git a/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659191.json b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659191.json new file mode 100644 index 00000000..41b154f3 --- /dev/null +++ b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659191.json @@ -0,0 +1,262 @@ +{ + "transactions": [ + { + "hash": "0x94a678fb529163fbf745a8b156234570389a8076be74b64ccee310527ca2fa90", + "transactionType": "CREATE", + "contractName": "MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": null, + "arguments": [], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x134086", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b506040518060400160405280601281526020017129b6b7b7ba34102637bb32902837ba34b7b760711b815250604051806040016040528060038152602001620534c560ec1b8152508160039081610067919061011d565b506004610074828261011d565b5050506101dc565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806100a657607f821691505b6020821081036100c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610118576000816000526020600020601f850160051c810160208610156100f55750805b601f850160051c820191505b8181101561011457828155600101610101565b5050505b505050565b81516001600160401b038111156101365761013661007c565b61014a816101448454610092565b846100cc565b602080601f83116001811461017f57600084156101675750858301515b600019600386901b1c1916600185901b178555610114565b600085815260208120601f198616915b828110156101ae5788860151825594840194600190910190840161018f565b50858210156101cc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a806101eb6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220aa700d2a84d76b663b0e6e64e2262db97093227329c49f33043ce4f78e870c6c64736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0xf", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x53b54", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000", + "nonce": "0x10", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x842b22a3446d90c67b9f41d11a5ac087f354e1dfb2ef18d3739a28f960060747", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x857d7ccfcef3a7ff8245f57daeb042440fd513e8", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e0000000000000000000000000000000000000000000000000000000002faf080", + "nonce": "0x11", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x6073589ab06f05737ef7984ab356dafe17d0c0837553d4216598ba62f6d3155c", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": "mint(address,uint256)", + "arguments": [ + "0xC65C6BEA96666f150BEF9b936630f6355BfFCC06", + "100000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x857d7ccfcef3a7ff8245f57daeb042440fd513e8", + "gas": "0x1bdcc", + "value": "0x0", + "data": "0x40c10f19000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc0600000000000000000000000000000000000000000000000000000000000186a0", + "nonce": "0x12", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x94a678fb529163fbf745a8b156234570389a8076be74b64ccee310527ca2fa90", + "transactionIndex": "0x9", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x160c06", + "gasUsed": "0x9ab2b", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe72db85f" + }, + { + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x188e8c", + "gasUsed": "0x28286", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x11", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x12", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000013880", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x13", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x14", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x15", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008200000000000000000000000000008000000002000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000040000000000000000020000000000000000000000000000001000000000000000000000000000000000400000000000008000000000000000000000000000020000000000000000000000000000060000002000000000000008000100000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe72db85f" + }, + { + "transactionHash": "0x842b22a3446d90c67b9f41d11a5ac087f354e1dfb2ef18d3739a28f960060747", + "transactionIndex": "0xb", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "cumulativeGasUsed": "0x19997a", + "gasUsed": "0x10aee", + "contractAddress": null, + "logs": [ + { + "address": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000002faf080", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x842b22a3446d90c67b9f41d11a5ac087f354e1dfb2ef18d3739a28f960060747", + "transactionIndex": "0xb", + "logIndex": "0x16", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000008000000000002000000000000040000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe72db85f" + }, + { + "transactionHash": "0x6073589ab06f05737ef7984ab356dafe17d0c0837553d4216598ba62f6d3155c", + "transactionIndex": "0xc", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "cumulativeGasUsed": "0x1a6190", + "gasUsed": "0xc816", + "contractAddress": null, + "logs": [ + { + "address": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc06" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000186a0", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x6073589ab06f05737ef7984ab356dafe17d0c0837553d4216598ba62f6d3155c", + "transactionIndex": "0xc", + "logIndex": "0x17", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000008000000000000000000000000040000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000040000000000000020000000000000004000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe72db85f" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712659191, + "chain": 11155111, + "multi": false, + "commit": "9876e3e" +} \ No newline at end of file diff --git a/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659241.json b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659241.json new file mode 100644 index 00000000..416ae1f7 --- /dev/null +++ b/broadcast/20240409-maptoken-slp-mainchain.s.sol/11155111/run-1712659241.json @@ -0,0 +1,262 @@ +{ + "transactions": [ + { + "hash": "0x94a678fb529163fbf745a8b156234570389a8076be74b64ccee310527ca2fa90", + "transactionType": "CREATE", + "contractName": "MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": null, + "arguments": [], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x134086", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b506040518060400160405280601281526020017129b6b7b7ba34102637bb32902837ba34b7b760711b815250604051806040016040528060038152602001620534c560ec1b8152508160039081610067919061011d565b506004610074828261011d565b5050506101dc565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806100a657607f821691505b6020821081036100c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610118576000816000526020600020601f850160051c810160208610156100f55750805b601f850160051c820191505b8181101561011457828155600101610101565b5050505b505050565b81516001600160401b038111156101365761013661007c565b61014a816101448454610092565b846100cc565b602080601f83116001811461017f57600084156101675750858301515b600019600386901b1c1916600185901b178555610114565b600085815260208120601f198616915b828110156101ae5788860151825594840194600190910190840161018f565b50858210156101cc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a806101eb6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220aa700d2a84d76b663b0e6e64e2262db97093227329c49f33043ce4f78e870c6c64736f6c634300081700330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0xf", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "functionDelegateCall(bytes)", + "arguments": [ + "0xdff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x53b54", + "value": "0x0", + "data": "0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000000000000000000000000000000000000", + "nonce": "0x10", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x842b22a3446d90c67b9f41d11a5ac087f354e1dfb2ef18d3739a28f960060747", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": "mint(address,uint256)", + "arguments": [ + "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "50000000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x857d7ccfcef3a7ff8245f57daeb042440fd513e8", + "gas": "0x221a4", + "value": "0x0", + "data": "0x40c10f1900000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e0000000000000000000000000000000000000000000000000000000002faf080", + "nonce": "0x11", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x6073589ab06f05737ef7984ab356dafe17d0c0837553d4216598ba62f6d3155c", + "transactionType": "CALL", + "contractName": "src/mocks/token/MockSLP.sol:MockSLP", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "function": "mint(address,uint256)", + "arguments": [ + "0xC65C6BEA96666f150BEF9b936630f6355BfFCC06", + "100000" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x857d7ccfcef3a7ff8245f57daeb042440fd513e8", + "gas": "0x1bdcc", + "value": "0x0", + "data": "0x40c10f19000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc0600000000000000000000000000000000000000000000000000000000000186a0", + "nonce": "0x12", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x94a678fb529163fbf745a8b156234570389a8076be74b64ccee310527ca2fa90", + "transactionIndex": "0x9", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x160c06", + "gasUsed": "0x9ab2b", + "contractAddress": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe72db85f" + }, + { + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0x188e8c", + "gasUsed": "0x28286", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x11", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000249f0", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x12", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000013880", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x13", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x14", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000857d7ccfcef3a7ff8245f57daeb042440fd513e800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000030d40", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x1256d02096be9d780ff6d63e25399854a965a59afd4f5a4b6c605b9f09c68805", + "transactionIndex": "0xa", + "logIndex": "0x15", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008200000000000000000000000000008000000002000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000040000000000000000020000000000000000000000000000001000000000000000000000000000000000400000000000008000000000000000000000000000020000000000000000000000000000060000002000000000000008000100000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe72db85f" + }, + { + "transactionHash": "0x842b22a3446d90c67b9f41d11a5ac087f354e1dfb2ef18d3739a28f960060747", + "transactionIndex": "0xb", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "cumulativeGasUsed": "0x19997a", + "gasUsed": "0x10aee", + "contractAddress": null, + "logs": [ + { + "address": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000002faf080", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x842b22a3446d90c67b9f41d11a5ac087f354e1dfb2ef18d3739a28f960060747", + "transactionIndex": "0xb", + "logIndex": "0x16", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000008000000000002000000000000040000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe72db85f" + }, + { + "transactionHash": "0x6073589ab06f05737ef7984ab356dafe17d0c0837553d4216598ba62f6d3155c", + "transactionIndex": "0xc", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "cumulativeGasUsed": "0x1a6190", + "gasUsed": "0xc816", + "contractAddress": null, + "logs": [ + { + "address": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000c65c6bea96666f150bef9b936630f6355bffcc06" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000186a0", + "blockHash": "0x48795a8cd694d5e9b89b511a0bc02a98e532194eec6078982d0e2e3561d52602", + "blockNumber": "0x566003", + "transactionHash": "0x6073589ab06f05737ef7984ab356dafe17d0c0837553d4216598ba62f6d3155c", + "transactionIndex": "0xc", + "logIndex": "0x17", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000008000000000000000000000000040000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000040000000000000020000000000000004000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe72db85f" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1712659241, + "chain": 11155111, + "multi": false, + "commit": "9876e3e" +} \ No newline at end of file diff --git a/deployments/sepolia/SLP.json b/deployments/sepolia/SLP.json index aff77cde..483cf86f 100644 --- a/deployments/sepolia/SLP.json +++ b/deployments/sepolia/SLP.json @@ -2,18 +2,7 @@ "abi": [ { "type": "constructor", - "inputs": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "symbol", - "type": "string", - "internalType": "string" - } - ], + "inputs": [], "stateMutability": "nonpayable" }, { @@ -305,14 +294,14 @@ "anonymous": false } ], - "address": "0x8Fd00610153D22B9A4bbeB52Da4FF4E72b41e819", - "args": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000", + "address": "0x857d7CcFcef3A7FF8245f57Daeb042440Fd513e8", + "args": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "ast": "", - "blockNumber": 5660542, - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c8738038062000c87833981016040819052620000349162000126565b8181600362000044838262000221565b50600462000053828262000221565b5050505050620002ed565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008657600080fd5b81516001600160401b0380821115620000a357620000a36200005e565b604051601f8301601f19908116603f01168101908282118183101715620000ce57620000ce6200005e565b8160405283815260209250866020858801011115620000ec57600080fd5b600091505b83821015620001105785820183015181830184015290820190620000f1565b6000602085830101528094505050505092915050565b600080604083850312156200013a57600080fd5b82516001600160401b03808211156200015257600080fd5b620001608683870162000074565b935060208501519150808211156200017757600080fd5b50620001868582860162000074565b9150509250929050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021c576000816000526020600020601f850160051c81016020861015620001f75750805b601f850160051c820191505b81811015620002185782815560010162000203565b5050505b505050565b81516001600160401b038111156200023d576200023d6200005e565b62000255816200024e845462000190565b84620001cc565b602080601f8311600181146200028d5760008415620002745750858301515b600019600386901b1c1916600185901b17855562000218565b600085815260208120601f198616915b82811015620002be578886015182559484019460019091019084016200029d565b5085821015620002dd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a80620002fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220911759f5c9fad1a27b213cd7dfb739b1d142608781e3564fb91da4d8c714164f64736f6c63430008170033", + "blockNumber": 5660651, + "bytecode": "0x608060405234801561001057600080fd5b506040518060400160405280601281526020017129b6b7b7ba34102637bb32902837ba34b7b760711b815250604051806040016040528060038152602001620534c560ec1b8152508160039081610067919061011d565b506004610074828261011d565b5050506101dc565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806100a657607f821691505b6020821081036100c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610118576000816000526020600020601f850160051c810160208610156100f55750805b601f850160051c820191505b8181101561011457828155600101610101565b5050505b505050565b81516001600160401b038111156101365761013661007c565b61014a816101448454610092565b846100cc565b602080601f83116001811461017f57600084156101675750858301515b600019600386901b1c1916600185901b178555610114565b600085815260208120601f198616915b828110156101ae5788860151825594840194600190910190840161018f565b50858210156101cc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61098a806101eb6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220aa700d2a84d76b663b0e6e64e2262db97093227329c49f33043ce4f78e870c6c64736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "MockSLP.sol", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220911759f5c9fad1a27b213cd7dfb739b1d142608781e3564fb91da4d8c714164f64736f6c63430008170033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d3565b60405180910390f35b6100ea6100e536600461083e565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a366004610868565b61026c565b604051600081526020016100ce565b6100ea61013c36600461083e565b610290565b61015461014f36600461083e565b6102b2565b005b6100fe6101643660046108a4565b6001600160a01b031660009081526020819052604090205490565b6100c16102c0565b6100ea61019536600461083e565b6102cf565b6100ea6101a836600461083e565b61034f565b6100fe6101bb3660046108c6565b61035d565b6060600380546101cf906108f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108f9565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610388565b60019150505b92915050565b60003361027a8582856104ac565b610285858585610526565b506001949350505050565b6000336102608185856102a3838361035d565b6102ad9190610933565b610388565b6102bc82826106f4565b5050565b6060600480546101cf906108f9565b600033816102dd828661035d565b9050838110156103425760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102858286868403610388565b600033610260818585610526565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610339565b6001600160a01b03821661044b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610339565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b8848461035d565b9050600019811461052057818110156105135760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610339565b6105208484848403610388565b50505050565b6001600160a01b03831661058a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610339565b6001600160a01b0382166105ec5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610339565b6001600160a01b038316600090815260208190526040902054818110156106645760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610339565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061069b908490610933565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e791815260200190565b60405180910390a3610520565b6001600160a01b03821661074a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610339565b806002600082825461075c9190610933565b90915550506001600160a01b03821660009081526020819052604081208054839290610789908490610933565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60006020808352835180602085015260005b81811015610801578581018301518582016040015282016107e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461083957600080fd5b919050565b6000806040838503121561085157600080fd5b61085a83610822565b946020939093013593505050565b60008060006060848603121561087d57600080fd5b61088684610822565b925061089460208501610822565b9150604084013590509250925092565b6000602082840312156108b657600080fd5b6108bf82610822565b9392505050565b600080604083850312156108d957600080fd5b6108e283610822565b91506108f060208401610822565b90509250929050565b600181811c9082168061090d57607f821691505b60208210810361092d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561026657634e487b7160e01b600052601160045260246000fdfea2646970667358221220aa700d2a84d76b663b0e6e64e2262db97093227329c49f33043ce4f78e870c6c64736f6c63430008170033", "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, @@ -362,9 +351,9 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"SLP always have decimal is 0\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockSLP.sol\":\"MockSLP\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockSLP.sol\":{\"keccak256\":\"0xd53609f603c42c0d910fb1a7a584be2904a1f13d85fdcdee7ee988426668936a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46133f8e0cba69edc9b0abe3514ccdae71f6979c207c7d73d012d704300f1fb7\",\"dweb:/ipfs/QmcN6cCwvFcYsGmFAYrWFGdjShtg1875WSANCXVy7Zftr8\"]}},\"version\":1}", - "nonce": 11, - "numDeployments": 3, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"SLP always have decimal is 0\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockSLP.sol\":\"MockSLP\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://43e46da9d9f49741ecd876a269e71bc7494058d7a8e9478429998adb5bc3eaa0\",\"dweb:/ipfs/QmUtp4cqzf22C5rJ76AabKADquGWcjsc33yjYXxXC4sDvy\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"src/mocks/token/MockSLP.sol\":{\"keccak256\":\"0x1706197d78641b119f8300da1cbf10116127d0d97aefbde61bd5a47eed217a86\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9fa27e682adf50455a28f596506dc60aaaa1a9202761bf0829abd45cd7d9fec9\",\"dweb:/ipfs/QmRCAn8Gw4Uas8ZJChDPX9zVvEFsEMg328u9jjokvBKciZ\"]}},\"version\":1}", + "nonce": 15, + "numDeployments": 4, "storageLayout": { "storage": [ { @@ -440,7 +429,7 @@ } } }, - "timestamp": 1712657532, + "timestamp": 1712658888, "userdoc": { "version": 1, "kind": "user" From 88fbd2404aeee24fea138b7bf0587558131bc8e6 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 10 Apr 2024 15:10:20 +0700 Subject: [PATCH 150/305] resolve conflict --- .../20240405-maptoken-usdc-mainchain.s.sol | 1 + script/20240403-deploy-sepolia/deploy-sepolia.s.sol | 1 + script/factories/factory-maptoken-mainchain.s.sol | 2 +- script/factories/factory-maptoken-roninchain.s.sol | 2 +- test/helpers/ProposalUtils.t.sol | 6 +++--- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol index e407e202..3a77e5aa 100644 --- a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol @@ -133,6 +133,7 @@ contract Migration__20240405_MapTokenUsdcMainchain is BridgeMigration, Migration nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, chainId: block.chainid, expiryTimestamp: expiredTime, + executor: address(0), targets: targets, values: values, calldatas: calldatas, diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 11c3590f..6bcfd1c8 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -161,6 +161,7 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { nonce: _mainchainBridgeManager.round(0) + 1, chainId: block.chainid, expiryTimestamp: expiredTime, + executor: address(0), targets: targets, values: values, calldatas: calldatas, diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index c533e427..29ea6c17 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -94,6 +94,6 @@ abstract contract Factory__MapTokensMainchain is BridgeMigration { uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); vm.broadcast(_governor); - _roninBridgeManager.propose(chainId, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index 951a2c3d..5a14a2b8 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -111,6 +111,6 @@ abstract contract Factory__MapTokensRoninchain is BridgeMigration { _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); vm.broadcast(_governor); - _roninBridgeManager.propose(block.chainid, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/test/helpers/ProposalUtils.t.sol b/test/helpers/ProposalUtils.t.sol index 2ee8b177..1b7224e1 100644 --- a/test/helpers/ProposalUtils.t.sol +++ b/test/helpers/ProposalUtils.t.sol @@ -22,9 +22,9 @@ contract ProposalUtils is Utils, Test { _domain = keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,bytes32 salt)"), - keccak256("BridgeAdmin"), // name hash - keccak256("2"), // version hash - keccak256(abi.encode("BRIDGE_ADMIN", roninChainId)) // salt + keccak256("BridgeManager"), // name hash + keccak256("3"), // version hash + keccak256(abi.encode("BRIDGE_MANAGER", roninChainId)) // salt ) ); From c5cc1d020571c144226ee4dfc451eff55a51fee0 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 2 Apr 2024 16:40:40 +0700 Subject: [PATCH 151/305] test(RoninGatewayV3): add unit tests for bulkAcknowledgeMainchainWithdraw, bulkSubmitWithdrawalSignatures and submitWithdrawal --- ...AcknowledgeMainchainWithdrew.Gateway.t.sol | 75 +++++++++++++++++ .../bulkDepositAndRecord.Gateway.t.sol | 48 +++++++++-- ...lkSubmitWithdrawalSignatures.Gateway.t.sol | 83 +++++++++++++++++++ .../submitWithdrawal.MainchainGatewayV3.t.sol | 10 +++ 4 files changed, 208 insertions(+), 8 deletions(-) create mode 100644 test/bridge/integration/bridge-manager/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol create mode 100644 test/bridge/integration/bridge-manager/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol b/test/bridge/integration/bridge-manager/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol new file mode 100644 index 00000000..a85890eb --- /dev/null +++ b/test/bridge/integration/bridge-manager/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import "../../BaseIntegration.t.sol"; + +contract BulkAcknowledgeMainchainWithdrew_Gateway_Test is BaseIntegration_Test { + uint256 _numOperatorsForVoteExecuted; + uint256 _sampleReceipt; + uint256[] _bulkReceipts; + uint256 _id = 0; + + function setUp() public override { + super.setUp(); + + vm.deal(address(_bridgeReward), 10 ether); + + _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; + console.log("Num operators for vote executed:", _numOperatorsForVoteExecuted); + console.log("Total operators:", _param.roninBridgeManager.bridgeOperators.length); + } + + function test_minimum_bulkAcknowledgeMainchainWithdrew() external { + _bulkAcknowledgeMainchainWithdrew(_numOperatorsForVoteExecuted); + + _wrapUpEpoch(); + _wrapUpEpoch(); + + _moveToEndPeriodAndWrapUpEpoch(); + + uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), _id, "Total ballot should be equal to the number of receipts"); + } + } + + function test_allVoters_AcknowledgeMainchainWithdrew() external { + uint256 numAllOperator = _param.roninBridgeManager.bridgeOperators.length; + _bulkAcknowledgeMainchainWithdrew(numAllOperator); + + _wrapUpEpoch(); + + uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < numAllOperator; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), _id, "Total ballot should be equal to the number of receipts"); + } + } + + function _bulkAcknowledgeMainchainWithdrew(uint256 numVote) private { + console.log(">> tryBulkAcknowledgeMainchainWithdrew ...."); + _prepareBulkRequest(); + for (uint256 i; i < numVote; i++) { + console.log(" -> Operator vote:", _param.roninBridgeManager.bridgeOperators[i]); + vm.prank(_param.roninBridgeManager.bridgeOperators[i]); + bool[] memory _executedReceipts = _roninGatewayV3.tryBulkAcknowledgeMainchainWithdrew(_bulkReceipts); + + for (uint256 j; j < _executedReceipts.length; j++) { + assertTrue(_roninGatewayV3.mainchainWithdrewVoted(_bulkReceipts[j], _param.roninBridgeManager.bridgeOperators[i]), "Withdraw Receipt should be voted"); + } + } + } + + function _prepareBulkRequest() internal { + delete _bulkReceipts; + + for (uint256 i; i < 50; i++) { + _sampleReceipt = ++_id; + _bulkReceipts.push(_sampleReceipt); + } + } +} diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol b/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol index c4a6f767..9159e51f 100644 --- a/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol +++ b/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol @@ -28,14 +28,16 @@ contract BulkDepositAndRecord_Gateway_Test is BaseIntegration_Test { }); _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; + console.log("Num operators for vote executed:", _numOperatorsForVoteExecuted); + console.log("Total operators:", _param.roninBridgeManager.bridgeOperators.length); } function test_bulkDepositFor_wrapUp_checkRewardAndSlash() public { - _depositFor(); + _depositFor(_numOperatorsForVoteExecuted); _moveToEndPeriodAndWrapUpEpoch(); console.log("=============== First 50 Receipts ==========="); - _bulkDepositFor(); + _bulkDepositFor(_numOperatorsForVoteExecuted); _wrapUpEpoch(); _wrapUpEpoch(); @@ -59,7 +61,7 @@ contract BulkDepositAndRecord_Gateway_Test is BaseIntegration_Test { } console.log("==== Check total ballot after new deposit ===="); - _depositFor(); + _depositFor(_numOperatorsForVoteExecuted); logBridgeTracking(); logBridgeSlash(); @@ -76,23 +78,53 @@ contract BulkDepositAndRecord_Gateway_Test is BaseIntegration_Test { } } - function _depositFor() internal { + function test_RecordAllVoters_bulkDepositFor() public { + uint256 numAllOperators = _param.roninBridgeManager.bridgeOperators.length; + + _depositFor(numAllOperators); + _moveToEndPeriodAndWrapUpEpoch(); + + // console.log("=============== First 50 Receipts ==========="); + _bulkDepositFor(numAllOperators); + + _wrapUpEpoch(); + _wrapUpEpoch(); + + _moveToEndPeriodAndWrapUpEpoch(); + + console.log("=============== Check slash and reward behavior ==========="); + console.log("==== Check total ballot before new deposit ===="); + + logBridgeTracking(); + + uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < numAllOperators; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), _id, "Total ballot should be equal to the number of receipts"); + } + } + + function _depositFor(uint256 numVote) internal { console.log(">> depositFor ...."); _sampleReceipt.id = ++_id; - for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + for (uint256 i; i < numVote; i++) { console.log(" -> Operator vote:", _param.roninBridgeManager.bridgeOperators[i]); vm.prank(_param.roninBridgeManager.bridgeOperators[i]); _roninGatewayV3.depositFor(_sampleReceipt); } } - function _bulkDepositFor() internal { + function _bulkDepositFor(uint256 numVote) internal { console.log(">> bulkDepositFor ...."); _prepareBulkRequest(); - for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + for (uint256 i; i < numVote; i++) { console.log(" -> Operator vote:", _param.roninBridgeManager.bridgeOperators[i]); vm.prank(_param.roninBridgeManager.bridgeOperators[i]); - _roninGatewayV3.tryBulkDepositFor(_bulkReceipts); + bool[] memory _executedReceipts = _roninGatewayV3.tryBulkDepositFor(_bulkReceipts); + + for (uint256 j; j < _executedReceipts.length; j++) { + assertTrue(_roninGatewayV3.depositVoted(block.chainid, _bulkReceipts[j].id, _param.roninBridgeManager.bridgeOperators[i]), "Receipt should be voted"); + } } } diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol b/test/bridge/integration/bridge-manager/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol new file mode 100644 index 00000000..f8800d1b --- /dev/null +++ b/test/bridge/integration/bridge-manager/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 as console } from "forge-std/console2.sol"; +import { Transfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { Token } from "@ronin/contracts/libraries/Token.sol"; +import "../../BaseIntegration.t.sol"; + +contract BulkSubmitWithdrawalSignatures_Gateway_Test is BaseIntegration_Test { + uint256 _numOperatorsForVoteExecuted; + uint256 _sampleReceipt; + uint256[] _withdrawals; + bytes[] _signatures; + uint256 _id = 0; + + function setUp() public override { + super.setUp(); + + vm.deal(address(_bridgeReward), 10 ether); + + _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; + console.log("Num operators for vote executed:", _numOperatorsForVoteExecuted); + console.log("Total operators:", _param.roninBridgeManager.bridgeOperators.length); + } + + function test_minimum_bulkSubmitWithdrawalSignatures() external { + _bulkSubmitWithdrawalSignatures(_numOperatorsForVoteExecuted); + + _wrapUpEpoch(); + _wrapUpEpoch(); + + _moveToEndPeriodAndWrapUpEpoch(); + + uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < _numOperatorsForVoteExecuted; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), _id, "Total ballot should be equal to the number of receipts"); + } + } + + function test_allVoters_bulkSubmitWithdrawalSignatures() external { + uint256 numAllOperator = _param.roninBridgeManager.bridgeOperators.length; + _bulkSubmitWithdrawalSignatures(numAllOperator); + + _wrapUpEpoch(); + + uint256 lastSyncedPeriod = uint256(vm.load(address(_bridgeTracking), bytes32(uint256(11)))); + for (uint256 i; i < numAllOperator; i++) { + address operator = _param.roninBridgeManager.bridgeOperators[i]; + assertEq(_bridgeTracking.totalBallotOf(lastSyncedPeriod, operator), _id, "Total ballot should be equal to the number of receipts"); + } + } + + function _bulkSubmitWithdrawalSignatures(uint256 numVote) private { + console.log(">> _bulkSubmitWithdrawalSignatures ...."); + _prepareBulkRequest(); + + for (uint256 i; i < numVote; i++) { + console.log(" -> Operator vote:", _param.roninBridgeManager.bridgeOperators[i]); + vm.prank(_param.roninBridgeManager.bridgeOperators[i]); + _roninGatewayV3.bulkSubmitWithdrawalSignatures(_withdrawals, _signatures); + + for (uint256 j; j < _withdrawals.length; j++) { + address[] memory op = new address[](1); + op[0] = _param.roninBridgeManager.bridgeOperators[i]; + bytes[] memory sig = _roninGatewayV3.getWithdrawalSignatures(_withdrawals[j], op); + + assertTrue(sig[0].length > 0, "Withdraw Receipt should be voted"); + } + } + } + + function _prepareBulkRequest() internal { + delete _withdrawals; + delete _signatures; + + for (uint256 i; i < 50; i++) { + _sampleReceipt = ++_id; + _withdrawals.push(_sampleReceipt); + _signatures.push(abi.encodePacked("signature", i)); + } + } +} diff --git a/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol b/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol index d9b1d03a..1ecd8f4a 100644 --- a/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol +++ b/test/bridge/integration/mainchain-gateway/submitWithdrawal.MainchainGatewayV3.t.sol @@ -16,6 +16,13 @@ interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); } +contract ReentrancyActor { + fallback() external payable { + // reentrancy + payable(msg.sender).transfer(msg.value); + } +} + contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { event Withdrew(bytes32 receiptHash, LibTransfer.Receipt receipt); @@ -29,10 +36,13 @@ contract SubmitWithdrawal_MainchainGatewayV3_Test is BaseIntegration_Test { LibTransfer.Receipt _withdrawalReceipt; bytes32 _domainSeparator; + address actor; function setUp() public virtual override { super.setUp(); + actor = address(new ReentrancyActor()); + _domainSeparator = _mainchainGatewayV3.DOMAIN_SEPARATOR(); _withdrawalReceipt.id = 0; From d4cb23c909f952c3675e578566c40c05b5b1d00e Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 9 Apr 2024 14:36:42 +0700 Subject: [PATCH 152/305] test(Proposal, GlobalProposal): add test hash --- test/libraries/Proposal.t.sol | 114 ++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 test/libraries/Proposal.t.sol diff --git a/test/libraries/Proposal.t.sol b/test/libraries/Proposal.t.sol new file mode 100644 index 00000000..0eacb26b --- /dev/null +++ b/test/libraries/Proposal.t.sol @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.23; + +import { Test } from "forge-std/Test.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; + +contract ProposalTest is Test { + // keccak256("GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); + bytes32 internal constant GLOBAL_TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a; + // keccak256("ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)"); + bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12; + + function testFuzz_hash_Proposal(uint256 nonce, uint256 chainId, uint256 expiryTimestamp, address executor, uint8 count) external returns (bytes32) { + vm.assume(count < 100 && count != 0); + + address[] memory targets = new address[](count); + uint256[] memory values = new uint256[](count); + bytes[] memory calldatas = new bytes[](count); + uint256[] memory gasAmounts = new uint256[](count); + + for (uint8 i = 0; i < count; i++) { + targets[i] = address(uint160(uint256(keccak256(abi.encodePacked("targets[i]", i))))); + values[i] = uint256(keccak256(abi.encodePacked("values[i]", i))); + calldatas[i] = abi.encodePacked("calldatas[i]", i); + gasAmounts[i] = uint256(keccak256(abi.encodePacked("gasAmounts[i]", i))); + } + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: nonce, + chainId: chainId, + expiryTimestamp: expiryTimestamp, + executor: executor, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + bytes32 actual = Proposal.hash(proposal); + bytes32 expected = hash(proposal); + + assertEq(actual, expected, "hash mismatch"); + } + + function testFuzz_hash_GlobalProposal(uint256 nonce, uint256 expiryTimestamp, address executor, uint8 count) external returns (bytes32) { + vm.assume(count < 100 && count != 0); + + uint8[] memory _targetOptions = new uint8[](count); + uint256[] memory values = new uint256[](count); + bytes[] memory calldatas = new bytes[](count); + uint256[] memory gasAmounts = new uint256[](count); + + for (uint8 i = 0; i < count; i++) { + _targetOptions[i] = uint8(_bound(uint256(keccak256(abi.encodePacked("targetOptions[i]", i))), 0, 4)); + values[i] = uint256(keccak256(abi.encodePacked("values[i]", i))); + calldatas[i] = abi.encodePacked("calldatas[i]", i); + gasAmounts[i] = uint256(keccak256(abi.encodePacked("gasAmounts[i]", i))); + } + + GlobalProposal.TargetOption[] memory targetOptions; + assembly { + targetOptions := _targetOptions + } + + GlobalProposal.GlobalProposalDetail memory proposal = GlobalProposal.GlobalProposalDetail({ + nonce: nonce, + expiryTimestamp: expiryTimestamp, + executor: executor, + targetOptions: targetOptions, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + bytes32 actual = GlobalProposal.hash(proposal); + bytes32 expected = hash(proposal); + + assertEq(actual, expected, "hash mismatch"); + } + + function hash(Proposal.ProposalDetail memory proposal) private pure returns (bytes32) { + bytes32[] memory calldatasHashList = new bytes32[](proposal.calldatas.length); + for (uint256 i; i < calldatasHashList.length; ++i) { + calldatasHashList[i] = keccak256(proposal.calldatas[i]); + } + + bytes32 targetsHash = keccak256(abi.encodePacked(proposal.targets)); + bytes32 valuesHash = keccak256(abi.encodePacked(proposal.values)); + bytes32 calldatasHash = keccak256(abi.encodePacked(calldatasHashList)); + bytes32 gasAmountsHash = keccak256(abi.encodePacked(proposal.gasAmounts)); + + return keccak256( + abi.encode( + TYPE_HASH, proposal.nonce, proposal.chainId, proposal.expiryTimestamp, proposal.executor, targetsHash, valuesHash, calldatasHash, gasAmountsHash + ) + ); + } + + function hash(GlobalProposal.GlobalProposalDetail memory proposal) private pure returns (bytes32) { + bytes32[] memory calldatasHashList = new bytes32[](proposal.calldatas.length); + for (uint256 i; i < calldatasHashList.length; ++i) { + calldatasHashList[i] = keccak256(proposal.calldatas[i]); + } + + bytes32 targetsHash = keccak256(abi.encodePacked(proposal.targetOptions)); + bytes32 valuesHash = keccak256(abi.encodePacked(proposal.values)); + bytes32 calldatasHash = keccak256(abi.encodePacked(calldatasHashList)); + bytes32 gasAmountsHash = keccak256(abi.encodePacked(proposal.gasAmounts)); + + return keccak256( + abi.encode(GLOBAL_TYPE_HASH, proposal.nonce, proposal.expiryTimestamp, proposal.executor, targetsHash, valuesHash, calldatasHash, gasAmountsHash) + ); + } +} From bff9b835cbeda79762ab1679a767cacd31debe34 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 10 Apr 2024 17:15:17 +0700 Subject: [PATCH 153/305] fix(RoninGatewayV3): not early-exit in bulk vote --- src/ronin/gateway/RoninGatewayV3.sol | 30 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 565e1f27..33fd0c92 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -161,21 +161,24 @@ contract RoninGatewayV3 is _executedReceipts = new bool[](length); IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)); - for (uint256 i; i < length; i++) { + for (uint256 i; i < length; ++i) { withdrawalId = _withdrawalIds[i]; bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId, governor); + + // Mark the withdrawal is executed if (mainchainWithdrew(withdrawalId)) { _executedReceipts[i] = true; - } else { - IsolatedGovernance.Vote storage _vote = mainchainWithdrewVote[withdrawalId]; - Transfer.Receipt memory _withdrawal = withdrawal[withdrawalId]; - bytes32 _hash = _withdrawal.hash(); - VoteStatus _status = _castIsolatedVote(_vote, governor, minVoteWeight, _hash); - if (_status == VoteStatus.Approved) { - _vote.status = VoteStatus.Executed; - bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId); - emit MainchainWithdrew(_hash, _withdrawal); - } + } + + // Process all votes, not early-exit to track all votes in BridgeTracking + IsolatedGovernance.Vote storage _vote = mainchainWithdrewVote[withdrawalId]; + Transfer.Receipt memory _withdrawal = withdrawal[withdrawalId]; + bytes32 _hash = _withdrawal.hash(); + VoteStatus _status = _castIsolatedVote(_vote, governor, minVoteWeight, _hash); + if (_status == VoteStatus.Approved) { + _vote.status = VoteStatus.Executed; + bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId); + emit MainchainWithdrew(_hash, _withdrawal); } } } @@ -198,9 +201,10 @@ contract RoninGatewayV3 is iReceipt = receipts[i]; if (depositVote[iReceipt.mainchain.chainId][iReceipt.id].status == VoteStatus.Executed) { _executedReceipts[i] = true; - } else { - _depositFor(iReceipt, msg.sender, minVoteWeight); } + + // Process all votes, not early-exit to track all votes in BridgeTracking + _depositFor(iReceipt, msg.sender, minVoteWeight); } } From 37da9e69db2b1b75ad8185c689ff162a6eda379e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 11 Apr 2024 11:33:46 +0700 Subject: [PATCH 154/305] fix(LibTokenInfoBatch): assert array length gt 1 --- src/libraries/LibTokenInfoBatch.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libraries/LibTokenInfoBatch.sol b/src/libraries/LibTokenInfoBatch.sol index 60d557bd..b52a175a 100644 --- a/src/libraries/LibTokenInfoBatch.sol +++ b/src/libraries/LibTokenInfoBatch.sol @@ -52,8 +52,8 @@ library LibTokenInfoBatch { function checkERC721Batch(TokenInfoBatch memory self) internal pure returns (bool res) { return self.erc == TokenStandard.ERC721 // Check ERC721 - && self.ids.length != 0 // Info must contain valid array of ids - && self.quantities.length == 0; // Quantity of each ERC721 alway is 1, no input to save gas + && self.ids.length != 0 // Info must contain at least one id in the array + && self.quantities.length == 0; // No requires quantity to save gas, because ERC-721 qty is always 1. } function checkERC1155Batch(TokenInfoBatch memory self) internal pure returns (bool res) { @@ -61,7 +61,8 @@ library LibTokenInfoBatch { if ( !(self.erc == TokenStandard.ERC1155 // Check ERC1155 - && length == self.quantities.length) // Info must have same length for each token id + && self.ids.length != 0 // Info must contain at least one id in the array + && length == self.quantities.length) // Info must have same length for each pair id and quantity ) { return false; } From abcc50e97ce7356abf833786fe28c3c2c26161e2 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 10:11:41 +0700 Subject: [PATCH 155/305] fix(BridgeManager): remove unused param --- .../governance-proposal/GlobalGovernanceProposal.sol | 4 +--- .../governance-proposal/GovernanceProposal.sol | 4 +--- .../governance-relay/GlobalGovernanceRelay.sol | 1 - .../governance-relay/GovernanceRelay.sol | 1 - src/mainchain/MainchainBridgeManager.sol | 4 ++-- src/ronin/gateway/RoninBridgeManager.sol | 7 +++---- 6 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol b/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol index 23c14008..234ffe2a 100644 --- a/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol +++ b/src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol @@ -16,7 +16,6 @@ abstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovern GlobalProposal.GlobalProposalDetail calldata globalProposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures, - bytes32 domainSeparator, address creator ) internal returns (Proposal.ProposalDetail memory proposal) { proposal = _proposeGlobalStruct(globalProposal, creator); @@ -29,8 +28,7 @@ abstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovern function _castGlobalProposalBySignatures( GlobalProposal.GlobalProposalDetail calldata globalProposal, Ballot.VoteType[] calldata supports_, - Signature[] calldata signatures, - bytes32 domainSeparator + Signature[] calldata signatures ) internal { Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })); diff --git a/src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol b/src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol index 7e9d75ec..cbc23fe0 100644 --- a/src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol +++ b/src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol @@ -14,7 +14,6 @@ abstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal Proposal.ProposalDetail calldata _proposal, Ballot.VoteType[] calldata _supports, Signature[] calldata _signatures, - bytes32 _domainSeparator, address _creator ) internal { _proposeProposalStruct(_proposal, _creator); @@ -27,8 +26,7 @@ abstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal function _castProposalBySignatures( Proposal.ProposalDetail calldata _proposal, Ballot.VoteType[] calldata _supports, - Signature[] calldata _signatures, - bytes32 _domainSeparator + Signature[] calldata _signatures ) internal { bytes32 _proposalHash = _proposal.hash(); diff --git a/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol b/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol index b6d283c3..76b347ca 100644 --- a/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol +++ b/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol @@ -25,7 +25,6 @@ abstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGove GlobalProposal.GlobalProposalDetail calldata globalProposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures, - bytes32 domainSeparator, address creator ) internal { Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator); diff --git a/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol b/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol index 9349d1ee..e7bafea0 100644 --- a/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol +++ b/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol @@ -19,7 +19,6 @@ abstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay { Proposal.ProposalDetail calldata _proposal, Ballot.VoteType[] calldata _supports, Signature[] calldata _signatures, - bytes32 _domainSeparator, address _creator ) internal { _proposeProposalStruct(_proposal, _creator); diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index 821ee8aa..7bc5f3cf 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -42,7 +42,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna Signature[] calldata signatures ) external onlyGovernor { _requireExecutor(proposal.executor, msg.sender); - _relayProposal(proposal, supports_, signatures, DOMAIN_SEPARATOR, msg.sender); + _relayProposal(proposal, supports_, signatures, msg.sender); } /** @@ -57,7 +57,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna Signature[] calldata signatures ) external onlyGovernor { _requireExecutor(globalProposal.executor, msg.sender); - _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, domainSeparator: DOMAIN_SEPARATOR, creator: msg.sender }); + _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender }); } function _requireExecutor(address executor, address caller) internal pure { diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index f4d86701..09ea6c03 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -69,7 +69,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan Ballot.VoteType[] calldata _supports, Signature[] calldata _signatures ) external onlyGovernor { - _proposeProposalStructAndCastVotes(_proposal, _supports, _signatures, DOMAIN_SEPARATOR, msg.sender); + _proposeProposalStructAndCastVotes(_proposal, _supports, _signatures, msg.sender); } /** @@ -118,7 +118,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan * @dev See `GovernanceProposal-_castProposalBySignatures`. */ function castProposalBySignatures(Proposal.ProposalDetail calldata proposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures) external { - _castProposalBySignatures(proposal, supports_, signatures, DOMAIN_SEPARATOR); + _castProposalBySignatures(proposal, supports_, signatures); } /** @@ -167,7 +167,6 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan globalProposal: globalProposal, supports_: supports_, signatures: signatures, - domainSeparator: DOMAIN_SEPARATOR, creator: msg.sender }); } @@ -180,7 +179,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan Ballot.VoteType[] calldata supports_, Signature[] calldata signatures ) external { - _castGlobalProposalBySignatures({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, domainSeparator: DOMAIN_SEPARATOR }); + _castGlobalProposalBySignatures({ globalProposal: globalProposal, supports_: supports_, signatures: signatures }); } /** From 9bd0664904c240cd7716868a15e2f2bccbc9b482 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 10:12:04 +0700 Subject: [PATCH 156/305] fix(BridgeManager): fix chainId in propose --- src/ronin/gateway/RoninBridgeManager.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 09ea6c03..b9e85058 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -43,8 +43,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan ) external onlyGovernor { _proposeProposalStruct( Proposal.ProposalDetail({ - nonce: _createVotingRound(block.chainid), - chainId: block.chainid, + nonce: _createVotingRound(chainId), + chainId: chainId, expiryTimestamp: expiryTimestamp, executor: executor, targets: targets, From 657fefb15e01b6268794d6871d87ffb8d5d4239d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 10:52:27 +0700 Subject: [PATCH 157/305] chore: forge fmt --- .../maptoken-pixel-configs.s.sol | 2 +- .../update-axiechat-config.s.sol | 16 +--- .../20240206-maptoken-banana-roninchain.s.sol | 39 ++++---- .../changeGV-stablenode-config.s.sol | 2 +- .../20240308-maptoken-aperios-mainchain.s.sol | 6 +- ...20240308-maptoken-aperios-roninchain.s.sol | 6 +- .../base-maptoken.s.sol | 8 +- .../maptoken-aperios-configs.s.sol | 2 +- .../maptoken-ygg-configs.s.sol | 2 +- .../20240405-maptoken-usdc-mainchain.s.sol | 28 ++---- .../20240409-maptoken-slp-mainchain.s.sol | 14 +-- .../deploy-sepolia.s.sol | 7 +- .../maptoken-slp-configs.s.sol | 2 +- .../maptoken-usdc-configs.s.sol | 2 +- .../20240411-operators-key.s.sol | 13 +++ script/BaseMigrationV2.sol | 23 ++--- script/BridgeMigration.sol | 38 ++++---- script/Migration.s.sol | 2 +- .../factory-maptoken-mainchain.s.sol | 13 +-- .../factory-maptoken-roninchain.s.sol | 6 +- script/libraries/LibArray.sol | 23 ++--- script/libraries/MapTokenInfo.sol | 2 - src/extensions/GatewayV3.sol | 8 +- src/extensions/MinimumWithdrawal.sol | 2 +- src/extensions/RONTransferHelper.sol | 10 +- .../TransparentUpgradeableProxyV2.sol | 14 +-- src/extensions/WithdrawalLimitation.sol | 34 ++----- .../BridgeTrackingHelper.sol | 6 +- .../GlobalGovernanceRelay.sol | 7 +- .../governance-relay/GovernanceRelay.sol | 7 +- src/interfaces/IBridgeAdminProposal.sol | 5 +- src/interfaces/IMainchainGatewayV3.sol | 11 +-- src/interfaces/IQuorum.sol | 13 +-- src/interfaces/IRoninGatewayV3.sol | 11 +-- .../bridge/IBridgeManagerCallback.sol | 11 +-- src/interfaces/bridge/IBridgeSlash.sol | 8 +- src/interfaces/bridge/IBridgeTracking.sol | 5 +- .../validator/ICandidateManager.sol | 7 +- .../validator/ICoinbaseExecution.sol | 40 ++------ src/interfaces/validator/IEmergencyExit.sol | 13 +-- .../validator/IRoninValidatorSet.sol | 8 +- .../validator/info-fragments/IJailingInfo.sol | 9 +- src/libraries/BridgeOperatorsBallot.sol | 5 +- src/libraries/GlobalProposal.sol | 11 ++- src/libraries/LibRequestBatch.sol | 6 +- src/libraries/LibTokenInfo.sol | 13 +-- src/libraries/LibTokenInfoBatch.sol | 24 ++--- src/mainchain/MainchainGatewayBatcher.sol | 12 +-- src/mainchain/MainchainGatewayV3.sol | 16 ++-- src/mocks/ronin/MockBridgeReward.sol | 23 +---- src/mocks/ronin/MockBridgeSlash.sol | 6 +- .../ronin/MockRoninGatewayV3Extended.sol | 16 +--- src/mocks/types/MockTUint256Slot.sol | 3 +- src/ronin/gateway/BridgeSlash.sol | 40 ++------ src/ronin/gateway/BridgeTracking.sol | 5 +- src/ronin/gateway/PauseEnforcer.sol | 2 +- src/ronin/gateway/RoninBridgeManager.sol | 7 +- .../gateway/RoninBridgeManagerConstructor.sol | 1 - src/ronin/gateway/RoninGatewayV3.sol | 51 +++------- src/utils/CommonErrors.sol | 2 +- src/utils/ContractType.sol | 33 +++---- src/utils/IdentityGuard.sol | 4 +- src/utils/RoleAccess.sol | 23 ++--- test/bridge/integration/BaseIntegration.t.sol | 20 ++-- .../updateOperator.RoninBridgeManager.t.sol | 10 +- ...IsApprovedInLastEpoch.BridgeTracking.t.sol | 6 +- ...otApprovedInLastEpoch.BridgeTracking.t.sol | 15 +-- ...l.MainchainGatewayV3.erc20.benchmark.t.sol | 2 +- .../emergencyAction.PauseEnforcer.t.sol | 23 ++--- .../set-config/setConfig.PauseEnforcer.t.sol | 3 +- .../depositVote.RoninGatewayV3.t.sol | 11 +-- .../concrete/bridge-manager/constructor.t.sol | 15 +-- .../fuzz/bridge-manager/BridgeReward.t.sol | 50 +++------- .../fuzz/bridge-manager/BridgeSlash.t.sol | 96 ++++--------------- test/helpers/LibArrayUtils.t.sol | 8 +- test/helpers/MainchainBridgeAdminUtils.t.sol | 4 +- test/helpers/Randomizer.t.sol | 11 +-- test/helpers/RoninBridgeAdminUtils.t.sol | 4 +- test/mocks/MockBridgeSlash.sol | 22 ++--- test/mocks/MockBridgeTracking.sol | 18 +--- 80 files changed, 318 insertions(+), 788 deletions(-) create mode 100644 script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key.s.sol diff --git a/script/20240131-maptoken-pixel/maptoken-pixel-configs.s.sol b/script/20240131-maptoken-pixel/maptoken-pixel-configs.s.sol index 7ba0fbfd..0ef79aa9 100644 --- a/script/20240131-maptoken-pixel/maptoken-pixel-configs.s.sol +++ b/script/20240131-maptoken-pixel/maptoken-pixel-configs.s.sol @@ -21,4 +21,4 @@ contract Migration__MapToken_Pixel_Config { uint256 constant _aggMinThreshold = 1000 ether; address internal _governor = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // TODO: replace by address of the SV governor -} \ No newline at end of file +} diff --git a/script/20240131-maptoken-pixel/update-axiechat-config.s.sol b/script/20240131-maptoken-pixel/update-axiechat-config.s.sol index 85afd74d..485ac114 100644 --- a/script/20240131-maptoken-pixel/update-axiechat-config.s.sol +++ b/script/20240131-maptoken-pixel/update-axiechat-config.s.sol @@ -7,7 +7,7 @@ contract Migration__Update_AxieChat_Config { address constant _axieChatBridgeOperator = address(0x772112C7e5dD4ed663e844e79d77c1569a2E88ce); address constant _axieChatGovernor = address(0x5832C3219c1dA998e828E1a2406B73dbFC02a70C); - function _removeAxieChatGovernorAddress() pure internal returns (bytes memory) { + function _removeAxieChatGovernorAddress() internal pure returns (bytes memory) { address[] memory bridgeOperator = new address[](1); bridgeOperator[0] = _axieChatBridgeOperator; @@ -15,12 +15,10 @@ contract Migration__Update_AxieChat_Config { // address[] calldata bridgeOperators // ) - return abi.encodeCall(IBridgeManager.removeBridgeOperators, ( - bridgeOperator - )); + return abi.encodeCall(IBridgeManager.removeBridgeOperators, (bridgeOperator)); } - function _addAxieChatGovernorAddress() pure internal returns (bytes memory) { + function _addAxieChatGovernorAddress() internal pure returns (bytes memory) { uint96[] memory voteWeight = new uint96[](1); address[] memory governor = new address[](1); address[] memory bridgeOperator = new address[](1); @@ -35,10 +33,6 @@ contract Migration__Update_AxieChat_Config { // address[] calldata bridgeOperators // ) - return abi.encodeCall(IBridgeManager.addBridgeOperators, ( - voteWeight, - governor, - bridgeOperator - )); + return abi.encodeCall(IBridgeManager.addBridgeOperators, (voteWeight, governor, bridgeOperator)); } -} \ No newline at end of file +} diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index 15ebb8ca..2f64cfbb 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -1,24 +1,24 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {console2} from "forge-std/console2.sol"; -import {StdStyle} from "forge-std/StdStyle.sol"; -import {BaseMigration} from "foundry-deployment-kit/BaseMigration.s.sol"; -import {DefaultNetwork} from "foundry-deployment-kit/utils/DefaultNetwork.sol"; - -import {RoninBridgeManager} from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -import {IRoninGatewayV3} from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; -import {MinimumWithdrawal} from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; -import {LibTokenInfo, TokenStandard} from "@ronin/contracts/libraries/LibTokenInfo.sol"; -import {Ballot} from "@ronin/contracts/libraries/Ballot.sol"; -import {GlobalProposal} from "@ronin/contracts/libraries/GlobalProposal.sol"; -import {Proposal} from "@ronin/contracts/libraries/Proposal.sol"; - -import {Contract} from "../utils/Contract.sol"; -import {BridgeMigration} from "../BridgeMigration.sol"; -import {Network} from "../utils/Network.sol"; -import {Contract} from "../utils/Contract.sol"; -import {IGeneralConfigExtended} from "../IGeneralConfigExtended.sol"; +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; + +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; +import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; + +import { Contract } from "../utils/Contract.sol"; +import { BridgeMigration } from "../BridgeMigration.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; import "forge-std/console2.sol"; @@ -95,8 +95,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is // uint256[] calldata chainIds, // TokenStandard[] calldata _standards // ) - bytes memory innerData = - abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); targets[0] = _roninGatewayV3; diff --git a/script/20240206-maptoken-banana/changeGV-stablenode-config.s.sol b/script/20240206-maptoken-banana/changeGV-stablenode-config.s.sol index ce9ce487..d727a47b 100644 --- a/script/20240206-maptoken-banana/changeGV-stablenode-config.s.sol +++ b/script/20240206-maptoken-banana/changeGV-stablenode-config.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {IBridgeManager} from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; contract Migration__ChangeGV_StableNode_Config { address constant _stableNodeBridgeOperator = address(0x564DcB855Eb360826f27D1Eb9c57cbbe6C76F50F); diff --git a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol index 81c096e9..57cf4462 100644 --- a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol +++ b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol @@ -9,11 +9,7 @@ contract Migration__20240308_MapTokenAperiosMainchain is Base__MapToken, Factory return Base__MapToken._initCaller(); } - function _initTokenList() - internal - override(Base__MapToken, Factory__MapTokensMainchain) - returns (uint256 totalToken, MapTokenInfo[] memory infos) - { + function _initTokenList() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (uint256 totalToken, MapTokenInfo[] memory infos) { return Base__MapToken._initTokenList(); } diff --git a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol index 472bcea4..ff54faad 100644 --- a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol +++ b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol @@ -10,11 +10,7 @@ contract Migration__20240308_MapTokenAperiosRoninchain is Base__MapToken, Factor return Base__MapToken._initCaller(); } - function _initTokenList() - internal - override(Base__MapToken, Factory__MapTokensRoninchain) - returns (uint256 totalToken, MapTokenInfo[] memory infos) - { + function _initTokenList() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (uint256 totalToken, MapTokenInfo[] memory infos) { return Base__MapToken._initTokenList(); } diff --git a/script/20240308-maptoken-aperios/base-maptoken.s.sol b/script/20240308-maptoken-aperios/base-maptoken.s.sol index 37a9b809..e4561c68 100644 --- a/script/20240308-maptoken-aperios/base-maptoken.s.sol +++ b/script/20240308-maptoken-aperios/base-maptoken.s.sol @@ -7,12 +7,8 @@ import "./caller-configs.s.sol"; import "./maptoken-aperios-configs.s.sol"; import "./maptoken-ygg-configs.s.sol"; -contract Base__MapToken is - Migration__Caller_Config, - Migration__MapToken_Aperios_Config, - Migration__MapToken_Ygg_Config -{ - function _initCaller() internal virtual returns(address) { +contract Base__MapToken is Migration__Caller_Config, Migration__MapToken_Aperios_Config, Migration__MapToken_Ygg_Config { + function _initCaller() internal virtual returns (address) { return SM_GOVERNOR; } diff --git a/script/20240308-maptoken-aperios/maptoken-aperios-configs.s.sol b/script/20240308-maptoken-aperios/maptoken-aperios-configs.s.sol index 185d0ff2..85bfe9f2 100644 --- a/script/20240308-maptoken-aperios/maptoken-aperios-configs.s.sol +++ b/script/20240308-maptoken-aperios/maptoken-aperios-configs.s.sol @@ -6,7 +6,7 @@ import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; contract Migration__MapToken_Aperios_Config { MapTokenInfo _aperiosInfo; - constructor () { + constructor() { _aperiosInfo.roninToken = address(0x7894b3088d069E70895EFfA4e8f7D2c243Fd04C1); _aperiosInfo.mainchainToken = address(0x95b4B8CaD3567B5d7EF7399C2aE1d7070692aB0D); _aperiosInfo.minThreshold = 10 ether; diff --git a/script/20240308-maptoken-aperios/maptoken-ygg-configs.s.sol b/script/20240308-maptoken-aperios/maptoken-ygg-configs.s.sol index aab89f50..380c7c5b 100644 --- a/script/20240308-maptoken-aperios/maptoken-ygg-configs.s.sol +++ b/script/20240308-maptoken-aperios/maptoken-ygg-configs.s.sol @@ -6,7 +6,7 @@ import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; contract Migration__MapToken_Ygg_Config { MapTokenInfo _yggInfo; - constructor () { + constructor() { _yggInfo.roninToken = address(0x1c306872bC82525d72Bf3562E8F0aA3f8F26e857); _yggInfo.mainchainToken = address(0x25f8087EAD173b73D6e8B84329989A8eEA16CF73); _yggInfo.minThreshold = 20 ether; diff --git a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol index 1bb7eea1..d62362f9 100644 --- a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol @@ -75,28 +75,16 @@ contract Migration__20240405_MapTokenUsdcMainchain is BridgeMigration, Migration thresholds[2][1] = 0; thresholds[3][1] = 0; - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, ( - mainchainTokens, - roninTokens, - standards, - thresholds - )); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); - bytes memory setEmergencyPauserInnerData = abi.encodeCall(GatewayV3.setEmergencyPauser, ( - _mainchainPauseEnforcer - )); + bytes memory setEmergencyPauserInnerData = abi.encodeCall(GatewayV3.setEmergencyPauser, (_mainchainPauseEnforcer)); vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); - address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)",innerData)); - address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)",setEmergencyPauserInnerData)); + address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)", innerData)); + address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)", setEmergencyPauserInnerData)); return; - - - - - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); targets[0] = _mainchainGatewayV3; @@ -106,9 +94,7 @@ contract Migration__20240405_MapTokenUsdcMainchain is BridgeMigration, Migration targets[1] = _mainchainGatewayV3; values[1] = 0; - calldatas[1] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(GatewayV3.setEmergencyPauser, ( - _mainchainPauseEnforcer - ))); + calldatas[1] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(GatewayV3.setEmergencyPauser, (_mainchainPauseEnforcer))); gasAmounts[1] = 1_000_000; // ================ VERIFY AND EXECUTE PROPOSAL =============== @@ -125,9 +111,7 @@ contract Migration__20240405_MapTokenUsdcMainchain is BridgeMigration, Migration governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - _mainchainProposalUtils = new MainchainBridgeAdminUtils( - 2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0] - ); + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0]); Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, diff --git a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol index 8f05dfec..5a6eca65 100644 --- a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol @@ -70,26 +70,16 @@ contract Migration__20240409_MapTokenSlpMainchain is BridgeMigration, Migration_ thresholds[2][0] = _unlockFeePercentages; thresholds[3][0] = _dailyWithdrawalLimit; - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, ( - mainchainTokens, - roninTokens, - standards, - thresholds - )); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); - address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)",innerData)); + address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)", innerData)); _mainchainSlp.mint(address(_mainchainGatewayV3), 50_000_000); _mainchainSlp.mint(address(0xC65C6BEA96666f150BEF9b936630f6355BfFCC06), 100_000); return; - - - - - // bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); // targets[0] = _mainchainGatewayV3; diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index daeaa291..2faf4ac4 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -87,9 +87,7 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { _mainchainMockERC721 = new MockERC721Deploy().run(); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); - _mainchainProposalUtils = new MainchainBridgeAdminUtils( - 2021, _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] - ); + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0]); } function _mainchainGatewayV3Initialize() internal { @@ -171,8 +169,7 @@ contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](1); supports_[0] = Ballot.VoteType.For; - SignatureConsumer.Signature[] memory signatures = - _mainchainProposalUtils.generateSignatures(proposal, _param.test.governorPKs); + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, _param.test.governorPKs); vm.broadcast(_mainchainBridgeManager.getGovernors()[0]); _mainchainBridgeManager.relayProposal(proposal, supports_, signatures); diff --git a/script/20240403-deploy-sepolia/maptoken-slp-configs.s.sol b/script/20240403-deploy-sepolia/maptoken-slp-configs.s.sol index 6b4c9406..93eec901 100644 --- a/script/20240403-deploy-sepolia/maptoken-slp-configs.s.sol +++ b/script/20240403-deploy-sepolia/maptoken-slp-configs.s.sol @@ -14,4 +14,4 @@ contract Migration__MapToken_Slp_Config { // uint256 constant _slpMinThreshold = 1000; address internal _governor = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // TODO: replace by address of the SV governor -} \ No newline at end of file +} diff --git a/script/20240403-deploy-sepolia/maptoken-usdc-configs.s.sol b/script/20240403-deploy-sepolia/maptoken-usdc-configs.s.sol index 79205270..4c4d6049 100644 --- a/script/20240403-deploy-sepolia/maptoken-usdc-configs.s.sol +++ b/script/20240403-deploy-sepolia/maptoken-usdc-configs.s.sol @@ -15,4 +15,4 @@ contract Migration__MapToken_Usdc_Config { // uint256 constant _usdcMinThreshold = 10 ether; address internal _governor = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // TODO: replace by address of the SV governor -} \ No newline at end of file +} diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key.s.sol new file mode 100644 index 00000000..78e02f75 --- /dev/null +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key.s.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__20240409_GovernorsKey { + function _loadGovernorPKs() internal pure returns (uint256[] memory res) { + res = new uint256[](4); + + res[3] = 0xe3c1c8220c4ee4a6532d633296c3301db5397cff8a89a920da28f8bec97fcfb6; + res[2] = 0xeb80bc77e3164b6bb3eebf7d5f96f2496eb292fab563377f247d2db5887395e0; + res[0] = 0xed79936f720ac50b7c06138c6fd2d70abc19935de0fb347b0d782bdb6630e5a4; + res[1] = 0x3b3eb1d442ea0d728bc069f9d6d47ba8dcc6c867800cdf42a12117cf231bba59; + } +} diff --git a/script/BaseMigrationV2.sol b/script/BaseMigrationV2.sol index df622324..2f11a188 100644 --- a/script/BaseMigrationV2.sol +++ b/script/BaseMigrationV2.sol @@ -8,13 +8,10 @@ abstract contract BaseMigrationV2 is BaseMigration { using LibString for bytes32; using LibProxy for address payable; - function _deployProxy(TContract contractType, bytes memory args) - internal - virtual - override - logFn(string.concat("_deployProxy ", TContract.unwrap(contractType).unpackOne())) - returns (address payable deployed) - { + function _deployProxy( + TContract contractType, + bytes memory args + ) internal virtual override logFn(string.concat("_deployProxy ", TContract.unwrap(contractType).unpackOne())) returns (address payable deployed) { string memory contractName = CONFIG.getContractName(contractType); address logic = _deployLogic(contractType); @@ -30,18 +27,10 @@ abstract contract BaseMigrationV2 is BaseMigration { assertEq( actualProxyAdmin, proxyAdmin, - string.concat( - "BaseMigration: Invalid proxy admin\n", - "Actual: ", - vm.toString(actualProxyAdmin), - "\nExpected: ", - vm.toString(proxyAdmin) - ) + string.concat("BaseMigration: Invalid proxy admin\n", "Actual: ", vm.toString(actualProxyAdmin), "\nExpected: ", vm.toString(proxyAdmin)) ); CONFIG.setAddress(network(), contractType, deployed); - ARTIFACT_FACTORY.generateArtifact( - sender(), deployed, proxyAbsolutePath, string.concat(contractName, "Proxy"), args, proxyNonce - ); + ARTIFACT_FACTORY.generateArtifact(sender(), deployed, proxyAbsolutePath, string.concat(contractName, "Proxy"), args, proxyNonce); } } diff --git a/script/BridgeMigration.sol b/script/BridgeMigration.sol index 7d332c66..5f7f846a 100644 --- a/script/BridgeMigration.sol +++ b/script/BridgeMigration.sol @@ -5,7 +5,6 @@ import { console2 } from "forge-std/console2.sol"; import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { TNetwork } from "foundry-deployment-kit/types/Types.sol"; - import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { ErrorHandler } from "@ronin/contracts/libraries/ErrorHandler.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -49,20 +48,25 @@ contract BridgeMigration is BaseMigration { function _resolveRoninTarget(GlobalProposal.TargetOption targetOption) internal returns (address) { _config.switchTo(DefaultNetwork.RoninMainnet.key()); - if (targetOption == GlobalProposal.TargetOption.BridgeManager) + if (targetOption == GlobalProposal.TargetOption.BridgeManager) { return _config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + } - if (targetOption == GlobalProposal.TargetOption.GatewayContract) + if (targetOption == GlobalProposal.TargetOption.GatewayContract) { return _config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + } - if (targetOption == GlobalProposal.TargetOption.BridgeReward) + if (targetOption == GlobalProposal.TargetOption.BridgeReward) { return _config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); + } - if (targetOption == GlobalProposal.TargetOption.BridgeSlash) + if (targetOption == GlobalProposal.TargetOption.BridgeSlash) { return _config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + } - if (targetOption == GlobalProposal.TargetOption.BridgeTracking) + if (targetOption == GlobalProposal.TargetOption.BridgeTracking) { return _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + } return address(0); } @@ -70,21 +74,18 @@ contract BridgeMigration is BaseMigration { function _resolveMainchainTarget(GlobalProposal.TargetOption targetOption) internal returns (address) { _config.createFork(Network.EthMainnet.key()); _config.switchTo(Network.EthMainnet.key()); - if (targetOption == GlobalProposal.TargetOption.BridgeManager) + if (targetOption == GlobalProposal.TargetOption.BridgeManager) { return _config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + } - if (targetOption == GlobalProposal.TargetOption.GatewayContract) + if (targetOption == GlobalProposal.TargetOption.GatewayContract) { return _config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + } return address(0); } - function _verifyRoninProposalGasAmount( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - uint256[] memory gasAmounts - ) internal { + function _verifyRoninProposalGasAmount(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) internal { _config.switchTo(DefaultNetwork.RoninMainnet.key()); address roninBridgeManager = _config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); @@ -95,12 +96,7 @@ contract BridgeMigration is BaseMigration { vm.revertTo(snapshotId); } - function _verifyMainchainProposalGasAmount( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - uint256[] memory gasAmounts - ) internal { + function _verifyMainchainProposalGasAmount(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) internal { _config.createFork(Network.EthMainnet.key()); _config.switchTo(Network.EthMainnet.key()); @@ -139,4 +135,4 @@ contract BridgeMigration is BaseMigration { } } } -} \ No newline at end of file +} diff --git a/script/Migration.s.sol b/script/Migration.s.sol index fb3784d6..bdbfa5aa 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -59,7 +59,7 @@ contract Migration is BaseMigrationV2, Utils { // Mainchain Gateway V3 param.mainchainGatewayV3.roleSetter = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; param.mainchainGatewayV3.roninChainId = 2021; - param.mainchainGatewayV3.numerator = 4 ; + param.mainchainGatewayV3.numerator = 4; param.mainchainGatewayV3.highTierVWNumerator = 7; param.mainchainGatewayV3.denominator = 10; diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index 3527832d..5fec45ae 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -26,13 +26,9 @@ abstract contract Factory__MapTokensMainchain is BridgeMigration { super.setUp(); _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress( - _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key() - ); - _mainchainBridgeManager = _config.getAddress( - _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), - Contract.MainchainBridgeManager.key() - ); + _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = + _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainBridgeManager.key()); _governor = _initCaller(); } @@ -77,8 +73,7 @@ abstract contract Factory__MapTokensMainchain is BridgeMigration { // uint256[][4] calldata _thresholds // ) - bytes memory innerData = - abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index 121e73fe..346ab46a 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -75,8 +75,7 @@ abstract contract Factory__MapTokensRoninchain is BridgeMigration { // uint256[] calldata chainIds, // TokenStandard[] calldata _standards // ) - bytes memory innerData = - abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); targets[0] = _roninGatewayV3; @@ -97,8 +96,7 @@ abstract contract Factory__MapTokensRoninchain is BridgeMigration { minThresholds[i] = tokenInfos[i].minThreshold; } - innerData = - abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); + innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); targets[1] = _roninGatewayV3; diff --git a/script/libraries/LibArray.sol b/script/libraries/LibArray.sol index d9630afa..afd37758 100644 --- a/script/libraries/LibArray.sol +++ b/script/libraries/LibArray.sol @@ -59,9 +59,9 @@ library LibArray { let dataElementLocation := add(data, 0x20) // Iterate until the bound is not met. - for { let end := add(dataElementLocation, mul(len, 0x20)) } lt(dataElementLocation, end) { - dataElementLocation := add(dataElementLocation, 0x20) - } { result := add(result, mload(dataElementLocation)) } + for { let end := add(dataElementLocation, mul(len, 0x20)) } lt(dataElementLocation, end) { dataElementLocation := add(dataElementLocation, 0x20) } { + result := add(result, mload(dataElementLocation)) + } } } @@ -105,11 +105,7 @@ library LibArray { * @notice This function modify `self` and `values` * @return sorted The sorted array. */ - function inlineSortByValue(uint256[] memory self, uint256[] memory values) - internal - pure - returns (uint256[] memory sorted) - { + function inlineSortByValue(uint256[] memory self, uint256[] memory values) internal pure returns (uint256[] memory sorted) { return inlineQuickSortByValue(self, values); } @@ -120,11 +116,7 @@ library LibArray { * @notice This function modify `self` and `values` * @return sorted The sorted array. */ - function inlineQuickSortByValue(uint256[] memory self, uint256[] memory values) - internal - pure - returns (uint256[] memory sorted) - { + function inlineQuickSortByValue(uint256[] memory self, uint256[] memory values) internal pure returns (uint256[] memory sorted) { uint256 length = self.length; if (length != values.length) revert LengthMismatch(); unchecked { @@ -144,10 +136,7 @@ library LibArray { * @param right The right index of the subarray to be sorted. * @notice This function modify `arr` and `values` */ - function inlineQuickSortByValue(uint256[] memory arr, uint256[] memory values, int256 left, int256 right) - private - pure - { + function inlineQuickSortByValue(uint256[] memory arr, uint256[] memory values, int256 left, int256 right) private pure { unchecked { if (left == right) return; int256 i = left; diff --git a/script/libraries/MapTokenInfo.sol b/script/libraries/MapTokenInfo.sol index b1e0463c..fc7edbf6 100644 --- a/script/libraries/MapTokenInfo.sol +++ b/script/libraries/MapTokenInfo.sol @@ -4,10 +4,8 @@ pragma solidity ^0.8.19; struct MapTokenInfo { address roninToken; address mainchainToken; - // Config on mainchain uint256 minThreshold; - // Config on ronin chain uint256 highTierThreshold; uint256 lockedThreshold; diff --git a/src/extensions/GatewayV3.sol b/src/extensions/GatewayV3.sol index b76c96c2..43c55b9e 100644 --- a/src/extensions/GatewayV3.sol +++ b/src/extensions/GatewayV3.sol @@ -5,7 +5,7 @@ import "@openzeppelin/contracts/security/Pausable.sol"; import "../interfaces/IQuorum.sol"; import "./collections/HasProxyAdmin.sol"; -abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { +abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { uint256 internal _num; uint256 internal _denom; @@ -77,11 +77,7 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { * Emits the `ThresholdUpdated` event. * */ - function _setThreshold(uint256 _numerator, uint256 _denominator) - internal - virtual - returns (uint256 _previousNum, uint256 _previousDenom) - { + function _setThreshold(uint256 _numerator, uint256 _denominator) internal virtual returns (uint256 _previousNum, uint256 _previousDenom) { if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig); _previousNum = _num; _previousDenom = _denom; diff --git a/src/extensions/MinimumWithdrawal.sol b/src/extensions/MinimumWithdrawal.sol index 9b0cc4dd..acf49592 100644 --- a/src/extensions/MinimumWithdrawal.sol +++ b/src/extensions/MinimumWithdrawal.sol @@ -47,7 +47,7 @@ abstract contract MinimumWithdrawal is HasProxyAdmin { function _setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual { if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { minimumThreshold[_tokens[_i]] = _thresholds[_i]; unchecked { diff --git a/src/extensions/RONTransferHelper.sol b/src/extensions/RONTransferHelper.sol index 5fc77b24..95fe234a 100644 --- a/src/extensions/RONTransferHelper.sol +++ b/src/extensions/RONTransferHelper.sol @@ -40,17 +40,13 @@ abstract contract RONTransferHelper { * */ function _unsafeSendRON(address payable recipient, uint256 amount) internal returns (bool success) { - (success, ) = recipient.call{ value: amount }(""); + (success,) = recipient.call{ value: amount }(""); } /** * @dev Same purpose with {_unsafeSendRONLimitGas(address,uin256)} but containing gas limit stipend forwarded in the call. */ - function _unsafeSendRONLimitGas( - address payable recipient, - uint256 amount, - uint256 gas - ) internal returns (bool success) { - (success, ) = recipient.call{ value: amount, gas: gas }(""); + function _unsafeSendRONLimitGas(address payable recipient, uint256 amount, uint256 gas) internal returns (bool success) { + (success,) = recipient.call{ value: amount, gas: gas }(""); } } diff --git a/src/extensions/TransparentUpgradeableProxyV2.sol b/src/extensions/TransparentUpgradeableProxyV2.sol index 96963683..af851ca3 100644 --- a/src/extensions/TransparentUpgradeableProxyV2.sol +++ b/src/extensions/TransparentUpgradeableProxyV2.sol @@ -4,11 +4,7 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; contract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy { - constructor( - address _logic, - address admin_, - bytes memory _data - ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {} + constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { } /** * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. @@ -27,12 +23,8 @@ contract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy { let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0) returndatacopy(0, 0, returndatasize()) switch _result - case 0 { - revert(0, returndatasize()) - } - default { - return(0, returndatasize()) - } + case 0 { revert(0, returndatasize()) } + default { return(0, returndatasize()) } } } } diff --git a/src/extensions/WithdrawalLimitation.sol b/src/extensions/WithdrawalLimitation.sol index dc95c86f..586af812 100644 --- a/src/extensions/WithdrawalLimitation.sol +++ b/src/extensions/WithdrawalLimitation.sol @@ -9,11 +9,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { /// @dev Emitted when the high-tier vote weight threshold is updated event HighTierVoteWeightThresholdUpdated( - uint256 indexed nonce, - uint256 indexed numerator, - uint256 indexed denominator, - uint256 previousNumerator, - uint256 previousDenominator + uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator ); /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds); @@ -56,10 +52,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * - The high-tier vote weight threshold must equal to or larger than the normal threshold. * */ - function setThreshold( - uint256 _numerator, - uint256 _denominator - ) external virtual override onlyAdmin returns (uint256 _previousNum, uint256 _previousDenom) { + function setThreshold(uint256 _numerator, uint256 _denominator) external virtual override onlyAdmin returns (uint256 _previousNum, uint256 _previousDenom) { (_previousNum, _previousDenom) = _setThreshold(_numerator, _denominator); _verifyThresholds(); } @@ -106,10 +99,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `HighTierThresholdsUpdated` event. * */ - function setHighTierThresholds( - address[] calldata _tokens, - uint256[] calldata _thresholds - ) external virtual onlyAdmin { + function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setHighTierThresholds(_tokens, _thresholds); } @@ -139,10 +129,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `UnlockFeePercentagesUpdated` event. * */ - function setUnlockFeePercentages( - address[] calldata _tokens, - uint256[] calldata _percentages - ) external virtual onlyAdmin { + function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setUnlockFeePercentages(_tokens, _percentages); } @@ -175,10 +162,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `HighTierVoteWeightThresholdUpdated` event. * */ - function _setHighTierVoteWeightThreshold( - uint256 _numerator, - uint256 _denominator - ) internal returns (uint256 _previousNum, uint256 _previousDenom) { + function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) { if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig); _previousNum = _highTierVWNum; @@ -203,7 +187,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual { if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { highTierThreshold[_tokens[_i]] = _thresholds[_i]; unchecked { @@ -225,7 +209,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual { if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { lockedThreshold[_tokens[_i]] = _thresholds[_i]; unchecked { @@ -248,7 +232,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual { if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage(); unlockFeePercentages[_tokens[_i]] = _percentages[_i]; @@ -272,7 +256,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual { if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length; ) { + for (uint256 _i; _i < _tokens.length;) { dailyWithdrawalLimit[_tokens[_i]] = _limits[_i]; unchecked { diff --git a/src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol b/src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol index 4512c58f..f729f5ff 100644 --- a/src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol +++ b/src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol @@ -14,11 +14,7 @@ abstract contract BridgeTrackingHelper { * @notice The function checks if each individual ballot count is not greater than the total votes recorded. * @notice It also verifies that the sum of all individual ballot counts does not exceed the total available ballots. */ - function _isValidBridgeTrackingResponse( - uint256 totalBallot, - uint256 totalVote, - uint256[] memory ballots - ) internal pure returns (bool valid) { + function _isValidBridgeTrackingResponse(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) internal pure returns (bool valid) { valid = true; uint256 sumBallot; uint256 length = ballots.length; diff --git a/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol b/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol index 76b347ca..419dead7 100644 --- a/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol +++ b/src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol @@ -28,11 +28,6 @@ abstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGove address creator ) internal { Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator); - _relayVotesBySignatures( - _proposal, - supports_, - signatures, - globalProposal.hash() - ); + _relayVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash()); } } diff --git a/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol b/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol index e7bafea0..2b32fd3a 100644 --- a/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol +++ b/src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol @@ -22,11 +22,6 @@ abstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay { address _creator ) internal { _proposeProposalStruct(_proposal, _creator); - _relayVotesBySignatures( - _proposal, - _supports, - _signatures, - _proposal.hash() - ); + _relayVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash()); } } diff --git a/src/interfaces/IBridgeAdminProposal.sol b/src/interfaces/IBridgeAdminProposal.sol index b6c22fb6..cf0b0149 100644 --- a/src/interfaces/IBridgeAdminProposal.sol +++ b/src/interfaces/IBridgeAdminProposal.sol @@ -15,8 +15,5 @@ interface IBridgeAdminProposal { /** * @dev Returns the synced bridge operator set info. */ - function lastSyncedBridgeOperatorSetInfo() - external - view - returns (BridgeOperatorsBallot.BridgeOperatorSet memory bridgeOperatorSetInfo); + function lastSyncedBridgeOperatorSetInfo() external view returns (BridgeOperatorsBallot.BridgeOperatorSet memory bridgeOperatorSetInfo); } diff --git a/src/interfaces/IMainchainGatewayV3.sol b/src/interfaces/IMainchainGatewayV3.sol index 41b0b87d..8ac6d6d1 100644 --- a/src/interfaces/IMainchainGatewayV3.sol +++ b/src/interfaces/IMainchainGatewayV3.sol @@ -83,10 +83,7 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { * Emits the `Withdrew` once the assets are released. * */ - function submitWithdrawal( - Transfer.Receipt memory _receipt, - Signature[] memory _signatures - ) external returns (bool _locked); + function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked); /** * @dev Approves a specific withdrawal. @@ -109,11 +106,7 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { * Emits the `TokenMapped` event. * */ - function mapTokens( - address[] calldata _mainchainTokens, - address[] calldata _roninTokens, - TokenStandard[] calldata _standards - ) external; + function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external; /** * @dev Maps mainchain tokens to Ronin network and sets thresholds. diff --git a/src/interfaces/IQuorum.sol b/src/interfaces/IQuorum.sol index 29c8f462..97619626 100644 --- a/src/interfaces/IQuorum.sol +++ b/src/interfaces/IQuorum.sol @@ -3,13 +3,7 @@ pragma solidity ^0.8.0; interface IQuorum { /// @dev Emitted when the threshold is updated - event ThresholdUpdated( - uint256 indexed nonce, - uint256 indexed numerator, - uint256 indexed denominator, - uint256 previousNumerator, - uint256 previousDenominator - ); + event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator); /** * @dev Returns the threshold. @@ -35,8 +29,5 @@ interface IQuorum { * Emits the `ThresholdUpdated` event. * */ - function setThreshold( - uint256 _numerator, - uint256 _denominator - ) external returns (uint256 _previousNum, uint256 _previousDenom); + function setThreshold(uint256 _numerator, uint256 _denominator) external returns (uint256 _previousNum, uint256 _previousDenom); } diff --git a/src/interfaces/IRoninGatewayV3.sol b/src/interfaces/IRoninGatewayV3.sol index 7e6d6fa9..c9d8d573 100644 --- a/src/interfaces/IRoninGatewayV3.sol +++ b/src/interfaces/IRoninGatewayV3.sol @@ -32,11 +32,7 @@ interface IRoninGatewayV3 is MappedTokenConsumer { event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, TokenStandard[] standards); /// @dev Emitted when the threshold is updated event TrustedThresholdUpdated( - uint256 indexed nonce, - uint256 indexed numerator, - uint256 indexed denominator, - uint256 previousNumerator, - uint256 previousDenominator + uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator ); /// @dev Emitted when a deposit is voted event DepositVoted(address indexed bridgeOperator, uint256 indexed id, uint256 indexed chainId, bytes32 receiptHash); @@ -49,10 +45,7 @@ interface IRoninGatewayV3 is MappedTokenConsumer { /** * @dev Returns withdrawal signatures. */ - function getWithdrawalSignatures( - uint256 _withdrawalId, - address[] calldata _validators - ) external view returns (bytes[] memory); + function getWithdrawalSignatures(uint256 _withdrawalId, address[] calldata _validators) external view returns (bytes[] memory); /** * @dev Deposits based on the receipt. diff --git a/src/interfaces/bridge/IBridgeManagerCallback.sol b/src/interfaces/bridge/IBridgeManagerCallback.sol index 9d63f0f8..22c0d730 100644 --- a/src/interfaces/bridge/IBridgeManagerCallback.sol +++ b/src/interfaces/bridge/IBridgeManagerCallback.sol @@ -14,11 +14,7 @@ interface IBridgeManagerCallback is IERC165 { * @param addeds The corresponding boolean values indicating whether the operators were added or not. * @return selector The selector of the function being called. */ - function onBridgeOperatorsAdded( - address[] memory bridgeOperators, - uint96[] calldata weights, - bool[] memory addeds - ) external returns (bytes4 selector); + function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector); /** * @dev Handles the event when bridge operators are removed. @@ -26,8 +22,5 @@ interface IBridgeManagerCallback is IERC165 { * @param removeds The corresponding boolean values indicating whether the operators were removed or not. * @return selector The selector of the function being called. */ - function onBridgeOperatorsRemoved( - address[] memory bridgeOperators, - bool[] memory removeds - ) external returns (bytes4 selector); + function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector); } diff --git a/src/interfaces/bridge/IBridgeSlash.sol b/src/interfaces/bridge/IBridgeSlash.sol index fd90f78a..d2d60b1b 100644 --- a/src/interfaces/bridge/IBridgeSlash.sol +++ b/src/interfaces/bridge/IBridgeSlash.sol @@ -12,13 +12,7 @@ interface IBridgeSlash is IBridgeSlashEvents { * @dev Slashes the unavailability of bridge operators during a specific period. * @param period The period to slash the bridge operators for. */ - function execSlashBridgeOperators( - address[] calldata operators, - uint256[] calldata ballots, - uint256 totalBallot, - uint256 totalVote, - uint256 period - ) external; + function execSlashBridgeOperators(address[] calldata operators, uint256[] calldata ballots, uint256 totalBallot, uint256 totalVote, uint256 period) external; /** * @dev Returns the penalize durations for the specified bridge operators. diff --git a/src/interfaces/bridge/IBridgeTracking.sol b/src/interfaces/bridge/IBridgeTracking.sol index 1b86b232..32ee5386 100644 --- a/src/interfaces/bridge/IBridgeTracking.sol +++ b/src/interfaces/bridge/IBridgeTracking.sol @@ -33,10 +33,7 @@ interface IBridgeTracking { /** * @dev Returns the total number of ballots of bridge operators at the specific period `_period`. */ - function getManyTotalBallots( - uint256 _period, - address[] calldata _bridgeOperators - ) external view returns (uint256[] memory); + function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators) external view returns (uint256[] memory); /** * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`. diff --git a/src/interfaces/validator/ICandidateManager.sol b/src/interfaces/validator/ICandidateManager.sol index 2ccb5bee..7d52576e 100644 --- a/src/interfaces/validator/ICandidateManager.sol +++ b/src/interfaces/validator/ICandidateManager.sol @@ -110,12 +110,7 @@ interface ICandidateManager { * Emits the event `CandidateGranted`. * */ - function execApplyValidatorCandidate( - address _admin, - address _consensusAddr, - address payable _treasuryAddr, - uint256 _commissionRate - ) external; + function execApplyValidatorCandidate(address _admin, address _consensusAddr, address payable _treasuryAddr, uint256 _commissionRate) external; /** * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds. diff --git a/src/interfaces/validator/ICoinbaseExecution.sol b/src/interfaces/validator/ICoinbaseExecution.sol index c1946d16..15d92f06 100644 --- a/src/interfaces/validator/ICoinbaseExecution.sol +++ b/src/interfaces/validator/ICoinbaseExecution.sol @@ -19,59 +19,31 @@ interface ICoinbaseExecution is ISlashingExecution { event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators); /// @dev Emitted when the reward of the block producer is deprecated. - event BlockRewardDeprecated( - address indexed coinbaseAddr, - uint256 rewardAmount, - BlockRewardDeprecatedType deprecatedType - ); + event BlockRewardDeprecated(address indexed coinbaseAddr, uint256 rewardAmount, BlockRewardDeprecatedType deprecatedType); /// @dev Emitted when the block reward is submitted. event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount); /// @dev Emitted when the block producer reward is distributed. event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount); /// @dev Emitted when the contract fails when distributing the block producer reward. - event MiningRewardDistributionFailed( - address indexed consensusAddr, - address indexed recipient, - uint256 amount, - uint256 contractBalance - ); + event MiningRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance); /// @dev Emitted when the bridge operator reward is distributed. - event BridgeOperatorRewardDistributed( - address indexed consensusAddr, - address indexed bridgeOperator, - address indexed recipientAddr, - uint256 amount - ); + event BridgeOperatorRewardDistributed(address indexed consensusAddr, address indexed bridgeOperator, address indexed recipientAddr, uint256 amount); /// @dev Emitted when the contract fails when distributing the bridge operator reward. event BridgeOperatorRewardDistributionFailed( - address indexed consensusAddr, - address indexed bridgeOperator, - address indexed recipient, - uint256 amount, - uint256 contractBalance + address indexed consensusAddr, address indexed bridgeOperator, address indexed recipient, uint256 amount, uint256 contractBalance ); /// @dev Emitted when the fast finality reward is distributed. event FastFinalityRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount); /// @dev Emitted when the contract fails when distributing the fast finality reward. - event FastFinalityRewardDistributionFailed( - address indexed consensusAddr, - address indexed recipient, - uint256 amount, - uint256 contractBalance - ); + event FastFinalityRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance); /// @dev Emitted when the amount of RON reward is distributed to staking contract. event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts); /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract. - event StakingRewardDistributionFailed( - uint256 totalAmount, - address[] consensusAddrs, - uint256[] amounts, - uint256 contractBalance - ); + event StakingRewardDistributionFailed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts, uint256 contractBalance); /// @dev Emitted when the epoch is wrapped up. event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding); diff --git a/src/interfaces/validator/IEmergencyExit.sol b/src/interfaces/validator/IEmergencyExit.sol index d6a2cb5e..33c59060 100644 --- a/src/interfaces/validator/IEmergencyExit.sol +++ b/src/interfaces/validator/IEmergencyExit.sol @@ -6,18 +6,9 @@ interface IEmergencyExit { /// @dev Emitted when the fund is locked from an emergency exit request event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount); /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient. - event EmergencyExitLockedFundReleased( - address indexed consensusAddr, - address indexed recipient, - uint256 unlockedAmount - ); + event EmergencyExitLockedFundReleased(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount); /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back. - event EmergencyExitLockedFundReleasingFailed( - address indexed consensusAddr, - address indexed recipient, - uint256 unlockedAmount, - uint256 contractBalance - ); + event EmergencyExitLockedFundReleasingFailed(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount, uint256 contractBalance); /// @dev Emitted when the emergency exit locked amount is updated. event EmergencyExitLockedAmountUpdated(uint256 amount); diff --git a/src/interfaces/validator/IRoninValidatorSet.sol b/src/interfaces/validator/IRoninValidatorSet.sol index 6628bf13..7e7f9f15 100644 --- a/src/interfaces/validator/IRoninValidatorSet.sol +++ b/src/interfaces/validator/IRoninValidatorSet.sol @@ -8,10 +8,4 @@ import "./ICoinbaseExecution.sol"; import "./ISlashingExecution.sol"; import "./IEmergencyExit.sol"; -interface IRoninValidatorSet is - ICandidateManager, - ICommonInfo, - ISlashingExecution, - ICoinbaseExecution, - IEmergencyExit -{} +interface IRoninValidatorSet is ICandidateManager, ICommonInfo, ISlashingExecution, ICoinbaseExecution, IEmergencyExit { } diff --git a/src/interfaces/validator/info-fragments/IJailingInfo.sol b/src/interfaces/validator/info-fragments/IJailingInfo.sol index e838df9c..b9735430 100644 --- a/src/interfaces/validator/info-fragments/IJailingInfo.sol +++ b/src/interfaces/validator/info-fragments/IJailingInfo.sol @@ -11,9 +11,7 @@ interface IJailingInfo { /** * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail. */ - function getJailedTimeLeft( - address _addr - ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_); + function getJailedTimeLeft(address _addr) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_); /** * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block. @@ -23,10 +21,7 @@ interface IJailingInfo { /** * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail. */ - function getJailedTimeLeftAtBlock( - address _addr, - uint256 _blockNum - ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_); + function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_); /** * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period. diff --git a/src/libraries/BridgeOperatorsBallot.sol b/src/libraries/BridgeOperatorsBallot.sol index 347942ad..91499b9f 100644 --- a/src/libraries/BridgeOperatorsBallot.sol +++ b/src/libraries/BridgeOperatorsBallot.sol @@ -17,8 +17,7 @@ library BridgeOperatorsBallot { } // keccak256("BridgeOperatorsBallot(uint256 period,uint256 epoch,address[] operators)"); - bytes32 public constant BRIDGE_OPERATORS_BALLOT_TYPEHASH = - 0xd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a; + bytes32 public constant BRIDGE_OPERATORS_BALLOT_TYPEHASH = 0xd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a; /** * @dev Verifies whether the ballot is valid or not. @@ -32,7 +31,7 @@ library BridgeOperatorsBallot { if (_ballot.operators.length == 0) revert ErrEmptyArray(); address _addr = _ballot.operators[0]; - for (uint _i = 1; _i < _ballot.operators.length; ) { + for (uint _i = 1; _i < _ballot.operators.length;) { if (_addr >= _ballot.operators[_i]) revert ErrInvalidOrderOfBridgeOperator(); _addr = _ballot.operators[_i]; unchecked { diff --git a/src/libraries/GlobalProposal.sol b/src/libraries/GlobalProposal.sol index fafab22d..377f189e 100644 --- a/src/libraries/GlobalProposal.sol +++ b/src/libraries/GlobalProposal.sol @@ -10,11 +10,12 @@ library GlobalProposal { error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber); enum TargetOption { - /* 0 */ BridgeManager, - /* 1 */ GatewayContract, - /* 2 */ BridgeReward, - /* 3 */ BridgeSlash, - /* 4 */ BridgeTracking + BridgeManager, // 0 + GatewayContract, // 1 + BridgeReward, // 2 + BridgeSlash, // 3 + BridgeTracking // 4 + } struct GlobalProposalDetail { diff --git a/src/libraries/LibRequestBatch.sol b/src/libraries/LibRequestBatch.sol index 5b5bb80a..3d1667f1 100644 --- a/src/libraries/LibRequestBatch.sol +++ b/src/libraries/LibRequestBatch.sol @@ -15,11 +15,7 @@ library LibRequestBatch { uint256 length = req.info.ids.length; for (uint256 i; i < length; i++) { mainchainGateway.requestDepositFor( - Transfer.Request({ - recipientAddr: req.recipient, - tokenAddr: req.tokenAddr, - info: TokenInfo({ erc: req.info.erc, id: req.info.ids[i], quantity: 0 }) - }) + Transfer.Request({ recipientAddr: req.recipient, tokenAddr: req.tokenAddr, info: TokenInfo({ erc: req.info.erc, id: req.info.ids[i], quantity: 0 }) }) ); } } diff --git a/src/libraries/LibTokenInfo.sol b/src/libraries/LibTokenInfo.sol index 38f126f0..fd0c96d0 100644 --- a/src/libraries/LibTokenInfo.sol +++ b/src/libraries/LibTokenInfo.sol @@ -126,8 +126,7 @@ library LibTokenInfo { bool success; bytes memory data; if (self.erc == TokenStandard.ERC20) { - (success, data) = - token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity)); + (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity)); success = success && (data.length == 0 || abi.decode(data, (bool))); } else if (self.erc == TokenStandard.ERC721) { success = _tryTransferFromERC721(token, from, address(this), self.id); @@ -265,10 +264,7 @@ library LibTokenInfo { * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555. * @return success Returns `false` if both transfer and mint are failed. */ - function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) - private - returns (bool success) - { + function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) { success = _tryTransferFromERC1155(token, address(this), to, id, amount); if (!success) { return _tryMintERC1155(token, to, id, amount); @@ -278,10 +274,7 @@ library LibTokenInfo { /** * @dev Transfers ERC1155 token and returns the result. */ - function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) - private - returns (bool success) - { + function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) { (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0)))); } diff --git a/src/libraries/LibTokenInfoBatch.sol b/src/libraries/LibTokenInfoBatch.sol index b52a175a..b834c406 100644 --- a/src/libraries/LibTokenInfoBatch.sol +++ b/src/libraries/LibTokenInfoBatch.sol @@ -41,10 +41,7 @@ library LibTokenInfoBatch { /** * @dev Validates the token info. */ - function validate(TokenInfoBatch memory self, function (TokenInfoBatch memory) pure returns (bool) fCheck) - internal - pure - { + function validate(TokenInfoBatch memory self, function (TokenInfoBatch memory) pure returns (bool) fCheck) internal pure { if (!fCheck(self)) { revert ErrInvalidInfoWithStandard(self.erc); } @@ -60,9 +57,9 @@ library LibTokenInfoBatch { uint256 length = self.ids.length; if ( - !(self.erc == TokenStandard.ERC1155 // Check ERC1155 - && self.ids.length != 0 // Info must contain at least one id in the array - && length == self.quantities.length) // Info must have same length for each pair id and quantity + // Check ERC1155 + // Info must contain at least one id in the array + !(self.erc == TokenStandard.ERC1155 && self.ids.length != 0 && length == self.quantities.length) // Info must have same length for each pair id and quantity ) { return false; } @@ -126,10 +123,7 @@ library LibTokenInfoBatch { * If there is fail when transfer one `id`, the loop will break early to save gas. * Consumer of this method should revert the transaction if receive `false` success status. */ - function _tryTransferFromERC721Loop(address token, address from, address to, uint256[] memory ids) - private - returns (bool success) - { + function _tryTransferFromERC721Loop(address token, address from, address to, uint256[] memory ids) private returns (bool success) { for (uint256 i; i < ids.length; ++i) { if (!_tryTransferFromERC721(token, from, to, ids[i])) { return false; // Break early if send fails @@ -150,13 +144,7 @@ library LibTokenInfoBatch { /** * @dev Transfers ERC1155 token in and returns the result. */ - function _tryTransferERC1155Batch( - address token, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts - ) private returns (bool success) { + function _tryTransferERC1155Batch(address token, address from, address to, uint256[] memory ids, uint256[] memory amounts) private returns (bool success) { (success,) = token.call(abi.encodeCall(IERC1155.safeBatchTransferFrom, (from, to, ids, amounts, new bytes(0)))); } } diff --git a/src/mainchain/MainchainGatewayBatcher.sol b/src/mainchain/MainchainGatewayBatcher.sol index 2d02a006..4022d2f7 100644 --- a/src/mainchain/MainchainGatewayBatcher.sol +++ b/src/mainchain/MainchainGatewayBatcher.sol @@ -73,19 +73,11 @@ contract MainchainGatewayBatcher is Initializable, ERC1155Holder { ) { if (erc == TokenStandard.ERC721) { - return ( - LibTokenInfoBatch.checkERC721Batch, - LibTokenInfoBatch.tryHandleAssetInERC721, - LibRequestBatch.forwardRequestToGatewayERC721 - ); + return (LibTokenInfoBatch.checkERC721Batch, LibTokenInfoBatch.tryHandleAssetInERC721, LibRequestBatch.forwardRequestToGatewayERC721); } if (erc == TokenStandard.ERC1155) { - return ( - LibTokenInfoBatch.checkERC1155Batch, - LibTokenInfoBatch.tryHandleAssetInERC1155, - LibRequestBatch.forwardRequestToGatewayERC1155 - ); + return (LibTokenInfoBatch.checkERC1155Batch, LibTokenInfoBatch.tryHandleAssetInERC1155, LibRequestBatch.forwardRequestToGatewayERC1155); } revert ErrUnsupportedStandard(); diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index ac1912ce..5045273b 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -12,7 +12,15 @@ import "../extensions/WithdrawalLimitation.sol"; import "../libraries/Transfer.sol"; import "../interfaces/IMainchainGatewayV3.sol"; -contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessControlEnumerable, ERC1155Holder, IMainchainGatewayV3, HasContracts, IBridgeManagerCallback { +contract MainchainGatewayV3 is + WithdrawalLimitation, + Initializable, + AccessControlEnumerable, + ERC1155Holder, + IMainchainGatewayV3, + HasContracts, + IBridgeManagerCallback +{ using LibTokenInfo for TokenInfo; using Transfer for Transfer.Request; using Transfer for Transfer.Receipt; @@ -509,11 +517,7 @@ contract MainchainGatewayV3 is WithdrawalLimitation, Initializable, AccessContro return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector; } - function supportsInterface(bytes4 interfaceId) - public - view - override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) - { + function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) { return interfaceId == type(IMainchainGatewayV3).interfaceId || super.supportsInterface(interfaceId); } } diff --git a/src/mocks/ronin/MockBridgeReward.sol b/src/mocks/ronin/MockBridgeReward.sol index ef7fc602..87ca3c88 100644 --- a/src/mocks/ronin/MockBridgeReward.sol +++ b/src/mocks/ronin/MockBridgeReward.sol @@ -13,16 +13,7 @@ contract MockBridgeReward is BridgeReward { uint256 period, uint256 slashUntilPeriod ) external pure returns (uint256 reward, bool isSlashed) { - return - _calcRewardAndCheckSlashedStatus( - isValidTrackingResponse, - numBridgeOperators, - rewardPerPeriod, - ballot, - totalBallot, - period, - slashUntilPeriod - ); + return _calcRewardAndCheckSlashedStatus(isValidTrackingResponse, numBridgeOperators, rewardPerPeriod, ballot, totalBallot, period, slashUntilPeriod); } function calcReward( @@ -35,19 +26,11 @@ contract MockBridgeReward is BridgeReward { reward = _calcReward(isValidTrackingResponse, numBridgeOperators, rewardPerPeriod, ballot, totalBallot); } - function isValidBridgeTrackingResponse( - uint256 totalBallot, - uint256 totalVote, - uint256[] memory ballots - ) external pure returns (bool valid) { + function isValidBridgeTrackingResponse(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) external pure returns (bool valid) { return _isValidBridgeTrackingResponse(totalBallot, totalVote, ballots); } - function shouldShareEqually( - uint256 totalBallot, - uint256 totalVote, - uint256[] memory ballots - ) external returns (bool shareEqually) { + function shouldShareEqually(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) external returns (bool shareEqually) { return _shouldShareEqually(totalBallot, totalVote, ballots); } diff --git a/src/mocks/ronin/MockBridgeSlash.sol b/src/mocks/ronin/MockBridgeSlash.sol index 2210b20e..e4c0f0d9 100644 --- a/src/mocks/ronin/MockBridgeSlash.sol +++ b/src/mocks/ronin/MockBridgeSlash.sol @@ -4,11 +4,7 @@ pragma solidity ^0.8.0; import { IBridgeSlash, BridgeSlash } from "../../ronin/gateway/BridgeSlash.sol"; contract MockBridgeSlash is BridgeSlash { - function calcSlashUntilPeriod( - Tier tier, - uint256 period, - uint256 slashUntilPeriod - ) external pure returns (uint256 newSlashUntilPeriod) { + function calcSlashUntilPeriod(Tier tier, uint256 period, uint256 slashUntilPeriod) external pure returns (uint256 newSlashUntilPeriod) { newSlashUntilPeriod = _calcSlashUntilPeriod(tier, period, slashUntilPeriod, _getPenaltyDurations()); } diff --git a/src/mocks/ronin/MockRoninGatewayV3Extended.sol b/src/mocks/ronin/MockRoninGatewayV3Extended.sol index de7c9c9b..e988c854 100644 --- a/src/mocks/ronin/MockRoninGatewayV3Extended.sol +++ b/src/mocks/ronin/MockRoninGatewayV3Extended.sol @@ -7,31 +7,21 @@ contract MockRoninGatewayV3Extended is RoninGatewayV3 { /* * @dev Returns the vote weight for a deposit based on its corressponding hash. */ - function getDepositVoteWeight( - uint256 _chainId, - uint256 _depositId, - bytes32 _hash - ) external view returns (uint256 totalWeight) { + function getDepositVoteWeight(uint256 _chainId, uint256 _depositId, bytes32 _hash) external view returns (uint256 totalWeight) { totalWeight = _getVoteWeight(depositVote[_chainId][_depositId], _hash); } /** * @dev Returns the vote weight for a mainchain withdrew acknowledgement based on its corressponding hash. */ - function getMainchainWithdrewVoteWeight( - uint256 _withdrawalId, - bytes32 _hash - ) external view returns (uint256 totalWeight) { + function getMainchainWithdrewVoteWeight(uint256 _withdrawalId, bytes32 _hash) external view returns (uint256 totalWeight) { totalWeight = _getVoteWeight(mainchainWithdrewVote[_withdrawalId], _hash); } /** * @dev Returns the vote weight for a withdraw stats based on its corressponding hash. */ - function getWithdrawalStatVoteWeight( - uint256 _withdrawalId, - bytes32 _hash - ) external view returns (uint256 totalWeight) { + function getWithdrawalStatVoteWeight(uint256 _withdrawalId, bytes32 _hash) external view returns (uint256 totalWeight) { totalWeight = _getVoteWeight(withdrawalStatVote[_withdrawalId], _hash); } } diff --git a/src/mocks/types/MockTUint256Slot.sol b/src/mocks/types/MockTUint256Slot.sol index 343775db..1be35e20 100644 --- a/src/mocks/types/MockTUint256Slot.sol +++ b/src/mocks/types/MockTUint256Slot.sol @@ -4,8 +4,7 @@ pragma solidity ^0.8.0; import { TUint256Slot } from "../../types/Types.sol"; contract MockTUint256Slot { - TUint256Slot private constant CUSTOM_SLOT_UINT256 = - TUint256Slot.wrap(keccak256(abi.encode(type(MockTUint256Slot).name))); + TUint256Slot private constant CUSTOM_SLOT_UINT256 = TUint256Slot.wrap(keccak256(abi.encode(type(MockTUint256Slot).name))); uint256 private _primitiveUint256; diff --git a/src/ronin/gateway/BridgeSlash.sol b/src/ronin/gateway/BridgeSlash.sol index 62a834b3..74eb0ecf 100644 --- a/src/ronin/gateway/BridgeSlash.sol +++ b/src/ronin/gateway/BridgeSlash.sol @@ -17,14 +17,7 @@ import { ErrLengthMismatch } from "../../utils/CommonErrors.sol"; * @title BridgeSlash * @dev A contract that implements slashing functionality for bridge operators based on their availability. */ -contract BridgeSlash is - IBridgeSlash, - IBridgeManagerCallback, - BridgeTrackingHelper, - IdentityGuard, - Initializable, - HasContracts -{ +contract BridgeSlash is IBridgeSlash, IBridgeManagerCallback, BridgeTrackingHelper, IdentityGuard, Initializable, HasContracts { /// @inheritdoc IBridgeSlash uint256 public constant TIER_1_PENALTY_DURATION = 1; /// @inheritdoc IBridgeSlash @@ -66,12 +59,7 @@ contract BridgeSlash is _disableInitializers(); } - function initialize( - address validatorContract, - address bridgeManagerContract, - address bridgeTrackingContract, - address dposGA - ) external initializer { + function initialize(address validatorContract, address bridgeManagerContract, address bridgeTrackingContract, address dposGA) external initializer { _setContract(ContractType.VALIDATOR, validatorContract); _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract); _setContract(ContractType.BRIDGE_TRACKING, bridgeTrackingContract); @@ -93,7 +81,7 @@ contract BridgeSlash is */ function onBridgeOperatorsAdded( address[] calldata bridgeOperators, - uint96[] calldata /* weights */, + uint96[] calldata, /* weights */ bool[] memory addeds ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { uint256 length = bridgeOperators.length; @@ -105,7 +93,7 @@ contract BridgeSlash is mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos(); uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod(); - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { unchecked { if (addeds[i]) { _bridgeSlashInfos[bridgeOperators[i]].newlyAddedAtPeriod = uint128(currentPeriod); @@ -146,7 +134,7 @@ contract BridgeSlash is address bridgeOperator; Tier tier; - for (uint256 i; i < operators.length; ) { + for (uint256 i; i < operators.length;) { bridgeOperator = operators[i]; status = _bridgeSlashInfos[bridgeOperator]; @@ -185,10 +173,7 @@ contract BridgeSlash is /** * @inheritdoc IBridgeManagerCallback */ - function onBridgeOperatorsRemoved( - address[] calldata, - bool[] calldata - ) external view onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { + function onBridgeOperatorsRemoved(address[] calldata, bool[] calldata) external view onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) { return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector; } @@ -202,14 +187,12 @@ contract BridgeSlash is /** * @inheritdoc IBridgeSlash */ - function getSlashUntilPeriodOf( - address[] calldata bridgeOperators - ) external view returns (uint256[] memory untilPeriods) { + function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory untilPeriods) { uint256 length = bridgeOperators.length; untilPeriods = new uint256[](length); mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos(); - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { untilPeriods[i] = _bridgeSlashInfos[bridgeOperators[i]].slashUntilPeriod; unchecked { ++i; @@ -225,7 +208,7 @@ contract BridgeSlash is addedPeriods = new uint256[](length); mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos(); - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { addedPeriods[i] = _bridgeSlashInfos[bridgeOperators[i]].newlyAddedAtPeriod; unchecked { ++i; @@ -253,10 +236,7 @@ contract BridgeSlash is * @param period The current period. * @return met A boolean indicates that the threshold for removal is met. */ - function _isSlashDurationMetRemovalThreshold( - uint256 slashUntilPeriod, - uint256 period - ) internal pure returns (bool met) { + function _isSlashDurationMetRemovalThreshold(uint256 slashUntilPeriod, uint256 period) internal pure returns (bool met) { met = slashUntilPeriod - (period - 1) >= REMOVE_DURATION_THRESHOLD; } diff --git a/src/ronin/gateway/BridgeTracking.sol b/src/ronin/gateway/BridgeTracking.sol index 7dd21a1f..aeb9f7f9 100644 --- a/src/ronin/gateway/BridgeTracking.sol +++ b/src/ronin/gateway/BridgeTracking.sol @@ -220,9 +220,8 @@ contract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContr uint256 totalBallot_ = totalBallot(lastSyncPeriod); address bridgeSlashContract = getContract(ContractType.BRIDGE_SLASH); - (bool success, bytes memory returnOrRevertData) = bridgeSlashContract.call( - abi.encodeCall(IBridgeSlash.execSlashBridgeOperators, (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod)) - ); + (bool success, bytes memory returnOrRevertData) = + bridgeSlashContract.call(abi.encodeCall(IBridgeSlash.execSlashBridgeOperators, (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod))); if (!success) { emit ExternalCallFailed(bridgeSlashContract, IBridgeSlash.execSlashBridgeOperators.selector, returnOrRevertData); } diff --git a/src/ronin/gateway/PauseEnforcer.sol b/src/ronin/gateway/PauseEnforcer.sol index 28480cdb..7e9b860f 100644 --- a/src/ronin/gateway/PauseEnforcer.sol +++ b/src/ronin/gateway/PauseEnforcer.sol @@ -63,7 +63,7 @@ contract PauseEnforcer is AccessControlEnumerable, Initializable { function initialize(IPauseTarget _target, address _admin, address[] memory _sentries) external initializer { _changeTarget(_target); _setupRole(DEFAULT_ADMIN_ROLE, _admin); - for (uint _i; _i < _sentries.length; ) { + for (uint _i; _i < _sentries.length;) { _grantRole(SENTRY_ROLE, _sentries[_i]); unchecked { diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index b9e85058..a55a992d 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -163,12 +163,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan Ballot.VoteType[] calldata supports_, Signature[] calldata signatures ) external onlyGovernor { - _proposeGlobalProposalStructAndCastVotes({ - globalProposal: globalProposal, - supports_: supports_, - signatures: signatures, - creator: msg.sender - }); + _proposeGlobalProposalStructAndCastVotes({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender }); } /** diff --git a/src/ronin/gateway/RoninBridgeManagerConstructor.sol b/src/ronin/gateway/RoninBridgeManagerConstructor.sol index 0661de6e..12909e34 100644 --- a/src/ronin/gateway/RoninBridgeManagerConstructor.sol +++ b/src/ronin/gateway/RoninBridgeManagerConstructor.sol @@ -38,7 +38,6 @@ contract RoninBridgeManagerConstructor is BridgeManager, GovernanceProposal, Glo __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); } - /** * @dev Internal function to get the chain type of the contract. * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain). diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 7585d5e7..a4aed59c 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -60,7 +60,7 @@ contract RoninGatewayV3 is uint256 internal _trustedNum; uint256 internal _trustedDenom; - constructor () { + constructor() { _disableInitializers(); } @@ -129,10 +129,7 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function getWithdrawalSignatures( - uint256 withdrawalId, - address[] calldata operators - ) external view returns (bytes[] memory _signatures) { + function getWithdrawalSignatures(uint256 withdrawalId, address[] calldata operators) external view returns (bytes[] memory _signatures) { _signatures = new bytes[](operators.length); for (uint256 _i = 0; _i < operators.length;) { _signatures[_i] = _withdrawalSig[withdrawalId][operators[_i]]; @@ -153,11 +150,7 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) - external - onlyBridgeOperator - returns (bool[] memory _executedReceipts) - { + function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external onlyBridgeOperator returns (bool[] memory _executedReceipts) { address governor = msg.sender; uint256 minVoteWeight = minimumVoteWeight(); @@ -192,12 +185,7 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function tryBulkDepositFor(Transfer.Receipt[] calldata receipts) - external - whenNotPaused - onlyBridgeOperator - returns (bool[] memory _executedReceipts) - { + function tryBulkDepositFor(Transfer.Receipt[] calldata receipts) external whenNotPaused onlyBridgeOperator returns (bool[] memory _executedReceipts) { uint length = receipts.length; _executedReceipts = new bool[](length); uint256 minVoteWeight = minimumVoteWeight(); @@ -250,10 +238,7 @@ contract RoninGatewayV3 is /** * @inheritdoc IRoninGatewayV3 */ - function bulkSubmitWithdrawalSignatures( - uint256[] calldata withdrawals, - bytes[] calldata signatures - ) external whenNotPaused onlyBridgeOperator { + function bulkSubmitWithdrawalSignatures(uint256[] calldata withdrawals, bytes[] calldata signatures) external whenNotPaused onlyBridgeOperator { address operator = msg.sender; uint length = withdrawals.length; @@ -420,8 +405,7 @@ contract RoninGatewayV3 is address _mainchainTokenAddr ) internal returns (uint256 _withdrawalId) { _withdrawalId = withdrawalCount++; - Transfer.Receipt memory _receipt = - _request.into_withdrawal_receipt(_requester, _withdrawalId, _mainchainTokenAddr, _chainId); + Transfer.Receipt memory _receipt = _request.into_withdrawal_receipt(_requester, _withdrawalId, _mainchainTokenAddr, _chainId); withdrawal[_withdrawalId] = _receipt; emit WithdrawalRequested(_receipt.hash(), _receipt); } @@ -462,12 +446,8 @@ contract RoninGatewayV3 is /** * @dev Returns the vote weight for a specified hash. */ - function _getVoteWeight( - IsolatedGovernance.Vote storage _v, - bytes32 _hash - ) internal view returns (uint256 _totalWeight) { - (, address[] memory bridgeOperators, uint96[] memory weights) = - IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getFullBridgeOperatorInfos(); + function _getVoteWeight(IsolatedGovernance.Vote storage _v, bytes32 _hash) internal view returns (uint256 _totalWeight) { + (, address[] memory bridgeOperators, uint96[] memory weights) = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getFullBridgeOperatorInfos(); uint256 length = bridgeOperators.length; unchecked { for (uint _i; _i < length; ++_i) { @@ -478,10 +458,7 @@ contract RoninGatewayV3 is } } - function setTrustedThreshold( - uint256 _trustedNumerator, - uint256 _trustedDenominator - ) external virtual onlyAdmin returns (uint256, uint256) { + function setTrustedThreshold(uint256 _trustedNumerator, uint256 _trustedDenominator) external virtual onlyAdmin returns (uint256, uint256) { return _setTrustedThreshold(_trustedNumerator, _trustedDenominator); } @@ -509,9 +486,7 @@ contract RoninGatewayV3 is _trustedNum = _trustedNumerator; _trustedDenom = _trustedDenominator; unchecked { - emit TrustedThresholdUpdated( - nonce++, _trustedNumerator, _trustedDenominator, _previousTrustedNum, _previousTrustedDenom - ); + emit TrustedThresholdUpdated(nonce++, _trustedNumerator, _trustedDenominator, _previousTrustedNum, _previousTrustedDenom); } } @@ -522,11 +497,7 @@ contract RoninGatewayV3 is return (_trustedNum * _totalTrustedWeight + _trustedDenom - 1) / _trustedDenom; } - function supportsInterface(bytes4 interfaceId) - public - view - override(AccessControlEnumerable, ERC1155Receiver) returns (bool) - { + function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, ERC1155Receiver) returns (bool) { return AccessControlEnumerable.supportsInterface(interfaceId) || ERC1155Receiver.supportsInterface(interfaceId); } } diff --git a/src/utils/CommonErrors.sol b/src/utils/CommonErrors.sol index 0aedf12e..ebcfdf8d 100644 --- a/src/utils/CommonErrors.sol +++ b/src/utils/CommonErrors.sol @@ -247,4 +247,4 @@ error ErrInvalidExecutor(); /** * @dev Error of the `caller` to relay is not the specified `executor`. */ -error ErrNonExecutorCannotRelay(address executor, address caller); \ No newline at end of file +error ErrNonExecutorCannotRelay(address executor, address caller); diff --git a/src/utils/ContractType.sol b/src/utils/ContractType.sol index 2fcb32f6..4c763ae3 100644 --- a/src/utils/ContractType.sol +++ b/src/utils/ContractType.sol @@ -2,20 +2,21 @@ pragma solidity ^0.8.0; enum ContractType { - /* 0 */ UNKNOWN, - /* 1 */ PAUSE_ENFORCER, - /* 2 */ BRIDGE, - /* 3 */ BRIDGE_TRACKING, - /* 4 */ GOVERNANCE_ADMIN, - /* 5 */ MAINTENANCE, - /* 6 */ SLASH_INDICATOR, - /* 7 */ STAKING_VESTING, - /* 8 */ VALIDATOR, - /* 9 */ STAKING, - /* 10 */ RONIN_TRUSTED_ORGANIZATION, - /* 11 */ BRIDGE_MANAGER, - /* 12 */ BRIDGE_SLASH, - /* 13 */ BRIDGE_REWARD, - /* 14 */ FAST_FINALITY_TRACKING, - /* 15 */ PROFILE + UNKNOWN, // 0 + PAUSE_ENFORCER, // 1 + BRIDGE, // 2 + BRIDGE_TRACKING, // 3 + GOVERNANCE_ADMIN, // 4 + MAINTENANCE, // 5 + SLASH_INDICATOR, // 6 + STAKING_VESTING, // 7 + VALIDATOR, // 8 + STAKING, // 9 + RONIN_TRUSTED_ORGANIZATION, // 10 + BRIDGE_MANAGER, // 11 + BRIDGE_SLASH, // 12 + BRIDGE_REWARD, // 13 + FAST_FINALITY_TRACKING, // 14 + PROFILE // 15 + } diff --git a/src/utils/IdentityGuard.sol b/src/utils/IdentityGuard.sol index 4edbc32d..c84224b8 100644 --- a/src/utils/IdentityGuard.sol +++ b/src/utils/IdentityGuard.sol @@ -92,9 +92,7 @@ abstract contract IdentityGuard { bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId)); (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams); if (!success) { - (success, returnOrRevertData) = contractAddr.staticcall( - abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)) - ); + (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams))); if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr); } if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr); diff --git a/src/utils/RoleAccess.sol b/src/utils/RoleAccess.sol index a96c8b0f..b7c602ce 100644 --- a/src/utils/RoleAccess.sol +++ b/src/utils/RoleAccess.sol @@ -2,15 +2,16 @@ pragma solidity ^0.8.0; enum RoleAccess { - /* 0 */ UNKNOWN, - /* 1 */ ADMIN, - /* 2 */ COINBASE, - /* 3 */ GOVERNOR, - /* 4 */ CANDIDATE_ADMIN, - /* 5 */ WITHDRAWAL_MIGRATOR, - /* 6 */ __DEPRECATED_BRIDGE_OPERATOR, - /* 7 */ BLOCK_PRODUCER, - /* 8 */ VALIDATOR_CANDIDATE, - /* 9 */ CONSENSUS, - /* 10 */ TREASURY + UNKNOWN, // 0 + ADMIN, // 1 + COINBASE, // 2 + GOVERNOR, // 3 + CANDIDATE_ADMIN, // 4 + WITHDRAWAL_MIGRATOR, // 5 + __DEPRECATED_BRIDGE_OPERATOR, // 6 + BLOCK_PRODUCER, // 7 + VALIDATOR_CANDIDATE, // 8 + CONSENSUS, // 9 + TREASURY // 10 + } diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index edf9b595..c1c0d27a 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -79,6 +79,7 @@ contract MockPoisonERC20 is MockERC20 { contract BaseIntegration_Test is Base_Test { using LibTransfer for LibTransfer.Receipt; + address sender; IGeneralConfig _config; @@ -161,9 +162,7 @@ contract BaseIntegration_Test is Base_Test { _roninMockPoisonERC20 = new MockPoisonERC20("MockPoisonERC20", "MPE2"); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); - _roninProposalUtils = new RoninBridgeAdminUtils( - block.chainid, _param.test.governorPKs, _roninBridgeManager, _param.roninBridgeManager.governors[0] - ); + _roninProposalUtils = new RoninBridgeAdminUtils(block.chainid, _param.test.governorPKs, _roninBridgeManager, _param.roninBridgeManager.governors[0]); _validatorSet = new MockValidatorContract_OnlyTiming_ForHardhatTest(_param.test.numberOfBlocksInEpoch); } @@ -185,13 +184,10 @@ contract BaseIntegration_Test is Base_Test { _mainchainWethUnwrapper = new MainchainWethUnwrapperDeploy().runWithArgs(args); _param = ISharedArgument(LibSharedAddress.CONFIG).sharedArguments(); - _mainchainProposalUtils = new MainchainBridgeAdminUtils( - block.chainid, _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0] - ); + _mainchainProposalUtils = + new MainchainBridgeAdminUtils(block.chainid, _param.test.governorPKs, _mainchainBridgeManager, _param.mainchainBridgeManager.governors[0]); - _mainchainGatewayBatcher = new MainchainGatewayBatcherDeploy().runWithArgs( - abi.encodeCall(MainchainGatewayBatcher.initialize, (_mainchainGatewayV3)) - ); + _mainchainGatewayBatcher = new MainchainGatewayBatcherDeploy().runWithArgs(abi.encodeCall(MainchainGatewayBatcher.initialize, (_mainchainGatewayV3))); } function _initializeRonin() internal { @@ -269,8 +265,7 @@ contract BaseIntegration_Test is Base_Test { } function _roninGatewayV3Initialize() internal { - (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = - _getMainchainAndRoninTokens(); + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; // reserve slot for ERC721Tokens uint256[] memory minimumThreshold = new uint256[](tokenNum); uint256[] memory chainIds = new uint256[](tokenNum); @@ -518,8 +513,7 @@ contract BaseIntegration_Test is Base_Test { } function _mainchainGatewayV3Initialize() internal { - (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = - _getMainchainAndRoninTokens(); + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = _getMainchainAndRoninTokens(); uint256 tokenNum = mainchainTokens.length; uint256[] memory highTierThreshold = new uint256[](tokenNum); uint256[] memory lockedThreshold = new uint256[](tokenNum); diff --git a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol index 8e5c2aa2..57abebd9 100644 --- a/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/update-bridge-operator/updateOperator.RoninBridgeManager.t.sol @@ -26,14 +26,10 @@ contract UpdateOperator_RoninBridgeManager_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: TokenInfo({ - erc: TokenStandard.ERC20, - id: 0, - quantity: 100 - // ids: new uint256[](0), - // quantities: new uint256[](0) - }) + info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) }); + // ids: new uint256[](0), + // quantities: new uint256[](0) for (uint256 i; i < 50; i++) { first50Receipts.push(sampleReceipt); diff --git a/test/bridge/integration/bridge-tracking/EpochE1_VoteIsApprovedInLastEpoch.BridgeTracking.t.sol b/test/bridge/integration/bridge-tracking/EpochE1_VoteIsApprovedInLastEpoch.BridgeTracking.t.sol index c4997634..2d227f36 100644 --- a/test/bridge/integration/bridge-tracking/EpochE1_VoteIsApprovedInLastEpoch.BridgeTracking.t.sol +++ b/test/bridge/integration/bridge-tracking/EpochE1_VoteIsApprovedInLastEpoch.BridgeTracking.t.sol @@ -5,8 +5,7 @@ import { IBridgeTracking } from "@ronin/contracts/interfaces/bridge/IBridgeTrack import { MockGatewayForTracking } from "@ronin/contracts/mocks/MockGatewayForTracking.sol"; import "../BaseIntegration.t.sol"; -import { EpochE2_VoteIsNotApprovedInLastEpoch_BridgeTracking_Test } from - "./EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol"; +import { EpochE2_VoteIsNotApprovedInLastEpoch_BridgeTracking_Test } from "./EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol"; // Epoch e-1 test: Vote is approved in the last epoch of period contract EpochE1_VoteIsApprovedInLastEpoch_BridgeTracking_Test is BaseIntegration_Test { @@ -30,8 +29,7 @@ contract EpochE1_VoteIsApprovedInLastEpoch_BridgeTracking_Test is BaseIntegratio // upgrade ronin gateway v3 _mockRoninGatewayV3 = new MockGatewayForTracking(address(_bridgeTracking)); - bytes memory calldata_ = - abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, address(_mockRoninGatewayV3))); + bytes memory calldata_ = abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, address(_mockRoninGatewayV3))); _roninProposalUtils.functionDelegateCall(address(_bridgeTracking), calldata_); vm.deal(address(_bridgeReward), 10 ether); diff --git a/test/bridge/integration/bridge-tracking/EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol b/test/bridge/integration/bridge-tracking/EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol index 5f487d0d..2b39e6d0 100644 --- a/test/bridge/integration/bridge-tracking/EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol +++ b/test/bridge/integration/bridge-tracking/EpochE2_VoteIsNotApprovedInLastEpoch.BridgeTracking.t.sol @@ -22,8 +22,7 @@ contract EpochE2_VoteIsNotApprovedInLastEpoch_BridgeTracking_Test is BaseIntegra // upgrade ronin gateway v3 _mockRoninGatewayV3 = new MockGatewayForTracking(address(_bridgeTracking)); - bytes memory calldata_ = - abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, address(_mockRoninGatewayV3))); + bytes memory calldata_ = abi.encodeCall(IHasContracts.setContract, (ContractType.BRIDGE, address(_mockRoninGatewayV3))); _roninProposalUtils.functionDelegateCall(address(_bridgeTracking), calldata_); vm.deal(address(_bridgeReward), 10 ether); @@ -102,15 +101,9 @@ contract EpochE2_VoteIsNotApprovedInLastEpoch_BridgeTracking_Test is BaseIntegra uint256 expectedTotalVotes = 1; assertEq(_bridgeTracking.totalVote(lastPeriod), expectedTotalVotes); assertEq(_bridgeTracking.totalBallot(lastPeriod), expectedTotalVotes * 3); - assertEq( - _bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[0]), expectedTotalVotes - ); - assertEq( - _bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[1]), expectedTotalVotes - ); - assertEq( - _bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[2]), expectedTotalVotes - ); + assertEq(_bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[0]), expectedTotalVotes); + assertEq(_bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[1]), expectedTotalVotes); + assertEq(_bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[2]), expectedTotalVotes); assertEq(_bridgeTracking.totalBallotOf(lastPeriod, _param.roninBridgeManager.bridgeOperators[3]), 0); _period = newPeriod; diff --git a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol index 7b6b1d36..7643cc7b 100644 --- a/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol +++ b/test/bridge/integration/mainchain-gateway/submit-withdrawal/submitWithdrawal.MainchainGatewayV3.erc20.benchmark.t.sol @@ -8,7 +8,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import "../../BaseIntegration.t.sol"; -contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegration_Test{ +contract SubmitWithdrawal_MainchainGatewayV3_Native_Benchmark_Test is BaseIntegration_Test { using Transfer for Transfer.Receipt; Transfer.Receipt _withdrawalReceipt; diff --git a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol index 4c795f50..8df9d14d 100644 --- a/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol +++ b/test/bridge/integration/pause-enforcer/emergencyAction.PauseEnforcer.t.sol @@ -30,14 +30,10 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: TokenInfo({ - erc: TokenStandard.ERC20, - id: 0, - quantity: 100 - // ids: new uint256[](0), - // quantities: new uint256[](0) - }) + info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) }); + // ids: new uint256[](0), + // quantities: new uint256[](0) vm.expectRevert("Pausable: paused"); @@ -73,17 +69,12 @@ contract EmergencyAction_PauseEnforcer_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: TokenInfo({ - erc: TokenStandard.ERC20, - id: 0, - quantity: 100 - // ids: new uint256[](0), - // quantities: new uint256[](0) - }) + info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) }); + // ids: new uint256[](0), + // quantities: new uint256[](0) - uint256 numOperatorsForVoteExecuted = - _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; + uint256 numOperatorsForVoteExecuted = _param.roninBridgeManager.bridgeOperators.length * _param.roninBridgeManager.num / _param.roninBridgeManager.denom; for (uint256 i; i < numOperatorsForVoteExecuted; i++) { vm.prank(_param.roninBridgeManager.bridgeOperators[i]); _roninGatewayV3.depositFor(receipt); diff --git a/test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol b/test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol index 60e7dd9c..b3fe1f9e 100644 --- a/test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol +++ b/test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol @@ -22,8 +22,7 @@ contract SetConfig_PauseEnforcer_Test is BaseIntegration_Test { } function test_sentryEnforcerRole() public { - bool isSentryRole = - _roninPauseEnforcer.hasRole(_roninPauseEnforcer.SENTRY_ROLE(), _param.roninPauseEnforcer.sentries[0]); + bool isSentryRole = _roninPauseEnforcer.hasRole(_roninPauseEnforcer.SENTRY_ROLE(), _param.roninPauseEnforcer.sentries[0]); assertEq(isSentryRole, true); } diff --git a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol index 1cd342d1..5dfc4c90 100644 --- a/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol +++ b/test/bridge/integration/ronin-gateway/depositVote.RoninGatewayV3.t.sol @@ -27,20 +27,15 @@ contract DepositVote_RoninGatewayV3_Test is BaseIntegration_Test { kind: Transfer.Kind.Deposit, ronin: TokenOwner({ addr: makeAddr("recipient"), tokenAddr: address(_roninWeth), chainId: block.chainid }), mainchain: TokenOwner({ addr: makeAddr("requester"), tokenAddr: address(_mainchainWeth), chainId: block.chainid }), - info: TokenInfo({ - erc: TokenStandard.ERC20, - id: 0, - quantity: 100 - // ids: new uint256[](0), - // quantities: new uint256[](0) - }) + info: TokenInfo({ erc: TokenStandard.ERC20, id: 0, quantity: 100 }) }); + // ids: new uint256[](0), + // quantities: new uint256[](0) _depositReceipts.push(receipt); receipt.id = 1; _depositReceipts.push(receipt); - _numOperatorsForVoteExecuted = (_roninBridgeManager.minimumVoteWeight() - 1) / 100 + 1; } diff --git a/test/bridge/unit/concrete/bridge-manager/constructor.t.sol b/test/bridge/unit/concrete/bridge-manager/constructor.t.sol index 16dd066f..ccb6d51b 100644 --- a/test/bridge/unit/concrete/bridge-manager/constructor.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/constructor.t.sol @@ -38,17 +38,10 @@ contract Constructor_BridgeManager_Unit_Concrete_Test is BridgeManager_Unit_Conc } function test_GetFullBridgeOperatorInfos() external { - ( - address[] memory expectingBridgeOperators, - address[] memory expectingGovernors, - uint96[] memory expectingVoteWeights - ) = _getBridgeMembers(); - - ( - address[] memory returnedGovernors, - address[] memory returnedBridgeOperators, - uint96[] memory returnedVoteWeights - ) = _bridgeManager.getFullBridgeOperatorInfos(); + (address[] memory expectingBridgeOperators, address[] memory expectingGovernors, uint96[] memory expectingVoteWeights) = _getBridgeMembers(); + + (address[] memory returnedGovernors, address[] memory returnedBridgeOperators, uint96[] memory returnedVoteWeights) = + _bridgeManager.getFullBridgeOperatorInfos(); _assertBridgeMembers({ comparingOperators: returnedBridgeOperators, diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol index 9514e0fb..76771ee5 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeReward.t.sol @@ -52,7 +52,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils period = _bound(period, 1, type(uint64).max); // Decode the default bridge manager inputs - (address[] memory bridgeOperators, , ) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); + (address[] memory bridgeOperators,,) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); // Generate random numbers for slashUntils and ballots uint256[] memory slashUntils = _createRandomNumbers(r1, bridgeOperators.length, 0, MAX_FUZZ_INPUTS); @@ -73,13 +73,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils if (shouldShareEqually) { _assertCalculateRewardEqually(shouldShareEqually, rewardPerPeriod, totalBallot, bridgeRewardContract, ballots); } else { - _assertCalculateRewardProportionally( - shouldShareEqually, - rewardPerPeriod, - totalBallot, - bridgeRewardContract, - ballots - ); + _assertCalculateRewardProportionally(shouldShareEqually, rewardPerPeriod, totalBallot, bridgeRewardContract, ballots); } // Assert the slashing of bridge operators for the given period _assertSlashBridgeOperators(period, slashUntils, bridgeRewardContract); @@ -95,7 +89,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils MockBridgeReward bridgeRewardContract = MockBridgeReward(payable(_bridgeRewardContract)); // Decode the default bridge manager inputs - (address[] memory bridgeOperators, , ) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); + (address[] memory bridgeOperators,,) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); // Create an empty array for ballots uint256[] memory ballots = new uint256[](bridgeOperators.length); // Calculate the total number of ballots @@ -132,7 +126,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils uint256 actual; uint256 expected; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { console.log("actual", actual); console.log("expected", expected); @@ -170,7 +164,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils uint256 length = ballots.length; uint256 expected = rewardPerPeriod / length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { console.log("actual", actual); console.log("expected", expected); @@ -191,13 +185,9 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils * @param slashUntils The array of slash until periods for bridge operators. * @param bridgeRewardContract The mock bridge reward contract. */ - function _assertSlashBridgeOperators( - uint256 period, - uint256[] memory slashUntils, - MockBridgeReward bridgeRewardContract - ) internal { + function _assertSlashBridgeOperators(uint256 period, uint256[] memory slashUntils, MockBridgeReward bridgeRewardContract) internal { uint256 length = slashUntils.length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { // Check if the bridge operator is slashed for the current period if (period <= slashUntils[i]) { // Assert that the bridge operator is slashed for the current period @@ -215,18 +205,14 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils _validatorContract = address(new MockValidatorContract_OnlyTiming_ForHardhatTest(200)); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - DEFAULT_R1, - DEFAULT_R2, - DEFAULT_R3, - DEFAULT_NUM_BRIDGE_OPERATORS - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); _defaultBridgeManagerInputs = abi.encode(bridgeOperators, governors, voteWeights); _bridgeManagerLogic = address(new MockBridgeManager()); _bridgeManagerContract = address( - new TransparentUpgradeableProxy(_bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) + new TransparentUpgradeableProxy(_bridgeManagerLogic, _admin, abi.encodeCall(MockBridgeManager.initialize, (bridgeOperators, governors, voteWeights))) ); _bridgeTrackingLogic = address(new BridgeTracking()); @@ -235,12 +221,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils _bridgeSlashLogic = address(new MockBridgeSlash()); _bridgeSlashContract = address( new TransparentUpgradeableProxy( - _bridgeSlashLogic, - _admin, - abi.encodeCall( - BridgeSlash.initialize, - (_validatorContract, _bridgeManagerContract, _bridgeTrackingContract, address(0)) - ) + _bridgeSlashLogic, _admin, abi.encodeCall(BridgeSlash.initialize, (_validatorContract, _bridgeManagerContract, _bridgeTrackingContract, address(0))) ) ); @@ -251,14 +232,7 @@ contract BridgeRewardTest is Base_Test, IBridgeRewardEvents, BridgeManagerUtils _admin, abi.encodeCall( BridgeReward.initialize, - ( - _bridgeManagerContract, - _bridgeTrackingContract, - _bridgeSlashContract, - _validatorContract, - address(0), - DEFAULT_REWARD_PER_PERIOD - ) + (_bridgeManagerContract, _bridgeTrackingContract, _bridgeSlashContract, _validatorContract, address(0), DEFAULT_REWARD_PER_PERIOD) ) ) ); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol index 995cb5b1..c3ee142a 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol @@ -61,11 +61,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { IBridgeSlash bridgeSlashContract = IBridgeSlash(_bridgeSlashContract); IBridgeSlash.Tier tier = bridgeSlashContract.getSlashTier(ballot, totalVote); // Calculate the new slash until period using the mock bridge slash contract - uint256 newSlashUntilPeriod = MockBridgeSlash(payable(_bridgeSlashContract)).calcSlashUntilPeriod( - tier, - period, - slashUntilPeriod - ); + uint256 newSlashUntilPeriod = MockBridgeSlash(payable(_bridgeSlashContract)).calcSlashUntilPeriod(tier, period, slashUntilPeriod); // Log the tier and slash period information console.log("tier", "period", "slashUntilPeriod", "newSlashUntilPeriod"); @@ -84,9 +80,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { assertTrue(newSlashUntilPeriod == uint256(slashUntilPeriod) + bridgeSlashContract.TIER_2_PENALTY_DURATION()); // Check if the slash duration meets the removal threshold - if ( - MockBridgeSlash(payable(_bridgeSlashContract)).isSlashDurationMetRemovalThreshold(newSlashUntilPeriod, period) - ) { + if (MockBridgeSlash(payable(_bridgeSlashContract)).isSlashDurationMetRemovalThreshold(newSlashUntilPeriod, period)) { assertTrue(newSlashUntilPeriod - period + 1 >= bridgeSlashContract.REMOVE_DURATION_THRESHOLD()); } } else { @@ -104,13 +98,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { * @param numBridgeOperators The number of bridge operators to add. * @param period The current period. */ - function test_bridgeSlash_recordEvents_onBridgeOperatorsAdded( - uint256 r1, - uint256 r2, - uint256 r3, - uint256 numBridgeOperators, - uint256 period - ) external { + function test_bridgeSlash_recordEvents_onBridgeOperatorsAdded(uint256 r1, uint256 r2, uint256 r3, uint256 numBridgeOperators, uint256 period) external { // Assume the input values are not equal to the default values vm.assume(r1 != DEFAULT_R1 && r2 != DEFAULT_R2 && r3 != DEFAULT_R3); // Bound the period between 1 and the maximum value of uint64 @@ -126,20 +114,15 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { MockBridgeManager(payable(_bridgeManagerContract)).registerCallbacks(registers); // Generate valid inputs for bridge operators - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidAndNonExistingInputs( - _bridgeManagerContract, - r1, - r2, - r3, - numBridgeOperators - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidAndNonExistingInputs(_bridgeManagerContract, r1, r2, r3, numBridgeOperators); _addBridgeOperators(_bridgeManagerContract, _bridgeManagerContract, voteWeights, governors, bridgeOperators); // Retrieve the added periods for the bridge operators uint256[] memory addedPeriods = IBridgeSlash(_bridgeSlashContract).getAddedPeriodOf(bridgeOperators); // Check that the added periods match the current period - for (uint256 i; i < addedPeriods.length; ) { + for (uint256 i; i < addedPeriods.length;) { assertEq(addedPeriods[i], period); unchecked { ++i; @@ -154,12 +137,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { * @param duration The duration of the test. * @param newlyAddedSize The number of newly added operators. */ - function test_ExcludeNewlyAddedOperators_ExecSlashBridgeOperators( - uint256 r1, - uint256 period, - uint256 duration, - uint256 newlyAddedSize - ) external { + function test_ExcludeNewlyAddedOperators_ExecSlashBridgeOperators(uint256 r1, uint256 period, uint256 duration, uint256 newlyAddedSize) external { vm.assume(r1 != 0); vm.assume(r1 != DEFAULT_R1 && r1 != DEFAULT_R2 && r1 != DEFAULT_R3); // Bound the period, duration, and newlyAddedSize values @@ -174,9 +152,9 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { MockBridgeManager(payable(_bridgeManagerContract)).registerCallbacks(registers); // Decode the default bridge manager inputs to retrieve bridge operators - (address[] memory bridgeOperators, , ) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); + (address[] memory bridgeOperators,,) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); - for (uint256 i; i < duration; ) { + for (uint256 i; i < duration;) { // Set the current period in the mock validator contract MockValidatorSet_ForFoundryTest(payable(_validatorContract)).setCurrentPeriod(period); // Generate valid inputs for newly added operators @@ -185,20 +163,11 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { { address[] memory newlyAddedGovernors; uint96[] memory newlyAddedWeights; - (newlyAddedOperators, newlyAddedGovernors, newlyAddedWeights) = getValidInputs( - r1, - ~r1, - r1 << 1, - newlyAddedSize - ); + (newlyAddedOperators, newlyAddedGovernors, newlyAddedWeights) = getValidInputs(r1, ~r1, r1 << 1, newlyAddedSize); // Add the newly added operators using the bridge manager contract vm.prank(_bridgeManagerContract, _bridgeManagerContract); - bool[] memory addeds = IBridgeManager(_bridgeManagerContract).addBridgeOperators( - newlyAddedWeights, - newlyAddedGovernors, - newlyAddedOperators - ); + bool[] memory addeds = IBridgeManager(_bridgeManagerContract).addBridgeOperators(newlyAddedWeights, newlyAddedGovernors, newlyAddedOperators); vm.assume(addeds.sum() == addeds.length); // Retrieve the added periods for the newly added operators newlyAddedAtPeriods = IBridgeSlash(_bridgeSlashContract).getAddedPeriodOf(newlyAddedOperators); @@ -208,20 +177,12 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { uint256[] memory ballots = _createRandomNumbers(r1, bridgeOperators.length + newlyAddedSize, 0, MAX_FUZZ_INPUTS); // Execute slashBridgeOperators for all operators vm.prank(_bridgeTrackingContract, _bridgeTrackingContract); - IBridgeSlash(_bridgeSlashContract).execSlashBridgeOperators( - bridgeOperators.extend(newlyAddedOperators), - ballots, - ballots.sum(), - ballots.sum(), - period - ); + IBridgeSlash(_bridgeSlashContract).execSlashBridgeOperators(bridgeOperators.extend(newlyAddedOperators), ballots, ballots.sum(), ballots.sum(), period); // Check that the slashUntilPeriods and newlyAddedAtPeriods are correctly set uint256 length = newlyAddedAtPeriods.length; - uint256[] memory slashUntilPeriods = IBridgeSlash(_bridgeSlashContract).getSlashUntilPeriodOf( - newlyAddedOperators - ); - for (uint256 j; j < length; ) { + uint256[] memory slashUntilPeriods = IBridgeSlash(_bridgeSlashContract).getSlashUntilPeriodOf(newlyAddedOperators); + for (uint256 j; j < length;) { assertEq(slashUntilPeriods[j], 0); assertEq(newlyAddedAtPeriods[j], period); unchecked { @@ -251,14 +212,14 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { duration = _bound(duration, MIN_PERIOD_DURATION, MAX_PERIOD_DURATION); // Decode the default bridge manager inputs to retrieve bridge operators - (address[] memory bridgeOperators, , ) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); + (address[] memory bridgeOperators,,) = abi.decode(_defaultBridgeManagerInputs, (address[], address[], uint256[])); vm.startPrank(_bridgeTrackingContract, _bridgeTrackingContract); uint256[] memory ballots; uint256 totalBallotForPeriod; IBridgeSlash bridgeSlashContract = IBridgeSlash(_bridgeSlashContract); MockValidatorSet_ForFoundryTest validatorContract = MockValidatorSet_ForFoundryTest(payable(_validatorContract)); - for (uint256 i; i < duration; ) { + for (uint256 i; i < duration;) { // Generate random ballots for bridge operators ballots = _createRandomNumbers(r1, bridgeOperators.length, 0, MAX_FUZZ_INPUTS); totalBallotForPeriod = ballots.sum(); @@ -267,13 +228,7 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { validatorContract.setCurrentPeriod(period); // Execute the `execSlashBridgeOperators` function - bridgeSlashContract.execSlashBridgeOperators( - bridgeOperators, - ballots, - totalBallotForPeriod, - totalBallotForPeriod, - period - ); + bridgeSlashContract.execSlashBridgeOperators(bridgeOperators, ballots, totalBallotForPeriod, totalBallotForPeriod, period); // Generate the next random number for r1 using the keccak256 hash function r1 = uint256(keccak256(abi.encode(r1))); @@ -289,12 +244,8 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { function _setUp() internal virtual { _admin = makeAddr("central-admin"); _validatorContract = address(new MockValidatorSet_ForFoundryTest()); - (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = getValidInputs( - DEFAULT_R1, - DEFAULT_R2, - DEFAULT_R3, - DEFAULT_NUM_BRIDGE_OPERATORS - ); + (address[] memory bridgeOperators, address[] memory governors, uint96[] memory voteWeights) = + getValidInputs(DEFAULT_R1, DEFAULT_R2, DEFAULT_R3, DEFAULT_NUM_BRIDGE_OPERATORS); _defaultBridgeManagerInputs = abi.encode(bridgeOperators, governors, voteWeights); _bridgeManagerLogic = address(new MockBridgeManager()); @@ -306,19 +257,14 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { _gatewayContract = address(new TransparentUpgradeableProxyV2(_gatewayLogic, _admin, "")); _bridgeTrackingLogic = address(new BridgeTracking()); - _bridgeTrackingContract = address( - new TransparentUpgradeableProxyV2(_bridgeTrackingLogic, _bridgeManagerContract, "") - ); + _bridgeTrackingContract = address(new TransparentUpgradeableProxyV2(_bridgeTrackingLogic, _bridgeManagerContract, "")); _bridgeSlashLogic = address(new MockBridgeSlash()); _bridgeSlashContract = address( new TransparentUpgradeableProxyV2( _bridgeSlashLogic, _bridgeManagerContract, - abi.encodeCall( - BridgeSlash.initialize, - (_validatorContract, _bridgeManagerContract, _bridgeTrackingContract, address(0)) - ) + abi.encodeCall(BridgeSlash.initialize, (_validatorContract, _bridgeManagerContract, _bridgeTrackingContract, address(0))) ) ); } diff --git a/test/helpers/LibArrayUtils.t.sol b/test/helpers/LibArrayUtils.t.sol index 8ca5451a..e4442799 100644 --- a/test/helpers/LibArrayUtils.t.sol +++ b/test/helpers/LibArrayUtils.t.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.0; library LibArrayUtils { function sum(bool[] memory arr) internal pure returns (uint256 total) { uint256 length = arr.length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { if (arr[i]) total++; unchecked { ++i; @@ -14,7 +14,7 @@ library LibArrayUtils { function sum(uint256[] memory arr) internal pure returns (uint256 total) { uint256 length = arr.length; - for (uint256 i; i < length; ) { + for (uint256 i; i < length;) { total += arr[i]; unchecked { ++i; @@ -39,7 +39,7 @@ library LibArrayUtils { c[i] = a[i]; } - for (uint j; j < b.length; ) { + for (uint j; j < b.length;) { c[i] = b[j]; ++i; ++j; @@ -54,7 +54,7 @@ library LibArrayUtils { c[i] = a[i]; } - for (uint j; j < b.length; ) { + for (uint j; j < b.length;) { c[i] = b[j]; ++i; ++j; diff --git a/test/helpers/MainchainBridgeAdminUtils.t.sol b/test/helpers/MainchainBridgeAdminUtils.t.sol index e4493fd0..e90fe7a9 100644 --- a/test/helpers/MainchainBridgeAdminUtils.t.sol +++ b/test/helpers/MainchainBridgeAdminUtils.t.sol @@ -8,9 +8,7 @@ contract MainchainBridgeAdminUtils is ProposalUtils { MainchainBridgeManager _contract; address _sender; - constructor(uint256 roninChainId, uint256[] memory signerPKs, MainchainBridgeManager contract_, address sender) - ProposalUtils(roninChainId, signerPKs) - { + constructor(uint256 roninChainId, uint256[] memory signerPKs, MainchainBridgeManager contract_, address sender) ProposalUtils(roninChainId, signerPKs) { _contract = contract_; _sender = sender; } diff --git a/test/helpers/Randomizer.t.sol b/test/helpers/Randomizer.t.sol index af11ba36..9e317c47 100644 --- a/test/helpers/Randomizer.t.sol +++ b/test/helpers/Randomizer.t.sol @@ -11,7 +11,7 @@ abstract contract Randomizer is Base_Test { function _createRandomAddresses(uint256 seed, uint256 amount) internal returns (address[] memory addrs) { addrs = new address[](amount); - for (uint256 i; i < amount; ) { + for (uint256 i; i < amount;) { seed = uint256(keccak256(abi.encode(seed))); addrs[i] = vm.addr(seed); vm.etch(addrs[i], abi.encode()); @@ -23,16 +23,11 @@ abstract contract Randomizer is Base_Test { } } - function _createRandomNumbers( - uint256 seed, - uint256 amount, - uint256 min, - uint256 max - ) internal pure returns (uint256[] memory nums) { + function _createRandomNumbers(uint256 seed, uint256 amount, uint256 min, uint256 max) internal pure returns (uint256[] memory nums) { uint256 r; nums = new uint256[](amount); - for (uint256 i; i < amount; ) { + for (uint256 i; i < amount;) { r = _randomize(seed, min, max); nums[i] = r; seed = r; diff --git a/test/helpers/RoninBridgeAdminUtils.t.sol b/test/helpers/RoninBridgeAdminUtils.t.sol index 98023e16..f8596a0e 100644 --- a/test/helpers/RoninBridgeAdminUtils.t.sol +++ b/test/helpers/RoninBridgeAdminUtils.t.sol @@ -8,9 +8,7 @@ contract RoninBridgeAdminUtils is ProposalUtils { RoninBridgeManager _contract; address _sender; - constructor(uint256 roninChainId, uint256[] memory signerPKs, RoninBridgeManager contract_, address sender) - ProposalUtils(roninChainId, signerPKs) - { + constructor(uint256 roninChainId, uint256[] memory signerPKs, RoninBridgeManager contract_, address sender) ProposalUtils(roninChainId, signerPKs) { _contract = contract_; _sender = sender; } diff --git a/test/mocks/MockBridgeSlash.sol b/test/mocks/MockBridgeSlash.sol index 462aa12f..f605e621 100644 --- a/test/mocks/MockBridgeSlash.sol +++ b/test/mocks/MockBridgeSlash.sol @@ -6,27 +6,21 @@ import { IBridgeSlash } from "@ronin/contracts/interfaces/bridge/IBridgeSlash.so contract MockBridgeSlash is IBridgeSlash { mapping(address => uint256) internal _slashMap; - function MINIMUM_VOTE_THRESHOLD() external view returns (uint256) {} + function MINIMUM_VOTE_THRESHOLD() external view returns (uint256) { } - function REMOVE_DURATION_THRESHOLD() external view returns (uint256) {} + function REMOVE_DURATION_THRESHOLD() external view returns (uint256) { } - function TIER_1_PENALTY_DURATION() external view returns (uint256) {} + function TIER_1_PENALTY_DURATION() external view returns (uint256) { } - function TIER_2_PENALTY_DURATION() external view returns (uint256) {} + function TIER_2_PENALTY_DURATION() external view returns (uint256) { } - function execSlashBridgeOperators( - address[] calldata operators, - uint256[] calldata ballots, - uint256 totalBallot, - uint256 totalVote, - uint256 period - ) external {} + function execSlashBridgeOperators(address[] calldata operators, uint256[] calldata ballots, uint256 totalBallot, uint256 totalVote, uint256 period) external { } - function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods) {} + function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods) { } - function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations) {} + function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations) { } - function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier) {} + function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier) { } function getSlashUntilPeriodOf(address[] calldata operators) external view returns (uint256[] memory untilPeriods) { untilPeriods = new uint256[](operators.length); diff --git a/test/mocks/MockBridgeTracking.sol b/test/mocks/MockBridgeTracking.sol index e279d409..95a76cc7 100644 --- a/test/mocks/MockBridgeTracking.sol +++ b/test/mocks/MockBridgeTracking.sol @@ -13,12 +13,7 @@ contract MockBridgeTracking is IBridgeTracking { // Mapping from period number => period tracking mapping(uint256 => PeriodTracking) _tracks; - function cheat_setPeriodTracking( - uint256 period, - address[] memory operators, - uint256[] calldata ballots, - uint256 totalVote_ - ) external { + function cheat_setPeriodTracking(uint256 period, address[] memory operators, uint256[] calldata ballots, uint256 totalVote_) external { require(operators.length == ballots.length, "mismatch length"); PeriodTracking storage _sTrack = _tracks[period]; _sTrack.operators = operators; @@ -39,10 +34,7 @@ contract MockBridgeTracking is IBridgeTracking { } } - function getManyTotalBallots( - uint256 period, - address[] calldata operators - ) external view returns (uint256[] memory ballots_) { + function getManyTotalBallots(uint256 period, address[] calldata operators) external view returns (uint256[] memory ballots_) { ballots_ = new uint256[](operators.length); PeriodTracking storage _sTrack = _tracks[period]; for (uint i; i < operators.length; i++) { @@ -54,11 +46,11 @@ contract MockBridgeTracking is IBridgeTracking { return _ballotOf(_tracks[period], operator); } - function handleVoteApproved(VoteKind _kind, uint256 _requestId) external {} + function handleVoteApproved(VoteKind _kind, uint256 _requestId) external { } - function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external {} + function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external { } - function startedAtBlock() external view returns (uint256) {} + function startedAtBlock() external view returns (uint256) { } function _ballotOf(PeriodTracking storage _sTrack, address operator) private view returns (uint256) { return _sTrack.ballotMap[operator]; From 10acfc9a5e59d4752da6e18d5c0aa2b63ace720a Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 11 Apr 2024 15:46:48 +0700 Subject: [PATCH 158/305] chore: clone ronin gateway artifact --- .../ronin-testnet/RoninGatewayV3Proxy.json | 332 ++++++++++++++++++ 1 file changed, 332 insertions(+) create mode 100644 deployments/ronin-testnet/RoninGatewayV3Proxy.json diff --git a/deployments/ronin-testnet/RoninGatewayV3Proxy.json b/deployments/ronin-testnet/RoninGatewayV3Proxy.json new file mode 100644 index 00000000..aac5e473 --- /dev/null +++ b/deployments/ronin-testnet/RoninGatewayV3Proxy.json @@ -0,0 +1,332 @@ +{ + "address": "0xcee681c9108c42c710c6a8a949307d5f13c9f3ca", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "functionDelegateCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "receipt": { + "to": null, + "from": "0x0F68eDBE14C8f68481771016d7E2871d6a35DE11", + "contractAddress": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "transactionIndex": 8, + "gasUsed": "1187047", + "logsBloom": "0x40200004000000000000000000000000400000000000000000200000000400000000080000002000800000000000000000010000000000000000000000080400040000020000000000000000000002000000000000000000000400000000080000000000020000000000000000000800000040800000000000000000000000000000000000000000008000001000000000000000000000000008000000800000000000000000001000010000000000410200000000000000001000000000000041080020000000000000000000000000001000000400000108000800400020000000000000000000000001000080000000000004800000008000004000000000", + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb", + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "logs": [ + { + "transactionIndex": 8, + "blockNumber": 14765762, + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "address": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000075d23c8830bf28e5b88340638efc0f36e026b8a0" + ], + "data": "0x", + "logIndex": 15, + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb" + }, + { + "transactionIndex": 8, + "blockNumber": 14765762, + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "address": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000ed4a9f48a62fb6fdcfb45bb00c9f61d1a436e58c", + "0x0000000000000000000000000f68edbe14c8f68481771016d7e2871d6a35de11" + ], + "data": "0x", + "logIndex": 16, + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb" + }, + { + "transactionIndex": 8, + "blockNumber": 14765762, + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "address": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "topics": [ + "0xef40dc07567635f84f5edbd2f8dbc16b40d9d282dd8e7e6f4ff58236b6836169" + ], + "data": "0x0000000000000000000000007f13232bdc3a010c3f749a1c25bf99f1c053ce70", + "logIndex": 17, + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb" + }, + { + "transactionIndex": 8, + "blockNumber": 14765762, + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "address": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000046", + "0x0000000000000000000000000000000000000000000000000000000000000064" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 18, + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb" + }, + { + "transactionIndex": 8, + "blockNumber": 14765762, + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "address": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "topics": [ + "0x2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c99a6a985ed2cac1ef41640596c5a5f9f4e19ef5000000000000000000000000a8754b9fa15fc18bb59458815510e40a12cd201400000000000000000000000097a9107c1793bc407d6f527b77e7fff4d812bece0000000000000000000000000b7007c13325c48911f73a2dad5fa5dcbf808adc0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000cc8fa225d80b9c7d42f96e9570156c65d6caaa25000000000000000000000000bb0e17ef65f82ab018d8edd776e8dd940327b28b000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 19, + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb" + }, + { + "transactionIndex": 8, + "blockNumber": 14765762, + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "address": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "topics": [ + "0x6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c99a6a985ed2cac1ef41640596c5a5f9f4e19ef5000000000000000000000000a8754b9fa15fc18bb59458815510e40a12cd201400000000000000000000000097a9107c1793bc407d6f527b77e7fff4d812bece0000000000000000000000000b7007c13325c48911f73a2dad5fa5dcbf808adc0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000000ab300000000000000000000000000000000000000000000000009da6d3cfe8700000000000000000000000000000000000000000000000000000000000000989680", + "logIndex": 20, + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb" + }, + { + "transactionIndex": 8, + "blockNumber": 14765762, + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "address": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x384495a48d92b97cd9b9d199c73ed783dd1aa0076a6ebcf9156ca7fef7d2cc40", + "0x000000000000000000000000ae8db4d9d3067a33a8241e415e65f0c69cfbb8e1", + "0x0000000000000000000000000f68edbe14c8f68481771016d7e2871d6a35de11" + ], + "data": "0x", + "logIndex": 21, + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb" + }, + { + "transactionIndex": 8, + "blockNumber": 14765762, + "transactionHash": "0xb6cb6f8b5f2414589d26802c66c2d84c91ae0927be205512dff75080385156a3", + "address": "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084390b8cf3e612e8c80d9ea2e92bcd029151404a", + "logIndex": 22, + "blockHash": "0x918662e14b538e4abaae71051f02d7b22b7332f5cdc59f608331e4bebb52bffb" + } + ], + "blockNumber": 14765762, + "cumulativeGasUsed": "2446859", + "status": 1, + "byzantium": true + }, + "args": [ + "0x75d23C8830BF28E5b88340638efC0f36e026B8a0", + "0x84390B8CF3E612e8c80D9EA2E92bcd029151404a", + "0xe22fe336000000000000000000000000ed4a9f48a62fb6fdcfb45bb00c9f61d1a436e58c0000000000000000000000007f13232bdc3a010c3f749a1c25bf99f1c053ce70000000000000000000000000000000000000000000000000000000000000004600000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ae8db4d9d3067a33a8241e415e65f0c69cfbb8e1000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c99a6a985ed2cac1ef41640596c5a5f9f4e19ef5000000000000000000000000a8754b9fa15fc18bb59458815510e40a12cd201400000000000000000000000097a9107c1793bc407d6f527b77e7fff4d812bece0000000000000000000000000b7007c13325c48911f73a2dad5fa5dcbf808adc0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000cc8fa225d80b9c7d42f96e9570156c65d6caaa25000000000000000000000000bb0e17ef65f82ab018d8edd776e8dd940327b28b000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000000ab300000000000000000000000000000000000000000000000009da6d3cfe870000000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "numDeployments": 2, + "solcInputHash": "267ddc12ed25de7b99c302796e5ae6c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"functionDelegateCall(bytes)\":{\"notice\":\"The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/v0.8/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/v0.8/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * @notice The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xdf52e28697a1af7d7e176d35df4cfa2eee79a19eb74df6eac7704953d3583449\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011353803806200113583398101604081905262000026916200051f565b82828282816200005860017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005ff565b600080516020620010ee8339815191521462000078576200007862000625565b6200008682826000620000ed565b50620000b6905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005ff565b600080516020620010ce83398151915214620000d657620000d662000625565b620000e1826200012a565b5050505050506200068e565b620000f88362000185565b600082511180620001065750805b156200012557620001238383620001c760201b620002dd1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f62000155620001f6565b604080516001600160a01b03928316815291841660208301520160405180910390a162000182816200022f565b50565b6200019081620002e4565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001ef83836040518060600160405280602781526020016200110e6027913962000387565b9392505050565b600062000220600080516020620010ce83398151915260001b6200046d60201b620002851760201c565b546001600160a01b0316919050565b6001600160a01b0381166200029a5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002c3600080516020620010ce83398151915260001b6200046d60201b620002851760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002fa816200047060201b620003091760201c565b6200035e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840162000291565b80620002c3600080516020620010ee83398151915260001b6200046d60201b620002851760201c565b60606001600160a01b0384163b620003f15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840162000291565b600080856001600160a01b0316856040516200040e91906200063b565b600060405180830381855af49150503d80600081146200044b576040519150601f19603f3d011682016040523d82523d6000602084013e62000450565b606091505b509092509050620004638282866200047f565b9695505050505050565b90565b6001600160a01b03163b151590565b6060831562000490575081620001ef565b825115620004a15782518084602001fd5b8160405162461bcd60e51b815260040162000291919062000659565b80516001600160a01b0381168114620004d557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200050d578181015183820152602001620004f3565b83811115620001235750506000910152565b6000806000606084860312156200053557600080fd5b6200054084620004bd565b92506200055060208501620004bd565b60408501519092506001600160401b03808211156200056e57600080fd5b818601915086601f8301126200058357600080fd5b815181811115620005985762000598620004da565b604051601f8201601f19908116603f01168101908382118183101715620005c357620005c3620004da565b81604052828152896020848701011115620005dd57600080fd5b620005f0836020830160208801620004f0565b80955050505050509250925092565b6000828210156200062057634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b600082516200064f818460208701620004f0565b9190910192915050565b60208152600082518060208401526200067a816040850160208701620004f0565b601f01601f19169190910160400192915050565b610a30806200069e6000396000f3fe6080604052600436106100695760003560e01c80635c60da1b116100435780635c60da1b146100c65780638f283970146100f7578063f851a4401461011757610078565b80633659cfe6146100805780634bb5274a146100a05780634f1ef286146100b357610078565b366100785761007661012c565b005b61007661012c565b34801561008c57600080fd5b5061007661009b3660046107da565b610146565b6100766100ae366004610824565b61018d565b6100766100c13660046108d5565b6101dc565b3480156100d257600080fd5b506100db61024d565b6040516001600160a01b03909116815260200160405180910390f35b34801561010357600080fd5b506100766101123660046107da565b610288565b34801561012357600080fd5b506100db6102b2565b610134610318565b61014461013f6103d2565b6103dc565b565b61014e6103fb565b6001600160a01b0316336001600160a01b03161415610185576101828160405180602001604052806000815250600061042e565b50565b61018261012c565b6101956103fb565b6001600160a01b0316336001600160a01b031614156101855760006101b86103d2565b9050600080835160208501845af43d6000803e8080156101d7573d6000f35b3d6000fd5b6101e46103fb565b6001600160a01b0316336001600160a01b03161415610245576102408383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061042e915050565b505050565b61024061012c565b60006102576103fb565b6001600160a01b0316336001600160a01b0316141561027d576102786103d2565b905090565b61028561012c565b90565b6102906103fb565b6001600160a01b0316336001600160a01b031614156101855761018281610459565b60006102bc6103fb565b6001600160a01b0316336001600160a01b0316141561027d576102786103fb565b606061030283836040518060600160405280602781526020016109d4602791396104ad565b9392505050565b6001600160a01b03163b151590565b6103206103fb565b6001600160a01b0316336001600160a01b031614156101445760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102786105a1565b3660008037600080366000845af43d6000803e8080156101d7573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610437836105c9565b6000825111806104445750805b156102405761045383836102dd565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104826103fb565b604080516001600160a01b03928316815291841660208301520160405180910390a161018281610609565b60606001600160a01b0384163b61052c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103c9565b600080856001600160a01b0316856040516105479190610984565b600060405180830381855af49150503d8060008114610582576040519150601f19603f3d011682016040523d82523d6000602084013e610587565b606091505b50915091506105978282866106e1565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b6105d28161071a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166106855760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103c9565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b606083156106f0575081610302565b8251156107005782518084602001fd5b8160405162461bcd60e51b81526004016103c991906109a0565b6001600160a01b0381163b6107975760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103c9565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6106a8565b80356001600160a01b03811681146107d557600080fd5b919050565b6000602082840312156107ec57600080fd5b610302826107be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561083657600080fd5b813567ffffffffffffffff8082111561084e57600080fd5b818401915084601f83011261086257600080fd5b813581811115610874576108746107f5565b604051601f8201601f19908116603f0116810190838211818310171561089c5761089c6107f5565b816040528281528760208487010111156108b557600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156108ea57600080fd5b6108f3846107be565b9250602084013567ffffffffffffffff8082111561091057600080fd5b818601915086601f83011261092457600080fd5b81358181111561093357600080fd5b87602082850101111561094557600080fd5b6020830194508093505050509250925092565b60005b8381101561097357818101518382015260200161095b565b838111156104535750506000910152565b60008251610996818460208701610958565b9190910192915050565b60208152600082518060208401526109bf816040850160208701610958565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203b097b88c1cee26a495ec73a23404fc321233caf781f72087a86ad15c85d8f1d64736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x6080604052600436106100695760003560e01c80635c60da1b116100435780635c60da1b146100c65780638f283970146100f7578063f851a4401461011757610078565b80633659cfe6146100805780634bb5274a146100a05780634f1ef286146100b357610078565b366100785761007661012c565b005b61007661012c565b34801561008c57600080fd5b5061007661009b3660046107da565b610146565b6100766100ae366004610824565b61018d565b6100766100c13660046108d5565b6101dc565b3480156100d257600080fd5b506100db61024d565b6040516001600160a01b03909116815260200160405180910390f35b34801561010357600080fd5b506100766101123660046107da565b610288565b34801561012357600080fd5b506100db6102b2565b610134610318565b61014461013f6103d2565b6103dc565b565b61014e6103fb565b6001600160a01b0316336001600160a01b03161415610185576101828160405180602001604052806000815250600061042e565b50565b61018261012c565b6101956103fb565b6001600160a01b0316336001600160a01b031614156101855760006101b86103d2565b9050600080835160208501845af43d6000803e8080156101d7573d6000f35b3d6000fd5b6101e46103fb565b6001600160a01b0316336001600160a01b03161415610245576102408383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061042e915050565b505050565b61024061012c565b60006102576103fb565b6001600160a01b0316336001600160a01b0316141561027d576102786103d2565b905090565b61028561012c565b90565b6102906103fb565b6001600160a01b0316336001600160a01b031614156101855761018281610459565b60006102bc6103fb565b6001600160a01b0316336001600160a01b0316141561027d576102786103fb565b606061030283836040518060600160405280602781526020016109d4602791396104ad565b9392505050565b6001600160a01b03163b151590565b6103206103fb565b6001600160a01b0316336001600160a01b031614156101445760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102786105a1565b3660008037600080366000845af43d6000803e8080156101d7573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610437836105c9565b6000825111806104445750805b156102405761045383836102dd565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104826103fb565b604080516001600160a01b03928316815291841660208301520160405180910390a161018281610609565b60606001600160a01b0384163b61052c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103c9565b600080856001600160a01b0316856040516105479190610984565b600060405180830381855af49150503d8060008114610582576040519150601f19603f3d011682016040523d82523d6000602084013e610587565b606091505b50915091506105978282866106e1565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61041f565b6105d28161071a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166106855760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103c9565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905550565b606083156106f0575081610302565b8251156107005782518084602001fd5b8160405162461bcd60e51b81526004016103c991906109a0565b6001600160a01b0381163b6107975760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103c9565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6106a8565b80356001600160a01b03811681146107d557600080fd5b919050565b6000602082840312156107ec57600080fd5b610302826107be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020828403121561083657600080fd5b813567ffffffffffffffff8082111561084e57600080fd5b818401915084601f83011261086257600080fd5b813581811115610874576108746107f5565b604051601f8201601f19908116603f0116810190838211818310171561089c5761089c6107f5565b816040528281528760208487010111156108b557600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156108ea57600080fd5b6108f3846107be565b9250602084013567ffffffffffffffff8082111561091057600080fd5b818601915086601f83011261092457600080fd5b81358181111561093357600080fd5b87602082850101111561094557600080fd5b6020830194508093505050509250925092565b60005b8381101561097357818101518382015260200161095b565b838111156104535750506000910152565b60008251610996818460208701610958565b9190910192915050565b60208152600082518060208401526109bf816040850160208701610958565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203b097b88c1cee26a495ec73a23404fc321233caf781f72087a86ad15c85d8f1d64736f6c63430008090033", + "devdoc": { + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "functionDelegateCall(bytes)": { + "notice": "The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file From 916ec3f8c71bfe4d7b4f140d90c937cb09184bae Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 11 Apr 2024 15:47:09 +0700 Subject: [PATCH 159/305] script: deploy ronin bridge manager --- foundry.toml | 4 +- ...0240411-p1-deploy-ronin-bridge-manager.sol | 93 +++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol diff --git a/foundry.toml b/foundry.toml index 64942a1b..e15ef4ac 100644 --- a/foundry.toml +++ b/foundry.toml @@ -22,9 +22,11 @@ evm_version = 'istanbul' [profile.ethereum] evm_version = 'shanghai' -[profile.ronin.ronin_bridge_manager] +[profile.ronin_bridge_manager] evm_version = 'istanbul' +optimizer = true optimizer_runs = 1 +ffi = true [fmt] line_length = 160 diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol new file mode 100644 index 00000000..94dd4aa7 --- /dev/null +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; + +import "../BridgeMigration.sol"; + +contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { + ISharedArgument.SharedParameter _param; + RoninBridgeManager _roninBridgeManager; + + function setUp() public override { + super.setUp(); + } + + function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { + ISharedArgument.SharedParameter memory param; + + param.roninBridgeManager.num = 7; + param.roninBridgeManager.denom = 10; + param.roninBridgeManager.roninChainId = block.chainid; + param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.roninBridgeManager.bridgeContract = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.bridgeOperators = new address[](4); + param.roninBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; + param.roninBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; + param.roninBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; + param.roninBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; + + param.roninBridgeManager.governors = new address[](4); + param.roninBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + param.roninBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + param.roninBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + param.roninBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + param.roninBridgeManager.voteWeights = new uint96[](4); + param.roninBridgeManager.voteWeights[0] = 100; + param.roninBridgeManager.voteWeights[1] = 100; + param.roninBridgeManager.voteWeights[2] = 100; + param.roninBridgeManager.voteWeights[3] = 100; + + param.roninBridgeManager.targetOptions = new GlobalProposal.TargetOption[](4); + param.roninBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + param.roninBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.BridgeReward; + param.roninBridgeManager.targetOptions[2] = GlobalProposal.TargetOption.BridgeSlash; + param.roninBridgeManager.targetOptions[3] = GlobalProposal.TargetOption.BridgeTracking; + + param.roninBridgeManager.targets = new address[](4); + param.roninBridgeManager.targets[0] = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.targets[1] = _config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); + param.roninBridgeManager.targets[2] = _config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + param.roninBridgeManager.targets[3] = _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + + _roninBridgeManager = RoninBridgeManager(new RoninBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + RoninBridgeManagerConstructor.initialize, + ( + param.roninBridgeManager.num, + param.roninBridgeManager.denom, + param.roninBridgeManager.roninChainId, + param.roninBridgeManager.expiryDuration, + param.roninBridgeManager.bridgeContract, + param.roninBridgeManager.callbackRegisters, + param.roninBridgeManager.bridgeOperators, + param.roninBridgeManager.governors, + param.roninBridgeManager.voteWeights, + param.roninBridgeManager.targetOptions, + param.roninBridgeManager.targets + ) + ) + ).run()); + } +} From 59a4eb78b185152c33254429cece322941763984 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 11 Apr 2024 16:39:38 +0700 Subject: [PATCH 160/305] script: init script --- ...0240411-p1-deploy-ronin-bridge-manager.sol | 4 +- ...20240411-p2-upgrade-bridge-ronin-chain.sol | 98 +++++++++++++++++++ 2 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol index 94dd4aa7..05b000a3 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol @@ -27,7 +27,7 @@ import "../BridgeMigration.sol"; contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { ISharedArgument.SharedParameter _param; - RoninBridgeManager _roninBridgeManager; + RoninBridgeManager _newRoninBridgeManager; function setUp() public override { super.setUp(); @@ -71,7 +71,7 @@ contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { param.roninBridgeManager.targets[2] = _config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); param.roninBridgeManager.targets[3] = _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - _roninBridgeManager = RoninBridgeManager(new RoninBridgeManagerDeploy().overrideArgs( + _newRoninBridgeManager = RoninBridgeManager(new RoninBridgeManagerDeploy().overrideArgs( abi.encodeCall( RoninBridgeManagerConstructor.initialize, ( diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol new file mode 100644 index 00000000..394a3193 --- /dev/null +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; + +import "../BridgeMigration.sol"; + +contract Migration__20240409_P2_UpgradeBridgeRoninchain is BridgeMigration { + ISharedArgument.SharedParameter _param; + RoninBridgeManager _currRoninBridgeManager; + RoninBridgeManager _newRoninBridgeManager; + + address private _governor; + + + function setUp() public override { + super.setUp(); + } + + function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { + _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _newRoninBridgeManager = RoninBridgeManager(address(0xdeadbeef)); // TODO: fulfill here + _currRoninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + + address bridgeRewardLogic = _deployLogic(Contract.BridgeReward.key()); + address bridgeSlashLogic = _deployLogic(Contract.BridgeSlash.key()); + address bridgeTrackingLogic = _deployLogic(Contract.BridgeTracking.key()); + address pauseEnforcerLogic = _deployLogic(Contract.RoninPauseEnforcer.key()); + address roninGatewayV3Logic = _deployLogic(Contract.RoninGatewayV3.key()); + + address bridgeRewardProxy = _config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); + address bridgeSlashProxy = _config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + address bridgeTrackingProxy = _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + address pauseEnforcerProxy = _config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + address roninGatewayV3Proxy = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + + uint256 expiredTime = block.timestamp + 14 days; + uint N = 10; + address[] memory targets = new address[](N); + uint256[] memory values = new uint256[](N); + bytes[] memory calldatas = new bytes[](N); + uint256[] memory gasAmounts = new uint256[](N); + + targets[0] = bridgeRewardProxy; + targets[1] = bridgeSlashProxy; + targets[2] = bridgeTrackingProxy; + targets[3] = pauseEnforcerProxy; + targets[4] = roninGatewayV3Proxy; + targets[5] = bridgeRewardProxy; + targets[6] = bridgeSlashProxy; + targets[7] = bridgeTrackingProxy; + targets[8] = pauseEnforcerProxy; + targets[9] = roninGatewayV3Proxy; + + calldatas[0] = abi.encodeWithSignature("upgradeTo(address)", bridgeRewardLogic); + calldatas[1] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); + calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", bridgeTrackingLogic); + calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[4] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); + calldatas[5] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[7] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[8] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[9] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + for (uint i; i < N; ++i) { + gasAmounts[i] = 1_000_000; + } + + vm.broadcast(_governor); + address(_currRoninBridgeManager).call( + abi.encodeWithSignature( + "propose(uint256,uint256,address[],uint256[],bytes[],uint256[])", + block.chainid, expiredTime, targets, values, calldatas, gasAmounts + ) + ); + } +} From bdccbf3d76426576ba912c81e92390248fc82128 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Thu, 11 Apr 2024 17:11:28 +0700 Subject: [PATCH 161/305] script: fix wrong artifact name --- script/utils/Contract.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index da40fefa..717e9d1b 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -43,12 +43,12 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.BridgeTracking) return "BridgeTracking"; if (contractEnum == Contract.BridgeSlash) return "BridgeSlash"; if (contractEnum == Contract.BridgeReward) return "BridgeReward"; - if (contractEnum == Contract.RoninPauseEnforcer) return "PauseEnforcer"; + if (contractEnum == Contract.RoninPauseEnforcer) return "RoninGatewayPauseEnforcer"; if (contractEnum == Contract.RoninGatewayV3) return "RoninGatewayV3"; if (contractEnum == Contract.RoninBridgeManager) return "RoninBridgeManager"; if (contractEnum == Contract.RoninBridgeManagerConstructor) return "RoninBridgeManagerConstructor"; - if (contractEnum == Contract.MainchainPauseEnforcer) return "PauseEnforcer"; + if (contractEnum == Contract.MainchainPauseEnforcer) return "MainchainGatewayPauseEnforcer"; if (contractEnum == Contract.MainchainGatewayV3) return "MainchainGatewayV3"; if (contractEnum == Contract.MainchainGatewayBatcher) return "MainchainGatewayBatcher"; if (contractEnum == Contract.MainchainBridgeManager) return "MainchainBridgeManager"; From 35227f206d56f92a7219d114d66dcc8b7ce9a4b1 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 11 Apr 2024 23:15:28 +0700 Subject: [PATCH 162/305] script: upgrade ronin chain script --- .../20240411-helper.s.sol | 51 +++++++++ ...20240411-p2-upgrade-bridge-ronin-chain.sol | 107 ++++++++++++++---- 2 files changed, 133 insertions(+), 25 deletions(-) create mode 100644 script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol new file mode 100644 index 00000000..bdd7bf17 --- /dev/null +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import "../BridgeMigration.sol"; + +struct LegacyProposalDetail { + uint256 nonce; + uint256 chainId; + uint256 expiryTimestamp; + address[] targets; + uint256[] values; + bytes[] calldatas; + uint256[] gasAmounts; +} + +contract Migration__20240409_Helper is BridgeMigration { + address internal _governor; + address[] internal _voters; + + RoninBridgeManager internal _currRoninBridgeManager; + RoninBridgeManager internal _newRoninBridgeManager; + + function _helperProposeForCurrentNetwork(LegacyProposalDetail memory proposal) internal { + vm.broadcast(_governor); + address(_currRoninBridgeManager).call( + abi.encodeWithSignature( + "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", + // proposal.chainId, + proposal.expiryTimestamp, + proposal.targets, + proposal.values, + proposal.calldatas, + proposal.gasAmounts, + Ballot.VoteType.For + ) + ); + } + + function _helperVoteForCurrentNetwork(LegacyProposalDetail memory proposal) internal { + for (uint i; i < _voters.length; ++i) { + vm.broadcast(_voters[i]); + address(_currRoninBridgeManager).call( + abi.encodeWithSignature( + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", + proposal, Ballot.VoteType.For + ) + ); + } + } +} \ No newline at end of file diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol index 394a3193..f6242d06 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol @@ -23,25 +23,78 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; -import "../BridgeMigration.sol"; +import "./20240411-helper.s.sol"; -contract Migration__20240409_P2_UpgradeBridgeRoninchain is BridgeMigration { +contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_Helper { ISharedArgument.SharedParameter _param; - RoninBridgeManager _currRoninBridgeManager; - RoninBridgeManager _newRoninBridgeManager; - - address private _governor; - function setUp() public override { super.setUp(); - } - function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); + _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); + _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); + _newRoninBridgeManager = RoninBridgeManager(address(0xdeadbeef)); // TODO: fulfill here _currRoninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + } + + function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { + _changeAdminOfEnforcer(); + _upgradeBridge(); + } + + function _changeAdminOfEnforcer() internal { + RoninBridgeManager roninGA = RoninBridgeManager(0x53Ea388CB72081A3a397114a43741e7987815896); + address pauseEnforcerProxy = _config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + + uint256 expiredTime = block.timestamp + 14 days; + uint N = 1; + address[] memory targets = new address[](N); + uint256[] memory values = new uint256[](N); + bytes[] memory calldatas = new bytes[](N); + uint256[] memory gasAmounts = new uint256[](N); + + targets[0] = pauseEnforcerProxy; + calldatas[0] = abi.encodeWithSignature("changeAdmin(address)", address(_currRoninBridgeManager)); + gasAmounts[0] = 1_000_000; + + LegacyProposalDetail memory proposal; + proposal.nonce = roninGA.round(block.chainid) + 1; + proposal.chainId = block.chainid; + proposal.expiryTimestamp = expiredTime; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + vm.broadcast(_governor); + address(roninGA).call( + abi.encodeWithSignature( + "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", + // proposal.chainId, + proposal.expiryTimestamp, + proposal.targets, + proposal.values, + proposal.calldatas, + proposal.gasAmounts, + Ballot.VoteType.For + ) + ); + for (uint i; i < _voters.length; ++i) { + vm.broadcast(_voters[i]); + address(roninGA).call( + abi.encodeWithSignature( + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", + proposal, Ballot.VoteType.For + ) + ); + } + } + + function _upgradeBridge() internal { address bridgeRewardLogic = _deployLogic(Contract.BridgeReward.key()); address bridgeSlashLogic = _deployLogic(Contract.BridgeSlash.key()); address bridgeTrackingLogic = _deployLogic(Contract.BridgeTracking.key()); @@ -64,35 +117,39 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is BridgeMigration { targets[0] = bridgeRewardProxy; targets[1] = bridgeSlashProxy; targets[2] = bridgeTrackingProxy; - targets[3] = pauseEnforcerProxy; - targets[4] = roninGatewayV3Proxy; - targets[5] = bridgeRewardProxy; - targets[6] = bridgeSlashProxy; - targets[7] = bridgeTrackingProxy; + targets[3] = roninGatewayV3Proxy; + targets[4] = bridgeRewardProxy; + targets[5] = bridgeSlashProxy; + targets[6] = bridgeTrackingProxy; + targets[7] = roninGatewayV3Proxy; targets[8] = pauseEnforcerProxy; - targets[9] = roninGatewayV3Proxy; + targets[9] = pauseEnforcerProxy; calldatas[0] = abi.encodeWithSignature("upgradeTo(address)", bridgeRewardLogic); calldatas[1] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", bridgeTrackingLogic); - calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); - calldatas[4] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); + calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); + calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[5] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[7] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[8] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[8] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); calldatas[9] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); for (uint i; i < N; ++i) { gasAmounts[i] = 1_000_000; } - vm.broadcast(_governor); - address(_currRoninBridgeManager).call( - abi.encodeWithSignature( - "propose(uint256,uint256,address[],uint256[],bytes[],uint256[])", - block.chainid, expiredTime, targets, values, calldatas, gasAmounts - ) - ); + LegacyProposalDetail memory proposal; + proposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; + proposal.chainId = block.chainid; + proposal.expiryTimestamp = expiredTime; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + _helperProposeForCurrentNetwork(proposal); + _helperVoteForCurrentNetwork(proposal); } } From cc993856f96f59494aae9883cd6fa4bdac100fd5 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 01:13:06 +0700 Subject: [PATCH 163/305] fix(GlobalProposal): add enforcer to option --- src/libraries/GlobalProposal.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/GlobalProposal.sol b/src/libraries/GlobalProposal.sol index 377f189e..bb312eb0 100644 --- a/src/libraries/GlobalProposal.sol +++ b/src/libraries/GlobalProposal.sol @@ -14,7 +14,8 @@ library GlobalProposal { GatewayContract, // 1 BridgeReward, // 2 BridgeSlash, // 3 - BridgeTracking // 4 + BridgeTracking, // 4 + PauseEnforcer // 5 } From 12d9e0498cfb82ced027fd0dc4f7bb1c0d64785c Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 01:13:18 +0700 Subject: [PATCH 164/305] script: add mainchain script --- .gitignore | 3 +- ...> MainchainGatewayPauseEnforcerLogic.json} | 0 ...> MainchainGatewayPauseEnforcerProxy.json} | 0 .../20240411-operators-key-template.s.sol | 10 + ...0240411-p1-deploy-ronin-bridge-manager.sol | 4 +- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 266 ++++++++++++++++++ 6 files changed, 281 insertions(+), 2 deletions(-) rename deployments/sepolia/{PauseEnforcerLogic.json => MainchainGatewayPauseEnforcerLogic.json} (100%) rename deployments/sepolia/{PauseEnforcerProxy.json => MainchainGatewayPauseEnforcerProxy.json} (100%) create mode 100644 script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key-template.s.sol create mode 100644 script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol diff --git a/.gitignore b/.gitignore index 8d1a2418..5d7d5663 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ remix-compiler.config.js out .DS_Store -dry-run/ \ No newline at end of file +dry-run/ +20240411-operators-key.s.sol \ No newline at end of file diff --git a/deployments/sepolia/PauseEnforcerLogic.json b/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json similarity index 100% rename from deployments/sepolia/PauseEnforcerLogic.json rename to deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json diff --git a/deployments/sepolia/PauseEnforcerProxy.json b/deployments/sepolia/MainchainGatewayPauseEnforcerProxy.json similarity index 100% rename from deployments/sepolia/PauseEnforcerProxy.json rename to deployments/sepolia/MainchainGatewayPauseEnforcerProxy.json diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key-template.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key-template.s.sol new file mode 100644 index 00000000..c0e969dc --- /dev/null +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key-template.s.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__20240409_GovernorsKey { + function _loadGovernorPKs() pure internal returns (uint256[] memory res) { + res = new uint256[](1); + + res[0] = 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef; + } +} \ No newline at end of file diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol index 05b000a3..bcbb98ea 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol @@ -59,17 +59,19 @@ contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { param.roninBridgeManager.voteWeights[2] = 100; param.roninBridgeManager.voteWeights[3] = 100; - param.roninBridgeManager.targetOptions = new GlobalProposal.TargetOption[](4); + param.roninBridgeManager.targetOptions = new GlobalProposal.TargetOption[](5); param.roninBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; param.roninBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.BridgeReward; param.roninBridgeManager.targetOptions[2] = GlobalProposal.TargetOption.BridgeSlash; param.roninBridgeManager.targetOptions[3] = GlobalProposal.TargetOption.BridgeTracking; + param.roninBridgeManager.targetOptions[4] = GlobalProposal.TargetOption.PauseEnforcer; param.roninBridgeManager.targets = new address[](4); param.roninBridgeManager.targets[0] = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); param.roninBridgeManager.targets[1] = _config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); param.roninBridgeManager.targets[2] = _config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); param.roninBridgeManager.targets[3] = _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + param.roninBridgeManager.targets[4] = _config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); _newRoninBridgeManager = RoninBridgeManager(new RoninBridgeManagerDeploy().overrideArgs( abi.encodeCall( diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol new file mode 100644 index 00000000..e9a6c5d1 --- /dev/null +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -0,0 +1,266 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { DefaultContract } from "foundry-deployment-kit/utils/DefaultContract.sol"; +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; +import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; + +import "./20240411-operators-key.s.sol"; +import "../BridgeMigration.sol"; + +struct LegacyProposalDetail { + uint256 nonce; + uint256 chainId; + uint256 expiryTimestamp; + address[] targets; + uint256[] values; + bytes[] calldatas; + uint256[] gasAmounts; +} + +contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migration__20240409_GovernorsKey { + ISharedArgument.SharedParameter _param; + MainchainBridgeManager _currMainchainBridgeManager; + MainchainBridgeManager _newMainchainBridgeManager; + + address private _governor; + address[] private _voters; + + address PROXY_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; + + + function setUp() public override { + super.setUp(); + CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), PROXY_ADMIN); + + _currMainchainBridgeManager = MainchainBridgeManager(_config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + } + + function run() public onlyOn(Network.Sepolia.key()) { + _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); + _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); + _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); + + _changeTempAdmin(); + _deployMainchainBridgeManager(); + _upgradeBridge(); + } + + function _changeTempAdmin() internal { + address pauseEnforcerProxy = _config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); + address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + address(mainchainGatewayV3Proxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + vm.stopBroadcast(); + } + + function _upgradeBridge() internal { + _newMainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); + + address weth = _config.getAddressFromCurrentNetwork(Contract.WETH.key()); + address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); + + address pauseEnforcerLogic = _deployLogic(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); + + address pauseEnforcerProxy = _config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + uint256 expiredTime = block.timestamp + 14 days; + uint N = 4; + address[] memory targets = new address[](N); + uint256[] memory values = new uint256[](N); + bytes[] memory calldatas = new bytes[](N); + uint256[] memory gasAmounts = new uint256[](N); + + targets[0] = mainchainGatewayV3Proxy; + targets[1] = mainchainGatewayV3Proxy; + targets[2] = pauseEnforcerProxy; + targets[3] = pauseEnforcerProxy; + + calldatas[0] = abi.encodeWithSignature( + "upgradeToAndCall(address,bytes)", + mainchainGatewayV3Logic, + abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) + ); + calldatas[1] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[3] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + + for (uint i; i < N; ++i) { + gasAmounts[i] = 1_000_000; + } + + LegacyProposalDetail memory proposal; + proposal.nonce = _currMainchainBridgeManager.round(block.chainid) + 1; + proposal.chainId = block.chainid; + proposal.expiryTimestamp = expiredTime; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + uint V = _voters.length + 1; + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](V); + for (uint i; i < V; ++i) { + supports_[i] = Ballot.VoteType.For; + } + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor( + getDomain(), + hashLegacyProposal(proposal), + _loadGovernorPKs(), + Ballot.VoteType.For + ); + + vm.broadcast(_governor); + address(_currMainchainBridgeManager).call( + abi.encodeWithSignature( + "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", + proposal, + supports_, + signatures + ) + ); + } + + function getDomain() pure public returns (bytes32) { + return keccak256( + abi.encode( + keccak256("EIP712Domain(string name,string version,bytes32 salt)"), + keccak256("BridgeAdmin"), // name hash + keccak256("2"), // version hash + keccak256(abi.encode("BRIDGE_ADMIN", 2021)) // salt + ) + ); + } + + function _generateSignaturesFor( + bytes32 domain, + bytes32 proposalHash, + uint256[] memory signerPKs, + Ballot.VoteType support + ) public view returns (SignatureConsumer.Signature[] memory sigs) { + sigs = new SignatureConsumer.Signature[](signerPKs.length); + + for (uint256 i; i < signerPKs.length; i++) { + bytes32 digest = ECDSA.toTypedDataHash(domain, Ballot.hash(proposalHash, support)); + sigs[i] = _sign(signerPKs[i], digest); + } + } + + function _sign(uint256 pk, bytes32 digest) internal pure returns (SignatureConsumer.Signature memory sig) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); + sig.v = v; + sig.r = r; + sig.s = s; + } + + function hashLegacyProposal(LegacyProposalDetail memory proposal) pure public returns (bytes32 digest_) { + bytes32 TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a; + + uint256[] memory values = proposal.values; + address[] memory targets = proposal.targets; + bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length); + uint256[] memory gasAmounts = proposal.gasAmounts; + + for (uint256 i; i < calldataHashList.length; ++i) { + calldataHashList[i] = keccak256(proposal.calldatas[i]); + } + + assembly { + let ptr := mload(0x40) + mstore(ptr, TYPE_HASH) + mstore(add(ptr, 0x20), mload(proposal)) // _proposal.nonce + mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // _proposal.chainId + mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // expiry timestamp + + let arrayHashed + arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash + mstore(add(ptr, 0x80), arrayHashed) + arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // _valuesHash + mstore(add(ptr, 0xa0), arrayHashed) + arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // _calldatasHash + mstore(add(ptr, 0xc0), arrayHashed) + arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // _gasAmountsHash + mstore(add(ptr, 0xe0), arrayHashed) + digest_ := keccak256(ptr, 0x100) + } + } + + function _deployMainchainBridgeManager() internal returns (address mainchainBM) { + ISharedArgument.SharedParameter memory param; + + param.mainchainBridgeManager.num = 7; + param.mainchainBridgeManager.denom = 10; + param.mainchainBridgeManager.roninChainId = 2021; + param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.mainchainBridgeManager.bridgeContract = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.bridgeOperators = new address[](4); + param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; + param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; + param.mainchainBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; + param.mainchainBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; + + param.mainchainBridgeManager.governors = new address[](4); + param.mainchainBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + param.mainchainBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + param.mainchainBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + param.mainchainBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + param.mainchainBridgeManager.voteWeights = new uint96[](4); + param.mainchainBridgeManager.voteWeights[0] = 100; + param.mainchainBridgeManager.voteWeights[1] = 100; + param.mainchainBridgeManager.voteWeights[2] = 100; + param.mainchainBridgeManager.voteWeights[3] = 100; + + param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); + param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; + + param.mainchainBridgeManager.targets = new address[](2); + param.mainchainBridgeManager.targets[0] = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.targets[1] = _config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + + _newMainchainBridgeManager = MainchainBridgeManager(new MainchainBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + _newMainchainBridgeManager.initialize, + ( + param.mainchainBridgeManager.num, + param.mainchainBridgeManager.denom, + param.mainchainBridgeManager.roninChainId, + param.mainchainBridgeManager.bridgeContract, + param.mainchainBridgeManager.callbackRegisters, + param.mainchainBridgeManager.bridgeOperators, + param.mainchainBridgeManager.governors, + param.mainchainBridgeManager.voteWeights, + param.mainchainBridgeManager.targetOptions, + param.mainchainBridgeManager.targets + ) + ) + ).run()); + } +} From 896da0d78d40d7ec02776e005208f06cddf0210f Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 01:13:40 +0700 Subject: [PATCH 165/305] script: rename --- ...-manager.sol => 20240411-p1-deploy-ronin-bridge-manager.s.sol} | 0 ...nin-chain.sol => 20240411-p2-upgrade-bridge-ronin-chain.s.sol} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename script/20240411-upgrade-v3.2.0-testnet/{20240411-p1-deploy-ronin-bridge-manager.sol => 20240411-p1-deploy-ronin-bridge-manager.s.sol} (100%) rename script/20240411-upgrade-v3.2.0-testnet/{20240411-p2-upgrade-bridge-ronin-chain.sol => 20240411-p2-upgrade-bridge-ronin-chain.s.sol} (100%) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol similarity index 100% rename from script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.sol rename to script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol similarity index 100% rename from script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.sol rename to script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol From cae8efdf7ab5a584026853b1fafdc8b2c5c59577 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 10:54:44 +0700 Subject: [PATCH 166/305] nit: forge fmt --- .../20240411-helper.s.sol | 19 +++--- .../20240411-operators-key-template.s.sol | 4 +- ...40411-p1-deploy-ronin-bridge-manager.s.sol | 38 ++++++------ ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 21 ++++--- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 59 ++++++++----------- 5 files changed, 66 insertions(+), 75 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol index bdd7bf17..a1687040 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -26,13 +26,13 @@ contract Migration__20240409_Helper is BridgeMigration { address(_currRoninBridgeManager).call( abi.encodeWithSignature( "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", - // proposal.chainId, - proposal.expiryTimestamp, - proposal.targets, - proposal.values, - proposal.calldatas, - proposal.gasAmounts, - Ballot.VoteType.For + // proposal.chainId, + proposal.expiryTimestamp, + proposal.targets, + proposal.values, + proposal.calldatas, + proposal.gasAmounts, + Ballot.VoteType.For ) ); } @@ -42,10 +42,9 @@ contract Migration__20240409_Helper is BridgeMigration { vm.broadcast(_voters[i]); address(_currRoninBridgeManager).call( abi.encodeWithSignature( - "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", - proposal, Ballot.VoteType.For + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For ) ); } } -} \ No newline at end of file +} diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key-template.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key-template.s.sol index c0e969dc..3381acfb 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key-template.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-operators-key-template.s.sol @@ -2,9 +2,9 @@ pragma solidity ^0.8.19; contract Migration__20240409_GovernorsKey { - function _loadGovernorPKs() pure internal returns (uint256[] memory res) { + function _loadGovernorPKs() internal pure returns (uint256[] memory res) { res = new uint256[](1); res[0] = 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef; } -} \ No newline at end of file +} diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol index bcbb98ea..63bdc784 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol @@ -33,7 +33,7 @@ contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { super.setUp(); } - function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { + function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { ISharedArgument.SharedParameter memory param; param.roninBridgeManager.num = 7; @@ -73,23 +73,25 @@ contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { param.roninBridgeManager.targets[3] = _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); param.roninBridgeManager.targets[4] = _config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); - _newRoninBridgeManager = RoninBridgeManager(new RoninBridgeManagerDeploy().overrideArgs( - abi.encodeCall( - RoninBridgeManagerConstructor.initialize, - ( - param.roninBridgeManager.num, - param.roninBridgeManager.denom, - param.roninBridgeManager.roninChainId, - param.roninBridgeManager.expiryDuration, - param.roninBridgeManager.bridgeContract, - param.roninBridgeManager.callbackRegisters, - param.roninBridgeManager.bridgeOperators, - param.roninBridgeManager.governors, - param.roninBridgeManager.voteWeights, - param.roninBridgeManager.targetOptions, - param.roninBridgeManager.targets + _newRoninBridgeManager = RoninBridgeManager( + new RoninBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + RoninBridgeManagerConstructor.initialize, + ( + param.roninBridgeManager.num, + param.roninBridgeManager.denom, + param.roninBridgeManager.roninChainId, + param.roninBridgeManager.expiryDuration, + param.roninBridgeManager.bridgeContract, + param.roninBridgeManager.callbackRegisters, + param.roninBridgeManager.bridgeOperators, + param.roninBridgeManager.governors, + param.roninBridgeManager.voteWeights, + param.roninBridgeManager.targetOptions, + param.roninBridgeManager.targets + ) ) - ) - ).run()); + ).run() + ); } } diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index f6242d06..7444852e 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -61,7 +61,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H gasAmounts[0] = 1_000_000; LegacyProposalDetail memory proposal; - proposal.nonce = roninGA.round(block.chainid) + 1; + proposal.nonce = roninGA.round(block.chainid) + 1; proposal.chainId = block.chainid; proposal.expiryTimestamp = expiredTime; proposal.targets = targets; @@ -73,13 +73,13 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H address(roninGA).call( abi.encodeWithSignature( "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", - // proposal.chainId, - proposal.expiryTimestamp, - proposal.targets, - proposal.values, - proposal.calldatas, - proposal.gasAmounts, - Ballot.VoteType.For + // proposal.chainId, + proposal.expiryTimestamp, + proposal.targets, + proposal.values, + proposal.calldatas, + proposal.gasAmounts, + Ballot.VoteType.For ) ); @@ -87,8 +87,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H vm.broadcast(_voters[i]); address(roninGA).call( abi.encodeWithSignature( - "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", - proposal, Ballot.VoteType.For + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For ) ); } @@ -141,7 +140,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H } LegacyProposalDetail memory proposal; - proposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; + proposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; proposal.chainId = block.chainid; proposal.expiryTimestamp = expiredTime; proposal.targets = targets; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index e9a6c5d1..2bb4c081 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -48,7 +48,6 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra address PROXY_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; - function setUp() public override { super.setUp(); CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), PROXY_ADMIN); @@ -102,9 +101,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra targets[3] = pauseEnforcerProxy; calldatas[0] = abi.encodeWithSignature( - "upgradeToAndCall(address,bytes)", - mainchainGatewayV3Logic, - abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) + "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) ); calldatas[1] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); @@ -115,7 +112,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra } LegacyProposalDetail memory proposal; - proposal.nonce = _currMainchainBridgeManager.round(block.chainid) + 1; + proposal.nonce = _currMainchainBridgeManager.round(block.chainid) + 1; proposal.chainId = block.chainid; proposal.expiryTimestamp = expiredTime; proposal.targets = targets; @@ -129,25 +126,17 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra supports_[i] = Ballot.VoteType.For; } - SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor( - getDomain(), - hashLegacyProposal(proposal), - _loadGovernorPKs(), - Ballot.VoteType.For - ); + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); vm.broadcast(_governor); address(_currMainchainBridgeManager).call( abi.encodeWithSignature( - "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", - proposal, - supports_, - signatures + "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures ) ); - } + } - function getDomain() pure public returns (bytes32) { + function getDomain() public pure returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,bytes32 salt)"), @@ -179,7 +168,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra sig.s = s; } - function hashLegacyProposal(LegacyProposalDetail memory proposal) pure public returns (bytes32 digest_) { + function hashLegacyProposal(LegacyProposalDetail memory proposal) public pure returns (bytes32 digest_) { bytes32 TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a; uint256[] memory values = proposal.values; @@ -245,22 +234,24 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra param.mainchainBridgeManager.targets[0] = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); param.mainchainBridgeManager.targets[1] = _config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - _newMainchainBridgeManager = MainchainBridgeManager(new MainchainBridgeManagerDeploy().overrideArgs( - abi.encodeCall( - _newMainchainBridgeManager.initialize, - ( - param.mainchainBridgeManager.num, - param.mainchainBridgeManager.denom, - param.mainchainBridgeManager.roninChainId, - param.mainchainBridgeManager.bridgeContract, - param.mainchainBridgeManager.callbackRegisters, - param.mainchainBridgeManager.bridgeOperators, - param.mainchainBridgeManager.governors, - param.mainchainBridgeManager.voteWeights, - param.mainchainBridgeManager.targetOptions, - param.mainchainBridgeManager.targets + _newMainchainBridgeManager = MainchainBridgeManager( + new MainchainBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + _newMainchainBridgeManager.initialize, + ( + param.mainchainBridgeManager.num, + param.mainchainBridgeManager.denom, + param.mainchainBridgeManager.roninChainId, + param.mainchainBridgeManager.bridgeContract, + param.mainchainBridgeManager.callbackRegisters, + param.mainchainBridgeManager.bridgeOperators, + param.mainchainBridgeManager.governors, + param.mainchainBridgeManager.voteWeights, + param.mainchainBridgeManager.targetOptions, + param.mainchainBridgeManager.targets + ) ) - ) - ).run()); + ).run() + ); } } From 7b6c49dd3ca79566b3f6b39978ba967a6e9156b6 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 13:46:48 +0700 Subject: [PATCH 167/305] resolve conflict --- foundry.toml | 1 - .../20231218-maptoken-mainchain.s.sol | 2 +- .../20240115-maptoken-mainchain.s.sol | 2 +- .../20240115-maptoken-roninchain.s.sol | 2 +- .../20240131-maptoken-pixel-mainchain.s.sol | 2 +- .../20240131-maptoken-pixel-roninchain.s.sol | 2 +- .../20240206-maptoken-banana-mainchain.s.sol | 2 +- .../20240206-maptoken-banana-roninchain.s.sol | 10 +- .../20240405-maptoken-usdc-mainchain.s.sol | 6 +- .../20240409-maptoken-slp-mainchain.s.sol | 7 +- .../deploy-sepolia.s.sol | 8 +- .../20240411-helper.s.sol | 4 +- ...40411-p1-deploy-ronin-bridge-manager.s.sol | 19 +- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 17 +- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 27 ++- script/GeneralConfig.sol | 24 +-- .../deploy-v0.3.1/01_Deploy_RoninBridge.s.sol | 182 +++++++++--------- .../02_Deploy_MainchainBridge.s.sol | 128 ++++++------ script/deploy-v0.3.1/Deploy.v0.3.1.s.sol | 86 ++++----- .../factory-maptoken-mainchain.s.sol | 21 +- .../factory-maptoken-roninchain.s.sol | 18 +- .../PostCheck_BridgeManager_Proposal.s.sol | 4 +- script/shared/libraries/LibProposal.sol | 4 +- 23 files changed, 282 insertions(+), 296 deletions(-) diff --git a/foundry.toml b/foundry.toml index a5d442c0..12025047 100644 --- a/foundry.toml +++ b/foundry.toml @@ -64,6 +64,5 @@ localhost = "http://localhost:8545" ethereum = "https://eth.llamarpc.com" sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}" goerli = "https://ethereum-goerli.publicnode.com" -sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}" ronin-mainnet = "https://api-partner.roninchain.com/rpc" ronin-testnet = "https://saigon-archive.roninchain.com/rpc" diff --git a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol index 78f3f99e..88995814 100644 --- a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol @@ -86,6 +86,6 @@ contract Migration__20231215_MapTokenMainchain is Migration { config.switchTo(currentNetwork); vm.broadcast(sender()); - _roninBridgeManager.propose(companionChainId, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(companionChainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index b6c162e4..2b13ebeb 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -155,6 +155,6 @@ contract Migration__MapTokenMainchain is Migration { config.switchTo(currentNetwork); vm.broadcast(sender()); - _roninBridgeManager.propose(companionChainId, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(companionChainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index 42985caa..e6e4f5f0 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -128,6 +128,6 @@ contract Migration__MapTokenRoninchain is Migration { config.switchTo(currentNetwork); vm.broadcast(sender()); - _roninBridgeManager.propose(block.chainid, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol index dbb2490e..ea78e79c 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol @@ -122,6 +122,6 @@ contract Migration__20240131_MapTokenPixelMainchain is Migration, Migration__Map config.switchTo(currentNetwork); vm.broadcast(_governor); - _roninBridgeManager.propose(companionChainId, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(companionChainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol index dc2eae63..cb54e108 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol @@ -120,6 +120,6 @@ contract Migration__20240131_MapTokenPixelRoninchain is Migration, Migration__Ma LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); vm.broadcast(_governor); - _roninBridgeManager.propose(block.chainid, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index dcb18506..a65d8abd 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -149,7 +149,7 @@ contract Migration__20240206_MapTokenBananaMainchain is console2.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); - _roninBridgeManager.propose(companionChainId, expiredTime, targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(companionChainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index b437d345..31540bf1 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; @@ -14,12 +13,11 @@ import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { Migration } from "../Migration.s.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; import { TNetwork, Network } from "../utils/Network.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; -import { Contract } from "../utils/Contract.sol"; import "./maptoken-banana-configs.s.sol"; import "./maptoken-genkai-configs.s.sol"; @@ -152,10 +150,12 @@ contract Migration__20240206_MapTokenBananaRoninChain is TNetwork currentNetwork = network(); TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); - address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); config.createFork(companionNetwork); config.switchTo(companionNetwork); - LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + { + address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + } config.switchTo(currentNetwork); console2.log("Nonce:", vm.getNonce(_governor)); diff --git a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol index d62362f9..c7d8ae8d 100644 --- a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -11,7 +10,6 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; @@ -22,9 +20,9 @@ import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "./maptoken-usdc-configs.s.sol"; -import "../BridgeMigration.sol"; +import "../Migration.s.sol"; -contract Migration__20240405_MapTokenUsdcMainchain is BridgeMigration, Migration__MapToken_Usdc_Config { +contract Migration__20240405_MapTokenUsdcMainchain is Migration, Migration__MapToken_Usdc_Config { address internal _mainchainPauseEnforcer; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; diff --git a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol index 5a6eca65..c20a7f06 100644 --- a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -11,7 +10,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; @@ -22,9 +21,9 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "./maptoken-slp-configs.s.sol"; -import "../BridgeMigration.sol"; +import "../Migration.s.sol"; -contract Migration__20240409_MapTokenSlpMainchain is BridgeMigration, Migration__MapToken_Slp_Config { +contract Migration__20240409_MapTokenSlpMainchain is Migration, Migration__MapToken_Slp_Config { address internal _mainchainPauseEnforcer; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 2faf4ac4..1770c391 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import { ISharedArgument } from "@ronin/script/interfaces/ISharedArgument.sol"; -import { LibSharedAddress } from "foundry-deployment-kit/libraries/LibSharedAddress.sol"; +import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/ronin/gateway/PauseEnforcer.sol"; @@ -27,13 +27,13 @@ import { MockERC721Deploy } from "@ronin/script/contracts/token/MockERC721Deploy import { GeneralConfig } from "../GeneralConfig.sol"; import { Network } from "../utils/Network.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; -import { DefaultContract } from "foundry-deployment-kit/utils/DefaultContract.sol"; +import { Migration } from "../Migration.s.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import "./changeGV-config.s.sol"; import "forge-std/console2.sol"; -contract DeploySepolia is BridgeMigration, DeploySepolia__ChangeGV_Config { +contract DeploySepolia is Migration, DeploySepolia__ChangeGV_Config { ISharedArgument.SharedParameter _param; PauseEnforcer _mainchainPauseEnforcer; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol index a1687040..84749f17 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; -import "../BridgeMigration.sol"; +import "../Migration.s.sol"; struct LegacyProposalDetail { uint256 nonce; @@ -14,7 +14,7 @@ struct LegacyProposalDetail { uint256[] gasAmounts; } -contract Migration__20240409_Helper is BridgeMigration { +contract Migration__20240409_Helper is Migration { address internal _governor; address[] internal _voters; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol index 63bdc784..d7309b67 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -11,7 +10,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; @@ -23,9 +22,9 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; -import "../BridgeMigration.sol"; +import "../Migration.s.sol"; -contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { +contract Migration__20240409_P1_DeployRoninBridgeManager is Migration { ISharedArgument.SharedParameter _param; RoninBridgeManager _newRoninBridgeManager; @@ -40,7 +39,7 @@ contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { param.roninBridgeManager.denom = 10; param.roninBridgeManager.roninChainId = block.chainid; param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.roninBridgeManager.bridgeContract = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); param.roninBridgeManager.bridgeOperators = new address[](4); param.roninBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; param.roninBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; @@ -67,11 +66,11 @@ contract Migration__20240409_P1_DeployRoninBridgeManager is BridgeMigration { param.roninBridgeManager.targetOptions[4] = GlobalProposal.TargetOption.PauseEnforcer; param.roninBridgeManager.targets = new address[](4); - param.roninBridgeManager.targets[0] = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - param.roninBridgeManager.targets[1] = _config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); - param.roninBridgeManager.targets[2] = _config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - param.roninBridgeManager.targets[3] = _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - param.roninBridgeManager.targets[4] = _config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + param.roninBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); + param.roninBridgeManager.targets[2] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + param.roninBridgeManager.targets[3] = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + param.roninBridgeManager.targets[4] = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); _newRoninBridgeManager = RoninBridgeManager( new RoninBridgeManagerDeploy().overrideArgs( diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index 7444852e..12c9b9dc 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -11,7 +10,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; @@ -37,7 +36,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); _newRoninBridgeManager = RoninBridgeManager(address(0xdeadbeef)); // TODO: fulfill here - _currRoninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); } function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { @@ -47,7 +46,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H function _changeAdminOfEnforcer() internal { RoninBridgeManager roninGA = RoninBridgeManager(0x53Ea388CB72081A3a397114a43741e7987815896); - address pauseEnforcerProxy = _config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); uint256 expiredTime = block.timestamp + 14 days; uint N = 1; @@ -100,11 +99,11 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H address pauseEnforcerLogic = _deployLogic(Contract.RoninPauseEnforcer.key()); address roninGatewayV3Logic = _deployLogic(Contract.RoninGatewayV3.key()); - address bridgeRewardProxy = _config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); - address bridgeSlashProxy = _config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - address bridgeTrackingProxy = _config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - address pauseEnforcerProxy = _config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); - address roninGatewayV3Proxy = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + address bridgeRewardProxy = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); + address bridgeSlashProxy = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + address bridgeTrackingProxy = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; uint N = 10; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index 2bb4c081..19ed6835 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -11,14 +10,14 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; -import { DefaultContract } from "foundry-deployment-kit/utils/DefaultContract.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; @@ -26,7 +25,7 @@ import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; import "./20240411-operators-key.s.sol"; -import "../BridgeMigration.sol"; +import "../Migration.s.sol"; struct LegacyProposalDetail { uint256 nonce; @@ -38,7 +37,7 @@ struct LegacyProposalDetail { uint256[] gasAmounts; } -contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migration__20240409_GovernorsKey { +contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__20240409_GovernorsKey { ISharedArgument.SharedParameter _param; MainchainBridgeManager _currMainchainBridgeManager; MainchainBridgeManager _newMainchainBridgeManager; @@ -52,7 +51,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra super.setUp(); CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), PROXY_ADMIN); - _currMainchainBridgeManager = MainchainBridgeManager(_config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); } function run() public onlyOn(Network.Sepolia.key()) { @@ -67,8 +66,8 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra } function _changeTempAdmin() internal { - address pauseEnforcerProxy = _config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - address mainchainGatewayV3Proxy = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); @@ -79,14 +78,14 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra function _upgradeBridge() internal { _newMainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); - address weth = _config.getAddressFromCurrentNetwork(Contract.WETH.key()); + address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); address pauseEnforcerLogic = _deployLogic(Contract.MainchainPauseEnforcer.key()); address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); - address pauseEnforcerProxy = _config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - address mainchainGatewayV3Proxy = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; uint N = 4; @@ -207,7 +206,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra param.mainchainBridgeManager.denom = 10; param.mainchainBridgeManager.roninChainId = 2021; param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.mainchainBridgeManager.bridgeContract = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); param.mainchainBridgeManager.bridgeOperators = new address[](4); param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; @@ -231,8 +230,8 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is BridgeMigration, Migra param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; param.mainchainBridgeManager.targets = new address[](2); - param.mainchainBridgeManager.targets[0] = _config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - param.mainchainBridgeManager.targets[1] = _config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + param.mainchainBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); _newMainchainBridgeManager = MainchainBridgeManager( new MainchainBridgeManagerDeploy().overrideArgs( diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index f3a454d3..5a04aa4c 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -40,19 +40,13 @@ contract GeneralConfig is BaseGeneralConfig, Utils { } function getCompanionNetwork(TNetwork network) public view virtual returns (TNetwork companionNetwork) { - if (network == DefaultNetwork.RoninMainnet.key()) { - return Network.EthMainnet.key(); - } else if (network == Network.EthMainnet.key()) { - return DefaultNetwork.RoninMainnet.key(); - } else if (network == DefaultNetwork.RoninTestnet.key()) { - return Network.Goerli.key(); - } else if (network == Network.Goerli.key()) { - return DefaultNetwork.RoninTestnet.key(); - } else if (network == DefaultNetwork.Local.key()) { - return DefaultNetwork.Local.key(); - } + if (network == DefaultNetwork.RoninMainnet.key()) return Network.EthMainnet.key(); + if (network == Network.EthMainnet.key()) return DefaultNetwork.RoninMainnet.key(); + if (network == DefaultNetwork.RoninTestnet.key()) return Network.Goerli.key(); + if (network == Network.Goerli.key()) return DefaultNetwork.RoninTestnet.key(); + if (network == DefaultNetwork.Local.key()) return DefaultNetwork.Local.key(); - return network; + revert("Network: Unknown companion network"); } function _setUpContracts() internal virtual override { @@ -102,10 +96,4 @@ contract GeneralConfig is BaseGeneralConfig, Utils { if (sender == address(0x0) && isLocalNetwork) sender = payable(DEFAULT_SENDER); require(sender != address(0x0), "GeneralConfig: Sender is address(0x0)"); } - - function getCompanionNetwork(TNetwork network) external pure returns (Network) { - if (network == DefaultNetwork.RoninTestnet.key()) return Network.Sepolia; - if (network == DefaultNetwork.RoninMainnet.key()) return Network.EthMainnet; - revert("Network: Unknown companion network"); - } } diff --git a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol index a515b6e3..6dc3f7ee 100644 --- a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol +++ b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol @@ -1,104 +1,104 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { Migration } from "../Migration.s.sol"; -import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import { BridgeSlash, BridgeSlashDeploy } from "../contracts/BridgeSlashDeploy.s.sol"; -import { BridgeReward, BridgeRewardDeploy } from "../contracts/BridgeRewardDeploy.s.sol"; -import { BridgeTracking, BridgeTrackingDeploy } from "../contracts/BridgeTrackingDeploy.s.sol"; -import { RoninGatewayV3, RoninGatewayV3Deploy } from "../contracts/RoninGatewayV3Deploy.s.sol"; -import { RoninBridgeManager, RoninBridgeManagerDeploy } from "../contracts/RoninBridgeManagerDeploy.s.sol"; +// import { Migration } from "../Migration.s.sol"; +// import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +// import { BridgeSlash, BridgeSlashDeploy } from "../contracts/BridgeSlashDeploy.s.sol"; +// import { BridgeReward, BridgeRewardDeploy } from "../contracts/BridgeRewardDeploy.s.sol"; +// import { BridgeTracking, BridgeTrackingDeploy } from "../contracts/BridgeTrackingDeploy.s.sol"; +// import { RoninGatewayV3, RoninGatewayV3Deploy } from "../contracts/RoninGatewayV3Deploy.s.sol"; +// import { RoninBridgeManager, RoninBridgeManagerDeploy } from "../contracts/RoninBridgeManagerDeploy.s.sol"; -contract Migration_01_Deploy_RoninBridge is Migration { - BridgeSlash private _bridgeSlash; - BridgeReward private _bridgeReward; - RoninGatewayV3 private _roninGatewayV3; - BridgeTracking private _bridgeTracking; - RoninBridgeManager private _roninBridgeManager; - address private _validatorSet; +// contract Migration_01_Deploy_RoninBridge is Migration { +// BridgeSlash private _bridgeSlash; +// BridgeReward private _bridgeReward; +// RoninGatewayV3 private _roninGatewayV3; +// BridgeTracking private _bridgeTracking; +// RoninBridgeManager private _roninBridgeManager; +// address private _validatorSet; - function run() external { - _roninGatewayV3 = new RoninGatewayV3Deploy().run(); - _bridgeSlash = new BridgeSlashDeploy().run(); - _bridgeReward = new BridgeRewardDeploy().run(); - _bridgeTracking = new BridgeTrackingDeploy().run(); - _roninBridgeManager = new RoninBridgeManagerDeploy().run(); +// function run() external { +// _roninGatewayV3 = new RoninGatewayV3Deploy().run(); +// _bridgeSlash = new BridgeSlashDeploy().run(); +// _bridgeReward = new BridgeRewardDeploy().run(); +// _bridgeTracking = new BridgeTrackingDeploy().run(); +// _roninBridgeManager = new RoninBridgeManagerDeploy().run(); - _initBridgeReward(); - _initBridgeSlash(); - _initRoninGatewayV3(); - _initBridgeTracking(); - _initRoninBridgeManager(); - } +// _initBridgeReward(); +// _initBridgeSlash(); +// _initRoninGatewayV3(); +// _initBridgeTracking(); +// _initRoninBridgeManager(); +// } - function _initRoninBridgeManager() internal logFn("Init RoninBridgeManager") { - ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; - // address[] memory callbackRegisters = new address[](1); - // callbackRegisters[0] = address(_bridgeSlash); - // callbackRegisters[1] = address(_roninGatewayV3); +// function _initRoninBridgeManager() internal logFn("Init RoninBridgeManager") { +// ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; +// // address[] memory callbackRegisters = new address[](1); +// // callbackRegisters[0] = address(_bridgeSlash); +// // callbackRegisters[1] = address(_roninGatewayV3); - _roninBridgeManager.initialize({ - num: param.num, - denom: param.denom, - roninChainId: block.chainid, - expiryDuration: param.expiryDuration, - bridgeContract: address(_roninGatewayV3), - callbackRegisters: param.callbackRegisters, - bridgeOperators: param.bridgeOperators, - governors: param.governors, - voteWeights: param.voteWeights, - targetOptions: param.targetOptions, - targets: param.targets - }); - } +// _roninBridgeManager.initialize({ +// num: param.num, +// denom: param.denom, +// roninChainId: block.chainid, +// expiryDuration: param.expiryDuration, +// bridgeContract: address(_roninGatewayV3), +// callbackRegisters: param.callbackRegisters, +// bridgeOperators: param.bridgeOperators, +// governors: param.governors, +// voteWeights: param.voteWeights, +// targetOptions: param.targetOptions, +// targets: param.targets +// }); +// } - function _initBridgeTracking() internal logFn("Init BridgeTracking") { - _bridgeTracking.initialize({ bridgeContract: address(_roninGatewayV3), validatorContract: _validatorSet, startedAtBlock_: 0 }); - _bridgeTracking.initializeV3({ - bridgeManager: address(_roninBridgeManager), - bridgeSlash: address(_bridgeSlash), - bridgeReward: address(_bridgeReward), - dposGA: address(0x0) - }); - } +// function _initBridgeTracking() internal logFn("Init BridgeTracking") { +// _bridgeTracking.initialize({ bridgeContract: address(_roninGatewayV3), validatorContract: _validatorSet, startedAtBlock_: 0 }); +// _bridgeTracking.initializeV3({ +// bridgeManager: address(_roninBridgeManager), +// bridgeSlash: address(_bridgeSlash), +// bridgeReward: address(_bridgeReward), +// dposGA: address(0x0) +// }); +// } - function _initBridgeReward() internal logFn("Init BridgeReward") { - ISharedArgument.BridgeRewardParam memory param = config.sharedArguments().bridgeReward; - _bridgeReward.initialize({ - bridgeManagerContract: address(_roninBridgeManager), - bridgeTrackingContract: address(_bridgeTracking), - bridgeSlashContract: address(_bridgeSlash), - validatorSetContract: _validatorSet, - dposGA: address(0x0), - rewardPerPeriod: param.rewardPerPeriod - }); - // _bridgeReward.initializeREP2(); - _bridgeReward.initializeV2(); - } +// function _initBridgeReward() internal logFn("Init BridgeReward") { +// ISharedArgument.BridgeRewardParam memory param = config.sharedArguments().bridgeReward; +// _bridgeReward.initialize({ +// bridgeManagerContract: address(_roninBridgeManager), +// bridgeTrackingContract: address(_bridgeTracking), +// bridgeSlashContract: address(_bridgeSlash), +// validatorSetContract: _validatorSet, +// dposGA: address(0x0), +// rewardPerPeriod: param.rewardPerPeriod +// }); +// // _bridgeReward.initializeREP2(); +// _bridgeReward.initializeV2(); +// } - function _initBridgeSlash() internal logFn("Init BridgeSlash") { - _bridgeSlash.initialize({ - validatorContract: _validatorSet, - bridgeManagerContract: address(_roninBridgeManager), - bridgeTrackingContract: address(_bridgeTracking), - dposGA: address(0x0) - }); - } +// function _initBridgeSlash() internal logFn("Init BridgeSlash") { +// _bridgeSlash.initialize({ +// validatorContract: _validatorSet, +// bridgeManagerContract: address(_roninBridgeManager), +// bridgeTrackingContract: address(_bridgeTracking), +// dposGA: address(0x0) +// }); +// } - function _initRoninGatewayV3() internal logFn("Init RoninGatewayV3") { - ISharedArgument.RoninGatewayV3Param memory param = config.sharedArguments().roninGatewayV3; +// function _initRoninGatewayV3() internal logFn("Init RoninGatewayV3") { +// ISharedArgument.RoninGatewayV3Param memory param = config.sharedArguments().roninGatewayV3; - _roninGatewayV3.initialize( - param.roleSetter, - param.numerator, - param.denominator, - param.trustedNumerator, - param.trustedDenominator, - param.withdrawalMigrators, - param.packedAddresses, - param.packedNumbers, - param.standards - ); - _roninGatewayV3.initializeV3(address(_roninBridgeManager)); - } -} +// _roninGatewayV3.initialize( +// param.roleSetter, +// param.numerator, +// param.denominator, +// param.trustedNumerator, +// param.trustedDenominator, +// param.withdrawalMigrators, +// param.packedAddresses, +// param.packedNumbers, +// param.standards +// ); +// _roninGatewayV3.initializeV3(address(_roninBridgeManager)); +// } +// } diff --git a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol index f744a059..a0a47cc1 100644 --- a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol +++ b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol @@ -1,76 +1,76 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { Migration } from "../Migration.s.sol"; -import { Contract } from "../utils/Contract.sol"; -import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; -import { WETHDeploy } from "../contracts/token/WETHDeploy.s.sol"; -import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; -import { MainchainGatewayV3, MainchainGatewayV3Deploy } from "../contracts/MainchainGatewayV3Deploy.s.sol"; -import { WethUnwrapper, MainchainWethUnwrapperDeploy } from "../contracts/MainchainWethUnwrapperDeploy.s.sol"; -import { MainchainBridgeManager, MainchainBridgeManagerDeploy } from "../contracts/MainchainBridgeManagerDeploy.s.sol"; +// import { Migration } from "../Migration.s.sol"; +// import { Contract } from "../utils/Contract.sol"; +// import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; +// import { WETHDeploy } from "../contracts/token/WETHDeploy.s.sol"; +// import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +// import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +// import { MainchainGatewayV3, MainchainGatewayV3Deploy } from "../contracts/MainchainGatewayV3Deploy.s.sol"; +// import { WethUnwrapper, MainchainWethUnwrapperDeploy } from "../contracts/MainchainWethUnwrapperDeploy.s.sol"; +// import { MainchainBridgeManager, MainchainBridgeManagerDeploy } from "../contracts/MainchainBridgeManagerDeploy.s.sol"; -contract Migration_02_Deploy_MainchainBridge is Migration { - using LibCompanionNetwork for *; +// contract Migration_02_Deploy_MainchainBridge is Migration { +// using LibCompanionNetwork for *; - address private _weth; - WethUnwrapper private _mainchainWethUnwrapper; - MainchainGatewayV3 private _mainchainGatewayV3; - MainchainBridgeManager private _mainchainBridgeManager; +// address private _weth; +// WethUnwrapper private _mainchainWethUnwrapper; +// MainchainGatewayV3 private _mainchainGatewayV3; +// MainchainBridgeManager private _mainchainBridgeManager; - function _injectDependencies() internal virtual override { - _setDependencyDeployScript(Contract.WETH.key(), new WETHDeploy()); - } +// function _injectDependencies() internal virtual override { +// _setDependencyDeployScript(Contract.WETH.key(), new WETHDeploy()); +// } - function run() external { - _weth = loadContractOrDeploy(Contract.WETH.key()); - _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); - _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); - _mainchainWethUnwrapper = new MainchainWethUnwrapperDeploy().run(); +// function run() external { +// _weth = loadContractOrDeploy(Contract.WETH.key()); +// _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); +// _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); +// _mainchainWethUnwrapper = new MainchainWethUnwrapperDeploy().run(); - _initMainchainGatewayV3(); - _initMainchainBridgeManager(); - } +// _initMainchainGatewayV3(); +// _initMainchainBridgeManager(); +// } - function _initMainchainBridgeManager() internal logFn("Init RoninBridgeManager") { - ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; - // address[] memory callbackRegisters = new address[](1); - // callbackRegisters[0] = address(_bridgeSlash); - // callbackRegisters[1] = address(_roninGatewayV3); +// function _initMainchainBridgeManager() internal logFn("Init RoninBridgeManager") { +// ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; +// // address[] memory callbackRegisters = new address[](1); +// // callbackRegisters[0] = address(_bridgeSlash); +// // callbackRegisters[1] = address(_roninGatewayV3); - uint256 companionChainId = network().companionChainId(); - _mainchainBridgeManager.initialize({ - num: param.num, - denom: param.denom, - roninChainId: companionChainId, - bridgeContract: address(_mainchainGatewayV3), - callbackRegisters: param.callbackRegisters, - bridgeOperators: param.bridgeOperators, - governors: param.governors, - voteWeights: param.voteWeights, - targetOptions: param.targetOptions, - targets: param.targets - }); - } +// uint256 companionChainId = network().companionChainId(); +// _mainchainBridgeManager.initialize({ +// num: param.num, +// denom: param.denom, +// roninChainId: companionChainId, +// bridgeContract: address(_mainchainGatewayV3), +// callbackRegisters: param.callbackRegisters, +// bridgeOperators: param.bridgeOperators, +// governors: param.governors, +// voteWeights: param.voteWeights, +// targetOptions: param.targetOptions, +// targets: param.targets +// }); +// } - function _initMainchainGatewayV3() internal logFn("Init MainchainGatewayV3") { - ISharedArgument.MainchainGatewayV3Param memory param = config.sharedArguments().mainchainGatewayV3; +// function _initMainchainGatewayV3() internal logFn("Init MainchainGatewayV3") { +// ISharedArgument.MainchainGatewayV3Param memory param = config.sharedArguments().mainchainGatewayV3; - uint256 companionChainId = network().companionChainId(); - _mainchainGatewayV3.initialize( - param.roleSetter, - IWETH(_weth), - companionChainId, - param.numerator, - param.highTierVWNumerator, - param.denominator, - param.addresses, - param.thresholds, - param.standards - ); - _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); - _mainchainGatewayV3.initializeV3(); - _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethUnwrapper))); - } -} +// uint256 companionChainId = network().companionChainId(); +// _mainchainGatewayV3.initialize( +// param.roleSetter, +// IWETH(_weth), +// companionChainId, +// param.numerator, +// param.highTierVWNumerator, +// param.denominator, +// param.addresses, +// param.thresholds, +// param.standards +// ); +// _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); +// _mainchainGatewayV3.initializeV3(); +// _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethUnwrapper))); +// } +// } diff --git a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol index ad534228..1bee4de5 100644 --- a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol +++ b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol @@ -1,46 +1,46 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; -import { Migration } from "../Migration.s.sol"; -import { Contract } from "../utils/Contract.sol"; -import { TNetwork, Network } from "../utils/Network.sol"; -import { Migration_01_Deploy_RoninBridge } from "./01_Deploy_RoninBridge.s.sol"; -import { LibCompanionNetwork } from "../shared/libraries/LibCompanionNetwork.sol"; -import { Migration_02_Deploy_MainchainBridge } from "./02_Deploy_MainchainBridge.s.sol"; - -contract Deploy_v0_3_1 is Migration { - using LibCompanionNetwork for *; - - function run() external { - TNetwork currentNetwork = network(); - TNetwork companionNetwork = currentNetwork.companionNetwork(); - - if ( - currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() - ) { - new Migration_01_Deploy_RoninBridge().run(); - - config.createFork(companionNetwork); - config.switchTo(companionNetwork); - - new Migration_02_Deploy_MainchainBridge().run(); - - config.switchTo(currentNetwork); - } else if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { - config.createFork(companionNetwork); - config.switchTo(companionNetwork); - - new Migration_01_Deploy_RoninBridge().run(); - - config.switchTo(currentNetwork); - - new Migration_02_Deploy_MainchainBridge().run(); - } else if (currentNetwork == DefaultNetwork.Local.key()) { - new Migration_01_Deploy_RoninBridge().run(); - new Migration_02_Deploy_MainchainBridge().run(); - } else { - revert("Unsupported network"); - } - } -} +// import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +// import { Migration } from "../Migration.s.sol"; +// import { Contract } from "../utils/Contract.sol"; +// import { TNetwork, Network } from "../utils/Network.sol"; +// import { Migration_01_Deploy_RoninBridge } from "./01_Deploy_RoninBridge.s.sol"; +// import { LibCompanionNetwork } from "../shared/libraries/LibCompanionNetwork.sol"; +// import { Migration_02_Deploy_MainchainBridge } from "./02_Deploy_MainchainBridge.s.sol"; + +// contract Deploy_v0_3_1 is Migration { +// using LibCompanionNetwork for *; + +// function run() external { +// TNetwork currentNetwork = network(); +// TNetwork companionNetwork = currentNetwork.companionNetwork(); + +// if ( +// currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() +// ) { +// new Migration_01_Deploy_RoninBridge().run(); + +// config.createFork(companionNetwork); +// config.switchTo(companionNetwork); + +// new Migration_02_Deploy_MainchainBridge().run(); + +// config.switchTo(currentNetwork); +// } else if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { +// config.createFork(companionNetwork); +// config.switchTo(companionNetwork); + +// new Migration_01_Deploy_RoninBridge().run(); + +// config.switchTo(currentNetwork); + +// new Migration_02_Deploy_MainchainBridge().run(); +// } else if (currentNetwork == DefaultNetwork.Local.key()) { +// new Migration_01_Deploy_RoninBridge().run(); +// new Migration_02_Deploy_MainchainBridge().run(); +// } else { +// revert("Unsupported network"); +// } +// } +// } diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index 5fec45ae..fa0f4d7e 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -3,20 +3,22 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; +import { Migration } from "../Migration.s.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; + +abstract contract Factory__MapTokensMainchain is Migration { + using LibCompanionNetwork for *; -abstract contract Factory__MapTokensMainchain is BridgeMigration { RoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; @@ -25,10 +27,9 @@ abstract contract Factory__MapTokensMainchain is BridgeMigration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainGatewayV3.key()); - _mainchainBridgeManager = - _config.getAddress(_config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).key(), Contract.MainchainBridgeManager.key()); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); _governor = _initCaller(); } @@ -84,9 +85,9 @@ abstract contract Factory__MapTokensMainchain is BridgeMigration { // ================ VERIFY AND EXECUTE PROPOSAL =============== - _verifyMainchainProposalGasAmount(targets, values, calldatas, gasAmounts); + // _verifyMainchainProposalGasAmount(targets, values, calldatas, gasAmounts); - uint256 chainId = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + uint256 chainId = network().companionChainId(); vm.broadcast(_governor); _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index 346ab46a..6fb30cd8 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; @@ -13,22 +12,25 @@ import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Contract } from "../utils/Contract.sol"; -import { BridgeMigration } from "../BridgeMigration.sol"; +import { Migration } from "../Migration.s.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../IGeneralConfigExtended.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; + +abstract contract Factory__MapTokensRoninchain is Migration { + using LibCompanionNetwork for *; -abstract contract Factory__MapTokensRoninchain is BridgeMigration { RoninBridgeManager internal _roninBridgeManager; address internal _roninGatewayV3; address private _governor; function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(_config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = _config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); _governor = _initCaller(); _cheatWeightOperator(_governor); @@ -65,7 +67,7 @@ abstract contract Factory__MapTokensRoninchain is BridgeMigration { for (uint256 i; i < N; ++i) { roninTokens[i] = tokenInfos[i].roninToken; mainchainTokens[i] = tokenInfos[i].mainchainToken; - chainIds[i] = _config.getCompanionNetwork(_config.getNetworkByChainId(block.chainid)).chainId(); + chainIds[i] = network().companionChainId(); standards[i] = TokenStandard.ERC20; } @@ -106,7 +108,7 @@ abstract contract Factory__MapTokensRoninchain is BridgeMigration { // ================ VERIFY AND EXECUTE PROPOSAL =============== - _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); + // _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); vm.broadcast(_governor); _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index ac0a47a4..5809d277 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -68,8 +68,8 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { assertEq(manager.globalProposalVoted(globalProposal.nonce, cheatGovernor), true); // Check if the operator is added assertTrue(manager.isBridgeOperator(cheatOperator), "operator not added"); - // Check if the governor is added - assertTrue(manager.isBridgeGovernor(cheatGovernor), "governor not added"); + // // Check if the governor is added + // assertTrue(manager.isBridgeGovernor(cheatGovernor), "governor not added"); } diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index 55a621be..80cd9d81 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -64,6 +64,7 @@ library LibProposal { nonce: nonce, chainId: block.chainid, expiryTimestamp: expiryTimestamp, + executor: address(0), targets: targets, values: values, calldatas: calldatas, @@ -83,6 +84,7 @@ library LibProposal { proposal = GlobalProposal.GlobalProposalDetail({ nonce: nonce, expiryTimestamp: expiryTimestamp, + executor: address(0), targetOptions: targetOptions, values: values, calldatas: calldatas, @@ -102,7 +104,7 @@ library LibProposal { } else { vm.broadcast(governor0); } - manager.proposeProposalForCurrentNetwork(proposal.expiryTimestamp, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts, support); + manager.proposeProposalForCurrentNetwork(proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts, support); uint256 totalGas = proposal.gasAmounts.sum(); // 20% more gas for each governor From 225f46555bb931f30abe46bf710fa6f0244b9a81 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 12 Apr 2024 13:47:39 +0700 Subject: [PATCH 168/305] script: fix double push in `setup` --- .../20240411-p2-upgrade-bridge-ronin-chain.s.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index 12c9b9dc..ba890963 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -30,16 +30,16 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H function setUp() public override { super.setUp(); - _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); - _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); - _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); - _newRoninBridgeManager = RoninBridgeManager(address(0xdeadbeef)); // TODO: fulfill here _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); } function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { + _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); + _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); + _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); + _changeAdminOfEnforcer(); _upgradeBridge(); } From d533dc3bfbd30e90a7bc4745c83c1ee913ce646d Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 12 Apr 2024 14:12:56 +0700 Subject: [PATCH 169/305] script: fix conflicted post check --- .../20231218-maptoken-mainchain.s.sol | 9 +- .../20240115-maptoken-mainchain.s.sol | 12 +- .../20240115-maptoken-roninchain.s.sol | 9 +- .../20240131-maptoken-pixel-mainchain.s.sol | 11 +- .../20240206-maptoken-banana-mainchain.s.sol | 12 +- .../20240206-maptoken-banana-roninchain.s.sol | 133 ++++++----- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 1 - ...0240411-p3-upgrade-bridge-main-chain.s.sol | 1 - script/GeneralConfig.sol | 5 +- script/Migration.s.sol | 56 +++-- .../deploy-v0.3.1/01_Deploy_RoninBridge.s.sol | 214 ++++++++++------- .../02_Deploy_MainchainBridge.s.sol | 137 ++++++----- script/deploy-v0.3.1/Deploy.v0.3.1.s.sol | 86 +++---- script/post-check/BasePostCheck.s.sol | 3 +- ...ridgeManager_CRUD_addBridgeOperators.s.sol | 2 +- .../PostCheck_BridgeManager_Proposal.s.sol | 222 +++++++++++++++--- .../shared/libraries/LibCompanionNetwork.sol | 2 + script/shared/libraries/LibProposal.sol | 74 +++++- 18 files changed, 621 insertions(+), 368 deletions(-) diff --git a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol index 88995814..7cf53616 100644 --- a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol @@ -76,14 +76,9 @@ contract Migration__20231215_MapTokenMainchain is Migration { bytes[] memory calldatas = proxyData.toSingletonArray(); uint256[] memory gasAmounts = uint256(1_000_000).toSingletonArray(); - TNetwork currentNetwork = network(); - TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - config.createFork(companionNetwork); - config.switchTo(companionNetwork); - uint256 companionChainId = block.chainid; - LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); - config.switchTo(currentNetwork); + LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); vm.broadcast(sender()); _roninBridgeManager.propose(companionChainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index 2b13ebeb..6c30a645 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -11,10 +11,13 @@ import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/librari import { Contract } from "../utils/Contract.sol"; import { Migration } from "../Migration.s.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { TNetwork, Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; contract Migration__MapTokenMainchain is Migration { + using LibCompanionNetwork for *; + RoninBridgeManager internal _roninBridgeManager; address constant _pixelRoninToken = address(0x8b50c162494567B3c8B7F00F6031341861c8dEeD); @@ -145,14 +148,9 @@ contract Migration__MapTokenMainchain is Migration { calldatas[3] = _addAxieChatGovernorAddress(); gasAmounts[3] = 1_000_000; - TNetwork currentNetwork = network(); - TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - config.createFork(companionNetwork); - config.switchTo(companionNetwork); - uint256 companionChainId = block.chainid; - LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); - config.switchTo(currentNetwork); + LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); vm.broadcast(sender()); _roninBridgeManager.propose(companionChainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index e6e4f5f0..aed10322 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -118,14 +118,9 @@ contract Migration__MapTokenRoninchain is Migration { calldatas[2] = _addAxieChatGovernorAddress(); gasAmounts[2] = 1_000_000; - TNetwork currentNetwork = network(); - TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - config.createFork(companionNetwork); - config.switchTo(companionNetwork); - uint256 companionChainId = block.chainid; - LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); - config.switchTo(currentNetwork); + LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); vm.broadcast(sender()); _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol index ea78e79c..df2762eb 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol @@ -10,6 +10,7 @@ import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; import { Migration } from "../Migration.s.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { TNetwork, Network } from "../utils/Network.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; import { Contract } from "../utils/Contract.sol"; @@ -19,6 +20,7 @@ import "./update-axiechat-config.s.sol"; contract Migration__20240131_MapTokenPixelMainchain is Migration, Migration__MapToken_Pixel_Config, Migration__Update_AxieChat_Config { using LibProposal for *; + using LibCompanionNetwork for *; RoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; @@ -112,14 +114,9 @@ contract Migration__20240131_MapTokenPixelMainchain is Migration, Migration__Map // ================ VERIFY AND EXECUTE PROPOSAL =============== - TNetwork currentNetwork = network(); - TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - config.createFork(companionNetwork); - config.switchTo(companionNetwork); - uint256 companionChainId = block.chainid; - LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); - config.switchTo(currentNetwork); + LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); vm.broadcast(_governor); _roninBridgeManager.propose(companionChainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index a65d8abd..9f151d8a 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -11,6 +11,7 @@ import { Contract } from "../utils/Contract.sol"; import { Migration } from "../Migration.s.sol"; import { TNetwork, Network } from "../utils/Network.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { Contract } from "../utils/Contract.sol"; @@ -26,6 +27,8 @@ contract Migration__20240206_MapTokenBananaMainchain is Migration__MapToken_Genkai_Config, Migration__ChangeGV_StableNode_Config { + using LibCompanionNetwork for *; + RoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; @@ -138,14 +141,9 @@ contract Migration__20240206_MapTokenBananaMainchain is // ================ VERIFY AND EXECUTE PROPOSAL =============== - TNetwork currentNetwork = network(); - TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - config.createFork(companionNetwork); - config.switchTo(companionNetwork); - uint256 companionChainId = block.chainid; - LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); - config.switchTo(currentNetwork); + LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); console2.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index 31540bf1..55cc2c6b 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -74,21 +74,23 @@ contract Migration__20240206_MapTokenBananaRoninChain is // ============= MAP NEW BANANA, VX, GENKAI TOKEN =========== - uint256 companionChainId = network().companionChainId(); - roninTokens[0] = _bananaRoninToken; - mainchainTokens[0] = _bananaMainchainToken; - chainIds[0] = companionChainId; - standards[0] = TokenStandard.ERC20; - - roninTokens[1] = _VxRoninToken; - mainchainTokens[1] = _VxMainchainToken; - chainIds[1] = companionChainId; - standards[1] = TokenStandard.ERC721; - - roninTokens[2] = _genkaiRoninToken; - mainchainTokens[2] = _genkaiMainchainToken; - chainIds[2] = companionChainId; - standards[2] = TokenStandard.ERC721; + { + uint256 companionChainId = network().companionChainId(); + roninTokens[0] = _bananaRoninToken; + mainchainTokens[0] = _bananaMainchainToken; + chainIds[0] = companionChainId; + standards[0] = TokenStandard.ERC20; + + roninTokens[1] = _VxRoninToken; + mainchainTokens[1] = _VxMainchainToken; + chainIds[1] = companionChainId; + standards[1] = TokenStandard.ERC721; + + roninTokens[2] = _genkaiRoninToken; + mainchainTokens[2] = _genkaiMainchainToken; + chainIds[2] = companionChainId; + standards[2] = TokenStandard.ERC721; + } // function mapTokens( // address[] calldata _roninTokens, @@ -96,55 +98,58 @@ contract Migration__20240206_MapTokenBananaRoninChain is // uint256[] calldata chainIds, // TokenStandard[] calldata _standards // ) - bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[0] = _roninGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; - - // ============= SET MIN THRESHOLD FOR BANANA, PIXEL, AGG ============ - // function setMinimumThresholds( - // address[] calldata _tokens, - // uint256[] calldata _thresholds - // ); - address[] memory roninTokensToSetMinThreshold = new address[](5); - uint256[] memory minThresholds = new uint256[](5); - - roninTokensToSetMinThreshold[0] = _bananaRoninToken; - minThresholds[0] = _bananaMinThreshold; - - roninTokensToSetMinThreshold[1] = pixelRoninToken; - minThresholds[1] = pixelMinThreshold; - - roninTokensToSetMinThreshold[2] = pixelMainchainToken; - minThresholds[2] = 0; - - roninTokensToSetMinThreshold[3] = aggRoninToken; - minThresholds[3] = aggMinThreshold; - - roninTokensToSetMinThreshold[4] = aggMainchainToken; - minThresholds[4] = 0; - - innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); - proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[1] = _roninGatewayV3; - values[1] = 0; - calldatas[1] = proxyData; - gasAmounts[1] = 1_000_000; - - // =============== AXIE CHAT UPDATE =========== - targets[2] = address(_roninBridgeManager); - values[2] = 0; - calldatas[2] = _removeStableNodeGovernorAddress(); - gasAmounts[2] = 1_000_000; - - targets[3] = address(_roninBridgeManager); - values[3] = 0; - calldatas[3] = _addStableNodeGovernorAddress(); - gasAmounts[3] = 1_000_000; + { + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[0] = _roninGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + // ============= SET MIN THRESHOLD FOR BANANA, PIXEL, AGG ============ + // function setMinimumThresholds( + // address[] calldata _tokens, + // uint256[] calldata _thresholds + // ); + + address[] memory roninTokensToSetMinThreshold = new address[](5); + uint256[] memory minThresholds = new uint256[](5); + + roninTokensToSetMinThreshold[0] = _bananaRoninToken; + minThresholds[0] = _bananaMinThreshold; + + roninTokensToSetMinThreshold[1] = pixelRoninToken; + minThresholds[1] = pixelMinThreshold; + + roninTokensToSetMinThreshold[2] = pixelMainchainToken; + minThresholds[2] = 0; + + roninTokensToSetMinThreshold[3] = aggRoninToken; + minThresholds[3] = aggMinThreshold; + + roninTokensToSetMinThreshold[4] = aggMainchainToken; + minThresholds[4] = 0; + + innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); + proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[1] = _roninGatewayV3; + values[1] = 0; + calldatas[1] = proxyData; + gasAmounts[1] = 1_000_000; + + // =============== AXIE CHAT UPDATE =========== + targets[2] = address(_roninBridgeManager); + values[2] = 0; + calldatas[2] = _removeStableNodeGovernorAddress(); + gasAmounts[2] = 1_000_000; + + targets[3] = address(_roninBridgeManager); + values[3] = 0; + calldatas[3] = _addStableNodeGovernorAddress(); + gasAmounts[3] = 1_000_000; + } // ================ VERIFY AND EXECUTE PROPOSAL =============== diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index ba890963..d231c4d9 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -10,7 +10,6 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index 19ed6835..213649bb 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -10,7 +10,6 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 5a04aa4c..b7c39a1d 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.23; import { console2 as console } from "forge-std/console2.sol"; import { BaseGeneralConfig } from "@fdk/BaseGeneralConfig.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; -import { TNetwork } from "@fdk/types/Types.sol"; import { Contract } from "./utils/Contract.sol"; import { TNetwork, Network } from "./utils/Network.sol"; import { Utils } from "./utils/Utils.sol"; @@ -42,8 +41,8 @@ contract GeneralConfig is BaseGeneralConfig, Utils { function getCompanionNetwork(TNetwork network) public view virtual returns (TNetwork companionNetwork) { if (network == DefaultNetwork.RoninMainnet.key()) return Network.EthMainnet.key(); if (network == Network.EthMainnet.key()) return DefaultNetwork.RoninMainnet.key(); - if (network == DefaultNetwork.RoninTestnet.key()) return Network.Goerli.key(); - if (network == Network.Goerli.key()) return DefaultNetwork.RoninTestnet.key(); + if (network == DefaultNetwork.RoninTestnet.key()) return Network.Sepolia.key(); + if (network == Network.Sepolia.key()) return DefaultNetwork.RoninTestnet.key(); if (network == DefaultNetwork.Local.key()) return DefaultNetwork.Local.key(); revert("Network: Unknown companion network"); diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 195f8df3..146a3c5f 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -30,6 +30,8 @@ contract Migration is PostChecker, Utils { uint256 internal constant DEFAULT_PROPOSAL_GAS = 1_000_000; ISharedArgument internal constant config = ISharedArgument(address(CONFIG)); + bool internal _isLocalETH; + function setUp() public virtual override { super.setUp(); } @@ -93,6 +95,8 @@ contract Migration is PostChecker, Utils { param.mainchainBridgeManager.targets = targets; } else if (network() == DefaultNetwork.RoninTestnet.key()) { // Undefined + } else if (network() == DefaultNetwork.RoninMainnet.key()) { + // Undefined } else if (network() == DefaultNetwork.Local.key()) { // test param.test.numberOfBlocksInEpoch = 200; @@ -198,37 +202,43 @@ contract Migration is PostChecker, Utils { rawArgs = abi.encode(param); } - function _getProxyAdmin() internal virtual override returns (address payable) { - bool isLocalNetwork = network() == DefaultNetwork.Local.key(); - return isLocalNetwork ? payable(config.sharedArguments().test.proxyAdmin) : super._getProxyAdmin(); - } - - function _getProxyAdminFromCurrentNetwork() internal view virtual returns (address proxyAdmin) { + function _getProxyAdmin() internal virtual override returns (address payable proxyAdmin) { TNetwork currentNetwork = network(); - if (currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key()) { - proxyAdmin = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); - } else if (currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { - proxyAdmin = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + if ( + currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == Network.RoninDevnet.key() + ) { + proxyAdmin = loadContract(Contract.RoninBridgeManager.key()); + } else if (currentNetwork == Network.Sepolia.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { + proxyAdmin = loadContract(Contract.MainchainBridgeManager.key()); + } else if (currentNetwork == DefaultNetwork.Local.key()) { + TContract managerContractType = _isLocalETH ? Contract.MainchainBridgeManager.key() : Contract.RoninBridgeManager.key(); + try config.getAddressFromCurrentNetwork(managerContractType) returns (address payable addr) { + proxyAdmin = addr; + } catch { + proxyAdmin = payable(config.sharedArguments().test.proxyAdmin); + } } else { - revert("BridgeMigration(_getProxyAdminFromCurrentNetwork): Unhandled case"); + console.log("Network not supported".yellow(), currentNetwork.networkName()); + console.log("Chain Id".yellow(), block.chainid); + revert("BridgeMigration(_getProxyAdmin): Unhandled case"); } } function _upgradeRaw(address proxyAdmin, address payable proxy, address logic, bytes memory args) internal virtual override { - if (logic.codehash == payable(proxy).getProxyImplementation({ nullCheck: true }).codehash) { + if (!config.isPostChecking() && logic.codehash == payable(proxy).getProxyImplementation({ nullCheck: true }).codehash) { console.log("BaseMigration: Logic is already upgraded!".yellow()); return; } assertTrue(proxyAdmin != address(0x0), "BridgeMigration: Invalid {proxyAdmin} or {proxy} is not a Proxy contract"); - address admin = _getProxyAdminFromCurrentNetwork(); + address admin = _getProxyAdmin(); TNetwork currentNetwork = network(); if (proxyAdmin == admin) { // in case proxyAdmin is GovernanceAdmin if ( currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key() - || currentNetwork == Network.RoninDevnet.key() + || currentNetwork == Network.RoninDevnet.key() || currentNetwork == DefaultNetwork.Local.key() ) { // handle for ronin network console.log(StdStyle.yellow("Voting on RoninBridgeManager for upgrading...")); @@ -244,6 +254,7 @@ contract Migration is PostChecker, Utils { : abi.encodeCall(TransparentUpgradeableProxy.upgradeToAndCall, (logic, args)); Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ + manager: address(manager), nonce: manager.round(block.chainid) + 1, expiryTimestamp: block.timestamp + 10 minutes, targets: targets, @@ -254,7 +265,7 @@ contract Migration is PostChecker, Utils { manager.executeProposal(proposal); assertEq(proxy.getProxyImplementation(), logic, "BridgeMigration: Upgrade failed"); - } else if (currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { + } else if (currentNetwork == Network.Sepolia.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { // handle for ethereum revert("BridgeMigration: Unhandled case for ETH"); } else { @@ -277,6 +288,10 @@ contract Migration is PostChecker, Utils { } } + function _deployLogic(TContract contractType) internal virtual override returns (address payable logic) { + logic = _deployLogic(contractType, EMPTY_ARGS); + } + function _deployProxy( TContract contractType, bytes memory args @@ -302,4 +317,15 @@ contract Migration is PostChecker, Utils { config.setAddress(network(), contractType, deployed); ARTIFACT_FACTORY.generateArtifact(sender(), deployed, proxyAbsolutePath, string.concat(contractName, "Proxy"), args, proxyNonce); } + + function _getProxyAdminFromCurrentNetwork() internal view virtual returns (address proxyAdmin) { + TNetwork currentNetwork = network(); + if (currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key()) { + proxyAdmin = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + } else if (currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { + proxyAdmin = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + } else { + revert("BridgeMigration(_getProxyAdminFromCurrentNetwork): Unhandled case"); + } + } } diff --git a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol index 6dc3f7ee..3c296cf4 100644 --- a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol +++ b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol @@ -1,104 +1,136 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -// import { Migration } from "../Migration.s.sol"; -// import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -// import { BridgeSlash, BridgeSlashDeploy } from "../contracts/BridgeSlashDeploy.s.sol"; -// import { BridgeReward, BridgeRewardDeploy } from "../contracts/BridgeRewardDeploy.s.sol"; -// import { BridgeTracking, BridgeTrackingDeploy } from "../contracts/BridgeTrackingDeploy.s.sol"; -// import { RoninGatewayV3, RoninGatewayV3Deploy } from "../contracts/RoninGatewayV3Deploy.s.sol"; -// import { RoninBridgeManager, RoninBridgeManagerDeploy } from "../contracts/RoninBridgeManagerDeploy.s.sol"; +import { console } from "forge-std/console.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { Migration } from "../Migration.s.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { TContract, Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { BridgeSlash, BridgeSlashDeploy } from "../contracts/BridgeSlashDeploy.s.sol"; +import { BridgeReward, BridgeRewardDeploy } from "../contracts/BridgeRewardDeploy.s.sol"; +import { BridgeTracking, BridgeTrackingDeploy } from "../contracts/BridgeTrackingDeploy.s.sol"; +import { RoninGatewayV3, RoninGatewayV3Deploy } from "../contracts/RoninGatewayV3Deploy.s.sol"; +import { RoninBridgeManagerConstructor, RoninBridgeManager, RoninBridgeManagerDeploy } from "../contracts/RoninBridgeManagerDeploy.s.sol"; -// contract Migration_01_Deploy_RoninBridge is Migration { -// BridgeSlash private _bridgeSlash; -// BridgeReward private _bridgeReward; -// RoninGatewayV3 private _roninGatewayV3; -// BridgeTracking private _bridgeTracking; -// RoninBridgeManager private _roninBridgeManager; -// address private _validatorSet; +contract Migration_01_Deploy_RoninBridge is Migration { + using StdStyle for *; -// function run() external { -// _roninGatewayV3 = new RoninGatewayV3Deploy().run(); -// _bridgeSlash = new BridgeSlashDeploy().run(); -// _bridgeReward = new BridgeRewardDeploy().run(); -// _bridgeTracking = new BridgeTrackingDeploy().run(); -// _roninBridgeManager = new RoninBridgeManagerDeploy().run(); + BridgeSlash private _bridgeSlash; + BridgeReward private _bridgeReward; + RoninGatewayV3 private _roninGatewayV3; + BridgeTracking private _bridgeTracking; + RoninBridgeManager private _roninBridgeManager; + address private _validatorSet; -// _initBridgeReward(); -// _initBridgeSlash(); -// _initRoninGatewayV3(); -// _initBridgeTracking(); -// _initRoninBridgeManager(); -// } + function run() external { + _roninGatewayV3 = new RoninGatewayV3Deploy().run(); + _bridgeSlash = new BridgeSlashDeploy().run(); + _bridgeReward = new BridgeRewardDeploy().run(); + _bridgeTracking = new BridgeTrackingDeploy().run(); -// function _initRoninBridgeManager() internal logFn("Init RoninBridgeManager") { -// ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; -// // address[] memory callbackRegisters = new address[](1); -// // callbackRegisters[0] = address(_bridgeSlash); -// // callbackRegisters[1] = address(_roninGatewayV3); + ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; + address[] memory callbackRegisters = new address[](1); + callbackRegisters[0] = address(_bridgeSlash); + callbackRegisters[1] = address(_roninGatewayV3); -// _roninBridgeManager.initialize({ -// num: param.num, -// denom: param.denom, -// roninChainId: block.chainid, -// expiryDuration: param.expiryDuration, -// bridgeContract: address(_roninGatewayV3), -// callbackRegisters: param.callbackRegisters, -// bridgeOperators: param.bridgeOperators, -// governors: param.governors, -// voteWeights: param.voteWeights, -// targetOptions: param.targetOptions, -// targets: param.targets -// }); -// } + _roninBridgeManager = RoninBridgeManager( + new RoninBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + RoninBridgeManagerConstructor.initialize, + ( + param.num, + param.denom, + param.roninChainId, + param.expiryDuration, + param.bridgeContract, + param.callbackRegisters, + param.bridgeOperators, + param.governors, + param.voteWeights, + param.targetOptions, + param.targets + ) + ) + ).run() + ); -// function _initBridgeTracking() internal logFn("Init BridgeTracking") { -// _bridgeTracking.initialize({ bridgeContract: address(_roninGatewayV3), validatorContract: _validatorSet, startedAtBlock_: 0 }); -// _bridgeTracking.initializeV3({ -// bridgeManager: address(_roninBridgeManager), -// bridgeSlash: address(_bridgeSlash), -// bridgeReward: address(_bridgeReward), -// dposGA: address(0x0) -// }); -// } + _initBridgeReward(); + _initBridgeSlash(); + _initRoninGatewayV3(); + _initBridgeTracking(); + // _initRoninBridgeManager(); + } -// function _initBridgeReward() internal logFn("Init BridgeReward") { -// ISharedArgument.BridgeRewardParam memory param = config.sharedArguments().bridgeReward; -// _bridgeReward.initialize({ -// bridgeManagerContract: address(_roninBridgeManager), -// bridgeTrackingContract: address(_bridgeTracking), -// bridgeSlashContract: address(_bridgeSlash), -// validatorSetContract: _validatorSet, -// dposGA: address(0x0), -// rewardPerPeriod: param.rewardPerPeriod -// }); -// // _bridgeReward.initializeREP2(); -// _bridgeReward.initializeV2(); -// } + function _initRoninBridgeManager() internal logFn("Init RoninBridgeManager") { + ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; + // address[] memory callbackRegisters = new address[](1); + // callbackRegisters[0] = address(_bridgeSlash); + // callbackRegisters[1] = address(_roninGatewayV3); -// function _initBridgeSlash() internal logFn("Init BridgeSlash") { -// _bridgeSlash.initialize({ -// validatorContract: _validatorSet, -// bridgeManagerContract: address(_roninBridgeManager), -// bridgeTrackingContract: address(_bridgeTracking), -// dposGA: address(0x0) -// }); -// } + // _roninBridgeManager.initialize({ + // num: param.num, + // denom: param.denom, + // roninChainId: block.chainid, + // expiryDuration: param.expiryDuration, + // bridgeContract: address(_roninGatewayV3), + // callbackRegisters: param.callbackRegisters, + // bridgeOperators: param.bridgeOperators, + // governors: param.governors, + // voteWeights: param.voteWeights, + // targetOptions: param.targetOptions, + // targets: param.targets + // }); + } -// function _initRoninGatewayV3() internal logFn("Init RoninGatewayV3") { -// ISharedArgument.RoninGatewayV3Param memory param = config.sharedArguments().roninGatewayV3; + function _initBridgeTracking() internal logFn("Init BridgeTracking") { + _bridgeTracking.initialize({ bridgeContract: address(_roninGatewayV3), validatorContract: _validatorSet, startedAtBlock_: 0 }); + _bridgeTracking.initializeV3({ + bridgeManager: address(_roninBridgeManager), + bridgeSlash: address(_bridgeSlash), + bridgeReward: address(_bridgeReward), + dposGA: address(0x0) + }); + } -// _roninGatewayV3.initialize( -// param.roleSetter, -// param.numerator, -// param.denominator, -// param.trustedNumerator, -// param.trustedDenominator, -// param.withdrawalMigrators, -// param.packedAddresses, -// param.packedNumbers, -// param.standards -// ); -// _roninGatewayV3.initializeV3(address(_roninBridgeManager)); -// } -// } + function _initBridgeReward() internal logFn("Init BridgeReward") { + ISharedArgument.BridgeRewardParam memory param = config.sharedArguments().bridgeReward; + _bridgeReward.initialize({ + bridgeManagerContract: address(_roninBridgeManager), + bridgeTrackingContract: address(_bridgeTracking), + bridgeSlashContract: address(_bridgeSlash), + validatorSetContract: _validatorSet, + dposGA: address(0x0), + rewardPerPeriod: param.rewardPerPeriod + }); + // _bridgeReward.initializeREP2(); + _bridgeReward.initializeV2(); + } + + function _initBridgeSlash() internal logFn("Init BridgeSlash") { + _bridgeSlash.initialize({ + validatorContract: _validatorSet, + bridgeManagerContract: address(_roninBridgeManager), + bridgeTrackingContract: address(_bridgeTracking), + dposGA: address(0x0) + }); + } + + function _initRoninGatewayV3() internal logFn("Init RoninGatewayV3") { + ISharedArgument.RoninGatewayV3Param memory param = config.sharedArguments().roninGatewayV3; + + _roninGatewayV3.initialize( + param.roleSetter, + param.numerator, + param.denominator, + param.trustedNumerator, + param.trustedDenominator, + param.withdrawalMigrators, + param.packedAddresses, + param.packedNumbers, + param.standards + ); + _roninGatewayV3.initializeV3(address(_roninBridgeManager)); + } +} diff --git a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol index a0a47cc1..fa1158e6 100644 --- a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol +++ b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol @@ -1,76 +1,85 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -// import { Migration } from "../Migration.s.sol"; -// import { Contract } from "../utils/Contract.sol"; -// import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; -// import { WETHDeploy } from "../contracts/token/WETHDeploy.s.sol"; -// import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -// import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; -// import { MainchainGatewayV3, MainchainGatewayV3Deploy } from "../contracts/MainchainGatewayV3Deploy.s.sol"; -// import { WethUnwrapper, MainchainWethUnwrapperDeploy } from "../contracts/MainchainWethUnwrapperDeploy.s.sol"; -// import { MainchainBridgeManager, MainchainBridgeManagerDeploy } from "../contracts/MainchainBridgeManagerDeploy.s.sol"; +import { console } from "forge-std/console.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { Migration } from "../Migration.s.sol"; +import { TContract, Contract } from "../utils/Contract.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; +import { WETHDeploy } from "../contracts/token/WETHDeploy.s.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { MainchainGatewayV3, MainchainGatewayV3Deploy } from "../contracts/MainchainGatewayV3Deploy.s.sol"; +import { WethUnwrapper, MainchainWethUnwrapperDeploy } from "../contracts/MainchainWethUnwrapperDeploy.s.sol"; +import { MainchainBridgeManager, MainchainBridgeManagerDeploy } from "../contracts/MainchainBridgeManagerDeploy.s.sol"; -// contract Migration_02_Deploy_MainchainBridge is Migration { -// using LibCompanionNetwork for *; +contract Migration_02_Deploy_MainchainBridge is Migration { + using StdStyle for *; + using LibCompanionNetwork for *; -// address private _weth; -// WethUnwrapper private _mainchainWethUnwrapper; -// MainchainGatewayV3 private _mainchainGatewayV3; -// MainchainBridgeManager private _mainchainBridgeManager; + address private _weth; + WethUnwrapper private _mainchainWethUnwrapper; + MainchainGatewayV3 private _mainchainGatewayV3; + MainchainBridgeManager private _mainchainBridgeManager; -// function _injectDependencies() internal virtual override { -// _setDependencyDeployScript(Contract.WETH.key(), new WETHDeploy()); -// } + function _injectDependencies() internal virtual override { + _setDependencyDeployScript(Contract.WETH.key(), new WETHDeploy()); + } -// function run() external { -// _weth = loadContractOrDeploy(Contract.WETH.key()); -// _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); -// _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); -// _mainchainWethUnwrapper = new MainchainWethUnwrapperDeploy().run(); + function run() external { + _isLocalETH = true; -// _initMainchainGatewayV3(); -// _initMainchainBridgeManager(); -// } + _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); + _weth = loadContractOrDeploy(Contract.WETH.key()); + _mainchainGatewayV3 = new MainchainGatewayV3Deploy().run(); + _mainchainWethUnwrapper = new MainchainWethUnwrapperDeploy().run(); -// function _initMainchainBridgeManager() internal logFn("Init RoninBridgeManager") { -// ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; -// // address[] memory callbackRegisters = new address[](1); -// // callbackRegisters[0] = address(_bridgeSlash); -// // callbackRegisters[1] = address(_roninGatewayV3); + _initMainchainGatewayV3(); + _initMainchainBridgeManager(); -// uint256 companionChainId = network().companionChainId(); -// _mainchainBridgeManager.initialize({ -// num: param.num, -// denom: param.denom, -// roninChainId: companionChainId, -// bridgeContract: address(_mainchainGatewayV3), -// callbackRegisters: param.callbackRegisters, -// bridgeOperators: param.bridgeOperators, -// governors: param.governors, -// voteWeights: param.voteWeights, -// targetOptions: param.targetOptions, -// targets: param.targets -// }); -// } + _isLocalETH = false; + } -// function _initMainchainGatewayV3() internal logFn("Init MainchainGatewayV3") { -// ISharedArgument.MainchainGatewayV3Param memory param = config.sharedArguments().mainchainGatewayV3; + function _initMainchainBridgeManager() internal logFn("Init RoninBridgeManager") { + ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().mainchainBridgeManager; + // address[] memory callbackRegisters = new address[](1); + // callbackRegisters[0] = address(_bridgeSlash); + // callbackRegisters[1] = address(_roninGatewayV3); -// uint256 companionChainId = network().companionChainId(); -// _mainchainGatewayV3.initialize( -// param.roleSetter, -// IWETH(_weth), -// companionChainId, -// param.numerator, -// param.highTierVWNumerator, -// param.denominator, -// param.addresses, -// param.thresholds, -// param.standards -// ); -// _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); -// _mainchainGatewayV3.initializeV3(); -// _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethUnwrapper))); -// } -// } + uint256 companionChainId = network().companionChainId(); + _mainchainBridgeManager.initialize({ + num: param.num, + denom: param.denom, + roninChainId: companionChainId, + bridgeContract: address(_mainchainGatewayV3), + callbackRegisters: param.callbackRegisters, + bridgeOperators: param.bridgeOperators, + governors: param.governors, + voteWeights: param.voteWeights, + targetOptions: param.targetOptions, + targets: param.targets + }); + } + + function _initMainchainGatewayV3() internal logFn("Init MainchainGatewayV3") { + ISharedArgument.MainchainGatewayV3Param memory param = config.sharedArguments().mainchainGatewayV3; + + uint256 companionChainId = network().companionChainId(); + _mainchainGatewayV3.initialize( + param.roleSetter, + IWETH(_weth), + companionChainId, + param.numerator, + param.highTierVWNumerator, + param.denominator, + param.addresses, + param.thresholds, + param.standards + ); + _mainchainGatewayV3.initializeV2(address(_mainchainBridgeManager)); + _mainchainGatewayV3.initializeV3(); + _mainchainGatewayV3.initializeV4(payable(address(_mainchainWethUnwrapper))); + } +} diff --git a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol index 1bee4de5..ad534228 100644 --- a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol +++ b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol @@ -1,46 +1,46 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -// import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; -// import { Migration } from "../Migration.s.sol"; -// import { Contract } from "../utils/Contract.sol"; -// import { TNetwork, Network } from "../utils/Network.sol"; -// import { Migration_01_Deploy_RoninBridge } from "./01_Deploy_RoninBridge.s.sol"; -// import { LibCompanionNetwork } from "../shared/libraries/LibCompanionNetwork.sol"; -// import { Migration_02_Deploy_MainchainBridge } from "./02_Deploy_MainchainBridge.s.sol"; - -// contract Deploy_v0_3_1 is Migration { -// using LibCompanionNetwork for *; - -// function run() external { -// TNetwork currentNetwork = network(); -// TNetwork companionNetwork = currentNetwork.companionNetwork(); - -// if ( -// currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() -// ) { -// new Migration_01_Deploy_RoninBridge().run(); - -// config.createFork(companionNetwork); -// config.switchTo(companionNetwork); - -// new Migration_02_Deploy_MainchainBridge().run(); - -// config.switchTo(currentNetwork); -// } else if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { -// config.createFork(companionNetwork); -// config.switchTo(companionNetwork); - -// new Migration_01_Deploy_RoninBridge().run(); - -// config.switchTo(currentNetwork); - -// new Migration_02_Deploy_MainchainBridge().run(); -// } else if (currentNetwork == DefaultNetwork.Local.key()) { -// new Migration_01_Deploy_RoninBridge().run(); -// new Migration_02_Deploy_MainchainBridge().run(); -// } else { -// revert("Unsupported network"); -// } -// } -// } +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { Migration } from "../Migration.s.sol"; +import { Contract } from "../utils/Contract.sol"; +import { TNetwork, Network } from "../utils/Network.sol"; +import { Migration_01_Deploy_RoninBridge } from "./01_Deploy_RoninBridge.s.sol"; +import { LibCompanionNetwork } from "../shared/libraries/LibCompanionNetwork.sol"; +import { Migration_02_Deploy_MainchainBridge } from "./02_Deploy_MainchainBridge.s.sol"; + +contract Deploy_v0_3_1 is Migration { + using LibCompanionNetwork for *; + + function run() external { + TNetwork currentNetwork = network(); + TNetwork companionNetwork = currentNetwork.companionNetwork(); + + if ( + currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() + ) { + new Migration_01_Deploy_RoninBridge().run(); + + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + + new Migration_02_Deploy_MainchainBridge().run(); + + config.switchTo(currentNetwork); + } else if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { + config.createFork(companionNetwork); + config.switchTo(companionNetwork); + + new Migration_01_Deploy_RoninBridge().run(); + + config.switchTo(currentNetwork); + + new Migration_02_Deploy_MainchainBridge().run(); + } else if (currentNetwork == DefaultNetwork.Local.key()) { + new Migration_01_Deploy_RoninBridge().run(); + new Migration_02_Deploy_MainchainBridge().run(); + } else { + revert("Unsupported network"); + } + } +} diff --git a/script/post-check/BasePostCheck.s.sol b/script/post-check/BasePostCheck.s.sol index 7b9219f8..0033178b 100644 --- a/script/post-check/BasePostCheck.s.sol +++ b/script/post-check/BasePostCheck.s.sol @@ -30,6 +30,7 @@ abstract contract BasePostCheck is BaseMigration { function _afterPostCheck(string memory postCheckLabel, uint256 snapshotId) private { console.log(string.concat("Postcheck ", postCheckLabel.italic(), " successful!\n").green()); - vm.revertTo(snapshotId); + bool reverted = vm.revertTo(snapshotId); + assertTrue(reverted, string.concat("Cannot revert to snapshot id: ", vm.toString(snapshotId))); } } diff --git a/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol index b8102be0..be54b06a 100644 --- a/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol +++ b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol @@ -32,7 +32,7 @@ abstract contract PostCheck_BridgeManager_CRUD_AddBridgeOperators is BasePostChe function validate_RevertWhen_NotSelfCalled_addBridgeOperators() private onPostCheck("validate_RevertWhen_NotSelfCalled_addBridgeOperators") { vm.expectRevert(); vm.prank(any); - bool[] memory addeds = IBridgeManager(_manager[block.chainid]).addBridgeOperators( + IBridgeManager(_manager[block.chainid]).addBridgeOperators( voteWeight.toSingletonArray().toUint96sUnsafe(), operator.toSingletonArray(), governor.toSingletonArray() ); } diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 5809d277..9de9e916 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -1,11 +1,17 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +import { console } from "forge-std/console.sol"; +import { TransparentUpgradeableProxy } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { BasePostCheck } from "../../BasePostCheck.s.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { TContract, Contract } from "script/utils/Contract.sol"; -import "script/shared/libraries/LibProposal.sol"; +import { TNetwork, Network } from "script/utils/Network.sol"; +import { LibArray } from "script/shared/libraries/LibArray.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { Ballot, SignatureConsumer, Proposal, GlobalProposal, LibProposal } from "script/shared/libraries/LibProposal.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; @@ -13,13 +19,17 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { using LibArray for *; using LibProxy for *; using LibProposal for *; + using LibCompanionNetwork for *; + + address private _cheatGovernor; + address private _cheatOperator; + uint256 private _cheatGovernorPk; uint96[] private _voteWeights = [100, 100]; address[] private _addingGovernors = [makeAddr("governor-1"), makeAddr("governor-2")]; address[] private _addingOperators = [makeAddr("operator-1"), makeAddr("operator-2")]; - address[] private _proxyTargets; - modifier onlyOnRoninNetwork() { + modifier onlyOnRoninNetworkOrLocal() { require( block.chainid == DefaultNetwork.RoninMainnet.chainId() || block.chainid == DefaultNetwork.RoninTestnet.chainId() || block.chainid == Network.RoninDevnet.chainId() || block.chainid == DefaultNetwork.Local.chainId(), @@ -30,21 +40,89 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { function _validate_BridgeManager_Proposal() internal { validate_ProposeGlobalProposalAndRelay_addBridgeOperator(); + validate_proposeAndRelay_addBridgeOperator(); validate_canExecuteUpgradeSingleProposal(); + validate_canExcuteUpgradeAllOneProposal(); } - function validate_ProposeGlobalProposalAndRelay_addBridgeOperator() private onPostCheck("validate_ProposeGlobalProposalAndRelay_addBridgeOperator") { + function validate_proposeAndRelay_addBridgeOperator() private onlyOnRoninNetworkOrLocal onPostCheck("validate_proposeAndRelay_addBridgeOperator") { RoninBridgeManager manager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); - uint256 totalVoteWeight = manager.getTotalWeight(); - uint256 cheatVoteWeight = totalVoteWeight * 2; - address cheatOperator = makeAddr(string.concat("operator-", vm.toString(seed))); - (address cheatGovernor, uint256 cheatGovernorPk) = makeAddrAndKey(string.concat("governor-", vm.toString(seed))); + // Cheat add governor + cheatAddOverWeightedGovernor(address(manager)); + + address[] memory targets = address(manager).toSingletonArray(); + uint256[] memory values = uint256(0).toSingletonArray(); + bytes[] memory calldatas = abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)).toSingletonArray(); + uint256[] memory gasAmounts = uint256(1_000_000).toSingletonArray(); + + uint256 roninChainId = block.chainid; + + Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ + manager: address(manager), + expiryTimestamp: block.timestamp + 20 minutes, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts, + nonce: manager.round(0) + 1 + }); + + vm.prank(_cheatGovernor); + manager.propose(roninChainId, block.timestamp + 20 minutes, address(0x0), targets, values, calldatas, gasAmounts); + + { + TNetwork currentNetwork = CONFIG.getCurrentNetwork(); + (uint256 companionChainId, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); + MainchainBridgeManager mainchainManager = MainchainBridgeManager(_manager[companionChainId]); + console.log("MainchainBridgeManager:", vm.getLabel(address(mainchainManager))); + + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + uint256 snapshotId = vm.snapshot(); + + // Cheat add governor + cheatAddOverWeightedGovernor(address(mainchainManager)); + + targets = address(mainchainManager).toSingletonArray(); + + proposal = LibProposal.createProposal({ + manager: address(mainchainManager), + expiryTimestamp: block.timestamp + 20 minutes, + targets: targets, + values: proposal.values, + calldatas: proposal.calldatas, + gasAmounts: proposal.gasAmounts, + nonce: mainchainManager.round(block.chainid) + 1 + }); + + SignatureConsumer.Signature[] memory signatures = proposal.generateSignatures(_cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); + Ballot.VoteType[] memory _supports = new Ballot.VoteType[](signatures.length); + + uint256 minimumForVoteWeight = mainchainManager.minimumVoteWeight(); + uint256 totalForVoteWeight = mainchainManager.getGovernorWeight(_cheatGovernor); + console.log("Total for vote weight:", totalForVoteWeight); + console.log("Minimum for vote weight:", minimumForVoteWeight); + + vm.prank(_cheatGovernor); + mainchainManager.relayProposal(proposal, _supports, signatures); + for (uint256 i; i < _addingGovernors.length; ++i) { + assertEq(mainchainManager.isBridgeOperator(_addingOperators[i]), true, "isBridgeOperator == false"); + } + + bool reverted = vm.revertTo(snapshotId); + assertTrue(reverted, "Cannot revert to snapshot id"); + CONFIG.switchTo(currentNetwork); + } + } - vm.prank(address(manager)); - bool[] memory addeds = - manager.addBridgeOperators(cheatVoteWeight.toSingletonArray().toUint96sUnsafe(), cheatGovernor.toSingletonArray(), cheatOperator.toSingletonArray()); - assertTrue(addeds[0], "addeds[0] == false"); + function validate_ProposeGlobalProposalAndRelay_addBridgeOperator() + private + onlyOnRoninNetworkOrLocal + onPostCheck("validate_ProposeGlobalProposalAndRelay_addBridgeOperator") + { + RoninBridgeManager manager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + cheatAddOverWeightedGovernor(address(manager)); GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); targetOptions[0] = GlobalProposal.TargetOption.BridgeManager; @@ -55,43 +133,113 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { values: uint256(0).toSingletonArray(), calldatas: abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)).toSingletonArray(), gasAmounts: uint256(1_000_000).toSingletonArray(), - nonce: manager.round(block.chainid) + 1 + nonce: manager.round(0) + 1 }); - SignatureConsumer.Signature[] memory signatures = globalProposal.generateSignaturesGlobal(cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); - Ballot.VoteType[] memory _supports = new Ballot.VoteType[](signatures.length); + SignatureConsumer.Signature[] memory signatures; + Ballot.VoteType[] memory _supports; + { + signatures = globalProposal.generateSignaturesGlobal(_cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); + _supports = new Ballot.VoteType[](signatures.length); - vm.prank(cheatGovernor); - manager.proposeGlobalProposalStructAndCastVotes(globalProposal, _supports, signatures); + vm.prank(_cheatGovernor); + manager.proposeGlobalProposalStructAndCastVotes(globalProposal, _supports, signatures); + } // Check if the proposal is voted - assertEq(manager.globalProposalVoted(globalProposal.nonce, cheatGovernor), true); - // Check if the operator is added - assertTrue(manager.isBridgeOperator(cheatOperator), "operator not added"); - // // Check if the governor is added - // assertTrue(manager.isBridgeGovernor(cheatGovernor), "governor not added"); + assertEq(manager.globalProposalVoted(globalProposal.nonce, _cheatGovernor), true); + for (uint256 i; i < _addingGovernors.length; ++i) { + assertEq(manager.isBridgeOperator(_addingOperators[i]), true, "isBridgeOperator == false"); + } - } + { + TNetwork currentNetwork = CONFIG.getCurrentNetwork(); + (uint256 companionChainId, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); + MainchainBridgeManager mainchainManager = MainchainBridgeManager(_manager[companionChainId]); + + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + uint256 snapshotId = vm.snapshot(); - function validate_canExecuteUpgradeSingleProposal() private onlyOnRoninNetwork onPostCheck("validate_canExecuteUpgradeProposal") { - address manager = loadContract(Contract.RoninBridgeManager.key()); - // Get all contracts deployed from the current network - address payable[] memory addrs = CONFIG.getAllAddresses(network()); - - // Identify proxy targets to upgrade with proposal - for (uint256 i; i < addrs.length; ++i) { - address payable proxy = addrs[i].getProxyAdmin({ nullCheck: false }); - if (proxy == manager) { - console.log("Target Proxy to test upgrade with proposal", vm.getLabel(addrs[i])); - _proxyTargets.push(addrs[i]); + cheatAddOverWeightedGovernor(address(mainchainManager)); + + vm.prank(_cheatGovernor); + mainchainManager.relayGlobalProposal(globalProposal, _supports, signatures); + + for (uint256 i; i < _addingGovernors.length; ++i) { + assertEq(mainchainManager.isBridgeOperator(_addingOperators[i]), true, "isBridgeOperator == false"); } + + bool reverted = vm.revertTo(snapshotId); + assertTrue(reverted, "Cannot revert to snapshot id"); + CONFIG.switchTo(currentNetwork); + } + } + + function validate_canExecuteUpgradeSingleProposal() private onlyOnRoninNetworkOrLocal onPostCheck("validate_canExecuteUpgradeSingleProposal") { + TContract[] memory contractTypes = new TContract[](4); + contractTypes[0] = Contract.BridgeSlash.key(); + contractTypes[1] = Contract.BridgeReward.key(); + contractTypes[2] = Contract.BridgeTracking.key(); + contractTypes[3] = Contract.RoninGatewayV3.key(); + + address[] memory targets = new address[](contractTypes.length); + for (uint256 i; i < contractTypes.length; ++i) { + targets[i] = loadContract(contractTypes[i]); } - address[] memory targets = _proxyTargets; for (uint256 i; i < targets.length; ++i) { - TContract contractType = CONFIG.getContractTypeFromCurrentNetwok(targets[i]); console.log("Upgrading contract:", vm.getLabel(targets[i])); - _upgradeProxy(contractType); + _upgradeProxy(contractTypes[i]); + } + } + + function validate_canExcuteUpgradeAllOneProposal() private onlyOnRoninNetworkOrLocal onPostCheck("validate_canExcuteUpgradeAllOneProposal") { + RoninBridgeManager manager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + TContract[] memory contractTypes = new TContract[](4); + contractTypes[0] = Contract.BridgeSlash.key(); + contractTypes[1] = Contract.BridgeReward.key(); + contractTypes[2] = Contract.BridgeTracking.key(); + contractTypes[3] = Contract.RoninGatewayV3.key(); + + address[] memory targets = new address[](contractTypes.length); + for (uint256 i; i < contractTypes.length; ++i) { + targets[i] = loadContract(contractTypes[i]); } + + address[] memory logics = new address[](targets.length); + for (uint256 i; i < targets.length; ++i) { + console.log("Deploy contract logic:", vm.getLabel(targets[i])); + logics[i] = _deployLogic(contractTypes[i]); + } + + // Upgrade all contracts with proposal + bytes[] memory calldatas = new bytes[](targets.length); + for (uint256 i; i < targets.length; ++i) { + calldatas[i] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[i])); + } + + Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ + manager: address(manager), + expiryTimestamp: block.timestamp + 20 minutes, + targets: targets, + values: uint256(0).repeat(targets.length), + calldatas: calldatas, + gasAmounts: uint256(1_000_000).repeat(targets.length), + nonce: manager.round(block.chainid) + 1 + }); + + manager.executeProposal(proposal); + } + + function cheatAddOverWeightedGovernor(address manager) private { + uint256 cheatVoteWeight = IBridgeManager(manager).getTotalWeight() * 100; + _cheatOperator = makeAddr(string.concat("cheat-operator-", vm.toString(seed))); + (_cheatGovernor, _cheatGovernorPk) = makeAddrAndKey(string.concat("cheat-governor-", vm.toString(seed))); + + vm.prank(manager); + bool[] memory addeds = IBridgeManager(manager).addBridgeOperators( + cheatVoteWeight.toSingletonArray().toUint96sUnsafe(), _cheatGovernor.toSingletonArray(), _cheatOperator.toSingletonArray() + ); } } diff --git a/script/shared/libraries/LibCompanionNetwork.sol b/script/shared/libraries/LibCompanionNetwork.sol index 60de2cb9..4637ee62 100644 --- a/script/shared/libraries/LibCompanionNetwork.sol +++ b/script/shared/libraries/LibCompanionNetwork.sol @@ -30,7 +30,9 @@ library LibCompanionNetwork { function companionNetworkData(TNetwork network) internal returns (uint256 chainId, TNetwork companionTNetwork) { companionTNetwork = config.getCompanionNetwork(network); + config.createFork(companionTNetwork); config.switchTo(companionTNetwork); chainId = block.chainid; + config.switchTo(network); } } diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index 80cd9d81..ea32051c 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -16,6 +16,7 @@ import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeMa import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { CoreGovernance } from "@ronin/contracts/extensions/sequential-governance/CoreGovernance.sol"; import { LibArray } from "./LibArray.sol"; +import { LibCompanionNetwork } from "./LibCompanionNetwork.sol"; import { LibErrorHandler } from "lib/foundry-deployment-kit/lib/contract-libs/src/LibErrorHandler.sol"; import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; @@ -23,6 +24,7 @@ library LibProposal { using LibArray for *; using ECDSA for bytes32; using LibErrorHandler for bool; + using LibCompanionNetwork for *; using Proposal for Proposal.ProposalDetail; using GlobalProposal for GlobalProposal.GlobalProposalDetail; @@ -35,21 +37,30 @@ library LibProposal { modifier preserveState() { uint256 snapshotId = vm.snapshot(); _; - vm.revertTo(snapshotId); + bool reverted = vm.revertTo(snapshotId); + require(reverted, string.concat("Cannot revert to snapshot id: ", vm.toString(snapshotId))); } - function getBridgeManagerDomain() internal view returns (bytes32) { + function getBridgeManagerDomain() internal returns (bytes32) { + uint256 chainId; + TNetwork currentNetwork = config.getCurrentNetwork(); + if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { + chainId = currentNetwork.companionChainId(); + } else { + chainId = block.chainid; + } return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,bytes32 salt)"), keccak256("BridgeAdmin"), // name hash keccak256("2"), // version hash - keccak256(abi.encode("BRIDGE_ADMIN", block.chainid)) // salt + keccak256(abi.encode("BRIDGE_ADMIN", chainId)) // salt ) ); } function createProposal( + address manager, uint256 nonce, uint256 expiryTimestamp, address[] memory targets, @@ -57,15 +68,14 @@ library LibProposal { bytes[] memory calldatas, uint256[] memory gasAmounts ) internal returns (Proposal.ProposalDetail memory proposal) { - address manager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); verifyProposalGasAmount(manager, targets, values, calldatas, gasAmounts); proposal = Proposal.ProposalDetail({ nonce: nonce, chainId: block.chainid, expiryTimestamp: expiryTimestamp, - executor: address(0), targets: targets, + executor: address(0x0), values: values, calldatas: calldatas, gasAmounts: gasAmounts @@ -84,9 +94,9 @@ library LibProposal { proposal = GlobalProposal.GlobalProposalDetail({ nonce: nonce, expiryTimestamp: expiryTimestamp, - executor: address(0), targetOptions: targetOptions, values: values, + executor: address(0x0), calldatas: calldatas, gasAmounts: gasAmounts }); @@ -104,7 +114,17 @@ library LibProposal { } else { vm.broadcast(governor0); } - manager.proposeProposalForCurrentNetwork(proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts, support); + manager.proposeProposalForCurrentNetwork( + proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts, support + ); + + voteFor(manager, proposal); + } + + function voteFor(RoninBridgeManager manager, Proposal.ProposalDetail memory proposal) internal { + Ballot.VoteType support = Ballot.VoteType.For; + address[] memory governors = manager.getGovernors(); + bool shouldPrankOnly = config.isPostChecking(); uint256 totalGas = proposal.gasAmounts.sum(); // 20% more gas for each governor @@ -157,12 +177,42 @@ library LibProposal { verifyProposalGasAmount(manager, roninTargets, values, calldatas, gasAmounts); // Verify gas amount for mainchain targets + verifyMainchainProposalGasAmount(companionNetwork, companionManager, mainchainTargets, values, calldatas, gasAmounts); + } + + function verifyMainchainProposalGasAmount( + TNetwork companionNetwork, + address mainchainManager, + address[] memory mainchainTargets, + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory gasAmounts + ) internal preserveState { + TNetwork currentNetwork = config.getCurrentNetwork(); config.createFork(companionNetwork); config.switchTo(companionNetwork); + uint256 snapshotId = vm.snapshot(); - // Verify gas amount for mainchain targets - verifyProposalGasAmount(companionManager, mainchainTargets, values, calldatas, gasAmounts); + for (uint256 i; i < mainchainTargets.length; i++) { + vm.deal(mainchainManager, values[i]); + vm.prank(mainchainManager); + + uint256 gasUsed = gasleft(); + (bool success, bytes memory returnOrRevertData) = mainchainTargets[i].call{ value: values[i], gas: gasAmounts[i] }(calldatas[i]); + gasUsed = gasUsed - gasleft(); + + if (success) { + console.log("Call", i, ": gasUsed", gasUsed); + } else { + console.log("Call", i, unicode": reverted. ❗ GasUsed", gasUsed); + } + success.handleRevert(bytes4(calldatas[i]), returnOrRevertData); + + if (gasUsed > gasAmounts[i]) revert ErrProposalOutOfGas(block.chainid, bytes4(calldatas[i]), gasUsed); + } + bool reverted = vm.revertTo(snapshotId); + require(reverted, string.concat("Cannot revert to snapshot id: ", vm.toString(snapshotId))); config.switchTo(currentNetwork); } @@ -196,7 +246,7 @@ library LibProposal { Proposal.ProposalDetail memory proposal, uint256[] memory signerPKs, Ballot.VoteType support - ) internal view returns (SignatureConsumer.Signature[] memory sigs) { + ) internal returns (SignatureConsumer.Signature[] memory sigs) { return generateSignaturesFor(proposal.hash(), signerPKs, support); } @@ -204,7 +254,7 @@ library LibProposal { GlobalProposal.GlobalProposalDetail memory proposal, uint256[] memory signerPKs, Ballot.VoteType support - ) internal view returns (SignatureConsumer.Signature[] memory sigs) { + ) internal returns (SignatureConsumer.Signature[] memory sigs) { return generateSignaturesFor(proposal.hash(), signerPKs, support); } @@ -212,7 +262,7 @@ library LibProposal { bytes32 proposalHash, uint256[] memory signerPKs, Ballot.VoteType support - ) internal view returns (SignatureConsumer.Signature[] memory sigs) { + ) internal returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); bytes32 domain = getBridgeManagerDomain(); for (uint256 i; i < signerPKs.length; i++) { From 14ac2787711e67aa4c32330cbc5e4ef16fe8dcf3 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Sun, 14 Apr 2024 23:34:00 +0700 Subject: [PATCH 170/305] script: fix and add post check for deposit and withdrawal --- remappings.txt | 2 +- ...40411-p1-deploy-ronin-bridge-manager.s.sol | 1 - script/GeneralConfig.sol | 14 + script/Migration.s.sol | 119 +++++---- script/PostChecker.sol | 59 ++++- .../MainchainBridgeManagerDeploy.s.sol | 15 +- .../contracts/RoninBridgeManagerDeploy.s.sol | 12 + .../deploy-v0.3.1/01_Deploy_RoninBridge.s.sol | 36 ++- .../02_Deploy_MainchainBridge.s.sol | 5 +- script/interfaces/IGeneralConfigExtended.sol | 10 + script/interfaces/IPostCheck.sol | 6 + script/post-check/BasePostCheck.s.sol | 65 ++++- ...ridgeManager_CRUD_addBridgeOperators.s.sol | 63 +++-- ...geManager_CRUD_removeBridgeOperators.s.sol | 31 ++- .../PostCheck_BridgeManager_Proposal.s.sol | 65 ++--- .../gateway/PostCheck_Gateway.s.sol | 10 + ...PostCheck_Gateway_DepositAndWithdraw.s.sol | 243 ++++++++++++++++++ script/shared/libraries/LibProposal.sol | 13 +- script/utils/Contract.sol | 5 +- ...AcknowledgeMainchainWithdrew.Gateway.t.sol | 0 .../bulkDepositAndRecord.Gateway.t.sol | 0 ...lkSubmitWithdrawalSignatures.Gateway.t.sol | 0 .../depositAndRecord.Gateway.t.sol | 0 23 files changed, 609 insertions(+), 165 deletions(-) create mode 100644 script/interfaces/IPostCheck.sol create mode 100644 script/post-check/gateway/PostCheck_Gateway.s.sol create mode 100644 script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol rename test/bridge/integration/{bridge-manager => ronin-gateway}/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol (100%) rename test/bridge/integration/{bridge-manager => ronin-gateway}/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol (100%) rename test/bridge/integration/{bridge-manager => ronin-gateway}/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol (100%) rename test/bridge/integration/{bridge-manager => ronin-gateway}/deposit-and-record/depositAndRecord.Gateway.t.sol (100%) diff --git a/remappings.txt b/remappings.txt index 7caef984..082d6472 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,5 +1,5 @@ ds-test/=lib/forge-std/lib/ds-test/src/ -forge-std/=lib/forge-std/src/ +forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/ @openzeppelin/=lib/openzeppelin-contracts/ hardhat/=node_modules/hardhat/ @ronin/contracts/=src/ diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol index d7309b67..e2da3e12 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol @@ -10,7 +10,6 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index b7c39a1d..74eeedfd 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -6,9 +6,12 @@ import { BaseGeneralConfig } from "@fdk/BaseGeneralConfig.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { Contract } from "./utils/Contract.sol"; import { TNetwork, Network } from "./utils/Network.sol"; +import { IGeneralConfigExtended } from "./interfaces/IGeneralConfigExtended.sol"; import { Utils } from "./utils/Utils.sol"; contract GeneralConfig is BaseGeneralConfig, Utils { + IGeneralConfigExtended.LocalNetwork private _localNetwork; + constructor() BaseGeneralConfig("", "deployments/") { } function _setUpNetworks() internal virtual override { @@ -48,6 +51,14 @@ contract GeneralConfig is BaseGeneralConfig, Utils { revert("Network: Unknown companion network"); } + function getLocalNetwork() public view virtual returns (IGeneralConfigExtended.LocalNetwork) { + return _localNetwork; + } + + function setLocalNetwork(IGeneralConfigExtended.LocalNetwork network) public virtual { + _localNetwork = network; + } + function _setUpContracts() internal virtual override { // map contract name _mapContractName(Contract.BridgeSlash); @@ -62,6 +73,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _mapContractName(Contract.MockERC721); _mapContractName(Contract.MockERC1155); _mapContractName(Contract.RoninBridgeManagerConstructor); + _mapContractName(Contract.PostChecker); _contractNameMap[Contract.AXS.key()] = "MockERC20"; _contractNameMap[Contract.SLP.key()] = "MockSLP"; @@ -77,6 +89,8 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _contractAddrMap[Network.Sepolia.chainId()][Contract.WETH.name()] = 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9; _contractAddrMap[Network.EthMainnet.chainId()][Contract.WETH.name()] = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; + _contractAddrMap[DefaultNetwork.RoninTestnet.chainId()][Contract.AXS.name()] = 0x0eD7e52944161450477ee417DE9Cd3a859b14fD0; + _contractAddrMap[DefaultNetwork.RoninMainnet.chainId()][Contract.WETH.name()] = 0xc99a6A985eD2Cac1ef41640596C5A5f9F4E19Ef5; _contractAddrMap[DefaultNetwork.RoninMainnet.chainId()][Contract.WRON.name()] = 0xe514d9DEB7966c8BE0ca922de8a064264eA6bcd4; diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 146a3c5f..a2f7116b 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -11,16 +11,17 @@ import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { GeneralConfig } from "./GeneralConfig.sol"; import { ISharedArgument } from "./interfaces/ISharedArgument.sol"; import { TNetwork, Network } from "./utils/Network.sol"; +import { IGeneralConfigExtended } from "./interfaces/IGeneralConfigExtended.sol"; import { Utils } from "./utils/Utils.sol"; import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract, TContract } from "./utils/Contract.sol"; import { GlobalProposal, Proposal, LibProposal } from "script/shared/libraries/LibProposal.sol"; import { TransparentUpgradeableProxy, TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { LibArray } from "script/shared/libraries/LibArray.sol"; -import { PostChecker } from "./PostChecker.sol"; +import { IPostCheck } from "./interfaces/IPostCheck.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -contract Migration is PostChecker, Utils { +contract Migration is BaseMigration, Utils { using LibProxy for *; using LibArray for *; using StdStyle for *; @@ -30,12 +31,17 @@ contract Migration is PostChecker, Utils { uint256 internal constant DEFAULT_PROPOSAL_GAS = 1_000_000; ISharedArgument internal constant config = ISharedArgument(address(CONFIG)); - bool internal _isLocalETH; - function setUp() public virtual override { super.setUp(); } + function _postCheck() internal virtual override { + address postChecker = _deployImmutable(Contract.PostChecker.key()); + vm.allowCheatcodes(postChecker); + vm.makePersistent(postChecker); + IPostCheck(postChecker).run(); + } + function _configByteCode() internal virtual override returns (bytes memory) { return abi.encodePacked(type(GeneralConfig).creationCode); } @@ -166,7 +172,6 @@ contract Migration is PostChecker, Utils { // Ronin Bridge Manager param.roninBridgeManager.num = 2; param.roninBridgeManager.denom = 4; - param.roninBridgeManager.roninChainId = 0; param.roninBridgeManager.roninChainId = block.chainid; param.roninBridgeManager.expiryDuration = 14 days; param.roninBridgeManager.bridgeOperators = operatorAddrs; @@ -188,7 +193,6 @@ contract Migration is PostChecker, Utils { // Mainchain Bridge Manager param.mainchainBridgeManager.num = 2; param.mainchainBridgeManager.denom = 4; - param.mainchainBridgeManager.roninChainId = 0; param.mainchainBridgeManager.roninChainId = block.chainid; param.mainchainBridgeManager.bridgeOperators = operatorAddrs; param.mainchainBridgeManager.governors = governorAddrs; @@ -211,10 +215,23 @@ contract Migration is PostChecker, Utils { } else if (currentNetwork == Network.Sepolia.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { proxyAdmin = loadContract(Contract.MainchainBridgeManager.key()); } else if (currentNetwork == DefaultNetwork.Local.key()) { - TContract managerContractType = _isLocalETH ? Contract.MainchainBridgeManager.key() : Contract.RoninBridgeManager.key(); - try config.getAddressFromCurrentNetwork(managerContractType) returns (address payable addr) { - proxyAdmin = addr; - } catch { + if (config.getLocalNetwork() == IGeneralConfigExtended.LocalNetwork.Ronin) { + try config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()) returns (address payable res) { + proxyAdmin = res; + } catch { + console.log("BridgeMigration(_getProxyAdmin): RoninBridgeManager not found".yellow()); + console.log("BridgeMigration(_getProxyAdmin): Using sender as proxy admin".yellow()); + proxyAdmin = sender(); + } + } else if (config.getLocalNetwork() == IGeneralConfigExtended.LocalNetwork.Eth) { + try config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()) returns (address payable res) { + proxyAdmin = res; + } catch { + console.log("BridgeMigration(_getProxyAdmin): MainchainBridgeManager not found".yellow()); + console.log("BridgeMigration(_getProxyAdmin): Using sender as proxy admin".yellow()); + proxyAdmin = sender(); + } + } else { proxyAdmin = payable(config.sharedArguments().test.proxyAdmin); } } else { @@ -231,60 +248,50 @@ contract Migration is PostChecker, Utils { } assertTrue(proxyAdmin != address(0x0), "BridgeMigration: Invalid {proxyAdmin} or {proxy} is not a Proxy contract"); - address admin = _getProxyAdmin(); TNetwork currentNetwork = network(); - if (proxyAdmin == admin) { - // in case proxyAdmin is GovernanceAdmin - if ( - currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key() - || currentNetwork == Network.RoninDevnet.key() || currentNetwork == DefaultNetwork.Local.key() - ) { - // handle for ronin network - console.log(StdStyle.yellow("Voting on RoninBridgeManager for upgrading...")); - - RoninBridgeManager manager = RoninBridgeManager(admin); - bytes[] memory callDatas = new bytes[](1); - uint256[] memory values = new uint256[](1); - address[] memory targets = new address[](1); - - targets[0] = proxy; - callDatas[0] = args.length == 0 - ? abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logic)) - : abi.encodeCall(TransparentUpgradeableProxy.upgradeToAndCall, (logic, args)); - - Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ - manager: address(manager), - nonce: manager.round(block.chainid) + 1, - expiryTimestamp: block.timestamp + 10 minutes, - targets: targets, - values: values, - calldatas: callDatas, - gasAmounts: uint256(DEFAULT_PROPOSAL_GAS).toSingletonArray() - }); - - manager.executeProposal(proposal); - assertEq(proxy.getProxyImplementation(), logic, "BridgeMigration: Upgrade failed"); - } else if (currentNetwork == Network.Sepolia.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { - // handle for ethereum - revert("BridgeMigration: Unhandled case for ETH"); - } else { - revert("BridgeMigration: Unhandled case"); - } - } else if (proxyAdmin.code.length == 0) { + if (proxyAdmin.code.length == 0) { // in case proxyAdmin is an eoa console.log(StdStyle.yellow("Upgrading with EOA wallet...")); _prankOrBroadcast(address(proxyAdmin)); if (args.length == 0) TransparentUpgradeableProxyV2(proxy).upgradeTo(logic); else TransparentUpgradeableProxyV2(proxy).upgradeToAndCall(logic, args); + } + // in case proxyAdmin is GovernanceAdmin + else if ( + currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == Network.RoninDevnet.key() + || currentNetwork == DefaultNetwork.Local.key() + ) { + // handle for ronin network + console.log(StdStyle.yellow("Voting on RoninBridgeManager for upgrading...")); + + RoninBridgeManager manager = RoninBridgeManager(proxyAdmin); + bytes[] memory callDatas = new bytes[](1); + uint256[] memory values = new uint256[](1); + address[] memory targets = new address[](1); + + targets[0] = proxy; + callDatas[0] = args.length == 0 + ? abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logic)) + : abi.encodeCall(TransparentUpgradeableProxy.upgradeToAndCall, (logic, args)); + + Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ + manager: address(manager), + nonce: manager.round(block.chainid) + 1, + expiryTimestamp: block.timestamp + 10 minutes, + targets: targets, + values: values, + calldatas: callDatas, + gasAmounts: uint256(DEFAULT_PROPOSAL_GAS).toSingletonArray() + }); + + manager.executeProposal(proposal); + assertEq(proxy.getProxyImplementation(), logic, "BridgeMigration: Upgrade failed"); + } else if (currentNetwork == Network.Sepolia.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { + // handle for ethereum + revert("BridgeMigration: Unhandled case for ETH"); } else { - console.log(StdStyle.yellow("Upgrading with owner of ProxyAdmin contract...")); - // in case proxyAdmin is a ProxyAdmin contract - ProxyAdmin proxyAdminContract = ProxyAdmin(proxyAdmin); - address authorizedWallet = proxyAdminContract.owner(); - _prankOrBroadcast(authorizedWallet); - if (args.length == 0) proxyAdminContract.upgrade(TransparentUpgradeableProxy(proxy), logic); - else proxyAdminContract.upgradeAndCall(TransparentUpgradeableProxy(proxy), logic, args); + revert("BridgeMigration: Unhandled case"); } } diff --git a/script/PostChecker.sol b/script/PostChecker.sol index 4a1ae8c4..628c8cf8 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -2,18 +2,46 @@ pragma solidity ^0.8.19; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; -import { Contract } from "script/utils/Contract.sol"; +import { TContract, Contract } from "script/utils/Contract.sol"; import { Network } from "script/utils/Network.sol"; import { TNetwork, DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { PostCheck_BridgeManager } from "./post-check/bridge-manager/PostCheck_BridgeManager.s.sol"; +import { PostCheck_Gateway } from "./post-check/gateway/PostCheck_Gateway.s.sol"; +import { Migration } from "./Migration.s.sol"; +import { ScriptExtended } from "@fdk/extensions/ScriptExtended.s.sol"; -abstract contract PostChecker is BaseMigration, PostCheck_BridgeManager { +contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { using LibCompanionNetwork for *; - function _postCheck() internal override { + function setUp() public virtual override(BaseMigration, Migration) { + super.setUp(); + } + + function run() external { _loadSysContract(); - _validate_BridgeManager(); + // _validate_BridgeManager(); + _validate_Gateway(); + } + + function _deployLogic(TContract contractType) internal virtual override(BaseMigration, Migration) returns (address payable logic) { + return super._deployLogic(contractType); + } + + function _upgradeRaw(address proxyAdmin, address payable proxy, address logic, bytes memory args) internal virtual override(BaseMigration, Migration) { + super._upgradeRaw(proxyAdmin, proxy, logic, args); + } + + function _postCheck() internal virtual override(ScriptExtended, Migration) { + super._postCheck(); + } + + function _getProxyAdmin() internal virtual override(BaseMigration, Migration) returns (address payable) { + return super._getProxyAdmin(); + } + + function _deployProxy(TContract contractType, bytes memory args) internal virtual override(BaseMigration, Migration) returns (address payable) { + return super._deployProxy(contractType, args); } function _loadSysContract() private { @@ -22,14 +50,21 @@ abstract contract PostChecker is BaseMigration, PostCheck_BridgeManager { currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() || currentNetwork == DefaultNetwork.Local.key() ) { - __bridgeSlash = loadContract(Contract.BridgeSlash.key()); - __bridgeReward = loadContract(Contract.BridgeReward.key()); - _gateway[block.chainid] = loadContract(Contract.RoninGatewayV3.key()); - _manager[block.chainid] = loadContract(Contract.RoninBridgeManager.key()); - - (uint256 companionChainId, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); - _gateway[companionChainId] = CONFIG.getAddress(companionNetwork, Contract.MainchainGatewayV3.key()); - _manager[companionChainId] = CONFIG.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + bridgeSlash = loadContract(Contract.BridgeSlash.key()); + bridgeReward = loadContract(Contract.BridgeReward.key()); + roninGateway = loadContract(Contract.RoninGatewayV3.key()); + roninBridgeManager = loadContract(Contract.RoninBridgeManager.key()); + + (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); + mainchainGateway = CONFIG.getAddress(companionNetwork, Contract.MainchainGatewayV3.key()); + mainchainBridgeManager = CONFIG.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + + vm.makePersistent(bridgeSlash); + vm.makePersistent(bridgeReward); + vm.makePersistent(roninGateway); + vm.makePersistent(roninBridgeManager); + vm.makePersistent(mainchainGateway); + vm.makePersistent(mainchainBridgeManager); } else { revert(string.concat("Unsupported network: ", currentNetwork.networkName())); } diff --git a/script/contracts/MainchainBridgeManagerDeploy.s.sol b/script/contracts/MainchainBridgeManagerDeploy.s.sol index a0b36941..f680777b 100644 --- a/script/contracts/MainchainBridgeManagerDeploy.s.sol +++ b/script/contracts/MainchainBridgeManagerDeploy.s.sol @@ -2,14 +2,25 @@ pragma solidity ^0.8.19; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import { Contract } from "../utils/Contract.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import { Migration } from "../Migration.s.sol"; import { MainchainGatewayV3Deploy } from "./MainchainGatewayV3Deploy.s.sol"; contract MainchainBridgeManagerDeploy is Migration { - function run() public virtual returns (MainchainBridgeManager) { - return MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key())); + using LibProxy for *; + + function run() public virtual returns (MainchainBridgeManager instance) { + instance = MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key())); + address proxyAdmin = payable(address(instance)).getProxyAdmin(); + + if (proxyAdmin == sender()) { + vm.broadcast(proxyAdmin); + // change proxy admin to self + TransparentUpgradeableProxy(payable(address(instance))).changeAdmin(address(instance)); + } } } diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index 764651c8..24acb9a7 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import { console2 } from "forge-std/console2.sol"; +import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import { RoninBridgeManagerConstructor } from "@ronin/contracts/ronin/gateway/RoninBridgeManagerConstructor.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { Contract } from "../utils/Contract.sol"; @@ -37,7 +39,17 @@ contract RoninBridgeManagerDeploy is Migration { address payable instance = _deployProxy(Contract.RoninBridgeManagerConstructor.key()); address logic = _deployLogic(Contract.RoninBridgeManager.key()); address proxyAdmin = instance.getProxyAdmin(); + console2.log("Proxy admin ", proxyAdmin); + console2.log("Sender: ", sender()); _upgradeRaw(proxyAdmin, instance, logic, EMPTY_ARGS); + + if (proxyAdmin == sender()) { + vm.broadcast(proxyAdmin); + // change proxy admin to self + TransparentUpgradeableProxy(instance).changeAdmin(instance); + } + config.setAddress(network(), Contract.RoninBridgeManager.key(), instance); + return RoninBridgeManager(instance); } } diff --git a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol index 3c296cf4..3791c167 100644 --- a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol +++ b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol @@ -8,14 +8,21 @@ import { TNetwork, Network } from "../utils/Network.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { TContract, Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { BridgeSlash, BridgeSlashDeploy } from "../contracts/BridgeSlashDeploy.s.sol"; import { BridgeReward, BridgeRewardDeploy } from "../contracts/BridgeRewardDeploy.s.sol"; import { BridgeTracking, BridgeTrackingDeploy } from "../contracts/BridgeTrackingDeploy.s.sol"; import { RoninGatewayV3, RoninGatewayV3Deploy } from "../contracts/RoninGatewayV3Deploy.s.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; +import { HasContracts } from "@ronin/contracts/extensions/collections/HasContracts.sol"; import { RoninBridgeManagerConstructor, RoninBridgeManager, RoninBridgeManagerDeploy } from "../contracts/RoninBridgeManagerDeploy.s.sol"; +import { MockValidatorContract_OnlyTiming_ForHardhatTest } from "@ronin/contracts/mocks/ronin/MockValidatorContract_OnlyTiming_ForHardhatTest.sol"; contract Migration_01_Deploy_RoninBridge is Migration { using StdStyle for *; + using LibProxy for *; BridgeSlash private _bridgeSlash; BridgeReward private _bridgeReward; @@ -25,15 +32,12 @@ contract Migration_01_Deploy_RoninBridge is Migration { address private _validatorSet; function run() external { - _roninGatewayV3 = new RoninGatewayV3Deploy().run(); - _bridgeSlash = new BridgeSlashDeploy().run(); - _bridgeReward = new BridgeRewardDeploy().run(); - _bridgeTracking = new BridgeTrackingDeploy().run(); + config.setLocalNetwork(IGeneralConfigExtended.LocalNetwork.Ronin); ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; - address[] memory callbackRegisters = new address[](1); - callbackRegisters[0] = address(_bridgeSlash); - callbackRegisters[1] = address(_roninGatewayV3); + // address[] memory callbackRegisters = new address[](0); + // callbackRegisters[0] = address(_bridgeSlash); + // callbackRegisters[1] = address(_roninGatewayV3); _roninBridgeManager = RoninBridgeManager( new RoninBridgeManagerDeploy().overrideArgs( @@ -56,6 +60,11 @@ contract Migration_01_Deploy_RoninBridge is Migration { ).run() ); + _roninGatewayV3 = new RoninGatewayV3Deploy().run(); + _bridgeSlash = new BridgeSlashDeploy().run(); + _bridgeReward = new BridgeRewardDeploy().run(); + _bridgeTracking = new BridgeTrackingDeploy().run(); + _initBridgeReward(); _initBridgeSlash(); _initRoninGatewayV3(); @@ -85,7 +94,11 @@ contract Migration_01_Deploy_RoninBridge is Migration { } function _initBridgeTracking() internal logFn("Init BridgeTracking") { - _bridgeTracking.initialize({ bridgeContract: address(_roninGatewayV3), validatorContract: _validatorSet, startedAtBlock_: 0 }); + _bridgeTracking.initialize({ + bridgeContract: address(_roninGatewayV3), + validatorContract: address(new MockValidatorContract_OnlyTiming_ForHardhatTest(200)), + startedAtBlock_: 0 + }); _bridgeTracking.initializeV3({ bridgeManager: address(_roninBridgeManager), bridgeSlash: address(_bridgeSlash), @@ -132,5 +145,12 @@ contract Migration_01_Deploy_RoninBridge is Migration { param.standards ); _roninGatewayV3.initializeV3(address(_roninBridgeManager)); + + address admin = payable(address(_roninGatewayV3)).getProxyAdmin(); + vm.startBroadcast(admin); + TransparentUpgradeableProxyV2(payable(address(_roninGatewayV3))).functionDelegateCall( + abi.encodeCall(HasContracts.setContract, (ContractType.BRIDGE_TRACKING, address(_bridgeTracking))) + ); + vm.stopBroadcast(); } } diff --git a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol index fa1158e6..38b4efc3 100644 --- a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol +++ b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol @@ -10,6 +10,7 @@ import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { IWETH } from "@ronin/contracts/interfaces/IWETH.sol"; import { WETHDeploy } from "../contracts/token/WETHDeploy.s.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { MainchainGatewayV3, MainchainGatewayV3Deploy } from "../contracts/MainchainGatewayV3Deploy.s.sol"; import { WethUnwrapper, MainchainWethUnwrapperDeploy } from "../contracts/MainchainWethUnwrapperDeploy.s.sol"; @@ -29,7 +30,7 @@ contract Migration_02_Deploy_MainchainBridge is Migration { } function run() external { - _isLocalETH = true; + config.setLocalNetwork(IGeneralConfigExtended.LocalNetwork.Eth); _mainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); _weth = loadContractOrDeploy(Contract.WETH.key()); @@ -38,8 +39,6 @@ contract Migration_02_Deploy_MainchainBridge is Migration { _initMainchainGatewayV3(); _initMainchainBridgeManager(); - - _isLocalETH = false; } function _initMainchainBridgeManager() internal logFn("Init RoninBridgeManager") { diff --git a/script/interfaces/IGeneralConfigExtended.sol b/script/interfaces/IGeneralConfigExtended.sol index 257b80aa..0a4e0e96 100644 --- a/script/interfaces/IGeneralConfigExtended.sol +++ b/script/interfaces/IGeneralConfigExtended.sol @@ -5,6 +5,12 @@ import { IGeneralConfig } from "@fdk/interfaces/IGeneralConfig.sol"; import { TNetwork } from "@fdk/types/Types.sol"; interface IGeneralConfigExtended is IGeneralConfig { + enum LocalNetwork { + Test, + Ronin, + Eth + } + /** * @dev Returns the companion mainchain network of a roninchain network * @@ -13,4 +19,8 @@ interface IGeneralConfigExtended is IGeneralConfig { * */ function getCompanionNetwork(TNetwork network) external pure returns (TNetwork); + + function getLocalNetwork() external view returns (LocalNetwork); + + function setLocalNetwork(LocalNetwork network) external; } diff --git a/script/interfaces/IPostCheck.sol b/script/interfaces/IPostCheck.sol new file mode 100644 index 00000000..92bedd45 --- /dev/null +++ b/script/interfaces/IPostCheck.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +interface IPostCheck { + function run() external; +} diff --git a/script/post-check/BasePostCheck.s.sol b/script/post-check/BasePostCheck.s.sol index 0033178b..d201fd59 100644 --- a/script/post-check/BasePostCheck.s.sol +++ b/script/post-check/BasePostCheck.s.sol @@ -5,17 +5,34 @@ import { Vm } from "forge-std/Vm.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { console2 as console } from "forge-std/console2.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { TNetwork, Network } from "script/utils/Network.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; +import { LibArray } from "script/shared/libraries/LibArray.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; abstract contract BasePostCheck is BaseMigration { using StdStyle for *; + using LibArray for *; + using LibProxy for *; uint256 internal seed = vm.unixTime(); - address internal __bridgeSlash; - address internal __bridgeReward; - address internal __bridgeTracking; - mapping(uint256 chainId => address manager) internal _manager; - mapping(uint256 chainId => address gateway) internal _gateway; + + address payable internal bridgeSlash; + address payable internal bridgeReward; + address payable internal bridgeTracking; + address payable internal roninBridgeManager; + address payable internal roninGateway; + address payable internal mainchainGateway; + address payable internal mainchainBridgeManager; + + address internal cheatGovernor; + address internal cheatOperator; + uint256 internal cheatGovernorPk; + uint256 internal cheatOperatorPk; + + bytes32 internal domainSeparator; modifier onPostCheck(string memory postCheckLabel) { uint256 snapshotId = _beforePostCheck(postCheckLabel); @@ -23,6 +40,44 @@ abstract contract BasePostCheck is BaseMigration { _afterPostCheck(postCheckLabel, snapshotId); } + modifier onlyOnRoninNetworkOrLocal() { + require( + block.chainid == DefaultNetwork.RoninMainnet.chainId() || block.chainid == DefaultNetwork.RoninTestnet.chainId() + || block.chainid == Network.RoninDevnet.chainId() || block.chainid == DefaultNetwork.Local.chainId(), + "chainid != RoninMainnet or RoninTestnet" + ); + _; + } + + function cheatAddOverWeightedGovernor(address manager) internal { + uint256 totalWeight; + try IBridgeManager(manager).getTotalWeight() returns (uint256 res) { + totalWeight = res; + } catch { + (, bytes memory res) = manager.staticcall(abi.encodeWithSignature("getTotalWeights()")); + totalWeight = abi.decode(res, (uint256)); + } + uint256 cheatVoteWeight = totalWeight * 100; + (cheatOperator, cheatOperatorPk) = makeAddrAndKey(string.concat("cheat-operator-", vm.toString(seed))); + (cheatGovernor, cheatGovernorPk) = makeAddrAndKey(string.concat("cheat-governor-", vm.toString(seed))); + + vm.deal(cheatGovernor, 1); + vm.deal(cheatOperator, 1); + + vm.prank(manager); + try TransparentUpgradeableProxyV2(payable(manager)).functionDelegateCall( + abi.encodeCall( + IBridgeManager.addBridgeOperators, + (cheatVoteWeight.toSingletonArray().toUint96sUnsafe(), cheatGovernor.toSingletonArray(), cheatOperator.toSingletonArray()) + ) + ) { } catch { + vm.prank(manager); + IBridgeManager(manager).addBridgeOperators( + cheatVoteWeight.toSingletonArray().toUint96sUnsafe(), cheatGovernor.toSingletonArray(), cheatOperator.toSingletonArray() + ); + } + } + function _beforePostCheck(string memory postCheckLabel) private returns (uint256 snapshotId) { snapshotId = vm.snapshot(); console.log("\n> ".cyan(), postCheckLabel.blue().italic(), "..."); diff --git a/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol index be54b06a..98955275 100644 --- a/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol +++ b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_addBridgeOperators.s.sol @@ -1,9 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { BasePostCheck } from "script/post-check/BasePostCheck.s.sol"; import { LibArray } from "script/shared/libraries/LibArray.sol"; +import { Contract } from "script/utils/Contract.sol"; /** * @title PostCheck_BridgeManager_CRUD_AddBridgeOperators @@ -32,7 +34,7 @@ abstract contract PostCheck_BridgeManager_CRUD_AddBridgeOperators is BasePostChe function validate_RevertWhen_NotSelfCalled_addBridgeOperators() private onPostCheck("validate_RevertWhen_NotSelfCalled_addBridgeOperators") { vm.expectRevert(); vm.prank(any); - IBridgeManager(_manager[block.chainid]).addBridgeOperators( + IBridgeManager(roninBridgeManager).addBridgeOperators( voteWeight.toSingletonArray().toUint96sUnsafe(), operator.toSingletonArray(), governor.toSingletonArray() ); } @@ -45,23 +47,32 @@ abstract contract PostCheck_BridgeManager_CRUD_AddBridgeOperators is BasePostChe onPostCheck("validate_RevertWhen_SelfCalled_TheListHasDuplicate_addBridgeOperators") { vm.expectRevert(); - vm.prank(_manager[block.chainid]); - bool[] memory addeds = IBridgeManager(_manager[block.chainid]).addBridgeOperators( - voteWeight.toSingletonArray().toUint96sUnsafe(), operator.toSingletonArray(), operator.toSingletonArray() + vm.prank(roninBridgeManager); + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall( + IBridgeManager.addBridgeOperators, (voteWeight.toSingletonArray().toUint96sUnsafe(), operator.toSingletonArray(), operator.toSingletonArray()) + ) ); vm.expectRevert(); - vm.prank(_manager[block.chainid]); - addeds = IBridgeManager(_manager[block.chainid]).addBridgeOperators( - voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), governor.toSingletonArray() + vm.prank(roninBridgeManager); + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall( + IBridgeManager.addBridgeOperators, (voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), governor.toSingletonArray()) + ) ); vm.expectRevert(); - vm.prank(_manager[block.chainid]); - addeds = IBridgeManager(_manager[block.chainid]).addBridgeOperators( - voteWeight.toSingletonArray().toUint96sUnsafe(), - governor.toSingletonArray().extend(operator.toSingletonArray()), - operator.toSingletonArray().extend(governor.toSingletonArray()) + vm.prank(roninBridgeManager); + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall( + IBridgeManager.addBridgeOperators, + ( + voteWeight.toSingletonArray().toUint96sUnsafe(), + governor.toSingletonArray().extend(operator.toSingletonArray()), + operator.toSingletonArray().extend(governor.toSingletonArray()) + ) + ) ); } @@ -72,10 +83,13 @@ abstract contract PostCheck_BridgeManager_CRUD_AddBridgeOperators is BasePostChe private onPostCheck("validate_RevertWhen_SelfCalled_InputArrayLengthMismatch_addBridgeOperators") { - vm.prank(_manager[block.chainid]); + vm.prank(roninBridgeManager); vm.expectRevert(); - IBridgeManager(_manager[block.chainid]).addBridgeOperators( - voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray().extend(governor.toSingletonArray()) + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall( + IBridgeManager.addBridgeOperators, + (voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray().extend(governor.toSingletonArray())) + ) ); } @@ -86,10 +100,13 @@ abstract contract PostCheck_BridgeManager_CRUD_AddBridgeOperators is BasePostChe private onPostCheck("validate_RevertWhen_SelfCalled_ContainsNullVoteWeight_addBridgeOperators") { - vm.prank(_manager[block.chainid]); + vm.prank(roninBridgeManager); vm.expectRevert(); - IBridgeManager(_manager[block.chainid]).addBridgeOperators( - uint256(0).toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray().extend(governor.toSingletonArray()) + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall( + IBridgeManager.addBridgeOperators, + (uint256(0).toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray().extend(governor.toSingletonArray())) + ) ); } @@ -97,15 +114,17 @@ abstract contract PostCheck_BridgeManager_CRUD_AddBridgeOperators is BasePostChe * @dev Validates that the function `addBridgeOperators`. */ function validate_addBridgeOperators() private onPostCheck("validate_addBridgeOperators") { - address manager = _manager[block.chainid]; + address manager = roninBridgeManager; uint256 totalWeightBefore = IBridgeManager(manager).getTotalWeight(); uint256 totalBridgeOperatorsBefore = IBridgeManager(manager).getBridgeOperators().length; vm.prank(manager); - bool[] memory addeds = - IBridgeManager(manager).addBridgeOperators(voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray()); + TransparentUpgradeableProxyV2(payable(manager)).functionDelegateCall( + abi.encodeCall( + IBridgeManager.addBridgeOperators, (voteWeight.toSingletonArray().toUint96sUnsafe(), governor.toSingletonArray(), operator.toSingletonArray()) + ) + ); - assertTrue(addeds[0], "addeds[0] == false"); assertTrue(IBridgeManager(manager).isBridgeOperator(operator), "isBridgeOperator(operator) == false"); assertEq(IBridgeManager(manager).getTotalWeight(), totalWeightBefore + voteWeight, "getTotalWeight() != totalWeightBefore + voteWeight"); assertEq( diff --git a/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_removeBridgeOperators.s.sol b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_removeBridgeOperators.s.sol index 1abcd2fc..881a3d92 100644 --- a/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_removeBridgeOperators.s.sol +++ b/script/post-check/bridge-manager/crud/PostCheck_BridgeManager_CRUD_removeBridgeOperators.s.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { BasePostCheck } from "script/post-check/BasePostCheck.s.sol"; import { LibArray } from "script/shared/libraries/LibArray.sol"; @@ -14,7 +15,7 @@ abstract contract PostCheck_BridgeManager_CRUD_RemoveBridgeOperators is BasePost address private any = makeAddr(string.concat("any", seedStr)); function _validate_BridgeManager_CRUD_removeBridgeOperators() internal { - address manager = _manager[block.chainid]; + address manager = roninBridgeManager; address[] memory operators = IBridgeManager(manager).getBridgeOperators(); uint256 idx = _bound(seed, 0, operators.length - 1); @@ -31,25 +32,31 @@ abstract contract PostCheck_BridgeManager_CRUD_RemoveBridgeOperators is BasePost function validate_RevertWhen_NotSelfCalled_removeBridgeOperators() private onPostCheck("validate_RevertWhen_NotSelfCalled_removeBridgeOperators") { vm.prank(any); vm.expectRevert(); - IBridgeManager(_manager[block.chainid]).removeBridgeOperators(operatorToRemove.toSingletonArray()); + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall(IBridgeManager.removeBridgeOperators, (operatorToRemove.toSingletonArray())) + ); } function validate_RevertWhen_SelfCalled_TheListHasDuplicate_removeBridgeOperators() private onPostCheck("validate_RevertWhen_SelfCalled_TheListHasDuplicate_removeBridgeOperators") { - vm.prank(_manager[block.chainid]); + vm.prank(roninBridgeManager); vm.expectRevert(); - IBridgeManager(_manager[block.chainid]).removeBridgeOperators(operatorToRemove.toSingletonArray().extend(operatorToRemove.toSingletonArray())); + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall(IBridgeManager.removeBridgeOperators, (operatorToRemove.toSingletonArray().extend(operatorToRemove.toSingletonArray()))) + ); } function validate_RevertWhen_SelfCalled_TheListHasNull_removeBridgeOperators() private onPostCheck("validate_RevertWhen_SelfCalled_TheListHasNull_removeBridgeOperators") { - vm.prank(_manager[block.chainid]); + vm.prank(roninBridgeManager); vm.expectRevert(); - IBridgeManager(_manager[block.chainid]).removeBridgeOperators(address(0).toSingletonArray()); + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall(IBridgeManager.removeBridgeOperators, (address(0).toSingletonArray())) + ); } function validate_RevertWhen_SelfCalled_RemovedOperatorIsNotInTheList_removeBridgeOperators() @@ -57,18 +64,22 @@ abstract contract PostCheck_BridgeManager_CRUD_RemoveBridgeOperators is BasePost onPostCheck("validate_RevertWhen_SelfCalled_RemovedOperatorIsNotInTheList_removeBridgeOperators") { vm.expectRevert(); - vm.prank(_manager[block.chainid]); - IBridgeManager(_manager[block.chainid]).removeBridgeOperators(any.toSingletonArray()); + vm.prank(roninBridgeManager); + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall(IBridgeManager.removeBridgeOperators, (any.toSingletonArray())) + ); } function validate_removeBridgeOperators() private onPostCheck("validate_removeBridgeOperators") { - address manager = _manager[block.chainid]; + address manager = roninBridgeManager; uint256 total = IBridgeManager(manager).totalBridgeOperator(); uint256 totalWeightBefore = IBridgeManager(manager).getTotalWeight(); uint256 expected = total - 1; vm.prank(manager); - IBridgeManager(manager).removeBridgeOperators(operatorToRemove.toSingletonArray()); + TransparentUpgradeableProxyV2(payable(roninBridgeManager)).functionDelegateCall( + abi.encodeCall(IBridgeManager.removeBridgeOperators, (operatorToRemove.toSingletonArray())) + ); uint256 actual = IBridgeManager(manager).totalBridgeOperator(); assertEq(actual, expected, "Bridge operator is not removed"); diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 9de9e916..13c13edd 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.0; import { console } from "forge-std/console.sol"; -import { TransparentUpgradeableProxy } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; +import { TransparentUpgradeableProxyV2, TransparentUpgradeableProxy } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { BasePostCheck } from "../../BasePostCheck.s.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; @@ -21,23 +21,10 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { using LibProposal for *; using LibCompanionNetwork for *; - address private _cheatGovernor; - address private _cheatOperator; - uint256 private _cheatGovernorPk; - uint96[] private _voteWeights = [100, 100]; address[] private _addingGovernors = [makeAddr("governor-1"), makeAddr("governor-2")]; address[] private _addingOperators = [makeAddr("operator-1"), makeAddr("operator-2")]; - modifier onlyOnRoninNetworkOrLocal() { - require( - block.chainid == DefaultNetwork.RoninMainnet.chainId() || block.chainid == DefaultNetwork.RoninTestnet.chainId() - || block.chainid == Network.RoninDevnet.chainId() || block.chainid == DefaultNetwork.Local.chainId(), - "chainid != RoninMainnet or RoninTestnet" - ); - _; - } - function _validate_BridgeManager_Proposal() internal { validate_ProposeGlobalProposalAndRelay_addBridgeOperator(); validate_proposeAndRelay_addBridgeOperator(); @@ -53,7 +40,10 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { address[] memory targets = address(manager).toSingletonArray(); uint256[] memory values = uint256(0).toSingletonArray(); - bytes[] memory calldatas = abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)).toSingletonArray(); + bytes[] memory calldatas = abi.encodeCall( + TransparentUpgradeableProxyV2.functionDelegateCall, + (abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))) + ).toSingletonArray(); uint256[] memory gasAmounts = uint256(1_000_000).toSingletonArray(); uint256 roninChainId = block.chainid; @@ -68,17 +58,18 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { nonce: manager.round(0) + 1 }); - vm.prank(_cheatGovernor); + vm.prank(cheatGovernor); manager.propose(roninChainId, block.timestamp + 20 minutes, address(0x0), targets, values, calldatas, gasAmounts); { TNetwork currentNetwork = CONFIG.getCurrentNetwork(); - (uint256 companionChainId, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); - MainchainBridgeManager mainchainManager = MainchainBridgeManager(_manager[companionChainId]); - console.log("MainchainBridgeManager:", vm.getLabel(address(mainchainManager))); + (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); CONFIG.createFork(companionNetwork); CONFIG.switchTo(companionNetwork); + + MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + uint256 snapshotId = vm.snapshot(); // Cheat add governor @@ -96,15 +87,15 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { nonce: mainchainManager.round(block.chainid) + 1 }); - SignatureConsumer.Signature[] memory signatures = proposal.generateSignatures(_cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); + SignatureConsumer.Signature[] memory signatures = proposal.generateSignatures(cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); Ballot.VoteType[] memory _supports = new Ballot.VoteType[](signatures.length); uint256 minimumForVoteWeight = mainchainManager.minimumVoteWeight(); - uint256 totalForVoteWeight = mainchainManager.getGovernorWeight(_cheatGovernor); + uint256 totalForVoteWeight = mainchainManager.getGovernorWeight(cheatGovernor); console.log("Total for vote weight:", totalForVoteWeight); console.log("Minimum for vote weight:", minimumForVoteWeight); - vm.prank(_cheatGovernor); + vm.prank(cheatGovernor); mainchainManager.relayProposal(proposal, _supports, signatures); for (uint256 i; i < _addingGovernors.length; ++i) { assertEq(mainchainManager.isBridgeOperator(_addingOperators[i]), true, "isBridgeOperator == false"); @@ -131,7 +122,10 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { expiryTimestamp: block.timestamp + 20 minutes, targetOptions: targetOptions, values: uint256(0).toSingletonArray(), - calldatas: abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators)).toSingletonArray(), + calldatas: abi.encodeCall( + TransparentUpgradeableProxyV2.functionDelegateCall, + (abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))) + ).toSingletonArray(), gasAmounts: uint256(1_000_000).toSingletonArray(), nonce: manager.round(0) + 1 }); @@ -139,31 +133,33 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { SignatureConsumer.Signature[] memory signatures; Ballot.VoteType[] memory _supports; { - signatures = globalProposal.generateSignaturesGlobal(_cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); + signatures = globalProposal.generateSignaturesGlobal(cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); _supports = new Ballot.VoteType[](signatures.length); - vm.prank(_cheatGovernor); + vm.prank(cheatGovernor); manager.proposeGlobalProposalStructAndCastVotes(globalProposal, _supports, signatures); } // Check if the proposal is voted - assertEq(manager.globalProposalVoted(globalProposal.nonce, _cheatGovernor), true); + assertEq(manager.globalProposalVoted(globalProposal.nonce, cheatGovernor), true); for (uint256 i; i < _addingGovernors.length; ++i) { assertEq(manager.isBridgeOperator(_addingOperators[i]), true, "isBridgeOperator == false"); } { TNetwork currentNetwork = CONFIG.getCurrentNetwork(); - (uint256 companionChainId, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); - MainchainBridgeManager mainchainManager = MainchainBridgeManager(_manager[companionChainId]); + (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); CONFIG.createFork(companionNetwork); CONFIG.switchTo(companionNetwork); + + MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + uint256 snapshotId = vm.snapshot(); cheatAddOverWeightedGovernor(address(mainchainManager)); - vm.prank(_cheatGovernor); + vm.prank(cheatGovernor); mainchainManager.relayGlobalProposal(globalProposal, _supports, signatures); for (uint256 i; i < _addingGovernors.length; ++i) { @@ -231,15 +227,4 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { manager.executeProposal(proposal); } - - function cheatAddOverWeightedGovernor(address manager) private { - uint256 cheatVoteWeight = IBridgeManager(manager).getTotalWeight() * 100; - _cheatOperator = makeAddr(string.concat("cheat-operator-", vm.toString(seed))); - (_cheatGovernor, _cheatGovernorPk) = makeAddrAndKey(string.concat("cheat-governor-", vm.toString(seed))); - - vm.prank(manager); - bool[] memory addeds = IBridgeManager(manager).addBridgeOperators( - cheatVoteWeight.toSingletonArray().toUint96sUnsafe(), _cheatGovernor.toSingletonArray(), _cheatOperator.toSingletonArray() - ); - } } diff --git a/script/post-check/gateway/PostCheck_Gateway.s.sol b/script/post-check/gateway/PostCheck_Gateway.s.sol new file mode 100644 index 00000000..0abd1f0a --- /dev/null +++ b/script/post-check/gateway/PostCheck_Gateway.s.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { PostCheck_Gateway_DepositAndWithdraw } from "./deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol"; + +abstract contract PostCheck_Gateway is PostCheck_Gateway_DepositAndWithdraw { + function _validate_Gateway() internal onPostCheck("_validate_Gateway") { + _validate_Gateway_DepositAndWithdraw(); + } +} diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol new file mode 100644 index 00000000..bd372e4c --- /dev/null +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console } from "forge-std/console.sol"; +import { Vm, VmSafe } from "forge-std/Vm.sol"; +import { BasePostCheck } from "script/post-check/BasePostCheck.s.sol"; +import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; +import { Contract } from "script/utils/Contract.sol"; +import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Transfer as LibTransfer } from "@ronin/contracts/libraries/Transfer.sol"; +import { TNetwork, Network } from "script/utils/Network.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { Proposal, LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { StdStorage, stdStorage } from "forge-std/StdStorage.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { LibArray } from "script/shared/libraries/LibArray.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { IRoninGatewayV3, RoninGatewayV3 } from "@ronin/contracts/ronin/gateway/RoninGatewayV3.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainGatewayV3, MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; + +abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, SignatureConsumer { + using LibProxy for *; + using LibArray for *; + using LibProposal for *; + using stdStorage for StdStorage; + using LibCompanionNetwork for *; + using LibTransfer for LibTransfer.Request; + using LibTransfer for LibTransfer.Receipt; + + address private user = makeAddr("user"); + uint256 private quantity; + + LibTransfer.Request depositRequest; + LibTransfer.Request withdrawRequest; + + MockERC20 private roninERC20; + MockERC20 private mainchainERC20; + + address[] private roninTokens; + address[] private mainchainTokens; + TokenStandard[] private standards = [TokenStandard.ERC20]; + + uint256 private roninChainId; + uint256 private mainchainChainId; + + TNetwork private currentNetwork; + TNetwork private companionNetwork; + + function _setUp() private onlyOnRoninNetworkOrLocal { + console.log("RoninBridgeManager", roninBridgeManager); + console.log("MainchainBridgeManager", mainchainBridgeManager); + + console.log("RoninGateway", roninGateway); + console.log("MainchainGateway", mainchainGateway); + + _setUpOnRonin(); + _setUpOnMainchain(); + _mapTokenRonin(); + _mapTokenMainchain(); + } + + function _mapTokenRonin() private { + uint256[] memory chainIds = new uint256[](1); + chainIds[0] = network().companionChainId(); + address admin = roninGateway.getProxyAdmin(); + console.log("Admin", admin); + vm.prank(address(admin)); + TransparentUpgradeableProxyV2(payable(address(roninGateway))).functionDelegateCall( + abi.encodeCall(RoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)) + ); + } + + function _mapTokenMainchain() private { + (, companionNetwork) = network().companionNetworkData(); + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + + uint256[][4] memory thresholds; + thresholds[0] = new uint256[](1); + thresholds[0][0] = 200_000_000 ether; + thresholds[1] = new uint256[](1); + thresholds[1][0] = 800_000_000 ether; + thresholds[2] = new uint256[](1); + thresholds[2][0] = 10; + thresholds[3] = new uint256[](1); + thresholds[3][0] = 500_000_000 ether; + + console.log("Mainchain Gateway", address(mainchainGateway)); + address admin = mainchainGateway.getProxyAdmin(); + console.log("Admin", admin); + + vm.prank(admin); + TransparentUpgradeableProxyV2(payable(address(mainchainGateway))).functionDelegateCall( + abi.encodeCall(MainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)) + ); + + CONFIG.switchTo(currentNetwork); + } + + function _setUpOnRonin() private { + roninERC20 = new MockERC20("RoninERC20", "RERC20"); + // roninERC20.initialize("RoninERC20", "RERC20", 18); + roninTokens.push(address(roninERC20)); + roninChainId = block.chainid; + currentNetwork = network(); + + cheatAddOverWeightedGovernor(address(roninBridgeManager)); + + vm.deal(user, 10 ether); + deal(address(roninERC20), user, 1000 ether); + } + + function _setUpOnMainchain() private { + (, companionNetwork) = network().companionNetworkData(); + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + + mainchainChainId = block.chainid; + domainSeparator = MainchainBridgeManager(mainchainBridgeManager).DOMAIN_SEPARATOR(); + + cheatAddOverWeightedGovernor(address(mainchainBridgeManager)); + + mainchainERC20 = new MockERC20("MainchainERC20", "MERC20"); + // mainchainERC20.initialize("MainchainERC20", "MERC20", 18); + mainchainTokens.push(address(mainchainERC20)); + + vm.deal(user, 10 ether); + deal(address(mainchainERC20), user, 1000 ether); + + CONFIG.switchTo(currentNetwork); + } + + function _validate_Gateway_DepositAndWithdraw() internal onlyOnRoninNetworkOrLocal { + _setUp(); + validate_Gateway_depositERC20(); + validate_Gateway_withdrawERC20(); + } + + function validate_Gateway_depositERC20() private onPostCheck("validate_Gateway_depositERC20") { + depositRequest.recipientAddr = makeAddr("ronin-recipient"); + depositRequest.tokenAddr = address(mainchainERC20); + depositRequest.info.erc = TokenStandard.ERC20; + depositRequest.info.id = 0; + depositRequest.info.quantity = 100 ether; + + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + + vm.prank(user); + mainchainERC20.approve(address(mainchainGateway), 100 ether); + vm.prank(user); + vm.recordLogs(); + MainchainGatewayV3(mainchainGateway).requestDepositFor(depositRequest); + + VmSafe.Log[] memory logs = vm.getRecordedLogs(); + LibTransfer.Receipt memory receipt; + bytes32 receiptHash; + for (uint256 i; i < logs.length; ++i) { + if (logs[i].emitter == address(mainchainGateway) && logs[i].topics[0] == IMainchainGatewayV3.DepositRequested.selector) { + (receiptHash, receipt) = abi.decode(logs[i].data, (bytes32, LibTransfer.Receipt)); + } + } + + CONFIG.switchTo(currentNetwork); + + vm.prank(cheatOperator); + RoninGatewayV3(roninGateway).depositFor(receipt); + + assertEq(roninERC20.balanceOf(depositRequest.recipientAddr), 100 ether); + } + + function validate_Gateway_withdrawERC20() private onPostCheck("validate_Gateway_withdrawERC20") { + withdrawRequest.recipientAddr = makeAddr("mainchain-recipient"); + withdrawRequest.tokenAddr = address(roninERC20); + withdrawRequest.info.erc = TokenStandard.ERC20; + withdrawRequest.info.id = 0; + withdrawRequest.info.quantity = 100 ether; + + // uint256 _numOperatorsForVoteExecuted = (RoninBridgeManager(_manager[block.chainid]).minimumVoteWeight() - 1) / 100 + 1; + vm.prank(user); + roninERC20.approve(address(roninGateway), 100 ether); + vm.prank(user); + vm.recordLogs(); + RoninGatewayV3(payable(address(roninGateway))).requestWithdrawalFor(withdrawRequest, mainchainChainId); + + VmSafe.Log[] memory logs = vm.getRecordedLogs(); + LibTransfer.Receipt memory receipt; + bytes32 receiptHash; + for (uint256 i; i < logs.length; ++i) { + if (logs[i].emitter == address(roninGateway) && logs[i].topics[0] == IRoninGatewayV3.WithdrawalRequested.selector) { + (receiptHash, receipt) = abi.decode(logs[i].data, (bytes32, LibTransfer.Receipt)); + } + } + + bytes32 receiptDigest = LibTransfer.receiptDigest(domainSeparator, receiptHash); + + (uint8 v, bytes32 r, bytes32 s) = vm.sign(cheatOperatorPk, receiptDigest); + + Signature[] memory sigs = new Signature[](1); + sigs[0] = Signature(v, r, s); + + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + + MainchainGatewayV3(payable(mainchainGateway)).submitWithdrawal(receipt, sigs); + + assertEq(mainchainERC20.balanceOf(withdrawRequest.recipientAddr), 100 ether); + + CONFIG.switchTo(currentNetwork); + } + + // Set the balance of an account for any ERC20 token + // Use the alternative signature to update `totalSupply` + function deal(address token, address to, uint256 give) internal virtual { + deal(token, to, give, false); + } + + function deal(address token, address to, uint256 give, bool adjust) internal virtual { + // get current balance + (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); + uint256 prevBal = abi.decode(balData, (uint256)); + + // update balance + stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give); + + // update total supply + if (adjust) { + (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd)); + uint256 totSup = abi.decode(totSupData, (uint256)); + if (give < prevBal) { + totSup -= (prevBal - give); + } else { + totSup += (give - prevBal); + } + stdstore.target(token).sig(0x18160ddd).checked_write(totSup); + } + } +} diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index ea32051c..2f0b0ad3 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.0; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { Vm } from "forge-std/Vm.sol"; import { console2 as console } from "forge-std/console2.sol"; import { IGeneralConfigExtended } from "script/interfaces/IGeneralConfigExtended.sol"; @@ -16,12 +17,14 @@ import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeMa import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { CoreGovernance } from "@ronin/contracts/extensions/sequential-governance/CoreGovernance.sol"; import { LibArray } from "./LibArray.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { LibCompanionNetwork } from "./LibCompanionNetwork.sol"; import { LibErrorHandler } from "lib/foundry-deployment-kit/lib/contract-libs/src/LibErrorHandler.sol"; import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; library LibProposal { using LibArray for *; + using LibProxy for *; using ECDSA for bytes32; using LibErrorHandler for bool; using LibCompanionNetwork for *; @@ -52,9 +55,9 @@ library LibProposal { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,bytes32 salt)"), - keccak256("BridgeAdmin"), // name hash - keccak256("2"), // version hash - keccak256(abi.encode("BRIDGE_ADMIN", chainId)) // salt + keccak256("BridgeManager"), // name hash + keccak256("3"), // version hash + keccak256(abi.encode("BRIDGE_MANAGER", chainId)) // salt ) ); } @@ -160,7 +163,7 @@ library LibProposal { address[] memory roninTargets = new address[](targetOptions.length); address[] memory mainchainTargets = new address[](targetOptions.length); - if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key()) { + if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { manager = config.getAddress(currentNetwork, Contract.MainchainBridgeManager.key()); companionManager = config.getAddress(companionNetwork, Contract.RoninBridgeManager.key()); } else { @@ -199,6 +202,7 @@ library LibProposal { uint256 gasUsed = gasleft(); (bool success, bytes memory returnOrRevertData) = mainchainTargets[i].call{ value: values[i], gas: gasAmounts[i] }(calldatas[i]); + gasUsed = gasUsed - gasleft(); if (success) { @@ -228,6 +232,7 @@ library LibProposal { vm.prank(governance); uint256 gasUsed = gasleft(); + (bool success, bytes memory returnOrRevertData) = targets[i].call{ value: values[i], gas: gasAmounts[i] }(calldatas[i]); gasUsed = gasUsed - gasleft(); diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index e0ed8376..e943ea15 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -22,7 +22,8 @@ enum Contract { MainchainGatewayV3, MainchainBridgeManager, MainchainWethUnwrapper, - MainchainGatewayBatcher + MainchainGatewayBatcher, + PostChecker } using { key, name } for Contract global; @@ -54,5 +55,7 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.MainchainBridgeManager) return "MainchainBridgeManager"; if (contractEnum == Contract.MainchainWethUnwrapper) return "WethUnwrapper"; + if (contractEnum == Contract.PostChecker) return "PostChecker"; + revert("Contract: Unknown contract"); } diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol b/test/bridge/integration/ronin-gateway/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol similarity index 100% rename from test/bridge/integration/bridge-manager/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol rename to test/bridge/integration/ronin-gateway/deposit-and-record/bulkAcknowledgeMainchainWithdrew.Gateway.t.sol diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol b/test/bridge/integration/ronin-gateway/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol similarity index 100% rename from test/bridge/integration/bridge-manager/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol rename to test/bridge/integration/ronin-gateway/deposit-and-record/bulkDepositAndRecord.Gateway.t.sol diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol b/test/bridge/integration/ronin-gateway/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol similarity index 100% rename from test/bridge/integration/bridge-manager/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol rename to test/bridge/integration/ronin-gateway/deposit-and-record/bulkSubmitWithdrawalSignatures.Gateway.t.sol diff --git a/test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol b/test/bridge/integration/ronin-gateway/deposit-and-record/depositAndRecord.Gateway.t.sol similarity index 100% rename from test/bridge/integration/bridge-manager/deposit-and-record/depositAndRecord.Gateway.t.sol rename to test/bridge/integration/ronin-gateway/deposit-and-record/depositAndRecord.Gateway.t.sol From 10096bb78ed8e662c2512fb255df7a75bd6b634e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 14:48:52 +0700 Subject: [PATCH 171/305] script: fix script for full flow --- ...0240411-deploy-bridge-manager-helper.s.sol | 93 +++++++++++ .../20240411-helper.s.sol | 2 - ...40411-p1-deploy-ronin-bridge-manager.s.sol | 64 +------- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 34 ++-- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 152 +++++++++--------- .../verify-script.s.sol | 23 +++ script/Migration.s.sol | 24 ++- .../contracts/RoninBridgeManagerDeploy.s.sol | 2 +- script/post-check/BasePostCheck.s.sol | 4 +- 9 files changed, 231 insertions(+), 167 deletions(-) create mode 100644 script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol create mode 100644 script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol new file mode 100644 index 00000000..39f5604f --- /dev/null +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; + +import "../Migration.s.sol"; + +contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { + RoninBridgeManager _newRoninBridgeManager; + + function _deployRoninBridgeManager() internal returns (RoninBridgeManager) { + ISharedArgument.SharedParameter memory param; + + param.roninBridgeManager.num = 7; + param.roninBridgeManager.denom = 10; + param.roninBridgeManager.roninChainId = block.chainid; + param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.roninBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.bridgeOperators = new address[](4); + param.roninBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; + param.roninBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; + param.roninBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; + param.roninBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; + + param.roninBridgeManager.governors = new address[](4); + param.roninBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + param.roninBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + param.roninBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + param.roninBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + param.roninBridgeManager.voteWeights = new uint96[](4); + param.roninBridgeManager.voteWeights[0] = 100; + param.roninBridgeManager.voteWeights[1] = 100; + param.roninBridgeManager.voteWeights[2] = 100; + param.roninBridgeManager.voteWeights[3] = 100; + + param.roninBridgeManager.targetOptions = new GlobalProposal.TargetOption[](5); + param.roninBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + param.roninBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.BridgeReward; + param.roninBridgeManager.targetOptions[2] = GlobalProposal.TargetOption.BridgeSlash; + param.roninBridgeManager.targetOptions[3] = GlobalProposal.TargetOption.BridgeTracking; + param.roninBridgeManager.targetOptions[4] = GlobalProposal.TargetOption.PauseEnforcer; + + param.roninBridgeManager.targets = new address[](5); + param.roninBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); + param.roninBridgeManager.targets[2] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + param.roninBridgeManager.targets[3] = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + param.roninBridgeManager.targets[4] = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + + _newRoninBridgeManager = RoninBridgeManager( + new RoninBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + RoninBridgeManagerConstructor.initialize, + ( + param.roninBridgeManager.num, + param.roninBridgeManager.denom, + param.roninBridgeManager.roninChainId, + param.roninBridgeManager.expiryDuration, + param.roninBridgeManager.bridgeContract, + param.roninBridgeManager.callbackRegisters, + param.roninBridgeManager.bridgeOperators, + param.roninBridgeManager.governors, + param.roninBridgeManager.voteWeights, + param.roninBridgeManager.targetOptions, + param.roninBridgeManager.targets + ) + ) + ).run() + ); + + return _newRoninBridgeManager; + } +} diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol index 84749f17..ce9652fd 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -19,14 +19,12 @@ contract Migration__20240409_Helper is Migration { address[] internal _voters; RoninBridgeManager internal _currRoninBridgeManager; - RoninBridgeManager internal _newRoninBridgeManager; function _helperProposeForCurrentNetwork(LegacyProposalDetail memory proposal) internal { vm.broadcast(_governor); address(_currRoninBridgeManager).call( abi.encodeWithSignature( "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", - // proposal.chainId, proposal.expiryTimestamp, proposal.targets, proposal.values, diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol index e2da3e12..f13e088e 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol @@ -21,75 +21,17 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; +import "./20240411-deploy-bridge-manager-helper.s.sol"; import "../Migration.s.sol"; -contract Migration__20240409_P1_DeployRoninBridgeManager is Migration { +contract Migration__20240409_P1_DeployRoninBridgeManager is Migration, Migration__2024041_DeployRoninBridgeManagerHelper { ISharedArgument.SharedParameter _param; - RoninBridgeManager _newRoninBridgeManager; function setUp() public override { super.setUp(); } function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { - ISharedArgument.SharedParameter memory param; - - param.roninBridgeManager.num = 7; - param.roninBridgeManager.denom = 10; - param.roninBridgeManager.roninChainId = block.chainid; - param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.roninBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - param.roninBridgeManager.bridgeOperators = new address[](4); - param.roninBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; - param.roninBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; - param.roninBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; - param.roninBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; - - param.roninBridgeManager.governors = new address[](4); - param.roninBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - param.roninBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - param.roninBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - param.roninBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - - param.roninBridgeManager.voteWeights = new uint96[](4); - param.roninBridgeManager.voteWeights[0] = 100; - param.roninBridgeManager.voteWeights[1] = 100; - param.roninBridgeManager.voteWeights[2] = 100; - param.roninBridgeManager.voteWeights[3] = 100; - - param.roninBridgeManager.targetOptions = new GlobalProposal.TargetOption[](5); - param.roninBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; - param.roninBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.BridgeReward; - param.roninBridgeManager.targetOptions[2] = GlobalProposal.TargetOption.BridgeSlash; - param.roninBridgeManager.targetOptions[3] = GlobalProposal.TargetOption.BridgeTracking; - param.roninBridgeManager.targetOptions[4] = GlobalProposal.TargetOption.PauseEnforcer; - - param.roninBridgeManager.targets = new address[](4); - param.roninBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - param.roninBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); - param.roninBridgeManager.targets[2] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - param.roninBridgeManager.targets[3] = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - param.roninBridgeManager.targets[4] = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); - - _newRoninBridgeManager = RoninBridgeManager( - new RoninBridgeManagerDeploy().overrideArgs( - abi.encodeCall( - RoninBridgeManagerConstructor.initialize, - ( - param.roninBridgeManager.num, - param.roninBridgeManager.denom, - param.roninBridgeManager.roninChainId, - param.roninBridgeManager.expiryDuration, - param.roninBridgeManager.bridgeContract, - param.roninBridgeManager.callbackRegisters, - param.roninBridgeManager.bridgeOperators, - param.roninBridgeManager.governors, - param.roninBridgeManager.voteWeights, - param.roninBridgeManager.targetOptions, - param.roninBridgeManager.targets - ) - ) - ).run() - ); + _deployRoninBridgeManager(); } } diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index d231c4d9..5a1ae5f5 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -20,30 +20,31 @@ import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; - +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; +import "./20240411-deploy-bridge-manager-helper.s.sol"; import "./20240411-helper.s.sol"; -contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_Helper { +contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_Helper, Migration__2024041_DeployRoninBridgeManagerHelper { ISharedArgument.SharedParameter _param; - function setUp() public override { + function setUp() public virtual override { super.setUp(); + } - _newRoninBridgeManager = RoninBridgeManager(address(0xdeadbeef)); // TODO: fulfill here + function run() public virtual onlyOn(DefaultNetwork.RoninTestnet.key()) { _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - } + _newRoninBridgeManager = _deployRoninBridgeManager(); - function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); _changeAdminOfEnforcer(); - _upgradeBridge(); + _upgradeBridgeRoninchain(); } - function _changeAdminOfEnforcer() internal { + function _changeAdminOfEnforcer() private { RoninBridgeManager roninGA = RoninBridgeManager(0x53Ea388CB72081A3a397114a43741e7987815896); address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); @@ -91,7 +92,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H } } - function _upgradeBridge() internal { + function _upgradeBridgeRoninchain() private { address bridgeRewardLogic = _deployLogic(Contract.BridgeReward.key()); address bridgeSlashLogic = _deployLogic(Contract.BridgeSlash.key()); address bridgeTrackingLogic = _deployLogic(Contract.BridgeTracking.key()); @@ -105,7 +106,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; - uint N = 10; + uint N = 11; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); @@ -119,8 +120,9 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H targets[5] = bridgeSlashProxy; targets[6] = bridgeTrackingProxy; targets[7] = roninGatewayV3Proxy; - targets[8] = pauseEnforcerProxy; + targets[8] = roninGatewayV3Proxy; targets[9] = pauseEnforcerProxy; + targets[10] = pauseEnforcerProxy; calldatas[0] = abi.encodeWithSignature("upgradeTo(address)", bridgeRewardLogic); calldatas[1] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); @@ -129,9 +131,13 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[5] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[7] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[8] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); - calldatas[9] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[7] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", + (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager))) + ); + calldatas[8] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[9] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[10] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); for (uint i; i < N; ++i) { gasAmounts[i] = 1_000_000; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index 213649bb..fea4c058 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -23,37 +23,28 @@ import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtil import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; +import "./20240411-helper.s.sol"; import "./20240411-operators-key.s.sol"; import "../Migration.s.sol"; -struct LegacyProposalDetail { - uint256 nonce; - uint256 chainId; - uint256 expiryTimestamp; - address[] targets; - uint256[] values; - bytes[] calldatas; - uint256[] gasAmounts; -} - contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__20240409_GovernorsKey { - ISharedArgument.SharedParameter _param; MainchainBridgeManager _currMainchainBridgeManager; MainchainBridgeManager _newMainchainBridgeManager; address private _governor; address[] private _voters; - address PROXY_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; + address TESTNET_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; - function setUp() public override { + function setUp() public virtual override { super.setUp(); - CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), PROXY_ADMIN); + } + + function run() public virtual onlyOn(Network.Sepolia.key()) { + CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); - } - function run() public onlyOn(Network.Sepolia.key()) { _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); @@ -61,7 +52,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ _changeTempAdmin(); _deployMainchainBridgeManager(); - _upgradeBridge(); + _upgradeBridgeMainchain(); } function _changeTempAdmin() internal { @@ -74,9 +65,62 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ vm.stopBroadcast(); } - function _upgradeBridge() internal { - _newMainchainBridgeManager = new MainchainBridgeManagerDeploy().run(); + function _deployMainchainBridgeManager() internal returns (address mainchainBM) { + ISharedArgument.SharedParameter memory param; + + param.mainchainBridgeManager.num = 7; + param.mainchainBridgeManager.denom = 10; + param.mainchainBridgeManager.roninChainId = 2021; + param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.bridgeOperators = new address[](4); + param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; + param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; + param.mainchainBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; + param.mainchainBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; + + param.mainchainBridgeManager.governors = new address[](4); + param.mainchainBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + param.mainchainBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + param.mainchainBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + param.mainchainBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + param.mainchainBridgeManager.voteWeights = new uint96[](4); + param.mainchainBridgeManager.voteWeights[0] = 100; + param.mainchainBridgeManager.voteWeights[1] = 100; + param.mainchainBridgeManager.voteWeights[2] = 100; + param.mainchainBridgeManager.voteWeights[3] = 100; + + param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); + param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; + param.mainchainBridgeManager.targets = new address[](2); + param.mainchainBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + + _newMainchainBridgeManager = MainchainBridgeManager( + new MainchainBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + _newMainchainBridgeManager.initialize, + ( + param.mainchainBridgeManager.num, + param.mainchainBridgeManager.denom, + param.mainchainBridgeManager.roninChainId, + param.mainchainBridgeManager.bridgeContract, + param.mainchainBridgeManager.callbackRegisters, + param.mainchainBridgeManager.bridgeOperators, + param.mainchainBridgeManager.governors, + param.mainchainBridgeManager.voteWeights, + param.mainchainBridgeManager.targetOptions, + param.mainchainBridgeManager.targets + ) + ) + ).run() + ); + } + + function _upgradeBridgeMainchain() internal { address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); @@ -87,7 +131,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; - uint N = 4; + uint N = 5; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); @@ -95,15 +139,20 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ targets[0] = mainchainGatewayV3Proxy; targets[1] = mainchainGatewayV3Proxy; - targets[2] = pauseEnforcerProxy; + targets[2] = mainchainGatewayV3Proxy; targets[3] = pauseEnforcerProxy; + targets[4] = pauseEnforcerProxy; calldatas[0] = abi.encodeWithSignature( "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) ); - calldatas[1] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); - calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); - calldatas[3] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[1] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", + (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager))) + ); + calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); for (uint i; i < N; ++i) { gasAmounts[i] = 1_000_000; @@ -197,59 +246,4 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ digest_ := keccak256(ptr, 0x100) } } - - function _deployMainchainBridgeManager() internal returns (address mainchainBM) { - ISharedArgument.SharedParameter memory param; - - param.mainchainBridgeManager.num = 7; - param.mainchainBridgeManager.denom = 10; - param.mainchainBridgeManager.roninChainId = 2021; - param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - param.mainchainBridgeManager.bridgeOperators = new address[](4); - param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; - param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; - param.mainchainBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; - param.mainchainBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; - - param.mainchainBridgeManager.governors = new address[](4); - param.mainchainBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - param.mainchainBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - param.mainchainBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - param.mainchainBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - - param.mainchainBridgeManager.voteWeights = new uint96[](4); - param.mainchainBridgeManager.voteWeights[0] = 100; - param.mainchainBridgeManager.voteWeights[1] = 100; - param.mainchainBridgeManager.voteWeights[2] = 100; - param.mainchainBridgeManager.voteWeights[3] = 100; - - param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); - param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; - param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; - - param.mainchainBridgeManager.targets = new address[](2); - param.mainchainBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - param.mainchainBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - - _newMainchainBridgeManager = MainchainBridgeManager( - new MainchainBridgeManagerDeploy().overrideArgs( - abi.encodeCall( - _newMainchainBridgeManager.initialize, - ( - param.mainchainBridgeManager.num, - param.mainchainBridgeManager.denom, - param.mainchainBridgeManager.roninChainId, - param.mainchainBridgeManager.bridgeContract, - param.mainchainBridgeManager.callbackRegisters, - param.mainchainBridgeManager.bridgeOperators, - param.mainchainBridgeManager.governors, - param.mainchainBridgeManager.voteWeights, - param.mainchainBridgeManager.targetOptions, - param.mainchainBridgeManager.targets - ) - ) - ).run() - ); - } } diff --git a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol new file mode 100644 index 00000000..cc3bb4de --- /dev/null +++ b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "./20240411-p2-upgrade-bridge-ronin-chain.s.sol"; +import "./20240411-p3-upgrade-bridge-main-chain.s.sol"; + +contract Verify_Script_20240411 is Migration__20240409_P2_UpgradeBridgeRoninchain, Migration__20240409_P3_UpgradeBridgeMainchain { + function setUp() public override(Migration__20240409_P2_UpgradeBridgeRoninchain, Migration__20240409_P3_UpgradeBridgeMainchain) { + Migration__20240409_P2_UpgradeBridgeRoninchain.setUp(); + } + + function run() public override(Migration__20240409_P2_UpgradeBridgeRoninchain, Migration__20240409_P3_UpgradeBridgeMainchain) { + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + Migration__20240409_P2_UpgradeBridgeRoninchain.run(); + + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + Migration__20240409_P3_UpgradeBridgeMainchain.run(); + + CONFIG.switchTo(currentNetwork); + } +} \ No newline at end of file diff --git a/script/Migration.s.sol b/script/Migration.s.sol index a2f7116b..999048ee 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -208,13 +208,19 @@ contract Migration is BaseMigration, Utils { function _getProxyAdmin() internal virtual override returns (address payable proxyAdmin) { TNetwork currentNetwork = network(); + console.log("[>] _getProxyAdmin", "Network name:".yellow(), currentNetwork.networkName()); + if ( currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == Network.RoninDevnet.key() ) { - proxyAdmin = loadContract(Contract.RoninBridgeManager.key()); - } else if (currentNetwork == Network.Sepolia.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { - proxyAdmin = loadContract(Contract.MainchainBridgeManager.key()); - } else if (currentNetwork == DefaultNetwork.Local.key()) { + return loadContract(Contract.RoninBridgeManager.key()); + } + + if (currentNetwork == Network.Sepolia.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { + return loadContract(Contract.MainchainBridgeManager.key()); + } + + if (currentNetwork == DefaultNetwork.Local.key()) { if (config.getLocalNetwork() == IGeneralConfigExtended.LocalNetwork.Ronin) { try config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()) returns (address payable res) { proxyAdmin = res; @@ -234,11 +240,13 @@ contract Migration is BaseMigration, Utils { } else { proxyAdmin = payable(config.sharedArguments().test.proxyAdmin); } - } else { - console.log("Network not supported".yellow(), currentNetwork.networkName()); - console.log("Chain Id".yellow(), block.chainid); - revert("BridgeMigration(_getProxyAdmin): Unhandled case"); + + return proxyAdmin; } + + console.log("Network not supported".yellow(), currentNetwork.networkName()); + console.log("Chain Id".yellow(), block.chainid); + revert("BridgeMigration(_getProxyAdmin): Unhandled case"); } function _upgradeRaw(address proxyAdmin, address payable proxy, address logic, bytes memory args) internal virtual override { diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index 24acb9a7..86361339 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -36,7 +36,7 @@ contract RoninBridgeManagerDeploy is Migration { } function run() public virtual returns (RoninBridgeManager) { - address payable instance = _deployProxy(Contract.RoninBridgeManagerConstructor.key()); + address payable instance = _deployProxy(Contract.RoninBridgeManagerConstructor.key(), sender()); address logic = _deployLogic(Contract.RoninBridgeManager.key()); address proxyAdmin = instance.getProxyAdmin(); console2.log("Proxy admin ", proxyAdmin); diff --git a/script/post-check/BasePostCheck.s.sol b/script/post-check/BasePostCheck.s.sol index d201fd59..6d368cb7 100644 --- a/script/post-check/BasePostCheck.s.sol +++ b/script/post-check/BasePostCheck.s.sol @@ -61,8 +61,8 @@ abstract contract BasePostCheck is BaseMigration { (cheatOperator, cheatOperatorPk) = makeAddrAndKey(string.concat("cheat-operator-", vm.toString(seed))); (cheatGovernor, cheatGovernorPk) = makeAddrAndKey(string.concat("cheat-governor-", vm.toString(seed))); - vm.deal(cheatGovernor, 1); - vm.deal(cheatOperator, 1); + vm.deal(cheatGovernor, 1); // Check created EOA + vm.deal(cheatOperator, 1); // Check created EOA vm.prank(manager); try TransparentUpgradeableProxyV2(payable(manager)).functionDelegateCall( From 55da8ef2c84d71e8d77c551d880a69000997475d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 15:04:35 +0700 Subject: [PATCH 172/305] clean up --- .../20240411-p2-upgrade-bridge-ronin-chain.s.sol | 6 ++---- .../20240411-p3-upgrade-bridge-main-chain.s.sol | 6 ++---- script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol | 2 +- .../proposal/PostCheck_BridgeManager_Proposal.s.sol | 2 +- script/utils/Network.sol | 4 ---- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index 5a1ae5f5..b62e65e6 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -131,10 +131,8 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[5] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[7] = abi.encodeWithSignature( - "functionDelegateCall(bytes)", - (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager))) - ); + calldatas[7] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); calldatas[8] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[9] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); calldatas[10] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index fea4c058..a2de1fd9 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -146,10 +146,8 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ calldatas[0] = abi.encodeWithSignature( "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) ); - calldatas[1] = abi.encodeWithSignature( - "functionDelegateCall(bytes)", - (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager))) - ); + calldatas[1] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); diff --git a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol index cc3bb4de..a40ff287 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol @@ -20,4 +20,4 @@ contract Verify_Script_20240411 is Migration__20240409_P2_UpgradeBridgeRoninchai CONFIG.switchTo(currentNetwork); } -} \ No newline at end of file +} diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 13c13edd..80c7d243 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -125,7 +125,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { calldatas: abi.encodeCall( TransparentUpgradeableProxyV2.functionDelegateCall, (abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))) - ).toSingletonArray(), + ).toSingletonArray(), gasAmounts: uint256(1_000_000).toSingletonArray(), nonce: manager.round(0) + 1 }); diff --git a/script/utils/Network.sol b/script/utils/Network.sol index 5e8c8711..6084c371 100644 --- a/script/utils/Network.sol +++ b/script/utils/Network.sol @@ -16,7 +16,6 @@ function chainId(Network network) pure returns (uint256) { if (network == Network.Goerli) return 5; if (network == Network.Sepolia) return 11155111; if (network == Network.EthMainnet) return 1; - if (network == Network.Sepolia) return 11155111; if (network == Network.RoninDevnet) return 2022; revert("Network: Unknown chain id"); @@ -30,8 +29,6 @@ function explorer(Network network) pure returns (string memory link) { if (network == Network.Goerli) return "https://goerli.etherscan.io/"; if (network == Network.Sepolia) return "https://sepolia.etherscan.io/"; if (network == Network.EthMainnet) return "https://etherscan.io/"; - if (network == Network.Goerli) return "https://goerli.etherscan.io/"; - if (network == Network.Sepolia) return "hhttps://sepolia.etherscan.io/"; } function name(Network network) pure returns (string memory) { @@ -62,7 +59,6 @@ function envLabel(Network network) pure returns (string memory) { } function chainAlias(Network network) pure returns (string memory) { - if (network == Network.Sepolia) return "sepolia"; if (network == Network.Goerli) return "goerli"; if (network == Network.Sepolia) return "sepolia"; if (network == Network.EthMainnet) return "ethereum"; From e183921d1023dc9bac5a162aeb7c37aea249fe84 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 17:18:53 +0700 Subject: [PATCH 173/305] script: fix ronin script to init v2 and set bridge manager --- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index b62e65e6..7a5a5212 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -11,6 +11,7 @@ import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; @@ -106,7 +107,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; - uint N = 11; + uint N = 14; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); @@ -120,22 +121,32 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H targets[5] = bridgeSlashProxy; targets[6] = bridgeTrackingProxy; targets[7] = roninGatewayV3Proxy; - targets[8] = roninGatewayV3Proxy; - targets[9] = pauseEnforcerProxy; - targets[10] = pauseEnforcerProxy; - - calldatas[0] = abi.encodeWithSignature("upgradeTo(address)", bridgeRewardLogic); + targets[8] = bridgeRewardProxy; + targets[9] = bridgeSlashProxy; + targets[10] = bridgeTrackingProxy; + targets[11] = roninGatewayV3Proxy; + targets[12] = pauseEnforcerProxy; + targets[13] = pauseEnforcerProxy; + + calldatas[0] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", bridgeRewardLogic, abi.encodeWithSelector(BridgeReward.initializeV2.selector)); calldatas[1] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", bridgeTrackingLogic); calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); - calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[5] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[4] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[5] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[6] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); calldatas[7] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); calldatas[8] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[9] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[9] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[10] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[11] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + calldatas[12] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[13] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); for (uint i; i < N; ++i) { gasAmounts[i] = 1_000_000; From d6170ef8b5f4aeefd3d5aaeb005cce8516a2217c Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 17:19:24 +0700 Subject: [PATCH 174/305] script: nominate sender in mainchain bridge --- script/contracts/MainchainBridgeManagerDeploy.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/contracts/MainchainBridgeManagerDeploy.s.sol b/script/contracts/MainchainBridgeManagerDeploy.s.sol index f680777b..8f3a9cfa 100644 --- a/script/contracts/MainchainBridgeManagerDeploy.s.sol +++ b/script/contracts/MainchainBridgeManagerDeploy.s.sol @@ -14,7 +14,7 @@ contract MainchainBridgeManagerDeploy is Migration { using LibProxy for *; function run() public virtual returns (MainchainBridgeManager instance) { - instance = MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key())); + instance = MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key(), sender())); address proxyAdmin = payable(address(instance)).getProxyAdmin(); if (proxyAdmin == sender()) { From 576b68398425b50a1f0c0d59e08b2dd2b60ec29c Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 18:30:40 +0700 Subject: [PATCH 175/305] feat: remove `returns` array and reduce code size --- src/extensions/GatewayV3.sol | 20 ++++---- src/extensions/MinimumWithdrawal.sol | 2 +- src/extensions/WithdrawalLimitation.sol | 14 +++--- .../BridgeManager.sol | 24 ++++------ .../BridgeManagerCallbackRegister.sol | 26 +++++------ .../BridgeManagerQuorum.sol | 21 +++++---- src/extensions/collections/HasContracts.sol | 2 +- src/extensions/collections/HasProxyAdmin.sol | 10 ++-- src/interfaces/IQuorum.sol | 2 +- src/interfaces/bridge/IBridgeManager.sol | 46 +------------------ .../bridge/IBridgeManagerCallbackRegister.sol | 7 ++- src/mainchain/MainchainGatewayV3.sol | 6 +-- src/ronin/gateway/RoninGatewayV3.sol | 4 +- test/mocks/MockBridgeManager.sol | 5 +- 14 files changed, 69 insertions(+), 120 deletions(-) diff --git a/src/extensions/GatewayV3.sol b/src/extensions/GatewayV3.sol index 43c55b9e..55eca141 100644 --- a/src/extensions/GatewayV3.sol +++ b/src/extensions/GatewayV3.sol @@ -23,7 +23,7 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { /** * @dev Grant emergency pauser role for `_addr`. */ - function setEmergencyPauser(address _addr) external onlyAdmin { + function setEmergencyPauser(address _addr) external onlyProxyAdmin { emergencyPauser = _addr; } @@ -44,7 +44,7 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { /** * @inheritdoc IQuorum */ - function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyAdmin returns (uint256, uint256) { + function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin { return _setThreshold(_numerator, _denominator); } @@ -77,14 +77,14 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { * Emits the `ThresholdUpdated` event. * */ - function _setThreshold(uint256 _numerator, uint256 _denominator) internal virtual returns (uint256 _previousNum, uint256 _previousDenom) { - if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig); - _previousNum = _num; - _previousDenom = _denom; - _num = _numerator; - _denom = _denominator; + function _setThreshold(uint256 num, uint256 denom) internal virtual { + if (num > denom) revert ErrInvalidThreshold(msg.sig); + uint256 prevNum = _num; + uint256 prevDenom = _denom; + _num = num; + _denom = denom; unchecked { - emit ThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom); + emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom); } } @@ -104,7 +104,7 @@ abstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum { * */ function _requireAuth() private view { - if (!(msg.sender == _getAdmin() || msg.sender == emergencyPauser)) { + if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) { revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN); } } diff --git a/src/extensions/MinimumWithdrawal.sol b/src/extensions/MinimumWithdrawal.sol index acf49592..df2fc7e5 100644 --- a/src/extensions/MinimumWithdrawal.sol +++ b/src/extensions/MinimumWithdrawal.sol @@ -30,7 +30,7 @@ abstract contract MinimumWithdrawal is HasProxyAdmin { * Emits the `MinimumThresholdsUpdated` event. * */ - function setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin { + function setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setMinimumThresholds(_tokens, _thresholds); } diff --git a/src/extensions/WithdrawalLimitation.sol b/src/extensions/WithdrawalLimitation.sol index 586af812..97a9e941 100644 --- a/src/extensions/WithdrawalLimitation.sol +++ b/src/extensions/WithdrawalLimitation.sol @@ -52,8 +52,8 @@ abstract contract WithdrawalLimitation is GatewayV3 { * - The high-tier vote weight threshold must equal to or larger than the normal threshold. * */ - function setThreshold(uint256 _numerator, uint256 _denominator) external virtual override onlyAdmin returns (uint256 _previousNum, uint256 _previousDenom) { - (_previousNum, _previousDenom) = _setThreshold(_numerator, _denominator); + function setThreshold(uint256 num, uint256 denom) external virtual override onlyProxyAdmin { + _setThreshold(num, denom); _verifyThresholds(); } @@ -84,7 +84,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { function setHighTierVoteWeightThreshold( uint256 _numerator, uint256 _denominator - ) external virtual onlyAdmin returns (uint256 _previousNum, uint256 _previousDenom) { + ) external virtual onlyProxyAdmin returns (uint256 _previousNum, uint256 _previousDenom) { (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator); _verifyThresholds(); } @@ -99,7 +99,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `HighTierThresholdsUpdated` event. * */ - function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin { + function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setHighTierThresholds(_tokens, _thresholds); } @@ -114,7 +114,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `LockedThresholdsUpdated` event. * */ - function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin { + function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setLockedThresholds(_tokens, _thresholds); } @@ -129,7 +129,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `UnlockFeePercentagesUpdated` event. * */ - function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyAdmin { + function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyProxyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setUnlockFeePercentages(_tokens, _percentages); } @@ -144,7 +144,7 @@ abstract contract WithdrawalLimitation is GatewayV3 { * Emits the `DailyWithdrawalLimitsUpdated` event. * */ - function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyAdmin { + function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyProxyAdmin { if (_tokens.length == 0) revert ErrEmptyArray(); _setDailyWithdrawalLimits(_tokens, _limits); } diff --git a/src/extensions/bridge-operator-governance/BridgeManager.sol b/src/extensions/bridge-operator-governance/BridgeManager.sol index 65f3f1e4..f4d5ca36 100644 --- a/src/extensions/bridge-operator-governance/BridgeManager.sol +++ b/src/extensions/bridge-operator-governance/BridgeManager.sol @@ -13,7 +13,7 @@ import { TUint256Slot } from "../../types/Types.sol"; import "../../utils/CommonErrors.sol"; import "./BridgeManagerQuorum.sol"; -abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, BridgeManagerQuorum, BridgeManagerCallbackRegister { +abstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister { using AddressArrayUtils for address[]; struct BridgeManagerStorage { @@ -96,7 +96,7 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, /** * @inheritdoc IHasContracts */ - function setContract(ContractType contractType, address addr) external override onlySelfCall { + function setContract(ContractType contractType, address addr) external override onlyProxyAdmin { _requireHasCode(addr); _setContract(contractType, addr); } @@ -104,7 +104,7 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, /** * @inheritdoc IBridgeManager */ - function setMinRequiredGovernor(uint min) external override onlySelfCall { + function setMinRequiredGovernor(uint min) external override onlyProxyAdmin { _setMinRequiredGovernor(min); } @@ -134,8 +134,7 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, } function _totalWeight() internal view override returns (uint256) { - BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - return $._totalWeight; + return _getBridgeManagerStorage()._totalWeight; } /** @@ -168,8 +167,7 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, * @dev Internal function to retrieve the vote weight of a specific governor. */ function _getGovernorWeight(address governor) internal view returns (uint96) { - BridgeManagerStorage storage $ = _getBridgeManagerStorage(); - return $._governorWeight[governor]; + return _getBridgeManagerStorage()._governorWeight[governor]; } /** @@ -215,19 +213,15 @@ abstract contract BridgeManager is IBridgeManager, Initializable, HasContracts, /** * @inheritdoc IBridgeManager */ - function addBridgeOperators( - uint96[] calldata voteWeights, - address[] calldata governors, - address[] calldata bridgeOperators - ) external onlySelfCall returns (bool[] memory addeds) { - addeds = _addBridgeOperators(voteWeights, governors, bridgeOperators); + function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin { + _addBridgeOperators(voteWeights, governors, bridgeOperators); } /** * @inheritdoc IBridgeManager */ - function removeBridgeOperators(address[] calldata bridgeOperators) external onlySelfCall returns (bool[] memory removeds) { - removeds = _removeBridgeOperators(bridgeOperators); + function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin { + _removeBridgeOperators(bridgeOperators); } /** diff --git a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol index 163838bf..04714357 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol @@ -5,13 +5,14 @@ import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { IBridgeManagerCallbackRegister } from "../../interfaces/bridge/IBridgeManagerCallbackRegister.sol"; import { IBridgeManagerCallback } from "../../interfaces/bridge/IBridgeManagerCallback.sol"; +import { HasContracts } from "../../extensions/collections/HasContracts.sol"; import { TransparentUpgradeableProxyV2, IdentityGuard } from "../../utils/IdentityGuard.sol"; /** * @title BridgeManagerCallbackRegister * @dev A contract that manages callback registrations and execution for a bridge. */ -abstract contract BridgeManagerCallbackRegister is Initializable, IdentityGuard, IBridgeManagerCallbackRegister { +abstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts { using EnumerableSet for EnumerableSet.AddressSet; /** @@ -27,20 +28,18 @@ abstract contract BridgeManagerCallbackRegister is Initializable, IdentityGuard, /** * @inheritdoc IBridgeManagerCallbackRegister */ - function registerCallbacks(address[] calldata registers) external onlySelfCall returns (bool[] memory registereds) { - registereds = _registerCallbacks(registers); + function registerCallbacks(address[] calldata registers) external onlyProxyAdmin { + _registerCallbacks(registers); } /** * @inheritdoc IBridgeManagerCallbackRegister */ - function unregisterCallbacks(address[] calldata registers) external onlySelfCall nonDuplicate(registers) returns (bool[] memory unregistereds) { - uint256 length = registers.length; - unregistereds = new bool[](length); + function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) { EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters(); - for (uint256 i; i < length; i++) { - unregistereds[i] = _callbackRegisters.remove(registers[i]); + for (uint256 i; i < registers.length; i++) { + _callbackRegisters.remove(registers[i]); } } @@ -54,14 +53,11 @@ abstract contract BridgeManagerCallbackRegister is Initializable, IdentityGuard, /** * @dev Internal function to register multiple callbacks with the bridge. * @param registers The array of callback addresses to register. - * @return registereds An array indicating the success status of each registration. */ - function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) returns (bool[] memory registereds) { - registereds = new bool[](registers.length); - if (registers.length == 0) return registereds; - + function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) { EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters(); address register; + bool regSuccess; for (uint256 i; i < registers.length; i++) { register = registers[i]; @@ -69,7 +65,9 @@ abstract contract BridgeManagerCallbackRegister is Initializable, IdentityGuard, _requireHasCode(register); _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId); - registereds[i] = _callbackRegisters.add(register); + regSuccess = _callbackRegisters.add(register); + + emit CallbackRegistered(register, regSuccess); } } diff --git a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol index 5a05c5aa..b91218c4 100644 --- a/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol +++ b/src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol @@ -4,9 +4,10 @@ pragma solidity ^0.8.23; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { IQuorum } from "../../interfaces/IQuorum.sol"; import { IdentityGuard } from "../../utils/IdentityGuard.sol"; +import { HasContracts } from "../../extensions/collections/HasContracts.sol"; import "../../utils/CommonErrors.sol"; -abstract contract BridgeManagerQuorum is IQuorum, Initializable, IdentityGuard { +abstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts { struct BridgeManagerQuorumStorage { uint256 _nonce; uint256 _numerator; @@ -32,8 +33,8 @@ abstract contract BridgeManagerQuorum is IQuorum, Initializable, IdentityGuard { /** * @inheritdoc IQuorum */ - function setThreshold(uint256 numerator, uint256 denominator) external override onlySelfCall returns (uint256, uint256) { - return _setThreshold(numerator, denominator); + function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin { + _setThreshold(num, denom); } /** @@ -59,18 +60,18 @@ abstract contract BridgeManagerQuorum is IQuorum, Initializable, IdentityGuard { * Emits the `ThresholdUpdated` event. * */ - function _setThreshold(uint256 numerator, uint256 denominator) internal virtual returns (uint256 previousNum, uint256 previousDenom) { - if (numerator > denominator || denominator <= 1) revert ErrInvalidThreshold(msg.sig); + function _setThreshold(uint256 num, uint256 denom) internal virtual { + if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig); BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage(); - previousNum = $._numerator; - previousDenom = $._denominator; + uint256 prevNum = $._numerator; + uint256 prevDenom = $._denominator; - $._numerator = numerator; - $._denominator = denominator; + $._numerator = num; + $._denominator = denom; - emit ThresholdUpdated($._nonce++, numerator, denominator, previousNum, previousDenom); + emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom); } function _totalWeight() internal view virtual returns (uint256); diff --git a/src/extensions/collections/HasContracts.sol b/src/extensions/collections/HasContracts.sol index 5a09d6c4..ce765613 100644 --- a/src/extensions/collections/HasContracts.sol +++ b/src/extensions/collections/HasContracts.sol @@ -26,7 +26,7 @@ abstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard { /** * @inheritdoc IHasContracts */ - function setContract(ContractType contractType, address addr) external virtual onlyAdmin { + function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin { _requireHasCode(addr); _setContract(contractType, addr); } diff --git a/src/extensions/collections/HasProxyAdmin.sol b/src/extensions/collections/HasProxyAdmin.sol index 3e6db341..53255900 100644 --- a/src/extensions/collections/HasProxyAdmin.sol +++ b/src/extensions/collections/HasProxyAdmin.sol @@ -8,19 +8,19 @@ abstract contract HasProxyAdmin { // bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)); bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; - modifier onlyAdmin() { - _requireAdmin(); + modifier onlyProxyAdmin() { + _requireProxyAdmin(); _; } /** * @dev Returns proxy admin. */ - function _getAdmin() internal view virtual returns (address) { + function _getProxyAdmin() internal view virtual returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } - function _requireAdmin() internal view { - if (msg.sender != _getAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN); + function _requireProxyAdmin() internal view { + if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN); } } diff --git a/src/interfaces/IQuorum.sol b/src/interfaces/IQuorum.sol index 97619626..d6032b65 100644 --- a/src/interfaces/IQuorum.sol +++ b/src/interfaces/IQuorum.sol @@ -29,5 +29,5 @@ interface IQuorum { * Emits the `ThresholdUpdated` event. * */ - function setThreshold(uint256 _numerator, uint256 _denominator) external returns (uint256 _previousNum, uint256 _previousDenom); + function setThreshold(uint256 numerator, uint256 denominator) external; } diff --git a/src/interfaces/bridge/IBridgeManager.sol b/src/interfaces/bridge/IBridgeManager.sol index a7ba8907..dd532565 100644 --- a/src/interfaces/bridge/IBridgeManager.sol +++ b/src/interfaces/bridge/IBridgeManager.sol @@ -119,56 +119,14 @@ interface IBridgeManager is IBridgeManagerEvents { * @dev Adds multiple bridge operators. * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address. * @param bridgeOperators An array of addresses representing the bridge operators to add. - * @return addeds An array of booleans indicating whether each bridge operator was added successfully. - * - * Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded. - * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. - * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. - * - * Example Usage: - * Making an `eth_call` in ethers.js - * ``` - * const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators( - * voteWeights, - * governors, - * bridgeOperators, - * // overriding the caller to the contract itself since we use `onlySelfCall` guard - * {from: bridgeManagerContract.address} - * ) - * const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]); - * const filteredWeights = weights.filter((_, index) => addeds[index]); - * const filteredGovernors = governors.filter((_, index) => addeds[index]); - * // ... (Process or use the information as required) ... - * ``` */ - function addBridgeOperators( - uint96[] calldata voteWeights, - address[] calldata governors, - address[] calldata bridgeOperators - ) external returns (bool[] memory addeds); + function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external; /** * @dev Removes multiple bridge operators. * @param bridgeOperators An array of addresses representing the bridge operators to remove. - * @return removeds An array of booleans indicating whether each bridge operator was removed successfully. - * - * * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded. - * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. - * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. - * - * Example Usage: - * Making an `eth_call` in ethers.js - * ``` - * const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators( - * bridgeOperators, - * // overriding the caller to the contract itself since we use `onlySelfCall` guard - * {from: bridgeManagerContract.address} - * ) - * const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]); - * // ... (Process or use the information as required) ... - * ``` */ - function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds); + function removeBridgeOperators(address[] calldata bridgeOperators) external; /** * @dev Self-call to update the minimum required governor. diff --git a/src/interfaces/bridge/IBridgeManagerCallbackRegister.sol b/src/interfaces/bridge/IBridgeManagerCallbackRegister.sol index 85177ad0..b80d297e 100644 --- a/src/interfaces/bridge/IBridgeManagerCallbackRegister.sol +++ b/src/interfaces/bridge/IBridgeManagerCallbackRegister.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.0; interface IBridgeManagerCallbackRegister { error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData); + event CallbackRegistered(address, bool); /** * @dev Emitted when the contract notifies multiple registers with statuses and return data. */ @@ -18,14 +19,12 @@ interface IBridgeManagerCallbackRegister { /** * @dev Registers multiple callbacks with the bridge. * @param registers The array of callback addresses to register. - * @return registereds An array indicating the success status of each registration. */ - function registerCallbacks(address[] calldata registers) external returns (bool[] memory registereds); + function registerCallbacks(address[] calldata registers) external; /** * @dev Unregisters multiple callbacks from the bridge. * @param registers The array of callback addresses to unregister. - * @return unregistereds An array indicating the success status of each unregistration. */ - function unregisterCallbacks(address[] calldata registers) external returns (bool[] memory unregistereds); + function unregisterCallbacks(address[] calldata registers) external; } diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 5045273b..d78df506 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -145,7 +145,7 @@ contract MainchainGatewayV3 is /** * @inheritdoc IMainchainGatewayV3 */ - function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyAdmin { + function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyProxyAdmin { _setWrappedNativeTokenContract(_wrappedToken); } @@ -196,7 +196,7 @@ contract MainchainGatewayV3 is /** * @inheritdoc IMainchainGatewayV3 */ - function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyAdmin { + function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyProxyAdmin { if (_mainchainTokens.length == 0) revert ErrEmptyArray(); _mapTokens(_mainchainTokens, _roninTokens, _standards); } @@ -213,7 +213,7 @@ contract MainchainGatewayV3 is // _thresholds[2]: unlockFeePercentages // _thresholds[3]: dailyWithdrawalLimit uint256[][4] calldata _thresholds - ) external virtual onlyAdmin { + ) external virtual onlyProxyAdmin { if (_mainchainTokens.length == 0) revert ErrEmptyArray(); _mapTokens(_mainchainTokens, _roninTokens, _standards); _setHighTierThresholds(_mainchainTokens, _thresholds[0]); diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index a4aed59c..e4bdf31f 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -272,7 +272,7 @@ contract RoninGatewayV3 is address[] calldata _mainchainTokens, uint256[] calldata _chainIds, TokenStandard[] calldata _standards - ) external onlyAdmin { + ) external onlyProxyAdmin { if (_roninTokens.length == 0) revert ErrLengthMismatch(msg.sig); _mapTokens(_roninTokens, _mainchainTokens, _chainIds, _standards); } @@ -458,7 +458,7 @@ contract RoninGatewayV3 is } } - function setTrustedThreshold(uint256 _trustedNumerator, uint256 _trustedDenominator) external virtual onlyAdmin returns (uint256, uint256) { + function setTrustedThreshold(uint256 _trustedNumerator, uint256 _trustedDenominator) external virtual onlyProxyAdmin returns (uint256, uint256) { return _setTrustedThreshold(_trustedNumerator, _trustedDenominator); } diff --git a/test/mocks/MockBridgeManager.sol b/test/mocks/MockBridgeManager.sol index 614117ed..202fe7d9 100644 --- a/test/mocks/MockBridgeManager.sol +++ b/test/mocks/MockBridgeManager.sol @@ -29,13 +29,12 @@ contract MockBridgeManager is IBridgeManager { } } - function addBridgeOperators(uint96[] calldata weights, address[] calldata governors, address[] calldata operators) external returns (bool[] memory addeds) { + function addBridgeOperators(uint96[] calldata weights, address[] calldata governors, address[] calldata operators) external { for (uint i; i < weights.length; i++) { _governors[governors[i]] = true; _operators[operators[i]] = true; _weights[governors[i]] = weights[i]; _weights[operators[i]] = weights[i]; - addeds[i] = true; } } @@ -76,7 +75,7 @@ contract MockBridgeManager is IBridgeManager { return _weights[addr] > 0; } - function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds) { } + function removeBridgeOperators(address[] calldata bridgeOperators) external { } function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum) { } From 97f94428c2e181109db8d9f6645352013af4c43b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 18:31:08 +0700 Subject: [PATCH 176/305] test: adapt test of add/remove operators --- .../concrete/bridge-manager/add/add.t.sol | 36 +++++++++++++------ .../bridge-manager/remove/remove.t.sol | 24 ++++++++----- .../fuzz/bridge-manager/BridgeSlash.t.sol | 11 ++++-- 3 files changed, 50 insertions(+), 21 deletions(-) diff --git a/test/bridge/unit/concrete/bridge-manager/add/add.t.sol b/test/bridge/unit/concrete/bridge-manager/add/add.t.sol index fe92ff02..368240da 100644 --- a/test/bridge/unit/concrete/bridge-manager/add/add.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/add/add.t.sol @@ -11,6 +11,8 @@ import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManage import { BridgeManager_Unit_Concrete_Test } from "../BridgeManager.t.sol"; +event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators); + contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function setUp() public virtual override { BridgeManager_Unit_Concrete_Test.setUp(); @@ -87,40 +89,52 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingGovernors[0] = _governors[0]; - bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); + bool[] memory expectedAddeds = new bool[](1); expectedAddeds[0] = false; - assertEq(addeds, expectedAddeds); + vm.expectEmit(true, false, false, false); + emit BridgeOperatorsAdded(expectedAddeds, new uint96[](0), new address[](0), new address[](0)); + + _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); } function test_AddOperators_DuplicatedBridgeOperator() external assertStateNotChange { (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingOperators[0] = _bridgeOperators[0]; - bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); + bool[] memory expectedAddeds = new bool[](1); expectedAddeds[0] = false; - assertEq(addeds, expectedAddeds); + vm.expectEmit(true, false, false, false); + emit BridgeOperatorsAdded(expectedAddeds, new uint96[](0), new address[](0), new address[](0)); + + _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); } function test_AddOperators_DuplicatedGovernorWithExistedBridgeOperator() external assertStateNotChange { (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingGovernors[0] = _bridgeOperators[0]; - bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); + bool[] memory expectedAddeds = new bool[](1); expectedAddeds[0] = false; - assertEq(addeds, expectedAddeds); + vm.expectEmit(true, false, false, false); + emit BridgeOperatorsAdded(expectedAddeds, new uint96[](0), new address[](0), new address[](0)); + + _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); } function test_AddOperators_DuplicatedBridgeOperatorWithExistedGovernor() external assertStateNotChange { (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); addingOperators[0] = _governors[0]; - bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); + bool[] memory expectedAddeds = new bool[](1); expectedAddeds[0] = false; - assertEq(addeds, expectedAddeds); + vm.expectEmit(true, false, false, false); + emit BridgeOperatorsAdded(expectedAddeds, new uint96[](0), new address[](0), new address[](0)); + + _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); } function test_AddOperators_AllInfoIsValid() external { @@ -128,10 +142,12 @@ contract Add_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { (address[] memory beforeBridgeOperators, address[] memory beforeGovernors, uint96[] memory beforeVoteWeights) = _getBridgeMembers(); (address[] memory addingOperators, address[] memory addingGovernors, uint96[] memory addingWeights) = _generateNewOperators(); - bool[] memory addeds = _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); bool[] memory expectedAddeds = new bool[](1); expectedAddeds[0] = true; - assertEq(addeds, expectedAddeds); + vm.expectEmit(true, false, false, false); + emit BridgeOperatorsAdded(expectedAddeds, new uint96[](0), new address[](0), new address[](0)); + + _bridgeManager.addBridgeOperators(addingWeights, addingGovernors, addingOperators); // Compare after and before state (address[] memory afterBridgeOperators, address[] memory afterGovernors, uint96[] memory afterVoteWeights) = _getBridgeMembers(); diff --git a/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol b/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol index a37ea153..4c08a9cc 100644 --- a/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol +++ b/test/bridge/unit/concrete/bridge-manager/remove/remove.t.sol @@ -12,6 +12,8 @@ import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManage import { BridgeManager_Unit_Concrete_Test } from "../BridgeManager.t.sol"; +event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators); + contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { function setUp() public virtual override { BridgeManager_Unit_Concrete_Test.setUp(); @@ -47,10 +49,12 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { uint96[] memory remainingWeights ) = _generateRemovingOperators(1); - bool[] memory removeds = _bridgeManager.removeBridgeOperators(removingOperators); - bool[] memory expectedRemoved = new bool[](1); - expectedRemoved[0] = true; - assertEq(removeds, expectedRemoved); + bool[] memory expectedRemoveds = new bool[](1); + expectedRemoveds[0] = true; + vm.expectEmit(true, false, false, false); + emit BridgeOperatorsRemoved(expectedRemoveds, new address[](0)); + + _bridgeManager.removeBridgeOperators(removingOperators); assertEq(_bridgeManager.totalBridgeOperator(), _bridgeOperators.length - 1, "wrong total bridge operator"); assertEq(_bridgeManager.getTotalWeight(), _totalWeight - removingWeights[0], "wrong total total weight"); @@ -99,11 +103,13 @@ contract Remove_Unit_Concrete_Test is BridgeManager_Unit_Concrete_Test { uint96[] memory remainingWeights ) = _generateRemovingOperators(TO_REMOVE_NUM); - bool[] memory removeds = _bridgeManager.removeBridgeOperators(removingOperators); - bool[] memory expectedRemoved = new bool[](TO_REMOVE_NUM); - expectedRemoved[0] = true; - expectedRemoved[1] = true; - assertEq(removeds, expectedRemoved); + bool[] memory expectedRemoveds = new bool[](TO_REMOVE_NUM); + expectedRemoveds[0] = true; + expectedRemoveds[1] = true; + vm.expectEmit(true, false, false, false); + emit BridgeOperatorsRemoved(expectedRemoveds, new address[](0)); + + _bridgeManager.removeBridgeOperators(removingOperators); address[] memory zeroAddressArrays = new address[](TO_REMOVE_NUM); zeroAddressArrays[0] = address(0); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol index c3ee142a..21079d76 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol @@ -167,8 +167,15 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { // Add the newly added operators using the bridge manager contract vm.prank(_bridgeManagerContract, _bridgeManagerContract); - bool[] memory addeds = IBridgeManager(_bridgeManagerContract).addBridgeOperators(newlyAddedWeights, newlyAddedGovernors, newlyAddedOperators); - vm.assume(addeds.sum() == addeds.length); + + bool[] memory expectedAddeds = new bool[](newlyAddedGovernors.length); + for (uint i; i < newlyAddedGovernors.length; ++i) { + expectedAddeds[i] = true; + } + vm.expectEmit(true, false, false, false); + emit BridgeOperatorsAdded(expectedAddeds, new uint96[](0), new address[](0), new address[](0)); + + IBridgeManager(_bridgeManagerContract).addBridgeOperators(newlyAddedWeights, newlyAddedGovernors, newlyAddedOperators); // Retrieve the added periods for the newly added operators newlyAddedAtPeriods = IBridgeSlash(_bridgeSlashContract).getAddedPeriodOf(newlyAddedOperators); } From d53cb75752f69982885c978292459499c1597f3d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 22:07:12 +0700 Subject: [PATCH 177/305] script: add callbacks --- ...0240411-deploy-bridge-manager-helper.s.sol | 22 ++++++++++- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 37 ++++++++----------- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 28 +++++++++++--- .../MainchainBridgeManagerDeploy.s.sol | 10 ++--- .../contracts/RoninBridgeManagerDeploy.s.sol | 10 ++--- .../fuzz/bridge-manager/BridgeSlash.t.sol | 4 +- 6 files changed, 71 insertions(+), 40 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol index 39f5604f..29162711 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol @@ -10,6 +10,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; @@ -25,6 +26,8 @@ import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; import "../Migration.s.sol"; contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { + using LibProxy for *; + RoninBridgeManager _newRoninBridgeManager; function _deployRoninBridgeManager() internal returns (RoninBridgeManager) { @@ -77,7 +80,7 @@ contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { param.roninBridgeManager.roninChainId, param.roninBridgeManager.expiryDuration, param.roninBridgeManager.bridgeContract, - param.roninBridgeManager.callbackRegisters, + new address[](0), param.roninBridgeManager.bridgeOperators, param.roninBridgeManager.governors, param.roninBridgeManager.voteWeights, @@ -88,6 +91,23 @@ contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { ).run() ); + param.roninBridgeManager.callbackRegisters = new address[](1); + param.roninBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + + address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newRoninBridgeManager))); + vm.broadcast(proxyAdmin); + address(_newRoninBridgeManager).call( + abi.encodeWithSignature("functionDelegateCall(bytes)", ( + abi.encodeWithSignature("registerCallbacks(address[])", param.roninBridgeManager.callbackRegisters)) + ) + ); + + if (proxyAdmin != address(_newRoninBridgeManager)) { + vm.broadcast(proxyAdmin); + // change proxy admin to self + TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_newRoninBridgeManager)); + } + return _newRoninBridgeManager; } } diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index 7a5a5212..9c3b653d 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -107,7 +107,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; - uint N = 14; + uint N = 15; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); @@ -117,35 +117,30 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H targets[1] = bridgeSlashProxy; targets[2] = bridgeTrackingProxy; targets[3] = roninGatewayV3Proxy; - targets[4] = bridgeRewardProxy; - targets[5] = bridgeSlashProxy; - targets[6] = bridgeTrackingProxy; - targets[7] = roninGatewayV3Proxy; - targets[8] = bridgeRewardProxy; - targets[9] = bridgeSlashProxy; - targets[10] = bridgeTrackingProxy; - targets[11] = roninGatewayV3Proxy; - targets[12] = pauseEnforcerProxy; + targets[4] = pauseEnforcerProxy; + targets[5] = bridgeRewardProxy; + targets[6] = bridgeSlashProxy; + targets[7] = bridgeTrackingProxy; + targets[8] = roninGatewayV3Proxy; + targets[9] = bridgeRewardProxy; + targets[10] = bridgeSlashProxy; + targets[11] = bridgeTrackingProxy; + targets[12] = roninGatewayV3Proxy; targets[13] = pauseEnforcerProxy; calldatas[0] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", bridgeRewardLogic, abi.encodeWithSelector(BridgeReward.initializeV2.selector)); calldatas[1] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", bridgeTrackingLogic); calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); - calldatas[4] = - abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[5] = - abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[6] = - abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[7] = - abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[8] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[4] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[5] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[6] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[7] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[8] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); calldatas[9] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[10] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[11] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - - calldatas[12] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[12] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[13] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); for (uint i; i < N; ++i) { diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index a2de1fd9..b2832768 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -16,6 +16,7 @@ import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; @@ -108,7 +109,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.denom, param.mainchainBridgeManager.roninChainId, param.mainchainBridgeManager.bridgeContract, - param.mainchainBridgeManager.callbackRegisters, + new address[](0), param.mainchainBridgeManager.bridgeOperators, param.mainchainBridgeManager.governors, param.mainchainBridgeManager.voteWeights, @@ -118,6 +119,23 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ ) ).run() ); + + param.mainchainBridgeManager.callbackRegisters = new address[](1); + param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); + vm.broadcast(proxyAdmin); + address(_newMainchainBridgeManager).call( + abi.encodeWithSignature("functionDelegateCall(bytes)", ( + abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters)) + ) + ); + + if (proxyAdmin != address(_newMainchainBridgeManager)) { + vm.broadcast(proxyAdmin); + // change proxy admin to self + TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_newMainchainBridgeManager)); + } } function _upgradeBridgeMainchain() internal { @@ -143,11 +161,8 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ targets[3] = pauseEnforcerProxy; targets[4] = pauseEnforcerProxy; - calldatas[0] = abi.encodeWithSignature( - "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) - ); - calldatas[1] = - abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); + calldatas[0] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper)); + calldatas[1] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); @@ -181,6 +196,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ ); } + function getDomain() public pure returns (bytes32) { return keccak256( abi.encode( diff --git a/script/contracts/MainchainBridgeManagerDeploy.s.sol b/script/contracts/MainchainBridgeManagerDeploy.s.sol index 8f3a9cfa..6b1de624 100644 --- a/script/contracts/MainchainBridgeManagerDeploy.s.sol +++ b/script/contracts/MainchainBridgeManagerDeploy.s.sol @@ -17,10 +17,10 @@ contract MainchainBridgeManagerDeploy is Migration { instance = MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key(), sender())); address proxyAdmin = payable(address(instance)).getProxyAdmin(); - if (proxyAdmin == sender()) { - vm.broadcast(proxyAdmin); - // change proxy admin to self - TransparentUpgradeableProxy(payable(address(instance))).changeAdmin(address(instance)); - } + // if (proxyAdmin != address(instance)) { + // vm.broadcast(proxyAdmin); + // // change proxy admin to self + // TransparentUpgradeableProxy(payable(address(instance))).changeAdmin(address(instance)); + // } } } diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index 86361339..cae1bac1 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -43,11 +43,11 @@ contract RoninBridgeManagerDeploy is Migration { console2.log("Sender: ", sender()); _upgradeRaw(proxyAdmin, instance, logic, EMPTY_ARGS); - if (proxyAdmin == sender()) { - vm.broadcast(proxyAdmin); - // change proxy admin to self - TransparentUpgradeableProxy(instance).changeAdmin(instance); - } + // if (proxyAdmin != instance) { + // vm.broadcast(proxyAdmin); + // // change proxy admin to self + // TransparentUpgradeableProxy(instance).changeAdmin(instance); + // } config.setAddress(network(), Contract.RoninBridgeManager.key(), instance); return RoninBridgeManager(instance); diff --git a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol index 21079d76..b7ae2617 100644 --- a/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol +++ b/test/bridge/unit/fuzz/bridge-manager/BridgeSlash.t.sol @@ -169,8 +169,8 @@ contract BridgeSlashTest is IBridgeSlashEvents, BridgeManagerUtils { vm.prank(_bridgeManagerContract, _bridgeManagerContract); bool[] memory expectedAddeds = new bool[](newlyAddedGovernors.length); - for (uint i; i < newlyAddedGovernors.length; ++i) { - expectedAddeds[i] = true; + for (uint j; j < newlyAddedGovernors.length; ++j) { + expectedAddeds[j] = true; } vm.expectEmit(true, false, false, false); emit BridgeOperatorsAdded(expectedAddeds, new uint96[](0), new address[](0), new address[](0)); From 63c4792911e2be8099d105812a260ce7103d9168 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 22:37:17 +0700 Subject: [PATCH 178/305] fix(MainchainGateway): interface id of IBridgeManagerCallback --- ...0240411-deploy-bridge-manager-helper.s.sol | 17 +++---------- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 13 +++++++--- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 25 ++++++++----------- src/mainchain/MainchainGatewayV3.sol | 2 +- 4 files changed, 24 insertions(+), 33 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol index 29162711..6aa95cc4 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol @@ -31,6 +31,8 @@ contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { RoninBridgeManager _newRoninBridgeManager; function _deployRoninBridgeManager() internal returns (RoninBridgeManager) { + address currRoninBridgeManager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + ISharedArgument.SharedParameter memory param; param.roninBridgeManager.num = 7; @@ -91,22 +93,9 @@ contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { ).run() ); - param.roninBridgeManager.callbackRegisters = new address[](1); - param.roninBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newRoninBridgeManager))); vm.broadcast(proxyAdmin); - address(_newRoninBridgeManager).call( - abi.encodeWithSignature("functionDelegateCall(bytes)", ( - abi.encodeWithSignature("registerCallbacks(address[])", param.roninBridgeManager.callbackRegisters)) - ) - ); - - if (proxyAdmin != address(_newRoninBridgeManager)) { - vm.broadcast(proxyAdmin); - // change proxy admin to self - TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_newRoninBridgeManager)); - } + TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(currRoninBridgeManager)); return _newRoninBridgeManager; } diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index 9c3b653d..2b302d5d 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -106,8 +106,11 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - uint256 expiredTime = block.timestamp + 14 days; - uint N = 15; + ISharedArgument.SharedParameter memory param; + param.roninBridgeManager.callbackRegisters = new address[](1); + param.roninBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + + uint N = 17; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); @@ -127,6 +130,8 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H targets[11] = bridgeTrackingProxy; targets[12] = roninGatewayV3Proxy; targets[13] = pauseEnforcerProxy; + targets[14] = address(_newRoninBridgeManager); + targets[15] = address(_newRoninBridgeManager); calldatas[0] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", bridgeRewardLogic, abi.encodeWithSelector(BridgeReward.initializeV2.selector)); calldatas[1] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); @@ -142,6 +147,8 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H calldatas[11] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[12] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[13] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[14] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.roninBridgeManager.callbackRegisters))); + calldatas[15] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); for (uint i; i < N; ++i) { gasAmounts[i] = 1_000_000; @@ -150,7 +157,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H LegacyProposalDetail memory proposal; proposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; proposal.chainId = block.chainid; - proposal.expiryTimestamp = expiredTime; + proposal.expiryTimestamp = block.timestamp + 14 days; proposal.targets = targets; proposal.values = values; proposal.calldatas = calldatas; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index b2832768..560c5c83 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -120,22 +120,9 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ ).run() ); - param.mainchainBridgeManager.callbackRegisters = new address[](1); - param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); vm.broadcast(proxyAdmin); - address(_newMainchainBridgeManager).call( - abi.encodeWithSignature("functionDelegateCall(bytes)", ( - abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters)) - ) - ); - - if (proxyAdmin != address(_newMainchainBridgeManager)) { - vm.broadcast(proxyAdmin); - // change proxy admin to self - TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_newMainchainBridgeManager)); - } + TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); } function _upgradeBridgeMainchain() internal { @@ -148,8 +135,12 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + ISharedArgument.SharedParameter memory param; + param.mainchainBridgeManager.callbackRegisters = new address[](1); + param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + uint256 expiredTime = block.timestamp + 14 days; - uint N = 5; + uint N = 7; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); @@ -160,12 +151,16 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ targets[2] = mainchainGatewayV3Proxy; targets[3] = pauseEnforcerProxy; targets[4] = pauseEnforcerProxy; + targets[5] = address(_newMainchainBridgeManager); + targets[6] = address(_newMainchainBridgeManager); calldatas[0] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper)); calldatas[1] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[5] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters))); + calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); for (uint i; i < N; ++i) { gasAmounts[i] = 1_000_000; diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index d78df506..042d79cd 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -518,6 +518,6 @@ contract MainchainGatewayV3 is } function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) { - return interfaceId == type(IMainchainGatewayV3).interfaceId || super.supportsInterface(interfaceId); + return interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId); } } From 6964a9779b2e1750a5ab318f16dd2e4e0054e307 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 15 Apr 2024 22:56:04 +0700 Subject: [PATCH 179/305] script: fix withdrawal post-check --- script/post-check/BasePostCheck.s.sol | 2 +- .../PostCheck_Gateway_DepositAndWithdraw.s.sol | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script/post-check/BasePostCheck.s.sol b/script/post-check/BasePostCheck.s.sol index 6d368cb7..7a5c96d4 100644 --- a/script/post-check/BasePostCheck.s.sol +++ b/script/post-check/BasePostCheck.s.sol @@ -32,7 +32,7 @@ abstract contract BasePostCheck is BaseMigration { uint256 internal cheatGovernorPk; uint256 internal cheatOperatorPk; - bytes32 internal domainSeparator; + bytes32 internal gwDomainSeparator; modifier onPostCheck(string memory postCheckLabel) { uint256 snapshotId = _beforePostCheck(postCheckLabel); diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol index bd372e4c..c7e915de 100644 --- a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -121,7 +121,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu CONFIG.switchTo(companionNetwork); mainchainChainId = block.chainid; - domainSeparator = MainchainBridgeManager(mainchainBridgeManager).DOMAIN_SEPARATOR(); + gwDomainSeparator = MainchainGatewayV3(payable(mainchainGateway)).DOMAIN_SEPARATOR(); cheatAddOverWeightedGovernor(address(mainchainBridgeManager)); @@ -197,7 +197,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu } } - bytes32 receiptDigest = LibTransfer.receiptDigest(domainSeparator, receiptHash); + bytes32 receiptDigest = LibTransfer.receiptDigest(gwDomainSeparator, receiptHash); (uint8 v, bytes32 r, bytes32 s) = vm.sign(cheatOperatorPk, receiptDigest); From 29853db60bfbf4171a626996c4270ff63885d30f Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 16 Apr 2024 11:06:07 +0700 Subject: [PATCH 180/305] script: add admin postcheck & quorum post check --- .../PostCheck_BridgeManager.s.sol | 3 ++ .../PostCheck_BridgeManager_Quorum.s.sol | 34 +++++++++++++++++++ ...PostCheck_Gateway_DepositAndWithdraw.s.sol | 19 +++++++++++ 3 files changed, 56 insertions(+) create mode 100644 script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol diff --git a/script/post-check/bridge-manager/PostCheck_BridgeManager.s.sol b/script/post-check/bridge-manager/PostCheck_BridgeManager.s.sol index 24e113d4..5face6bf 100644 --- a/script/post-check/bridge-manager/PostCheck_BridgeManager.s.sol +++ b/script/post-check/bridge-manager/PostCheck_BridgeManager.s.sol @@ -4,8 +4,10 @@ pragma solidity ^0.8.19; import { PostCheck_BridgeManager_CRUD_AddBridgeOperators } from "./crud/PostCheck_BridgeManager_CRUD_AddBridgeOperators.s.sol"; import { PostCheck_BridgeManager_CRUD_RemoveBridgeOperators } from "./crud/PostCheck_BridgeManager_CRUD_RemoveBridgeOperators.s.sol"; import { PostCheck_BridgeManager_Proposal } from "./proposal/PostCheck_BridgeManager_Proposal.s.sol"; +import { PostCheck_BridgeManager_Quorum } from "./quorum/PostCheck_BridgeManager_Quorum.s.sol"; abstract contract PostCheck_BridgeManager is + PostCheck_BridgeManager_Quorum, PostCheck_BridgeManager_Proposal, PostCheck_BridgeManager_CRUD_AddBridgeOperators, PostCheck_BridgeManager_CRUD_RemoveBridgeOperators @@ -14,5 +16,6 @@ abstract contract PostCheck_BridgeManager is _validate_BridgeManager_CRUD_addBridgeOperators(); _validate_BridgeManager_CRUD_removeBridgeOperators(); _validate_BridgeManager_Proposal(); + _validate_BridgeManager_Quorum(); } } diff --git a/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol b/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol new file mode 100644 index 00000000..f2d2db9f --- /dev/null +++ b/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { IQuorum } from "@ronin/contracts/interfaces/IQuorum.sol"; +import { BasePostCheck } from "script/post-check/BasePostCheck.s.sol"; +import { LibArray } from "script/shared/libraries/LibArray.sol"; +import { Contract } from "script/utils/Contract.sol"; +import { TNetwork } from "@fdk/types/Types.sol"; +import { Network } from "script/utils/Network.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; + +abstract contract PostCheck_BridgeManager_Quorum is BasePostCheck { + using LibArray for *; + using LibCompanionNetwork for *; + + function _validate_BridgeManager_Quorum() internal { + validate_NonZero_MinimumVoteWeight(); + } + + function validate_NonZero_MinimumVoteWeight() private onlyOnRoninNetworkOrLocal onPostCheck("validate_NonZero_MinimumVoteWeight") { + assertTrue(IQuorum(roninBridgeManager).minimumVoteWeight() > 0, "Ronin: Minimum vote weight must be greater than 0"); + TNetwork currentNetwork = network(); + + (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + + assertTrue(IQuorum(mainchainBridgeManager).minimumVoteWeight() > 0, "Mainchain: Minimum vote weight must be greater than 0"); + + CONFIG.switchTo(currentNetwork); + } +} diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol index c7e915de..da06ba50 100644 --- a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -22,6 +22,8 @@ import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeMa import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { IMainchainGatewayV3, MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; +import { HasContracts } from "@ronin/contracts/extensions/collections/HasContracts.sol"; +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, SignatureConsumer { using LibProxy for *; @@ -137,10 +139,27 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu function _validate_Gateway_DepositAndWithdraw() internal onlyOnRoninNetworkOrLocal { _setUp(); + validate_HasBridgeManager(); validate_Gateway_depositERC20(); validate_Gateway_withdrawERC20(); } + function validate_HasBridgeManager() internal onPostCheck("validate_HasBridgeManager") { + assertEq(roninBridgeManager.getProxyAdmin(), roninBridgeManager, "Invalid ProxyAdmin in RoninBridgeManager, expected self"); + assertEq(HasContracts(roninGateway).getContract(ContractType.BRIDGE_MANAGER), roninBridgeManager, "Invalid RoninBridgeManager in roninGateway"); + assertEq(HasContracts(bridgeTracking).getContract(ContractType.BRIDGE_MANAGER), roninBridgeManager, "Invalid RoninBridgeManager in bridgeTracking"); + assertEq(HasContracts(bridgeReward).getContract(ContractType.BRIDGE_MANAGER), roninBridgeManager, "Invalid RoninBridgeManager in bridgeReward"); + assertEq(HasContracts(bridgeSlash).getContract(ContractType.BRIDGE_MANAGER), roninBridgeManager, "Invalid RoninBridgeManager in bridgeSlash"); + + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + + assertEq(mainchainBridgeManager.getProxyAdmin(), mainchainBridgeManager, "Invalid MainchainBridgeManager in mainchainBridgeManager"); + assertEq( + HasContracts(mainchainGateway).getContract(ContractType.BRIDGE_MANAGER), mainchainBridgeManager, "Invalid MainchainBridgeManager in mainchainGateway" + ); + } + function validate_Gateway_depositERC20() private onPostCheck("validate_Gateway_depositERC20") { depositRequest.recipientAddr = makeAddr("ronin-recipient"); depositRequest.tokenAddr = address(mainchainERC20); From f849a84473557407370ab1cfbde2388af55f36a6 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 16 Apr 2024 11:07:16 +0700 Subject: [PATCH 181/305] fix: fix validate has bridge manager post check --- .../deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol index da06ba50..94ef9cb4 100644 --- a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -158,6 +158,8 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu assertEq( HasContracts(mainchainGateway).getContract(ContractType.BRIDGE_MANAGER), mainchainBridgeManager, "Invalid MainchainBridgeManager in mainchainGateway" ); + + CONFIG.switchTo(currentNetwork); } function validate_Gateway_depositERC20() private onPostCheck("validate_Gateway_depositERC20") { From 38aa7256f079d8acbc3f5c5f3a0c190cec31f16a Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 16 Apr 2024 11:17:16 +0700 Subject: [PATCH 182/305] script: add warning --- script/post-check/BasePostCheck.s.sol | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/post-check/BasePostCheck.s.sol b/script/post-check/BasePostCheck.s.sol index 7a5c96d4..c1a7043b 100644 --- a/script/post-check/BasePostCheck.s.sol +++ b/script/post-check/BasePostCheck.s.sol @@ -64,14 +64,18 @@ abstract contract BasePostCheck is BaseMigration { vm.deal(cheatGovernor, 1); // Check created EOA vm.deal(cheatOperator, 1); // Check created EOA - vm.prank(manager); + address proxyAdmin = payable(manager).getProxyAdmin(); + if (proxyAdmin != manager) { + console.log(unicode"⚠ WARNING: ProxyAdmin is not the manager!".yellow()); + } + vm.prank(proxyAdmin); try TransparentUpgradeableProxyV2(payable(manager)).functionDelegateCall( abi.encodeCall( IBridgeManager.addBridgeOperators, (cheatVoteWeight.toSingletonArray().toUint96sUnsafe(), cheatGovernor.toSingletonArray(), cheatOperator.toSingletonArray()) ) ) { } catch { - vm.prank(manager); + vm.prank(proxyAdmin); IBridgeManager(manager).addBridgeOperators( cheatVoteWeight.toSingletonArray().toUint96sUnsafe(), cheatGovernor.toSingletonArray(), cheatOperator.toSingletonArray() ); From 1f1d640b6961d0f41b0d8560d996a81a6be4be3f Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 16 Apr 2024 11:23:03 +0700 Subject: [PATCH 183/305] script: load bridge tracking in post check --- script/PostChecker.sol | 1 + .../deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/script/PostChecker.sol b/script/PostChecker.sol index 628c8cf8..383d5f65 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -53,6 +53,7 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { bridgeSlash = loadContract(Contract.BridgeSlash.key()); bridgeReward = loadContract(Contract.BridgeReward.key()); roninGateway = loadContract(Contract.RoninGatewayV3.key()); + bridgeTracking = loadContract(Contract.BridgeTracking.key()); roninBridgeManager = loadContract(Contract.RoninBridgeManager.key()); (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol index 94ef9cb4..c030a536 100644 --- a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -154,7 +154,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu CONFIG.createFork(companionNetwork); CONFIG.switchTo(companionNetwork); - assertEq(mainchainBridgeManager.getProxyAdmin(), mainchainBridgeManager, "Invalid MainchainBridgeManager in mainchainBridgeManager"); + assertEq(mainchainBridgeManager.getProxyAdmin(), mainchainBridgeManager, "Invalid ProxyAdmin in MainchainBridgeManager, expected self"); assertEq( HasContracts(mainchainGateway).getContract(ContractType.BRIDGE_MANAGER), mainchainBridgeManager, "Invalid MainchainBridgeManager in mainchainGateway" ); From 53b01ea93fad5c0e0fdc1ae25a6e8d0030c3357f Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 16 Apr 2024 11:23:23 +0700 Subject: [PATCH 184/305] script: update fdk version --- lib/foundry-deployment-kit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index 2f48f7db..68f4fd8b 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit 2f48f7dbed4b99688ecd2b42109e3400d296b3a3 +Subproject commit 68f4fd8bedc1d5532d1e9df6403eb83363bf9877 From aa60e55bc3b6a10d75fc12d323ead543ae132c57 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 12:40:15 +0700 Subject: [PATCH 185/305] script: fix ronin script --- .../20240411-helper.s.sol | 2 +- ...40411-p1-deploy-ronin-bridge-manager.s.sol | 1 + ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 32 +++++++++++++------ ...0240411-p3-upgrade-bridge-main-chain.s.sol | 12 ++++--- script/PostChecker.sol | 2 +- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol index ce9652fd..2775424a 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -36,7 +36,7 @@ contract Migration__20240409_Helper is Migration { } function _helperVoteForCurrentNetwork(LegacyProposalDetail memory proposal) internal { - for (uint i; i < _voters.length; ++i) { + for (uint i; i < _voters.length - 1; ++i) { vm.broadcast(_voters[i]); address(_currRoninBridgeManager).call( abi.encodeWithSignature( diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol index f13e088e..d0be13ac 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol @@ -24,6 +24,7 @@ import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; import "./20240411-deploy-bridge-manager-helper.s.sol"; import "../Migration.s.sol"; +// Run this script with `optimizer_runs = 1`. contract Migration__20240409_P1_DeployRoninBridgeManager is Migration, Migration__2024041_DeployRoninBridgeManagerHelper { ISharedArgument.SharedParameter _param; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index 2b302d5d..ed4a3b8e 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -34,7 +34,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H function run() public virtual onlyOn(DefaultNetwork.RoninTestnet.key()) { _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _newRoninBridgeManager = _deployRoninBridgeManager(); + _newRoninBridgeManager = RoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); @@ -43,6 +43,8 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H _changeAdminOfEnforcer(); _upgradeBridgeRoninchain(); + + config.setAddress(network(), Contract.RoninBridgeManager.key(), address(_newRoninBridgeManager)); } function _changeAdminOfEnforcer() private { @@ -69,7 +71,13 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H proposal.calldatas = calldatas; proposal.gasAmounts = gasAmounts; - vm.broadcast(_governor); + address gaGovernor = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + address[] memory gaVoters = new address[](3); + gaVoters[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + gaVoters[1] = 0x06f8Af58F656B507918d91B0B6F8B89bfCC556f9; + gaVoters[2] = 0xe1100401454B5f850b09f3b92cE7f071C5F1CEF4; + + vm.broadcast(gaGovernor); address(roninGA).call( abi.encodeWithSignature( "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", @@ -83,8 +91,8 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H ) ); - for (uint i; i < _voters.length; ++i) { - vm.broadcast(_voters[i]); + for (uint i; i < gaVoters.length; ++i) { + vm.broadcast(gaVoters[i]); address(roninGA).call( abi.encodeWithSignature( "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For @@ -138,16 +146,22 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", bridgeTrackingLogic); calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); calldatas[4] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); - calldatas[5] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[6] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[7] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[8] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[5] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[6] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[7] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[8] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); calldatas[9] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[10] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[11] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[12] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); calldatas[13] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[14] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.roninBridgeManager.callbackRegisters))); + calldatas[14] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.roninBridgeManager.callbackRegisters)) + ); calldatas[15] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); for (uint i; i < N; ++i) { diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index 560c5c83..6995e701 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -154,12 +154,17 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ targets[5] = address(_newMainchainBridgeManager); targets[6] = address(_newMainchainBridgeManager); - calldatas[0] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper)); - calldatas[1] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); + calldatas[0] = abi.encodeWithSignature( + "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) + ); + calldatas[1] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); - calldatas[5] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters))); + calldatas[5] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters)) + ); calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); for (uint i; i < N; ++i) { @@ -191,7 +196,6 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ ); } - function getDomain() public pure returns (bytes32) { return keccak256( abi.encode( diff --git a/script/PostChecker.sol b/script/PostChecker.sol index 383d5f65..eba216dc 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -20,7 +20,7 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { function run() external { _loadSysContract(); - // _validate_BridgeManager(); + _validate_BridgeManager(); _validate_Gateway(); } From d1effffee9502ab6d7a86c80e391ac866938bc78 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 16 Apr 2024 13:34:11 +0700 Subject: [PATCH 186/305] script: add relay upgrade post check --- .../PostCheck_BridgeManager_Proposal.s.sol | 66 ++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 80c7d243..28bafda8 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -26,6 +26,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { address[] private _addingOperators = [makeAddr("operator-1"), makeAddr("operator-2")]; function _validate_BridgeManager_Proposal() internal { + validate_relayUpgradeProposal(); validate_ProposeGlobalProposalAndRelay_addBridgeOperator(); validate_proposeAndRelay_addBridgeOperator(); validate_canExecuteUpgradeSingleProposal(); @@ -107,6 +108,69 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { } } + function validate_relayUpgradeProposal() private onPostCheck("validate_relayUpgradeProposal") { + TNetwork currentNetwork = CONFIG.getCurrentNetwork(); + (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); + + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + + MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + + uint256 snapshotId = vm.snapshot(); + + // Cheat add governor + { + cheatAddOverWeightedGovernor(address(mainchainManager)); + + address[] memory targets = new address[](2); + uint256[] memory values = new uint256[](2); + uint256[] memory gasAmounts = new uint256[](2); + bytes[] memory calldatas = new bytes[](2); + address[] memory logics = new address[](2); + + targets[0] = address(mainchainManager); + targets[1] = loadContract(Contract.MainchainGatewayV3.key()); + + logics[0] = _deployLogic(Contract.MainchainBridgeManager.key()); + logics[1] = _deployLogic(Contract.MainchainGatewayV3.key()); + + calldatas[0] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[0])); + calldatas[1] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[1])); + + gasAmounts[0] = 1_000_000; + gasAmounts[1] = 1_000_000; + + Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ + manager: address(mainchainManager), + expiryTimestamp: block.timestamp + 20 minutes, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts, + nonce: mainchainManager.round(block.chainid) + 1 + }); + + SignatureConsumer.Signature[] memory signatures = proposal.generateSignatures(cheatGovernorPk.toSingletonArray(), Ballot.VoteType.For); + Ballot.VoteType[] memory _supports = new Ballot.VoteType[](signatures.length); + + uint256 minimumForVoteWeight = mainchainManager.minimumVoteWeight(); + uint256 totalForVoteWeight = mainchainManager.getGovernorWeight(cheatGovernor); + console.log("Total for vote weight:", totalForVoteWeight); + console.log("Minimum for vote weight:", minimumForVoteWeight); + + vm.prank(cheatGovernor); + mainchainManager.relayProposal(proposal, _supports, signatures); + + assertEq(payable(address(mainchainManager)).getProxyImplementation(), logics[0], "MainchainBridgeManager logic is not upgraded"); + assertEq(loadContract(Contract.MainchainGatewayV3.key()).getProxyImplementation(), logics[1], "MainchainGatewayV3 logic is not upgraded"); + } + + bool reverted = vm.revertTo(snapshotId); + assertTrue(reverted, "Cannot revert to snapshot id"); + CONFIG.switchTo(currentNetwork); + } + function validate_ProposeGlobalProposalAndRelay_addBridgeOperator() private onlyOnRoninNetworkOrLocal @@ -125,7 +189,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { calldatas: abi.encodeCall( TransparentUpgradeableProxyV2.functionDelegateCall, (abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))) - ).toSingletonArray(), + ).toSingletonArray(), gasAmounts: uint256(1_000_000).toSingletonArray(), nonce: manager.round(0) + 1 }); From 4ad3d48278160d797bf6d84c10fa73b3c06c299f Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 13:46:16 +0700 Subject: [PATCH 187/305] script: add pause enforcer to the post check --- .../PostCheck_BridgeManager_Proposal.s.sol | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 28bafda8..0bff45bb 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -123,23 +123,27 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { { cheatAddOverWeightedGovernor(address(mainchainManager)); - address[] memory targets = new address[](2); - uint256[] memory values = new uint256[](2); - uint256[] memory gasAmounts = new uint256[](2); - bytes[] memory calldatas = new bytes[](2); - address[] memory logics = new address[](2); + address[] memory targets = new address[](3); + uint256[] memory values = new uint256[](3); + uint256[] memory gasAmounts = new uint256[](3); + bytes[] memory calldatas = new bytes[](3); + address[] memory logics = new address[](3); targets[0] = address(mainchainManager); targets[1] = loadContract(Contract.MainchainGatewayV3.key()); + targets[2] = loadContract(Contract.MainchainPauseEnforcer.key()); logics[0] = _deployLogic(Contract.MainchainBridgeManager.key()); logics[1] = _deployLogic(Contract.MainchainGatewayV3.key()); + logics[2] = _deployLogic(Contract.MainchainPauseEnforcer.key()); calldatas[0] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[0])); calldatas[1] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[1])); + calldatas[2] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[2])); gasAmounts[0] = 1_000_000; gasAmounts[1] = 1_000_000; + gasAmounts[2] = 1_000_000; Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ manager: address(mainchainManager), @@ -164,6 +168,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { assertEq(payable(address(mainchainManager)).getProxyImplementation(), logics[0], "MainchainBridgeManager logic is not upgraded"); assertEq(loadContract(Contract.MainchainGatewayV3.key()).getProxyImplementation(), logics[1], "MainchainGatewayV3 logic is not upgraded"); + assertEq(loadContract(Contract.MainchainPauseEnforcer.key()).getProxyImplementation(), logics[2], "MainchainPauseEnforcer logic is not upgraded"); } bool reverted = vm.revertTo(snapshotId); @@ -256,11 +261,12 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { function validate_canExcuteUpgradeAllOneProposal() private onlyOnRoninNetworkOrLocal onPostCheck("validate_canExcuteUpgradeAllOneProposal") { RoninBridgeManager manager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); - TContract[] memory contractTypes = new TContract[](4); + TContract[] memory contractTypes = new TContract[](5); contractTypes[0] = Contract.BridgeSlash.key(); contractTypes[1] = Contract.BridgeReward.key(); contractTypes[2] = Contract.BridgeTracking.key(); contractTypes[3] = Contract.RoninGatewayV3.key(); + contractTypes[4] = Contract.RoninPauseEnforcer.key(); address[] memory targets = new address[](contractTypes.length); for (uint256 i; i < contractTypes.length; ++i) { From 299b38b8dd4b149fd20af6380313f2a76d09a3b5 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 11:14:52 +0700 Subject: [PATCH 188/305] chore: add RoninBridgeManager artifact --- .../RoninBridgeManagerConstructorLogic.json | 2113 ++++++++++++ .../RoninBridgeManagerConstructorProxy.json | 218 ++ .../RoninBridgeManagerLogic.json | 2952 +++++++++++++++++ 3 files changed, 5283 insertions(+) create mode 100644 deployments/ronin-testnet/RoninBridgeManagerConstructorLogic.json create mode 100644 deployments/ronin-testnet/RoninBridgeManagerConstructorProxy.json create mode 100644 deployments/ronin-testnet/RoninBridgeManagerLogic.json diff --git a/deployments/ronin-testnet/RoninBridgeManagerConstructorLogic.json b/deployments/ronin-testnet/RoninBridgeManagerConstructorLogic.json new file mode 100644 index 00000000..7541daf9 --- /dev/null +++ b/deployments/ronin-testnet/RoninBridgeManagerConstructorLogic.json @@ -0,0 +1,2113 @@ +{ + "abi": [ + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addBridgeOperators", + "inputs": [ + { + "name": "voteWeights", + "type": "uint96[]", + "internalType": "uint96[]" + }, + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "checkThreshold", + "inputs": [ + { + "name": "voteWeight", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeOperatorWeight", + "inputs": [ + { + "name": "bridgeOperator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "weight", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeOperators", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getCallbackRegisters", + "inputs": [], + "outputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ], + "outputs": [ + { + "name": "contract_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getFullBridgeOperatorInfos", + "inputs": [], + "outputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGlobalProposalSignatures", + "inputs": [ + { + "name": "round_", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "voters", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorOf", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorWeight", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "weight", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorWeights", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOperatorOf", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProposalSignatures", + "inputs": [ + { + "name": "_chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_round", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "_voters", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_supports", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "_signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThreshold", + "inputs": [], + "outputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTotalWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "globalProposalVoted", + "inputs": [ + { + "name": "round_", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "voter", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "roninChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryDuration", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bridgeContract", + "type": "address", + "internalType": "address" + }, + { + "name": "callbackRegisters", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "voteWeights", + "type": "uint96[]", + "internalType": "uint96[]" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isBridgeOperator", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumVoteWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proposalVoted", + "inputs": [ + { + "name": "_chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_round", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_voter", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "registerCallbacks", + "inputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeBridgeOperators", + "inputs": [ + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "resolveTargets", + "inputs": [ + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + } + ], + "outputs": [ + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "round", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMinRequiredGovernor", + "inputs": [ + { + "name": "min", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setThreshold", + "inputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sumGovernorsWeight", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "sum", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalBridgeOperator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unregisterCallbacks", + "inputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateManyTargetOption", + "inputs": [ + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "vote", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "status", + "type": "uint8", + "internalType": "enum VoteStatusConsumer.VoteStatus" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "againstVoteWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "forVoteWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "BridgeOperatorAddingFailed", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorRemovingFailed", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorUpdated", + "inputs": [ + { + "name": "governor", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fromBridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "toBridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorsAdded", + "inputs": [ + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "voteWeights", + "type": "uint96[]", + "indexed": false, + "internalType": "uint96[]" + }, + { + "name": "governors", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorsRemoved", + "inputs": [ + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CallbackRegistered", + "inputs": [ + { + "name": "", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ContractUpdated", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GlobalProposalCreated", + "inputs": [ + { + "name": "round", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "proposal", + "type": "tuple", + "indexed": false, + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "globalProposalHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "globalProposal", + "type": "tuple", + "indexed": false, + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "creator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MinRequiredGovernorUpdated", + "inputs": [ + { + "name": "min", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Notified", + "inputs": [ + { + "name": "callData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "registers", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "returnDatas", + "type": "bytes[]", + "indexed": false, + "internalType": "bytes[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalApproved", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalCreated", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "round", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "proposal", + "type": "tuple", + "indexed": false, + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "creator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExecuted", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "successCalls", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "returnDatas", + "type": "bytes[]", + "indexed": false, + "internalType": "bytes[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExpired", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExpiryDurationChanged", + "inputs": [ + { + "name": "duration", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalRejected", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalVoted", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "voter", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "support", + "type": "uint8", + "indexed": false, + "internalType": "enum Ballot.VoteType" + }, + { + "name": "weight", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TargetOptionUpdated", + "inputs": [ + { + "name": "targetOption", + "type": "uint8", + "indexed": true, + "internalType": "enum GlobalProposal.TargetOption" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThresholdUpdated", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numerator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "previousNumerator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "previousDenominator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrBelowMinRequiredGovernors", + "inputs": [] + }, + { + "type": "error", + "name": "ErrContractTypeNotFound", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ] + }, + { + "type": "error", + "name": "ErrCurrentProposalIsNotCompleted", + "inputs": [] + }, + { + "type": "error", + "name": "ErrDuplicated", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrExistOneInternalCallFailed", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "callData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "ErrGovernorNotFound", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrGovernorNotMatch", + "inputs": [ + { + "name": "required", + "type": "address", + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidArguments", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidInput", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidThreshold", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidVoteWeight", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrLengthMismatch", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrOnlySelfCall", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrOperatorNotFound", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrUnauthorized", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrVoteIsFinalized", + "inputs": [] + }, + { + "type": "error", + "name": "ErrZeroAddress", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrZeroCodeContract", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "address": "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "args": "0x", + "ast": "", + "blockNumber": 26511796, + "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61398280620000f46000396000f3fe608060405234801561001057600080fd5b50600436106101965760003560e01c806301a5f43f1461019b57806306aba0e1146101b05780630a44fa43146101cb5780630f7c3189146101de5780631c905e39146101f35780631f425338146102155780632c5e6520146102285780632d6d7d731461024b57806334d5f37b1461025e57806335da81211461027e5780633644e515146102915780637d4c1d781461029a5780637de5dedd146102ad5780637f7fe058146102b5578063800eaab3146102d5578063828fc1a1146102e8578063865e6fd3146102fb578063901979d51461030e5780639b19dbfd14610339578063a64a838014610341578063aee1767f14610354578063b384abef14610367578063b405aaf2146103c2578063b9c36209146103d5578063bc4e068f146103e8578063c441c4a8146103fb578063cc7e6b3b14610412578063d0a50db014610432578063d78392f81461043a578063dafae4081461044d578063de981f1b14610460578063e75235b814610473578063e9c0349814610490578063f80b5352146104a3575b600080fd5b6101ae6101a9366004612d91565b6104ab565b005b6101b861055a565b6040519081526020015b60405180910390f35b6101b86101d9366004612e2a565b610569565b6101e66105ee565b6040516101c29190612eb0565b610206610201366004612ec3565b610600565b6040516101c293929190612efb565b6101ae610223366004612e2a565b61061c565b61023b610236366004612fce565b6106bb565b60405190151581526020016101c2565b6101e6610259366004612e2a565b6106c8565b6101b861026c366004613003565b60026020526000908152604090205481565b6101ae61028c366004612e2a565b61070f565b6101b860015481565b6101ae6102a83660046131dd565b610757565b6101b8610893565b6102c86102c3366004613317565b6108e9565b6040516101c29190613332565b6101ae6102e3366004613346565b61095c565b61023b6102f63660046133a9565b610994565b6101ae6103093660046133e4565b6109a2565b61032161031c366004613317565b6109bd565b6040516001600160601b0390911681526020016101c2565b6101e66109f3565b6101ae61034f366004613003565b610a5e565b6102c8610362366004613317565b610a72565b6103b1610375366004612ec3565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101c295949392919061340e565b61023b6103d0366004613317565b610a84565b6101ae6103e3366004612ec3565b610abc565b6102066103f6366004613003565b610ace565b610403610aeb565b6040516101c29392919061347d565b610425610420366004612e2a565b610bc5565b6040516101c291906134c0565b6101b8610c03565b610321610448366004613317565b610c16565b61023b61045b366004613003565b610c21565b6102c861046e3660046134d3565b610c5d565b61047b610cbf565b604080519283526020830191909152016101c2565b6101ae61049e366004612e2a565b610ce1565b6101e6610d2a565b6104b3610d8d565b61055186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610de992505050565b50505050505050565b600061056461114b565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105aa925083915061115e9050565b6105e684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061119392505050565b949350505050565b60606105646105fb611218565b61123c565b606080606061060f8585611250565b9250925092509250925092565b610624610d8d565b818180806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610663925083915061115e9050565b600061066d611218565b905060005b838110156106b4576106ab85858381811061068f5761068f6134ee565b90506020020160208101906106a49190613317565b8390611639565b50600101610672565b5050505050565b60006105e684848461164e565b606061070683838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611684915050565b90505b92915050565b610717610d8d565b6107538282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506117d792505050565b5050565b600054610100900460ff16158080156107775750600054600160ff909116105b806107915750303b158015610791575060005460ff166001145b6107f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561081c576000805461ff0019166101001790555b61082589611892565b61082f83836118c2565b61083f8c8c8c8b8b8b8b8b6118f3565b8015610885576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60008061089e611944565b90506000806108ab610cbf565b91509150806001828560040154856108c3919061351a565b6108cd9190613531565b6108d79190613544565b6108e19190613557565b935050505090565b60008060006108ff6108f9611944565b85611968565b9150915081610923578360405163141e2e1f60e11b81526004016107f09190613332565b61092b611944565b600101818154811061093f5761093f6134ee565b6000918252602090912001546001600160a01b0316949350505050565b33301461098a576000356001600160e01b0319166040516307337e1960e41b81526004016107f09190613579565b61075382826119cd565b60006107066000848461164e565b6109aa610d8d565b6109b381611a76565b6107538282611aa3565b6000806109c8611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109fd611944565b600101805480602002602001604051908101604052809291908181526020018280548015610a5457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a36575b5050505050905090565b610a66610d8d565b610a6f81611b2e565b50565b6000610a7d82611b9b565b5092915050565b600080610a8f611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610ac4610d8d565b6107538282611c12565b6060806060610ade600085611250565b9250925092509193909250565b60608060606000610afa611944565b805460408051602080840282018101909252828152929350839190830182828015610b4e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b30575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b50505050509250610bbd84611cc4565b915050909192565b6060610706838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611cc492505050565b6000610c0d611944565b60010154919050565b600061070982611db0565b600080610c2c611de5565b9050610c3661114b565b8160010154610c45919061351a565b6002820154610c54908561351a565b10159392505050565b6000610c67611e09565b600083600f811115610c7b57610c7b612ee5565b60ff1681526020810191909152604001600020546001600160a01b0316905080610cba578160405163409140df60e11b81526004016107f0919061358e565b919050565b6000806000610ccc611de5565b90508060010154816002015492509250509091565b610ce9610d8d565b610d25828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e2d92505050565b505050565b6060610d34611944565b805460408051602080840282018101909252828152929190830182828015610a54576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a36575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610de7576000356001600160e01b0319166001604051620f948f60ea1b81526004016107f09291906135a8565b565b6060610df58383612213565b610dfe8161115e565b6000610e08611944565b845187519192509081148015610e1e5750855181145b610e49576000356001600160e01b0319166040516306b5667560e21b81526004016107f09190613579565b806001600160401b03811115610e6157610e6161301c565b604051908082528060200260200182016040528015610e8a578160200160208202803683370190505b50935080600003610e9c575050611143565b60008060008060005b858110156110af578a8181518110610ebf57610ebf6134ee565b60200260200101519450898181518110610edb57610edb6134ee565b602002602001015193508b8181518110610ef757610ef76134ee565b60200260200101519250610f0a8561231d565b610f138461231d565b826001600160601b0316600003610f4b576000356001600160e01b031916604051637f11b8a360e11b81526004016107f09190613579565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692610fa39290811691166135d6565b610fad91906135d6565b610fb791906135d6565b6001600160601b0316600014898281518110610fd557610fd56134ee565b602002602001019015159081151581525050888181518110610ff957610ff96134ee565b6020026020010151156110a7578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556110a49083613531565b91505b600101610ea5565b50808660040160008282546110c49190613531565b90915550506040516110ff906347c28ec560e11b906110eb908c908f908d90602001613629565b604051602081830303815290604052612352565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516111349493929190613662565b60405180910390a15050505050505b509392505050565b6000611155611944565b60040154905090565b6111678161237f565b15610a6f576000356001600160e01b031916604051630d697db160e11b81526004016107f09190613579565b60008161119f8161115e565b60006111a9611944565b905060005b8451811015611210578160020160008683815181106111cf576111cf6134ee565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611206906001600160601b031685613531565b93506001016111ae565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b606060006112498361241e565b9392505050565b600082815260036020908152604080832084845290915281206004810154600582015460609384938493909290916112888284613531565b9050806001600160401b038111156112a2576112a261301c565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509550806001600160401b038111156112e6576112e661301c565b60405190808252806020026020018201604052801561133157816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816113045790505b509450806001600160401b0381111561134c5761134c61301c565b604051908082528060200260200182016040528015611375578160200160208202803683370190505b50965060005b838110156114ca576000878281518110611397576113976134ee565b602002602001019060018111156113b0576113b0612ee5565b908160018111156113c3576113c3612ee5565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106113fc576113fc6134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061145a5761145a6134ee565b602002602001018190525084600401818154811061147a5761147a6134ee565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106114aa576114aa6134ee565b6001600160a01b039092166020928302919091019091015260010161137b565b5060005b8281101561162d576001876114e38684613531565b815181106114f3576114f36134ee565b6020026020010190600181111561150c5761150c612ee5565b9081600181111561151f5761151f612ee5565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611558576115586134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866115ad8684613531565b815181106115bd576115bd6134ee565b60200260200101819052508460050181815481106115dd576115dd6134ee565b6000918252602090912001546001600160a01b0316886115fd8684613531565b8151811061160d5761160d6134ee565b6001600160a01b03909216602092830291909101909101526001016114ce565b50505050509250925092565b6000610706836001600160a01b03841661247a565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff166105e6565b606082516001600160401b0381111561169f5761169f61301c565b6040519080825280602002602001820160405280156116c8578160200160208202803683370190505b50905060005b8351811015610a7d57600560008583815181106116ed576116ed6134ee565b6020026020010151600581111561170657611706612ee5565b600581111561171757611717612ee5565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061174b5761174b6134ee565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156117a3575060006001600160a01b0316828281518110611790576117906134ee565b60200260200101516001600160a01b0316145b156117cf576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b6001016116ce565b806117e18161115e565b60006117eb611218565b905060008060005b855181101561188a5785818151811061180e5761180e6134ee565b6020026020010151925061182183611a76565b611832836312c0151560e21b61256d565b61183c8484612700565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016117f3565b505050505050565b600054610100900460ff166118b95760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612715565b600054610100900460ff166118e95760405162461bcd60e51b81526004016107f0906136ba565b6107538282612745565b600054610100900460ff1661191a5760405162461bcd60e51b81526004016107f0906136ba565b6119248888612777565b61192d846127b8565b61193a86868585856127e8565b5050505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156119bb57848181548110611989576119896134ee565b6000918252602090912001546001600160a01b03908116908516036119b3576001925090506119c6565b60010161196e565b506000600019915091505b9250929050565b60005b8251811015610d2557306001600160a01b03168282815181106119f5576119f56134ee565b60200260200101516001600160a01b031603611a32576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b611a6e838281518110611a4757611a476134ee565b6020026020010151838381518110611a6157611a616134ee565b6020026020010151612912565b6001016119d0565b806001600160a01b03163b600003610a6f5780604051630bfc64a360e21b81526004016107f09190613332565b80611aac611e09565b600084600f811115611ac057611ac0612ee5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b0157611b01612ee5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611b50576040516305f4dee960e31b815260040160405180910390fd5b6000611b5a611944565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611bb5611bac611944565b60010186611968565b9150915081611bd957846040516326527e1760e01b81526004016107f09190613332565b611be1611944565b805482908110611bf357611bf36134ee565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611c21575060018111155b15611c4d576000356001600160e01b0319166040516387f6f09560e01b81526004016107f09190613579565b6000611c57611de5565b6001810180546002830180549287905585905582549293509184908690856000611c8083613705565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611cd0611944565b905082516001600160401b03811115611ceb57611ceb61301c565b604051908082528060200260200182016040528015611d14578160200160208202803683370190505b50915060005b8351811015611da957816002016000858381518110611d3b57611d3b6134ee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611d8957611d896134ee565b6001600160601b0390921660209283029190910190910152600101611d1a565b5050919050565b6000611dba611944565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081611e398161115e565b6000611e43611944565b8451909150806001600160401b03811115611e6057611e6061301c565b604051908082528060200260200182016040528015611e89578160200160208202803683370190505b50935080600003611e9b57505061220d565b60058201548254611ead908390613544565b1015611ecc5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561219357898181518110611eef57611eef6134ee565b60200260200101519350611f0284611b9b565b9095509150611f108561231d565b611f198461231d565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611f6d57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611f7f57611f7f6134ee565b602002602001019015159081151581525050888181518110611fa357611fa36134ee565b60200260200101511561218b576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611fe690600190613544565b9050886000018181548110611ffd57611ffd6134ee565b60009182526020909120015489546001600160a01b03909116908a9086908110612029576120296134ee565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120635761206361371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106120c3576120c36134ee565b60009182526020909120015460018a0180546001600160a01b0390921691869081106120f1576120f16134ee565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121325761213261371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b03191690556121868286613531565b945050505b600101611ed5565b50818660040160008282546121a89190613544565b90915550506040516121cd90636242a4ef60e11b906110eb908c908c90602001613734565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516121fe929190613762565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122355761223561301c565b60405190808252806020026020018201604052801561225e578160200160208202803683370190505b50925060005b828110156122b85785818151811061227e5761227e6134ee565b6020026020010151848281518110612298576122986134ee565b6001600160a01b0390921660209283029190910190910152600101612264565b60005b82811015612313578581815181106122d5576122d56134ee565b60200260200101518583815181106122ef576122ef6134ee565b6001600160a01b0390921660209283029190910190910152600191820191016122bb565b5050505092915050565b6001600160a01b038116610a6f576000356001600160e01b03191660405163104c66df60e31b81526004016107f09190613579565b61235c82826129a5565b610753573382826040516319b5fdcb60e31b81526004016107f0939291906137d7565b6000815160000361239257506000919050565b60005b600183510381101561241557600181015b835181101561240c578381815181106123c1576123c16134ee565b60200260200101516001600160a01b03168483815181106123e4576123e46134ee565b60200260200101516001600160a01b031603612404575060019392505050565b6001016123a6565b50600101612395565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561246e57602002820191906000526020600020905b81548152602001906001019080831161245a575b50505050509050919050565b6000818152600183016020526040812054801561256357600061249e600183613544565b85549091506000906124b290600190613544565b90508181146125175760008660000182815481106124d2576124d26134ee565b90600052602060002001549050808760000184815481106124f5576124f56134ee565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125285761252861371e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610709565b6000915050610709565b6000816040516024016125809190613579565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906125c990859061380b565b600060405180830381855afa9150503d8060008114612604576040519150601f19603f3d011682016040523d82523d6000602084013e612609565b606091505b5091509150816126cb57846001600160a01b03168360405160240161262e9190613827565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251612663919061380b565b600060405180830381855afa9150503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b509092509050816126cb57838560405163069d427960e11b81526004016107f092919061383a565b808060200190518101906126df919061385d565b6106b457838560405163069d427960e11b81526004016107f092919061383a565b6000610706836001600160a01b038416612ccb565b600054610100900460ff1661273c5760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612d1a565b600054610100900460ff1661276c5760405162461bcd60e51b81526004016107f0906136ba565b61098a600030612912565b600054610100900460ff1661279e5760405162461bcd60e51b81526004016107f0906136ba565b60006127a8611de5565b600181559050610d258383611c12565b600054610100900460ff166127df5760405162461bcd60e51b81526004016107f0906136ba565b610a6f816117d7565b600054610100900460ff1661280f5760405162461bcd60e51b81526004016107f0906136ba565b61281a600285611aa3565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155612907818385610de9565b506106b46003611b2e565b806005600084600581111561292957612929612ee5565b600581111561293a5761293a612ee5565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561297857612978612ee5565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b600160006129b46105fb611218565b805190915060008190036129c9575050610709565b6000816001600160401b038111156129e3576129e361301c565b604051908082528060200260200182016040528015612a0c578160200160208202803683370190505b5090506000826001600160401b03811115612a2957612a2961301c565b604051908082528060200260200182016040528015612a5c57816020015b6060815260200190600190039081612a475790505b50905060008787604051602001612a7492919061387f565b6040516020818303038152906040529050600081604051602401612a989190613827565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612c8157868181518110612ae157612ae16134ee565b60200260200101516001600160a01b031683604051612b00919061380b565b6000604051808303816000865af19150503d8060008114612b3d576040519150601f19603f3d011682016040523d82523d6000602084013e612b42565b606091505b50868381518110612b5557612b556134ee565b60200260200101868481518110612b6e57612b6e6134ee565b6020026020010182905282151515158152505050848181518110612b9457612b946134ee565b6020026020010151612c7957868181518110612bb257612bb26134ee565b60200260200101516001600160a01b031682604051612bd1919061380b565b6000604051808303816000865af19150503d8060008114612c0e576040519150601f19603f3d011682016040523d82523d6000602084013e612c13565b606091505b50868381518110612c2657612c266134ee565b60200260200101868481518110612c3f57612c3f6134ee565b6020026020010182905282151515158152505050878015612c765750848181518110612c6d57612c6d6134ee565b60200260200101515b97505b600101612ac7565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612cb794939291906138b0565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612d1257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610709565b506000610709565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b60008083601f840112612d5f57600080fd5b5081356001600160401b03811115612d7657600080fd5b6020830191508360208260051b85010111156119c657600080fd5b60008060008060008060608789031215612daa57600080fd5b86356001600160401b0380821115612dc157600080fd5b612dcd8a838b01612d4d565b90985096506020890135915080821115612de657600080fd5b612df28a838b01612d4d565b90965094506040890135915080821115612e0b57600080fd5b50612e1889828a01612d4d565b979a9699509497509295939492505050565b60008060208385031215612e3d57600080fd5b82356001600160401b03811115612e5357600080fd5b612e5f85828601612d4d565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612ea55781516001600160a01b031687529582019590820190600101612e80565b509495945050505050565b6020815260006107066020830184612e6b565b60008060408385031215612ed657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60006060808352612f0f6060840187612e6b565b83810360208581019190915286518083528782019282019060005b81811015612f5657845160028110612f4457612f44612ee5565b83529383019391830191600101612f2a565b50506040925085810360408701528087518083528383019150838901925060005b81811015612fa7578351805160ff1684528581015186850152860151868401529284019291860191600101612f77565b50909a9950505050505050505050565b80356001600160a01b0381168114610cba57600080fd5b600080600060608486031215612fe357600080fd5b8335925060208401359150612ffa60408501612fb7565b90509250925092565b60006020828403121561301557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561305a5761305a61301c565b604052919050565b60006001600160401b0382111561307b5761307b61301c565b5060051b60200190565b600082601f83011261309657600080fd5b813560206130ab6130a683613062565b613032565b8083825260208201915060208460051b8701019350868411156130cd57600080fd5b602086015b848110156130f0576130e381612fb7565b83529183019183016130d2565b509695505050505050565b600082601f83011261310c57600080fd5b8135602061311c6130a683613062565b8083825260208201915060208460051b87010193508684111561313e57600080fd5b602086015b848110156130f05780356001600160601b03811681146131635760008081fd5b8352918301918301613143565b600082601f83011261318157600080fd5b813560206131916130a683613062565b8083825260208201915060208460051b8701019350868411156131b357600080fd5b602086015b848110156130f0578035600681106131d05760008081fd5b83529183019183016131b8565b60008060008060008060008060008060006101608c8e0312156131ff57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975061322460808d01612fb7565b96506001600160401b0360a08d013581101561323f57600080fd5b61324f8e60a08f01358f01613085565b96508060c08e0135111561326257600080fd5b6132728e60c08f01358f01613085565b95508060e08e0135111561328557600080fd5b6132958e60e08f01358f01613085565b9450806101008e013511156132a957600080fd5b6132ba8e6101008f01358f016130fb565b9350806101208e013511156132ce57600080fd5b6132df8e6101208f01358f01613170565b9250806101408e013511156132f357600080fd5b506133058d6101408e01358e01613085565b90509295989b509295989b9093969950565b60006020828403121561332957600080fd5b61070682612fb7565b6001600160a01b0391909116815260200190565b6000806040838503121561335957600080fd5b82356001600160401b038082111561337057600080fd5b61337c86838701613170565b9350602085013591508082111561339257600080fd5b5061339f85828601613085565b9150509250929050565b600080604083850312156133bc57600080fd5b823591506133cc60208401612fb7565b90509250929050565b803560108110610cba57600080fd5b600080604083850312156133f757600080fd5b613400836133d5565b91506133cc60208401612fb7565b60a081016005871061342257613422612ee5565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612ea55781516001600160601b031687529582019590820190600101613458565b6060815260006134906060830186612e6b565b82810360208401526134a28186612e6b565b905082810360408401526134b68185613443565b9695505050505050565b6020815260006107066020830184613443565b6000602082840312156134e557600080fd5b610706826133d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761070957610709613504565b8082018082111561070957610709613504565b8181038181111561070957610709613504565b60008261357457634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60208101601083106135a2576135a2612ee5565b91905290565b6001600160e01b03198316815260408101600b83106135c9576135c9612ee5565b8260208301529392505050565b6001600160601b03818116838216019080821115610a7d57610a7d613504565b60008151808452602080850194506020840160005b83811015612ea557815115158752958201959082019060010161360b565b60608152600061363c6060830186612e6b565b828103602084015261364e8186613443565b905082810360408401526134b681856135f6565b60808152600061367560808301876135f6565b82810360208401526136878187613443565b9050828103604084015261369b8186612e6b565b905082810360608401526136af8185612e6b565b979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001820161371757613717613504565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006137476040830185612e6b565b828103602084015261375981856135f6565b95945050505050565b60408152600061377560408301856135f6565b82810360208401526137598185612e6b565b60005b838110156137a257818101518382015260200161378a565b50506000910152565b600081518084526137c3816020860160208601613787565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090613759908301846137ab565b6000825161381d818460208701613787565b9190910192915050565b60208152600061070660208301846137ab565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561386f57600080fd5b8151801515811461124957600080fd5b6001600160e01b03198316815281516000906138a2816004850160208701613787565b919091016004019392505050565b6080815260006138c360808301876137ab565b6020838203818501526138d68288612e6b565b915083820360408501526138ea82876135f6565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561393b57601f198784030185526139298383516137ab565b9486019492509085019060010161390d565b50909b9a505050505050505050505056fea2646970667358221220d83003b43962afe3120b34eb387ecaaf4912a01d9c682ac0fb953cf65d90b77c64736f6c63430008170033", + "chainId": 2021, + "contractAbsolutePath": "RoninBridgeManagerConstructor.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101965760003560e01c806301a5f43f1461019b57806306aba0e1146101b05780630a44fa43146101cb5780630f7c3189146101de5780631c905e39146101f35780631f425338146102155780632c5e6520146102285780632d6d7d731461024b57806334d5f37b1461025e57806335da81211461027e5780633644e515146102915780637d4c1d781461029a5780637de5dedd146102ad5780637f7fe058146102b5578063800eaab3146102d5578063828fc1a1146102e8578063865e6fd3146102fb578063901979d51461030e5780639b19dbfd14610339578063a64a838014610341578063aee1767f14610354578063b384abef14610367578063b405aaf2146103c2578063b9c36209146103d5578063bc4e068f146103e8578063c441c4a8146103fb578063cc7e6b3b14610412578063d0a50db014610432578063d78392f81461043a578063dafae4081461044d578063de981f1b14610460578063e75235b814610473578063e9c0349814610490578063f80b5352146104a3575b600080fd5b6101ae6101a9366004612d91565b6104ab565b005b6101b861055a565b6040519081526020015b60405180910390f35b6101b86101d9366004612e2a565b610569565b6101e66105ee565b6040516101c29190612eb0565b610206610201366004612ec3565b610600565b6040516101c293929190612efb565b6101ae610223366004612e2a565b61061c565b61023b610236366004612fce565b6106bb565b60405190151581526020016101c2565b6101e6610259366004612e2a565b6106c8565b6101b861026c366004613003565b60026020526000908152604090205481565b6101ae61028c366004612e2a565b61070f565b6101b860015481565b6101ae6102a83660046131dd565b610757565b6101b8610893565b6102c86102c3366004613317565b6108e9565b6040516101c29190613332565b6101ae6102e3366004613346565b61095c565b61023b6102f63660046133a9565b610994565b6101ae6103093660046133e4565b6109a2565b61032161031c366004613317565b6109bd565b6040516001600160601b0390911681526020016101c2565b6101e66109f3565b6101ae61034f366004613003565b610a5e565b6102c8610362366004613317565b610a72565b6103b1610375366004612ec3565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101c295949392919061340e565b61023b6103d0366004613317565b610a84565b6101ae6103e3366004612ec3565b610abc565b6102066103f6366004613003565b610ace565b610403610aeb565b6040516101c29392919061347d565b610425610420366004612e2a565b610bc5565b6040516101c291906134c0565b6101b8610c03565b610321610448366004613317565b610c16565b61023b61045b366004613003565b610c21565b6102c861046e3660046134d3565b610c5d565b61047b610cbf565b604080519283526020830191909152016101c2565b6101ae61049e366004612e2a565b610ce1565b6101e6610d2a565b6104b3610d8d565b61055186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610de992505050565b50505050505050565b600061056461114b565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105aa925083915061115e9050565b6105e684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061119392505050565b949350505050565b60606105646105fb611218565b61123c565b606080606061060f8585611250565b9250925092509250925092565b610624610d8d565b818180806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610663925083915061115e9050565b600061066d611218565b905060005b838110156106b4576106ab85858381811061068f5761068f6134ee565b90506020020160208101906106a49190613317565b8390611639565b50600101610672565b5050505050565b60006105e684848461164e565b606061070683838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611684915050565b90505b92915050565b610717610d8d565b6107538282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506117d792505050565b5050565b600054610100900460ff16158080156107775750600054600160ff909116105b806107915750303b158015610791575060005460ff166001145b6107f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561081c576000805461ff0019166101001790555b61082589611892565b61082f83836118c2565b61083f8c8c8c8b8b8b8b8b6118f3565b8015610885576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60008061089e611944565b90506000806108ab610cbf565b91509150806001828560040154856108c3919061351a565b6108cd9190613531565b6108d79190613544565b6108e19190613557565b935050505090565b60008060006108ff6108f9611944565b85611968565b9150915081610923578360405163141e2e1f60e11b81526004016107f09190613332565b61092b611944565b600101818154811061093f5761093f6134ee565b6000918252602090912001546001600160a01b0316949350505050565b33301461098a576000356001600160e01b0319166040516307337e1960e41b81526004016107f09190613579565b61075382826119cd565b60006107066000848461164e565b6109aa610d8d565b6109b381611a76565b6107538282611aa3565b6000806109c8611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109fd611944565b600101805480602002602001604051908101604052809291908181526020018280548015610a5457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a36575b5050505050905090565b610a66610d8d565b610a6f81611b2e565b50565b6000610a7d82611b9b565b5092915050565b600080610a8f611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610ac4610d8d565b6107538282611c12565b6060806060610ade600085611250565b9250925092509193909250565b60608060606000610afa611944565b805460408051602080840282018101909252828152929350839190830182828015610b4e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b30575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b50505050509250610bbd84611cc4565b915050909192565b6060610706838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611cc492505050565b6000610c0d611944565b60010154919050565b600061070982611db0565b600080610c2c611de5565b9050610c3661114b565b8160010154610c45919061351a565b6002820154610c54908561351a565b10159392505050565b6000610c67611e09565b600083600f811115610c7b57610c7b612ee5565b60ff1681526020810191909152604001600020546001600160a01b0316905080610cba578160405163409140df60e11b81526004016107f0919061358e565b919050565b6000806000610ccc611de5565b90508060010154816002015492509250509091565b610ce9610d8d565b610d25828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e2d92505050565b505050565b6060610d34611944565b805460408051602080840282018101909252828152929190830182828015610a54576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a36575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610de7576000356001600160e01b0319166001604051620f948f60ea1b81526004016107f09291906135a8565b565b6060610df58383612213565b610dfe8161115e565b6000610e08611944565b845187519192509081148015610e1e5750855181145b610e49576000356001600160e01b0319166040516306b5667560e21b81526004016107f09190613579565b806001600160401b03811115610e6157610e6161301c565b604051908082528060200260200182016040528015610e8a578160200160208202803683370190505b50935080600003610e9c575050611143565b60008060008060005b858110156110af578a8181518110610ebf57610ebf6134ee565b60200260200101519450898181518110610edb57610edb6134ee565b602002602001015193508b8181518110610ef757610ef76134ee565b60200260200101519250610f0a8561231d565b610f138461231d565b826001600160601b0316600003610f4b576000356001600160e01b031916604051637f11b8a360e11b81526004016107f09190613579565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692610fa39290811691166135d6565b610fad91906135d6565b610fb791906135d6565b6001600160601b0316600014898281518110610fd557610fd56134ee565b602002602001019015159081151581525050888181518110610ff957610ff96134ee565b6020026020010151156110a7578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556110a49083613531565b91505b600101610ea5565b50808660040160008282546110c49190613531565b90915550506040516110ff906347c28ec560e11b906110eb908c908f908d90602001613629565b604051602081830303815290604052612352565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516111349493929190613662565b60405180910390a15050505050505b509392505050565b6000611155611944565b60040154905090565b6111678161237f565b15610a6f576000356001600160e01b031916604051630d697db160e11b81526004016107f09190613579565b60008161119f8161115e565b60006111a9611944565b905060005b8451811015611210578160020160008683815181106111cf576111cf6134ee565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611206906001600160601b031685613531565b93506001016111ae565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b606060006112498361241e565b9392505050565b600082815260036020908152604080832084845290915281206004810154600582015460609384938493909290916112888284613531565b9050806001600160401b038111156112a2576112a261301c565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509550806001600160401b038111156112e6576112e661301c565b60405190808252806020026020018201604052801561133157816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816113045790505b509450806001600160401b0381111561134c5761134c61301c565b604051908082528060200260200182016040528015611375578160200160208202803683370190505b50965060005b838110156114ca576000878281518110611397576113976134ee565b602002602001019060018111156113b0576113b0612ee5565b908160018111156113c3576113c3612ee5565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106113fc576113fc6134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061145a5761145a6134ee565b602002602001018190525084600401818154811061147a5761147a6134ee565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106114aa576114aa6134ee565b6001600160a01b039092166020928302919091019091015260010161137b565b5060005b8281101561162d576001876114e38684613531565b815181106114f3576114f36134ee565b6020026020010190600181111561150c5761150c612ee5565b9081600181111561151f5761151f612ee5565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611558576115586134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866115ad8684613531565b815181106115bd576115bd6134ee565b60200260200101819052508460050181815481106115dd576115dd6134ee565b6000918252602090912001546001600160a01b0316886115fd8684613531565b8151811061160d5761160d6134ee565b6001600160a01b03909216602092830291909101909101526001016114ce565b50505050509250925092565b6000610706836001600160a01b03841661247a565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff166105e6565b606082516001600160401b0381111561169f5761169f61301c565b6040519080825280602002602001820160405280156116c8578160200160208202803683370190505b50905060005b8351811015610a7d57600560008583815181106116ed576116ed6134ee565b6020026020010151600581111561170657611706612ee5565b600581111561171757611717612ee5565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061174b5761174b6134ee565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156117a3575060006001600160a01b0316828281518110611790576117906134ee565b60200260200101516001600160a01b0316145b156117cf576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b6001016116ce565b806117e18161115e565b60006117eb611218565b905060008060005b855181101561188a5785818151811061180e5761180e6134ee565b6020026020010151925061182183611a76565b611832836312c0151560e21b61256d565b61183c8484612700565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016117f3565b505050505050565b600054610100900460ff166118b95760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612715565b600054610100900460ff166118e95760405162461bcd60e51b81526004016107f0906136ba565b6107538282612745565b600054610100900460ff1661191a5760405162461bcd60e51b81526004016107f0906136ba565b6119248888612777565b61192d846127b8565b61193a86868585856127e8565b5050505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156119bb57848181548110611989576119896134ee565b6000918252602090912001546001600160a01b03908116908516036119b3576001925090506119c6565b60010161196e565b506000600019915091505b9250929050565b60005b8251811015610d2557306001600160a01b03168282815181106119f5576119f56134ee565b60200260200101516001600160a01b031603611a32576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b611a6e838281518110611a4757611a476134ee565b6020026020010151838381518110611a6157611a616134ee565b6020026020010151612912565b6001016119d0565b806001600160a01b03163b600003610a6f5780604051630bfc64a360e21b81526004016107f09190613332565b80611aac611e09565b600084600f811115611ac057611ac0612ee5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b0157611b01612ee5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611b50576040516305f4dee960e31b815260040160405180910390fd5b6000611b5a611944565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611bb5611bac611944565b60010186611968565b9150915081611bd957846040516326527e1760e01b81526004016107f09190613332565b611be1611944565b805482908110611bf357611bf36134ee565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611c21575060018111155b15611c4d576000356001600160e01b0319166040516387f6f09560e01b81526004016107f09190613579565b6000611c57611de5565b6001810180546002830180549287905585905582549293509184908690856000611c8083613705565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611cd0611944565b905082516001600160401b03811115611ceb57611ceb61301c565b604051908082528060200260200182016040528015611d14578160200160208202803683370190505b50915060005b8351811015611da957816002016000858381518110611d3b57611d3b6134ee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611d8957611d896134ee565b6001600160601b0390921660209283029190910190910152600101611d1a565b5050919050565b6000611dba611944565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081611e398161115e565b6000611e43611944565b8451909150806001600160401b03811115611e6057611e6061301c565b604051908082528060200260200182016040528015611e89578160200160208202803683370190505b50935080600003611e9b57505061220d565b60058201548254611ead908390613544565b1015611ecc5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561219357898181518110611eef57611eef6134ee565b60200260200101519350611f0284611b9b565b9095509150611f108561231d565b611f198461231d565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611f6d57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611f7f57611f7f6134ee565b602002602001019015159081151581525050888181518110611fa357611fa36134ee565b60200260200101511561218b576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611fe690600190613544565b9050886000018181548110611ffd57611ffd6134ee565b60009182526020909120015489546001600160a01b03909116908a9086908110612029576120296134ee565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120635761206361371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106120c3576120c36134ee565b60009182526020909120015460018a0180546001600160a01b0390921691869081106120f1576120f16134ee565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121325761213261371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b03191690556121868286613531565b945050505b600101611ed5565b50818660040160008282546121a89190613544565b90915550506040516121cd90636242a4ef60e11b906110eb908c908c90602001613734565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516121fe929190613762565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122355761223561301c565b60405190808252806020026020018201604052801561225e578160200160208202803683370190505b50925060005b828110156122b85785818151811061227e5761227e6134ee565b6020026020010151848281518110612298576122986134ee565b6001600160a01b0390921660209283029190910190910152600101612264565b60005b82811015612313578581815181106122d5576122d56134ee565b60200260200101518583815181106122ef576122ef6134ee565b6001600160a01b0390921660209283029190910190910152600191820191016122bb565b5050505092915050565b6001600160a01b038116610a6f576000356001600160e01b03191660405163104c66df60e31b81526004016107f09190613579565b61235c82826129a5565b610753573382826040516319b5fdcb60e31b81526004016107f0939291906137d7565b6000815160000361239257506000919050565b60005b600183510381101561241557600181015b835181101561240c578381815181106123c1576123c16134ee565b60200260200101516001600160a01b03168483815181106123e4576123e46134ee565b60200260200101516001600160a01b031603612404575060019392505050565b6001016123a6565b50600101612395565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561246e57602002820191906000526020600020905b81548152602001906001019080831161245a575b50505050509050919050565b6000818152600183016020526040812054801561256357600061249e600183613544565b85549091506000906124b290600190613544565b90508181146125175760008660000182815481106124d2576124d26134ee565b90600052602060002001549050808760000184815481106124f5576124f56134ee565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125285761252861371e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610709565b6000915050610709565b6000816040516024016125809190613579565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906125c990859061380b565b600060405180830381855afa9150503d8060008114612604576040519150601f19603f3d011682016040523d82523d6000602084013e612609565b606091505b5091509150816126cb57846001600160a01b03168360405160240161262e9190613827565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251612663919061380b565b600060405180830381855afa9150503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b509092509050816126cb57838560405163069d427960e11b81526004016107f092919061383a565b808060200190518101906126df919061385d565b6106b457838560405163069d427960e11b81526004016107f092919061383a565b6000610706836001600160a01b038416612ccb565b600054610100900460ff1661273c5760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612d1a565b600054610100900460ff1661276c5760405162461bcd60e51b81526004016107f0906136ba565b61098a600030612912565b600054610100900460ff1661279e5760405162461bcd60e51b81526004016107f0906136ba565b60006127a8611de5565b600181559050610d258383611c12565b600054610100900460ff166127df5760405162461bcd60e51b81526004016107f0906136ba565b610a6f816117d7565b600054610100900460ff1661280f5760405162461bcd60e51b81526004016107f0906136ba565b61281a600285611aa3565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155612907818385610de9565b506106b46003611b2e565b806005600084600581111561292957612929612ee5565b600581111561293a5761293a612ee5565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561297857612978612ee5565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b600160006129b46105fb611218565b805190915060008190036129c9575050610709565b6000816001600160401b038111156129e3576129e361301c565b604051908082528060200260200182016040528015612a0c578160200160208202803683370190505b5090506000826001600160401b03811115612a2957612a2961301c565b604051908082528060200260200182016040528015612a5c57816020015b6060815260200190600190039081612a475790505b50905060008787604051602001612a7492919061387f565b6040516020818303038152906040529050600081604051602401612a989190613827565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612c8157868181518110612ae157612ae16134ee565b60200260200101516001600160a01b031683604051612b00919061380b565b6000604051808303816000865af19150503d8060008114612b3d576040519150601f19603f3d011682016040523d82523d6000602084013e612b42565b606091505b50868381518110612b5557612b556134ee565b60200260200101868481518110612b6e57612b6e6134ee565b6020026020010182905282151515158152505050848181518110612b9457612b946134ee565b6020026020010151612c7957868181518110612bb257612bb26134ee565b60200260200101516001600160a01b031682604051612bd1919061380b565b6000604051808303816000865af19150503d8060008114612c0e576040519150601f19603f3d011682016040523d82523d6000602084013e612c13565b606091505b50868381518110612c2657612c266134ee565b60200260200101868481518110612c3f57612c3f6134ee565b6020026020010182905282151515158152505050878015612c765750848181518110612c6d57612c6d6134ee565b60200260200101515b97505b600101612ac7565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612cb794939291906138b0565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612d1257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610709565b506000610709565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b60008083601f840112612d5f57600080fd5b5081356001600160401b03811115612d7657600080fd5b6020830191508360208260051b85010111156119c657600080fd5b60008060008060008060608789031215612daa57600080fd5b86356001600160401b0380821115612dc157600080fd5b612dcd8a838b01612d4d565b90985096506020890135915080821115612de657600080fd5b612df28a838b01612d4d565b90965094506040890135915080821115612e0b57600080fd5b50612e1889828a01612d4d565b979a9699509497509295939492505050565b60008060208385031215612e3d57600080fd5b82356001600160401b03811115612e5357600080fd5b612e5f85828601612d4d565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612ea55781516001600160a01b031687529582019590820190600101612e80565b509495945050505050565b6020815260006107066020830184612e6b565b60008060408385031215612ed657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60006060808352612f0f6060840187612e6b565b83810360208581019190915286518083528782019282019060005b81811015612f5657845160028110612f4457612f44612ee5565b83529383019391830191600101612f2a565b50506040925085810360408701528087518083528383019150838901925060005b81811015612fa7578351805160ff1684528581015186850152860151868401529284019291860191600101612f77565b50909a9950505050505050505050565b80356001600160a01b0381168114610cba57600080fd5b600080600060608486031215612fe357600080fd5b8335925060208401359150612ffa60408501612fb7565b90509250925092565b60006020828403121561301557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561305a5761305a61301c565b604052919050565b60006001600160401b0382111561307b5761307b61301c565b5060051b60200190565b600082601f83011261309657600080fd5b813560206130ab6130a683613062565b613032565b8083825260208201915060208460051b8701019350868411156130cd57600080fd5b602086015b848110156130f0576130e381612fb7565b83529183019183016130d2565b509695505050505050565b600082601f83011261310c57600080fd5b8135602061311c6130a683613062565b8083825260208201915060208460051b87010193508684111561313e57600080fd5b602086015b848110156130f05780356001600160601b03811681146131635760008081fd5b8352918301918301613143565b600082601f83011261318157600080fd5b813560206131916130a683613062565b8083825260208201915060208460051b8701019350868411156131b357600080fd5b602086015b848110156130f0578035600681106131d05760008081fd5b83529183019183016131b8565b60008060008060008060008060008060006101608c8e0312156131ff57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975061322460808d01612fb7565b96506001600160401b0360a08d013581101561323f57600080fd5b61324f8e60a08f01358f01613085565b96508060c08e0135111561326257600080fd5b6132728e60c08f01358f01613085565b95508060e08e0135111561328557600080fd5b6132958e60e08f01358f01613085565b9450806101008e013511156132a957600080fd5b6132ba8e6101008f01358f016130fb565b9350806101208e013511156132ce57600080fd5b6132df8e6101208f01358f01613170565b9250806101408e013511156132f357600080fd5b506133058d6101408e01358e01613085565b90509295989b509295989b9093969950565b60006020828403121561332957600080fd5b61070682612fb7565b6001600160a01b0391909116815260200190565b6000806040838503121561335957600080fd5b82356001600160401b038082111561337057600080fd5b61337c86838701613170565b9350602085013591508082111561339257600080fd5b5061339f85828601613085565b9150509250929050565b600080604083850312156133bc57600080fd5b823591506133cc60208401612fb7565b90509250929050565b803560108110610cba57600080fd5b600080604083850312156133f757600080fd5b613400836133d5565b91506133cc60208401612fb7565b60a081016005871061342257613422612ee5565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612ea55781516001600160601b031687529582019590820190600101613458565b6060815260006134906060830186612e6b565b82810360208401526134a28186612e6b565b905082810360408401526134b68185613443565b9695505050505050565b6020815260006107066020830184613443565b6000602082840312156134e557600080fd5b610706826133d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761070957610709613504565b8082018082111561070957610709613504565b8181038181111561070957610709613504565b60008261357457634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60208101601083106135a2576135a2612ee5565b91905290565b6001600160e01b03198316815260408101600b83106135c9576135c9612ee5565b8260208301529392505050565b6001600160601b03818116838216019080821115610a7d57610a7d613504565b60008151808452602080850194506020840160005b83811015612ea557815115158752958201959082019060010161360b565b60608152600061363c6060830186612e6b565b828103602084015261364e8186613443565b905082810360408401526134b681856135f6565b60808152600061367560808301876135f6565b82810360208401526136878187613443565b9050828103604084015261369b8186612e6b565b905082810360608401526136af8185612e6b565b979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001820161371757613717613504565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006137476040830185612e6b565b828103602084015261375981856135f6565b95945050505050565b60408152600061377560408301856135f6565b82810360208401526137598185612e6b565b60005b838110156137a257818101518382015260200161378a565b50506000910152565b600081518084526137c3816020860160208601613787565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090613759908301846137ab565b6000825161381d818460208701613787565b9190910192915050565b60208152600061070660208301846137ab565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561386f57600080fd5b8151801515811461124957600080fd5b6001600160e01b03198316815281516000906138a2816004850160208701613787565b919091016004019392505050565b6080815260006138c360808301876137ab565b6020838203818501526138d68288612e6b565b915083820360408501526138ea82876135f6565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561393b57601f198784030185526139298383516137ab565b9486019492509085019060010161390d565b50909b9a505050505050505050505056fea2646970667358221220d83003b43962afe3120b34eb387ecaaf4912a01d9c682ac0fb953cf65d90b77c64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "addBridgeOperators(uint96[],address[],address[])": { + "details": "Adds multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to add.", + "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." + } + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "getBridgeOperatorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific bridge operator.", + "params": { + "bridgeOperator": "The address of the bridge operator to get the vote weight for." + }, + "returns": { + "weight": "The vote weight of the specified bridge operator." + } + }, + "getBridgeOperators()": { + "details": "Returns an array of all bridge operators.", + "returns": { + "_0": "An array containing the addresses of all bridge operators." + } + }, + "getCallbackRegisters()": { + "details": "Retrieves the addresses of registered callbacks.", + "returns": { + "registers": "An array containing the addresses of registered callbacks." + } + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getFullBridgeOperatorInfos()": { + "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", + "returns": { + "bridgeOperators": "An array of addresses representing the registered bridge operators.", + "governors": "An array of addresses representing the governors of each bridge operator.", + "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" + } + }, + "getGlobalProposalSignatures(uint256)": { + "details": "See {CommonGovernanceProposal-_getProposalSignatures}" + }, + "getGovernorOf(address)": { + "details": "Returns the corresponding `governor` of a `operator`." + }, + "getGovernorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific governor.", + "params": { + "governor": "The address of the governor to get the vote weight for." + }, + "returns": { + "weight": "voteWeight The vote weight of the specified governor." + } + }, + "getGovernorWeights(address[])": { + "details": "Returns the weights of a list of governor addresses." + }, + "getGovernors()": { + "details": "Returns an array of all governors.", + "returns": { + "_0": "An array containing the addresses of all governors." + } + }, + "getOperatorOf(address)": { + "details": "Returns the corresponding `operator` of a `governor`." + }, + "getProposalSignatures(uint256,uint256)": { + "details": "See {CommonGovernanceProposal-_getProposalSignatures}" + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTotalWeight()": { + "details": "Returns total weights." + }, + "globalProposalVoted(uint256,address)": { + "details": "See {CommonGovernanceProposal-_proposalVoted}" + }, + "isBridgeOperator(address)": { + "details": "Checks if the given address is a bridge operator.", + "params": { + "addr": "The address to check." + }, + "returns": { + "_0": "A boolean indicating whether the address is a bridge operator." + } + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "proposalVoted(uint256,uint256,address)": { + "details": "See {CommonGovernanceProposal-_proposalVoted}" + }, + "registerCallbacks(address[])": { + "details": "Registers multiple callbacks with the bridge.", + "params": { + "registers": "The array of callback addresses to register." + } + }, + "removeBridgeOperators(address[])": { + "details": "Removes multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to remove." + } + }, + "resolveTargets(uint8[])": { + "details": "Returns corresponding address of target options. Return address(0) on non-existent target." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setMinRequiredGovernor(uint256)": { + "details": "Self-call to update the minimum required governor.", + "params": { + "min": "The minimum number, this must not less than 3." + } + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "sumGovernorsWeight(address[])": { + "details": "Returns total weights of the governor list." + }, + "totalBridgeOperator()": { + "details": "Returns the total number of bridge operators.", + "returns": { + "_0": "The total number of bridge operators." + } + }, + "unregisterCallbacks(address[])": { + "details": "Unregisters multiple callbacks from the bridge.", + "params": { + "registers": "The array of callback addresses to unregister." + } + }, + "updateManyTargetOption(uint8[],address[])": { + "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal." + } + }, + "events": { + "BridgeOperatorAddingFailed(address)": { + "details": "Emitted when a bridge operator is failed to add." + }, + "BridgeOperatorRemovingFailed(address)": { + "details": "Emitted when a bridge operator is failed to remove." + }, + "BridgeOperatorUpdated(address,address,address)": { + "details": "Emitted when a bridge operator is updated." + }, + "BridgeOperatorsAdded(bool[],uint96[],address[],address[])": { + "details": "Emitted when new bridge operators are added." + }, + "BridgeOperatorsRemoved(bool[],address[])": { + "details": "Emitted when bridge operators are removed." + }, + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MinRequiredGovernorUpdated(uint256)": { + "details": "Emitted when the minimum number of required governors is updated." + }, + "Notified(bytes,address[],bool[],bytes[])": { + "details": "Emitted when the contract notifies multiple registers with statuses and return data." + }, + "ProposalApproved(bytes32)": { + "details": "Emitted when the proposal is approved" + }, + "ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "ProposalExecuted(bytes32,bool[],bytes[])": { + "details": "Emitted when the proposal is executed" + }, + "ProposalExpired(bytes32)": { + "details": "Emitted when the vote is expired" + }, + "ProposalExpiryDurationChanged(uint256)": { + "details": "Emitted when the proposal expiry duration is changed." + }, + "ProposalRejected(bytes32)": { + "details": "Emitted when the vote is reject" + }, + "ProposalVoted(bytes32,address,uint8,uint256)": { + "details": "Emitted when the proposal is voted" + }, + "TargetOptionUpdated(uint8,address)": { + "details": "Emitted when the target options are updated" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + } + }, + "errors": { + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrCurrentProposalIsNotCompleted()": [ + { + "details": "Error thrown when the current proposal is not completed." + } + ], + "ErrDuplicated(bytes4)": [ + { + "details": "Error thrown when a duplicated element is detected in an array.", + "params": { + "msgSig": "The function signature that invoke the error." + } + } + ], + "ErrInvalidArguments(bytes4)": [ + { + "details": "Error indicating that arguments are invalid." + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidVoteWeight(bytes4)": [ + { + "details": "Error indicating that a vote weight is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." + } + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrOnlySelfCall(bytes4)": [ + { + "details": "Error indicating that a function can only be called by the contract itself.", + "params": { + "msgSig": "The function signature (bytes4) that can only be called by the contract itself." + } + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedInterface(bytes4,address)": [ + { + "details": "The error indicating an unsupported interface.", + "params": { + "addr": "The address where the unsupported interface was encountered.", + "interfaceId": "The bytes4 interface identifier that is not supported." + } + } + ], + "ErrVoteIsFinalized()": [ + { + "details": "Error thrown when attempting to interact with a finalized vote." + } + ], + "ErrZeroAddress(bytes4)": [ + { + "details": "Error indicating that given address is null when it should not." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ErrBelowMinRequiredGovernors\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCurrentProposalIsNotCompleted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrDuplicated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"name\":\"ErrExistOneInternalCallFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"required\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidVoteWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ErrOperatorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrUnsupportedInterface\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrVoteIsFinalized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorAddingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorRemovingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromBridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toBridgeOperator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"CallbackRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"MinRequiredGovernorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"Notified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"ProposalExpiryDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\",\"name\":\"targetOption\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"TargetOptionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"addBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"getBridgeOperatorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCallbackRegisters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullBridgeOperatorInfos\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"round_\",\"type\":\"uint256\"}],\"name\":\"getGlobalProposalSignatures\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"voters\",\"type\":\"address[]\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getGovernorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getOperatorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getProposalSignatures\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_voters\",\"type\":\"address[]\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"_supports\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"round_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"globalProposalVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryDuration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"callbackRegisters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isBridgeOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"proposalVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"registerCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"removeBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"}],\"name\":\"resolveTargets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"setMinRequiredGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"sumGovernorsWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBridgeOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"unregisterCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateManyTargetOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrCurrentProposalIsNotCompleted()\":[{\"details\":\"Error thrown when the current proposal is not completed.\"}],\"ErrDuplicated(bytes4)\":[{\"details\":\"Error thrown when a duplicated element is detected in an array.\",\"params\":{\"msgSig\":\"The function signature that invoke the error.\"}}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidVoteWeight(bytes4)\":[{\"details\":\"Error indicating that a vote weight is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid vote weight.\"}}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrOnlySelfCall(bytes4)\":[{\"details\":\"Error indicating that a function can only be called by the contract itself.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that can only be called by the contract itself.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedInterface(bytes4,address)\":[{\"details\":\"The error indicating an unsupported interface.\",\"params\":{\"addr\":\"The address where the unsupported interface was encountered.\",\"interfaceId\":\"The bytes4 interface identifier that is not supported.\"}}],\"ErrVoteIsFinalized()\":[{\"details\":\"Error thrown when attempting to interact with a finalized vote.\"}],\"ErrZeroAddress(bytes4)\":[{\"details\":\"Error indicating that given address is null when it should not.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeOperatorAddingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to add.\"},\"BridgeOperatorRemovingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to remove.\"},\"BridgeOperatorUpdated(address,address,address)\":{\"details\":\"Emitted when a bridge operator is updated.\"},\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\":{\"details\":\"Emitted when new bridge operators are added.\"},\"BridgeOperatorsRemoved(bool[],address[])\":{\"details\":\"Emitted when bridge operators are removed.\"},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MinRequiredGovernorUpdated(uint256)\":{\"details\":\"Emitted when the minimum number of required governors is updated.\"},\"Notified(bytes,address[],bool[],bytes[])\":{\"details\":\"Emitted when the contract notifies multiple registers with statuses and return data.\"},\"ProposalApproved(bytes32)\":{\"details\":\"Emitted when the proposal is approved\"},\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"ProposalExecuted(bytes32,bool[],bytes[])\":{\"details\":\"Emitted when the proposal is executed\"},\"ProposalExpired(bytes32)\":{\"details\":\"Emitted when the vote is expired\"},\"ProposalExpiryDurationChanged(uint256)\":{\"details\":\"Emitted when the proposal expiry duration is changed.\"},\"ProposalRejected(bytes32)\":{\"details\":\"Emitted when the vote is reject\"},\"ProposalVoted(bytes32,address,uint8,uint256)\":{\"details\":\"Emitted when the proposal is voted\"},\"TargetOptionUpdated(uint8,address)\":{\"details\":\"Emitted when the target options are updated\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"}},\"kind\":\"dev\",\"methods\":{\"addBridgeOperators(uint96[],address[],address[])\":{\"details\":\"Adds multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to add.\",\"governors\":\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\"}},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getBridgeOperatorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to get the vote weight for.\"},\"returns\":{\"weight\":\"The vote weight of the specified bridge operator.\"}},\"getBridgeOperators()\":{\"details\":\"Returns an array of all bridge operators.\",\"returns\":{\"_0\":\"An array containing the addresses of all bridge operators.\"}},\"getCallbackRegisters()\":{\"details\":\"Retrieves the addresses of registered callbacks.\",\"returns\":{\"registers\":\"An array containing the addresses of registered callbacks.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getFullBridgeOperatorInfos()\":{\"details\":\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\",\"returns\":{\"bridgeOperators\":\"An array of addresses representing the registered bridge operators.\",\"governors\":\"An array of addresses representing the governors of each bridge operator.\",\"weights\":\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\"}},\"getGlobalProposalSignatures(uint256)\":{\"details\":\"See {CommonGovernanceProposal-_getProposalSignatures}\"},\"getGovernorOf(address)\":{\"details\":\"Returns the corresponding `governor` of a `operator`.\"},\"getGovernorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific governor.\",\"params\":{\"governor\":\"The address of the governor to get the vote weight for.\"},\"returns\":{\"weight\":\"voteWeight The vote weight of the specified governor.\"}},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getGovernors()\":{\"details\":\"Returns an array of all governors.\",\"returns\":{\"_0\":\"An array containing the addresses of all governors.\"}},\"getOperatorOf(address)\":{\"details\":\"Returns the corresponding `operator` of a `governor`.\"},\"getProposalSignatures(uint256,uint256)\":{\"details\":\"See {CommonGovernanceProposal-_getProposalSignatures}\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTotalWeight()\":{\"details\":\"Returns total weights.\"},\"globalProposalVoted(uint256,address)\":{\"details\":\"See {CommonGovernanceProposal-_proposalVoted}\"},\"isBridgeOperator(address)\":{\"details\":\"Checks if the given address is a bridge operator.\",\"params\":{\"addr\":\"The address to check.\"},\"returns\":{\"_0\":\"A boolean indicating whether the address is a bridge operator.\"}},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"proposalVoted(uint256,uint256,address)\":{\"details\":\"See {CommonGovernanceProposal-_proposalVoted}\"},\"registerCallbacks(address[])\":{\"details\":\"Registers multiple callbacks with the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to register.\"}},\"removeBridgeOperators(address[])\":{\"details\":\"Removes multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to remove.\"}},\"resolveTargets(uint8[])\":{\"details\":\"Returns corresponding address of target options. Return address(0) on non-existent target.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setMinRequiredGovernor(uint256)\":{\"details\":\"Self-call to update the minimum required governor.\",\"params\":{\"min\":\"The minimum number, this must not less than 3.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumGovernorsWeight(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalBridgeOperator()\":{\"details\":\"Returns the total number of bridge operators.\",\"returns\":{\"_0\":\"The total number of bridge operators.\"}},\"unregisterCallbacks(address[])\":{\"details\":\"Unregisters multiple callbacks from the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to unregister.\"}},\"updateManyTargetOption(uint8[],address[])\":{\"details\":\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\"}},\"version\":1},\"userdoc\":{\"errors\":{\"ErrBelowMinRequiredGovernors()\":[{\"notice\":\"Error indicating that the governors list will go below minimum number of required governor.\"}],\"ErrGovernorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying governor\"}],\"ErrGovernorNotMatch(address,address)\":[{\"notice\":\"Error indicating that the msg.sender is not match the required governor\"}],\"ErrInvalidInput()\":[{\"notice\":\"Common invalid input error\"}],\"ErrOperatorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying operator\"}]},\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/RoninBridgeManagerConstructor.sol\":\"RoninBridgeManagerConstructor\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\"./BridgeManagerCallbackRegister.sol\\\";\\nimport { IHasContracts, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\n\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { AddressArrayUtils } from \\\"../../libraries/AddressArrayUtils.sol\\\";\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\nimport { RoleAccess } from \\\"../../utils/RoleAccess.sol\\\";\\nimport { TUint256Slot } from \\\"../../types/Types.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"./BridgeManagerQuorum.sol\\\";\\n\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\n using AddressArrayUtils for address[];\\n\\n struct BridgeManagerStorage {\\n /// @notice List of the governors.\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\n address[] _governors;\\n address[] _operators;\\n /// @dev Mapping from address to the governor weight\\n mapping(address governor => uint96 weight) _governorWeight;\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\n mapping(address operator => uint96 weight) _operatorWeight;\\n /// @dev Total weight of all governors / operators.\\n uint256 _totalWeight;\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\n uint256 _minRequiredGovernor;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerStorageLocation\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n bytes32 public DOMAIN_SEPARATOR;\\n\\n modifier onlyGovernor() virtual {\\n _requireGovernor(msg.sender);\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function __BridgeManager_init(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n __BridgeManagerQuorum_init_unchained(num, denom);\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\n }\\n\\n function __BridgeManager_init_unchained(\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n _setContract(ContractType.BRIDGE, bridgeContract);\\n\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,bytes32 salt)\\\"),\\n keccak256(\\\"BridgeManager\\\"), // name hash\\n keccak256(\\\"3\\\"), // version hash\\n keccak256(abi.encode(\\\"BRIDGE_MANAGER\\\", roninChainId)) // salt\\n )\\n );\\n\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n _setMinRequiredGovernor(3);\\n }\\n\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerStorageLocation\\n }\\n }\\n\\n // ===================== CONFIG ========================\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\n _setMinRequiredGovernor(min);\\n }\\n\\n function _setMinRequiredGovernor(uint min) internal {\\n if (min < 3) revert ErrInvalidInput();\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n $._minRequiredGovernor = min;\\n emit MinRequiredGovernorUpdated(min);\\n }\\n\\n /**\\n * @dev Internal function to require that the caller has governor role access.\\n */\\n function _requireGovernor(address addr) internal view {\\n if (_getGovernorWeight(addr) == 0) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\n }\\n }\\n\\n // ===================== WEIGHTS METHOD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getTotalWeight() public view returns (uint256) {\\n return _totalWeight();\\n }\\n\\n function _totalWeight() internal view override returns (uint256) {\\n return _getBridgeManagerStorage()._totalWeight;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\n weights = _getGovernorWeights(governors);\\n }\\n\\n /**\\n * @dev Internal function to get the vote weights of a given array of governors.\\n */\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n weights = new uint96[](governors.length);\\n\\n for (uint256 i; i < governors.length; i++) {\\n weights[i] = $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\n weight = _getGovernorWeight(governor);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\n */\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\n return _getBridgeManagerStorage()._governorWeight[governor];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\n sum = _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\n * @param governors The non-duplicated input.\\n */\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n for (uint256 i; i < governors.length; i++) {\\n sum += $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n return $._operatorWeight[bridgeOperator];\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n (uint256 numerator, uint256 denominator) = getThreshold();\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\n }\\n\\n // ===================== MANAGER CRUD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _removeBridgeOperators(bridgeOperators);\\n }\\n\\n /**\\n * @dev Internal function to add bridge operators.\\n *\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to add bridge operators.\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\n *\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\n */\\n function _addBridgeOperators(\\n uint96[] memory voteWeights,\\n address[] memory newGovernors,\\n address[] memory newOperators\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = newOperators.length;\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\n addeds = new bool[](length);\\n\\n // simply skip add operations if inputs are empty.\\n if (length == 0) return addeds;\\n\\n address iGovernor;\\n address iOperator;\\n uint96 iVoteWeight;\\n uint256 accumulatedWeight;\\n\\n for (uint256 i; i < length; i++) {\\n iGovernor = newGovernors[i];\\n iOperator = newOperators[i];\\n iVoteWeight = voteWeights[i];\\n\\n // Check non-zero inputs\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n\\n // Check not yet added operators\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\n\\n // Only add the valid operator\\n if (addeds[i]) {\\n // Add governor to list, update governor weight\\n $._governors.push(iGovernor);\\n $._governorWeight[iGovernor] = iVoteWeight;\\n\\n // Add operator to list, update governor weight\\n $._operators.push(iOperator);\\n $._operatorWeight[iOperator] = iVoteWeight;\\n\\n accumulatedWeight += iVoteWeight;\\n }\\n }\\n\\n $._totalWeight += accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\n\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\n }\\n\\n /**\\n * @dev Internal function to remove bridge operators.\\n *\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to remove bridge operators.\\n *\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\n */\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = removingOperators.length;\\n removeds = new bool[](length);\\n\\n // simply skip remove operations if inputs are empty.\\n if (length == 0) return removeds;\\n if ($._governors.length - length < $._minRequiredGovernor) {\\n revert ErrBelowMinRequiredGovernors();\\n }\\n\\n address iGovernor;\\n address iOperator;\\n uint256 accumulatedWeight;\\n uint idx;\\n\\n for (uint256 i; i < length; i++) {\\n iOperator = removingOperators[i];\\n\\n // Check non-zero inputs\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n\\n // Check existing operators\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\n\\n // Only remove the valid operator\\n if (removeds[i]) {\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\n\\n // Remove governor from list, update governor weight\\n uint lastIdx = $._governors.length - 1;\\n $._governors[idx] = $._governors[lastIdx];\\n $._governors.pop();\\n delete $._governorWeight[iGovernor];\\n\\n // Remove operator from list, update operator weight\\n $._operators[idx] = $._operators[lastIdx];\\n $._operators.pop();\\n delete $._operatorWeight[iOperator];\\n\\n accumulatedWeight += removingVoteWeight;\\n }\\n }\\n\\n $._totalWeight -= accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\n\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\n }\\n\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\n for (uint i; i < $_array.length; i++) {\\n if (addr == $_array[i]) {\\n return (true, i);\\n }\\n }\\n\\n return (false, type(uint256).max);\\n }\\n\\n // ================= MANAGER VIEW METHODS =============\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function totalBridgeOperator() external view returns (uint256) {\\n return _getBridgeManagerStorage()._operators.length;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function isBridgeOperator(address addr) external view returns (bool) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n return $._operatorWeight[addr] > 0;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperators() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._operators;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernors() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._governors;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getOperatorOf(address governor) external view returns (address operator) {\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\n if (!found) revert ErrGovernorNotFound(governor);\\n\\n return _getBridgeManagerStorage()._operators[idx];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorOf(address operator) external view returns (address governor) {\\n (governor,) = _getGovernorOf(operator);\\n }\\n\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\n if (!found) revert ErrOperatorNotFound(operator);\\n\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n governors = $._governors;\\n bridgeOperators = $._operators;\\n weights = _getGovernorWeights(governors);\\n }\\n}\\n\",\"keccak256\":\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { IBridgeManagerCallbackRegister } from \\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\n\\n/**\\n * @title BridgeManagerCallbackRegister\\n * @dev A contract that manages callback registrations and execution for a bridge.\\n */\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n /**\\n * @dev Storage slot for the address set of callback registers.\\n * @dev Value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\") - 1.\\n */\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\n\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\n _registerCallbacks(callbackRegisters);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\n _registerCallbacks(registers);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n\\n for (uint256 i; i < registers.length; i++) {\\n _callbackRegisters.remove(registers[i]);\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\n registers = _getCallbackRegisters().values();\\n }\\n\\n /**\\n * @dev Internal function to register multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n address register;\\n bool regSuccess;\\n\\n for (uint256 i; i < registers.length; i++) {\\n register = registers[i];\\n\\n _requireHasCode(register);\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\n\\n regSuccess = _callbackRegisters.add(register);\\n\\n emit CallbackRegistered(register, regSuccess);\\n }\\n }\\n\\n /**\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\n */\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\n }\\n }\\n\\n /**\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\n * @param callbackFnSig The function signature of the callback method.\\n * @param inputs The data to pass to the callback method.\\n * @return allSuccess Return true if all internal calls are success\\n */\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\n allSuccess = true;\\n\\n address[] memory registers = _getCallbackRegisters().values();\\n uint256 length = registers.length;\\n if (length == 0) return allSuccess;\\n\\n bool[] memory successes = new bool[](length);\\n bytes[] memory returnDatas = new bytes[](length);\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\n\\n for (uint256 i; i < length; i++) {\\n // First, attempt to call normally\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\n\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\n if (!successes[i]) {\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\n allSuccess = allSuccess && successes[i];\\n }\\n }\\n\\n emit Notified(callData, registers, successes, returnDatas);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the address set of callback registers.\\n * @return callbackRegisters The storage reference to the callback registers.\\n */\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\n assembly (\\\"memory-safe\\\") {\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IQuorum } from \\\"../../interfaces/IQuorum.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\n struct BridgeManagerQuorumStorage {\\n uint256 _nonce;\\n uint256 _numerator;\\n uint256 _denominator;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerQuorumStorage\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\n\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n $._nonce = 1;\\n\\n _setThreshold(num, denom);\\n }\\n\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerQuorumStorage\\n }\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n return ($._numerator, $._denominator);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\n\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n uint256 prevNum = $._numerator;\\n uint256 prevDenom = $._denominator;\\n\\n $._numerator = num;\\n $._denominator = denom;\\n\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\n }\\n\\n function _totalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/CoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"../../libraries/Ballot.sol\\\";\\nimport \\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/SignatureConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\n\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Error thrown when attempting to interact with a finalized vote.\\n */\\n error ErrVoteIsFinalized();\\n\\n /**\\n * @dev Error thrown when the current proposal is not completed.\\n */\\n error ErrCurrentProposalIsNotCompleted();\\n\\n struct ProposalVote {\\n VoteStatus status;\\n bytes32 hash;\\n uint256 againstVoteWeight; // Total weight of against votes\\n uint256 forVoteWeight; // Total weight of for votes\\n address[] forVoteds; // Array of addresses voting for\\n address[] againstVoteds; // Array of addresses voting against\\n uint256 expiryTimestamp;\\n mapping(address => Signature) sig;\\n mapping(address => bool) voted;\\n }\\n\\n /// @dev Emitted when a proposal is created\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\n /// @dev Emitted when the proposal is voted\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\n /// @dev Emitted when the proposal is approved\\n event ProposalApproved(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is reject\\n event ProposalRejected(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is expired\\n event ProposalExpired(bytes32 indexed proposalHash);\\n /// @dev Emitted when the proposal is executed\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\n /// @dev Emitted when the proposal expiry duration is changed.\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\n\\n /// @dev Mapping from chain id => vote round\\n /// @notice chain id = 0 for global proposal\\n mapping(uint256 => uint256) public round;\\n /// @dev Mapping from chain id => vote round => proposal vote\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\n\\n uint256 internal _proposalExpiryDuration;\\n\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\n __CoreGovernance_init_unchained(expiryDuration);\\n }\\n\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\n _setProposalExpiryDuration(expiryDuration);\\n }\\n\\n /**\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\n * if it is expired and not increase the `_round`.\\n */\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\n _round = round[_chainId];\\n // Skip checking for the first ever round\\n if (_round == 0) {\\n _round = round[_chainId] = 1;\\n } else {\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\n if (!_isExpired) {\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\n unchecked {\\n _round = ++round[_chainId];\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\n */\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\n _vote.hash = _proposalHash;\\n _vote.expiryTimestamp = _expiryTimestamp;\\n }\\n\\n /**\\n * @dev Proposes proposal struct.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\n uint256 chainId = proposal.chainId;\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n round_ = _createVotingRound(chainId);\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\n }\\n\\n /**\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the round.\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\n * proposal is approved, executed or rejected.\\n *\\n */\\n function _castVote(\\n Proposal.ProposalDetail memory proposal,\\n Ballot.VoteType support,\\n uint256 minimumForVoteWeight,\\n uint256 minimumAgainstVoteWeight,\\n address voter,\\n Signature memory signature,\\n uint256 voterWeight\\n ) internal virtual returns (bool done) {\\n uint256 chainId = proposal.chainId;\\n uint256 round_ = proposal.nonce;\\n ProposalVote storage _vote = vote[chainId][round_];\\n\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\n return true;\\n }\\n\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\n\\n _vote.voted[voter] = true;\\n // Stores the signature if it is not empty\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\n _vote.sig[voter] = signature;\\n }\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\n\\n uint256 _forVoteWeight;\\n uint256 _againstVoteWeight;\\n if (support == Ballot.VoteType.For) {\\n _vote.forVoteds.push(voter);\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\n } else if (support == Ballot.VoteType.Against) {\\n _vote.againstVoteds.push(voter);\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_forVoteWeight >= minimumForVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n if (proposal.isAutoExecute()) {\\n _tryExecute(_vote, proposal);\\n }\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n }\\n }\\n\\n /**\\n * @dev The specified executor executes the proposal on an approved proposal.\\n */\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\n bytes32 proposalHash = proposal.hash();\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\n\\n if (_vote.hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\n }\\n\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\n\\n _tryExecute(_vote, proposal);\\n }\\n\\n /**\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\n *\\n * Emits the event `ProposalExpired` if the vote is expired.\\n *\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\n * before or it will emit an unexpected event of `ProposalExpired`.\\n */\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\n\\n if (isExpired) {\\n emit ProposalExpired(proposalVote.hash);\\n\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n delete proposalVote.status;\\n delete proposalVote.hash;\\n delete proposalVote.againstVoteWeight;\\n delete proposalVote.forVoteWeight;\\n delete proposalVote.forVoteds;\\n delete proposalVote.againstVoteds;\\n delete proposalVote.expiryTimestamp;\\n }\\n }\\n\\n /**\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\n */\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\n if (proposal.executable()) {\\n vote_.status = VoteStatus.Executed;\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\n }\\n }\\n\\n /**\\n * @dev Sets the expiry duration for a new proposal.\\n */\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\n _proposalExpiryDuration = expiryDuration;\\n emit ProposalExpiryDurationChanged(expiryDuration);\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\n return vote_.voted[voter];\\n }\\n\\n /**\\n * @dev Returns total weight from validators.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns minimum vote to pass a proposal.\\n */\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\n */\\n function _getChainType() internal view virtual returns (ChainType);\\n}\\n\",\"keccak256\":\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"./CoreGovernance.sol\\\";\\n\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\n\\n /// @dev Emitted when a proposal is created\\n event GlobalProposalCreated(\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n bytes32 globalProposalHash,\\n GlobalProposal.GlobalProposalDetail globalProposal,\\n address creator\\n );\\n\\n /// @dev Emitted when the target options are updated\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\n\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\n }\\n\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\n _updateManyTargetOption(targetOptions, addrs);\\n }\\n\\n /**\\n * @dev Proposes for a global proposal.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobal(\\n uint256 expiryTimestamp,\\n GlobalProposal.TargetOption[] calldata targetOptions,\\n address executor,\\n uint256[] memory values,\\n bytes[] memory calldatas,\\n uint256[] memory gasAmounts,\\n address creator\\n ) internal virtual {\\n uint256 round_ = _createVotingRound(0);\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Proposes global proposal struct.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobalStruct(\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\n address creator\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n uint256 round_ = _createVotingRound(0);\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\n\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\n */\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\n }\\n\\n /**\\n * @dev Internal helper of {resolveTargets}.\\n *\\n * @param strict When the param is set to `true`, revert on non-existent target.\\n */\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\n targets = new address[](targetOptions.length);\\n\\n for (uint256 i; i < targetOptions.length; ++i) {\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\n }\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n *\\n * Requirement:\\n * - Only allow self-call through proposal.\\n *\\n */\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\n // HACK: Cannot reuse the existing library due to too deep stack\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n _updateManyTargetOption(targetOptions, targets);\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n */\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\n for (uint256 i; i < targetOptions.length; ++i) {\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\n _updateTargetOption(targetOptions[i], targets[i]);\\n }\\n }\\n\\n /**\\n * @dev Updates `targetOption` to `target`.\\n *\\n * Requirement:\\n * - Emit a `TargetOptionUpdated` event.\\n */\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\n _targetOptionsMap[targetOption] = target;\\n emit TargetOptionUpdated(targetOption, target);\\n }\\n}\\n\",\"keccak256\":\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\n\\nabstract contract CommonGovernanceProposal is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Casts votes by signatures.\\n *\\n * Note: This method does not verify the proposal hash with the vote hash. Please consider checking it before.\\n *\\n */\\n function _castVotesBySignatures(\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 proposalHash\\n ) internal {\\n if (!(_supports.length != 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\n\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\n\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\n\\n address _lastSigner;\\n\\n for (uint256 _i; _i < _signatures.length;) {\\n Signature calldata _sig;\\n address _signer;\\n _sig = _signatures[_i];\\n\\n if (_supports[_i] == Ballot.VoteType.For) {\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\n } else if (_supports[_i] == Ballot.VoteType.Against) {\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\n _lastSigner = _signer;\\n\\n uint256 _weight = _getWeight(_signer);\\n\\n if (_weight == 0) revert ErrInvalidSignatures(msg.sig);\\n\\n if (_castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)) {\\n return;\\n }\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the voted signatures for the proposals.\\n *\\n * Note: The signatures can be empty in case the proposal is voted on the current network.\\n *\\n */\\n function _getProposalSignatures(\\n uint256 _chainId,\\n uint256 _round\\n ) internal view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\n ProposalVote storage _vote = vote[_chainId][_round];\\n\\n uint256 _forLength = _vote.forVoteds.length;\\n uint256 _againstLength = _vote.againstVoteds.length;\\n uint256 _voterLength = _forLength + _againstLength;\\n\\n _supports = new Ballot.VoteType[](_voterLength);\\n _signatures = new Signature[](_voterLength);\\n _voters = new address[](_voterLength);\\n for (uint256 _i; _i < _forLength;) {\\n _supports[_i] = Ballot.VoteType.For;\\n _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]];\\n _voters[_i] = _vote.forVoteds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < _againstLength;) {\\n _supports[_i + _forLength] = Ballot.VoteType.Against;\\n _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]];\\n _voters[_i + _forLength] = _vote.againstVoteds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\n */\\n function _proposalVoted(uint256 _chainId, uint256 _round, address _voter) internal view returns (bool) {\\n return _voted(vote[_chainId][_round], _voter);\\n }\\n\\n /**\\n * @dev Returns the weight of a governor.\\n */\\n function _getWeight(address _governor) internal view virtual returns (uint256);\\n\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\n}\\n\",\"keccak256\":\"0xa7fbe65047096bcf4269cfe42e4529eb9a8bbbf93aff9207edd46b04e9661949\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../libraries/Proposal.sol\\\";\\nimport \\\"../GlobalCoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceProposal.sol\\\";\\n\\nabstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovernanceProposal {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Proposes and casts votes for a global proposal by signatures.\\n */\\n function _proposeGlobalProposalStructAndCastVotes(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures,\\n address creator\\n ) internal returns (Proposal.ProposalDetail memory proposal) {\\n proposal = _proposeGlobalStruct(globalProposal, creator);\\n _castVotesBySignatures(proposal, supports_, signatures, globalProposal.hash());\\n }\\n\\n /**\\n * @dev Casts votes for a global proposal by signatures.\\n */\\n function _castGlobalProposalBySignatures(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) internal {\\n Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\n\\n bytes32 proposalHash = _proposal.hash();\\n if (vote[0][_proposal.nonce].hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, vote[0][_proposal.nonce].hash);\\n }\\n\\n _castVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\n */\\n function getGlobalProposalSignatures(uint256 round_)\\n external\\n view\\n returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures)\\n {\\n return _getProposalSignatures(0, round_);\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\n */\\n function globalProposalVoted(uint256 round_, address voter) external view returns (bool) {\\n return _proposalVoted(0, round_, voter);\\n }\\n}\\n\",\"keccak256\":\"0x3905efdfd61681db17bcc392cf93d6571e94bf752f813eacd2504662241231c8\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceProposal.sol\\\";\\n\\nabstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Proposes a proposal struct and casts votes by signature.\\n */\\n function _proposeProposalStructAndCastVotes(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n address _creator\\n ) internal {\\n _proposeProposalStruct(_proposal, _creator);\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\n }\\n\\n /**\\n * @dev Proposes a proposal struct and casts votes by signature.\\n */\\n function _castProposalBySignatures(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures\\n ) internal {\\n bytes32 _proposalHash = _proposal.hash();\\n\\n if (vote[_proposal.chainId][_proposal.nonce].hash != _proposalHash) {\\n revert ErrInvalidProposal(_proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\n }\\n\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\n }\\n\\n /**\\n * @dev See `castProposalVoteForCurrentNetwork`.\\n */\\n function _castProposalVoteForCurrentNetwork(address _voter, Proposal.ProposalDetail memory _proposal, Ballot.VoteType _support) internal {\\n if (_proposal.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid);\\n\\n bytes32 proposalHash = _proposal.hash();\\n if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\n }\\n\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\n Signature memory _emptySignature;\\n _castVote(_proposal, _support, _minimumForVoteWeight, _minimumAgainstVoteWeight, _voter, _emptySignature, _getWeight(_voter));\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\n */\\n function getProposalSignatures(\\n uint256 _chainId,\\n uint256 _round\\n ) external view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\n return _getProposalSignatures(_chainId, _round);\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\n */\\n function proposalVoted(uint256 _chainId, uint256 _round, address _voter) external view returns (bool) {\\n return _proposalVoted(_chainId, _round, _voter);\\n }\\n}\\n\",\"keccak256\":\"0x820788183e3300ede4a19be84a3d7c991ac579017f78a098b26d1bbebc411ec4\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerCallbackRegister {\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\n\\n event CallbackRegistered(address, bool);\\n /**\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\n */\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\n\\n /**\\n * @dev Retrieves the addresses of registered callbacks.\\n * @return registers An array containing the addresses of registered callbacks.\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers);\\n\\n /**\\n * @dev Registers multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function registerCallbacks(address[] calldata registers) external;\\n\\n /**\\n * @dev Unregisters multiple callbacks from the bridge.\\n * @param registers The array of callback addresses to unregister.\\n */\\n function unregisterCallbacks(address[] calldata registers) external;\\n}\\n\",\"keccak256\":\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/ChainTypeConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface ChainTypeConsumer {\\n enum ChainType {\\n RoninChain,\\n Mainchain\\n }\\n}\\n\",\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/Ballot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\n\\nlibrary Ballot {\\n using ECDSA for bytes32;\\n\\n enum VoteType {\\n For,\\n Against\\n }\\n\\n // keccak256(\\\"Ballot(bytes32 proposalHash,uint8 support)\\\");\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\n\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, BALLOT_TYPEHASH)\\n mstore(add(ptr, 0x20), _proposalHash)\\n mstore(add(ptr, 0x40), _support)\\n digest := keccak256(ptr, 0x60)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\",\"license\":\"MIT\"},\"src/libraries/GlobalProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proposal.sol\\\";\\n\\nlibrary GlobalProposal {\\n /**\\n * @dev Error thrown when attempting to interact with an unsupported target.\\n */\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\n\\n enum TargetOption {\\n BridgeManager, // 0\\n GatewayContract, // 1\\n BridgeReward, // 2\\n BridgeSlash, // 3\\n BridgeTracking, // 4\\n PauseEnforcer // 5\\n\\n }\\n\\n struct GlobalProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n uint256 expiryTimestamp;\\n address executor;\\n TargetOption[] targetOptions;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = self.values;\\n TargetOption[] memory targets = self.targetOptions;\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\n uint256[] memory gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length;) {\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * proposal.nonce,\\n * proposal.expiryTimestamp,\\n * proposal.executor,\\n * targetsHash,\\n * valuesHash,\\n * calldatasHash,\\n * gasAmountsHash\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0x80), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n digest_ := keccak256(ptr, 0x100)\\n }\\n }\\n\\n /**\\n * @dev Converts into the normal proposal.\\n */\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\n detail_.nonce = self.nonce;\\n detail_.chainId = 0;\\n detail_.expiryTimestamp = self.expiryTimestamp;\\n detail_.executor = self.executor;\\n\\n detail_.targets = new address[](self.targetOptions.length);\\n detail_.values = self.values;\\n detail_.calldatas = self.calldatas;\\n detail_.gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\n detail_.targets[i] = targets[i];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\",\"license\":\"MIT\"},\"src/libraries/Proposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary Proposal {\\n /**\\n * @dev Error thrown when there is insufficient gas to execute a function.\\n */\\n error ErrInsufficientGas(bytes32 proposalHash);\\n\\n /**\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\n */\\n error ErrInvalidExpiryTimestamp();\\n\\n /**\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\n */\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\n\\n struct ProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n // Value 0: all chain should run this proposal\\n // Other values: only specific chain has to execute\\n uint256 chainId;\\n uint256 expiryTimestamp;\\n // The address that execute the proposal after the proposal passes.\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\n address executor;\\n address[] targets;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\n\\n /**\\n * @dev Validates the proposal.\\n */\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\n if (\\n !(\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\n && proposal.targets.length == proposal.gasAmounts.length\\n )\\n ) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\n revert ErrInvalidExpiryTimestamp();\\n }\\n }\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = proposal.values;\\n address[] memory targets = proposal.targets;\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length; ++i) {\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\n }\\n\\n // return\\n // keccak256(\\n // abi.encode(\\n // TYPE_HASH,\\n // proposal.nonce,\\n // proposal.chainId,\\n // proposal.expiryTimestamp\\n // proposal.executor\\n // targetsHash,\\n // valuesHash,\\n // calldatasHash,\\n // gasAmountsHash\\n // )\\n // );\\n // /\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0x100), arrayHashed)\\n digest_ := keccak256(ptr, 0x120)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\n */\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\n return proposal.executor == address(0);\\n }\\n\\n /**\\n * @dev Returns whether the proposal is executable for the current chain.\\n *\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\n *\\n */\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\n }\\n\\n /**\\n * @dev Executes the proposal.\\n */\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\n\\n successCalls = new bool[](proposal.targets.length);\\n returnDatas = new bytes[](proposal.targets.length);\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\n\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\n\\n if (!successCalls[i]) {\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\",\"license\":\"MIT\"},\"src/ronin/gateway/RoninBridgeManagerConstructor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from \\\"../../extensions/bridge-operator-governance/BridgeManager.sol\\\";\\nimport {\\n Ballot,\\n GlobalProposal,\\n Proposal,\\n CommonGovernanceProposal,\\n GovernanceProposal\\n} from \\\"../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\";\\nimport {\\n CoreGovernance,\\n GlobalCoreGovernance,\\n GlobalGovernanceProposal\\n} from \\\"../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\";\\nimport { VoteStatusConsumer } from \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\ncontract RoninBridgeManagerConstructor is BridgeManager, GovernanceProposal, GlobalGovernanceProposal {\\n using Proposal for Proposal.ProposalDetail;\\n\\n function initialize(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n uint256 expiryDuration,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights,\\n GlobalProposal.TargetOption[] memory targetOptions,\\n address[] memory targets\\n ) external initializer {\\n __CoreGovernance_init(expiryDuration);\\n __GlobalCoreGovernance_init(targetOptions, targets);\\n __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights);\\n }\\n\\n /**\\n * @dev Internal function to get the chain type of the contract.\\n * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain).\\n */\\n function _getChainType() internal pure override returns (ChainType) {\\n return ChainType.RoninChain;\\n }\\n\\n /**\\n * @dev Internal function to get the total weights of all governors.\\n * @return The total weights of all governors combined.\\n */\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\n return getTotalWeight();\\n }\\n\\n /**\\n * @dev Internal function to get the minimum vote weight required for governance actions.\\n * @return The minimum vote weight required for governance actions.\\n */\\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\\n return minimumVoteWeight();\\n }\\n\\n /**\\n * @dev Internal function to get the vote weight of a specific governor.\\n * @param _governor The address of the governor to get the vote weight for.\\n * @return The vote weight of the specified governor.\\n */\\n function _getWeight(address _governor) internal view virtual override returns (uint256) {\\n return _getGovernorWeight(_governor);\\n }\\n\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\n return DOMAIN_SEPARATOR;\\n }\\n}\\n\",\"keccak256\":\"0xbd91923f0b98646e3bbf22b28e854e7932d815c5cdb5e4d0d7f92291d076f97f\",\"license\":\"MIT\"},\"src/types/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { LibTUint256Slot } from \\\"./operations/LibTUint256Slot.sol\\\";\\n\\ntype TUint256Slot is bytes32;\\n\\nusing {\\n LibTUint256Slot.add,\\n LibTUint256Slot.sub,\\n LibTUint256Slot.mul,\\n LibTUint256Slot.div,\\n LibTUint256Slot.load,\\n LibTUint256Slot.store,\\n LibTUint256Slot.addAssign,\\n LibTUint256Slot.subAssign,\\n LibTUint256Slot.preDecrement,\\n LibTUint256Slot.postDecrement,\\n LibTUint256Slot.preIncrement,\\n LibTUint256Slot.postIncrement\\n} for TUint256Slot global;\\n\",\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\"},\"src/types/operations/LibTUint256Slot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { TUint256Slot } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title LibTUint256Slot\\n * @dev Library for handling unsigned 256-bit integers.\\n */\\nlibrary LibTUint256Slot {\\n /// @dev value is equal to bytes4(keccak256(\\\"Panic(uint256)\\\"))\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\n /// @dev error code for {Arithmetic over/underflow} error\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\n /// @dev error code for {Division or modulo by 0} error\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\n\\n /**\\n * @dev Loads the value of the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @return val The loaded value.\\n */\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\n assembly {\\n val := sload(self)\\n }\\n }\\n\\n /**\\n * @dev Stores a value into the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to be stored.\\n */\\n function store(TUint256Slot self, uint256 other) internal {\\n assembly {\\n sstore(self, other)\\n }\\n }\\n\\n /**\\n * @dev Multiplies the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to multiply by.\\n * @return res The resulting value after multiplication.\\n */\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n if iszero(iszero(storedVal)) {\\n res := mul(storedVal, other)\\n\\n // Overflow check\\n if iszero(eq(other, div(res, storedVal))) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Divides the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to divide by.\\n * @return res The resulting value after division.\\n */\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n // revert if divide by zero\\n if iszero(other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, DIVISION_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n res := div(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction.\\n */\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n\\n // Underflow check\\n if lt(storedVal, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n\\n res := sub(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition.\\n */\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n res := add(storedVal, other)\\n\\n // Overflow check\\n if lt(res, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after incrementing.\\n */\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = addAssign(self, 1);\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\n * @param self The TUint256Slot variable.\\n * @return res The original value before incrementing.\\n */\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res + 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after decrementing.\\n */\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = subAssign(self, 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value before decrementing.\\n */\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res - 1);\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition and storage.\\n */\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = add(self, other));\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction and storage.\\n */\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = sub(self, other));\\n }\\n}\\n\",\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192802, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 58190, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 58193, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 105550, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "DOMAIN_SEPARATOR", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 107599, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "round", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 107607, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "vote", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)107537_storage))" + }, + { + "astId": 107609, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "_proposalExpiryDuration", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 108331, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "_targetOptionsMap", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_enum(TargetOption)112395,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32", + "base": "t_address" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(TargetOption)112395": { + "encoding": "inplace", + "label": "enum GlobalProposal.TargetOption", + "numberOfBytes": "1" + }, + "t_enum(VoteStatus)111339": { + "encoding": "inplace", + "label": "enum VoteStatusConsumer.VoteStatus", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(Signature)111330_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SignatureConsumer.Signature)", + "numberOfBytes": "32", + "value": "t_struct(Signature)111330_storage" + }, + "t_mapping(t_enum(TargetOption)112395,t_address)": { + "encoding": "mapping", + "key": "t_enum(TargetOption)112395", + "label": "mapping(enum GlobalProposal.TargetOption => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)107537_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(ProposalVote)107537_storage)" + }, + "t_mapping(t_uint256,t_struct(ProposalVote)107537_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVote)107537_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(ProposalVote)107537_storage": { + "encoding": "inplace", + "label": "struct CoreGovernance.ProposalVote", + "numberOfBytes": "288", + "members": [ + { + "astId": 107513, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(VoteStatus)111339" + }, + { + "astId": 107515, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "hash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 107517, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "againstVoteWeight", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 107519, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "forVoteWeight", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 107522, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "forVoteds", + "offset": 0, + "slot": "4", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 107525, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "againstVoteds", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 107527, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "expiryTimestamp", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 107532, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "sig", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Signature)111330_storage)" + }, + { + "astId": 107536, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "voted", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ] + }, + "t_struct(Signature)111330_storage": { + "encoding": "inplace", + "label": "struct SignatureConsumer.Signature", + "numberOfBytes": "96", + "members": [ + { + "astId": 111325, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "v", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 111327, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "r", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 111329, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "s", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1713240519, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "round(uint256)": { + "notice": "chain id = 0 for global proposal" + } + }, + "errors": { + "ErrBelowMinRequiredGovernors()": [ + { + "notice": "Error indicating that the governors list will go below minimum number of required governor." + } + ], + "ErrGovernorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying governor" + } + ], + "ErrGovernorNotMatch(address,address)": [ + { + "notice": "Error indicating that the msg.sender is not match the required governor" + } + ], + "ErrInvalidInput()": [ + { + "notice": "Common invalid input error" + } + ], + "ErrOperatorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying operator" + } + ] + } + } +} \ No newline at end of file diff --git a/deployments/ronin-testnet/RoninBridgeManagerConstructorProxy.json b/deployments/ronin-testnet/RoninBridgeManagerConstructorProxy.json new file mode 100644 index 00000000..6e7b6d55 --- /dev/null +++ b/deployments/ronin-testnet/RoninBridgeManagerConstructorProxy.json @@ -0,0 +1,218 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "admin", + "inputs": [], + "outputs": [ + { + "name": "admin_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "changeAdmin", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "functionDelegateCall", + "inputs": [ + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "implementation", + "inputs": [], + "outputs": [ + { + "name": "implementation_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeTo", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ], + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "args": "0x7d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000000127500000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95", + "ast": "", + "blockNumber": 26511796, + "bytecode": "0x608060405260405162000eed38038062000eed833981016040819052620000269162000429565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200055c565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000ea6833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000ec6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000ea68339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002118162000383565b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b6060620002aa8462000383565b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b03168560405162000324919062000509565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000392565b9695505050505050565b6001600160a01b03163b151590565b60608315620003a357508162000161565b825115620003b45782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000527565b80516001600160a01b0381168114620003e857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200042057818101518382015260200162000406565b50506000910152565b6000806000606084860312156200043f57600080fd5b6200044a84620003d0565b92506200045a60208501620003d0565b60408501519092506001600160401b03808211156200047857600080fd5b818601915086601f8301126200048d57600080fd5b815181811115620004a257620004a2620003ed565b604051601f8201601f19908116603f01168101908382118183101715620004cd57620004cd620003ed565b81604052828152896020848701011115620004e757600080fd5b620004fa83602083016020880162000403565b80955050505050509250925092565b600082516200051d81846020870162000403565b9190910192915050565b60208152600082518060208401526200054881604085016020870162000403565b601f01601f19169190910160400192915050565b61093a806200056c6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b3660046106c7565b610136565b61006661009e3660046106f8565b610173565b6100666100b13660046107a8565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b506100666101023660046106c7565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610370565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610370915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b576101688161039b565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006102406103ef565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b600060008051602061089e8339815191525b546001600160a01b0316919050565b61037983610405565b6000825111806103865750805b15610212576103958383610445565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c461034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610471565b60006000805160206108be833981519152610361565b61040e81610508565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061046a83836040518060600160405280602781526020016108de60279139610588565b9392505050565b6001600160a01b0381166104d65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b8060008051602061089e8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051181610663565b6105735760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b806000805160206108be8339815191526104e7565b606061059384610663565b6105ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610609919061084e565b600060405180830381855af49150503d8060008114610644576040519150601f19603f3d011682016040523d82523d6000602084013e610649565b606091505b5091509150610659828286610672565b9695505050505050565b6001600160a01b03163b151590565b6060831561068157508161046a565b8251156106915782518084602001fd5b8160405162461bcd60e51b815260040161031d919061086a565b80356001600160a01b03811681146106c257600080fd5b919050565b6000602082840312156106d957600080fd5b61046a826106ab565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561070a57600080fd5b81356001600160401b038082111561072157600080fd5b818401915084601f83011261073557600080fd5b813581811115610747576107476106e2565b604051601f8201601f19908116603f0116810190838211818310171561076f5761076f6106e2565b8160405282815287602084870101111561078857600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107bd57600080fd5b6107c6846106ab565b925060208401356001600160401b03808211156107e257600080fd5b818601915086601f8301126107f657600080fd5b81358181111561080557600080fd5b87602082850101111561081757600080fd5b6020830194508093505050509250925092565b60005b8381101561084557818101518382015260200161082d565b50506000910152565b6000825161086081846020870161082a565b9190910192915050565b602081526000825180602084015261088981604085016020870161082a565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205d5db908d6bad5bfc298cb89bc49c38963bb1499be9336506651cff965fb333264736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "chainId": 2021, + "contractAbsolutePath": "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "deployedBytecode": "0x6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b3660046106c7565b610136565b61006661009e3660046106f8565b610173565b6100666100b13660046107a8565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b506100666101023660046106c7565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610370565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610370915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b576101688161039b565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006102406103ef565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b600060008051602061089e8339815191525b546001600160a01b0316919050565b61037983610405565b6000825111806103865750805b15610212576103958383610445565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c461034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610471565b60006000805160206108be833981519152610361565b61040e81610508565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061046a83836040518060600160405280602781526020016108de60279139610588565b9392505050565b6001600160a01b0381166104d65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b8060008051602061089e8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051181610663565b6105735760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b806000805160206108be8339815191526104e7565b606061059384610663565b6105ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610609919061084e565b600060405180830381855af49150503d8060008114610644576040519150601f19603f3d011682016040523d82523d6000602084013e610649565b606091505b5091509150610659828286610672565b9695505050505050565b6001600160a01b03163b151590565b6060831561068157508161046a565b8251156106915782518084602001fd5b8160405162461bcd60e51b815260040161031d919061086a565b80356001600160a01b03811681146106c257600080fd5b919050565b6000602082840312156106d957600080fd5b61046a826106ab565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561070a57600080fd5b81356001600160401b038082111561072157600080fd5b818401915084601f83011261073557600080fd5b813581811115610747576107476106e2565b604051601f8201601f19908116603f0116810190838211818310171561076f5761076f6106e2565b8160405282815287602084870101111561078857600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107bd57600080fd5b6107c6846106ab565b925060208401356001600160401b03808211156107e257600080fd5b818601915086601f8301126107f657600080fd5b81358181111561080557600080fd5b87602082850101111561081757600080fd5b6020830194508093505050509250925092565b60005b8381101561084557818101518382015260200161082d565b50506000910152565b6000825161086081846020870161082a565b9190910192915050565b602081526000825180602084015261088981604085016020870161082a565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205d5db908d6bad5bfc298cb89bc49c38963bb1499be9336506651cff965fb333264736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192803, + "numDeployments": 1, + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1713240519, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/ronin-testnet/RoninBridgeManagerLogic.json b/deployments/ronin-testnet/RoninBridgeManagerLogic.json new file mode 100644 index 00000000..37b4ea78 --- /dev/null +++ b/deployments/ronin-testnet/RoninBridgeManagerLogic.json @@ -0,0 +1,2952 @@ +{ + "abi": [ + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addBridgeOperators", + "inputs": [ + { + "name": "voteWeights", + "type": "uint96[]", + "internalType": "uint96[]" + }, + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "castGlobalProposalBySignatures", + "inputs": [ + { + "name": "globalProposal", + "type": "tuple", + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "castProposalBySignatures", + "inputs": [ + { + "name": "proposal", + "type": "tuple", + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "castProposalVoteForCurrentNetwork", + "inputs": [ + { + "name": "proposal", + "type": "tuple", + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "support", + "type": "uint8", + "internalType": "enum Ballot.VoteType" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "checkThreshold", + "inputs": [ + { + "name": "voteWeight", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deleteExpired", + "inputs": [ + { + "name": "_chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_round", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "execute", + "inputs": [ + { + "name": "proposal", + "type": "tuple", + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "executeGlobal", + "inputs": [ + { + "name": "globalProposal", + "type": "tuple", + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getBridgeOperatorWeight", + "inputs": [ + { + "name": "bridgeOperator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "weight", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeOperators", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getCallbackRegisters", + "inputs": [], + "outputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ], + "outputs": [ + { + "name": "contract_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getFullBridgeOperatorInfos", + "inputs": [], + "outputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGlobalProposalSignatures", + "inputs": [ + { + "name": "round_", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "voters", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorOf", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorWeight", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "weight", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorWeights", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOperatorOf", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProposalExpiryDuration", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProposalSignatures", + "inputs": [ + { + "name": "_chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_round", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "_voters", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_supports", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "_signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThreshold", + "inputs": [], + "outputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTotalWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "globalProposalVoted", + "inputs": [ + { + "name": "round_", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "voter", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isBridgeOperator", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumVoteWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proposalVoted", + "inputs": [ + { + "name": "_chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_round", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_voter", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "propose", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "proposeGlobal", + "inputs": [ + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "proposeGlobalProposalStructAndCastVotes", + "inputs": [ + { + "name": "globalProposal", + "type": "tuple", + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "proposeProposalForCurrentNetwork", + "inputs": [ + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "support", + "type": "uint8", + "internalType": "enum Ballot.VoteType" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "proposeProposalStructAndCastVotes", + "inputs": [ + { + "name": "_proposal", + "type": "tuple", + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "_supports", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "_signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "registerCallbacks", + "inputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeBridgeOperators", + "inputs": [ + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "resolveTargets", + "inputs": [ + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + } + ], + "outputs": [ + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "round", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMinRequiredGovernor", + "inputs": [ + { + "name": "min", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setThreshold", + "inputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sumGovernorsWeight", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "sum", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalBridgeOperator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unregisterCallbacks", + "inputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateManyTargetOption", + "inputs": [ + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "vote", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "status", + "type": "uint8", + "internalType": "enum VoteStatusConsumer.VoteStatus" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "againstVoteWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "forVoteWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "BridgeOperatorAddingFailed", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorRemovingFailed", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorUpdated", + "inputs": [ + { + "name": "governor", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fromBridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "toBridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorsAdded", + "inputs": [ + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "voteWeights", + "type": "uint96[]", + "indexed": false, + "internalType": "uint96[]" + }, + { + "name": "governors", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorsRemoved", + "inputs": [ + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CallbackRegistered", + "inputs": [ + { + "name": "", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ContractUpdated", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GlobalProposalCreated", + "inputs": [ + { + "name": "round", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "proposal", + "type": "tuple", + "indexed": false, + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "globalProposalHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "globalProposal", + "type": "tuple", + "indexed": false, + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "creator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MinRequiredGovernorUpdated", + "inputs": [ + { + "name": "min", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Notified", + "inputs": [ + { + "name": "callData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "registers", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "returnDatas", + "type": "bytes[]", + "indexed": false, + "internalType": "bytes[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalApproved", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalCreated", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "round", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "proposal", + "type": "tuple", + "indexed": false, + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "creator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExecuted", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "successCalls", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "returnDatas", + "type": "bytes[]", + "indexed": false, + "internalType": "bytes[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExpired", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExpiryDurationChanged", + "inputs": [ + { + "name": "duration", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalRejected", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalVoted", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "voter", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "support", + "type": "uint8", + "indexed": false, + "internalType": "enum Ballot.VoteType" + }, + { + "name": "weight", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TargetOptionUpdated", + "inputs": [ + { + "name": "targetOption", + "type": "uint8", + "indexed": true, + "internalType": "enum GlobalProposal.TargetOption" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThresholdUpdated", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numerator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "previousNumerator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "previousDenominator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrAlreadyVoted", + "inputs": [ + { + "name": "voter", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrBelowMinRequiredGovernors", + "inputs": [] + }, + { + "type": "error", + "name": "ErrContractTypeNotFound", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ] + }, + { + "type": "error", + "name": "ErrCurrentProposalIsNotCompleted", + "inputs": [] + }, + { + "type": "error", + "name": "ErrDuplicated", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrExistOneInternalCallFailed", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "callData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "ErrGovernorNotFound", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrGovernorNotMatch", + "inputs": [ + { + "name": "required", + "type": "address", + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrInsufficientGas", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidArguments", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidChainId", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidExecutor", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidExpiryTimestamp", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidInput", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidOrder", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidProposal", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidProposalNonce", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidSignatures", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidThreshold", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidVoteWeight", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrLengthMismatch", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrLooseProposalInternallyRevert", + "inputs": [ + { + "name": "callIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "revertMsg", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "ErrOnlySelfCall", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrOperatorNotFound", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrProposalNotApproved", + "inputs": [] + }, + { + "type": "error", + "name": "ErrQueryForEmptyVote", + "inputs": [] + }, + { + "type": "error", + "name": "ErrUnauthorized", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedVoteType", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrVoteIsFinalized", + "inputs": [] + }, + { + "type": "error", + "name": "ErrZeroAddress", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrZeroCodeContract", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "address": "0x64D21e91c2Cb367D2972E0bC377CFEa4e55F3685", + "args": "0x", + "ast": "", + "blockNumber": 26511796, + "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615f2b80620000f46000396000f3fe608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fbc7cf0cc42a480ef3d40d76fe731fb7fad911d9e6f97db06cb768d5fde5e16d64736f6c63430008170033", + "chainId": 2021, + "contractAbsolutePath": "RoninBridgeManager.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fbc7cf0cc42a480ef3d40d76fe731fb7fad911d9e6f97db06cb768d5fde5e16d64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "addBridgeOperators(uint96[],address[],address[])": { + "details": "Adds multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to add.", + "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." + } + }, + "castGlobalProposalBySignatures((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceProposal-_castGlobalProposalBySignatures`." + }, + "castProposalBySignatures((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceProposal-_castProposalBySignatures`." + }, + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8)": { + "details": "Casts vote for a proposal on the current network. Requirements: - The method caller is governor." + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "deleteExpired(uint256,uint256)": { + "details": "Deletes the expired proposal by its chainId and nonce, without creating a new proposal. Requirements: - The proposal is already created." + }, + "execute((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]))": { + "details": "See {CoreGovernance-_executeWithCaller}." + }, + "executeGlobal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]))": { + "details": "See {GlobalCoreGovernance-_executeWithCaller}." + }, + "getBridgeOperatorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific bridge operator.", + "params": { + "bridgeOperator": "The address of the bridge operator to get the vote weight for." + }, + "returns": { + "weight": "The vote weight of the specified bridge operator." + } + }, + "getBridgeOperators()": { + "details": "Returns an array of all bridge operators.", + "returns": { + "_0": "An array containing the addresses of all bridge operators." + } + }, + "getCallbackRegisters()": { + "details": "Retrieves the addresses of registered callbacks.", + "returns": { + "registers": "An array containing the addresses of registered callbacks." + } + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getFullBridgeOperatorInfos()": { + "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", + "returns": { + "bridgeOperators": "An array of addresses representing the registered bridge operators.", + "governors": "An array of addresses representing the governors of each bridge operator.", + "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" + } + }, + "getGlobalProposalSignatures(uint256)": { + "details": "See {CommonGovernanceProposal-_getProposalSignatures}" + }, + "getGovernorOf(address)": { + "details": "Returns the corresponding `governor` of a `operator`." + }, + "getGovernorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific governor.", + "params": { + "governor": "The address of the governor to get the vote weight for." + }, + "returns": { + "weight": "voteWeight The vote weight of the specified governor." + } + }, + "getGovernorWeights(address[])": { + "details": "Returns the weights of a list of governor addresses." + }, + "getGovernors()": { + "details": "Returns an array of all governors.", + "returns": { + "_0": "An array containing the addresses of all governors." + } + }, + "getOperatorOf(address)": { + "details": "Returns the corresponding `operator` of a `governor`." + }, + "getProposalExpiryDuration()": { + "details": "Returns the expiry duration for a new proposal." + }, + "getProposalSignatures(uint256,uint256)": { + "details": "See {CommonGovernanceProposal-_getProposalSignatures}" + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTotalWeight()": { + "details": "Returns total weights." + }, + "globalProposalVoted(uint256,address)": { + "details": "See {CommonGovernanceProposal-_proposalVoted}" + }, + "isBridgeOperator(address)": { + "details": "Checks if the given address is a bridge operator.", + "params": { + "addr": "The address to check." + }, + "returns": { + "_0": "A boolean indicating whether the address is a bridge operator." + } + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "proposalVoted(uint256,uint256,address)": { + "details": "See {CommonGovernanceProposal-_proposalVoted}" + }, + "propose(uint256,uint256,address,address[],uint256[],bytes[],uint256[])": { + "details": "See `CoreGovernance-_proposeProposal`. Requirements: - The method caller is governor." + }, + "proposeGlobal(uint256,address,uint8[],uint256[],bytes[],uint256[])": { + "details": "See `CoreGovernance-_proposeGlobal`. Requirements: - The method caller is governor." + }, + "proposeGlobalProposalStructAndCastVotes((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. Requirements: - The method caller is governor." + }, + "proposeProposalForCurrentNetwork(uint256,address,address[],uint256[],bytes[],uint256[],uint8)": { + "details": "Proposes and casts vote for a proposal on the current network. Requirements: - The method caller is governor. - The proposal is for the current network." + }, + "proposeProposalStructAndCastVotes((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceProposal-_proposeProposalStructAndCastVotes`. Requirements: - The method caller is governor. - The proposal is for the current network." + }, + "registerCallbacks(address[])": { + "details": "Registers multiple callbacks with the bridge.", + "params": { + "registers": "The array of callback addresses to register." + } + }, + "removeBridgeOperators(address[])": { + "details": "Removes multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to remove." + } + }, + "resolveTargets(uint8[])": { + "details": "Returns corresponding address of target options. Return address(0) on non-existent target." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setMinRequiredGovernor(uint256)": { + "details": "Self-call to update the minimum required governor.", + "params": { + "min": "The minimum number, this must not less than 3." + } + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "sumGovernorsWeight(address[])": { + "details": "Returns total weights of the governor list." + }, + "totalBridgeOperator()": { + "details": "Returns the total number of bridge operators.", + "returns": { + "_0": "The total number of bridge operators." + } + }, + "unregisterCallbacks(address[])": { + "details": "Unregisters multiple callbacks from the bridge.", + "params": { + "registers": "The array of callback addresses to unregister." + } + }, + "updateManyTargetOption(uint8[],address[])": { + "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal." + } + }, + "events": { + "BridgeOperatorAddingFailed(address)": { + "details": "Emitted when a bridge operator is failed to add." + }, + "BridgeOperatorRemovingFailed(address)": { + "details": "Emitted when a bridge operator is failed to remove." + }, + "BridgeOperatorUpdated(address,address,address)": { + "details": "Emitted when a bridge operator is updated." + }, + "BridgeOperatorsAdded(bool[],uint96[],address[],address[])": { + "details": "Emitted when new bridge operators are added." + }, + "BridgeOperatorsRemoved(bool[],address[])": { + "details": "Emitted when bridge operators are removed." + }, + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MinRequiredGovernorUpdated(uint256)": { + "details": "Emitted when the minimum number of required governors is updated." + }, + "Notified(bytes,address[],bool[],bytes[])": { + "details": "Emitted when the contract notifies multiple registers with statuses and return data." + }, + "ProposalApproved(bytes32)": { + "details": "Emitted when the proposal is approved" + }, + "ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "ProposalExecuted(bytes32,bool[],bytes[])": { + "details": "Emitted when the proposal is executed" + }, + "ProposalExpired(bytes32)": { + "details": "Emitted when the vote is expired" + }, + "ProposalExpiryDurationChanged(uint256)": { + "details": "Emitted when the proposal expiry duration is changed." + }, + "ProposalRejected(bytes32)": { + "details": "Emitted when the vote is reject" + }, + "ProposalVoted(bytes32,address,uint8,uint256)": { + "details": "Emitted when the proposal is voted" + }, + "TargetOptionUpdated(uint8,address)": { + "details": "Emitted when the target options are updated" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + } + }, + "errors": { + "ErrAlreadyVoted(address)": [ + { + "details": "Error indicating that a voter has already voted.", + "params": { + "voter": "The address of the voter who has already voted." + } + } + ], + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrCurrentProposalIsNotCompleted()": [ + { + "details": "Error thrown when the current proposal is not completed." + } + ], + "ErrDuplicated(bytes4)": [ + { + "details": "Error thrown when a duplicated element is detected in an array.", + "params": { + "msgSig": "The function signature that invoke the error." + } + } + ], + "ErrInsufficientGas(bytes32)": [ + { + "details": "Error thrown when there is insufficient gas to execute a function." + } + ], + "ErrInvalidArguments(bytes4)": [ + { + "details": "Error indicating that arguments are invalid." + } + ], + "ErrInvalidChainId(bytes4,uint256,uint256)": [ + { + "details": "Error indicating that the chain ID is invalid.", + "params": { + "actual": "Current chain ID that executing function.", + "expected": "Expected chain ID required for the tx to success.", + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." + } + } + ], + "ErrInvalidExecutor()": [ + { + "details": "Error of the caller is not the specified executor." + } + ], + "ErrInvalidExpiryTimestamp()": [ + { + "details": "Error thrown when an invalid expiry timestamp is provided." + } + ], + "ErrInvalidOrder(bytes4)": [ + { + "details": "Error indicating that an order is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." + } + } + ], + "ErrInvalidProposal(bytes32,bytes32)": [ + { + "details": "Error thrown when an invalid proposal is encountered.", + "params": { + "actual": "The actual value of the proposal.", + "expected": "The expected value of the proposal." + } + } + ], + "ErrInvalidProposalNonce(bytes4)": [ + { + "details": "Error indicating that the proposal nonce is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid proposal nonce." + } + } + ], + "ErrInvalidSignatures(bytes4)": [ + { + "details": "Error indicating that a signature is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid signature." + } + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidVoteWeight(bytes4)": [ + { + "details": "Error indicating that a vote weight is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." + } + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrLooseProposalInternallyRevert(uint256,bytes)": [ + { + "details": "Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`." + } + ], + "ErrOnlySelfCall(bytes4)": [ + { + "details": "Error indicating that a function can only be called by the contract itself.", + "params": { + "msgSig": "The function signature (bytes4) that can only be called by the contract itself." + } + } + ], + "ErrProposalNotApproved()": [ + { + "details": "Error of proposal is not approved for executing." + } + ], + "ErrQueryForEmptyVote()": [ + { + "details": "Error thrown when querying for an empty vote." + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedInterface(bytes4,address)": [ + { + "details": "The error indicating an unsupported interface.", + "params": { + "addr": "The address where the unsupported interface was encountered.", + "interfaceId": "The bytes4 interface identifier that is not supported." + } + } + ], + "ErrUnsupportedVoteType(bytes4)": [ + { + "details": "Error indicating that a vote type is not supported.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an unsupported vote type." + } + } + ], + "ErrVoteIsFinalized()": [ + { + "details": "Error thrown when attempting to interact with a finalized vote." + } + ], + "ErrZeroAddress(bytes4)": [ + { + "details": "Error indicating that given address is null when it should not." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"ErrAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrBelowMinRequiredGovernors\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCurrentProposalIsNotCompleted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrDuplicated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"name\":\"ErrExistOneInternalCallFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"required\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ErrInsufficientGas\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidExecutor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidExpiryTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"}],\"name\":\"ErrInvalidProposal\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidProposalNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidSignatures\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidVoteWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"callIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"revertMsg\",\"type\":\"bytes\"}],\"name\":\"ErrLooseProposalInternallyRevert\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ErrOperatorNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrProposalNotApproved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForEmptyVote\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrUnsupportedInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnsupportedVoteType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrVoteIsFinalized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorAddingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorRemovingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromBridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toBridgeOperator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"CallbackRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"MinRequiredGovernorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"Notified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"ProposalExpiryDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\",\"name\":\"targetOption\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"TargetOptionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"addBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"castGlobalProposalBySignatures\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"castProposalBySignatures\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"}],\"name\":\"castProposalVoteForCurrentNetwork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"deleteExpired\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"}],\"name\":\"executeGlobal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"getBridgeOperatorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCallbackRegisters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullBridgeOperatorInfos\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"round_\",\"type\":\"uint256\"}],\"name\":\"getGlobalProposalSignatures\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"voters\",\"type\":\"address[]\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getGovernorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getOperatorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProposalExpiryDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getProposalSignatures\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_voters\",\"type\":\"address[]\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"_supports\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"round_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"globalProposalVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isBridgeOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"proposalVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"name\":\"propose\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"name\":\"proposeGlobal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"proposeGlobalProposalStructAndCastVotes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"}],\"name\":\"proposeProposalForCurrentNetwork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"_proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"_supports\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"proposeProposalStructAndCastVotes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"registerCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"removeBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"}],\"name\":\"resolveTargets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"setMinRequiredGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"sumGovernorsWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBridgeOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"unregisterCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateManyTargetOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrAlreadyVoted(address)\":[{\"details\":\"Error indicating that a voter has already voted.\",\"params\":{\"voter\":\"The address of the voter who has already voted.\"}}],\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrCurrentProposalIsNotCompleted()\":[{\"details\":\"Error thrown when the current proposal is not completed.\"}],\"ErrDuplicated(bytes4)\":[{\"details\":\"Error thrown when a duplicated element is detected in an array.\",\"params\":{\"msgSig\":\"The function signature that invoke the error.\"}}],\"ErrInsufficientGas(bytes32)\":[{\"details\":\"Error thrown when there is insufficient gas to execute a function.\"}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidExecutor()\":[{\"details\":\"Error of the caller is not the specified executor.\"}],\"ErrInvalidExpiryTimestamp()\":[{\"details\":\"Error thrown when an invalid expiry timestamp is provided.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidProposal(bytes32,bytes32)\":[{\"details\":\"Error thrown when an invalid proposal is encountered.\",\"params\":{\"actual\":\"The actual value of the proposal.\",\"expected\":\"The expected value of the proposal.\"}}],\"ErrInvalidProposalNonce(bytes4)\":[{\"details\":\"Error indicating that the proposal nonce is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\"}}],\"ErrInvalidSignatures(bytes4)\":[{\"details\":\"Error indicating that a signature is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid signature.\"}}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidVoteWeight(bytes4)\":[{\"details\":\"Error indicating that a vote weight is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid vote weight.\"}}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrLooseProposalInternallyRevert(uint256,bytes)\":[{\"details\":\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\"}],\"ErrOnlySelfCall(bytes4)\":[{\"details\":\"Error indicating that a function can only be called by the contract itself.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that can only be called by the contract itself.\"}}],\"ErrProposalNotApproved()\":[{\"details\":\"Error of proposal is not approved for executing.\"}],\"ErrQueryForEmptyVote()\":[{\"details\":\"Error thrown when querying for an empty vote.\"}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedInterface(bytes4,address)\":[{\"details\":\"The error indicating an unsupported interface.\",\"params\":{\"addr\":\"The address where the unsupported interface was encountered.\",\"interfaceId\":\"The bytes4 interface identifier that is not supported.\"}}],\"ErrUnsupportedVoteType(bytes4)\":[{\"details\":\"Error indicating that a vote type is not supported.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\"}}],\"ErrVoteIsFinalized()\":[{\"details\":\"Error thrown when attempting to interact with a finalized vote.\"}],\"ErrZeroAddress(bytes4)\":[{\"details\":\"Error indicating that given address is null when it should not.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeOperatorAddingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to add.\"},\"BridgeOperatorRemovingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to remove.\"},\"BridgeOperatorUpdated(address,address,address)\":{\"details\":\"Emitted when a bridge operator is updated.\"},\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\":{\"details\":\"Emitted when new bridge operators are added.\"},\"BridgeOperatorsRemoved(bool[],address[])\":{\"details\":\"Emitted when bridge operators are removed.\"},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MinRequiredGovernorUpdated(uint256)\":{\"details\":\"Emitted when the minimum number of required governors is updated.\"},\"Notified(bytes,address[],bool[],bytes[])\":{\"details\":\"Emitted when the contract notifies multiple registers with statuses and return data.\"},\"ProposalApproved(bytes32)\":{\"details\":\"Emitted when the proposal is approved\"},\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"ProposalExecuted(bytes32,bool[],bytes[])\":{\"details\":\"Emitted when the proposal is executed\"},\"ProposalExpired(bytes32)\":{\"details\":\"Emitted when the vote is expired\"},\"ProposalExpiryDurationChanged(uint256)\":{\"details\":\"Emitted when the proposal expiry duration is changed.\"},\"ProposalRejected(bytes32)\":{\"details\":\"Emitted when the vote is reject\"},\"ProposalVoted(bytes32,address,uint8,uint256)\":{\"details\":\"Emitted when the proposal is voted\"},\"TargetOptionUpdated(uint8,address)\":{\"details\":\"Emitted when the target options are updated\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"}},\"kind\":\"dev\",\"methods\":{\"addBridgeOperators(uint96[],address[],address[])\":{\"details\":\"Adds multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to add.\",\"governors\":\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\"}},\"castGlobalProposalBySignatures((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceProposal-_castGlobalProposalBySignatures`.\"},\"castProposalBySignatures((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceProposal-_castProposalBySignatures`.\"},\"castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8)\":{\"details\":\"Casts vote for a proposal on the current network. Requirements: - The method caller is governor.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"deleteExpired(uint256,uint256)\":{\"details\":\"Deletes the expired proposal by its chainId and nonce, without creating a new proposal. Requirements: - The proposal is already created.\"},\"execute((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]))\":{\"details\":\"See {CoreGovernance-_executeWithCaller}.\"},\"executeGlobal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]))\":{\"details\":\"See {GlobalCoreGovernance-_executeWithCaller}.\"},\"getBridgeOperatorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to get the vote weight for.\"},\"returns\":{\"weight\":\"The vote weight of the specified bridge operator.\"}},\"getBridgeOperators()\":{\"details\":\"Returns an array of all bridge operators.\",\"returns\":{\"_0\":\"An array containing the addresses of all bridge operators.\"}},\"getCallbackRegisters()\":{\"details\":\"Retrieves the addresses of registered callbacks.\",\"returns\":{\"registers\":\"An array containing the addresses of registered callbacks.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getFullBridgeOperatorInfos()\":{\"details\":\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\",\"returns\":{\"bridgeOperators\":\"An array of addresses representing the registered bridge operators.\",\"governors\":\"An array of addresses representing the governors of each bridge operator.\",\"weights\":\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\"}},\"getGlobalProposalSignatures(uint256)\":{\"details\":\"See {CommonGovernanceProposal-_getProposalSignatures}\"},\"getGovernorOf(address)\":{\"details\":\"Returns the corresponding `governor` of a `operator`.\"},\"getGovernorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific governor.\",\"params\":{\"governor\":\"The address of the governor to get the vote weight for.\"},\"returns\":{\"weight\":\"voteWeight The vote weight of the specified governor.\"}},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getGovernors()\":{\"details\":\"Returns an array of all governors.\",\"returns\":{\"_0\":\"An array containing the addresses of all governors.\"}},\"getOperatorOf(address)\":{\"details\":\"Returns the corresponding `operator` of a `governor`.\"},\"getProposalExpiryDuration()\":{\"details\":\"Returns the expiry duration for a new proposal.\"},\"getProposalSignatures(uint256,uint256)\":{\"details\":\"See {CommonGovernanceProposal-_getProposalSignatures}\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTotalWeight()\":{\"details\":\"Returns total weights.\"},\"globalProposalVoted(uint256,address)\":{\"details\":\"See {CommonGovernanceProposal-_proposalVoted}\"},\"isBridgeOperator(address)\":{\"details\":\"Checks if the given address is a bridge operator.\",\"params\":{\"addr\":\"The address to check.\"},\"returns\":{\"_0\":\"A boolean indicating whether the address is a bridge operator.\"}},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"proposalVoted(uint256,uint256,address)\":{\"details\":\"See {CommonGovernanceProposal-_proposalVoted}\"},\"propose(uint256,uint256,address,address[],uint256[],bytes[],uint256[])\":{\"details\":\"See `CoreGovernance-_proposeProposal`. Requirements: - The method caller is governor.\"},\"proposeGlobal(uint256,address,uint8[],uint256[],bytes[],uint256[])\":{\"details\":\"See `CoreGovernance-_proposeGlobal`. Requirements: - The method caller is governor.\"},\"proposeGlobalProposalStructAndCastVotes((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. Requirements: - The method caller is governor.\"},\"proposeProposalForCurrentNetwork(uint256,address,address[],uint256[],bytes[],uint256[],uint8)\":{\"details\":\"Proposes and casts vote for a proposal on the current network. Requirements: - The method caller is governor. - The proposal is for the current network.\"},\"proposeProposalStructAndCastVotes((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceProposal-_proposeProposalStructAndCastVotes`. Requirements: - The method caller is governor. - The proposal is for the current network.\"},\"registerCallbacks(address[])\":{\"details\":\"Registers multiple callbacks with the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to register.\"}},\"removeBridgeOperators(address[])\":{\"details\":\"Removes multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to remove.\"}},\"resolveTargets(uint8[])\":{\"details\":\"Returns corresponding address of target options. Return address(0) on non-existent target.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setMinRequiredGovernor(uint256)\":{\"details\":\"Self-call to update the minimum required governor.\",\"params\":{\"min\":\"The minimum number, this must not less than 3.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumGovernorsWeight(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalBridgeOperator()\":{\"details\":\"Returns the total number of bridge operators.\",\"returns\":{\"_0\":\"The total number of bridge operators.\"}},\"unregisterCallbacks(address[])\":{\"details\":\"Unregisters multiple callbacks from the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to unregister.\"}},\"updateManyTargetOption(uint8[],address[])\":{\"details\":\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\"}},\"version\":1},\"userdoc\":{\"errors\":{\"ErrBelowMinRequiredGovernors()\":[{\"notice\":\"Error indicating that the governors list will go below minimum number of required governor.\"}],\"ErrGovernorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying governor\"}],\"ErrGovernorNotMatch(address,address)\":[{\"notice\":\"Error indicating that the msg.sender is not match the required governor\"}],\"ErrInvalidInput()\":[{\"notice\":\"Common invalid input error\"}],\"ErrOperatorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying operator\"}]},\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/RoninBridgeManager.sol\":\"RoninBridgeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\"./BridgeManagerCallbackRegister.sol\\\";\\nimport { IHasContracts, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\n\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { AddressArrayUtils } from \\\"../../libraries/AddressArrayUtils.sol\\\";\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\nimport { RoleAccess } from \\\"../../utils/RoleAccess.sol\\\";\\nimport { TUint256Slot } from \\\"../../types/Types.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"./BridgeManagerQuorum.sol\\\";\\n\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\n using AddressArrayUtils for address[];\\n\\n struct BridgeManagerStorage {\\n /// @notice List of the governors.\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\n address[] _governors;\\n address[] _operators;\\n /// @dev Mapping from address to the governor weight\\n mapping(address governor => uint96 weight) _governorWeight;\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\n mapping(address operator => uint96 weight) _operatorWeight;\\n /// @dev Total weight of all governors / operators.\\n uint256 _totalWeight;\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\n uint256 _minRequiredGovernor;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerStorageLocation\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n bytes32 public DOMAIN_SEPARATOR;\\n\\n modifier onlyGovernor() virtual {\\n _requireGovernor(msg.sender);\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function __BridgeManager_init(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n __BridgeManagerQuorum_init_unchained(num, denom);\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\n }\\n\\n function __BridgeManager_init_unchained(\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n _setContract(ContractType.BRIDGE, bridgeContract);\\n\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,bytes32 salt)\\\"),\\n keccak256(\\\"BridgeManager\\\"), // name hash\\n keccak256(\\\"3\\\"), // version hash\\n keccak256(abi.encode(\\\"BRIDGE_MANAGER\\\", roninChainId)) // salt\\n )\\n );\\n\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n _setMinRequiredGovernor(3);\\n }\\n\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerStorageLocation\\n }\\n }\\n\\n // ===================== CONFIG ========================\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\n _setMinRequiredGovernor(min);\\n }\\n\\n function _setMinRequiredGovernor(uint min) internal {\\n if (min < 3) revert ErrInvalidInput();\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n $._minRequiredGovernor = min;\\n emit MinRequiredGovernorUpdated(min);\\n }\\n\\n /**\\n * @dev Internal function to require that the caller has governor role access.\\n */\\n function _requireGovernor(address addr) internal view {\\n if (_getGovernorWeight(addr) == 0) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\n }\\n }\\n\\n // ===================== WEIGHTS METHOD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getTotalWeight() public view returns (uint256) {\\n return _totalWeight();\\n }\\n\\n function _totalWeight() internal view override returns (uint256) {\\n return _getBridgeManagerStorage()._totalWeight;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\n weights = _getGovernorWeights(governors);\\n }\\n\\n /**\\n * @dev Internal function to get the vote weights of a given array of governors.\\n */\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n weights = new uint96[](governors.length);\\n\\n for (uint256 i; i < governors.length; i++) {\\n weights[i] = $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\n weight = _getGovernorWeight(governor);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\n */\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\n return _getBridgeManagerStorage()._governorWeight[governor];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\n sum = _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\n * @param governors The non-duplicated input.\\n */\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n for (uint256 i; i < governors.length; i++) {\\n sum += $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n return $._operatorWeight[bridgeOperator];\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n (uint256 numerator, uint256 denominator) = getThreshold();\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\n }\\n\\n // ===================== MANAGER CRUD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _removeBridgeOperators(bridgeOperators);\\n }\\n\\n /**\\n * @dev Internal function to add bridge operators.\\n *\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to add bridge operators.\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\n *\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\n */\\n function _addBridgeOperators(\\n uint96[] memory voteWeights,\\n address[] memory newGovernors,\\n address[] memory newOperators\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = newOperators.length;\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\n addeds = new bool[](length);\\n\\n // simply skip add operations if inputs are empty.\\n if (length == 0) return addeds;\\n\\n address iGovernor;\\n address iOperator;\\n uint96 iVoteWeight;\\n uint256 accumulatedWeight;\\n\\n for (uint256 i; i < length; i++) {\\n iGovernor = newGovernors[i];\\n iOperator = newOperators[i];\\n iVoteWeight = voteWeights[i];\\n\\n // Check non-zero inputs\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n\\n // Check not yet added operators\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\n\\n // Only add the valid operator\\n if (addeds[i]) {\\n // Add governor to list, update governor weight\\n $._governors.push(iGovernor);\\n $._governorWeight[iGovernor] = iVoteWeight;\\n\\n // Add operator to list, update governor weight\\n $._operators.push(iOperator);\\n $._operatorWeight[iOperator] = iVoteWeight;\\n\\n accumulatedWeight += iVoteWeight;\\n }\\n }\\n\\n $._totalWeight += accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\n\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\n }\\n\\n /**\\n * @dev Internal function to remove bridge operators.\\n *\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to remove bridge operators.\\n *\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\n */\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = removingOperators.length;\\n removeds = new bool[](length);\\n\\n // simply skip remove operations if inputs are empty.\\n if (length == 0) return removeds;\\n if ($._governors.length - length < $._minRequiredGovernor) {\\n revert ErrBelowMinRequiredGovernors();\\n }\\n\\n address iGovernor;\\n address iOperator;\\n uint256 accumulatedWeight;\\n uint idx;\\n\\n for (uint256 i; i < length; i++) {\\n iOperator = removingOperators[i];\\n\\n // Check non-zero inputs\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n\\n // Check existing operators\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\n\\n // Only remove the valid operator\\n if (removeds[i]) {\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\n\\n // Remove governor from list, update governor weight\\n uint lastIdx = $._governors.length - 1;\\n $._governors[idx] = $._governors[lastIdx];\\n $._governors.pop();\\n delete $._governorWeight[iGovernor];\\n\\n // Remove operator from list, update operator weight\\n $._operators[idx] = $._operators[lastIdx];\\n $._operators.pop();\\n delete $._operatorWeight[iOperator];\\n\\n accumulatedWeight += removingVoteWeight;\\n }\\n }\\n\\n $._totalWeight -= accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\n\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\n }\\n\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\n for (uint i; i < $_array.length; i++) {\\n if (addr == $_array[i]) {\\n return (true, i);\\n }\\n }\\n\\n return (false, type(uint256).max);\\n }\\n\\n // ================= MANAGER VIEW METHODS =============\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function totalBridgeOperator() external view returns (uint256) {\\n return _getBridgeManagerStorage()._operators.length;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function isBridgeOperator(address addr) external view returns (bool) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n return $._operatorWeight[addr] > 0;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperators() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._operators;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernors() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._governors;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getOperatorOf(address governor) external view returns (address operator) {\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\n if (!found) revert ErrGovernorNotFound(governor);\\n\\n return _getBridgeManagerStorage()._operators[idx];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorOf(address operator) external view returns (address governor) {\\n (governor,) = _getGovernorOf(operator);\\n }\\n\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\n if (!found) revert ErrOperatorNotFound(operator);\\n\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n governors = $._governors;\\n bridgeOperators = $._operators;\\n weights = _getGovernorWeights(governors);\\n }\\n}\\n\",\"keccak256\":\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { IBridgeManagerCallbackRegister } from \\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\n\\n/**\\n * @title BridgeManagerCallbackRegister\\n * @dev A contract that manages callback registrations and execution for a bridge.\\n */\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n /**\\n * @dev Storage slot for the address set of callback registers.\\n * @dev Value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\") - 1.\\n */\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\n\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\n _registerCallbacks(callbackRegisters);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\n _registerCallbacks(registers);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n\\n for (uint256 i; i < registers.length; i++) {\\n _callbackRegisters.remove(registers[i]);\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\n registers = _getCallbackRegisters().values();\\n }\\n\\n /**\\n * @dev Internal function to register multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n address register;\\n bool regSuccess;\\n\\n for (uint256 i; i < registers.length; i++) {\\n register = registers[i];\\n\\n _requireHasCode(register);\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\n\\n regSuccess = _callbackRegisters.add(register);\\n\\n emit CallbackRegistered(register, regSuccess);\\n }\\n }\\n\\n /**\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\n */\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\n }\\n }\\n\\n /**\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\n * @param callbackFnSig The function signature of the callback method.\\n * @param inputs The data to pass to the callback method.\\n * @return allSuccess Return true if all internal calls are success\\n */\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\n allSuccess = true;\\n\\n address[] memory registers = _getCallbackRegisters().values();\\n uint256 length = registers.length;\\n if (length == 0) return allSuccess;\\n\\n bool[] memory successes = new bool[](length);\\n bytes[] memory returnDatas = new bytes[](length);\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\n\\n for (uint256 i; i < length; i++) {\\n // First, attempt to call normally\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\n\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\n if (!successes[i]) {\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\n allSuccess = allSuccess && successes[i];\\n }\\n }\\n\\n emit Notified(callData, registers, successes, returnDatas);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the address set of callback registers.\\n * @return callbackRegisters The storage reference to the callback registers.\\n */\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\n assembly (\\\"memory-safe\\\") {\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IQuorum } from \\\"../../interfaces/IQuorum.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\n struct BridgeManagerQuorumStorage {\\n uint256 _nonce;\\n uint256 _numerator;\\n uint256 _denominator;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerQuorumStorage\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\n\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n $._nonce = 1;\\n\\n _setThreshold(num, denom);\\n }\\n\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerQuorumStorage\\n }\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n return ($._numerator, $._denominator);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\n\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n uint256 prevNum = $._numerator;\\n uint256 prevDenom = $._denominator;\\n\\n $._numerator = num;\\n $._denominator = denom;\\n\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\n }\\n\\n function _totalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/CoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"../../libraries/Ballot.sol\\\";\\nimport \\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/SignatureConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\n\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Error thrown when attempting to interact with a finalized vote.\\n */\\n error ErrVoteIsFinalized();\\n\\n /**\\n * @dev Error thrown when the current proposal is not completed.\\n */\\n error ErrCurrentProposalIsNotCompleted();\\n\\n struct ProposalVote {\\n VoteStatus status;\\n bytes32 hash;\\n uint256 againstVoteWeight; // Total weight of against votes\\n uint256 forVoteWeight; // Total weight of for votes\\n address[] forVoteds; // Array of addresses voting for\\n address[] againstVoteds; // Array of addresses voting against\\n uint256 expiryTimestamp;\\n mapping(address => Signature) sig;\\n mapping(address => bool) voted;\\n }\\n\\n /// @dev Emitted when a proposal is created\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\n /// @dev Emitted when the proposal is voted\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\n /// @dev Emitted when the proposal is approved\\n event ProposalApproved(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is reject\\n event ProposalRejected(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is expired\\n event ProposalExpired(bytes32 indexed proposalHash);\\n /// @dev Emitted when the proposal is executed\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\n /// @dev Emitted when the proposal expiry duration is changed.\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\n\\n /// @dev Mapping from chain id => vote round\\n /// @notice chain id = 0 for global proposal\\n mapping(uint256 => uint256) public round;\\n /// @dev Mapping from chain id => vote round => proposal vote\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\n\\n uint256 internal _proposalExpiryDuration;\\n\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\n __CoreGovernance_init_unchained(expiryDuration);\\n }\\n\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\n _setProposalExpiryDuration(expiryDuration);\\n }\\n\\n /**\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\n * if it is expired and not increase the `_round`.\\n */\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\n _round = round[_chainId];\\n // Skip checking for the first ever round\\n if (_round == 0) {\\n _round = round[_chainId] = 1;\\n } else {\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\n if (!_isExpired) {\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\n unchecked {\\n _round = ++round[_chainId];\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\n */\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\n _vote.hash = _proposalHash;\\n _vote.expiryTimestamp = _expiryTimestamp;\\n }\\n\\n /**\\n * @dev Proposes proposal struct.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\n uint256 chainId = proposal.chainId;\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n round_ = _createVotingRound(chainId);\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\n }\\n\\n /**\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the round.\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\n * proposal is approved, executed or rejected.\\n *\\n */\\n function _castVote(\\n Proposal.ProposalDetail memory proposal,\\n Ballot.VoteType support,\\n uint256 minimumForVoteWeight,\\n uint256 minimumAgainstVoteWeight,\\n address voter,\\n Signature memory signature,\\n uint256 voterWeight\\n ) internal virtual returns (bool done) {\\n uint256 chainId = proposal.chainId;\\n uint256 round_ = proposal.nonce;\\n ProposalVote storage _vote = vote[chainId][round_];\\n\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\n return true;\\n }\\n\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\n\\n _vote.voted[voter] = true;\\n // Stores the signature if it is not empty\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\n _vote.sig[voter] = signature;\\n }\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\n\\n uint256 _forVoteWeight;\\n uint256 _againstVoteWeight;\\n if (support == Ballot.VoteType.For) {\\n _vote.forVoteds.push(voter);\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\n } else if (support == Ballot.VoteType.Against) {\\n _vote.againstVoteds.push(voter);\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_forVoteWeight >= minimumForVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n if (proposal.isAutoExecute()) {\\n _tryExecute(_vote, proposal);\\n }\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n }\\n }\\n\\n /**\\n * @dev The specified executor executes the proposal on an approved proposal.\\n */\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\n bytes32 proposalHash = proposal.hash();\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\n\\n if (_vote.hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\n }\\n\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\n\\n _tryExecute(_vote, proposal);\\n }\\n\\n /**\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\n *\\n * Emits the event `ProposalExpired` if the vote is expired.\\n *\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\n * before or it will emit an unexpected event of `ProposalExpired`.\\n */\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\n\\n if (isExpired) {\\n emit ProposalExpired(proposalVote.hash);\\n\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n delete proposalVote.status;\\n delete proposalVote.hash;\\n delete proposalVote.againstVoteWeight;\\n delete proposalVote.forVoteWeight;\\n delete proposalVote.forVoteds;\\n delete proposalVote.againstVoteds;\\n delete proposalVote.expiryTimestamp;\\n }\\n }\\n\\n /**\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\n */\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\n if (proposal.executable()) {\\n vote_.status = VoteStatus.Executed;\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\n }\\n }\\n\\n /**\\n * @dev Sets the expiry duration for a new proposal.\\n */\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\n _proposalExpiryDuration = expiryDuration;\\n emit ProposalExpiryDurationChanged(expiryDuration);\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\n return vote_.voted[voter];\\n }\\n\\n /**\\n * @dev Returns total weight from validators.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns minimum vote to pass a proposal.\\n */\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\n */\\n function _getChainType() internal view virtual returns (ChainType);\\n}\\n\",\"keccak256\":\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"./CoreGovernance.sol\\\";\\n\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\n\\n /// @dev Emitted when a proposal is created\\n event GlobalProposalCreated(\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n bytes32 globalProposalHash,\\n GlobalProposal.GlobalProposalDetail globalProposal,\\n address creator\\n );\\n\\n /// @dev Emitted when the target options are updated\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\n\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\n }\\n\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\n _updateManyTargetOption(targetOptions, addrs);\\n }\\n\\n /**\\n * @dev Proposes for a global proposal.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobal(\\n uint256 expiryTimestamp,\\n GlobalProposal.TargetOption[] calldata targetOptions,\\n address executor,\\n uint256[] memory values,\\n bytes[] memory calldatas,\\n uint256[] memory gasAmounts,\\n address creator\\n ) internal virtual {\\n uint256 round_ = _createVotingRound(0);\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Proposes global proposal struct.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobalStruct(\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\n address creator\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n uint256 round_ = _createVotingRound(0);\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\n\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\n */\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\n }\\n\\n /**\\n * @dev Internal helper of {resolveTargets}.\\n *\\n * @param strict When the param is set to `true`, revert on non-existent target.\\n */\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\n targets = new address[](targetOptions.length);\\n\\n for (uint256 i; i < targetOptions.length; ++i) {\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\n }\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n *\\n * Requirement:\\n * - Only allow self-call through proposal.\\n *\\n */\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\n // HACK: Cannot reuse the existing library due to too deep stack\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n _updateManyTargetOption(targetOptions, targets);\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n */\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\n for (uint256 i; i < targetOptions.length; ++i) {\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\n _updateTargetOption(targetOptions[i], targets[i]);\\n }\\n }\\n\\n /**\\n * @dev Updates `targetOption` to `target`.\\n *\\n * Requirement:\\n * - Emit a `TargetOptionUpdated` event.\\n */\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\n _targetOptionsMap[targetOption] = target;\\n emit TargetOptionUpdated(targetOption, target);\\n }\\n}\\n\",\"keccak256\":\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\n\\nabstract contract CommonGovernanceProposal is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Casts votes by signatures.\\n *\\n * Note: This method does not verify the proposal hash with the vote hash. Please consider checking it before.\\n *\\n */\\n function _castVotesBySignatures(\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 proposalHash\\n ) internal {\\n if (!(_supports.length != 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\n\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\n\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\n\\n address _lastSigner;\\n\\n for (uint256 _i; _i < _signatures.length;) {\\n Signature calldata _sig;\\n address _signer;\\n _sig = _signatures[_i];\\n\\n if (_supports[_i] == Ballot.VoteType.For) {\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\n } else if (_supports[_i] == Ballot.VoteType.Against) {\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\n _lastSigner = _signer;\\n\\n uint256 _weight = _getWeight(_signer);\\n\\n if (_weight == 0) revert ErrInvalidSignatures(msg.sig);\\n\\n if (_castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)) {\\n return;\\n }\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the voted signatures for the proposals.\\n *\\n * Note: The signatures can be empty in case the proposal is voted on the current network.\\n *\\n */\\n function _getProposalSignatures(\\n uint256 _chainId,\\n uint256 _round\\n ) internal view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\n ProposalVote storage _vote = vote[_chainId][_round];\\n\\n uint256 _forLength = _vote.forVoteds.length;\\n uint256 _againstLength = _vote.againstVoteds.length;\\n uint256 _voterLength = _forLength + _againstLength;\\n\\n _supports = new Ballot.VoteType[](_voterLength);\\n _signatures = new Signature[](_voterLength);\\n _voters = new address[](_voterLength);\\n for (uint256 _i; _i < _forLength;) {\\n _supports[_i] = Ballot.VoteType.For;\\n _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]];\\n _voters[_i] = _vote.forVoteds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < _againstLength;) {\\n _supports[_i + _forLength] = Ballot.VoteType.Against;\\n _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]];\\n _voters[_i + _forLength] = _vote.againstVoteds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\n */\\n function _proposalVoted(uint256 _chainId, uint256 _round, address _voter) internal view returns (bool) {\\n return _voted(vote[_chainId][_round], _voter);\\n }\\n\\n /**\\n * @dev Returns the weight of a governor.\\n */\\n function _getWeight(address _governor) internal view virtual returns (uint256);\\n\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\n}\\n\",\"keccak256\":\"0xa7fbe65047096bcf4269cfe42e4529eb9a8bbbf93aff9207edd46b04e9661949\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../libraries/Proposal.sol\\\";\\nimport \\\"../GlobalCoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceProposal.sol\\\";\\n\\nabstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovernanceProposal {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Proposes and casts votes for a global proposal by signatures.\\n */\\n function _proposeGlobalProposalStructAndCastVotes(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures,\\n address creator\\n ) internal returns (Proposal.ProposalDetail memory proposal) {\\n proposal = _proposeGlobalStruct(globalProposal, creator);\\n _castVotesBySignatures(proposal, supports_, signatures, globalProposal.hash());\\n }\\n\\n /**\\n * @dev Casts votes for a global proposal by signatures.\\n */\\n function _castGlobalProposalBySignatures(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) internal {\\n Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\n\\n bytes32 proposalHash = _proposal.hash();\\n if (vote[0][_proposal.nonce].hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, vote[0][_proposal.nonce].hash);\\n }\\n\\n _castVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\n */\\n function getGlobalProposalSignatures(uint256 round_)\\n external\\n view\\n returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures)\\n {\\n return _getProposalSignatures(0, round_);\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\n */\\n function globalProposalVoted(uint256 round_, address voter) external view returns (bool) {\\n return _proposalVoted(0, round_, voter);\\n }\\n}\\n\",\"keccak256\":\"0x3905efdfd61681db17bcc392cf93d6571e94bf752f813eacd2504662241231c8\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceProposal.sol\\\";\\n\\nabstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Proposes a proposal struct and casts votes by signature.\\n */\\n function _proposeProposalStructAndCastVotes(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n address _creator\\n ) internal {\\n _proposeProposalStruct(_proposal, _creator);\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\n }\\n\\n /**\\n * @dev Proposes a proposal struct and casts votes by signature.\\n */\\n function _castProposalBySignatures(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures\\n ) internal {\\n bytes32 _proposalHash = _proposal.hash();\\n\\n if (vote[_proposal.chainId][_proposal.nonce].hash != _proposalHash) {\\n revert ErrInvalidProposal(_proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\n }\\n\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\n }\\n\\n /**\\n * @dev See `castProposalVoteForCurrentNetwork`.\\n */\\n function _castProposalVoteForCurrentNetwork(address _voter, Proposal.ProposalDetail memory _proposal, Ballot.VoteType _support) internal {\\n if (_proposal.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid);\\n\\n bytes32 proposalHash = _proposal.hash();\\n if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\n }\\n\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\n Signature memory _emptySignature;\\n _castVote(_proposal, _support, _minimumForVoteWeight, _minimumAgainstVoteWeight, _voter, _emptySignature, _getWeight(_voter));\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\n */\\n function getProposalSignatures(\\n uint256 _chainId,\\n uint256 _round\\n ) external view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\n return _getProposalSignatures(_chainId, _round);\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\n */\\n function proposalVoted(uint256 _chainId, uint256 _round, address _voter) external view returns (bool) {\\n return _proposalVoted(_chainId, _round, _voter);\\n }\\n}\\n\",\"keccak256\":\"0x820788183e3300ede4a19be84a3d7c991ac579017f78a098b26d1bbebc411ec4\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerCallbackRegister {\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\n\\n event CallbackRegistered(address, bool);\\n /**\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\n */\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\n\\n /**\\n * @dev Retrieves the addresses of registered callbacks.\\n * @return registers An array containing the addresses of registered callbacks.\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers);\\n\\n /**\\n * @dev Registers multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function registerCallbacks(address[] calldata registers) external;\\n\\n /**\\n * @dev Unregisters multiple callbacks from the bridge.\\n * @param registers The array of callback addresses to unregister.\\n */\\n function unregisterCallbacks(address[] calldata registers) external;\\n}\\n\",\"keccak256\":\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/ChainTypeConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface ChainTypeConsumer {\\n enum ChainType {\\n RoninChain,\\n Mainchain\\n }\\n}\\n\",\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/Ballot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\n\\nlibrary Ballot {\\n using ECDSA for bytes32;\\n\\n enum VoteType {\\n For,\\n Against\\n }\\n\\n // keccak256(\\\"Ballot(bytes32 proposalHash,uint8 support)\\\");\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\n\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, BALLOT_TYPEHASH)\\n mstore(add(ptr, 0x20), _proposalHash)\\n mstore(add(ptr, 0x40), _support)\\n digest := keccak256(ptr, 0x60)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\",\"license\":\"MIT\"},\"src/libraries/GlobalProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proposal.sol\\\";\\n\\nlibrary GlobalProposal {\\n /**\\n * @dev Error thrown when attempting to interact with an unsupported target.\\n */\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\n\\n enum TargetOption {\\n BridgeManager, // 0\\n GatewayContract, // 1\\n BridgeReward, // 2\\n BridgeSlash, // 3\\n BridgeTracking, // 4\\n PauseEnforcer // 5\\n\\n }\\n\\n struct GlobalProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n uint256 expiryTimestamp;\\n address executor;\\n TargetOption[] targetOptions;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = self.values;\\n TargetOption[] memory targets = self.targetOptions;\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\n uint256[] memory gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length;) {\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * proposal.nonce,\\n * proposal.expiryTimestamp,\\n * proposal.executor,\\n * targetsHash,\\n * valuesHash,\\n * calldatasHash,\\n * gasAmountsHash\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0x80), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n digest_ := keccak256(ptr, 0x100)\\n }\\n }\\n\\n /**\\n * @dev Converts into the normal proposal.\\n */\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\n detail_.nonce = self.nonce;\\n detail_.chainId = 0;\\n detail_.expiryTimestamp = self.expiryTimestamp;\\n detail_.executor = self.executor;\\n\\n detail_.targets = new address[](self.targetOptions.length);\\n detail_.values = self.values;\\n detail_.calldatas = self.calldatas;\\n detail_.gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\n detail_.targets[i] = targets[i];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\",\"license\":\"MIT\"},\"src/libraries/Proposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary Proposal {\\n /**\\n * @dev Error thrown when there is insufficient gas to execute a function.\\n */\\n error ErrInsufficientGas(bytes32 proposalHash);\\n\\n /**\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\n */\\n error ErrInvalidExpiryTimestamp();\\n\\n /**\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\n */\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\n\\n struct ProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n // Value 0: all chain should run this proposal\\n // Other values: only specific chain has to execute\\n uint256 chainId;\\n uint256 expiryTimestamp;\\n // The address that execute the proposal after the proposal passes.\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\n address executor;\\n address[] targets;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\n\\n /**\\n * @dev Validates the proposal.\\n */\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\n if (\\n !(\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\n && proposal.targets.length == proposal.gasAmounts.length\\n )\\n ) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\n revert ErrInvalidExpiryTimestamp();\\n }\\n }\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = proposal.values;\\n address[] memory targets = proposal.targets;\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length; ++i) {\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\n }\\n\\n // return\\n // keccak256(\\n // abi.encode(\\n // TYPE_HASH,\\n // proposal.nonce,\\n // proposal.chainId,\\n // proposal.expiryTimestamp\\n // proposal.executor\\n // targetsHash,\\n // valuesHash,\\n // calldatasHash,\\n // gasAmountsHash\\n // )\\n // );\\n // /\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0x100), arrayHashed)\\n digest_ := keccak256(ptr, 0x120)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\n */\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\n return proposal.executor == address(0);\\n }\\n\\n /**\\n * @dev Returns whether the proposal is executable for the current chain.\\n *\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\n *\\n */\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\n }\\n\\n /**\\n * @dev Executes the proposal.\\n */\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\n\\n successCalls = new bool[](proposal.targets.length);\\n returnDatas = new bytes[](proposal.targets.length);\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\n\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\n\\n if (!successCalls[i]) {\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\",\"license\":\"MIT\"},\"src/ronin/gateway/RoninBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from \\\"../../extensions/bridge-operator-governance/BridgeManager.sol\\\";\\nimport {\\n Ballot,\\n GlobalProposal,\\n Proposal,\\n CommonGovernanceProposal,\\n GovernanceProposal\\n} from \\\"../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\";\\nimport {\\n CoreGovernance,\\n GlobalCoreGovernance,\\n GlobalGovernanceProposal\\n} from \\\"../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\";\\nimport { VoteStatusConsumer } from \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\ncontract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * CURRENT NETWORK\\n */\\n\\n /**\\n * @dev See `CoreGovernance-_proposeProposal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n *\\n */\\n function propose(\\n uint256 chainId,\\n uint256 expiryTimestamp,\\n address executor,\\n address[] calldata targets,\\n uint256[] calldata values,\\n bytes[] calldata calldatas,\\n uint256[] calldata gasAmounts\\n ) external onlyGovernor {\\n _proposeProposalStruct(\\n Proposal.ProposalDetail({\\n nonce: _createVotingRound(chainId),\\n chainId: chainId,\\n expiryTimestamp: expiryTimestamp,\\n executor: executor,\\n targets: targets,\\n values: values,\\n calldatas: calldatas,\\n gasAmounts: gasAmounts\\n }),\\n msg.sender\\n );\\n }\\n\\n /**\\n * @dev See `GovernanceProposal-_proposeProposalStructAndCastVotes`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n * - The proposal is for the current network.\\n *\\n */\\n function proposeProposalStructAndCastVotes(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures\\n ) external onlyGovernor {\\n _proposeProposalStructAndCastVotes(_proposal, _supports, _signatures, msg.sender);\\n }\\n\\n /**\\n * @dev Proposes and casts vote for a proposal on the current network.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n * - The proposal is for the current network.\\n *\\n */\\n function proposeProposalForCurrentNetwork(\\n uint256 expiryTimestamp,\\n address executor,\\n address[] calldata targets,\\n uint256[] calldata values,\\n bytes[] calldata calldatas,\\n uint256[] calldata gasAmounts,\\n Ballot.VoteType support\\n ) external onlyGovernor {\\n Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({\\n nonce: _createVotingRound(block.chainid),\\n chainId: block.chainid,\\n expiryTimestamp: expiryTimestamp,\\n executor: executor,\\n targets: targets,\\n values: values,\\n calldatas: calldatas,\\n gasAmounts: gasAmounts\\n });\\n _proposeProposalStruct(proposal, msg.sender);\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\n }\\n\\n /**\\n * @dev Casts vote for a proposal on the current network.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n *\\n */\\n function castProposalVoteForCurrentNetwork(Proposal.ProposalDetail calldata proposal, Ballot.VoteType support) external onlyGovernor {\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\n }\\n\\n /**\\n * @dev See `GovernanceProposal-_castProposalBySignatures`.\\n */\\n function castProposalBySignatures(Proposal.ProposalDetail calldata proposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures) external {\\n _castProposalBySignatures(proposal, supports_, signatures);\\n }\\n\\n /**\\n * GLOBAL NETWORK\\n */\\n\\n /**\\n * @dev See `CoreGovernance-_proposeGlobal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n *\\n */\\n function proposeGlobal(\\n uint256 expiryTimestamp,\\n address executor,\\n GlobalProposal.TargetOption[] calldata targetOptions,\\n uint256[] calldata values,\\n bytes[] calldata calldatas,\\n uint256[] calldata gasAmounts\\n ) external onlyGovernor {\\n _proposeGlobal({\\n expiryTimestamp: expiryTimestamp,\\n executor: executor,\\n targetOptions: targetOptions,\\n values: values,\\n calldatas: calldatas,\\n gasAmounts: gasAmounts,\\n creator: msg.sender\\n });\\n }\\n\\n /**\\n * @dev See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n *\\n */\\n function proposeGlobalProposalStructAndCastVotes(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external onlyGovernor {\\n _proposeGlobalProposalStructAndCastVotes({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender });\\n }\\n\\n /**\\n * @dev See `GovernanceProposal-_castGlobalProposalBySignatures`.\\n */\\n function castGlobalProposalBySignatures(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external {\\n _castGlobalProposalBySignatures({ globalProposal: globalProposal, supports_: supports_, signatures: signatures });\\n }\\n\\n /**\\n * COMMON METHODS\\n */\\n\\n /**\\n * @dev See {CoreGovernance-_executeWithCaller}.\\n */\\n function execute(Proposal.ProposalDetail calldata proposal) external {\\n _executeWithCaller(proposal, msg.sender);\\n }\\n\\n /**\\n * @dev See {GlobalCoreGovernance-_executeWithCaller}.\\n */\\n function executeGlobal(GlobalProposal.GlobalProposalDetail calldata globalProposal) external {\\n _executeWithCaller({\\n proposal: globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })),\\n caller: msg.sender\\n });\\n }\\n\\n /**\\n * @dev Deletes the expired proposal by its chainId and nonce, without creating a new proposal.\\n *\\n * Requirements:\\n * - The proposal is already created.\\n *\\n */\\n function deleteExpired(uint256 _chainId, uint256 _round) external {\\n ProposalVote storage _vote = vote[_chainId][_round];\\n if (_vote.hash == 0) revert ErrQueryForEmptyVote();\\n\\n _tryDeleteExpiredVotingRound(_vote);\\n }\\n\\n /**\\n * @dev Returns the expiry duration for a new proposal.\\n */\\n function getProposalExpiryDuration() external view returns (uint256) {\\n return _proposalExpiryDuration;\\n }\\n\\n /**\\n * @dev Internal function to get the chain type of the contract.\\n * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain).\\n */\\n function _getChainType() internal pure override returns (ChainType) {\\n return ChainType.RoninChain;\\n }\\n\\n /**\\n * @dev Internal function to get the total weights of all governors.\\n * @return The total weights of all governors combined.\\n */\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\n return getTotalWeight();\\n }\\n\\n /**\\n * @dev Internal function to get the minimum vote weight required for governance actions.\\n * @return The minimum vote weight required for governance actions.\\n */\\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\\n return minimumVoteWeight();\\n }\\n\\n /**\\n * @dev Internal function to get the vote weight of a specific governor.\\n * @param _governor The address of the governor to get the vote weight for.\\n * @return The vote weight of the specified governor.\\n */\\n function _getWeight(address _governor) internal view virtual override returns (uint256) {\\n return _getGovernorWeight(_governor);\\n }\\n\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\n return DOMAIN_SEPARATOR;\\n }\\n}\\n\",\"keccak256\":\"0x012d5f995b9225da312c6175f03c6f25c6a70168428106bee495108f0ee8ec99\",\"license\":\"MIT\"},\"src/types/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { LibTUint256Slot } from \\\"./operations/LibTUint256Slot.sol\\\";\\n\\ntype TUint256Slot is bytes32;\\n\\nusing {\\n LibTUint256Slot.add,\\n LibTUint256Slot.sub,\\n LibTUint256Slot.mul,\\n LibTUint256Slot.div,\\n LibTUint256Slot.load,\\n LibTUint256Slot.store,\\n LibTUint256Slot.addAssign,\\n LibTUint256Slot.subAssign,\\n LibTUint256Slot.preDecrement,\\n LibTUint256Slot.postDecrement,\\n LibTUint256Slot.preIncrement,\\n LibTUint256Slot.postIncrement\\n} for TUint256Slot global;\\n\",\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\"},\"src/types/operations/LibTUint256Slot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { TUint256Slot } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title LibTUint256Slot\\n * @dev Library for handling unsigned 256-bit integers.\\n */\\nlibrary LibTUint256Slot {\\n /// @dev value is equal to bytes4(keccak256(\\\"Panic(uint256)\\\"))\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\n /// @dev error code for {Arithmetic over/underflow} error\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\n /// @dev error code for {Division or modulo by 0} error\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\n\\n /**\\n * @dev Loads the value of the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @return val The loaded value.\\n */\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\n assembly {\\n val := sload(self)\\n }\\n }\\n\\n /**\\n * @dev Stores a value into the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to be stored.\\n */\\n function store(TUint256Slot self, uint256 other) internal {\\n assembly {\\n sstore(self, other)\\n }\\n }\\n\\n /**\\n * @dev Multiplies the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to multiply by.\\n * @return res The resulting value after multiplication.\\n */\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n if iszero(iszero(storedVal)) {\\n res := mul(storedVal, other)\\n\\n // Overflow check\\n if iszero(eq(other, div(res, storedVal))) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Divides the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to divide by.\\n * @return res The resulting value after division.\\n */\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n // revert if divide by zero\\n if iszero(other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, DIVISION_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n res := div(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction.\\n */\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n\\n // Underflow check\\n if lt(storedVal, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n\\n res := sub(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition.\\n */\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n res := add(storedVal, other)\\n\\n // Overflow check\\n if lt(res, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after incrementing.\\n */\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = addAssign(self, 1);\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\n * @param self The TUint256Slot variable.\\n * @return res The original value before incrementing.\\n */\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res + 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after decrementing.\\n */\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = subAssign(self, 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value before decrementing.\\n */\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res - 1);\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition and storage.\\n */\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = add(self, other));\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction and storage.\\n */\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = sub(self, other));\\n }\\n}\\n\",\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192804, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 58190, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 58193, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 105550, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "DOMAIN_SEPARATOR", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 107599, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "round", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 107607, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "vote", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)107537_storage))" + }, + { + "astId": 107609, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "_proposalExpiryDuration", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 108331, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "_targetOptionsMap", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_enum(TargetOption)112395,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32", + "base": "t_address" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(TargetOption)112395": { + "encoding": "inplace", + "label": "enum GlobalProposal.TargetOption", + "numberOfBytes": "1" + }, + "t_enum(VoteStatus)111339": { + "encoding": "inplace", + "label": "enum VoteStatusConsumer.VoteStatus", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(Signature)111330_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SignatureConsumer.Signature)", + "numberOfBytes": "32", + "value": "t_struct(Signature)111330_storage" + }, + "t_mapping(t_enum(TargetOption)112395,t_address)": { + "encoding": "mapping", + "key": "t_enum(TargetOption)112395", + "label": "mapping(enum GlobalProposal.TargetOption => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)107537_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(ProposalVote)107537_storage)" + }, + "t_mapping(t_uint256,t_struct(ProposalVote)107537_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVote)107537_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(ProposalVote)107537_storage": { + "encoding": "inplace", + "label": "struct CoreGovernance.ProposalVote", + "numberOfBytes": "288", + "members": [ + { + "astId": 107513, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(VoteStatus)111339" + }, + { + "astId": 107515, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "hash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 107517, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "againstVoteWeight", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 107519, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "forVoteWeight", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 107522, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "forVoteds", + "offset": 0, + "slot": "4", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 107525, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "againstVoteds", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 107527, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "expiryTimestamp", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 107532, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "sig", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Signature)111330_storage)" + }, + { + "astId": 107536, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "voted", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ] + }, + "t_struct(Signature)111330_storage": { + "encoding": "inplace", + "label": "struct SignatureConsumer.Signature", + "numberOfBytes": "96", + "members": [ + { + "astId": 111325, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "v", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 111327, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "r", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 111329, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "s", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1713240519, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "round(uint256)": { + "notice": "chain id = 0 for global proposal" + } + }, + "errors": { + "ErrBelowMinRequiredGovernors()": [ + { + "notice": "Error indicating that the governors list will go below minimum number of required governor." + } + ], + "ErrGovernorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying governor" + } + ], + "ErrGovernorNotMatch(address,address)": [ + { + "notice": "Error indicating that the msg.sender is not match the required governor" + } + ], + "ErrInvalidInput()": [ + { + "notice": "Common invalid input error" + } + ], + "ErrOperatorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying operator" + } + ] + } + } +} \ No newline at end of file From 326e1797d52e2dee26117c2a773a8c484a238cb9 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 14:29:37 +0700 Subject: [PATCH 189/305] script: fix total gas of proposal --- .../20240411-helper.s.sol | 2 +- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 70 ++++++++++++------- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 2 +- 3 files changed, 46 insertions(+), 28 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol index 2775424a..4003c57e 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -38,7 +38,7 @@ contract Migration__20240409_Helper is Migration { function _helperVoteForCurrentNetwork(LegacyProposalDetail memory proposal) internal { for (uint i; i < _voters.length - 1; ++i) { vm.broadcast(_voters[i]); - address(_currRoninBridgeManager).call( + address(_currRoninBridgeManager).call{gas: (proposal.targets.length + 1) * 1_000_000 }( abi.encodeWithSignature( "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For ) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index ed4a3b8e..d9f34280 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -62,14 +62,14 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H calldatas[0] = abi.encodeWithSignature("changeAdmin(address)", address(_currRoninBridgeManager)); gasAmounts[0] = 1_000_000; - LegacyProposalDetail memory proposal; - proposal.nonce = roninGA.round(block.chainid) + 1; - proposal.chainId = block.chainid; - proposal.expiryTimestamp = expiredTime; - proposal.targets = targets; - proposal.values = values; - proposal.calldatas = calldatas; - proposal.gasAmounts = gasAmounts; + // LegacyProposalDetail memory proposal; + // proposal.nonce = roninGA.round(block.chainid) + 1; + // proposal.chainId = block.chainid; + // proposal.expiryTimestamp = expiredTime; + // proposal.targets = targets; + // proposal.values = values; + // proposal.calldatas = calldatas; + // proposal.gasAmounts = gasAmounts; address gaGovernor = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; address[] memory gaVoters = new address[](3); @@ -77,28 +77,46 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H gaVoters[1] = 0x06f8Af58F656B507918d91B0B6F8B89bfCC556f9; gaVoters[2] = 0xe1100401454B5f850b09f3b92cE7f071C5F1CEF4; - vm.broadcast(gaGovernor); - address(roninGA).call( - abi.encodeWithSignature( - "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", - // proposal.chainId, - proposal.expiryTimestamp, - proposal.targets, - proposal.values, - proposal.calldatas, - proposal.gasAmounts, - Ballot.VoteType.For - ) - ); - - for (uint i; i < gaVoters.length; ++i) { - vm.broadcast(gaVoters[i]); - address(roninGA).call( + // vm.broadcast(gaGovernor); + // address(roninGA).call( + // abi.encodeWithSignature( + // "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", + // // proposal.chainId, + // proposal.expiryTimestamp, + // proposal.targets, + // proposal.values, + // proposal.calldatas, + // proposal.gasAmounts, + // Ballot.VoteType.For + // ) + // ); + + // for (uint i; i < gaVoters.length; ++i) { + // vm.broadcast(gaVoters[i]); + // address(roninGA).call{gas: 10_000_000}( + // abi.encodeWithSignature( + // "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For + // ) + // ); + // } + + // ((45, 2021, 1714451658 [1.714e9], [0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95], [0], [0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753], [1000000 [1e6]]), 0) + + LegacyProposalDetail memory proposal; + proposal.nonce = 45; + proposal.chainId = 2021; + proposal.expiryTimestamp = 1714451658; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + vm.broadcast(gaVoters[2]); + address(roninGA).call{gas: 10_000_000}( abi.encodeWithSignature( "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For ) ); - } } function _upgradeBridgeRoninchain() private { diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index 6995e701..9af25467 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -189,7 +189,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); vm.broadcast(_governor); - address(_currMainchainBridgeManager).call( + address(_currMainchainBridgeManager).call{gas: (proposal.targets.length + 1) * 1_000_000}( abi.encodeWithSignature( "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures ) From d84a88ca25d77c5d2595ba3c9e9d78b5bce0fbc8 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 14:29:49 +0700 Subject: [PATCH 190/305] chore: add artifacts Ronin side --- .../ronin-testnet/BridgeRewardLogic.json | 880 ++--- .../ronin-testnet/BridgeSlashLogic.json | 792 ++-- .../ronin-testnet/BridgeTrackingLogic.json | 697 ++-- .../RoninGatewayPauseEnforcerLogic.json | 709 ++-- .../ronin-testnet/RoninGatewayV3Logic.json | 3198 +++++++++++++++++ 5 files changed, 4712 insertions(+), 1564 deletions(-) create mode 100644 deployments/ronin-testnet/RoninGatewayV3Logic.json diff --git a/deployments/ronin-testnet/BridgeRewardLogic.json b/deployments/ronin-testnet/BridgeRewardLogic.json index b4444ee1..fd93c487 100644 --- a/deployments/ronin-testnet/BridgeRewardLogic.json +++ b/deployments/ronin-testnet/BridgeRewardLogic.json @@ -1,546 +1,654 @@ { - "address": "0xa316e3dDa5B0DECC0c6528EDE4595831794c089A", "abi": [ { + "type": "constructor", "inputs": [], - "stateMutability": "payable", - "type": "constructor" + "stateMutability": "payable" }, { + "type": "function", + "name": "execSyncRewardAuto", "inputs": [ { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" + "name": "currentPeriod", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ErrContractTypeNotFound", - "type": "error" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "getContract", "inputs": [ { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "uint256", - "name": "currentBalance", - "type": "uint256" - }, + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ], + "outputs": [ { - "internalType": "uint256", - "name": "sendAmount", - "type": "uint256" + "name": "contract_", + "type": "address", + "internalType": "address" } ], - "name": "ErrInsufficientBalance", - "type": "error" + "stateMutability": "view" }, { - "inputs": [ + "type": "function", + "name": "getLatestRewardedPeriod", + "inputs": [], + "outputs": [ { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ErrInvalidArguments", - "type": "error" + "stateMutability": "view" }, { + "type": "function", + "name": "getRewardInfo", "inputs": [ { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" + "name": "operator", + "type": "address", + "internalType": "address" } ], - "name": "ErrLengthMismatch", - "type": "error" + "outputs": [ + { + "name": "rewardInfo", + "type": "tuple", + "internalType": "struct IBridgeRewardEvents.BridgeRewardInfo", + "components": [ + { + "name": "claimed", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "slashed", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" }, { - "inputs": [ + "type": "function", + "name": "getRewardPerPeriod", + "inputs": [], + "outputs": [ { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ErrRecipientRevert", - "type": "error" + "stateMutability": "view" }, { - "inputs": [ + "type": "function", + "name": "getTotalRewardScattered", + "inputs": [], + "outputs": [ { - "internalType": "uint256", - "name": "period", - "type": "uint256" - }, + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTotalRewardToppedUp", + "inputs": [], + "outputs": [ { - "internalType": "uint256", - "name": "latestRewardedPeriod", - "type": "uint256" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ErrSyncTooFarPeriod", - "type": "error" + "stateMutability": "view" }, { + "type": "function", + "name": "initialize", "inputs": [ { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" + "name": "bridgeManagerContract", + "type": "address", + "internalType": "address" }, { - "internalType": "enum RoleAccess", - "name": "expectedRole", - "type": "uint8" + "name": "bridgeTrackingContract", + "type": "address", + "internalType": "address" + }, + { + "name": "bridgeSlashContract", + "type": "address", + "internalType": "address" + }, + { + "name": "validatorSetContract", + "type": "address", + "internalType": "address" + }, + { + "name": "dposGA", + "type": "address", + "internalType": "address" + }, + { + "name": "rewardPerPeriod", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ErrUnauthorized", - "type": "error" + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "initializeREP2", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "initializeV2", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "receiveRON", + "inputs": [], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "setContract", "inputs": [ { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" } ], - "name": "ErrUnauthorizedCall", - "type": "error" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setRewardPerPeriod", "inputs": [ { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "enum ContractType", - "name": "expectedContractType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "actual", - "type": "address" + "name": "rewardPerPeriod", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ErrUnexpectedInternalCall", - "type": "error" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "syncRewardManual", "inputs": [ { - "internalType": "address", - "name": "addr", - "type": "address" + "name": "periodCount", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ErrZeroCodeContract", - "type": "error" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "event", + "name": "BridgeRewardScatterFailed", "inputs": [ { - "indexed": true, - "internalType": "uint256", "name": "period", - "type": "uint256" + "type": "uint256", + "indexed": true, + "internalType": "uint256" }, { - "indexed": false, - "internalType": "address", "name": "operator", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "BridgeRewardScatterFailed", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "BridgeRewardScattered", "inputs": [ { - "indexed": true, - "internalType": "uint256", "name": "period", - "type": "uint256" + "type": "uint256", + "indexed": true, + "internalType": "uint256" }, { - "indexed": false, - "internalType": "address", "name": "operator", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "BridgeRewardScattered", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "BridgeRewardSlashed", "inputs": [ { - "indexed": true, - "internalType": "uint256", "name": "period", - "type": "uint256" + "type": "uint256", + "indexed": true, + "internalType": "uint256" }, { - "indexed": false, - "internalType": "address", "name": "operator", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "BridgeRewardSlashed", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "BridgeRewardSyncTooFarPeriod", "inputs": [ { - "indexed": false, - "internalType": "uint256", "name": "requestingPeriod", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint256", "name": "latestPeriod", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "BridgeRewardSyncTooFarPeriod", - "type": "event" + "anonymous": false }, { - "anonymous": false, - "inputs": [], + "type": "event", "name": "BridgeTrackingIncorrectlyResponded", - "type": "event" + "inputs": [], + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "ContractUpdated", "inputs": [ { - "indexed": true, - "internalType": "enum ContractType", "name": "contractType", - "type": "uint8" + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" }, { - "indexed": true, - "internalType": "address", "name": "addr", - "type": "address" + "type": "address", + "indexed": true, + "internalType": "address" } ], - "name": "ContractUpdated", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "Initialized", "inputs": [ { - "indexed": false, - "internalType": "uint8", "name": "version", - "type": "uint8" + "type": "uint8", + "indexed": false, + "internalType": "uint8" } ], - "name": "Initialized", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "SafeReceived", "inputs": [ { - "indexed": true, - "internalType": "address", "name": "from", - "type": "address" + "type": "address", + "indexed": true, + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "balanceBefore", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "SafeReceived", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "UpdatedRewardPerPeriod", "inputs": [ { - "indexed": false, - "internalType": "uint256", "name": "newRewardPerPeriod", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "UpdatedRewardPerPeriod", - "type": "event" + "anonymous": false }, { + "type": "error", + "name": "ErrContractTypeNotFound", "inputs": [ { - "internalType": "address[]", - "name": "operators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ballots", - "type": "uint256[]" - }, + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ] + }, + { + "type": "error", + "name": "ErrInsufficientBalance", + "inputs": [ { - "internalType": "uint256", - "name": "totalBallot", - "type": "uint256" + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" }, { - "internalType": "uint256", - "name": "totalVote", - "type": "uint256" + "name": "currentBalance", + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", - "name": "period", - "type": "uint256" + "name": "sendAmount", + "type": "uint256", + "internalType": "uint256" } - ], - "name": "execSyncReward", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "error", + "name": "ErrLengthMismatch", "inputs": [ { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "getContract", - "outputs": [ - { - "internalType": "address", - "name": "contract_", - "type": "address" + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" } - ], - "stateMutability": "view", - "type": "function" + ] }, { - "inputs": [], - "name": "getLatestRewardedPeriod", - "outputs": [ + "type": "error", + "name": "ErrPeriodAlreadyRewarded", + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "currentPeriod", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "latestRewardedPeriod", + "type": "uint256", + "internalType": "uint256" } - ], - "stateMutability": "view", - "type": "function" + ] }, { - "inputs": [], - "name": "getRewardPerPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "type": "error", + "name": "ErrPeriodCountIsZero", + "inputs": [] }, { - "inputs": [], - "name": "getTotalRewardScattered", - "outputs": [ + "type": "error", + "name": "ErrPeriodNotHappen", + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "currentPeriod", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "latestRewardedPeriod", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "periodCount", + "type": "uint256", + "internalType": "uint256" } - ], - "stateMutability": "view", - "type": "function" + ] }, { - "inputs": [], - "name": "getTotalRewardToppedUp", - "outputs": [ + "type": "error", + "name": "ErrRecipientRevert", + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" } - ], - "stateMutability": "view", - "type": "function" + ] }, { + "type": "error", + "name": "ErrUnauthorized", "inputs": [ { - "internalType": "address", - "name": "bridgeManagerContract", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeTrackingContract", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeSlashContract", - "type": "address" - }, - { - "internalType": "address", - "name": "validatorSetContract", - "type": "address" + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" }, { - "internalType": "uint256", - "name": "rewardPerPeriod", - "type": "uint256" + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "receiveRON", - "outputs": [], - "stateMutability": "payable", - "type": "function" + ] }, { + "type": "error", + "name": "ErrUnauthorizedCall", "inputs": [ { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "addr", - "type": "address" + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" } - ], - "name": "setContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "error", + "name": "ErrUnexpectedInternalCall", "inputs": [ { - "internalType": "uint256", - "name": "rewardPerPeriod", - "type": "uint256" + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedContractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" } - ], - "name": "setRewardPerPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "error", + "name": "ErrZeroCodeContract", "inputs": [ { - "internalType": "uint256", - "name": "periodLength", - "type": "uint256" + "name": "addr", + "type": "address", + "internalType": "address" } - ], - "name": "syncReward", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] } ], - "transactionHash": "0xf985a1be2d3637e7f2da38c0eab96f9ebb6d6ff9304f75a8ce7117923851ce16", - "receipt": { - "to": null, - "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "contractAddress": "0xa316e3dDa5B0DECC0c6528EDE4595831794c089A", - "transactionIndex": 0, - "gasUsed": "1327882", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000020000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0ff9f4cab517d5ab51842e2e2ddce73b86900c2b50e2e5a8ad869d8505de5e99", - "transactionHash": "0xf985a1be2d3637e7f2da38c0eab96f9ebb6d6ff9304f75a8ce7117923851ce16", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 19060073, - "transactionHash": "0xf985a1be2d3637e7f2da38c0eab96f9ebb6d6ff9304f75a8ce7117923851ce16", - "address": "0xa316e3dDa5B0DECC0c6528EDE4595831794c089A", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 0, - "blockHash": "0x0ff9f4cab517d5ab51842e2e2ddce73b86900c2b50e2e5a8ad869d8505de5e99" - } - ], - "blockNumber": 19060073, - "cumulativeGasUsed": "1327882", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 2, - "solcInputHash": "28b4851e3868f34350c9d7d76cba2b15", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"currentBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sendAmount\",\"type\":\"uint256\"}],\"name\":\"ErrInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrRecipientRevert\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestRewardedPeriod\",\"type\":\"uint256\"}],\"name\":\"ErrSyncTooFarPeriod\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnauthorizedCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BridgeRewardScatterFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BridgeRewardScattered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BridgeRewardSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestingPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"latestPeriod\",\"type\":\"uint256\"}],\"name\":\"BridgeRewardSyncTooFarPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"BridgeTrackingIncorrectlyResponded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceBefore\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SafeReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newRewardPerPeriod\",\"type\":\"uint256\"}],\"name\":\"UpdatedRewardPerPeriod\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ballots\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"totalBallot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalVote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"}],\"name\":\"execSyncReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestRewardedPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardPerPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalRewardScattered\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalRewardToppedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeTrackingContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeSlashContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"validatorSetContract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rewardPerPeriod\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveRON\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rewardPerPeriod\",\"type\":\"uint256\"}],\"name\":\"setRewardPerPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"periodLength\",\"type\":\"uint256\"}],\"name\":\"syncReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrInsufficientBalance(bytes4,uint256,uint256)\":[{\"details\":\"Error of sender has insufficient balance.\"}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrRecipientRevert(bytes4)\":[{\"details\":\"Error of recipient not accepting RON when transfer RON.\"}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnauthorizedCall(bytes4)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"kind\":\"dev\",\"methods\":{\"execSyncReward(address[],uint256[],uint256,uint256,uint256)\":{\"details\":\"Invoke calculate and transfer reward to operators based on their performance. Requirements: - This method is only called once each period. - The caller must be the bridge tracking contract or a bridge operator.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getLatestRewardedPeriod()\":{\"details\":\"External function to retrieve the latest rewarded period in the contract.\",\"returns\":{\"_0\":\"latestRewardedPeriod The latest rewarded period value.\"}},\"getRewardPerPeriod()\":{\"details\":\"Getter for all bridge operators per period.\"},\"getTotalRewardScattered()\":{\"details\":\"Retrieve the total amount of rewards that have been scattered to bridge operators in the contract.\",\"returns\":{\"_0\":\"totalRewardScattered The total rewards scattered value.\"}},\"getTotalRewardToppedUp()\":{\"details\":\"Retrieve the total amount of rewards that have been topped up in the contract.\",\"returns\":{\"_0\":\"totalRewardToppedUp The total rewards topped up value.\"}},\"receiveRON()\":{\"details\":\"Receives RON from any address.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setRewardPerPeriod(uint256)\":{\"details\":\"Setter for all bridge operators per period.\"},\"syncReward(uint256)\":{\"details\":\"This function allows bridge operators to manually synchronize the reward for a given period length.\",\"params\":{\"periodLength\":\"The length of the reward period for which synchronization is requested.\"}}},\"stateVariables\":{\"LATEST_REWARDED_PERIOD_SLOT\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.latestRewardedPeriod.slot\\\") - 1\"},\"REWARD_INFO_SLOT\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.rewardInfo.slot\\\") - 1\"},\"REWARD_PER_PERIOD_SLOT\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.rewardPerPeriod.slot\\\") - 1\"},\"TOTAL_REWARDS_SCATTERED_SLOT\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.totalRewardScattered.slot\\\") - 1\"},\"TOTAL_REWARDS_TOPPED_UP_SLOT\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.totalRewardToppedUp.slot\\\") - 1\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ronin/gateway/BridgeReward.sol\":\"BridgeReward\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/extensions/RONTransferHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nabstract contract RONTransferHelper {\\n /// @dev Error of sender has insufficient balance.\\n error ErrInsufficientBalance(bytes4 msgSig, uint256 currentBalance, uint256 sendAmount);\\n /// @dev Error of recipient not accepting RON when transfer RON.\\n error ErrRecipientRevert(bytes4 msgSig);\\n\\n /**\\n * @dev See `_sendRON`.\\n * Reverts if the recipient does not receive RON.\\n */\\n function _transferRON(address payable recipient, uint256 amount) internal {\\n if (!_sendRON(recipient, amount)) revert ErrRecipientRevert(msg.sig);\\n }\\n\\n /**\\n * @dev Send `amount` RON to the address `recipient`.\\n * Returns whether the recipient receives RON or not.\\n * Reverts once the contract balance is insufficient.\\n *\\n * Note: consider using `ReentrancyGuard` before calling this function.\\n *\\n */\\n function _sendRON(address payable recipient, uint256 amount) internal returns (bool success) {\\n if (address(this).balance < amount) revert ErrInsufficientBalance(msg.sig, address(this).balance, amount);\\n return _unsafeSendRON(recipient, amount);\\n }\\n\\n /**\\n * @dev Unsafe send `amount` RON to the address `recipient`. If the sender's balance is insufficient,\\n * the call does not revert.\\n *\\n * Note:\\n * - Does not assert whether the balance of sender is sufficient.\\n * - Does not assert whether the recipient accepts RON.\\n * - Consider using `ReentrancyGuard` before calling this function.\\n *\\n */\\n function _unsafeSendRON(address payable recipient, uint256 amount) internal returns (bool success) {\\n (success, ) = recipient.call{ value: amount }(\\\"\\\");\\n }\\n\\n /**\\n * @dev Same purpose with {_unsafeSendRONLimitGas(address,uin256)} but containing gas limit stipend forwarded in the call.\\n */\\n function _unsafeSendRONLimitGas(\\n address payable recipient,\\n uint256 amount,\\n uint256 gas\\n ) internal returns (bool success) {\\n (success, ) = recipient.call{ value: amount, gas: gas }(\\\"\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdece837caa8da00fe031b8139ada009330b8bef149af12b535913c021ab94d0e\",\"license\":\"MIT\"},\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\"},\"contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nabstract contract BridgeTrackingHelper {\\n /// @dev Event emited when the bridge tracking contract tracks the invalid data, cause malform in sharing bridge reward.\\n event BridgeTrackingIncorrectlyResponded();\\n\\n /**\\n * @dev Internal function to validate the bridge tracking response for a given set of ballots.\\n * @param totalBallot The total number of ballots available for the tracking response.\\n * @param totalVote The total number of votes recorded in the tracking response.\\n * @param ballots An array containing the individual ballot counts in the tracking response.\\n * @return valid A boolean indicating whether the bridge tracking response is valid or not.\\n * @notice The function checks if each individual ballot count is not greater than the total votes recorded.\\n * @notice It also verifies that the sum of all individual ballot counts does not exceed the total available ballots.\\n */\\n function _isValidBridgeTrackingResponse(\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256[] memory ballots\\n ) internal pure returns (bool valid) {\\n valid = true;\\n uint256 sumBallot;\\n uint256 length = ballots.length;\\n\\n unchecked {\\n for (uint256 i; i < length; ++i) {\\n if (ballots[i] > totalVote) {\\n valid = false;\\n break;\\n }\\n\\n sumBallot += ballots[i];\\n }\\n }\\n\\n valid = valid && (sumBallot <= totalBallot);\\n }\\n}\\n\",\"keccak256\":\"0x2da3d7c4b8d48228761b48c79beb04a55065d24a3469a16043b00c45873844e5\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n _requireAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireAdmin() internal view {\\n if (msg.sender != _getAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0x06e5962713a77abf6d5ba646e1cc1cfb6f9c50e7d52520dd82a10bf309534187\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperators() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos()\\n external\\n view\\n returns (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeights() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns an array of bridge operators correspoding to governor addresses.\\n * @return bridgeOperators_ An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_);\\n\\n /**\\n * @dev Retrieves the governors corresponding to a given array of bridge operators.\\n * This external function allows external callers to obtain the governors associated with a given array of bridge operators.\\n * The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.\\n * @param bridgeOperators An array of bridge operator addresses for which governors are to be retrieved.\\n * @return governors An array of addresses representing the governors corresponding to the provided bridge operators.\\n */\\n function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the vote weights of multiple bridge operators.\\n * @param bridgeOperators An array containing the addresses of bridge operators to get the vote weights for.\\n * @return weights An array of vote weights corresponding to the provided bridge operators.\\n */\\n function getBridgeOperatorWeights(\\n address[] calldata bridgeOperators\\n ) external view returns (uint256[] memory weights);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint256 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint256[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n * @return addeds An array of booleans indicating whether each bridge operator was added successfully.\\n *\\n * Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators(\\n * voteWeights,\\n * governors,\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]);\\n * const filteredWeights = weights.filter((_, index) => addeds[index]);\\n * const filteredGovernors = governors.filter((_, index) => addeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function addBridgeOperators(\\n uint96[] calldata voteWeights,\\n address[] calldata governors,\\n address[] calldata bridgeOperators\\n ) external returns (bool[] memory addeds);\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n * @return removeds An array of booleans indicating whether each bridge operator was removed successfully.\\n *\\n * * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators(\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds);\\n\\n /**\\n * @dev Governor updates their corresponding governor and/or operator address.\\n * Requirements:\\n * - The caller must the governor of the operator that is requested changes.\\n * @param bridgeOperator The address of the bridge operator to update.\\n */\\n function updateBridgeOperator(address bridgeOperator) external;\\n}\\n\",\"keccak256\":\"0xf3d02d806105015a62ddccd43fb46ba2ebd760cdc70839fa0a9c870f6abca5c0\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeReward.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { IBridgeRewardEvents } from \\\"./events/IBridgeRewardEvents.sol\\\";\\n\\ninterface IBridgeReward is IBridgeRewardEvents {\\n /**\\n * @dev This function allows bridge operators to manually synchronize the reward for a given period length.\\n * @param periodLength The length of the reward period for which synchronization is requested.\\n */\\n function syncReward(uint256 periodLength) external;\\n\\n /**\\n * @dev Receives RON from any address.\\n */\\n function receiveRON() external payable;\\n\\n /**\\n * @dev Invoke calculate and transfer reward to operators based on their performance.\\n *\\n * Requirements:\\n * - This method is only called once each period.\\n * - The caller must be the bridge tracking contract or a bridge operator.\\n */\\n function execSyncReward(\\n address[] calldata operators,\\n uint256[] calldata ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) external;\\n\\n /**\\n * @dev Retrieve the total amount of rewards that have been topped up in the contract.\\n * @return totalRewardToppedUp The total rewards topped up value.\\n */\\n function getTotalRewardToppedUp() external view returns (uint256);\\n\\n /**\\n * @dev Retrieve the total amount of rewards that have been scattered to bridge operators in the contract.\\n * @return totalRewardScattered The total rewards scattered value.\\n */\\n function getTotalRewardScattered() external view returns (uint256);\\n\\n /**\\n * @dev Getter for all bridge operators per period.\\n */\\n function getRewardPerPeriod() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the latest rewarded period in the contract.\\n * @return latestRewardedPeriod The latest rewarded period value.\\n */\\n function getLatestRewardedPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Setter for all bridge operators per period.\\n */\\n function setRewardPerPeriod(uint256 rewardPerPeriod) external;\\n}\\n\",\"keccak256\":\"0x781f5b4e9257231f008457d41b277058fe6a2b7366ecd3d64bce2591d0eaa216\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeSlash.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeSlashEvents } from \\\"./events/IBridgeSlashEvents.sol\\\";\\n\\n/**\\n * @title IBridgeSlash\\n * @dev Interface for the BridgeSlash contract to manage slashing functionality for bridge operators.\\n */\\ninterface IBridgeSlash is IBridgeSlashEvents {\\n /**\\n * @dev Slashes the unavailability of bridge operators during a specific period.\\n * @param period The period to slash the bridge operators for.\\n */\\n function execSlashBridgeOperators(\\n address[] calldata operators,\\n uint256[] calldata ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) external returns (bool slashed);\\n\\n /**\\n * @dev Returns the penalize durations for the specified bridge operators.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @return untilPeriods The penalized periods for the bridge operators.\\n */\\n function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external returns (uint256[] memory untilPeriods);\\n\\n /**\\n * @dev Retrieves the added periods of the specified bridge operators.\\n * @param bridgeOperators An array of bridge operator addresses.\\n * @return addedPeriods An array of uint256 values representing the added periods for each bridge operator.\\n */\\n function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods);\\n\\n /**\\n * @dev Gets the slash tier based on the given ballot and total ballots.\\n * @param ballot The ballot count for a bridge operator.\\n * @param totalVote The total vote count for the period.\\n * @return tier The slash tier.\\n */\\n function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier);\\n\\n /**\\n * @dev Retrieve the penalty durations for different slash tiers.\\n * @return penaltyDurations The array of penalty durations for each slash tier.\\n */\\n function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 1 slashing.\\n * @return The duration in period number for Tier 1 slashing.\\n */\\n function TIER_1_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 2 slashing.\\n * @return The duration in period number for Tier 2 slashing.\\n */\\n function TIER_2_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the threshold duration for removing bridge operators.\\n * @return The duration in period number that exceeds which a bridge operator will be removed.\\n */\\n function REMOVE_DURATION_THRESHOLD() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the value of the minimum vote threshold to execute slashing rule.\\n * @return minimumVoteThreshold The minimum vote threshold value.\\n */\\n function MINIMUM_VOTE_THRESHOLD() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x45f7a50e6f2e25d9d1ac8abf0eafd1b7579d625245b9269840d42a476745e735\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeTracking {\\n struct Request {\\n VoteKind kind;\\n uint256 id;\\n }\\n\\n enum VoteKind {\\n Deposit,\\n Withdrawal,\\n MainchainWithdrawal\\n }\\n\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\n\\n /**\\n * @dev Returns the block that allow incomming mutable call.\\n */\\n function startedAtBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of votes at the specific period `_period`.\\n */\\n function totalVote(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots at the specific period `_period`.\\n */\\n function totalBallot(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\n */\\n function getManyTotalBallots(\\n uint256 _period,\\n address[] calldata _bridgeOperators\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\n */\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\n\\n /**\\n * @dev Handles the request once it is approved.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\n\\n /**\\n * @dev Records vote for a receipt and a operator.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\n}\\n\",\"keccak256\":\"0x092841025351341cf7ff9cbf0eb6ef78752ffd2b1af329cb6048996d20c789a9\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev The structure representing information about a bridge operator.\\n * @param addr The address of the bridge operator.\\n * @param voteWeight The vote weight assigned to the bridge operator.\\n */\\n struct BridgeOperatorInfo {\\n address addr;\\n uint96 voteWeight;\\n }\\n\\n /**\\n * @dev Emitted when new bridge operators are added.\\n * @param statuses The array of boolean values represents whether the corresponding bridge operator is added successfully.\\n * @param voteWeights The array of vote weights assigned to the added bridge operators.\\n * @param governors The array of addresses representing the governors associated with the added bridge operators.\\n * @param bridgeOperators The array of addresses representing the added bridge operators.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n * @param statuses The array of boolean values representing the statuses of the removed bridge operators.\\n * @param bridgeOperators The array of addresses representing the removed bridge operators.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n * @param governor The address of the governor initiating the update.\\n * @param fromBridgeOperator The address of the bridge operator being updated.\\n * @param toBridgeOperator The updated address of the bridge operator.\\n */\\n event BridgeOperatorUpdated(\\n address indexed governor,\\n address indexed fromBridgeOperator,\\n address indexed toBridgeOperator\\n );\\n}\\n\",\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeRewardEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeRewardEvents {\\n /**\\n * @dev Reward-related information for a bridge operator.\\n * @param claimed The amount of rewards claimed by the bridge operator.\\n * @param slashed The amount of rewards that have been slashed from the bridge operator.\\n */\\n struct BridgeRewardInfo {\\n uint256 claimed;\\n uint256 slashed;\\n }\\n\\n /**\\n * @dev Emitted when RON are safely received as rewards in the contract.\\n * @param from The address of the sender who transferred RON tokens as rewards.\\n * @param balanceBefore The balance of the contract before receiving the RON tokens.\\n * @param amount The amount of RON received.\\n */\\n event SafeReceived(address indexed from, uint256 balanceBefore, uint256 amount);\\n /// @dev Event emitted when the reward per period config is updated.\\n event UpdatedRewardPerPeriod(uint256 newRewardPerPeriod);\\n /// @dev Event emitted when the reward of the `operator` is scattered with `amount`.\\n event BridgeRewardScattered(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the reward of the `operator` is slashed with `amount`.\\n event BridgeRewardSlashed(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the reward of the `operator` is scattered with `amount` but failed to transfer.\\n event BridgeRewardScatterFailed(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the requesting period to sync is too far.\\n event BridgeRewardSyncTooFarPeriod(uint256 requestingPeriod, uint256 latestPeriod);\\n}\\n\",\"keccak256\":\"0xf0efa7130ba933552a16b7fb4040f23e276a41d8d698f27b11c3f82930916e51\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeSlashEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeSlashEvents {\\n /**\\n * @dev Enumeration representing the slashing tiers for bridge operators.\\n */\\n enum Tier {\\n Tier0,\\n Tier1,\\n Tier2\\n }\\n\\n /**\\n * @dev Struct representing the status of a bridge operator.\\n */\\n struct BridgeSlashInfo {\\n uint128 slashUntilPeriod;\\n uint128 newlyAddedAtPeriod;\\n }\\n\\n /**\\n * @dev Event emitted when a bridge operator is slashed.\\n * @param tier The slash tier of the operator.\\n * @param bridgeOperator The address of the slashed bridge operator.\\n * @param period The period in which the operator is slashed.\\n * @param slashUntilPeriod The period until which the operator is penalized.\\n */\\n event Slashed(Tier indexed tier, address indexed bridgeOperator, uint256 indexed period, uint256 slashUntilPeriod);\\n\\n /**\\n * @dev Emitted when a removal request is made for a bridge operator.\\n * @param period The period for which the removal request is made.\\n * @param bridgeOperator The address of the bridge operator being requested for removal.\\n */\\n event RemovalRequested(uint256 indexed period, address indexed bridgeOperator);\\n}\\n\",\"keccak256\":\"0x9611e0d8b85b50bdd8ba9e8148564af526e78ccce5d202e7c84043d2d2ccb75f\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ICandidateManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ICandidateManager {\\n struct ValidatorCandidate {\\n // Admin of the candidate\\n address admin;\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address that receives mining reward of the validator\\n address payable treasuryAddr;\\n // Address of the bridge operator corresponding to the candidate\\n address ______deprecatedbridgeOperatorAddr;\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\n // Values in range [0; 100_00] stands for 0-100%\\n uint256 commissionRate;\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\n uint256 revokingTimestamp;\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\n uint256 topupDeadline;\\n }\\n\\n struct CommissionSchedule {\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\n uint256 effectiveTimestamp;\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\n uint256 commissionRate;\\n }\\n\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\n /// @dev Emitted when the validator candidate is granted.\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\n /// @dev Emitted when the validator candidate is revoked.\\n event CandidatesRevoked(address[] consensusAddrs);\\n\\n /// @dev Emitted when a schedule for updating commission rate is set.\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\n /// @dev Emitted when the commission rate of a validator is updated.\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\n\\n /// @dev Error of exceeding maximum number of candidates.\\n error ErrExceedsMaxNumberOfCandidate();\\n /// @dev Error of querying for already existent candidate.\\n error ErrExistentCandidate();\\n /// @dev Error of querying for non-existent candidate.\\n error ErrNonExistentCandidate();\\n /// @dev Error of candidate admin already exists.\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\n /// @dev Error of treasury already exists.\\n error ErrExistentTreasury(address _treasuryAddr);\\n /// @dev Error of invalid commission rate.\\n error ErrInvalidCommissionRate();\\n /// @dev Error of invalid effective days onwards.\\n error ErrInvalidEffectiveDaysOnwards();\\n /// @dev Error of invalid min effective days onwards.\\n error ErrInvalidMinEffectiveDaysOnwards();\\n /// @dev Error of already requested revoking candidate before.\\n error ErrAlreadyRequestedRevokingCandidate();\\n /// @dev Error of commission change schedule exists.\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\n /// @dev Error of trusted org cannot renounce.\\n error ErrTrustedOrgCannotRenounce();\\n\\n /**\\n * @dev Returns the maximum number of validator candidate.\\n */\\n function maxValidatorCandidate() external view returns (uint256);\\n\\n /**\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\n */\\n function minEffectiveDaysOnwards() external view returns (uint256);\\n\\n /**\\n * @dev Sets the maximum number of validator candidate.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MaxValidatorCandidateUpdated` event.\\n *\\n */\\n function setMaxValidatorCandidate(uint256) external;\\n\\n /**\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\n *\\n */\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\n\\n /**\\n * @dev Grants a validator candidate.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateGranted`.\\n *\\n */\\n function execApplyValidatorCandidate(\\n address _admin,\\n address _consensusAddr,\\n address payable _treasuryAddr,\\n uint256 _commissionRate\\n ) external;\\n\\n /**\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\n *\\n */\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\n\\n /**\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\n *\\n * Requirements:\\n * - The method caller is the staking contract.\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\n * - The `_rate` must be in range of [0_00; 100_00].\\n *\\n * Emits the event `CommissionRateUpdateScheduled`.\\n *\\n */\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\n\\n /**\\n * @dev Returns whether the address is a validator (candidate).\\n */\\n function isValidatorCandidate(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns the validator candidate.\\n */\\n function getValidatorCandidates() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns all candidate info.\\n */\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\n\\n /**\\n * @dev Returns the info of a candidate.\\n */\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\n\\n /**\\n * @dev Returns whether the address is the candidate admin.\\n */\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\n\\n /**\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\n */\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\n}\\n\",\"keccak256\":\"0x9ab205c736f1bcc9a3debe06e08d829f4857141d940e6f608236f136193a7f49\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ICoinbaseExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ISlashingExecution.sol\\\";\\n\\ninterface ICoinbaseExecution is ISlashingExecution {\\n enum BlockRewardDeprecatedType {\\n UNKNOWN,\\n UNAVAILABILITY,\\n AFTER_BAILOUT\\n }\\n\\n /// @dev Emitted when the validator set is updated\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated.\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\n\\n /// @dev Emitted when the reward of the block producer is deprecated.\\n event BlockRewardDeprecated(\\n address indexed coinbaseAddr,\\n uint256 rewardAmount,\\n BlockRewardDeprecatedType deprecatedType\\n );\\n /// @dev Emitted when the block reward is submitted.\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\n\\n /// @dev Emitted when the block producer reward is distributed.\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\n event MiningRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the bridge operator reward is distributed.\\n event BridgeOperatorRewardDistributed(\\n address indexed consensusAddr,\\n address indexed bridgeOperator,\\n address indexed recipientAddr,\\n uint256 amount\\n );\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\n event BridgeOperatorRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed bridgeOperator,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\n event StakingRewardDistributionFailed(\\n uint256 totalAmount,\\n address[] consensusAddrs,\\n uint256[] amounts,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the epoch is wrapped up.\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\n\\n /// @dev Error of method caller must be coinbase\\n error ErrCallerMustBeCoinbase();\\n /// @dev Error of only allowed at the end of epoch\\n error ErrAtEndOfEpochOnly();\\n /// @dev Error of query for already wrapped up epoch\\n error ErrAlreadyWrappedEpoch();\\n\\n /**\\n * @dev Submits reward of the current block.\\n *\\n * Requirements:\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\n *\\n */\\n function submitBlockReward() external payable;\\n\\n /**\\n * @dev Wraps up the current epoch.\\n *\\n * Requirements:\\n * - The method must be called when the current epoch is ending.\\n * - The epoch is not wrapped yet.\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\n * Emits the event `WrappedUpEpoch`.\\n *\\n */\\n function wrapUpEpoch() external payable;\\n}\\n\",\"keccak256\":\"0xe4060b7e3b04a0043bd334011fe4ba67c990b0484dad52d7f14b35040989b6ab\",\"license\":\"MIT\"},\"contracts/interfaces/validator/IEmergencyExit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IEmergencyExit {\\n /// @dev Emitted when the fund is locked from an emergency exit request\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\n event EmergencyExitLockedFundReleased(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 unlockedAmount\\n );\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\n event EmergencyExitLockedFundReleasingFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 unlockedAmount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the emergency exit locked amount is updated.\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\n /// @dev Emitted when the emergency expiry duration is updated.\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\n\\n /// @dev Error of already requested emergency exit before.\\n error ErrAlreadyRequestedEmergencyExit();\\n\\n /**\\n * @dev Returns the amount of RON to lock from a consensus address.\\n */\\n function emergencyExitLockedAmount() external returns (uint256);\\n\\n /**\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\n */\\n function emergencyExpiryDuration() external returns (uint256);\\n\\n /**\\n * @dev Sets the amount of RON to lock from a consensus address.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\n *\\n */\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\n\\n /**\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\n *\\n */\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\n\\n /**\\n * @dev Unlocks fund for emergency exit request.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\n *\\n */\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\n\\n /**\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n */\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\n}\\n\",\"keccak256\":\"0x45161abd1e3db83052a06889a0e3a7a5e7ee3306478601d58ac4ed32ccaa75ad\",\"license\":\"MIT\"},\"contracts/interfaces/validator/IRoninValidatorSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ICandidateManager.sol\\\";\\nimport \\\"./info-fragments/ICommonInfo.sol\\\";\\nimport \\\"./ICoinbaseExecution.sol\\\";\\nimport \\\"./ISlashingExecution.sol\\\";\\nimport \\\"./IEmergencyExit.sol\\\";\\n\\ninterface IRoninValidatorSet is\\n ICandidateManager,\\n ICommonInfo,\\n ISlashingExecution,\\n ICoinbaseExecution,\\n IEmergencyExit\\n{}\\n\",\"keccak256\":\"0x813f34747aea4dfb53bbc147abf8dbe5999ce73111c2db99bcb3efb4cf75bb3d\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ISlashingExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ISlashingExecution {\\n /// @dev Emitted when the validator is punished.\\n event ValidatorPunished(\\n address indexed consensusAddr,\\n uint256 indexed period,\\n uint256 jailedUntil,\\n uint256 deductedStakingAmount,\\n bool blockProducerRewardDeprecated,\\n bool bridgeOperatorRewardDeprecated\\n );\\n /// @dev Emitted when the validator get out of jail by bailout.\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\n\\n /// @dev Error of cannot bailout due to high tier slash.\\n error ErrCannotBailout(address validator);\\n\\n /**\\n * @dev Finalize the slash request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorPunished`.\\n *\\n */\\n function execSlash(\\n address _validatorAddr,\\n uint256 _newJailedUntil,\\n uint256 _slashAmount,\\n bool _cannotBailout\\n ) external;\\n\\n /**\\n * @dev Finalize the bailout request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorUnjailed`.\\n *\\n */\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\n}\\n\",\"keccak256\":\"0x80362c42fdc0ee06543a2abbffee961fe51c15a7c5e18933a9c34897e50d07fe\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/ICommonInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IJailingInfo.sol\\\";\\nimport \\\"./ITimingInfo.sol\\\";\\nimport \\\"./IValidatorInfoV2.sol\\\";\\n\\ninterface ICommonInfo is ITimingInfo, IJailingInfo, IValidatorInfoV2 {\\n struct EmergencyExitInfo {\\n uint256 lockedAmount;\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\n uint256 recyclingAt;\\n }\\n\\n /// @dev Emitted when the deprecated reward is withdrawn.\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\n\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\n error ErrUnauthorizedReceiveRON();\\n /// @dev Error thrown when queries for a non existent info.\\n error NonExistentRecyclingInfo();\\n\\n /**\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\n */\\n function totalDeprecatedReward() external view returns (uint256);\\n\\n /**\\n * @dev Returns the emergency exit request.\\n */\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\n}\\n\",\"keccak256\":\"0x3fdfa86da33b889e5153075ffc028d6b0c607480a96b532fbbbc48ac7bbf27c9\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/IJailingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IJailingInfo {\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkJailed(address) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeft(\\n address _addr\\n ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\n */\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeftAtBlock(\\n address _addr,\\n uint256 _blockNum\\n ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\n */\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\n */\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2b1846b05ca1d636299fb929c1bd7b392b236f5e3f7aa3e7eea2c6d57b8836fb\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/ITimingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ITimingInfo {\\n /**\\n * @dev Returns the block that validator set was updated.\\n */\\n function getLastUpdatedBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the number of blocks in a epoch.\\n */\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\n\\n /**\\n * @dev Returns the epoch index from the block number.\\n */\\n function epochOf(uint256 _block) external view returns (uint256);\\n\\n /**\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\n */\\n function epochEndingAt(uint256 _block) external view returns (bool);\\n\\n /**\\n * @dev Tries to get the period index from the epoch number.\\n */\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\n\\n /**\\n * @dev Returns whether the period ending at the current block number.\\n */\\n function isPeriodEnding() external view returns (bool);\\n\\n /**\\n * @dev Returns the period index from the current block.\\n */\\n function currentPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the block number that the current period starts at.\\n */\\n function currentPeriodStartAtBlock() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/IValidatorInfoV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"../../../libraries/EnumFlags.sol\\\";\\n\\ninterface IValidatorInfoV2 {\\n /**\\n * @dev Error thrown when an invalid maximum prioritized validator number is provided.\\n */\\n error ErrInvalidMaxPrioritizedValidatorNumber();\\n\\n /// @dev Emitted when the number of max validator is updated.\\n event MaxValidatorNumberUpdated(uint256);\\n /// @dev Emitted when the number of reserved slots for prioritized validators is updated.\\n event MaxPrioritizedValidatorNumberUpdated(uint256);\\n\\n /**\\n * @dev Returns the maximum number of validators in the epoch.\\n */\\n function maxValidatorNumber() external view returns (uint256 _maximumValidatorNumber);\\n\\n /**\\n * @dev Returns the number of reserved slots for prioritized validators.\\n */\\n function maxPrioritizedValidatorNumber() external view returns (uint256 _maximumPrioritizedValidatorNumber);\\n\\n /**\\n * @dev Returns the current validator list.\\n */\\n function getValidators() external view returns (address[] memory _validatorList);\\n\\n /**\\n * @dev Returns the current block producer list.\\n */\\n function getBlockProducers() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns whether the address is block producer or not.\\n */\\n function isBlockProducer(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns total numbers of the block producers.\\n */\\n function totalBlockProducers() external view returns (uint256);\\n\\n /**\\n * @dev Updates the max validator number\\n *\\n * Requirements:\\n * - The method caller is admin\\n *\\n * Emits the event `MaxValidatorNumberUpdated`\\n *\\n */\\n function setMaxValidatorNumber(uint256 _maxValidatorNumber) external;\\n\\n /**\\n * @dev Updates the number of reserved slots for prioritized validators\\n *\\n * Requirements:\\n * - The method caller is admin\\n *\\n * Emits the event `MaxPrioritizedValidatorNumberUpdated`\\n *\\n */\\n function setMaxPrioritizedValidatorNumber(uint256 _maxPrioritizedValidatorNumber) external;\\n}\\n\",\"keccak256\":\"0x6213c188a1323b242a098394b91caf9481e257bd57a0804cb2aa890377a993ed\",\"license\":\"MIT\"},\"contracts/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA; ) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB; ) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\"},\"contracts/libraries/EnumFlags.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This library implements checking flag of an enumerated value.\\n * The originated idea is inherited from [Enum.HashFlag(Enum)](https://learn.microsoft.com/en-us/dotnet/api/system.enum.hasflag?view=net-6.0) method of C#.\\n */\\nlibrary EnumFlags {\\n enum ValidatorFlag {\\n None, // bit(00)\\n BlockProducer, // bit(01)\\n DeprecatedBridgeOperator, // bit(10)\\n Both // bit(11)\\n }\\n\\n function isNone(ValidatorFlag _value) internal pure returns (bool) {\\n return uint8(_value) == 0;\\n }\\n\\n /**\\n * @dev Checks if `_value` has `_flag`.\\n */\\n function hasFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (bool) {\\n return (uint8(_value) & uint8(_flag)) != 0;\\n }\\n\\n /**\\n * @dev Calculate new value of `_value` after adding `_flag`.\\n */\\n function addFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\\n return ValidatorFlag(uint8(_value) | uint8(_flag));\\n }\\n\\n /**\\n * @dev Calculate new value of `_value` after remove `_flag`.\\n */\\n function removeFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\\n return ValidatorFlag(uint8(_value) & ~uint8(_flag));\\n }\\n}\\n\",\"keccak256\":\"0xa712f0d1a323ee39f23eb3ee3278b4ec25fe2e536b1ccc629578c66f277c088d\",\"license\":\"UNLICENSED\"},\"contracts/libraries/Math.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary Math {\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns whether the number `c` is in range of [a; b].\\n */\\n function inRange(uint256 c, uint256 a, uint256 b) internal pure returns (bool) {\\n return a <= c && c <= b;\\n }\\n\\n /**\\n * @dev Returns whether two inclusive ranges [x1;x2] and [y1;y2] overlap.\\n */\\n function twoRangeOverlap(uint256 x1, uint256 x2, uint256 y1, uint256 y2) internal pure returns (bool) {\\n return x1 <= y2 && y1 <= x2;\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 upperbound) internal pure returns (uint256) {\\n return min(a + b, upperbound);\\n }\\n\\n /**\\n * @dev Returns value of a - b; in case of negative result, 0 is returned.\\n */\\n function subNonNegative(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a - b : 0;\\n }\\n\\n /**\\n * @dev Returns value of `a + zeroable` if zerobale is not 0; otherwise, return 0.\\n */\\n function addIfNonZero(uint256 a, uint256 zeroable) internal pure returns (uint256) {\\n return zeroable != 0 ? a + zeroable : 0;\\n }\\n}\\n\",\"keccak256\":\"0xd73170f448c644a47024c7dbcf4afc3cc7ad27f61737c6ea4c3b543ec5cdb7e9\",\"license\":\"UNLICENSED\"},\"contracts/ronin/gateway/BridgeReward.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { BridgeTrackingHelper } from \\\"../../extensions/bridge-operator-governance/BridgeTrackingHelper.sol\\\";\\nimport { ContractType, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { RONTransferHelper } from \\\"../../extensions/RONTransferHelper.sol\\\";\\nimport { IRoninValidatorSet } from \\\"../../interfaces/validator/IRoninValidatorSet.sol\\\";\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeTracking } from \\\"../../interfaces/bridge/IBridgeTracking.sol\\\";\\nimport { IBridgeReward } from \\\"../../interfaces/bridge/IBridgeReward.sol\\\";\\nimport { IBridgeSlash } from \\\"../../interfaces/bridge/IBridgeSlash.sol\\\";\\nimport { Math } from \\\"../../libraries/Math.sol\\\";\\nimport { TUint256Slot } from \\\"../../types/Types.sol\\\";\\nimport { ErrSyncTooFarPeriod, ErrInvalidArguments, ErrLengthMismatch, ErrUnauthorizedCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\ncontract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONTransferHelper, Initializable {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.rewardInfo.slot\\\") - 1\\n bytes32 private constant REWARD_INFO_SLOT = 0x518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a;\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.rewardPerPeriod.slot\\\") - 1\\n TUint256Slot private constant REWARD_PER_PERIOD_SLOT =\\n TUint256Slot.wrap(0x90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910);\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.latestRewardedPeriod.slot\\\") - 1\\n TUint256Slot private constant LATEST_REWARDED_PERIOD_SLOT =\\n TUint256Slot.wrap(0x2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619);\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.totalRewardToppedUp.slot\\\") - 1\\n TUint256Slot private constant TOTAL_REWARDS_TOPPED_UP_SLOT =\\n TUint256Slot.wrap(0x9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c64);\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.totalRewardScattered.slot\\\") - 1\\n TUint256Slot private constant TOTAL_REWARDS_SCATTERED_SLOT =\\n TUint256Slot.wrap(0x3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f4);\\n\\n address private immutable _self;\\n\\n constructor() payable {\\n _self = address(this);\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address bridgeManagerContract,\\n address bridgeTrackingContract,\\n address bridgeSlashContract,\\n address validatorSetContract,\\n uint256 rewardPerPeriod\\n ) external payable initializer {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n _setContract(ContractType.BRIDGE_TRACKING, bridgeTrackingContract);\\n _setContract(ContractType.BRIDGE_SLASH, bridgeSlashContract);\\n _setContract(ContractType.VALIDATOR, validatorSetContract);\\n _setRewardPerPeriod(rewardPerPeriod);\\n _syncLatestRewardedPeriod();\\n _receiveRON();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function receiveRON() external payable {\\n _receiveRON();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function syncReward(uint256 periodLength) external {\\n if (!_isBridgeOperator(msg.sender)) revert ErrUnauthorizedCall(msg.sig);\\n\\n uint256 latestRewardedPeriod = getLatestRewardedPeriod();\\n uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n\\n if (currentPeriod <= latestRewardedPeriod) revert ErrInvalidArguments(msg.sig);\\n if (latestRewardedPeriod + periodLength > currentPeriod) revert ErrInvalidArguments(msg.sig);\\n\\n LATEST_REWARDED_PERIOD_SLOT.addAssign(periodLength);\\n\\n address[] memory operators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators();\\n IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\n\\n for (uint256 i = 1; i <= periodLength; ) {\\n unchecked {\\n _syncReward({\\n operators: operators,\\n ballots: bridgeTrackingContract.getManyTotalBallots(latestRewardedPeriod, operators),\\n totalBallot: bridgeTrackingContract.totalBallot(latestRewardedPeriod),\\n totalVote: bridgeTrackingContract.totalVote(latestRewardedPeriod),\\n period: latestRewardedPeriod += i\\n });\\n\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function execSyncReward(\\n address[] calldata operators,\\n uint256[] calldata ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) external onlyContract(ContractType.BRIDGE_TRACKING) {\\n if (operators.length != ballots.length) revert ErrLengthMismatch(msg.sig);\\n if (operators.length == 0) return;\\n\\n // Only sync the period that is after the latest rewarded period.\\n unchecked {\\n uint256 latestRewardedPeriod = getLatestRewardedPeriod();\\n if (period < latestRewardedPeriod + 1) revert ErrInvalidArguments(msg.sig);\\n else if (period > latestRewardedPeriod + 1) revert ErrSyncTooFarPeriod(period, latestRewardedPeriod);\\n }\\n LATEST_REWARDED_PERIOD_SLOT.store(period);\\n\\n _syncReward({\\n operators: operators,\\n ballots: ballots,\\n totalBallot: totalBallot,\\n totalVote: totalVote,\\n period: period\\n });\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getTotalRewardToppedUp() external view returns (uint256) {\\n return TOTAL_REWARDS_TOPPED_UP_SLOT.load();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getTotalRewardScattered() external view returns (uint256) {\\n return TOTAL_REWARDS_SCATTERED_SLOT.load();\\n }\\n\\n /**\\n * @dev Internal function to receive RON tokens as rewards and update the total topped-up rewards amount.\\n */\\n function _receiveRON() internal {\\n // prevent transfer RON directly to logic contract\\n if (address(this) == _self) revert ErrUnauthorizedCall(msg.sig);\\n\\n emit SafeReceived(msg.sender, TOTAL_REWARDS_TOPPED_UP_SLOT.load(), msg.value);\\n TOTAL_REWARDS_TOPPED_UP_SLOT.addAssign(msg.value);\\n }\\n\\n /**\\n * @dev Internal function to synchronize and distribute rewards to bridge operators for a given period.\\n * @param operators An array containing the addresses of bridge operators to receive rewards.\\n * @param ballots An array containing the individual ballot counts for each bridge operator.\\n * @param totalBallot The total number of available ballots for the period.\\n * @param totalVote The total number of votes recorded for the period.\\n * @param period The period for which the rewards are being synchronized.\\n */\\n function _syncReward(\\n address[] memory operators,\\n uint256[] memory ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) internal {\\n uint256 numBridgeOperators = operators.length;\\n uint256 rewardPerPeriod = getRewardPerPeriod();\\n uint256[] memory slashedDurationList = _getSlashInfo(operators);\\n // Validate should share the reward equally\\n bool shouldShareEqually = _shouldShareEqually(totalBallot, totalVote, ballots);\\n\\n uint256 reward;\\n bool shouldSlash;\\n uint256 sumRewards;\\n\\n for (uint256 i; i < numBridgeOperators; ) {\\n (reward, shouldSlash) = _calcRewardAndCheckSlashedStatus({\\n shouldShareEqually: shouldShareEqually,\\n numBridgeOperators: numBridgeOperators,\\n rewardPerPeriod: rewardPerPeriod,\\n ballot: ballots[i],\\n totalBallot: totalBallot,\\n period: period,\\n slashUntilPeriod: slashedDurationList[i]\\n });\\n\\n sumRewards += shouldSlash ? 0 : reward;\\n _updateRewardAndTransfer({ period: period, operator: operators[i], reward: reward, shouldSlash: shouldSlash });\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n TOTAL_REWARDS_SCATTERED_SLOT.addAssign(sumRewards);\\n }\\n\\n /**\\n * @dev Internal function to synchronize the latest rewarded period based on the current period of the validator set contract.\\n * @notice This function is used internally to synchronize the latest rewarded period with the current period of the validator set contract.\\n * @notice The `currentPeriod` of the validator set contract is retrieved and stored in the `LATEST_REWARDED_PERIOD_SLOT`.\\n * @notice This function ensures that the latest rewarded period is updated to reflect the current period in the validator set contract.\\n */\\n function _syncLatestRewardedPeriod() internal {\\n LATEST_REWARDED_PERIOD_SLOT.store(IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod());\\n }\\n\\n /**\\n * @dev Returns whether should share the reward equally, in case of bridge tracking returns\\n * informed data or there is no ballot in a day.\\n *\\n * Emit a {BridgeTrackingIncorrectlyResponded} event when in case of incorrect data.\\n */\\n function _shouldShareEqually(\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256[] memory ballots\\n ) internal returns (bool shareEqually) {\\n bool valid = _isValidBridgeTrackingResponse(totalBallot, totalVote, ballots);\\n if (!valid) {\\n emit BridgeTrackingIncorrectlyResponded();\\n }\\n\\n return !valid || totalBallot == 0;\\n }\\n\\n /**\\n * @dev Internal function to calculate the reward for a bridge operator and check its slashing status.\\n * @param shouldShareEqually A boolean indicating whether the reward should be shared equally among bridge operators.\\n * @param numBridgeOperators The total number of bridge operators for proportional reward calculation.\\n * @param rewardPerPeriod The total reward available for the period.\\n * @param ballot The individual ballot count of the bridge operator for the period.\\n * @param totalBallot The total number of available ballots for the period.\\n * @param period The period for which the reward is being calculated.\\n * @param slashUntilPeriod The period until which slashing is effective for the bridge operator.\\n * @return reward The calculated reward for the bridge operator.\\n * @return shouldSlash A boolean indicating whether the bridge operator should be slashed for the current period.\\n */\\n function _calcRewardAndCheckSlashedStatus(\\n bool shouldShareEqually,\\n uint256 numBridgeOperators,\\n uint256 rewardPerPeriod,\\n uint256 ballot,\\n uint256 totalBallot,\\n uint256 period,\\n uint256 slashUntilPeriod\\n ) internal pure returns (uint256 reward, bool shouldSlash) {\\n shouldSlash = _shouldSlashedThisPeriod(period, slashUntilPeriod);\\n reward = _calcReward(shouldShareEqually, numBridgeOperators, rewardPerPeriod, ballot, totalBallot);\\n }\\n\\n /**\\n * @dev Internal function to check if a specific period should be considered as slashed based on the slash duration.\\n * @param period The period to check if it should be slashed.\\n * @param slashDuration The duration until which periods should be considered as slashed.\\n * @return shouldSlashed A boolean indicating whether the specified period should be slashed.\\n * @notice This function is used internally to determine if a particular period should be marked as slashed based on the slash duration.\\n */\\n function _shouldSlashedThisPeriod(uint256 period, uint256 slashDuration) internal pure returns (bool) {\\n return period <= slashDuration;\\n }\\n\\n /**\\n * @dev Internal function to calculate the reward for a bridge operator based on the provided parameters.\\n * @param shouldShareEqually A boolean indicating whether the reward should be shared equally among bridge operators.\\n * @param numBridgeOperators The total number of bridge operators for proportional reward calculation.\\n * @param rewardPerPeriod The total reward available for the period.\\n * @param ballot The individual ballot count of the bridge operator for the period.\\n * @param totalBallot The total number of available ballots for the period.\\n * @return reward The calculated reward for the bridge operator.\\n */\\n function _calcReward(\\n bool shouldShareEqually,\\n uint256 numBridgeOperators,\\n uint256 rewardPerPeriod,\\n uint256 ballot,\\n uint256 totalBallot\\n ) internal pure returns (uint256 reward) {\\n // Shares equally in case the bridge has nothing to vote or bridge tracking response is incorrect\\n // Else shares the bridge operators reward proportionally\\n reward = shouldShareEqually ? rewardPerPeriod / numBridgeOperators : (rewardPerPeriod * ballot) / totalBallot;\\n }\\n\\n /**\\n * @dev Transfer `reward` to a `operator` or only emit event based on the operator `slashed` status.\\n */\\n function _updateRewardAndTransfer(uint256 period, address operator, uint256 reward, bool shouldSlash) private {\\n BridgeRewardInfo storage _iRewardInfo = _getRewardInfo()[operator];\\n\\n if (shouldSlash) {\\n _iRewardInfo.slashed += reward;\\n emit BridgeRewardSlashed(period, operator, reward);\\n } else {\\n _iRewardInfo.claimed += reward;\\n if (_unsafeSendRONLimitGas({ recipient: payable(operator), amount: reward, gas: 0 })) {\\n emit BridgeRewardScattered(period, operator, reward);\\n } else {\\n emit BridgeRewardScatterFailed(period, operator, reward);\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getRewardPerPeriod() public view returns (uint256) {\\n return REWARD_PER_PERIOD_SLOT.load();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getLatestRewardedPeriod() public view returns (uint256) {\\n return LATEST_REWARDED_PERIOD_SLOT.load();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function setRewardPerPeriod(uint256 rewardPerPeriod) external onlyContract(ContractType.BRIDGE_MANAGER) {\\n _setRewardPerPeriod(rewardPerPeriod);\\n }\\n\\n /**\\n * @dev Internal function for setting the total reward per period.\\n * Emit an {UpdatedRewardPerPeriod} event after set.\\n */\\n function _setRewardPerPeriod(uint256 rewardPerPeriod) internal {\\n REWARD_PER_PERIOD_SLOT.store(rewardPerPeriod);\\n emit UpdatedRewardPerPeriod(rewardPerPeriod);\\n }\\n\\n /**\\n * @dev Internal helper for querying slash info of a list of operators.\\n */\\n function _getSlashInfo(address[] memory operatorList) internal returns (uint256[] memory _slashedDuration) {\\n return IBridgeSlash(getContract(ContractType.BRIDGE_SLASH)).getSlashUntilPeriodOf(operatorList);\\n }\\n\\n /**\\n * @dev Internal helper for querying whether an address is an operator.\\n */\\n function _isBridgeOperator(address operator) internal view returns (bool) {\\n return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).isBridgeOperator(operator);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping from bridge operator => BridgeRewardInfo.\\n * @return rewardInfo the mapping from bridge operator => BridgeRewardInfo.\\n */\\n function _getRewardInfo() internal pure returns (mapping(address => BridgeRewardInfo) storage rewardInfo) {\\n assembly (\\\"memory-safe\\\") {\\n rewardInfo.slot := REWARD_INFO_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17c3330680c3f6c5c6f94b21105ebebb5d2871f6d7e5aabc7b455e90b8206f8a\",\"license\":\"MIT\"},\"contracts/types/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { LibTUint256Slot } from \\\"./operations/LibTUint256Slot.sol\\\";\\n\\ntype TUint256Slot is bytes32;\\n\\nusing {\\n LibTUint256Slot.add,\\n LibTUint256Slot.sub,\\n LibTUint256Slot.mul,\\n LibTUint256Slot.div,\\n LibTUint256Slot.load,\\n LibTUint256Slot.store,\\n LibTUint256Slot.addAssign,\\n LibTUint256Slot.subAssign,\\n LibTUint256Slot.preDecrement,\\n LibTUint256Slot.postDecrement,\\n LibTUint256Slot.preIncrement,\\n LibTUint256Slot.postIncrement\\n} for TUint256Slot global;\\n\",\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\"},\"contracts/types/operations/LibTUint256Slot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { TUint256Slot } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title LibTUint256Slot\\n * @dev Library for handling unsigned 256-bit integers.\\n */\\nlibrary LibTUint256Slot {\\n /// @dev value is equal to bytes4(keccak256(\\\"Panic(uint256)\\\"))\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\n /// @dev error code for {Arithmetic over/underflow} error\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\n /// @dev error code for {Division or modulo by 0} error\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\n\\n /**\\n * @dev Loads the value of the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @return val The loaded value.\\n */\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\n assembly {\\n val := sload(self)\\n }\\n }\\n\\n /**\\n * @dev Stores a value into the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to be stored.\\n */\\n function store(TUint256Slot self, uint256 other) internal {\\n assembly {\\n sstore(self, other)\\n }\\n }\\n\\n /**\\n * @dev Multiplies the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to multiply by.\\n * @return res The resulting value after multiplication.\\n */\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n if iszero(iszero(storedVal)) {\\n res := mul(storedVal, other)\\n\\n // Overflow check\\n if iszero(eq(other, div(res, storedVal))) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Divides the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to divide by.\\n * @return res The resulting value after division.\\n */\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n // revert if divide by zero\\n if iszero(other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, DIVISION_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n res := div(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction.\\n */\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n\\n // Underflow check\\n if lt(storedVal, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n\\n res := sub(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition.\\n */\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n res := add(storedVal, other)\\n\\n // Overflow check\\n if lt(res, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after incrementing.\\n */\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = addAssign(self, 1);\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\n * @param self The TUint256Slot variable.\\n * @return res The original value before incrementing.\\n */\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res + 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after decrementing.\\n */\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = subAssign(self, 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value before decrementing.\\n */\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res - 1);\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition and storage.\\n */\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = add(self, other));\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction and storage.\\n */\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = sub(self, other));\\n }\\n}\\n\",\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\"},\"contracts/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\",\"keccak256\":\"0x3914292a405307cba9e93085edcaf5f1203ca2d55abf998bf1d2af1e86f5a4c6\",\"license\":\"MIT\"},\"contracts/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n /* 0 */ UNKNOWN,\\n /* 1 */ PAUSE_ENFORCER,\\n /* 2 */ BRIDGE,\\n /* 3 */ BRIDGE_TRACKING,\\n /* 4 */ GOVERNANCE_ADMIN,\\n /* 5 */ MAINTENANCE,\\n /* 6 */ SLASH_INDICATOR,\\n /* 7 */ STAKING_VESTING,\\n /* 8 */ VALIDATOR,\\n /* 9 */ STAKING,\\n /* 10 */ RONIN_TRUSTED_ORGANIZATION,\\n /* 11 */ BRIDGE_MANAGER,\\n /* 12 */ BRIDGE_SLASH,\\n /* 13 */ BRIDGE_REWARD\\n}\\n\",\"keccak256\":\"0xf72feff9afafcb5cadc1b05c6e0b998ea5d66c7ece57c3e482e560d0a1bb4079\",\"license\":\"MIT\"},\"contracts/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(\\n abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams))\\n );\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x2d0dfcef3636945bc1785c1fa5a05f5203c79cbb81b2eee92a3ac6a2378c2ce5\",\"license\":\"MIT\"},\"contracts/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n /* 0 */ UNKNOWN,\\n /* 1 */ ADMIN,\\n /* 2 */ COINBASE,\\n /* 3 */ GOVERNOR,\\n /* 4 */ CANDIDATE_ADMIN,\\n /* 5 */ WITHDRAWAL_MIGRATOR,\\n /* 6 */ __DEPRECATED_BRIDGE_OPERATOR,\\n /* 7 */ BLOCK_PRODUCER,\\n /* 8 */ VALIDATOR_CANDIDATE\\n}\\n\",\"keccak256\":\"0xa98cec38c640c4e37f475debbcd366226f1188c3f5ea6e29de768bd33e021873\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a060405230608052610010610015565b6100d5565b600054610100900460ff16156100815760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100d3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6080516116966100f06000396000610a8501526116966000f3fe60806040526004361061009c5760003560e01c80638f7c34a2116100645780638f7c34a214610133578063a6bd678814610148578063ad43663e14610168578063de981f1b1461017d578063f5dbc4ee146101b5578063f7013ef6146101ca57600080fd5b806324a2f579146100a157806334087952146100c357806359f778df146100eb5780636bcb6fd6146100f3578063865e6fd314610113575b600080fd5b3480156100ad57600080fd5b506100c16100bc36600461112f565b6101dd565b005b3480156100cf57600080fd5b506100d8610502565b6040519081526020015b60405180910390f35b6100c1610531565b3480156100ff57600080fd5b506100c161010e366004611194565b61053b565b34801561011f57600080fd5b506100c161012e36600461123f565b61067a565b34801561013f57600080fd5b506100d8610699565b34801561015457600080fd5b506100c161016336600461112f565b6106b1565b34801561017457600080fd5b506100d86106c5565b34801561018957600080fd5b5061019d610198366004611276565b6106ef565b6040516001600160a01b0390911681526020016100e2565b3480156101c157600080fd5b506100d861076a565b6100c16101d8366004611298565b610794565b6101e6336108e6565b61021a576000356001600160e01b031916604051638f47e7e360e01b815260040161021191906112fc565b60405180910390fd5b6000610224610699565b9050600061023260086106ef565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561026f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102939190611311565b90508181116102c3576000356001600160e01b03191660405163053265f160e01b815260040161021191906112fc565b806102ce8484611340565b11156102fb576000356001600160e01b03191660405163053265f160e01b815260040161021191906112fc565b61031360008051602061166a83398151915284610964565b506000610320600b6106ef565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561035d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261038591908101906113be565b9050600061039360036106ef565b905060015b8581116104fa576104f283836001600160a01b031663f67e815288876040518363ffffffff1660e01b81526004016103d19291906114a1565b600060405180830381865afa1580156103ee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261041691908101906114c2565b60405163692f6a6360e11b8152600481018990526001600160a01b0386169063d25ed4c690602401602060405180830381865afa15801561045b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047f9190611311565b604051637153af9b60e11b8152600481018a90526001600160a01b0387169063e2a75f3690602401602060405180830381865afa1580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190611311565b988501988961097b565b600101610398565b505050505050565b600061052c7f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f45490565b905090565b610539610a7b565b565b600361054681610b5f565b868514610574576000356001600160e01b0319166040516306b5667560e21b815260040161021191906112fc565b8615610670576000610584610699565b9050806001018310156105b8576000356001600160e01b03191660405163053265f160e01b815260040161021191906112fc565b806001018311156105e657604051634e4e051560e01b81526004810184905260248101829052604401610211565b506105fe60008051602061166a833981519152839055565b61067088888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525089925088915087905061097b565b5050505050505050565b610682610bab565b61068b81610c05565b6106958282610c3b565b5050565b600061052c60008051602061166a8339815191525490565b600b6106bc81610b5f565b61069582610cdf565b600061052c7f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec739105490565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600d81111561072657610726611548565b60ff1681526020810191909152604001600020546001600160a01b0316905080610765578160405163409140df60e11b81526004016102119190611572565b919050565b600061052c7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b600054610100900460ff16158080156107b45750600054600160ff909116105b806107ce5750303b1580156107ce575060005460ff166001145b6108315760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610211565b6000805460ff191660011790558015610854576000805461ff0019166101001790555b61085f600b87610c3b565b61086a600386610c3b565b610875600c85610c3b565b610880600884610c3b565b61088982610cdf565b610891610d3e565b610899610a7b565b80156104fa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050505050565b60006108f2600b6106ef565b604051635a02d57960e11b81526001600160a01b038481166004830152919091169063b405aaf290602401602060405180830381865afa15801561093a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095e9190611580565b92915050565b600061095e836109748585610dbe565b9250829055565b845160006109876106c5565b9050600061099488610ddd565b905060006109a387878a610e5b565b90506000806000805b87811015610a41576109f58589898f85815181106109cc576109cc6115a2565b60200260200101518f8e8c88815181106109e8576109e86115a2565b6020026020010151610eae565b909450925082610a055783610a08565b60005b610a129083611340565b9150610a39898e8381518110610a2a57610a2a6115a2565b60200260200101518686610ecf565b6001016109ac565b50610a6c7f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f482610964565b50505050505050505050505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610ad2576000356001600160e01b031916604051638f47e7e360e01b815260040161021191906112fc565b337f7ae161a1f0ef2537f5ff1957021a50412e72abdc6a941a77d99361e91e7f3c3d610b1c7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b604080519182523460208301520160405180910390a2610b5c7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c6434610964565b50565b610b68816106ef565b6001600160a01b0316336001600160a01b031614610b5c576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610211939291906115b8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610539576000356001600160e01b0319166001604051620f948f60ea1b81526004016102119291906115ef565b806001600160a01b03163b600003610b5c57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610211565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d811115610c7157610c71611548565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d811115610cb257610cb2611548565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610d087f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910829055565b6040518181527f9b40b647582311cc8f5f7d27e7ce206d126605d1625b8299b7edaeefd869ef259060200160405180910390a150565b610539610d4b60086106ef565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dac9190611311565b60008051602061166a83398151915255565b815481018181101561095e57634e487b7160005260116020526024601cfd5b6060610de9600c6106ef565b6001600160a01b0316635311153b836040518263ffffffff1660e01b8152600401610e14919061161d565b6000604051808303816000875af1158015610e33573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261095e91908101906114c2565b600080610e69858585611027565b905080610e9a576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a15b801580610ea5575084155b95945050505050565b600082821015610ec189898989896110a4565b915097509795505050505050565b6001600160a01b03831660009081527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a602052604090208115610f6f5782816001016000828254610f209190611340565b9091555050604080516001600160a01b03861681526020810185905286917fb3d061c3ef3991b0d4b09f4c8b551d137c3d1e014cf5326462d3d1f6a8dfb9c291015b60405180910390a2611020565b82816000016000828254610f839190611340565b90915550610f959050848460006110cf565b15610fdb57604080516001600160a01b03861681526020810185905286917fbab0baccb39371d4d5206b519fe58d21cae9cdd63a1d1b5146ecdf405fd931529101610f62565b604080516001600160a01b03861681526020810185905286917f74b217634c5a7790ce69770c5e35019970453d4da3973769e7d6cdb7ce6816a1910160405180910390a25b5050505050565b8051600190600090815b8181101561108c578585828151811061104c5761104c6115a2565b60200260200101511115611063576000935061108c565b848181518110611075576110756115a2565b602002602001015183019250806001019050611031565b5082801561109a5750858211155b9695505050505050565b6000856110c557816110b68486611630565b6110c09190611647565b61109a565b61109a8585611647565b6000836001600160a01b0316838390604051600060405180830381858888f193505050503d806000811461111f576040519150601f19603f3d011682016040523d82523d6000602084013e611124565b606091505b509095945050505050565b60006020828403121561114157600080fd5b5035919050565b60008083601f84011261115a57600080fd5b50813567ffffffffffffffff81111561117257600080fd5b6020830191508360208260051b850101111561118d57600080fd5b9250929050565b600080600080600080600060a0888a0312156111af57600080fd5b873567ffffffffffffffff808211156111c757600080fd5b6111d38b838c01611148565b909950975060208a01359150808211156111ec57600080fd5b506111f98a828b01611148565b989b979a50986040810135976060820135975060809091013595509350505050565b8035600e811061076557600080fd5b6001600160a01b0381168114610b5c57600080fd5b6000806040838503121561125257600080fd5b61125b8361121b565b9150602083013561126b8161122a565b809150509250929050565b60006020828403121561128857600080fd5b6112918261121b565b9392505050565b600080600080600060a086880312156112b057600080fd5b85356112bb8161122a565b945060208601356112cb8161122a565b935060408601356112db8161122a565b925060608601356112eb8161122a565b949793965091946080013592915050565b6001600160e01b031991909116815260200190565b60006020828403121561132357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561095e5761095e61132a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561139257611392611353565b604052919050565b600067ffffffffffffffff8211156113b4576113b4611353565b5060051b60200190565b600060208083850312156113d157600080fd5b825167ffffffffffffffff8111156113e857600080fd5b8301601f810185136113f957600080fd5b805161140c6114078261139a565b611369565b81815260059190911b8201830190838101908783111561142b57600080fd5b928401925b828410156114525783516114438161122a565b82529284019290840190611430565b979650505050505050565b600081518084526020808501945080840160005b838110156114965781516001600160a01b031687529582019590820190600101611471565b509495945050505050565b8281526040602082015260006114ba604083018461145d565b949350505050565b600060208083850312156114d557600080fd5b825167ffffffffffffffff8111156114ec57600080fd5b8301601f810185136114fd57600080fd5b805161150b6114078261139a565b81815260059190911b8201830190838101908783111561152a57600080fd5b928401925b828410156114525783518252928401929084019061152f565b634e487b7160e01b600052602160045260246000fd5b600e811061156e5761156e611548565b9052565b6020810161095e828461155e565b60006020828403121561159257600080fd5b8151801515811461129157600080fd5b634e487b7160e01b600052603260045260246000fd5b6001600160e01b031984168152606081016115d6602083018561155e565b6001600160a01b03929092166040919091015292915050565b6001600160e01b031983168152604081016009831061161057611610611548565b8260208301529392505050565b602081526000611291602083018461145d565b808202811582820484141761095e5761095e61132a565b60008261166457634e487b7160e01b600052601260045260246000fd5b50049056fe2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619a164736f6c6343000811000a", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c80638f7c34a2116100645780638f7c34a214610133578063a6bd678814610148578063ad43663e14610168578063de981f1b1461017d578063f5dbc4ee146101b5578063f7013ef6146101ca57600080fd5b806324a2f579146100a157806334087952146100c357806359f778df146100eb5780636bcb6fd6146100f3578063865e6fd314610113575b600080fd5b3480156100ad57600080fd5b506100c16100bc36600461112f565b6101dd565b005b3480156100cf57600080fd5b506100d8610502565b6040519081526020015b60405180910390f35b6100c1610531565b3480156100ff57600080fd5b506100c161010e366004611194565b61053b565b34801561011f57600080fd5b506100c161012e36600461123f565b61067a565b34801561013f57600080fd5b506100d8610699565b34801561015457600080fd5b506100c161016336600461112f565b6106b1565b34801561017457600080fd5b506100d86106c5565b34801561018957600080fd5b5061019d610198366004611276565b6106ef565b6040516001600160a01b0390911681526020016100e2565b3480156101c157600080fd5b506100d861076a565b6100c16101d8366004611298565b610794565b6101e6336108e6565b61021a576000356001600160e01b031916604051638f47e7e360e01b815260040161021191906112fc565b60405180910390fd5b6000610224610699565b9050600061023260086106ef565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561026f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102939190611311565b90508181116102c3576000356001600160e01b03191660405163053265f160e01b815260040161021191906112fc565b806102ce8484611340565b11156102fb576000356001600160e01b03191660405163053265f160e01b815260040161021191906112fc565b61031360008051602061166a83398151915284610964565b506000610320600b6106ef565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561035d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261038591908101906113be565b9050600061039360036106ef565b905060015b8581116104fa576104f283836001600160a01b031663f67e815288876040518363ffffffff1660e01b81526004016103d19291906114a1565b600060405180830381865afa1580156103ee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261041691908101906114c2565b60405163692f6a6360e11b8152600481018990526001600160a01b0386169063d25ed4c690602401602060405180830381865afa15801561045b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047f9190611311565b604051637153af9b60e11b8152600481018a90526001600160a01b0387169063e2a75f3690602401602060405180830381865afa1580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190611311565b988501988961097b565b600101610398565b505050505050565b600061052c7f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f45490565b905090565b610539610a7b565b565b600361054681610b5f565b868514610574576000356001600160e01b0319166040516306b5667560e21b815260040161021191906112fc565b8615610670576000610584610699565b9050806001018310156105b8576000356001600160e01b03191660405163053265f160e01b815260040161021191906112fc565b806001018311156105e657604051634e4e051560e01b81526004810184905260248101829052604401610211565b506105fe60008051602061166a833981519152839055565b61067088888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525089925088915087905061097b565b5050505050505050565b610682610bab565b61068b81610c05565b6106958282610c3b565b5050565b600061052c60008051602061166a8339815191525490565b600b6106bc81610b5f565b61069582610cdf565b600061052c7f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec739105490565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600d81111561072657610726611548565b60ff1681526020810191909152604001600020546001600160a01b0316905080610765578160405163409140df60e11b81526004016102119190611572565b919050565b600061052c7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b600054610100900460ff16158080156107b45750600054600160ff909116105b806107ce5750303b1580156107ce575060005460ff166001145b6108315760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610211565b6000805460ff191660011790558015610854576000805461ff0019166101001790555b61085f600b87610c3b565b61086a600386610c3b565b610875600c85610c3b565b610880600884610c3b565b61088982610cdf565b610891610d3e565b610899610a7b565b80156104fa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050505050565b60006108f2600b6106ef565b604051635a02d57960e11b81526001600160a01b038481166004830152919091169063b405aaf290602401602060405180830381865afa15801561093a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095e9190611580565b92915050565b600061095e836109748585610dbe565b9250829055565b845160006109876106c5565b9050600061099488610ddd565b905060006109a387878a610e5b565b90506000806000805b87811015610a41576109f58589898f85815181106109cc576109cc6115a2565b60200260200101518f8e8c88815181106109e8576109e86115a2565b6020026020010151610eae565b909450925082610a055783610a08565b60005b610a129083611340565b9150610a39898e8381518110610a2a57610a2a6115a2565b60200260200101518686610ecf565b6001016109ac565b50610a6c7f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f482610964565b50505050505050505050505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610ad2576000356001600160e01b031916604051638f47e7e360e01b815260040161021191906112fc565b337f7ae161a1f0ef2537f5ff1957021a50412e72abdc6a941a77d99361e91e7f3c3d610b1c7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b604080519182523460208301520160405180910390a2610b5c7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c6434610964565b50565b610b68816106ef565b6001600160a01b0316336001600160a01b031614610b5c576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610211939291906115b8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610539576000356001600160e01b0319166001604051620f948f60ea1b81526004016102119291906115ef565b806001600160a01b03163b600003610b5c57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610211565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d811115610c7157610c71611548565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d811115610cb257610cb2611548565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610d087f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910829055565b6040518181527f9b40b647582311cc8f5f7d27e7ce206d126605d1625b8299b7edaeefd869ef259060200160405180910390a150565b610539610d4b60086106ef565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dac9190611311565b60008051602061166a83398151915255565b815481018181101561095e57634e487b7160005260116020526024601cfd5b6060610de9600c6106ef565b6001600160a01b0316635311153b836040518263ffffffff1660e01b8152600401610e14919061161d565b6000604051808303816000875af1158015610e33573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261095e91908101906114c2565b600080610e69858585611027565b905080610e9a576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a15b801580610ea5575084155b95945050505050565b600082821015610ec189898989896110a4565b915097509795505050505050565b6001600160a01b03831660009081527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a602052604090208115610f6f5782816001016000828254610f209190611340565b9091555050604080516001600160a01b03861681526020810185905286917fb3d061c3ef3991b0d4b09f4c8b551d137c3d1e014cf5326462d3d1f6a8dfb9c291015b60405180910390a2611020565b82816000016000828254610f839190611340565b90915550610f959050848460006110cf565b15610fdb57604080516001600160a01b03861681526020810185905286917fbab0baccb39371d4d5206b519fe58d21cae9cdd63a1d1b5146ecdf405fd931529101610f62565b604080516001600160a01b03861681526020810185905286917f74b217634c5a7790ce69770c5e35019970453d4da3973769e7d6cdb7ce6816a1910160405180910390a25b5050505050565b8051600190600090815b8181101561108c578585828151811061104c5761104c6115a2565b60200260200101511115611063576000935061108c565b848181518110611075576110756115a2565b602002602001015183019250806001019050611031565b5082801561109a5750858211155b9695505050505050565b6000856110c557816110b68486611630565b6110c09190611647565b61109a565b61109a8585611647565b6000836001600160a01b0316838390604051600060405180830381858888f193505050503d806000811461111f576040519150601f19603f3d011682016040523d82523d6000602084013e611124565b606091505b509095945050505050565b60006020828403121561114157600080fd5b5035919050565b60008083601f84011261115a57600080fd5b50813567ffffffffffffffff81111561117257600080fd5b6020830191508360208260051b850101111561118d57600080fd5b9250929050565b600080600080600080600060a0888a0312156111af57600080fd5b873567ffffffffffffffff808211156111c757600080fd5b6111d38b838c01611148565b909950975060208a01359150808211156111ec57600080fd5b506111f98a828b01611148565b989b979a50986040810135976060820135975060809091013595509350505050565b8035600e811061076557600080fd5b6001600160a01b0381168114610b5c57600080fd5b6000806040838503121561125257600080fd5b61125b8361121b565b9150602083013561126b8161122a565b809150509250929050565b60006020828403121561128857600080fd5b6112918261121b565b9392505050565b600080600080600060a086880312156112b057600080fd5b85356112bb8161122a565b945060208601356112cb8161122a565b935060408601356112db8161122a565b925060608601356112eb8161122a565b949793965091946080013592915050565b6001600160e01b031991909116815260200190565b60006020828403121561132357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561095e5761095e61132a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561139257611392611353565b604052919050565b600067ffffffffffffffff8211156113b4576113b4611353565b5060051b60200190565b600060208083850312156113d157600080fd5b825167ffffffffffffffff8111156113e857600080fd5b8301601f810185136113f957600080fd5b805161140c6114078261139a565b611369565b81815260059190911b8201830190838101908783111561142b57600080fd5b928401925b828410156114525783516114438161122a565b82529284019290840190611430565b979650505050505050565b600081518084526020808501945080840160005b838110156114965781516001600160a01b031687529582019590820190600101611471565b509495945050505050565b8281526040602082015260006114ba604083018461145d565b949350505050565b600060208083850312156114d557600080fd5b825167ffffffffffffffff8111156114ec57600080fd5b8301601f810185136114fd57600080fd5b805161150b6114078261139a565b81815260059190911b8201830190838101908783111561152a57600080fd5b928401925b828410156114525783518252928401929084019061152f565b634e487b7160e01b600052602160045260246000fd5b600e811061156e5761156e611548565b9052565b6020810161095e828461155e565b60006020828403121561159257600080fd5b8151801515811461129157600080fd5b634e487b7160e01b600052603260045260246000fd5b6001600160e01b031984168152606081016115d6602083018561155e565b6001600160a01b03929092166040919091015292915050565b6001600160e01b031983168152604081016009831061161057611610611548565b8260208301529392505050565b602081526000611291602083018461145d565b808202811582820484141761095e5761095e61132a565b60008261166457634e487b7160e01b600052601260045260246000fd5b50049056fe2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619a164736f6c6343000811000a", + "address": "0x7bEB0f3fC4002C4542015cFa9023dEE1A9EC9400", + "args": "0x", + "ast": "", + "blockNumber": 26515571, + "bytecode": "0x60a060405230608052610010610015565b6100d5565b600054610100900460ff16156100815760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100d3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6080516118666100f06000396000610bc701526118666000f3fe6080604052600436106100dd5760003560e01c80638f7c34a21161007f578063ad43663e11610059578063ad43663e14610261578063b77f2a4014610276578063de981f1b14610296578063f5dbc4ee146102ce57600080fd5b80638f7c34a21461021957806395b6ef0c1461022e578063a6bd67881461024157600080fd5b80633b154455116100bb5780633b154455146101c757806359f778df146101dc5780635cd8a76b146101e4578063865e6fd3146101f957600080fd5b806306032d74146100e257806333b3ea6c1461018257806334087952146101a4575b600080fd5b3480156100ee57600080fd5b506101626100fd366004611335565b604080518082018252600080825260209182018190526001600160a01b039390931683527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a815291819020815180830190925280548252600101549181019190915290565b604080518251815260209283015192810192909252015b60405180910390f35b34801561018e57600080fd5b506101a261019d366004611352565b6102e3565b005b3480156101b057600080fd5b506101b9610399565b604051908152602001610179565b3480156101d357600080fd5b506101a26103c8565b6101a26104bb565b3480156101f057600080fd5b506101a26104c5565b34801561020557600080fd5b506101a261021436600461137a565b610593565b34801561022557600080fd5b506101b96105ae565b6101a261023c3660046113b1565b6105c6565b34801561024d57600080fd5b506101a261025c366004611352565b6106e9565b34801561026d57600080fd5b506101b96106fd565b34801561028257600080fd5b506101a2610291366004611352565b610727565b3480156102a257600080fd5b506102b66102b136600461142a565b61073d565b6040516001600160a01b039091168152602001610179565b3480156102da57600080fd5b506101b96107b8565b6102ec336107e2565b61031c57604051638f47e7e360e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b6000610328600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103899190611445565b90506103958183610860565b5050565b60006103c37f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f45490565b905090565b60046103d381610acd565b6000196103de6105ae565b146104205760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610313565b6104ac600161042f600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104909190611445565b61049a9190611474565b60008051602061181183398151915255565b6104b860046000610b19565b50565b6104c3610bbd565b565b600054600290610100900460ff161580156104e7575060005460ff8083169116105b6105035760405162461bcd60e51b815260040161031390611487565b6000805461ffff191660ff8316176101001790556105417faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c60059055565b61054e60016104906105ae565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b61059b610c9e565b6105a481610cf8565b6103958282610b19565b60006103c36000805160206118118339815191525490565b600054610100900460ff16158080156105e65750600054600160ff909116105b806106005750303b158015610600575060005460ff166001145b61061c5760405162461bcd60e51b815260040161031390611487565b6000805460ff19166001179055801561063f576000805461ff0019166101001790555b61064a600b88610b19565b610655600387610b19565b610660600c86610b19565b61066b600885610b19565b610676600484610b19565b6000196000805160206118118339815191525561069282610d2e565b61069a610bbd565b80156106e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600b6106f481610acd565b61039582610d2e565b60006103c37f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec739105490565b600361073281610acd565b610395826000610860565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610774576107746114d5565b60ff1681526020810191909152604001600020546001600160a01b03169050806107b3578160405163409140df60e11b815260040161031391906114ff565b919050565b60006103c37f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b60006107ee600b61073d565b604051635a02d57960e11b81526001600160a01b038481166004830152919091169063b405aaf290602401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a919061150d565b92915050565b600061086a6105ae565b9050816000036108cc5760008184111561089757600161088a8386611474565b6108949190611474565b90505b6108c8816108c37faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c5490565b610d87565b9250505b6108d7838383610d9f565b60006108e3600b61073d565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610920573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610948919081019061159a565b90506000610956600361073d565b905060005b84811015610ac55761096c84611639565b9350610abd83836001600160a01b031663f67e815287876040518363ffffffff1660e01b81526004016109a0929190611697565b600060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109e591908101906116b0565b60405163692f6a6360e11b8152600481018890526001600160a01b0386169063d25ed4c690602401602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190611445565b604051637153af9b60e11b8152600481018990526001600160a01b0387169063e2a75f3690602401602060405180830381865afa158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190611445565b88610e33565b60010161095b565b505050505050565b610ad68161073d565b6001600160a01b0316336001600160a01b0316146104b8576000356001600160e01b03191681336040516320e0f98d60e21b815260040161031393929190611736565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610b4f57610b4f6114d5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610b9057610b906114d5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c1457604051638f47e7e360e01b81526001600160e01b0319600035166004820152602401610313565b337f7ae161a1f0ef2537f5ff1957021a50412e72abdc6a941a77d99361e91e7f3c3d610c5e7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b604080519182523460208301520160405180910390a26104b87f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c6434610f8a565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146104c3576000356001600160e01b0319166001604051620f948f60ea1b815260040161031392919061176d565b806001600160a01b03163b6000036104b857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610313565b610d577f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910829055565b6040518181527f9b40b647582311cc8f5f7d27e7ce206d126605d1625b8299b7edaeefd869ef2590602001610588565b6000818310610d965781610d98565b825b9392505050565b81600003610dc05760405163799ffe0d60e01b815260040160405180910390fd5b610dcb81600161179b565b8311610df45760405163425a5b1f60e01b81526004810184905260248101829052604401610313565b610dfe828261179b565b8311610e2e57604051630931302b60e31b8152600481018490526024810182905260448101839052606401610313565b505050565b845184518114610e64576040516306b5667560e21b81526001600160e01b0319600035166004820152602401610313565b6000610e6e6106fd565b90506000610e7b88610fa1565b90506000610e8a87878a61101f565b90506000806000805b87811015610f3957610edc8589898f8581518110610eb357610eb36117ae565b60200260200101518f8e8c8881518110610ecf57610ecf6117ae565b6020026020010151611072565b80945081955050506000610f0b8a8f8481518110610efc57610efc6117ae565b60200260200101518787611093565b90508380610f17575080155b610f215784610f24565b60005b610f2e908461179b565b925050600101610e93565b50610f647f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f482610f8a565b50610f7c600080516020611811833981519152899055565b505050505050505050505050565b600061085a83610f9a85856111f9565b9250829055565b6060610fad600c61073d565b6001600160a01b0316635311153b836040518263ffffffff1660e01b8152600401610fd891906117c4565b6000604051808303816000875af1158015610ff7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261085a91908101906116b0565b60008061102d858585611218565b90508061105e576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a15b801580611069575084155b95945050505050565b6000828210156110858989898989611295565b915097509795505050505050565b6001600160a01b03831660009081527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a60205260408120821561113857838160010160008282546110e4919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fb3d061c3ef3991b0d4b09f4c8b551d137c3d1e014cf5326462d3d1f6a8dfb9c291015b60405180910390a260009150506111f1565b611144858560006112c0565b156111b0578381600001600082825461115d919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fbab0baccb39371d4d5206b519fe58d21cae9cdd63a1d1b5146ecdf405fd93152910160405180910390a260019150506111f1565b604080516001600160a01b03871681526020810186905287917f74b217634c5a7790ce69770c5e35019970453d4da3973769e7d6cdb7ce6816a19101611126565b949350505050565b815481018181101561085a57634e487b7160005260116020526024601cfd5b8051600190600090815b8181101561127d578585828151811061123d5761123d6117ae565b60200260200101511115611254576000935061127d565b848181518110611266576112666117ae565b602002602001015183019250806001019050611222565b5082801561128b5750858211155b9695505050505050565b6000856112b657816112a784866117d7565b6112b191906117ee565b61128b565b61128b85856117ee565b6000836001600160a01b0316838390604051600060405180830381858888f193505050503d8060008114611310576040519150601f19603f3d011682016040523d82523d6000602084013e611315565b606091505b509095945050505050565b6001600160a01b03811681146104b857600080fd5b60006020828403121561134757600080fd5b8135610d9881611320565b60006020828403121561136457600080fd5b5035919050565b8035601081106107b357600080fd5b6000806040838503121561138d57600080fd5b6113968361136b565b915060208301356113a681611320565b809150509250929050565b60008060008060008060c087890312156113ca57600080fd5b86356113d581611320565b955060208701356113e581611320565b945060408701356113f581611320565b9350606087013561140581611320565b9250608087013561141581611320565b8092505060a087013590509295509295509295565b60006020828403121561143c57600080fd5b610d988261136b565b60006020828403121561145757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561085a5761085a61145e565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b601081106114fb576114fb6114d5565b9052565b6020810161085a82846114eb565b60006020828403121561151f57600080fd5b81518015158114610d9857600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561156e5761156e61152f565b604052919050565b600067ffffffffffffffff8211156115905761159061152f565b5060051b60200190565b600060208083850312156115ad57600080fd5b825167ffffffffffffffff8111156115c457600080fd5b8301601f810185136115d557600080fd5b80516115e86115e382611576565b611545565b81815260059190911b8201830190838101908783111561160757600080fd5b928401925b8284101561162e57835161161f81611320565b8252928401929084019061160c565b979650505050505050565b60006001820161164b5761164b61145e565b5060010190565b60008151808452602080850194506020840160005b8381101561168c5781516001600160a01b031687529582019590820190600101611667565b509495945050505050565b8281526040602082015260006111f16040830184611652565b600060208083850312156116c357600080fd5b825167ffffffffffffffff8111156116da57600080fd5b8301601f810185136116eb57600080fd5b80516116f96115e382611576565b81815260059190911b8201830190838101908783111561171857600080fd5b928401925b8284101561162e5783518252928401929084019061171d565b6001600160e01b0319841681526060810161175460208301856114eb565b6001600160a01b03929092166040919091015292915050565b6001600160e01b03198316815260408101600b831061178e5761178e6114d5565b8260208301529392505050565b8082018082111561085a5761085a61145e565b634e487b7160e01b600052603260045260246000fd5b602081526000610d986020830184611652565b808202811582820484141761085a5761085a61145e565b60008261180b57634e487b7160e01b600052601260045260246000fd5b50049056fe2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619a2646970667358221220cd237faf10660b4bf88f4dcc843cf0b3d4cce585ad7f99199ed3924ea16b8dfd64736f6c63430008170033", + "chainId": 2021, + "contractAbsolutePath": "BridgeReward.sol", + "deployedBytecode": "0x6080604052600436106100dd5760003560e01c80638f7c34a21161007f578063ad43663e11610059578063ad43663e14610261578063b77f2a4014610276578063de981f1b14610296578063f5dbc4ee146102ce57600080fd5b80638f7c34a21461021957806395b6ef0c1461022e578063a6bd67881461024157600080fd5b80633b154455116100bb5780633b154455146101c757806359f778df146101dc5780635cd8a76b146101e4578063865e6fd3146101f957600080fd5b806306032d74146100e257806333b3ea6c1461018257806334087952146101a4575b600080fd5b3480156100ee57600080fd5b506101626100fd366004611335565b604080518082018252600080825260209182018190526001600160a01b039390931683527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a815291819020815180830190925280548252600101549181019190915290565b604080518251815260209283015192810192909252015b60405180910390f35b34801561018e57600080fd5b506101a261019d366004611352565b6102e3565b005b3480156101b057600080fd5b506101b9610399565b604051908152602001610179565b3480156101d357600080fd5b506101a26103c8565b6101a26104bb565b3480156101f057600080fd5b506101a26104c5565b34801561020557600080fd5b506101a261021436600461137a565b610593565b34801561022557600080fd5b506101b96105ae565b6101a261023c3660046113b1565b6105c6565b34801561024d57600080fd5b506101a261025c366004611352565b6106e9565b34801561026d57600080fd5b506101b96106fd565b34801561028257600080fd5b506101a2610291366004611352565b610727565b3480156102a257600080fd5b506102b66102b136600461142a565b61073d565b6040516001600160a01b039091168152602001610179565b3480156102da57600080fd5b506101b96107b8565b6102ec336107e2565b61031c57604051638f47e7e360e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b6000610328600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103899190611445565b90506103958183610860565b5050565b60006103c37f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f45490565b905090565b60046103d381610acd565b6000196103de6105ae565b146104205760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610313565b6104ac600161042f600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104909190611445565b61049a9190611474565b60008051602061181183398151915255565b6104b860046000610b19565b50565b6104c3610bbd565b565b600054600290610100900460ff161580156104e7575060005460ff8083169116105b6105035760405162461bcd60e51b815260040161031390611487565b6000805461ffff191660ff8316176101001790556105417faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c60059055565b61054e60016104906105ae565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b61059b610c9e565b6105a481610cf8565b6103958282610b19565b60006103c36000805160206118118339815191525490565b600054610100900460ff16158080156105e65750600054600160ff909116105b806106005750303b158015610600575060005460ff166001145b61061c5760405162461bcd60e51b815260040161031390611487565b6000805460ff19166001179055801561063f576000805461ff0019166101001790555b61064a600b88610b19565b610655600387610b19565b610660600c86610b19565b61066b600885610b19565b610676600484610b19565b6000196000805160206118118339815191525561069282610d2e565b61069a610bbd565b80156106e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600b6106f481610acd565b61039582610d2e565b60006103c37f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec739105490565b600361073281610acd565b610395826000610860565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610774576107746114d5565b60ff1681526020810191909152604001600020546001600160a01b03169050806107b3578160405163409140df60e11b815260040161031391906114ff565b919050565b60006103c37f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b60006107ee600b61073d565b604051635a02d57960e11b81526001600160a01b038481166004830152919091169063b405aaf290602401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a919061150d565b92915050565b600061086a6105ae565b9050816000036108cc5760008184111561089757600161088a8386611474565b6108949190611474565b90505b6108c8816108c37faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c5490565b610d87565b9250505b6108d7838383610d9f565b60006108e3600b61073d565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610920573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610948919081019061159a565b90506000610956600361073d565b905060005b84811015610ac55761096c84611639565b9350610abd83836001600160a01b031663f67e815287876040518363ffffffff1660e01b81526004016109a0929190611697565b600060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109e591908101906116b0565b60405163692f6a6360e11b8152600481018890526001600160a01b0386169063d25ed4c690602401602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190611445565b604051637153af9b60e11b8152600481018990526001600160a01b0387169063e2a75f3690602401602060405180830381865afa158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190611445565b88610e33565b60010161095b565b505050505050565b610ad68161073d565b6001600160a01b0316336001600160a01b0316146104b8576000356001600160e01b03191681336040516320e0f98d60e21b815260040161031393929190611736565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610b4f57610b4f6114d5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610b9057610b906114d5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c1457604051638f47e7e360e01b81526001600160e01b0319600035166004820152602401610313565b337f7ae161a1f0ef2537f5ff1957021a50412e72abdc6a941a77d99361e91e7f3c3d610c5e7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b604080519182523460208301520160405180910390a26104b87f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c6434610f8a565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146104c3576000356001600160e01b0319166001604051620f948f60ea1b815260040161031392919061176d565b806001600160a01b03163b6000036104b857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610313565b610d577f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910829055565b6040518181527f9b40b647582311cc8f5f7d27e7ce206d126605d1625b8299b7edaeefd869ef2590602001610588565b6000818310610d965781610d98565b825b9392505050565b81600003610dc05760405163799ffe0d60e01b815260040160405180910390fd5b610dcb81600161179b565b8311610df45760405163425a5b1f60e01b81526004810184905260248101829052604401610313565b610dfe828261179b565b8311610e2e57604051630931302b60e31b8152600481018490526024810182905260448101839052606401610313565b505050565b845184518114610e64576040516306b5667560e21b81526001600160e01b0319600035166004820152602401610313565b6000610e6e6106fd565b90506000610e7b88610fa1565b90506000610e8a87878a61101f565b90506000806000805b87811015610f3957610edc8589898f8581518110610eb357610eb36117ae565b60200260200101518f8e8c8881518110610ecf57610ecf6117ae565b6020026020010151611072565b80945081955050506000610f0b8a8f8481518110610efc57610efc6117ae565b60200260200101518787611093565b90508380610f17575080155b610f215784610f24565b60005b610f2e908461179b565b925050600101610e93565b50610f647f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f482610f8a565b50610f7c600080516020611811833981519152899055565b505050505050505050505050565b600061085a83610f9a85856111f9565b9250829055565b6060610fad600c61073d565b6001600160a01b0316635311153b836040518263ffffffff1660e01b8152600401610fd891906117c4565b6000604051808303816000875af1158015610ff7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261085a91908101906116b0565b60008061102d858585611218565b90508061105e576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a15b801580611069575084155b95945050505050565b6000828210156110858989898989611295565b915097509795505050505050565b6001600160a01b03831660009081527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a60205260408120821561113857838160010160008282546110e4919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fb3d061c3ef3991b0d4b09f4c8b551d137c3d1e014cf5326462d3d1f6a8dfb9c291015b60405180910390a260009150506111f1565b611144858560006112c0565b156111b0578381600001600082825461115d919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fbab0baccb39371d4d5206b519fe58d21cae9cdd63a1d1b5146ecdf405fd93152910160405180910390a260019150506111f1565b604080516001600160a01b03871681526020810186905287917f74b217634c5a7790ce69770c5e35019970453d4da3973769e7d6cdb7ce6816a19101611126565b949350505050565b815481018181101561085a57634e487b7160005260116020526024601cfd5b8051600190600090815b8181101561127d578585828151811061123d5761123d6117ae565b60200260200101511115611254576000935061127d565b848181518110611266576112666117ae565b602002602001015183019250806001019050611222565b5082801561128b5750858211155b9695505050505050565b6000856112b657816112a784866117d7565b6112b191906117ee565b61128b565b61128b85856117ee565b6000836001600160a01b0316838390604051600060405180830381858888f193505050503d8060008114611310576040519150601f19603f3d011682016040523d82523d6000602084013e611315565b606091505b509095945050505050565b6001600160a01b03811681146104b857600080fd5b60006020828403121561134757600080fd5b8135610d9881611320565b60006020828403121561136457600080fd5b5035919050565b8035601081106107b357600080fd5b6000806040838503121561138d57600080fd5b6113968361136b565b915060208301356113a681611320565b809150509250929050565b60008060008060008060c087890312156113ca57600080fd5b86356113d581611320565b955060208701356113e581611320565b945060408701356113f581611320565b9350606087013561140581611320565b9250608087013561141581611320565b8092505060a087013590509295509295509295565b60006020828403121561143c57600080fd5b610d988261136b565b60006020828403121561145757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561085a5761085a61145e565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b601081106114fb576114fb6114d5565b9052565b6020810161085a82846114eb565b60006020828403121561151f57600080fd5b81518015158114610d9857600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561156e5761156e61152f565b604052919050565b600067ffffffffffffffff8211156115905761159061152f565b5060051b60200190565b600060208083850312156115ad57600080fd5b825167ffffffffffffffff8111156115c457600080fd5b8301601f810185136115d557600080fd5b80516115e86115e382611576565b611545565b81815260059190911b8201830190838101908783111561160757600080fd5b928401925b8284101561162e57835161161f81611320565b8252928401929084019061160c565b979650505050505050565b60006001820161164b5761164b61145e565b5060010190565b60008151808452602080850194506020840160005b8381101561168c5781516001600160a01b031687529582019590820190600101611667565b509495945050505050565b8281526040602082015260006111f16040830184611652565b600060208083850312156116c357600080fd5b825167ffffffffffffffff8111156116da57600080fd5b8301601f810185136116eb57600080fd5b80516116f96115e382611576565b81815260059190911b8201830190838101908783111561171857600080fd5b928401925b8284101561162e5783518252928401929084019061171d565b6001600160e01b0319841681526060810161175460208301856114eb565b6001600160a01b03929092166040919091015292915050565b6001600160e01b03198316815260408101600b831061178e5761178e6114d5565b8260208301529392505050565b8082018082111561085a5761085a61145e565b634e487b7160e01b600052603260045260246000fd5b602081526000610d986020830184611652565b808202811582820484141761085a5761085a61145e565b60008261180b57634e487b7160e01b600052601260045260246000fd5b50049056fe2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619a2646970667358221220cd237faf10660b4bf88f4dcc843cf0b3d4cce585ad7f99199ed3924ea16b8dfd64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "execSyncRewardAuto(uint256)": { + "details": "Invoke calculate and transfer reward to operators based on their performance. Requirements: - This method is only called once each period. - The caller must be the bridge tracking contract" + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getLatestRewardedPeriod()": { + "details": "External function to retrieve the latest rewarded period in the contract." + }, + "getRewardInfo(address)": { + "details": "Returns the claimed and slashed reward amount of the `operator`." + }, + "getRewardPerPeriod()": { + "details": "Getter for all bridge operators per period." + }, + "getTotalRewardScattered()": { + "details": "Returns the total reward amount scattered to the operators, excluding the slashed reward and failed-to-transfer reward." + }, + "getTotalRewardToppedUp()": { + "details": "Returns the total amount of rewards that have been topped up in the contract." + }, + "initializeREP2()": { + "details": "Helper for running upgrade script, required to only revoked once by the DPoS's governance admin. The following must be assured after initializing REP2: ``` {BridgeTracking}._lastSyncPeriod == {BridgeReward}.latestRewardedPeriod == {RoninValidatorSet}.currentPeriod() ```" + }, + "initializeV2()": { + "details": "The following must be assured after initializing V2: ``` {BridgeTracking}._lastSyncPeriod == {RoninValidatorSet}.currentPeriod() == {BridgeReward}.latestRewardedPeriod + 1 ```" + }, + "receiveRON()": { + "details": "Receives RON from any address." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setRewardPerPeriod(uint256)": { + "details": "Setter for all bridge operators per period." + }, + "syncRewardManual(uint256)": { + "details": "This function allows bridge operators to manually synchronize the reward for a given period length.", + "params": { + "periodCount": "The length of the reward period for which synchronization is requested." + } + } + }, + "events": { + "BridgeRewardScatterFailed(uint256,address,uint256)": { + "details": "Event emitted when the reward of the `operator` is scattered with `amount` but failed to transfer." + }, + "BridgeRewardScattered(uint256,address,uint256)": { + "details": "Event emitted when the reward of the `operator` is scattered with `amount`." + }, + "BridgeRewardSlashed(uint256,address,uint256)": { + "details": "Event emitted when the reward of the `operator` is slashed with `amount`." + }, + "BridgeRewardSyncTooFarPeriod(uint256,uint256)": { + "details": "Event emitted when the requesting period to sync is too far." + }, + "BridgeTrackingIncorrectlyResponded()": { + "details": "Event emited when the bridge tracking contract tracks the invalid data, cause malform in sharing bridge reward." + }, + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "SafeReceived(address,uint256,uint256)": { + "details": "Emitted when RON are safely received as rewards in the contract.", + "params": { + "amount": "The amount of RON received.", + "balanceBefore": "The balance of the contract before receiving the RON tokens.", + "from": "The address of the sender who transferred RON tokens as rewards." + } + }, + "UpdatedRewardPerPeriod(uint256)": { + "details": "Event emitted when the reward per period config is updated." + } + }, "errors": { "ErrContractTypeNotFound(uint8)": [ { @@ -552,11 +660,6 @@ "details": "Error of sender has insufficient balance." } ], - "ErrInvalidArguments(bytes4)": [ - { - "details": "Error indicating that arguments are invalid." - } - ], "ErrLengthMismatch(bytes4)": [ { "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", @@ -602,99 +705,25 @@ "details": "Error of set to non-contract." } ] - }, - "kind": "dev", - "methods": { - "execSyncReward(address[],uint256[],uint256,uint256,uint256)": { - "details": "Invoke calculate and transfer reward to operators based on their performance. Requirements: - This method is only called once each period. - The caller must be the bridge tracking contract or a bridge operator." - }, - "getContract(uint8)": { - "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", - "params": { - "contractType": "The role of the contract to retrieve." - }, - "returns": { - "contract_": "The address of the contract with the specified role." - } - }, - "getLatestRewardedPeriod()": { - "details": "External function to retrieve the latest rewarded period in the contract.", - "returns": { - "_0": "latestRewardedPeriod The latest rewarded period value." - } - }, - "getRewardPerPeriod()": { - "details": "Getter for all bridge operators per period." - }, - "getTotalRewardScattered()": { - "details": "Retrieve the total amount of rewards that have been scattered to bridge operators in the contract.", - "returns": { - "_0": "totalRewardScattered The total rewards scattered value." - } - }, - "getTotalRewardToppedUp()": { - "details": "Retrieve the total amount of rewards that have been topped up in the contract.", - "returns": { - "_0": "totalRewardToppedUp The total rewards topped up value." - } - }, - "receiveRON()": { - "details": "Receives RON from any address." - }, - "setContract(uint8,address)": { - "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", - "params": { - "addr": "The address of the contract to set.", - "contractType": "The role of the contract to set." - } - }, - "setRewardPerPeriod(uint256)": { - "details": "Setter for all bridge operators per period." - }, - "syncReward(uint256)": { - "details": "This function allows bridge operators to manually synchronize the reward for a given period length.", - "params": { - "periodLength": "The length of the reward period for which synchronization is requested." - } - } - }, - "stateVariables": { - "LATEST_REWARDED_PERIOD_SLOT": { - "details": "value is equal to keccak256(\"@ronin.dpos.gateway.BridgeReward.latestRewardedPeriod.slot\") - 1" - }, - "REWARD_INFO_SLOT": { - "details": "value is equal to keccak256(\"@ronin.dpos.gateway.BridgeReward.rewardInfo.slot\") - 1" - }, - "REWARD_PER_PERIOD_SLOT": { - "details": "value is equal to keccak256(\"@ronin.dpos.gateway.BridgeReward.rewardPerPeriod.slot\") - 1" - }, - "TOTAL_REWARDS_SCATTERED_SLOT": { - "details": "value is equal to keccak256(\"@ronin.dpos.gateway.BridgeReward.totalRewardScattered.slot\") - 1" - }, - "TOTAL_REWARDS_TOPPED_UP_SLOT": { - "details": "value is equal to keccak256(\"@ronin.dpos.gateway.BridgeReward.totalRewardToppedUp.slot\") - 1" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 + } }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"currentBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sendAmount\",\"type\":\"uint256\"}],\"name\":\"ErrInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"currentPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestRewardedPeriod\",\"type\":\"uint256\"}],\"name\":\"ErrPeriodAlreadyRewarded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrPeriodCountIsZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"currentPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestRewardedPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"periodCount\",\"type\":\"uint256\"}],\"name\":\"ErrPeriodNotHappen\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrRecipientRevert\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnauthorizedCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BridgeRewardScatterFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BridgeRewardScattered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BridgeRewardSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestingPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"latestPeriod\",\"type\":\"uint256\"}],\"name\":\"BridgeRewardSyncTooFarPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"BridgeTrackingIncorrectlyResponded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceBefore\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SafeReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newRewardPerPeriod\",\"type\":\"uint256\"}],\"name\":\"UpdatedRewardPerPeriod\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"currentPeriod\",\"type\":\"uint256\"}],\"name\":\"execSyncRewardAuto\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestRewardedPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getRewardInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"claimed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"slashed\",\"type\":\"uint256\"}],\"internalType\":\"struct IBridgeRewardEvents.BridgeRewardInfo\",\"name\":\"rewardInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardPerPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalRewardScattered\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalRewardToppedUp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeTrackingContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeSlashContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"validatorSetContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dposGA\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rewardPerPeriod\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeREP2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveRON\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rewardPerPeriod\",\"type\":\"uint256\"}],\"name\":\"setRewardPerPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"periodCount\",\"type\":\"uint256\"}],\"name\":\"syncRewardManual\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrInsufficientBalance(bytes4,uint256,uint256)\":[{\"details\":\"Error of sender has insufficient balance.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrRecipientRevert(bytes4)\":[{\"details\":\"Error of recipient not accepting RON when transfer RON.\"}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnauthorizedCall(bytes4)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeRewardScatterFailed(uint256,address,uint256)\":{\"details\":\"Event emitted when the reward of the `operator` is scattered with `amount` but failed to transfer.\"},\"BridgeRewardScattered(uint256,address,uint256)\":{\"details\":\"Event emitted when the reward of the `operator` is scattered with `amount`.\"},\"BridgeRewardSlashed(uint256,address,uint256)\":{\"details\":\"Event emitted when the reward of the `operator` is slashed with `amount`.\"},\"BridgeRewardSyncTooFarPeriod(uint256,uint256)\":{\"details\":\"Event emitted when the requesting period to sync is too far.\"},\"BridgeTrackingIncorrectlyResponded()\":{\"details\":\"Event emited when the bridge tracking contract tracks the invalid data, cause malform in sharing bridge reward.\"},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"SafeReceived(address,uint256,uint256)\":{\"details\":\"Emitted when RON are safely received as rewards in the contract.\",\"params\":{\"amount\":\"The amount of RON received.\",\"balanceBefore\":\"The balance of the contract before receiving the RON tokens.\",\"from\":\"The address of the sender who transferred RON tokens as rewards.\"}},\"UpdatedRewardPerPeriod(uint256)\":{\"details\":\"Event emitted when the reward per period config is updated.\"}},\"kind\":\"dev\",\"methods\":{\"execSyncRewardAuto(uint256)\":{\"details\":\"Invoke calculate and transfer reward to operators based on their performance. Requirements: - This method is only called once each period. - The caller must be the bridge tracking contract\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getLatestRewardedPeriod()\":{\"details\":\"External function to retrieve the latest rewarded period in the contract.\"},\"getRewardInfo(address)\":{\"details\":\"Returns the claimed and slashed reward amount of the `operator`.\"},\"getRewardPerPeriod()\":{\"details\":\"Getter for all bridge operators per period.\"},\"getTotalRewardScattered()\":{\"details\":\"Returns the total reward amount scattered to the operators, excluding the slashed reward and failed-to-transfer reward.\"},\"getTotalRewardToppedUp()\":{\"details\":\"Returns the total amount of rewards that have been topped up in the contract.\"},\"initializeREP2()\":{\"details\":\"Helper for running upgrade script, required to only revoked once by the DPoS's governance admin. The following must be assured after initializing REP2: ``` {BridgeTracking}._lastSyncPeriod == {BridgeReward}.latestRewardedPeriod == {RoninValidatorSet}.currentPeriod() ```\"},\"initializeV2()\":{\"details\":\"The following must be assured after initializing V2: ``` {BridgeTracking}._lastSyncPeriod == {RoninValidatorSet}.currentPeriod() == {BridgeReward}.latestRewardedPeriod + 1 ```\"},\"receiveRON()\":{\"details\":\"Receives RON from any address.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setRewardPerPeriod(uint256)\":{\"details\":\"Setter for all bridge operators per period.\"},\"syncRewardManual(uint256)\":{\"details\":\"This function allows bridge operators to manually synchronize the reward for a given period length.\",\"params\":{\"periodCount\":\"The length of the reward period for which synchronization is requested.\"}}},\"stateVariables\":{\"$_LATEST_REWARDED_PERIOD\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.latestRewardedPeriod.slot\\\") - 1\"},\"$_MAX_REWARDING_PERIOD_COUNT\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.maxRewardingPeriodCount.slot\\\") - 1\"},\"$_REWARD_INFO\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.rewardInfo.slot\\\") - 1\"},\"$_REWARD_PER_PERIOD\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.rewardPerPeriod.slot\\\") - 1\"},\"$_TOTAL_REWARDS_SCATTERED\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.totalRewardScattered.slot\\\") - 1\"},\"$_TOTAL_REWARDS_TOPPED_UP\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.totalRewardToppedUp.slot\\\") - 1\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/BridgeReward.sol\":\"BridgeReward\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"src/extensions/RONTransferHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nabstract contract RONTransferHelper {\\n /// @dev Error of sender has insufficient balance.\\n error ErrInsufficientBalance(bytes4 msgSig, uint256 currentBalance, uint256 sendAmount);\\n /// @dev Error of recipient not accepting RON when transfer RON.\\n error ErrRecipientRevert(bytes4 msgSig);\\n\\n /**\\n * @dev See `_sendRON`.\\n * Reverts if the recipient does not receive RON.\\n */\\n function _transferRON(address payable recipient, uint256 amount) internal {\\n if (!_sendRON(recipient, amount)) revert ErrRecipientRevert(msg.sig);\\n }\\n\\n /**\\n * @dev Send `amount` RON to the address `recipient`.\\n * Returns whether the recipient receives RON or not.\\n * Reverts once the contract balance is insufficient.\\n *\\n * Note: consider using `ReentrancyGuard` before calling this function.\\n *\\n */\\n function _sendRON(address payable recipient, uint256 amount) internal returns (bool success) {\\n if (address(this).balance < amount) revert ErrInsufficientBalance(msg.sig, address(this).balance, amount);\\n return _unsafeSendRON(recipient, amount);\\n }\\n\\n /**\\n * @dev Unsafe send `amount` RON to the address `recipient`. If the sender's balance is insufficient,\\n * the call does not revert.\\n *\\n * Note:\\n * - Does not assert whether the balance of sender is sufficient.\\n * - Does not assert whether the recipient accepts RON.\\n * - Consider using `ReentrancyGuard` before calling this function.\\n *\\n */\\n function _unsafeSendRON(address payable recipient, uint256 amount) internal returns (bool success) {\\n (success,) = recipient.call{ value: amount }(\\\"\\\");\\n }\\n\\n /**\\n * @dev Same purpose with {_unsafeSendRONLimitGas(address,uin256)} but containing gas limit stipend forwarded in the call.\\n */\\n function _unsafeSendRONLimitGas(address payable recipient, uint256 amount, uint256 gas) internal returns (bool success) {\\n (success,) = recipient.call{ value: amount, gas: gas }(\\\"\\\");\\n }\\n}\\n\",\"keccak256\":\"0x8723823a5f2fed8cddeffe432a282bad7f6d7b3f498460044ae3a12b6ae8e428\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nabstract contract BridgeTrackingHelper {\\n /// @dev Event emited when the bridge tracking contract tracks the invalid data, cause malform in sharing bridge reward.\\n event BridgeTrackingIncorrectlyResponded();\\n\\n /**\\n * @dev Internal function to validate the bridge tracking response for a given set of ballots.\\n * @param totalBallot The total number of ballots available for the tracking response.\\n * @param totalVote The total number of votes recorded in the tracking response.\\n * @param ballots An array containing the individual ballot counts in the tracking response.\\n * @return valid A boolean indicating whether the bridge tracking response is valid or not.\\n * @notice The function checks if each individual ballot count is not greater than the total votes recorded.\\n * @notice It also verifies that the sum of all individual ballot counts does not exceed the total available ballots.\\n */\\n function _isValidBridgeTrackingResponse(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) internal pure returns (bool valid) {\\n valid = true;\\n uint256 sumBallot;\\n uint256 length = ballots.length;\\n\\n unchecked {\\n for (uint256 i; i < length; ++i) {\\n if (ballots[i] > totalVote) {\\n valid = false;\\n break;\\n }\\n\\n sumBallot += ballots[i];\\n }\\n }\\n\\n valid = valid && (sumBallot <= totalBallot);\\n }\\n}\\n\",\"keccak256\":\"0x6c4ace6aed6a3861ad64b30dc2db7a2d8b87585085e049f9f85b8f2efbbc41a0\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeReward.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { IBridgeRewardEvents } from \\\"./events/IBridgeRewardEvents.sol\\\";\\n\\ninterface IBridgeReward is IBridgeRewardEvents {\\n /**\\n * @dev This function allows bridge operators to manually synchronize the reward for a given period length.\\n * @param periodCount The length of the reward period for which synchronization is requested.\\n */\\n function syncRewardManual(uint256 periodCount) external;\\n\\n /**\\n * @dev Receives RON from any address.\\n */\\n function receiveRON() external payable;\\n\\n /**\\n * @dev Invoke calculate and transfer reward to operators based on their performance.\\n *\\n * Requirements:\\n * - This method is only called once each period.\\n * - The caller must be the bridge tracking contract\\n */\\n function execSyncRewardAuto(uint256 currentPeriod) external;\\n\\n /**\\n * @dev Returns the total amount of rewards that have been topped up in the contract.\\n */\\n function getTotalRewardToppedUp() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total reward amount scattered to the operators, excluding the slashed reward and failed-to-transfer reward.\\n */\\n function getTotalRewardScattered() external view returns (uint256);\\n\\n /**\\n * @dev Getter for all bridge operators per period.\\n */\\n function getRewardPerPeriod() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the latest rewarded period in the contract.\\n */\\n function getLatestRewardedPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the claimed and slashed reward amount of the `operator`.\\n */\\n function getRewardInfo(address operator) external view returns (BridgeRewardInfo memory rewardInfo);\\n\\n /**\\n * @dev Setter for all bridge operators per period.\\n */\\n function setRewardPerPeriod(uint256 rewardPerPeriod) external;\\n}\\n\",\"keccak256\":\"0x5707468c0c1f1f9bb104d8a5b3c2ae2ec8ffe09bb91229463b1f7dade3dcdfe7\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeSlash.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeSlashEvents } from \\\"./events/IBridgeSlashEvents.sol\\\";\\n\\n/**\\n * @title IBridgeSlash\\n * @dev Interface for the BridgeSlash contract to manage slashing functionality for bridge operators.\\n */\\ninterface IBridgeSlash is IBridgeSlashEvents {\\n /**\\n * @dev Slashes the unavailability of bridge operators during a specific period.\\n * @param period The period to slash the bridge operators for.\\n */\\n function execSlashBridgeOperators(address[] calldata operators, uint256[] calldata ballots, uint256 totalBallot, uint256 totalVote, uint256 period) external;\\n\\n /**\\n * @dev Returns the penalize durations for the specified bridge operators.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @return untilPeriods The penalized periods for the bridge operators.\\n */\\n function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external returns (uint256[] memory untilPeriods);\\n\\n /**\\n * @dev Retrieves the added periods of the specified bridge operators.\\n * @param bridgeOperators An array of bridge operator addresses.\\n * @return addedPeriods An array of uint256 values representing the added periods for each bridge operator.\\n */\\n function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods);\\n\\n /**\\n * @dev Gets the slash tier based on the given ballot and total ballots.\\n * @param ballot The ballot count for a bridge operator.\\n * @param totalVote The total vote count for the period.\\n * @return tier The slash tier.\\n */\\n function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier);\\n\\n /**\\n * @dev Retrieve the penalty durations for different slash tiers.\\n * @return penaltyDurations The array of penalty durations for each slash tier.\\n */\\n function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 1 slashing.\\n * @return The duration in period number for Tier 1 slashing.\\n */\\n function TIER_1_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 2 slashing.\\n * @return The duration in period number for Tier 2 slashing.\\n */\\n function TIER_2_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the threshold duration for removing bridge operators.\\n * @return The duration in period number that exceeds which a bridge operator will be removed.\\n */\\n function REMOVE_DURATION_THRESHOLD() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the value of the minimum vote threshold to execute slashing rule.\\n * @return minimumVoteThreshold The minimum vote threshold value.\\n */\\n function MINIMUM_VOTE_THRESHOLD() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb22e3ead9060f2c139d143b8db4dcda7cdf4e4e3960fa98a481ad8b3a2460134\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeTracking {\\n struct Request {\\n VoteKind kind;\\n uint256 id;\\n }\\n\\n enum VoteKind {\\n Deposit,\\n Withdrawal,\\n MainchainWithdrawal\\n }\\n\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\n\\n /**\\n * @dev Returns the block that allow incomming mutable call.\\n */\\n function startedAtBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of votes at the specific period `_period`.\\n */\\n function totalVote(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots at the specific period `_period`.\\n */\\n function totalBallot(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\n */\\n function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\n */\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\n\\n /**\\n * @dev Handles the request once it is approved.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\n\\n /**\\n * @dev Records vote for a receipt and a operator.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\n}\\n\",\"keccak256\":\"0x53ac425ff6efebc200030ceef302c2871a4b2edfcc5e512ce326aa704989ff7a\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeRewardEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeRewardEvents {\\n /**\\n * @dev Reward-related information for a bridge operator.\\n * @param claimed The amount of rewards claimed by the bridge operator.\\n * @param slashed The amount of rewards that have been slashed from the bridge operator.\\n */\\n struct BridgeRewardInfo {\\n uint256 claimed;\\n uint256 slashed;\\n }\\n\\n /**\\n * @dev Emitted when RON are safely received as rewards in the contract.\\n * @param from The address of the sender who transferred RON tokens as rewards.\\n * @param balanceBefore The balance of the contract before receiving the RON tokens.\\n * @param amount The amount of RON received.\\n */\\n event SafeReceived(address indexed from, uint256 balanceBefore, uint256 amount);\\n /// @dev Event emitted when the reward per period config is updated.\\n event UpdatedRewardPerPeriod(uint256 newRewardPerPeriod);\\n /// @dev Event emitted when the reward of the `operator` is scattered with `amount`.\\n event BridgeRewardScattered(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the reward of the `operator` is slashed with `amount`.\\n event BridgeRewardSlashed(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the reward of the `operator` is scattered with `amount` but failed to transfer.\\n event BridgeRewardScatterFailed(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the requesting period to sync is too far.\\n event BridgeRewardSyncTooFarPeriod(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n error ErrPeriodNotHappen(uint256 currentPeriod, uint256 latestRewardedPeriod, uint256 periodCount);\\n error ErrPeriodAlreadyRewarded(uint256 currentPeriod, uint256 latestRewardedPeriod);\\n error ErrPeriodCountIsZero();\\n}\\n\",\"keccak256\":\"0x715180c3b50edfc2e7b8c4dd6cde55cf383c471a48a96ebc4ca33103a3791356\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeSlashEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeSlashEvents {\\n /**\\n * @dev Enumeration representing the slashing tiers for bridge operators.\\n */\\n enum Tier {\\n Tier0,\\n Tier1,\\n Tier2\\n }\\n\\n /**\\n * @dev Struct representing the status of a bridge operator.\\n */\\n struct BridgeSlashInfo {\\n uint128 slashUntilPeriod;\\n uint128 newlyAddedAtPeriod;\\n }\\n\\n /**\\n * @dev Event emitted when a bridge operator is slashed.\\n * @param tier The slash tier of the operator.\\n * @param bridgeOperator The address of the slashed bridge operator.\\n * @param period The period in which the operator is slashed.\\n * @param slashUntilPeriod The period until which the operator is penalized.\\n */\\n event BridgeSlashed(Tier indexed tier, address indexed bridgeOperator, uint256 indexed period, uint256 slashUntilPeriod);\\n\\n /**\\n * @dev Emitted when a removal request is made for a bridge operator.\\n * @param period The period for which the removal request is made.\\n * @param bridgeOperator The address of the bridge operator being requested for removal.\\n */\\n event RemovalRequested(uint256 indexed period, address indexed bridgeOperator);\\n}\\n\",\"keccak256\":\"0x43850ce839ef382c6e6d176e1de4de776fb54b7baa697f52d79858fba13c1b90\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/validator/ICandidateManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ICandidateManager {\\n struct ValidatorCandidate {\\n // Admin of the candidate\\n address admin;\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address that receives mining reward of the validator\\n address payable treasuryAddr;\\n // Address of the bridge operator corresponding to the candidate\\n address ______deprecatedbridgeOperatorAddr;\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\n // Values in range [0; 100_00] stands for 0-100%\\n uint256 commissionRate;\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\n uint256 revokingTimestamp;\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\n uint256 topupDeadline;\\n }\\n\\n struct CommissionSchedule {\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\n uint256 effectiveTimestamp;\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\n uint256 commissionRate;\\n }\\n\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\n /// @dev Emitted when the validator candidate is granted.\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\n /// @dev Emitted when the validator candidate is revoked.\\n event CandidatesRevoked(address[] consensusAddrs);\\n\\n /// @dev Emitted when a schedule for updating commission rate is set.\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\n /// @dev Emitted when the commission rate of a validator is updated.\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\n\\n /// @dev Error of exceeding maximum number of candidates.\\n error ErrExceedsMaxNumberOfCandidate();\\n /// @dev Error of querying for already existent candidate.\\n error ErrExistentCandidate();\\n /// @dev Error of querying for non-existent candidate.\\n error ErrNonExistentCandidate();\\n /// @dev Error of candidate admin already exists.\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\n /// @dev Error of treasury already exists.\\n error ErrExistentTreasury(address _treasuryAddr);\\n /// @dev Error of invalid commission rate.\\n error ErrInvalidCommissionRate();\\n /// @dev Error of invalid effective days onwards.\\n error ErrInvalidEffectiveDaysOnwards();\\n /// @dev Error of invalid min effective days onwards.\\n error ErrInvalidMinEffectiveDaysOnwards();\\n /// @dev Error of already requested revoking candidate before.\\n error ErrAlreadyRequestedRevokingCandidate();\\n /// @dev Error of commission change schedule exists.\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\n /// @dev Error of trusted org cannot renounce.\\n error ErrTrustedOrgCannotRenounce();\\n\\n /**\\n * @dev Returns the maximum number of validator candidate.\\n */\\n function maxValidatorCandidate() external view returns (uint256);\\n\\n /**\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\n */\\n function minEffectiveDaysOnward() external view returns (uint256);\\n\\n /**\\n * @dev Sets the maximum number of validator candidate.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MaxValidatorCandidateUpdated` event.\\n *\\n */\\n function setMaxValidatorCandidate(uint256) external;\\n\\n /**\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\n *\\n */\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\n\\n /**\\n * @dev Grants a validator candidate.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateGranted`.\\n *\\n */\\n function execApplyValidatorCandidate(address _admin, address _consensusAddr, address payable _treasuryAddr, uint256 _commissionRate) external;\\n\\n /**\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\n *\\n */\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\n\\n /**\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\n *\\n * Requirements:\\n * - The method caller is the staking contract.\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\n * - The `_rate` must be in range of [0_00; 100_00].\\n *\\n * Emits the event `CommissionRateUpdateScheduled`.\\n *\\n */\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\n\\n /**\\n * @dev Returns whether the address is a validator (candidate).\\n */\\n function isValidatorCandidate(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns the validator candidate.\\n */\\n function getValidatorCandidates() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns all candidate info.\\n */\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\n\\n /**\\n * @dev Returns the info of a candidate.\\n */\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\n\\n /**\\n * @dev Returns whether the address is the candidate admin.\\n */\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\n\\n /**\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\n */\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\n}\\n\",\"keccak256\":\"0x37b15d36774a3f18291e85efa9df6caaf52b8fa751a8222a3ac8f467656950c1\",\"license\":\"MIT\"},\"src/interfaces/validator/ICoinbaseExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ISlashingExecution.sol\\\";\\n\\ninterface ICoinbaseExecution is ISlashingExecution {\\n enum BlockRewardDeprecatedType {\\n UNKNOWN,\\n UNAVAILABILITY,\\n AFTER_BAILOUT\\n }\\n\\n /// @dev Emitted when the validator set is updated\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated.\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\n\\n /// @dev Emitted when the reward of the block producer is deprecated.\\n event BlockRewardDeprecated(address indexed coinbaseAddr, uint256 rewardAmount, BlockRewardDeprecatedType deprecatedType);\\n /// @dev Emitted when the block reward is submitted.\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\n\\n /// @dev Emitted when the block producer reward is distributed.\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\n event MiningRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\n\\n /// @dev Emitted when the bridge operator reward is distributed.\\n event BridgeOperatorRewardDistributed(address indexed consensusAddr, address indexed bridgeOperator, address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\n event BridgeOperatorRewardDistributionFailed(\\n address indexed consensusAddr, address indexed bridgeOperator, address indexed recipient, uint256 amount, uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the fast finality reward is distributed.\\n event FastFinalityRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the fast finality reward.\\n event FastFinalityRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\n\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\n event StakingRewardDistributionFailed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts, uint256 contractBalance);\\n\\n /// @dev Emitted when the epoch is wrapped up.\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\n\\n /// @dev Error of only allowed at the end of epoch\\n error ErrAtEndOfEpochOnly();\\n /// @dev Error of query for already wrapped up epoch\\n error ErrAlreadyWrappedEpoch();\\n\\n /**\\n * @dev Submits reward of the current block.\\n *\\n * Requirements:\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\n *\\n */\\n function submitBlockReward() external payable;\\n\\n /**\\n * @dev Wraps up the current epoch.\\n *\\n * Requirements:\\n * - The method must be called when the current epoch is ending.\\n * - The epoch is not wrapped yet.\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\n * Emits the event `WrappedUpEpoch`.\\n *\\n */\\n function wrapUpEpoch() external payable;\\n}\\n\",\"keccak256\":\"0x3030ef01bb0277f8607fb3b6358a4cd1d75f6a756e5c884153fbf94f0a16b4d4\",\"license\":\"MIT\"},\"src/interfaces/validator/IEmergencyExit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IEmergencyExit {\\n /// @dev Emitted when the fund is locked from an emergency exit request\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\n event EmergencyExitLockedFundReleased(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\n event EmergencyExitLockedFundReleasingFailed(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount, uint256 contractBalance);\\n\\n /// @dev Emitted when the emergency exit locked amount is updated.\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\n /// @dev Emitted when the emergency expiry duration is updated.\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\n\\n /// @dev Error of already requested emergency exit before.\\n error ErrAlreadyRequestedEmergencyExit();\\n\\n /**\\n * @dev Returns the amount of RON to lock from a consensus address.\\n */\\n function emergencyExitLockedAmount() external returns (uint256);\\n\\n /**\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\n */\\n function emergencyExpiryDuration() external returns (uint256);\\n\\n /**\\n * @dev Sets the amount of RON to lock from a consensus address.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\n *\\n */\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\n\\n /**\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\n *\\n */\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\n\\n /**\\n * @dev Unlocks fund for emergency exit request.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\n *\\n */\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\n\\n /**\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n */\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\n}\\n\",\"keccak256\":\"0x2df640817e7fb957f923dd583e82be9610a8441735b69519db5bd9457683bec2\",\"license\":\"MIT\"},\"src/interfaces/validator/IRoninValidatorSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ICandidateManager.sol\\\";\\nimport \\\"./info-fragments/ICommonInfo.sol\\\";\\nimport \\\"./ICoinbaseExecution.sol\\\";\\nimport \\\"./ISlashingExecution.sol\\\";\\nimport \\\"./IEmergencyExit.sol\\\";\\n\\ninterface IRoninValidatorSet is ICandidateManager, ICommonInfo, ISlashingExecution, ICoinbaseExecution, IEmergencyExit { }\\n\",\"keccak256\":\"0x5ae53ab78a38d9c59d74b4723ead82146bc402874ebbdc90b70ce084516e010f\",\"license\":\"MIT\"},\"src/interfaces/validator/ISlashingExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ISlashingExecution {\\n /// @dev Emitted when the validator is punished.\\n event ValidatorPunished(\\n address indexed consensusAddr,\\n uint256 indexed period,\\n uint256 jailedUntil,\\n uint256 deductedStakingAmount,\\n bool blockProducerRewardDeprecated,\\n bool bridgeOperatorRewardDeprecated\\n );\\n /// @dev Emitted when the validator get out of jail by bailout.\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\n\\n /// @dev Error of cannot bailout due to high tier slash.\\n error ErrCannotBailout(address validator);\\n\\n /**\\n * @dev Finalize the slash request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorPunished`.\\n *\\n */\\n function execSlash(address validatorAddr, uint256 newJailedUntil, uint256 slashAmount, bool cannotBailout) external;\\n\\n /**\\n * @dev Finalize the bailout request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorUnjailed`.\\n *\\n */\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\n}\\n\",\"keccak256\":\"0xac0b772f2fca9dafd7cc6742f91b442f9f545bf9472185b8d817fe045b680193\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/ICommonInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IJailingInfo.sol\\\";\\nimport \\\"./ITimingInfo.sol\\\";\\n\\ninterface ICommonInfo is ITimingInfo, IJailingInfo {\\n struct EmergencyExitInfo {\\n uint256 lockedAmount;\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\n uint256 recyclingAt;\\n }\\n\\n /// @dev Emitted when the deprecated reward is withdrawn.\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\n\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\n error ErrUnauthorizedReceiveRON();\\n /// @dev Error thrown when queries for a non existent info.\\n error NonExistentRecyclingInfo();\\n\\n /**\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\n */\\n function totalDeprecatedReward() external view returns (uint256);\\n\\n /**\\n * @dev Returns the emergency exit request.\\n */\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\n}\\n\",\"keccak256\":\"0x4a215273f535697ecf54a97c8fd9de9c666ca64b88dafe7ab60b2903f71ffb41\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/IJailingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IJailingInfo {\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkJailed(address) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeft(address _addr) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\n */\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\n */\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\n */\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xd83e85bea11509406213b8d06956b33238d27fa1b5e555c1f064bdfd41d6d216\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/ITimingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ITimingInfo {\\n /**\\n * @dev Returns the block that validator set was updated.\\n */\\n function getLastUpdatedBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the number of blocks in a epoch.\\n */\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\n\\n /**\\n * @dev Returns the epoch index from the block number.\\n */\\n function epochOf(uint256 _block) external view returns (uint256);\\n\\n /**\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\n */\\n function epochEndingAt(uint256 _block) external view returns (bool);\\n\\n /**\\n * @dev Tries to get the period index from the epoch number.\\n */\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\n\\n /**\\n * @dev Returns whether the period ending at the current block number.\\n */\\n function isPeriodEnding() external view returns (bool);\\n\\n /**\\n * @dev Returns the period index from the current block.\\n */\\n function currentPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the block number that the current period starts at.\\n */\\n function currentPeriodStartAtBlock() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/Math.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary Math {\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns whether the number `c` is in range of [a; b].\\n */\\n function inRange(uint256 c, uint256 a, uint256 b) internal pure returns (bool) {\\n return a <= c && c <= b;\\n }\\n\\n /**\\n * @dev Returns whether two inclusive ranges [x1;x2] and [y1;y2] overlap.\\n */\\n function twoRangeOverlap(uint256 x1, uint256 x2, uint256 y1, uint256 y2) internal pure returns (bool) {\\n return x1 <= y2 && y1 <= x2;\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 upperbound) internal pure returns (uint256) {\\n return min(a + b, upperbound);\\n }\\n\\n /**\\n * @dev Returns value of a - b; in case of negative result, 0 is returned.\\n */\\n function subNonNegative(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a - b : 0;\\n }\\n\\n /**\\n * @dev Returns value of `a + zeroable` if zerobale is not 0; otherwise, return 0.\\n */\\n function addIfNonZero(uint256 a, uint256 zeroable) internal pure returns (uint256) {\\n return zeroable != 0 ? a + zeroable : 0;\\n }\\n}\\n\",\"keccak256\":\"0xd73170f448c644a47024c7dbcf4afc3cc7ad27f61737c6ea4c3b543ec5cdb7e9\",\"license\":\"UNLICENSED\"},\"src/ronin/gateway/BridgeReward.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { BridgeTrackingHelper } from \\\"../../extensions/bridge-operator-governance/BridgeTrackingHelper.sol\\\";\\nimport { ContractType, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { RONTransferHelper } from \\\"../../extensions/RONTransferHelper.sol\\\";\\nimport { IRoninValidatorSet } from \\\"../../interfaces/validator/IRoninValidatorSet.sol\\\";\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeTracking } from \\\"../../interfaces/bridge/IBridgeTracking.sol\\\";\\nimport { IBridgeReward } from \\\"../../interfaces/bridge/IBridgeReward.sol\\\";\\nimport { IBridgeSlash } from \\\"../../interfaces/bridge/IBridgeSlash.sol\\\";\\nimport { Math } from \\\"../../libraries/Math.sol\\\";\\nimport { TUint256Slot } from \\\"../../types/Types.sol\\\";\\nimport { ErrSyncTooFarPeriod, ErrInvalidArguments, ErrLengthMismatch, ErrUnauthorizedCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\ncontract BridgeReward is IBridgeReward, BridgeTrackingHelper, HasContracts, RONTransferHelper, Initializable {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.rewardInfo.slot\\\") - 1\\n bytes32 private constant $_REWARD_INFO = 0x518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a;\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.rewardPerPeriod.slot\\\") - 1\\n TUint256Slot private constant $_REWARD_PER_PERIOD = TUint256Slot.wrap(0x90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910);\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.latestRewardedPeriod.slot\\\") - 1\\n TUint256Slot private constant $_LATEST_REWARDED_PERIOD = TUint256Slot.wrap(0x2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619);\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.totalRewardToppedUp.slot\\\") - 1\\n TUint256Slot private constant $_TOTAL_REWARDS_TOPPED_UP = TUint256Slot.wrap(0x9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c64);\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.totalRewardScattered.slot\\\") - 1\\n TUint256Slot private constant $_TOTAL_REWARDS_SCATTERED = TUint256Slot.wrap(0x3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f4);\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeReward.maxRewardingPeriodCount.slot\\\") - 1\\n TUint256Slot private constant $_MAX_REWARDING_PERIOD_COUNT = TUint256Slot.wrap(0xaf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c);\\n\\n address private immutable _self;\\n\\n constructor() payable {\\n _self = address(this);\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address bridgeManagerContract,\\n address bridgeTrackingContract,\\n address bridgeSlashContract,\\n address validatorSetContract,\\n address dposGA,\\n uint256 rewardPerPeriod\\n ) external payable initializer {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n _setContract(ContractType.BRIDGE_TRACKING, bridgeTrackingContract);\\n _setContract(ContractType.BRIDGE_SLASH, bridgeSlashContract);\\n _setContract(ContractType.VALIDATOR, validatorSetContract);\\n _setContract(ContractType.GOVERNANCE_ADMIN, dposGA);\\n $_LATEST_REWARDED_PERIOD.store(type(uint256).max);\\n _setRewardPerPeriod(rewardPerPeriod);\\n _receiveRON();\\n }\\n\\n /**\\n * @dev Helper for running upgrade script, required to only revoked once by the DPoS's governance admin.\\n * The following must be assured after initializing REP2:\\n * ```\\n * {BridgeTracking}._lastSyncPeriod\\n * == {BridgeReward}.latestRewardedPeriod\\n * == {RoninValidatorSet}.currentPeriod()\\n * ```\\n */\\n function initializeREP2() external onlyContract(ContractType.GOVERNANCE_ADMIN) {\\n require(getLatestRewardedPeriod() == type(uint256).max, \\\"already init rep 2\\\");\\n $_LATEST_REWARDED_PERIOD.store(IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod() - 1);\\n _setContract(ContractType.GOVERNANCE_ADMIN, address(0));\\n }\\n\\n /**\\n * @dev The following must be assured after initializing V2:\\n * ```\\n * {BridgeTracking}._lastSyncPeriod\\n * == {RoninValidatorSet}.currentPeriod()\\n * == {BridgeReward}.latestRewardedPeriod + 1\\n * ```\\n */\\n function initializeV2() external reinitializer(2) {\\n $_MAX_REWARDING_PERIOD_COUNT.store(5);\\n $_LATEST_REWARDED_PERIOD.store(getLatestRewardedPeriod() - 1);\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function receiveRON() external payable {\\n _receiveRON();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function syncRewardManual(uint256 periodCount) external {\\n if (!_isBridgeOperator(msg.sender)) revert ErrUnauthorizedCall(msg.sig);\\n uint256 currPd = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n\\n _syncRewardBatch({ currPd: currPd, pdCount: periodCount });\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function execSyncRewardAuto(uint256 currentPeriod) external onlyContract(ContractType.BRIDGE_TRACKING) {\\n _syncRewardBatch({ currPd: currentPeriod, pdCount: 0 });\\n }\\n\\n /**\\n * @dev Sync bridge reward for multiple periods, always assert `latestRewardedPeriod + periodCount < currentPeriod`.\\n * @param pdCount Number of periods to settle reward. Leave this as 0 to auto calculate.\\n */\\n function _syncRewardBatch(uint256 currPd, uint256 pdCount) internal {\\n uint256 lastRewardPd = getLatestRewardedPeriod();\\n if (pdCount == 0) {\\n uint toSettlePdCount;\\n if (currPd > lastRewardPd) {\\n toSettlePdCount = currPd - lastRewardPd - 1;\\n }\\n\\n // Restrict number of period to reward in a transaction, to avoid consume too much gas\\n pdCount = Math.min(toSettlePdCount, $_MAX_REWARDING_PERIOD_COUNT.load());\\n }\\n\\n _assertPeriod({ currPd: currPd, pdCount: pdCount, lastRewardPd: lastRewardPd });\\n\\n address[] memory operators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators();\\n IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\n\\n for (uint256 i = 0; i < pdCount; i++) {\\n ++lastRewardPd;\\n _settleReward({\\n operators: operators,\\n ballots: bridgeTrackingContract.getManyTotalBallots(lastRewardPd, operators),\\n totalBallot: bridgeTrackingContract.totalBallot(lastRewardPd),\\n totalVote: bridgeTrackingContract.totalVote(lastRewardPd),\\n period: lastRewardPd\\n });\\n }\\n }\\n\\n /**\\n * @dev\\n * Before the last valid rewarding:\\n * |----------|------------------|------------------------------|-----------------|\\n * ^ ^ ^\\n * Validator.current\\n * Reward.lastReward\\n * Tracking.lastSync\\n * Tracking.ballotInfo\\n * Slash.slashInfo\\n *\\n *\\n * After the last valid rewarding, the lastRewardedPeriod always slower than currentPeriod:\\n * |----------|------------------|------------------------------|-----------------|\\n * ^ ^\\n * Validator.current\\n * Reward.lastReward\\n * Tracking.lastSync\\n * Tracking.ballotInfo\\n * Slash.slashInfo\\n */\\n function _assertPeriod(uint256 currPd, uint256 pdCount, uint256 lastRewardPd) internal pure {\\n if (pdCount == 0) revert ErrPeriodCountIsZero();\\n\\n // Not settle the period that already rewarded. This check may redundant as in the following assertion.\\n // However, not increase much in gas, this is kept for obvious in error handling.\\n if (currPd <= lastRewardPd + 1) revert ErrPeriodAlreadyRewarded(currPd, lastRewardPd);\\n\\n // Not settle the periods that not happen yet.\\n if (currPd <= lastRewardPd + pdCount) revert ErrPeriodNotHappen(currPd, lastRewardPd, pdCount);\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getTotalRewardToppedUp() external view returns (uint256) {\\n return $_TOTAL_REWARDS_TOPPED_UP.load();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getTotalRewardScattered() external view returns (uint256) {\\n return $_TOTAL_REWARDS_SCATTERED.load();\\n }\\n\\n /**\\n * @dev Internal function to receive RON tokens as rewards and update the total topped-up rewards amount.\\n */\\n function _receiveRON() internal {\\n // prevent transfer RON directly to logic contract\\n if (address(this) == _self) revert ErrUnauthorizedCall(msg.sig);\\n\\n emit SafeReceived(msg.sender, $_TOTAL_REWARDS_TOPPED_UP.load(), msg.value);\\n $_TOTAL_REWARDS_TOPPED_UP.addAssign(msg.value);\\n }\\n\\n /**\\n * @dev Internal function to synchronize and distribute rewards to bridge operators for a given period.\\n * @param operators An array containing the addresses of bridge operators to receive rewards.\\n * @param ballots An array containing the individual ballot counts for each bridge operator.\\n * @param totalBallot The total number of available ballots for the period.\\n * @param totalVote The total number of votes recorded for the period.\\n * @param period The period for which the rewards are being synchronized.\\n */\\n function _settleReward(address[] memory operators, uint256[] memory ballots, uint256 totalBallot, uint256 totalVote, uint256 period) internal {\\n uint256 numBridgeOperators = operators.length;\\n if (numBridgeOperators != ballots.length) revert ErrLengthMismatch(msg.sig);\\n\\n uint256 rewardPerPeriod = getRewardPerPeriod();\\n uint256[] memory slashedDurationList = _getSlashInfo(operators);\\n // Validate should share the reward equally\\n bool shouldShareEqually = _shouldShareEqually(totalBallot, totalVote, ballots);\\n\\n uint256 reward;\\n bool shouldSlash;\\n uint256 sumRewards;\\n\\n for (uint256 i; i < numBridgeOperators; i++) {\\n (reward, shouldSlash) = _calcRewardAndCheckSlashedStatus({\\n shouldShareEqually: shouldShareEqually,\\n numBridgeOperators: numBridgeOperators,\\n rewardPerPeriod: rewardPerPeriod,\\n ballot: ballots[i],\\n totalBallot: totalBallot,\\n period: period,\\n slashUntilPeriod: slashedDurationList[i]\\n });\\n\\n bool scattered = _updateRewardAndTransfer({ period: period, operator: operators[i], reward: reward, shouldSlash: shouldSlash });\\n sumRewards += (shouldSlash || !scattered) ? 0 : reward;\\n }\\n\\n $_TOTAL_REWARDS_SCATTERED.addAssign(sumRewards);\\n $_LATEST_REWARDED_PERIOD.store(period);\\n }\\n\\n /**\\n * @dev Returns whether should share the reward equally, in case of bridge tracking returns\\n * informed data or there is no ballot in a day.\\n *\\n * Emit a {BridgeTrackingIncorrectlyResponded} event when in case of incorrect data.\\n */\\n function _shouldShareEqually(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) internal returns (bool shareEqually) {\\n bool valid = _isValidBridgeTrackingResponse(totalBallot, totalVote, ballots);\\n if (!valid) {\\n emit BridgeTrackingIncorrectlyResponded();\\n }\\n\\n return !valid || totalBallot == 0;\\n }\\n\\n /**\\n * @dev Internal function to calculate the reward for a bridge operator and check its slashing status.\\n * @param shouldShareEqually A boolean indicating whether the reward should be shared equally among bridge operators.\\n * @param numBridgeOperators The total number of bridge operators for proportional reward calculation.\\n * @param rewardPerPeriod The total reward available for the period.\\n * @param ballot The individual ballot count of the bridge operator for the period.\\n * @param totalBallot The total number of available ballots for the period.\\n * @param period The period for which the reward is being calculated.\\n * @param slashUntilPeriod The period until which slashing is effective for the bridge operator.\\n * @return reward The calculated reward for the bridge operator.\\n * @return shouldSlash A boolean indicating whether the bridge operator should be slashed for the current period.\\n */\\n function _calcRewardAndCheckSlashedStatus(\\n bool shouldShareEqually,\\n uint256 numBridgeOperators,\\n uint256 rewardPerPeriod,\\n uint256 ballot,\\n uint256 totalBallot,\\n uint256 period,\\n uint256 slashUntilPeriod\\n ) internal pure returns (uint256 reward, bool shouldSlash) {\\n shouldSlash = _shouldSlashedThisPeriod(period, slashUntilPeriod);\\n reward = _calcReward(shouldShareEqually, numBridgeOperators, rewardPerPeriod, ballot, totalBallot);\\n }\\n\\n /**\\n * @dev Internal function to check if a specific period should be considered as slashed based on the slash duration.\\n */\\n function _shouldSlashedThisPeriod(uint256 period, uint256 slashUntil) internal pure returns (bool) {\\n return period <= slashUntil;\\n }\\n\\n /**\\n * @dev Internal function to calculate the reward for a bridge operator based on the provided parameters.\\n * @param shouldShareEqually A boolean indicating whether the reward should be shared equally among bridge operators.\\n * @param numBridgeOperators The total number of bridge operators for proportional reward calculation.\\n * @param rewardPerPeriod The total reward available for the period.\\n * @param ballot The individual ballot count of the bridge operator for the period.\\n * @param totalBallot The total number of available ballots for the period.\\n * @return reward The calculated reward for the bridge operator.\\n */\\n function _calcReward(\\n bool shouldShareEqually,\\n uint256 numBridgeOperators,\\n uint256 rewardPerPeriod,\\n uint256 ballot,\\n uint256 totalBallot\\n ) internal pure returns (uint256 reward) {\\n // Shares equally in case the bridge has nothing to vote or bridge tracking response is incorrect\\n // Else shares the bridge operators reward proportionally\\n reward = shouldShareEqually ? rewardPerPeriod / numBridgeOperators : (rewardPerPeriod * ballot) / totalBallot;\\n }\\n\\n /**\\n * @dev Transfer `reward` to a `operator` or only emit event based on the operator `slashed` status.\\n */\\n function _updateRewardAndTransfer(uint256 period, address operator, uint256 reward, bool shouldSlash) private returns (bool scattered) {\\n BridgeRewardInfo storage _iRewardInfo = _getRewardInfo()[operator];\\n\\n if (shouldSlash) {\\n _iRewardInfo.slashed += reward;\\n emit BridgeRewardSlashed(period, operator, reward);\\n return false;\\n }\\n\\n if (_unsafeSendRONLimitGas({ recipient: payable(operator), amount: reward, gas: 0 })) {\\n _iRewardInfo.claimed += reward;\\n emit BridgeRewardScattered(period, operator, reward);\\n return true;\\n } else {\\n emit BridgeRewardScatterFailed(period, operator, reward);\\n return false;\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getRewardPerPeriod() public view returns (uint256) {\\n return $_REWARD_PER_PERIOD.load();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getLatestRewardedPeriod() public view returns (uint256) {\\n return $_LATEST_REWARDED_PERIOD.load();\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function getRewardInfo(address operator) external view returns (BridgeRewardInfo memory rewardInfo) {\\n return _getRewardInfo()[operator];\\n }\\n\\n /**\\n * @inheritdoc IBridgeReward\\n */\\n function setRewardPerPeriod(uint256 rewardPerPeriod) external onlyContract(ContractType.BRIDGE_MANAGER) {\\n _setRewardPerPeriod(rewardPerPeriod);\\n }\\n\\n /**\\n * @dev Internal function for setting the total reward per period.\\n * Emit an {UpdatedRewardPerPeriod} event after set.\\n */\\n function _setRewardPerPeriod(uint256 rewardPerPeriod) internal {\\n $_REWARD_PER_PERIOD.store(rewardPerPeriod);\\n emit UpdatedRewardPerPeriod(rewardPerPeriod);\\n }\\n\\n /**\\n * @dev Internal helper for querying slash info of a list of operators.\\n */\\n function _getSlashInfo(address[] memory operatorList) internal returns (uint256[] memory _slashedDuration) {\\n return IBridgeSlash(getContract(ContractType.BRIDGE_SLASH)).getSlashUntilPeriodOf(operatorList);\\n }\\n\\n /**\\n * @dev Internal helper for querying whether an address is an operator.\\n */\\n function _isBridgeOperator(address operator) internal view returns (bool) {\\n return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).isBridgeOperator(operator);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping from bridge operator => BridgeRewardInfo.\\n * @return rewardInfo the mapping from bridge operator => BridgeRewardInfo.\\n */\\n function _getRewardInfo() internal pure returns (mapping(address => BridgeRewardInfo) storage rewardInfo) {\\n assembly (\\\"memory-safe\\\") {\\n rewardInfo.slot := $_REWARD_INFO\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7a6f4f58225927f41f4200d3ab018b441dd9c8630d2ca31644cf7f0e6af2a009\",\"license\":\"MIT\"},\"src/types/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { LibTUint256Slot } from \\\"./operations/LibTUint256Slot.sol\\\";\\n\\ntype TUint256Slot is bytes32;\\n\\nusing {\\n LibTUint256Slot.add,\\n LibTUint256Slot.sub,\\n LibTUint256Slot.mul,\\n LibTUint256Slot.div,\\n LibTUint256Slot.load,\\n LibTUint256Slot.store,\\n LibTUint256Slot.addAssign,\\n LibTUint256Slot.subAssign,\\n LibTUint256Slot.preDecrement,\\n LibTUint256Slot.postDecrement,\\n LibTUint256Slot.preIncrement,\\n LibTUint256Slot.postIncrement\\n} for TUint256Slot global;\\n\",\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\"},\"src/types/operations/LibTUint256Slot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { TUint256Slot } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title LibTUint256Slot\\n * @dev Library for handling unsigned 256-bit integers.\\n */\\nlibrary LibTUint256Slot {\\n /// @dev value is equal to bytes4(keccak256(\\\"Panic(uint256)\\\"))\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\n /// @dev error code for {Arithmetic over/underflow} error\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\n /// @dev error code for {Division or modulo by 0} error\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\n\\n /**\\n * @dev Loads the value of the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @return val The loaded value.\\n */\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\n assembly {\\n val := sload(self)\\n }\\n }\\n\\n /**\\n * @dev Stores a value into the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to be stored.\\n */\\n function store(TUint256Slot self, uint256 other) internal {\\n assembly {\\n sstore(self, other)\\n }\\n }\\n\\n /**\\n * @dev Multiplies the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to multiply by.\\n * @return res The resulting value after multiplication.\\n */\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n if iszero(iszero(storedVal)) {\\n res := mul(storedVal, other)\\n\\n // Overflow check\\n if iszero(eq(other, div(res, storedVal))) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Divides the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to divide by.\\n * @return res The resulting value after division.\\n */\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n // revert if divide by zero\\n if iszero(other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, DIVISION_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n res := div(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction.\\n */\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n\\n // Underflow check\\n if lt(storedVal, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n\\n res := sub(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition.\\n */\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n res := add(storedVal, other)\\n\\n // Overflow check\\n if lt(res, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after incrementing.\\n */\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = addAssign(self, 1);\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\n * @param self The TUint256Slot variable.\\n * @return res The original value before incrementing.\\n */\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res + 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after decrementing.\\n */\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = subAssign(self, 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value before decrementing.\\n */\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res - 1);\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition and storage.\\n */\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = add(self, other));\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction and storage.\\n */\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = sub(self, other));\\n }\\n}\\n\",\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192808, + "numDeployments": 3, "storageLayout": { "storage": [ { - "astId": 1373, - "contract": "contracts/ronin/gateway/BridgeReward.sol:BridgeReward", + "astId": 58190, + "contract": "src/ronin/gateway/BridgeReward.sol:BridgeReward", "label": "_initialized", "offset": 0, "slot": "0", "type": "t_uint8" }, { - "astId": 1376, - "contract": "contracts/ronin/gateway/BridgeReward.sol:BridgeReward", + "astId": 58193, + "contract": "src/ronin/gateway/BridgeReward.sol:BridgeReward", "label": "_initializing", "offset": 1, "slot": "0", @@ -713,5 +742,10 @@ "numberOfBytes": "1" } } + }, + "timestamp": 1713251844, + "userdoc": { + "version": 1, + "kind": "user" } } \ No newline at end of file diff --git a/deployments/ronin-testnet/BridgeSlashLogic.json b/deployments/ronin-testnet/BridgeSlashLogic.json index b85139bc..cf105777 100644 --- a/deployments/ronin-testnet/BridgeSlashLogic.json +++ b/deployments/ronin-testnet/BridgeSlashLogic.json @@ -1,564 +1,486 @@ { - "address": "0x7CA05B9246CC6e3053D37219C87653041F72565e", "abi": [ { + "type": "constructor", "inputs": [], - "stateMutability": "payable", - "type": "constructor" + "stateMutability": "payable" }, { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "ErrContractTypeNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrLengthMismatch", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "enum RoleAccess", - "name": "expectedRole", - "type": "uint8" - } - ], - "name": "ErrUnauthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "enum ContractType", - "name": "expectedContractType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "actual", - "type": "address" - } - ], - "name": "ErrUnexpectedInternalCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ErrZeroCodeContract", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "BridgeTrackingIncorrectlyResponded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "period", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "bridgeOperator", - "type": "address" - } - ], - "name": "RemovalRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum IBridgeSlashEvents.Tier", - "name": "tier", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "bridgeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "period", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "slashUntilPeriod", - "type": "uint256" - } - ], - "name": "Slashed", - "type": "event" - }, - { - "inputs": [], + "type": "function", "name": "MINIMUM_VOTE_THRESHOLD", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "REMOVE_DURATION_THRESHOLD", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "TIER_1_PENALTY_DURATION", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "TIER_2_PENALTY_DURATION", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "execSlashBridgeOperators", "inputs": [ { - "internalType": "address[]", - "name": "allBridgeOperators", - "type": "address[]" + "name": "operators", + "type": "address[]", + "internalType": "address[]" }, { - "internalType": "uint256[]", "name": "ballots", - "type": "uint256[]" + "type": "uint256[]", + "internalType": "uint256[]" }, { - "internalType": "uint256", "name": "totalBallot", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "totalVote", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "period", - "type": "uint256" - } - ], - "name": "execSlashBridgeOperators", - "outputs": [ - { - "internalType": "bool", - "name": "slashed", - "type": "bool" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "getAddedPeriodOf", "inputs": [ { - "internalType": "address[]", "name": "bridgeOperators", - "type": "address[]" + "type": "address[]", + "internalType": "address[]" } ], - "name": "getAddedPeriodOf", "outputs": [ { - "internalType": "uint256[]", "name": "addedPeriods", - "type": "uint256[]" + "type": "uint256[]", + "internalType": "uint256[]" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getContract", "inputs": [ { - "internalType": "enum ContractType", "name": "contractType", - "type": "uint8" + "type": "uint8", + "internalType": "enum ContractType" } ], - "name": "getContract", "outputs": [ { - "internalType": "address", "name": "contract_", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "getPenaltyDurations", + "inputs": [], "outputs": [ { - "internalType": "uint256[]", "name": "penaltyDurations", - "type": "uint256[]" + "type": "uint256[]", + "internalType": "uint256[]" } ], - "stateMutability": "pure", - "type": "function" + "stateMutability": "pure" }, { + "type": "function", + "name": "getSlashTier", "inputs": [ { - "internalType": "uint256", "name": "ballot", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "totalVote", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "getSlashTier", "outputs": [ { - "internalType": "enum IBridgeSlashEvents.Tier", "name": "tier", - "type": "uint8" + "type": "uint8", + "internalType": "enum IBridgeSlashEvents.Tier" } ], - "stateMutability": "pure", - "type": "function" + "stateMutability": "pure" }, { + "type": "function", + "name": "getSlashUntilPeriodOf", "inputs": [ { - "internalType": "address[]", "name": "bridgeOperators", - "type": "address[]" + "type": "address[]", + "internalType": "address[]" } ], - "name": "getSlashUntilPeriodOf", "outputs": [ { - "internalType": "uint256[]", "name": "untilPeriods", - "type": "uint256[]" + "type": "uint256[]", + "internalType": "uint256[]" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "initialize", "inputs": [ { - "internalType": "address", "name": "validatorContract", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "bridgeManagerContract", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "bridgeTrackingContract", - "type": "address" + "type": "address", + "internalType": "address" + }, + { + "name": "dposGA", + "type": "address", + "internalType": "address" } ], - "name": "initialize", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { - "inputs": [ - { - "internalType": "address", - "name": "currentBridgeOperator", - "type": "address" - }, - { - "internalType": "address", - "name": "newBridgeOperator", - "type": "address" - } - ], - "name": "onBridgeOperatorUpdated", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "type": "function", + "name": "initializeREP2", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "onBridgeOperatorsAdded", "inputs": [ { - "internalType": "address[]", "name": "bridgeOperators", - "type": "address[]" + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "", + "type": "uint96[]", + "internalType": "uint96[]" }, { - "internalType": "bool[]", "name": "addeds", - "type": "bool[]" + "type": "bool[]", + "internalType": "bool[]" } ], - "name": "onBridgeOperatorsAdded", "outputs": [ { - "internalType": "bytes4", "name": "", - "type": "bytes4" + "type": "bytes4", + "internalType": "bytes4" } ], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "onBridgeOperatorsRemoved", "inputs": [ { - "internalType": "address[]", "name": "", - "type": "address[]" + "type": "address[]", + "internalType": "address[]" }, { - "internalType": "bool[]", "name": "", - "type": "bool[]" + "type": "bool[]", + "internalType": "bool[]" } ], - "name": "onBridgeOperatorsRemoved", "outputs": [ { - "internalType": "bytes4", "name": "", - "type": "bytes4" + "type": "bytes4", + "internalType": "bytes4" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "setContract", "inputs": [ { - "internalType": "enum ContractType", "name": "contractType", - "type": "uint8" + "type": "uint8", + "internalType": "enum ContractType" }, { - "internalType": "address", "name": "addr", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "setContract", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "supportsInterface", "inputs": [ { - "internalType": "bytes4", "name": "interfaceId", - "type": "bytes4" + "type": "bytes4", + "internalType": "bytes4" } ], - "name": "supportsInterface", "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "stateMutability": "pure", - "type": "function" - } - ], - "transactionHash": "0xf2b67dcef68fefa08a8d696089607fc96689bc9d7d7581b0b87ee22332bb6cec", - "receipt": { - "to": null, - "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "contractAddress": "0x7CA05B9246CC6e3053D37219C87653041F72565e", - "transactionIndex": 0, - "gasUsed": "1232191", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040080000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000", - "blockHash": "0x13f79dc6339d216cbfcaf0737bb016f1941f9a6759d1c0e4928e0f725e301737", - "transactionHash": "0xf2b67dcef68fefa08a8d696089607fc96689bc9d7d7581b0b87ee22332bb6cec", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 19042846, - "transactionHash": "0xf2b67dcef68fefa08a8d696089607fc96689bc9d7d7581b0b87ee22332bb6cec", - "address": "0x7CA05B9246CC6e3053D37219C87653041F72565e", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 0, - "blockHash": "0x13f79dc6339d216cbfcaf0737bb016f1941f9a6759d1c0e4928e0f725e301737" - } - ], - "blockNumber": 19042846, - "cumulativeGasUsed": "1232191", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "04a9bbd243a024f931581fbb384106a3", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"BridgeTrackingIncorrectlyResponded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"RemovalRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum IBridgeSlashEvents.Tier\",\"name\":\"tier\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slashUntilPeriod\",\"type\":\"uint256\"}],\"name\":\"Slashed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MINIMUM_VOTE_THRESHOLD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REMOVE_DURATION_THRESHOLD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIER_1_PENALTY_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIER_2_PENALTY_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"allBridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ballots\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"totalBallot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalVote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"}],\"name\":\"execSlashBridgeOperators\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"slashed\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"getAddedPeriodOf\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"addedPeriods\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPenaltyDurations\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"penaltyDurations\",\"type\":\"uint256[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ballot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalVote\",\"type\":\"uint256\"}],\"name\":\"getSlashTier\",\"outputs\":[{\"internalType\":\"enum IBridgeSlashEvents.Tier\",\"name\":\"tier\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"getSlashUntilPeriodOf\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"untilPeriods\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeTrackingContract\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"currentBridgeOperator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newBridgeOperator\",\"type\":\"address\"}],\"name\":\"onBridgeOperatorUpdated\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsAdded\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsRemoved\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract that implements slashing functionality for bridge operators based on their availability.\",\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"kind\":\"dev\",\"methods\":{\"execSlashBridgeOperators(address[],uint256[],uint256,uint256,uint256)\":{\"details\":\"Slashes the unavailability of bridge operators during a specific period.\",\"params\":{\"period\":\"The period to slash the bridge operators for.\"}},\"getAddedPeriodOf(address[])\":{\"details\":\"Retrieves the added periods of the specified bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of bridge operator addresses.\"},\"returns\":{\"addedPeriods\":\"An array of uint256 values representing the added periods for each bridge operator.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getPenaltyDurations()\":{\"details\":\"Retrieve the penalty durations for different slash tiers.\",\"returns\":{\"penaltyDurations\":\"The array of penalty durations for each slash tier.\"}},\"getSlashTier(uint256,uint256)\":{\"details\":\"Gets the slash tier based on the given ballot and total ballots.\",\"params\":{\"ballot\":\"The ballot count for a bridge operator.\",\"totalVote\":\"The total vote count for the period.\"},\"returns\":{\"tier\":\"The slash tier.\"}},\"getSlashUntilPeriodOf(address[])\":{\"details\":\"Returns the penalize durations for the specified bridge operators.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"untilPeriods\":\"The penalized periods for the bridge operators.\"}},\"onBridgeOperatorUpdated(address,address)\":{\"details\":\"Handles the event when a bridge operator is updated.\",\"params\":{\"currentBridgeOperator\":\"The address of the current bridge operator.\",\"newbridgeOperator\":\"The new address of the bridge operator.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"onBridgeOperatorsAdded(address[],bool[])\":{\"details\":\"Handles the event when bridge operators are added.\",\"params\":{\"addeds\":\"The corresponding boolean values indicating whether the operators were added or not.\",\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"onBridgeOperatorsRemoved(address[],bool[])\":{\"details\":\"Handles the event when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\",\"removeds\":\"The corresponding boolean values indicating whether the operators were removed or not.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"stateVariables\":{\"BRIDGE_SLASH_INFOS_SLOT\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeSlash.bridgeSlashInfos.slot\\\") - 1\"},\"MINIMUM_VOTE_THRESHOLD\":{\"details\":\"External function to retrieve the value of the minimum vote threshold to execute slashing rule.\",\"return\":\"minimumVoteThreshold The minimum vote threshold value.\",\"returns\":{\"_0\":\"minimumVoteThreshold The minimum vote threshold value.\"}},\"PERCENTAGE_FRACTION\":{\"details\":\"Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\"},\"REMOVE_DURATION_THRESHOLD\":{\"details\":\"Returns the threshold duration for removing bridge operators.\",\"return\":\"The duration in period number that exceeds which a bridge operator will be removed.\",\"returns\":{\"_0\":\"The duration in period number that exceeds which a bridge operator will be removed.\"}},\"SLASH_PERMANENT_DURATION\":{\"details\":\"This value is set to the maximum value of uint128 to indicate a permanent slash duration.\"},\"TIER_1_PENALTY_DURATION\":{\"details\":\"Returns the penalty duration for Tier 1 slashing.\",\"return\":\"The duration in period number for Tier 1 slashing.\",\"returns\":{\"_0\":\"The duration in period number for Tier 1 slashing.\"}},\"TIER_1_THRESHOLD\":{\"details\":\"Tier 1 slashing threshold ratio is 10%\"},\"TIER_2_PENALTY_DURATION\":{\"details\":\"Returns the penalty duration for Tier 2 slashing.\",\"return\":\"The duration in period number for Tier 2 slashing.\",\"returns\":{\"_0\":\"The duration in period number for Tier 2 slashing.\"}},\"TIER_2_THRESHOLD\":{\"details\":\"Tier 2 slashing threshold ratio is 30%\"}},\"title\":\"BridgeSlash\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ronin/gateway/BridgeSlash.sol\":\"BridgeSlash\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/extensions/bridge-operator-governance/BridgeTrackingHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nabstract contract BridgeTrackingHelper {\\n /// @dev Event emited when the bridge tracking contract tracks the invalid data, cause malform in sharing bridge reward.\\n event BridgeTrackingIncorrectlyResponded();\\n\\n /**\\n * @dev Internal function to validate the bridge tracking response for a given set of ballots.\\n * @param totalBallot The total number of ballots available for the tracking response.\\n * @param totalVote The total number of votes recorded in the tracking response.\\n * @param ballots An array containing the individual ballot counts in the tracking response.\\n * @return valid A boolean indicating whether the bridge tracking response is valid or not.\\n * @notice The function checks if each individual ballot count is not greater than the total votes recorded.\\n * @notice It also verifies that the sum of all individual ballot counts does not exceed the total available ballots.\\n */\\n function _isValidBridgeTrackingResponse(\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256[] memory ballots\\n ) internal pure returns (bool valid) {\\n valid = true;\\n uint256 sumBallot;\\n uint256 length = ballots.length;\\n\\n unchecked {\\n for (uint256 i; i < length; ++i) {\\n if (ballots[i] > totalVote) {\\n valid = false;\\n break;\\n }\\n\\n sumBallot += ballots[i];\\n }\\n }\\n\\n valid = valid && (sumBallot <= totalBallot);\\n }\\n}\\n\",\"keccak256\":\"0x2da3d7c4b8d48228761b48c79beb04a55065d24a3469a16043b00c45873844e5\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n _requireAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireAdmin() internal view {\\n if (msg.sender != _getAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0x06e5962713a77abf6d5ba646e1cc1cfb6f9c50e7d52520dd82a10bf309534187\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(\\n address[] memory bridgeOperators,\\n bool[] memory addeds\\n ) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(\\n address[] memory bridgeOperators,\\n bool[] memory removeds\\n ) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when a bridge operator is updated.\\n * @param currentBridgeOperator The address of the current bridge operator.\\n * @param newbridgeOperator The new address of the bridge operator.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorUpdated(\\n address currentBridgeOperator,\\n address newbridgeOperator\\n ) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0xfd6868a1041577a463b6c96713edcb18063dc817154d09710abfd5783e4629ee\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeSlash.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeSlashEvents } from \\\"./events/IBridgeSlashEvents.sol\\\";\\n\\n/**\\n * @title IBridgeSlash\\n * @dev Interface for the BridgeSlash contract to manage slashing functionality for bridge operators.\\n */\\ninterface IBridgeSlash is IBridgeSlashEvents {\\n /**\\n * @dev Slashes the unavailability of bridge operators during a specific period.\\n * @param period The period to slash the bridge operators for.\\n */\\n function execSlashBridgeOperators(\\n address[] calldata operators,\\n uint256[] calldata ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) external returns (bool slashed);\\n\\n /**\\n * @dev Returns the penalize durations for the specified bridge operators.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @return untilPeriods The penalized periods for the bridge operators.\\n */\\n function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external returns (uint256[] memory untilPeriods);\\n\\n /**\\n * @dev Retrieves the added periods of the specified bridge operators.\\n * @param bridgeOperators An array of bridge operator addresses.\\n * @return addedPeriods An array of uint256 values representing the added periods for each bridge operator.\\n */\\n function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods);\\n\\n /**\\n * @dev Gets the slash tier based on the given ballot and total ballots.\\n * @param ballot The ballot count for a bridge operator.\\n * @param totalVote The total vote count for the period.\\n * @return tier The slash tier.\\n */\\n function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier);\\n\\n /**\\n * @dev Retrieve the penalty durations for different slash tiers.\\n * @return penaltyDurations The array of penalty durations for each slash tier.\\n */\\n function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 1 slashing.\\n * @return The duration in period number for Tier 1 slashing.\\n */\\n function TIER_1_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 2 slashing.\\n * @return The duration in period number for Tier 2 slashing.\\n */\\n function TIER_2_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the threshold duration for removing bridge operators.\\n * @return The duration in period number that exceeds which a bridge operator will be removed.\\n */\\n function REMOVE_DURATION_THRESHOLD() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the value of the minimum vote threshold to execute slashing rule.\\n * @return minimumVoteThreshold The minimum vote threshold value.\\n */\\n function MINIMUM_VOTE_THRESHOLD() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x45f7a50e6f2e25d9d1ac8abf0eafd1b7579d625245b9269840d42a476745e735\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeTracking {\\n struct Request {\\n VoteKind kind;\\n uint256 id;\\n }\\n\\n enum VoteKind {\\n Deposit,\\n Withdrawal,\\n MainchainWithdrawal\\n }\\n\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\n\\n /**\\n * @dev Returns the block that allow incomming mutable call.\\n */\\n function startedAtBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of votes at the specific period `_period`.\\n */\\n function totalVote(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots at the specific period `_period`.\\n */\\n function totalBallot(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\n */\\n function getManyTotalBallots(\\n uint256 _period,\\n address[] calldata _bridgeOperators\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\n */\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\n\\n /**\\n * @dev Handles the request once it is approved.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\n\\n /**\\n * @dev Records vote for a receipt and a operator.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\n}\\n\",\"keccak256\":\"0x092841025351341cf7ff9cbf0eb6ef78752ffd2b1af329cb6048996d20c789a9\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeSlashEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeSlashEvents {\\n /**\\n * @dev Enumeration representing the slashing tiers for bridge operators.\\n */\\n enum Tier {\\n Tier0,\\n Tier1,\\n Tier2\\n }\\n\\n /**\\n * @dev Struct representing the status of a bridge operator.\\n */\\n struct BridgeSlashInfo {\\n uint128 slashUntilPeriod;\\n uint128 newlyAddedAtPeriod;\\n }\\n\\n /**\\n * @dev Event emitted when a bridge operator is slashed.\\n * @param tier The slash tier of the operator.\\n * @param bridgeOperator The address of the slashed bridge operator.\\n * @param period The period in which the operator is slashed.\\n * @param slashUntilPeriod The period until which the operator is penalized.\\n */\\n event Slashed(Tier indexed tier, address indexed bridgeOperator, uint256 indexed period, uint256 slashUntilPeriod);\\n\\n /**\\n * @dev Emitted when a removal request is made for a bridge operator.\\n * @param period The period for which the removal request is made.\\n * @param bridgeOperator The address of the bridge operator being requested for removal.\\n */\\n event RemovalRequested(uint256 indexed period, address indexed bridgeOperator);\\n}\\n\",\"keccak256\":\"0x9611e0d8b85b50bdd8ba9e8148564af526e78ccce5d202e7c84043d2d2ccb75f\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ICandidateManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ICandidateManager {\\n struct ValidatorCandidate {\\n // Admin of the candidate\\n address admin;\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address that receives mining reward of the validator\\n address payable treasuryAddr;\\n // Address of the bridge operator corresponding to the candidate\\n address ______deprecatedbridgeOperatorAddr;\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\n // Values in range [0; 100_00] stands for 0-100%\\n uint256 commissionRate;\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\n uint256 revokingTimestamp;\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\n uint256 topupDeadline;\\n }\\n\\n struct CommissionSchedule {\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\n uint256 effectiveTimestamp;\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\n uint256 commissionRate;\\n }\\n\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\n /// @dev Emitted when the validator candidate is granted.\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\n /// @dev Emitted when the validator candidate is revoked.\\n event CandidatesRevoked(address[] consensusAddrs);\\n\\n /// @dev Emitted when a schedule for updating commission rate is set.\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\n /// @dev Emitted when the commission rate of a validator is updated.\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\n\\n /// @dev Error of exceeding maximum number of candidates.\\n error ErrExceedsMaxNumberOfCandidate();\\n /// @dev Error of querying for already existent candidate.\\n error ErrExistentCandidate();\\n /// @dev Error of querying for non-existent candidate.\\n error ErrNonExistentCandidate();\\n /// @dev Error of candidate admin already exists.\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\n /// @dev Error of treasury already exists.\\n error ErrExistentTreasury(address _treasuryAddr);\\n /// @dev Error of invalid commission rate.\\n error ErrInvalidCommissionRate();\\n /// @dev Error of invalid effective days onwards.\\n error ErrInvalidEffectiveDaysOnwards();\\n /// @dev Error of invalid min effective days onwards.\\n error ErrInvalidMinEffectiveDaysOnwards();\\n /// @dev Error of already requested revoking candidate before.\\n error ErrAlreadyRequestedRevokingCandidate();\\n /// @dev Error of commission change schedule exists.\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\n /// @dev Error of trusted org cannot renounce.\\n error ErrTrustedOrgCannotRenounce();\\n\\n /**\\n * @dev Returns the maximum number of validator candidate.\\n */\\n function maxValidatorCandidate() external view returns (uint256);\\n\\n /**\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\n */\\n function minEffectiveDaysOnwards() external view returns (uint256);\\n\\n /**\\n * @dev Sets the maximum number of validator candidate.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MaxValidatorCandidateUpdated` event.\\n *\\n */\\n function setMaxValidatorCandidate(uint256) external;\\n\\n /**\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\n *\\n */\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\n\\n /**\\n * @dev Grants a validator candidate.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateGranted`.\\n *\\n */\\n function execApplyValidatorCandidate(\\n address _admin,\\n address _consensusAddr,\\n address payable _treasuryAddr,\\n uint256 _commissionRate\\n ) external;\\n\\n /**\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\n *\\n */\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\n\\n /**\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\n *\\n * Requirements:\\n * - The method caller is the staking contract.\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\n * - The `_rate` must be in range of [0_00; 100_00].\\n *\\n * Emits the event `CommissionRateUpdateScheduled`.\\n *\\n */\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\n\\n /**\\n * @dev Returns whether the address is a validator (candidate).\\n */\\n function isValidatorCandidate(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns the validator candidate.\\n */\\n function getValidatorCandidates() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns all candidate info.\\n */\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\n\\n /**\\n * @dev Returns the info of a candidate.\\n */\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\n\\n /**\\n * @dev Returns whether the address is the candidate admin.\\n */\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\n\\n /**\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\n */\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\n}\\n\",\"keccak256\":\"0x9ab205c736f1bcc9a3debe06e08d829f4857141d940e6f608236f136193a7f49\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ICoinbaseExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ISlashingExecution.sol\\\";\\n\\ninterface ICoinbaseExecution is ISlashingExecution {\\n enum BlockRewardDeprecatedType {\\n UNKNOWN,\\n UNAVAILABILITY,\\n AFTER_BAILOUT\\n }\\n\\n /// @dev Emitted when the validator set is updated\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated.\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\n\\n /// @dev Emitted when the reward of the block producer is deprecated.\\n event BlockRewardDeprecated(\\n address indexed coinbaseAddr,\\n uint256 rewardAmount,\\n BlockRewardDeprecatedType deprecatedType\\n );\\n /// @dev Emitted when the block reward is submitted.\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\n\\n /// @dev Emitted when the block producer reward is distributed.\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\n event MiningRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the bridge operator reward is distributed.\\n event BridgeOperatorRewardDistributed(\\n address indexed consensusAddr,\\n address indexed bridgeOperator,\\n address indexed recipientAddr,\\n uint256 amount\\n );\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\n event BridgeOperatorRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed bridgeOperator,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\n event StakingRewardDistributionFailed(\\n uint256 totalAmount,\\n address[] consensusAddrs,\\n uint256[] amounts,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the epoch is wrapped up.\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\n\\n /// @dev Error of method caller must be coinbase\\n error ErrCallerMustBeCoinbase();\\n /// @dev Error of only allowed at the end of epoch\\n error ErrAtEndOfEpochOnly();\\n /// @dev Error of query for already wrapped up epoch\\n error ErrAlreadyWrappedEpoch();\\n\\n /**\\n * @dev Submits reward of the current block.\\n *\\n * Requirements:\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\n *\\n */\\n function submitBlockReward() external payable;\\n\\n /**\\n * @dev Wraps up the current epoch.\\n *\\n * Requirements:\\n * - The method must be called when the current epoch is ending.\\n * - The epoch is not wrapped yet.\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\n * Emits the event `WrappedUpEpoch`.\\n *\\n */\\n function wrapUpEpoch() external payable;\\n}\\n\",\"keccak256\":\"0xe4060b7e3b04a0043bd334011fe4ba67c990b0484dad52d7f14b35040989b6ab\",\"license\":\"MIT\"},\"contracts/interfaces/validator/IEmergencyExit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IEmergencyExit {\\n /// @dev Emitted when the fund is locked from an emergency exit request\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\n event EmergencyExitLockedFundReleased(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 unlockedAmount\\n );\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\n event EmergencyExitLockedFundReleasingFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 unlockedAmount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the emergency exit locked amount is updated.\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\n /// @dev Emitted when the emergency expiry duration is updated.\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\n\\n /// @dev Error of already requested emergency exit before.\\n error ErrAlreadyRequestedEmergencyExit();\\n\\n /**\\n * @dev Returns the amount of RON to lock from a consensus address.\\n */\\n function emergencyExitLockedAmount() external returns (uint256);\\n\\n /**\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\n */\\n function emergencyExpiryDuration() external returns (uint256);\\n\\n /**\\n * @dev Sets the amount of RON to lock from a consensus address.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\n *\\n */\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\n\\n /**\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\n *\\n */\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\n\\n /**\\n * @dev Unlocks fund for emergency exit request.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\n *\\n */\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\n\\n /**\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n */\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\n}\\n\",\"keccak256\":\"0x45161abd1e3db83052a06889a0e3a7a5e7ee3306478601d58ac4ed32ccaa75ad\",\"license\":\"MIT\"},\"contracts/interfaces/validator/IRoninValidatorSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ICandidateManager.sol\\\";\\nimport \\\"./info-fragments/ICommonInfo.sol\\\";\\nimport \\\"./ICoinbaseExecution.sol\\\";\\nimport \\\"./ISlashingExecution.sol\\\";\\nimport \\\"./IEmergencyExit.sol\\\";\\n\\ninterface IRoninValidatorSet is\\n ICandidateManager,\\n ICommonInfo,\\n ISlashingExecution,\\n ICoinbaseExecution,\\n IEmergencyExit\\n{}\\n\",\"keccak256\":\"0x813f34747aea4dfb53bbc147abf8dbe5999ce73111c2db99bcb3efb4cf75bb3d\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ISlashingExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ISlashingExecution {\\n /// @dev Emitted when the validator is punished.\\n event ValidatorPunished(\\n address indexed consensusAddr,\\n uint256 indexed period,\\n uint256 jailedUntil,\\n uint256 deductedStakingAmount,\\n bool blockProducerRewardDeprecated,\\n bool bridgeOperatorRewardDeprecated\\n );\\n /// @dev Emitted when the validator get out of jail by bailout.\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\n\\n /// @dev Error of cannot bailout due to high tier slash.\\n error ErrCannotBailout(address validator);\\n\\n /**\\n * @dev Finalize the slash request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorPunished`.\\n *\\n */\\n function execSlash(\\n address _validatorAddr,\\n uint256 _newJailedUntil,\\n uint256 _slashAmount,\\n bool _cannotBailout\\n ) external;\\n\\n /**\\n * @dev Finalize the bailout request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorUnjailed`.\\n *\\n */\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\n}\\n\",\"keccak256\":\"0x80362c42fdc0ee06543a2abbffee961fe51c15a7c5e18933a9c34897e50d07fe\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/ICommonInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IJailingInfo.sol\\\";\\nimport \\\"./ITimingInfo.sol\\\";\\nimport \\\"./IValidatorInfoV2.sol\\\";\\n\\ninterface ICommonInfo is ITimingInfo, IJailingInfo, IValidatorInfoV2 {\\n struct EmergencyExitInfo {\\n uint256 lockedAmount;\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\n uint256 recyclingAt;\\n }\\n\\n /// @dev Emitted when the deprecated reward is withdrawn.\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\n\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\n error ErrUnauthorizedReceiveRON();\\n /// @dev Error thrown when queries for a non existent info.\\n error NonExistentRecyclingInfo();\\n\\n /**\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\n */\\n function totalDeprecatedReward() external view returns (uint256);\\n\\n /**\\n * @dev Returns the emergency exit request.\\n */\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\n}\\n\",\"keccak256\":\"0x3fdfa86da33b889e5153075ffc028d6b0c607480a96b532fbbbc48ac7bbf27c9\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/IJailingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IJailingInfo {\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkJailed(address) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeft(\\n address _addr\\n ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\n */\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeftAtBlock(\\n address _addr,\\n uint256 _blockNum\\n ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\n */\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\n */\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2b1846b05ca1d636299fb929c1bd7b392b236f5e3f7aa3e7eea2c6d57b8836fb\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/ITimingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ITimingInfo {\\n /**\\n * @dev Returns the block that validator set was updated.\\n */\\n function getLastUpdatedBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the number of blocks in a epoch.\\n */\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\n\\n /**\\n * @dev Returns the epoch index from the block number.\\n */\\n function epochOf(uint256 _block) external view returns (uint256);\\n\\n /**\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\n */\\n function epochEndingAt(uint256 _block) external view returns (bool);\\n\\n /**\\n * @dev Tries to get the period index from the epoch number.\\n */\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\n\\n /**\\n * @dev Returns whether the period ending at the current block number.\\n */\\n function isPeriodEnding() external view returns (bool);\\n\\n /**\\n * @dev Returns the period index from the current block.\\n */\\n function currentPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the block number that the current period starts at.\\n */\\n function currentPeriodStartAtBlock() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/IValidatorInfoV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"../../../libraries/EnumFlags.sol\\\";\\n\\ninterface IValidatorInfoV2 {\\n /**\\n * @dev Error thrown when an invalid maximum prioritized validator number is provided.\\n */\\n error ErrInvalidMaxPrioritizedValidatorNumber();\\n\\n /// @dev Emitted when the number of max validator is updated.\\n event MaxValidatorNumberUpdated(uint256);\\n /// @dev Emitted when the number of reserved slots for prioritized validators is updated.\\n event MaxPrioritizedValidatorNumberUpdated(uint256);\\n\\n /**\\n * @dev Returns the maximum number of validators in the epoch.\\n */\\n function maxValidatorNumber() external view returns (uint256 _maximumValidatorNumber);\\n\\n /**\\n * @dev Returns the number of reserved slots for prioritized validators.\\n */\\n function maxPrioritizedValidatorNumber() external view returns (uint256 _maximumPrioritizedValidatorNumber);\\n\\n /**\\n * @dev Returns the current validator list.\\n */\\n function getValidators() external view returns (address[] memory _validatorList);\\n\\n /**\\n * @dev Returns the current block producer list.\\n */\\n function getBlockProducers() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns whether the address is block producer or not.\\n */\\n function isBlockProducer(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns total numbers of the block producers.\\n */\\n function totalBlockProducers() external view returns (uint256);\\n\\n /**\\n * @dev Updates the max validator number\\n *\\n * Requirements:\\n * - The method caller is admin\\n *\\n * Emits the event `MaxValidatorNumberUpdated`\\n *\\n */\\n function setMaxValidatorNumber(uint256 _maxValidatorNumber) external;\\n\\n /**\\n * @dev Updates the number of reserved slots for prioritized validators\\n *\\n * Requirements:\\n * - The method caller is admin\\n *\\n * Emits the event `MaxPrioritizedValidatorNumberUpdated`\\n *\\n */\\n function setMaxPrioritizedValidatorNumber(uint256 _maxPrioritizedValidatorNumber) external;\\n}\\n\",\"keccak256\":\"0x6213c188a1323b242a098394b91caf9481e257bd57a0804cb2aa890377a993ed\",\"license\":\"MIT\"},\"contracts/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA; ) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB; ) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\"},\"contracts/libraries/EnumFlags.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This library implements checking flag of an enumerated value.\\n * The originated idea is inherited from [Enum.HashFlag(Enum)](https://learn.microsoft.com/en-us/dotnet/api/system.enum.hasflag?view=net-6.0) method of C#.\\n */\\nlibrary EnumFlags {\\n enum ValidatorFlag {\\n None, // bit(00)\\n BlockProducer, // bit(01)\\n DeprecatedBridgeOperator, // bit(10)\\n Both // bit(11)\\n }\\n\\n function isNone(ValidatorFlag _value) internal pure returns (bool) {\\n return uint8(_value) == 0;\\n }\\n\\n /**\\n * @dev Checks if `_value` has `_flag`.\\n */\\n function hasFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (bool) {\\n return (uint8(_value) & uint8(_flag)) != 0;\\n }\\n\\n /**\\n * @dev Calculate new value of `_value` after adding `_flag`.\\n */\\n function addFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\\n return ValidatorFlag(uint8(_value) | uint8(_flag));\\n }\\n\\n /**\\n * @dev Calculate new value of `_value` after remove `_flag`.\\n */\\n function removeFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\\n return ValidatorFlag(uint8(_value) & ~uint8(_flag));\\n }\\n}\\n\",\"keccak256\":\"0xa712f0d1a323ee39f23eb3ee3278b4ec25fe2e536b1ccc629578c66f277c088d\",\"license\":\"UNLICENSED\"},\"contracts/libraries/Math.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary Math {\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns whether the number `c` is in range of [a; b].\\n */\\n function inRange(uint256 c, uint256 a, uint256 b) internal pure returns (bool) {\\n return a <= c && c <= b;\\n }\\n\\n /**\\n * @dev Returns whether two inclusive ranges [x1;x2] and [y1;y2] overlap.\\n */\\n function twoRangeOverlap(uint256 x1, uint256 x2, uint256 y1, uint256 y2) internal pure returns (bool) {\\n return x1 <= y2 && y1 <= x2;\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 upperbound) internal pure returns (uint256) {\\n return min(a + b, upperbound);\\n }\\n\\n /**\\n * @dev Returns value of a - b; in case of negative result, 0 is returned.\\n */\\n function subNonNegative(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a - b : 0;\\n }\\n\\n /**\\n * @dev Returns value of `a + zeroable` if zerobale is not 0; otherwise, return 0.\\n */\\n function addIfNonZero(uint256 a, uint256 zeroable) internal pure returns (uint256) {\\n return zeroable != 0 ? a + zeroable : 0;\\n }\\n}\\n\",\"keccak256\":\"0xd73170f448c644a47024c7dbcf4afc3cc7ad27f61737c6ea4c3b543ec5cdb7e9\",\"license\":\"UNLICENSED\"},\"contracts/ronin/gateway/BridgeSlash.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { BridgeTrackingHelper } from \\\"../../extensions/bridge-operator-governance/BridgeTrackingHelper.sol\\\";\\nimport { IHasContracts, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { IBridgeSlash } from \\\"../../interfaces/bridge/IBridgeSlash.sol\\\";\\nimport { IERC165, IBridgeManagerCallback } from \\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { IBridgeTracking } from \\\"../../interfaces/bridge/IBridgeTracking.sol\\\";\\nimport { IRoninValidatorSet } from \\\"../../interfaces/validator/IRoninValidatorSet.sol\\\";\\nimport { Math } from \\\"../../libraries/Math.sol\\\";\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrLengthMismatch } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title BridgeSlash\\n * @dev A contract that implements slashing functionality for bridge operators based on their availability.\\n */\\ncontract BridgeSlash is\\n IBridgeSlash,\\n IBridgeManagerCallback,\\n BridgeTrackingHelper,\\n IdentityGuard,\\n Initializable,\\n HasContracts\\n{\\n /// @inheritdoc IBridgeSlash\\n uint256 public constant TIER_1_PENALTY_DURATION = 1;\\n /// @inheritdoc IBridgeSlash\\n uint256 public constant TIER_2_PENALTY_DURATION = 5;\\n /// @inheritdoc IBridgeSlash\\n uint256 public constant MINIMUM_VOTE_THRESHOLD = 50;\\n /// @inheritdoc IBridgeSlash\\n uint256 public constant REMOVE_DURATION_THRESHOLD = 30;\\n\\n /// @dev Tier 1 slashing threshold ratio is 10%\\n uint256 private constant TIER_1_THRESHOLD = 10_00;\\n /// @dev Tier 2 slashing threshold ratio is 30%\\n uint256 private constant TIER_2_THRESHOLD = 30_00;\\n /// @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\\n uint256 private constant PERCENTAGE_FRACTION = 100_00;\\n /// @dev This value is set to the maximum value of uint128 to indicate a permanent slash duration.\\n uint256 private constant SLASH_PERMANENT_DURATION = type(uint128).max;\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeSlash.bridgeSlashInfos.slot\\\") - 1\\n bytes32 private constant BRIDGE_SLASH_INFOS_SLOT = 0xd08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfe;\\n\\n /**\\n * @dev The modifier verifies if the `totalVote` is non-zero, indicating the presence of ballots for the period.\\n * @param totalVote The total number of ballots for the period.\\n */\\n modifier onlyPeriodHasEnoughVotes(uint256 totalVote) {\\n if (totalVote <= MINIMUM_VOTE_THRESHOLD) return;\\n _;\\n }\\n\\n constructor() payable {\\n _disableInitializers();\\n }\\n\\n function initialize(\\n address validatorContract,\\n address bridgeManagerContract,\\n address bridgeTrackingContract\\n ) external initializer {\\n _setContract(ContractType.VALIDATOR, validatorContract);\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n _setContract(ContractType.BRIDGE_TRACKING, bridgeTrackingContract);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsAdded(\\n address[] calldata bridgeOperators,\\n bool[] memory addeds\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint256 length = bridgeOperators.length;\\n if (length != addeds.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n\\n for (uint256 i; i < length; ) {\\n unchecked {\\n if (addeds[i]) {\\n _bridgeSlashInfos[bridgeOperators[i]].newlyAddedAtPeriod = uint128(currentPeriod);\\n }\\n\\n ++i;\\n }\\n }\\n\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorUpdated(\\n address currentBridgeOperator,\\n address newBridgeOperator\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n\\n _bridgeSlashInfos[newBridgeOperator] = _bridgeSlashInfos[currentBridgeOperator];\\n delete _bridgeSlashInfos[currentBridgeOperator];\\n\\n return IBridgeManagerCallback.onBridgeOperatorUpdated.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function execSlashBridgeOperators(\\n address[] memory allBridgeOperators,\\n uint256[] memory ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) external onlyContract(ContractType.BRIDGE_TRACKING) onlyPeriodHasEnoughVotes(totalVote) returns (bool slashed) {\\n uint256 length = allBridgeOperators.length;\\n if (length != ballots.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) return false;\\n if (!_isValidBridgeTrackingResponse(totalBallot, totalVote, ballots)) {\\n emit BridgeTrackingIncorrectlyResponded();\\n return false;\\n }\\n\\n // Get penalty durations for each slash tier.\\n uint256[] memory penaltyDurations = _getPenaltyDurations();\\n // Get the storage mapping for bridge slash information.\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n\\n // Declare variables for iteration.\\n BridgeSlashInfo memory status;\\n uint256 slashUntilPeriod;\\n address bridgeOperator;\\n Tier tier;\\n\\n for (uint256 i; i < length; ) {\\n bridgeOperator = allBridgeOperators[i];\\n status = _bridgeSlashInfos[bridgeOperator];\\n\\n // Check if the bridge operator was added before the current period.\\n // Bridge operators added in current period will not be slashed.\\n if (status.newlyAddedAtPeriod < period) {\\n // Determine the slash tier for the bridge operator based on their ballots.\\n tier = _getSlashTier(ballots[i], totalVote);\\n\\n slashUntilPeriod = _calcSlashUntilPeriod(tier, period, status.slashUntilPeriod, penaltyDurations);\\n\\n // Check if the slash duration exceeds the threshold for removal.\\n if (_isSlashDurationMetRemovalThreshold(slashUntilPeriod, period)) {\\n slashUntilPeriod = SLASH_PERMANENT_DURATION;\\n emit RemovalRequested(period, bridgeOperator);\\n }\\n\\n // Emit the Slashed event if the tier is not Tier 0 and bridge operator will not be removed.\\n // Update the slash until period number for the bridge operator if the tier is not Tier 0.\\n if (tier != Tier.Tier0) {\\n slashed = true;\\n\\n if (slashUntilPeriod != SLASH_PERMANENT_DURATION) {\\n emit Slashed(tier, bridgeOperator, period, slashUntilPeriod);\\n }\\n\\n // Store updated slash until period\\n _bridgeSlashInfos[bridgeOperator].slashUntilPeriod = uint128(slashUntilPeriod);\\n }\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsRemoved(\\n address[] calldata,\\n bool[] calldata\\n ) external view onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IERC165\\n */\\n function supportsInterface(bytes4 interfaceId) external pure returns (bool) {\\n return interfaceId == type(IBridgeManagerCallback).interfaceId || interfaceId == type(IERC165).interfaceId;\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function getSlashUntilPeriodOf(\\n address[] calldata bridgeOperators\\n ) external view returns (uint256[] memory untilPeriods) {\\n uint256 length = bridgeOperators.length;\\n untilPeriods = new uint256[](length);\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n\\n for (uint256 i; i < length; ) {\\n untilPeriods[i] = _bridgeSlashInfos[bridgeOperators[i]].slashUntilPeriod;\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods) {\\n uint256 length = bridgeOperators.length;\\n addedPeriods = new uint256[](length);\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n\\n for (uint256 i; i < length; ) {\\n addedPeriods[i] = _bridgeSlashInfos[bridgeOperators[i]].newlyAddedAtPeriod;\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations) {\\n penaltyDurations = _getPenaltyDurations();\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier) {\\n tier = _getSlashTier(ballot, totalVote);\\n }\\n\\n /**\\n * @dev Checks if the slash duration exceeds the threshold for removal and handles it accordingly.\\n * @param slashUntilPeriod The slash until period number.\\n * @param period The current period.\\n * @return met A boolean indicates that the threshold for removal is met.\\n */\\n function _isSlashDurationMetRemovalThreshold(\\n uint256 slashUntilPeriod,\\n uint256 period\\n ) internal pure returns (bool met) {\\n met = slashUntilPeriod - (period - 1) >= REMOVE_DURATION_THRESHOLD;\\n }\\n\\n /**\\n * @dev Calculates the slash until period based on the specified tier, current period, and slash until period.\\n * @param tier The slash tier representing the severity of the slash.\\n * @param period The current period in which the calculation is performed.\\n * @param slashUntilPeriod The existing slash until period.\\n * @param penaltyDurations An array of penalty durations for each slash tier.\\n * @return newSlashUntilPeriod The newly calculated slash until period.\\n */\\n function _calcSlashUntilPeriod(\\n Tier tier,\\n uint256 period,\\n uint256 slashUntilPeriod,\\n uint256[] memory penaltyDurations\\n ) internal pure returns (uint256 newSlashUntilPeriod) {\\n // Calculate the slash until period number.\\n newSlashUntilPeriod = penaltyDurations[uint8(tier)] + Math.max(period - 1, slashUntilPeriod);\\n }\\n\\n /**\\n * @dev Internal function to determine the slashing tier based on the given ballot count and total votes.\\n * @param ballot The individual ballot count of a bridge operator.\\n * @param totalVote The total number of votes recorded for the bridge operator.\\n * @return tier The calculated slashing tier for the bridge operator.\\n * @notice The `ratio` is calculated as the percentage of uncast votes (totalVote - ballot) relative to the total votes.\\n */\\n function _getSlashTier(uint256 ballot, uint256 totalVote) internal pure virtual returns (Tier tier) {\\n uint256 ratio = ((totalVote - ballot) * PERCENTAGE_FRACTION) / totalVote;\\n tier = ratio > TIER_2_THRESHOLD ? Tier.Tier2 : ratio > TIER_1_THRESHOLD ? Tier.Tier1 : Tier.Tier0;\\n }\\n\\n /**\\n * @dev Internal function to access the mapping from bridge operator => BridgeSlashInfo.\\n * @return bridgeSlashInfos the mapping from bridge operator => BridgeSlashInfo.\\n */\\n function _getBridgeSlashInfos() internal pure returns (mapping(address => BridgeSlashInfo) storage bridgeSlashInfos) {\\n assembly (\\\"memory-safe\\\") {\\n bridgeSlashInfos.slot := BRIDGE_SLASH_INFOS_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to retrieve the penalty durations for each slashing tier.\\n * @return penaltyDurations An array containing the penalty durations for Tier0, Tier1, and Tier2 in that order.\\n */\\n function _getPenaltyDurations() internal pure virtual returns (uint256[] memory penaltyDurations) {\\n // reserve index 0\\n penaltyDurations = new uint256[](3);\\n penaltyDurations[uint8(Tier.Tier1)] = TIER_1_PENALTY_DURATION;\\n penaltyDurations[uint8(Tier.Tier2)] = TIER_2_PENALTY_DURATION;\\n }\\n}\\n\",\"keccak256\":\"0x27b4863ec0d3398afa83dd8228acd5579f04061234e1a2e869950cb0ae2e9820\",\"license\":\"MIT\"},\"contracts/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\",\"keccak256\":\"0x951a466bb76f385554960531e63e64a5bd314df341bb6c95e6e81448d6984ac0\",\"license\":\"MIT\"},\"contracts/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n /* 0 */ UNKNOWN,\\n /* 1 */ PAUSE_ENFORCER,\\n /* 2 */ BRIDGE,\\n /* 3 */ BRIDGE_TRACKING,\\n /* 4 */ GOVERNANCE_ADMIN,\\n /* 5 */ MAINTENANCE,\\n /* 6 */ SLASH_INDICATOR,\\n /* 7 */ STAKING_VESTING,\\n /* 8 */ VALIDATOR,\\n /* 9 */ STAKING,\\n /* 10 */ RONIN_TRUSTED_ORGANIZATION,\\n /* 11 */ BRIDGE_MANAGER,\\n /* 12 */ BRIDGE_SLASH,\\n /* 13 */ BRIDGE_REWARD\\n}\\n\",\"keccak256\":\"0xf72feff9afafcb5cadc1b05c6e0b998ea5d66c7ece57c3e482e560d0a1bb4079\",\"license\":\"MIT\"},\"contracts/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface.\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n * @notice If the contract does not support the interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n if (!IERC165(contractAddr).supportsInterface(interfaceId)) {\\n revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2e1aef91018590d52fa9ca9e63708c8ef3e9ee7061e8947d4bb30b07d721a229\",\"license\":\"MIT\"},\"contracts/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n /* 0 */ UNKNOWN,\\n /* 1 */ ADMIN,\\n /* 2 */ COINBASE,\\n /* 3 */ GOVERNOR,\\n /* 4 */ CANDIDATE_ADMIN,\\n /* 5 */ WITHDRAWAL_MIGRATOR,\\n /* 6 */ __DEPRECATED_BRIDGE_OPERATOR,\\n /* 7 */ BLOCK_PRODUCER,\\n /* 8 */ VALIDATOR_CANDIDATE\\n}\\n\",\"keccak256\":\"0xa98cec38c640c4e37f475debbcd366226f1188c3f5ea6e29de768bd33e021873\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405261000c610011565b6100d1565b600054610100900460ff161561007d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100cf576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6114d9806100e06000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063c0c53b8b11610097578063ddc3f7f611610066578063ddc3f7f614610213578063de981f1b1461021b578063f9f6087314610246578063fbb2f1941461024e57600080fd5b8063c0c53b8b146101d2578063c48549de146101e5578063c9631a12146101f8578063d1e1f2f81461020b57600080fd5b80635ebae8a0116100d35780635ebae8a0146101735780636dda44081461019f578063865e6fd3146101b55780639c2f4459146101ca57600080fd5b806301ffc9a7146101055780631288810a1461012d5780634dca59251461014d5780635311153b14610160575b600080fd5b610118610113366004610e59565b61026e565b60405190151581526020015b60405180910390f35b61014061013b366004610ecf565b6102a5565b6040516101249190610f11565b61011861015b366004611042565b61038d565b61014061016e366004610ecf565b61062d565b61018661018136600461111d565b610706565b6040516001600160e01b03199091168152602001610124565b6101a7600181565b604051908152602001610124565b6101c86101c33660046111fb565b610883565b005b6101a7603281565b6101c86101e036600461122e565b6108a2565b6101866101f3366004611271565b6109cf565b6101866102063660046112dd565b6109ee565b6101a7600581565b6101a7601e81565b61022e6102293660046112f9565b610a6d565b6040516001600160a01b039091168152602001610124565b610140610ae8565b61026161025c366004611314565b610af7565b604051610124919061134c565b60006001600160e01b031982166314d72edb60e21b148061029f57506001600160e01b031982166301ffc9a760e01b145b92915050565b6060818067ffffffffffffffff8111156102c1576102c1610f55565b6040519080825280602002602001820160405280156102ea578160200160208202803683370190505b5091506000805160206114ad83398151915260005b828110156103845781600087878481811061031c5761031c611366565b9050602002016020810190610331919061137c565b6001600160a01b031681526020810191909152604001600020548451600160801b9091046001600160801b03169085908390811061037157610371611366565b60209081029190910101526001016102ff565b50505092915050565b6000600361039a81610b0a565b836032811115610622578751875181146103da576040516306b5667560e21b81526001600160e01b03196000351660048201526024015b60405180910390fd5b806000036103ec576000935050610622565b6103f787878a610b59565b61042e576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a16000935050610622565b6000610438610bd6565b604080518082019091526000808252602082018190529192506000805160206114ad833981519152918080805b87811015610619578f818151811061047f5761047f611366565b6020908102919091018101516001600160a01b03811660009081528883526040908190208151808301909252546001600160801b038082168352600160801b90910416928101839052965093508c1115610611576104f68f82815181106104e8576104e8611366565b60200260200101518e610c41565b9150610511828d87600001516001600160801b03168a610c93565b935061051d848d610cea565b15610563576040516001600160801b0394506001600160a01b038416908d907fb32a150b9737190a456d8b2b81dd7d592a799ab2933ea494e44351acd41f835d90600090a35b600082600281111561057757610577611336565b146106115760019a506001600160801b0384146105df578b836001600160a01b03168360028111156105ab576105ab611336565b6040518781527f14441e950b7f9ed959e16b2405dd1a9d163efd5d85027b222dcf78b902a00d759060200160405180910390a45b6001600160a01b038316600090815260208790526040902080546001600160801b0319166001600160801b0386161790555b600101610465565b50505050505050505b505095945050505050565b6060818067ffffffffffffffff81111561064957610649610f55565b604051908082528060200260200182016040528015610672578160200160208202803683370190505b5091506000805160206114ad83398151915260005b82811015610384578160008787848181106106a4576106a4611366565b90506020020160208101906106b9919061137c565b6001600160a01b0316815260208101919091526040016000205484516001600160801b03909116908590839081106106f3576106f3611366565b6020908102919091010152600101610687565b6000600b61071381610b0a565b825184908114610744576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8060000361075c57506302f5d74560e51b915061087b565b6000805160206114ad83398151915260006107776008610a6d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d89190611397565b905060005b8381101561086c578681815181106107f7576107f7611366565b60200260200101511561086457818360008b8b8581811061081a5761081a611366565b905060200201602081019061082f919061137c565b6001600160a01b03168152602081019190915260400160002080546001600160801b03928316600160801b0292169190911790555b6001016107dd565b506302f5d74560e51b94505050505b509392505050565b61088b610d0c565b61089481610d68565b61089e8282610d9e565b5050565b600054610100900460ff16158080156108c25750600054600160ff909116105b806108dc5750303b1580156108dc575060005460ff166001145b61093f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d1565b6000805460ff191660011790558015610962576000805461ff0019166101001790555b61096d600885610d9e565b610978600b84610d9e565b610983600383610d9e565b80156109c9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000600b6109dc81610b0a565b506302f5d74560e51b95945050505050565b6000600b6109fb81610b0a565b50506001600160a01b0391821660008181526000805160206114ad8339815191526020526040808220939094168152928320825481546001600160801b0319166001600160801b0391821690811783558454600160801b908190049092169091021790558252556364b18d0960e11b90565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600d811115610aa457610aa4611336565b60ff1681526020810191909152604001600020546001600160a01b0316905080610ae3578160405163409140df60e11b81526004016103d191906113c4565b919050565b6060610af2610bd6565b905090565b6000610b038383610c41565b9392505050565b610b1381610a6d565b6001600160a01b0316336001600160a01b031614610b56576000356001600160e01b03191681336040516320e0f98d60e21b81526004016103d1939291906113d2565b50565b8051600190600090815b81811015610bbe5785858281518110610b7e57610b7e611366565b60200260200101511115610b955760009350610bbe565b848181518110610ba757610ba7611366565b602002602001015183019250806001019050610b63565b50828015610bcc5750858211155b9695505050505050565b604080516003808252608082019092526060916020820183803683370190505090506001818160ff1681518110610c0f57610c0f611366565b6020908102919091010152600581600260ff1681518110610c3257610c32611366565b60200260200101818152505090565b60008082612710610c52868361141f565b610c5c9190611432565b610c669190611449565b9050610bb88111610c88576103e88111610c81576000610c8b565b6001610c8b565b60025b949350505050565b6000610ca9610ca360018661141f565b84610e42565b82866002811115610cbc57610cbc611336565b60ff1681518110610ccf57610ccf611366565b6020026020010151610ce1919061146b565b95945050505050565b6000601e610cf960018461141f565b610d03908561141f565b10159392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610d66576000356001600160e01b0319166001604051620f948f60ea1b81526004016103d192919061147e565b565b806001600160a01b03163b600003610b5657604051630bfc64a360e21b81526001600160a01b03821660048201526024016103d1565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d811115610dd457610dd4611336565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d811115610e1557610e15611336565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b600081831015610e525781610b03565b5090919050565b600060208284031215610e6b57600080fd5b81356001600160e01b031981168114610b0357600080fd5b60008083601f840112610e9557600080fd5b50813567ffffffffffffffff811115610ead57600080fd5b6020830191508360208260051b8501011115610ec857600080fd5b9250929050565b60008060208385031215610ee257600080fd5b823567ffffffffffffffff811115610ef957600080fd5b610f0585828601610e83565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610f4957835183529284019291840191600101610f2d565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f9457610f94610f55565b604052919050565b600067ffffffffffffffff821115610fb657610fb6610f55565b5060051b60200190565b80356001600160a01b0381168114610ae357600080fd5b600082601f830112610fe857600080fd5b81356020610ffd610ff883610f9c565b610f6b565b82815260059290921b8401810191818101908684111561101c57600080fd5b8286015b848110156110375780358352918301918301611020565b509695505050505050565b600080600080600060a0868803121561105a57600080fd5b853567ffffffffffffffff8082111561107257600080fd5b818801915088601f83011261108657600080fd5b81356020611096610ff883610f9c565b82815260059290921b8401810191818101908c8411156110b557600080fd5b948201945b838610156110da576110cb86610fc0565b825294820194908201906110ba565b995050890135925050808211156110f057600080fd5b506110fd88828901610fd7565b959895975050505060408401359360608101359360809091013592509050565b60008060006040848603121561113257600080fd5b833567ffffffffffffffff8082111561114a57600080fd5b61115687838801610e83565b909550935060209150858201358181111561117057600080fd5b86019050601f8101871361118357600080fd5b8035611191610ff882610f9c565b81815260059190911b820183019083810190898311156111b057600080fd5b928401925b828410156111dd57833580151581146111ce5760008081fd5b825292840192908401906111b5565b80955050505050509250925092565b8035600e8110610ae357600080fd5b6000806040838503121561120e57600080fd5b611217836111ec565b915061122560208401610fc0565b90509250929050565b60008060006060848603121561124357600080fd5b61124c84610fc0565b925061125a60208501610fc0565b915061126860408501610fc0565b90509250925092565b6000806000806040858703121561128757600080fd5b843567ffffffffffffffff8082111561129f57600080fd5b6112ab88838901610e83565b909650945060208701359150808211156112c457600080fd5b506112d187828801610e83565b95989497509550505050565b600080604083850312156112f057600080fd5b61121783610fc0565b60006020828403121561130b57600080fd5b610b03826111ec565b6000806040838503121561132757600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b602081016003831061136057611360611336565b91905290565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561138e57600080fd5b610b0382610fc0565b6000602082840312156113a957600080fd5b5051919050565b600e81106113c0576113c0611336565b9052565b6020810161029f82846113b0565b6001600160e01b031984168152606081016113f060208301856113b0565b6001600160a01b03929092166040919091015292915050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561029f5761029f611409565b808202811582820484141761029f5761029f611409565b60008261146657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561029f5761029f611409565b6001600160e01b031983168152604081016009831061149f5761149f611336565b826020830152939250505056fed08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfea164736f6c6343000811000a", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063c0c53b8b11610097578063ddc3f7f611610066578063ddc3f7f614610213578063de981f1b1461021b578063f9f6087314610246578063fbb2f1941461024e57600080fd5b8063c0c53b8b146101d2578063c48549de146101e5578063c9631a12146101f8578063d1e1f2f81461020b57600080fd5b80635ebae8a0116100d35780635ebae8a0146101735780636dda44081461019f578063865e6fd3146101b55780639c2f4459146101ca57600080fd5b806301ffc9a7146101055780631288810a1461012d5780634dca59251461014d5780635311153b14610160575b600080fd5b610118610113366004610e59565b61026e565b60405190151581526020015b60405180910390f35b61014061013b366004610ecf565b6102a5565b6040516101249190610f11565b61011861015b366004611042565b61038d565b61014061016e366004610ecf565b61062d565b61018661018136600461111d565b610706565b6040516001600160e01b03199091168152602001610124565b6101a7600181565b604051908152602001610124565b6101c86101c33660046111fb565b610883565b005b6101a7603281565b6101c86101e036600461122e565b6108a2565b6101866101f3366004611271565b6109cf565b6101866102063660046112dd565b6109ee565b6101a7600581565b6101a7601e81565b61022e6102293660046112f9565b610a6d565b6040516001600160a01b039091168152602001610124565b610140610ae8565b61026161025c366004611314565b610af7565b604051610124919061134c565b60006001600160e01b031982166314d72edb60e21b148061029f57506001600160e01b031982166301ffc9a760e01b145b92915050565b6060818067ffffffffffffffff8111156102c1576102c1610f55565b6040519080825280602002602001820160405280156102ea578160200160208202803683370190505b5091506000805160206114ad83398151915260005b828110156103845781600087878481811061031c5761031c611366565b9050602002016020810190610331919061137c565b6001600160a01b031681526020810191909152604001600020548451600160801b9091046001600160801b03169085908390811061037157610371611366565b60209081029190910101526001016102ff565b50505092915050565b6000600361039a81610b0a565b836032811115610622578751875181146103da576040516306b5667560e21b81526001600160e01b03196000351660048201526024015b60405180910390fd5b806000036103ec576000935050610622565b6103f787878a610b59565b61042e576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a16000935050610622565b6000610438610bd6565b604080518082019091526000808252602082018190529192506000805160206114ad833981519152918080805b87811015610619578f818151811061047f5761047f611366565b6020908102919091018101516001600160a01b03811660009081528883526040908190208151808301909252546001600160801b038082168352600160801b90910416928101839052965093508c1115610611576104f68f82815181106104e8576104e8611366565b60200260200101518e610c41565b9150610511828d87600001516001600160801b03168a610c93565b935061051d848d610cea565b15610563576040516001600160801b0394506001600160a01b038416908d907fb32a150b9737190a456d8b2b81dd7d592a799ab2933ea494e44351acd41f835d90600090a35b600082600281111561057757610577611336565b146106115760019a506001600160801b0384146105df578b836001600160a01b03168360028111156105ab576105ab611336565b6040518781527f14441e950b7f9ed959e16b2405dd1a9d163efd5d85027b222dcf78b902a00d759060200160405180910390a45b6001600160a01b038316600090815260208790526040902080546001600160801b0319166001600160801b0386161790555b600101610465565b50505050505050505b505095945050505050565b6060818067ffffffffffffffff81111561064957610649610f55565b604051908082528060200260200182016040528015610672578160200160208202803683370190505b5091506000805160206114ad83398151915260005b82811015610384578160008787848181106106a4576106a4611366565b90506020020160208101906106b9919061137c565b6001600160a01b0316815260208101919091526040016000205484516001600160801b03909116908590839081106106f3576106f3611366565b6020908102919091010152600101610687565b6000600b61071381610b0a565b825184908114610744576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8060000361075c57506302f5d74560e51b915061087b565b6000805160206114ad83398151915260006107776008610a6d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d89190611397565b905060005b8381101561086c578681815181106107f7576107f7611366565b60200260200101511561086457818360008b8b8581811061081a5761081a611366565b905060200201602081019061082f919061137c565b6001600160a01b03168152602081019190915260400160002080546001600160801b03928316600160801b0292169190911790555b6001016107dd565b506302f5d74560e51b94505050505b509392505050565b61088b610d0c565b61089481610d68565b61089e8282610d9e565b5050565b600054610100900460ff16158080156108c25750600054600160ff909116105b806108dc5750303b1580156108dc575060005460ff166001145b61093f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d1565b6000805460ff191660011790558015610962576000805461ff0019166101001790555b61096d600885610d9e565b610978600b84610d9e565b610983600383610d9e565b80156109c9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000600b6109dc81610b0a565b506302f5d74560e51b95945050505050565b6000600b6109fb81610b0a565b50506001600160a01b0391821660008181526000805160206114ad8339815191526020526040808220939094168152928320825481546001600160801b0319166001600160801b0391821690811783558454600160801b908190049092169091021790558252556364b18d0960e11b90565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600d811115610aa457610aa4611336565b60ff1681526020810191909152604001600020546001600160a01b0316905080610ae3578160405163409140df60e11b81526004016103d191906113c4565b919050565b6060610af2610bd6565b905090565b6000610b038383610c41565b9392505050565b610b1381610a6d565b6001600160a01b0316336001600160a01b031614610b56576000356001600160e01b03191681336040516320e0f98d60e21b81526004016103d1939291906113d2565b50565b8051600190600090815b81811015610bbe5785858281518110610b7e57610b7e611366565b60200260200101511115610b955760009350610bbe565b848181518110610ba757610ba7611366565b602002602001015183019250806001019050610b63565b50828015610bcc5750858211155b9695505050505050565b604080516003808252608082019092526060916020820183803683370190505090506001818160ff1681518110610c0f57610c0f611366565b6020908102919091010152600581600260ff1681518110610c3257610c32611366565b60200260200101818152505090565b60008082612710610c52868361141f565b610c5c9190611432565b610c669190611449565b9050610bb88111610c88576103e88111610c81576000610c8b565b6001610c8b565b60025b949350505050565b6000610ca9610ca360018661141f565b84610e42565b82866002811115610cbc57610cbc611336565b60ff1681518110610ccf57610ccf611366565b6020026020010151610ce1919061146b565b95945050505050565b6000601e610cf960018461141f565b610d03908561141f565b10159392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610d66576000356001600160e01b0319166001604051620f948f60ea1b81526004016103d192919061147e565b565b806001600160a01b03163b600003610b5657604051630bfc64a360e21b81526001600160a01b03821660048201526024016103d1565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d811115610dd457610dd4611336565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d811115610e1557610e15611336565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b600081831015610e525781610b03565b5090919050565b600060208284031215610e6b57600080fd5b81356001600160e01b031981168114610b0357600080fd5b60008083601f840112610e9557600080fd5b50813567ffffffffffffffff811115610ead57600080fd5b6020830191508360208260051b8501011115610ec857600080fd5b9250929050565b60008060208385031215610ee257600080fd5b823567ffffffffffffffff811115610ef957600080fd5b610f0585828601610e83565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610f4957835183529284019291840191600101610f2d565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f9457610f94610f55565b604052919050565b600067ffffffffffffffff821115610fb657610fb6610f55565b5060051b60200190565b80356001600160a01b0381168114610ae357600080fd5b600082601f830112610fe857600080fd5b81356020610ffd610ff883610f9c565b610f6b565b82815260059290921b8401810191818101908684111561101c57600080fd5b8286015b848110156110375780358352918301918301611020565b509695505050505050565b600080600080600060a0868803121561105a57600080fd5b853567ffffffffffffffff8082111561107257600080fd5b818801915088601f83011261108657600080fd5b81356020611096610ff883610f9c565b82815260059290921b8401810191818101908c8411156110b557600080fd5b948201945b838610156110da576110cb86610fc0565b825294820194908201906110ba565b995050890135925050808211156110f057600080fd5b506110fd88828901610fd7565b959895975050505060408401359360608101359360809091013592509050565b60008060006040848603121561113257600080fd5b833567ffffffffffffffff8082111561114a57600080fd5b61115687838801610e83565b909550935060209150858201358181111561117057600080fd5b86019050601f8101871361118357600080fd5b8035611191610ff882610f9c565b81815260059190911b820183019083810190898311156111b057600080fd5b928401925b828410156111dd57833580151581146111ce5760008081fd5b825292840192908401906111b5565b80955050505050509250925092565b8035600e8110610ae357600080fd5b6000806040838503121561120e57600080fd5b611217836111ec565b915061122560208401610fc0565b90509250929050565b60008060006060848603121561124357600080fd5b61124c84610fc0565b925061125a60208501610fc0565b915061126860408501610fc0565b90509250925092565b6000806000806040858703121561128757600080fd5b843567ffffffffffffffff8082111561129f57600080fd5b6112ab88838901610e83565b909650945060208701359150808211156112c457600080fd5b506112d187828801610e83565b95989497509550505050565b600080604083850312156112f057600080fd5b61121783610fc0565b60006020828403121561130b57600080fd5b610b03826111ec565b6000806040838503121561132757600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b602081016003831061136057611360611336565b91905290565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561138e57600080fd5b610b0382610fc0565b6000602082840312156113a957600080fd5b5051919050565b600e81106113c0576113c0611336565b9052565b6020810161029f82846113b0565b6001600160e01b031984168152606081016113f060208301856113b0565b6001600160a01b03929092166040919091015292915050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561029f5761029f611409565b808202811582820484141761029f5761029f611409565b60008261146657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561029f5761029f611409565b6001600160e01b031983168152604081016009831061149f5761149f611336565b826020830152939250505056fed08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfea164736f6c6343000811000a", - "devdoc": { - "details": "A contract that implements slashing functionality for bridge operators based on their availability.", - "errors": { - "ErrContractTypeNotFound(uint8)": [ + "stateMutability": "pure" + }, + { + "type": "event", + "name": "BridgeSlashed", + "inputs": [ { - "details": "Error of invalid role." + "name": "tier", + "type": "uint8", + "indexed": true, + "internalType": "enum IBridgeSlashEvents.Tier" + }, + { + "name": "bridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "period", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "slashUntilPeriod", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "ErrLengthMismatch(bytes4)": [ + "anonymous": false + }, + { + "type": "event", + "name": "BridgeTrackingIncorrectlyResponded", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "ContractUpdated", + "inputs": [ { - "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", - "params": { - "msgSig": "The function signature (bytes4) that has a length mismatch." - } + "name": "contractType", + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "ErrUnauthorized(bytes4,uint8)": [ + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ { - "details": "Error indicating that the caller is unauthorized to perform a specific function.", - "params": { - "expectedRole": "The role required to perform the function.", - "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." - } + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" } ], - "ErrUnexpectedInternalCall(bytes4,uint8,address)": [ + "anonymous": false + }, + { + "type": "event", + "name": "RemovalRequested", + "inputs": [ { - "details": "Error indicating that the caller is unauthorized to perform a specific function.", - "params": { - "actual": "The actual address that called to the function.", - "expectedContractType": "The contract type required to perform the function.", - "msgSig": "The function signature (bytes4)." - } + "name": "period", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "bridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "ErrZeroCodeContract(address)": [ + "anonymous": false + }, + { + "type": "error", + "name": "ErrContractTypeNotFound", + "inputs": [ { - "details": "Error of set to non-contract." + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ] + }, + { + "type": "error", + "name": "ErrLengthMismatch", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrUnauthorized", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" + } + ] + }, + { + "type": "error", + "name": "ErrUnexpectedInternalCall", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedContractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" } ] }, + { + "type": "error", + "name": "ErrZeroCodeContract", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "address": "0xB03E29Be08E57b2d95Fe9F94966CB86a0DD98481", + "args": "0x", + "ast": "", + "blockNumber": 26515571, + "bytecode": "0x608060405261000c610011565b6100d1565b600054610100900460ff161561007d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100cf576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611583806100e06000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639c2f445911610097578063de981f1b11610066578063de981f1b146101fd578063f8c8765e14610228578063f9f608731461023b578063fbb2f1941461024357600080fd5b80639c2f4459146101d2578063c48549de146101da578063d1e1f2f8146101ed578063ddc3f7f6146101f557600080fd5b80635311153b116100d35780635311153b1461016a5780636dda44081461017d578063865e6fd3146101935780638f851d8a146101a657600080fd5b806301ffc9a7146101055780631288810a1461012d5780633b1544551461014d5780634dca592514610157575b600080fd5b610118610113366004610eb7565b610263565b60405190151581526020015b60405180910390f35b61014061013b366004610f2d565b61029a565b6040516101249190610f6f565b610155610382565b005b6101556101653660046110a4565b610462565b610140610178366004610f2d565b6106f9565b610185600181565b604051908152602001610124565b6101556101a136600461118e565b6107d2565b6101b96101b43660046111c1565b6107f1565b6040516001600160e01b03199091168152602001610124565b610185603281565b6101b96101e83660046112ba565b610970565b610185600581565b610185601e81565b61021061020b366004611326565b61098f565b6040516001600160a01b039091168152602001610124565b610155610236366004611341565b610a0a565b610140610b49565b610256610251366004611395565b610b58565b60405161012491906113cd565b60006001600160e01b031982166312c0151560e21b148061029457506001600160e01b031982166301ffc9a760e01b145b92915050565b6060818067ffffffffffffffff8111156102b6576102b6610fb3565b6040519080825280602002602001820160405280156102df578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610311576103116113e7565b905060200201602081019061032691906113fd565b6001600160a01b031681526020810191909152604001600020548451600160801b9091046001600160801b031690859083908110610366576103666113e7565b60209081029190910101526001016102f4565b50505092915050565b600461038d81610b6b565b600019600154146103da5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b60448201526064015b60405180910390fd5b6103e4600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190611418565b610450906001611447565b60015561045f60046000610bb7565b50565b600361046d81610b6b565b8160015481106106f0578360328111156106ee5786518851146104b1576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8751156106ee576104c3868689610c5b565b6104f5576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a16106ee565b60006104ff610cd8565b6040805180820190915260008082526020820181905291925060008051602061152e833981519152918080805b8e518110156106e6578e8181518110610547576105476113e7565b6020908102919091018101516001600160a01b03811660009081528883526040908190208151808301909252546001600160801b038082168352600160801b90910416928101839052965093508b11156106de576105be8e82815181106105b0576105b06113e7565b60200260200101518d610d43565b91506105d9828c87600001516001600160801b03168a610d95565b93506105e5848c610dec565b1561062b576040516001600160801b0394506001600160a01b038416908c907fb32a150b9737190a456d8b2b81dd7d592a799ab2933ea494e44351acd41f835d90600090a35b600082600281111561063f5761063f6113b7565b146106de576001600160801b0384146106a3578a836001600160a01b031683600281111561066f5761066f6113b7565b6040518781527fa0957b65e189f06dfe2b38ff07e89a0df128ba3fcba66c68f8d2615daebc30a99060200160405180910390a45b6001600160a01b038316600090815260208790526040902080546fffffffffffffffffffffffffffffffff19166001600160801b0386161790555b60010161052c565b505050505050505b505b50505050505050565b6060818067ffffffffffffffff81111561071557610715610fb3565b60405190808252806020026020018201604052801561073e578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610770576107706113e7565b905060200201602081019061078591906113fd565b6001600160a01b0316815260208101919091526040016000205484516001600160801b03909116908590839081106107bf576107bf6113e7565b6020908102919091010152600101610753565b6107da610e0e565b6107e381610e6a565b6107ed8282610bb7565b5050565b6000600b6107fe81610b6b565b82518690811461082f576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8060000361084757506347c28ec560e11b9150610966565b60008051602061152e8339815191526000610862600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561089f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c39190611418565b905060005b83811015610957578681815181106108e2576108e26113e7565b60200260200101511561094f57818360008d8d85818110610905576109056113e7565b905060200201602081019061091a91906113fd565b6001600160a01b03168152602081019190915260400160002080546001600160801b03928316600160801b0292169190911790555b6001016108c8565b506347c28ec560e11b94505050505b5095945050505050565b6000600b61097d81610b6b565b50636242a4ef60e11b95945050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156109c6576109c66113b7565b60ff1681526020810191909152604001600020546001600160a01b0316905080610a05578160405163409140df60e11b81526004016103d1919061146e565b919050565b600054610100900460ff1615808015610a2a5750600054600160ff909116105b80610a445750303b158015610a44575060005460ff166001145b610aa75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d1565b6000805460ff191660011790558015610aca576000805461ff0019166101001790555b610ad5600886610bb7565b610ae0600b85610bb7565b610aeb600384610bb7565b610af6600483610bb7565b6000196001558015610b42576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6060610b53610cd8565b905090565b6000610b648383610d43565b9392505050565b610b748161098f565b6001600160a01b0316336001600160a01b03161461045f576000356001600160e01b03191681336040516320e0f98d60e21b81526004016103d19392919061147c565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610bed57610bed6113b7565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610c2e57610c2e6113b7565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b8051600190600090815b81811015610cc05785858281518110610c8057610c806113e7565b60200260200101511115610c975760009350610cc0565b848181518110610ca957610ca96113e7565b602002602001015183019250806001019050610c65565b50828015610cce5750858211155b9695505050505050565b604080516003808252608082019092526060916020820183803683370190505090506001818160ff1681518110610d1157610d116113e7565b6020908102919091010152600581600260ff1681518110610d3457610d346113e7565b60200260200101818152505090565b60008082612710610d5486836114b3565b610d5e91906114c6565b610d6891906114dd565b9050610bb88111610d8a576103e88111610d83576000610d8d565b6001610d8d565b60025b949350505050565b6000610dab610da56001866114b3565b84610ea0565b82866002811115610dbe57610dbe6113b7565b60ff1681518110610dd157610dd16113e7565b6020026020010151610de39190611447565b95945050505050565b6000601e610dfb6001846114b3565b610e0590856114b3565b10159392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610e68576000356001600160e01b0319166001604051620f948f60ea1b81526004016103d19291906114ff565b565b806001600160a01b03163b60000361045f57604051630bfc64a360e21b81526001600160a01b03821660048201526024016103d1565b600081831015610eb05781610b64565b5090919050565b600060208284031215610ec957600080fd5b81356001600160e01b031981168114610b6457600080fd5b60008083601f840112610ef357600080fd5b50813567ffffffffffffffff811115610f0b57600080fd5b6020830191508360208260051b8501011115610f2657600080fd5b9250929050565b60008060208385031215610f4057600080fd5b823567ffffffffffffffff811115610f5757600080fd5b610f6385828601610ee1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610fa757835183529284019291840191600101610f8b565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ff257610ff2610fb3565b604052919050565b600067ffffffffffffffff82111561101457611014610fb3565b5060051b60200190565b80356001600160a01b0381168114610a0557600080fd5b600082601f83011261104657600080fd5b8135602061105b61105683610ffa565b610fc9565b8083825260208201915060208460051b87010193508684111561107d57600080fd5b602086015b848110156110995780358352918301918301611082565b509695505050505050565b600080600080600060a086880312156110bc57600080fd5b853567ffffffffffffffff808211156110d457600080fd5b818801915088601f8301126110e857600080fd5b813560206110f861105683610ffa565b82815260059290921b8401810191818101908c84111561111757600080fd5b948201945b8386101561113c5761112d8661101e565b8252948201949082019061111c565b9950508901359250508082111561115257600080fd5b5061115f88828901611035565b959895975050505060408401359360608101359360809091013592509050565b803560108110610a0557600080fd5b600080604083850312156111a157600080fd5b6111aa8361117f565b91506111b86020840161101e565b90509250929050565b6000806000806000606086880312156111d957600080fd5b853567ffffffffffffffff808211156111f157600080fd5b6111fd89838a01610ee1565b909750955060209150878201358181111561121757600080fd5b6112238a828b01610ee1565b90965094505060408801358181111561123b57600080fd5b88019050601f8101891361124e57600080fd5b803561125c61105682610ffa565b81815260059190911b8201830190838101908b83111561127b57600080fd5b928401925b828410156112a857833580151581146112995760008081fd5b82529284019290840190611280565b80955050505050509295509295909350565b600080600080604085870312156112d057600080fd5b843567ffffffffffffffff808211156112e857600080fd5b6112f488838901610ee1565b9096509450602087013591508082111561130d57600080fd5b5061131a87828801610ee1565b95989497509550505050565b60006020828403121561133857600080fd5b610b648261117f565b6000806000806080858703121561135757600080fd5b6113608561101e565b935061136e6020860161101e565b925061137c6040860161101e565b915061138a6060860161101e565b905092959194509250565b600080604083850312156113a857600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60208101600383106113e1576113e16113b7565b91905290565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561140f57600080fd5b610b648261101e565b60006020828403121561142a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561029457610294611431565b6010811061146a5761146a6113b7565b9052565b60208101610294828461145a565b6001600160e01b0319841681526060810161149a602083018561145a565b6001600160a01b03929092166040919091015292915050565b8181038181111561029457610294611431565b808202811582820484141761029457610294611431565b6000826114fa57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b03198316815260408101600b8310611520576115206113b7565b826020830152939250505056fed08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfea2646970667358221220a88731885a136f6ffe2ef43beabc7b3a128ab2f3ee20d79c6777fe10326663bf64736f6c63430008170033", + "chainId": 2021, + "contractAbsolutePath": "BridgeSlash.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c80639c2f445911610097578063de981f1b11610066578063de981f1b146101fd578063f8c8765e14610228578063f9f608731461023b578063fbb2f1941461024357600080fd5b80639c2f4459146101d2578063c48549de146101da578063d1e1f2f8146101ed578063ddc3f7f6146101f557600080fd5b80635311153b116100d35780635311153b1461016a5780636dda44081461017d578063865e6fd3146101935780638f851d8a146101a657600080fd5b806301ffc9a7146101055780631288810a1461012d5780633b1544551461014d5780634dca592514610157575b600080fd5b610118610113366004610eb7565b610263565b60405190151581526020015b60405180910390f35b61014061013b366004610f2d565b61029a565b6040516101249190610f6f565b610155610382565b005b6101556101653660046110a4565b610462565b610140610178366004610f2d565b6106f9565b610185600181565b604051908152602001610124565b6101556101a136600461118e565b6107d2565b6101b96101b43660046111c1565b6107f1565b6040516001600160e01b03199091168152602001610124565b610185603281565b6101b96101e83660046112ba565b610970565b610185600581565b610185601e81565b61021061020b366004611326565b61098f565b6040516001600160a01b039091168152602001610124565b610155610236366004611341565b610a0a565b610140610b49565b610256610251366004611395565b610b58565b60405161012491906113cd565b60006001600160e01b031982166312c0151560e21b148061029457506001600160e01b031982166301ffc9a760e01b145b92915050565b6060818067ffffffffffffffff8111156102b6576102b6610fb3565b6040519080825280602002602001820160405280156102df578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610311576103116113e7565b905060200201602081019061032691906113fd565b6001600160a01b031681526020810191909152604001600020548451600160801b9091046001600160801b031690859083908110610366576103666113e7565b60209081029190910101526001016102f4565b50505092915050565b600461038d81610b6b565b600019600154146103da5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b60448201526064015b60405180910390fd5b6103e4600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190611418565b610450906001611447565b60015561045f60046000610bb7565b50565b600361046d81610b6b565b8160015481106106f0578360328111156106ee5786518851146104b1576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8751156106ee576104c3868689610c5b565b6104f5576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a16106ee565b60006104ff610cd8565b6040805180820190915260008082526020820181905291925060008051602061152e833981519152918080805b8e518110156106e6578e8181518110610547576105476113e7565b6020908102919091018101516001600160a01b03811660009081528883526040908190208151808301909252546001600160801b038082168352600160801b90910416928101839052965093508b11156106de576105be8e82815181106105b0576105b06113e7565b60200260200101518d610d43565b91506105d9828c87600001516001600160801b03168a610d95565b93506105e5848c610dec565b1561062b576040516001600160801b0394506001600160a01b038416908c907fb32a150b9737190a456d8b2b81dd7d592a799ab2933ea494e44351acd41f835d90600090a35b600082600281111561063f5761063f6113b7565b146106de576001600160801b0384146106a3578a836001600160a01b031683600281111561066f5761066f6113b7565b6040518781527fa0957b65e189f06dfe2b38ff07e89a0df128ba3fcba66c68f8d2615daebc30a99060200160405180910390a45b6001600160a01b038316600090815260208790526040902080546fffffffffffffffffffffffffffffffff19166001600160801b0386161790555b60010161052c565b505050505050505b505b50505050505050565b6060818067ffffffffffffffff81111561071557610715610fb3565b60405190808252806020026020018201604052801561073e578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610770576107706113e7565b905060200201602081019061078591906113fd565b6001600160a01b0316815260208101919091526040016000205484516001600160801b03909116908590839081106107bf576107bf6113e7565b6020908102919091010152600101610753565b6107da610e0e565b6107e381610e6a565b6107ed8282610bb7565b5050565b6000600b6107fe81610b6b565b82518690811461082f576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8060000361084757506347c28ec560e11b9150610966565b60008051602061152e8339815191526000610862600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561089f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c39190611418565b905060005b83811015610957578681815181106108e2576108e26113e7565b60200260200101511561094f57818360008d8d85818110610905576109056113e7565b905060200201602081019061091a91906113fd565b6001600160a01b03168152602081019190915260400160002080546001600160801b03928316600160801b0292169190911790555b6001016108c8565b506347c28ec560e11b94505050505b5095945050505050565b6000600b61097d81610b6b565b50636242a4ef60e11b95945050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156109c6576109c66113b7565b60ff1681526020810191909152604001600020546001600160a01b0316905080610a05578160405163409140df60e11b81526004016103d1919061146e565b919050565b600054610100900460ff1615808015610a2a5750600054600160ff909116105b80610a445750303b158015610a44575060005460ff166001145b610aa75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d1565b6000805460ff191660011790558015610aca576000805461ff0019166101001790555b610ad5600886610bb7565b610ae0600b85610bb7565b610aeb600384610bb7565b610af6600483610bb7565b6000196001558015610b42576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6060610b53610cd8565b905090565b6000610b648383610d43565b9392505050565b610b748161098f565b6001600160a01b0316336001600160a01b03161461045f576000356001600160e01b03191681336040516320e0f98d60e21b81526004016103d19392919061147c565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610bed57610bed6113b7565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610c2e57610c2e6113b7565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b8051600190600090815b81811015610cc05785858281518110610c8057610c806113e7565b60200260200101511115610c975760009350610cc0565b848181518110610ca957610ca96113e7565b602002602001015183019250806001019050610c65565b50828015610cce5750858211155b9695505050505050565b604080516003808252608082019092526060916020820183803683370190505090506001818160ff1681518110610d1157610d116113e7565b6020908102919091010152600581600260ff1681518110610d3457610d346113e7565b60200260200101818152505090565b60008082612710610d5486836114b3565b610d5e91906114c6565b610d6891906114dd565b9050610bb88111610d8a576103e88111610d83576000610d8d565b6001610d8d565b60025b949350505050565b6000610dab610da56001866114b3565b84610ea0565b82866002811115610dbe57610dbe6113b7565b60ff1681518110610dd157610dd16113e7565b6020026020010151610de39190611447565b95945050505050565b6000601e610dfb6001846114b3565b610e0590856114b3565b10159392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610e68576000356001600160e01b0319166001604051620f948f60ea1b81526004016103d19291906114ff565b565b806001600160a01b03163b60000361045f57604051630bfc64a360e21b81526001600160a01b03821660048201526024016103d1565b600081831015610eb05781610b64565b5090919050565b600060208284031215610ec957600080fd5b81356001600160e01b031981168114610b6457600080fd5b60008083601f840112610ef357600080fd5b50813567ffffffffffffffff811115610f0b57600080fd5b6020830191508360208260051b8501011115610f2657600080fd5b9250929050565b60008060208385031215610f4057600080fd5b823567ffffffffffffffff811115610f5757600080fd5b610f6385828601610ee1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610fa757835183529284019291840191600101610f8b565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ff257610ff2610fb3565b604052919050565b600067ffffffffffffffff82111561101457611014610fb3565b5060051b60200190565b80356001600160a01b0381168114610a0557600080fd5b600082601f83011261104657600080fd5b8135602061105b61105683610ffa565b610fc9565b8083825260208201915060208460051b87010193508684111561107d57600080fd5b602086015b848110156110995780358352918301918301611082565b509695505050505050565b600080600080600060a086880312156110bc57600080fd5b853567ffffffffffffffff808211156110d457600080fd5b818801915088601f8301126110e857600080fd5b813560206110f861105683610ffa565b82815260059290921b8401810191818101908c84111561111757600080fd5b948201945b8386101561113c5761112d8661101e565b8252948201949082019061111c565b9950508901359250508082111561115257600080fd5b5061115f88828901611035565b959895975050505060408401359360608101359360809091013592509050565b803560108110610a0557600080fd5b600080604083850312156111a157600080fd5b6111aa8361117f565b91506111b86020840161101e565b90509250929050565b6000806000806000606086880312156111d957600080fd5b853567ffffffffffffffff808211156111f157600080fd5b6111fd89838a01610ee1565b909750955060209150878201358181111561121757600080fd5b6112238a828b01610ee1565b90965094505060408801358181111561123b57600080fd5b88019050601f8101891361124e57600080fd5b803561125c61105682610ffa565b81815260059190911b8201830190838101908b83111561127b57600080fd5b928401925b828410156112a857833580151581146112995760008081fd5b82529284019290840190611280565b80955050505050509295509295909350565b600080600080604085870312156112d057600080fd5b843567ffffffffffffffff808211156112e857600080fd5b6112f488838901610ee1565b9096509450602087013591508082111561130d57600080fd5b5061131a87828801610ee1565b95989497509550505050565b60006020828403121561133857600080fd5b610b648261117f565b6000806000806080858703121561135757600080fd5b6113608561101e565b935061136e6020860161101e565b925061137c6040860161101e565b915061138a6060860161101e565b905092959194509250565b600080604083850312156113a857600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60208101600383106113e1576113e16113b7565b91905290565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561140f57600080fd5b610b648261101e565b60006020828403121561142a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561029457610294611431565b6010811061146a5761146a6113b7565b9052565b60208101610294828461145a565b6001600160e01b0319841681526060810161149a602083018561145a565b6001600160a01b03929092166040919091015292915050565b8181038181111561029457610294611431565b808202811582820484141761029457610294611431565b6000826114fa57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b03198316815260408101600b8310611520576115206113b7565b826020830152939250505056fed08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfea2646970667358221220a88731885a136f6ffe2ef43beabc7b3a128ab2f3ee20d79c6777fe10326663bf64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, "kind": "dev", + "details": "A contract that implements slashing functionality for bridge operators based on their availability.", "methods": { "execSlashBridgeOperators(address[],uint256[],uint256,uint256,uint256)": { "details": "Slashes the unavailability of bridge operators during a specific period.", @@ -609,17 +531,10 @@ "untilPeriods": "The penalized periods for the bridge operators." } }, - "onBridgeOperatorUpdated(address,address)": { - "details": "Handles the event when a bridge operator is updated.", - "params": { - "currentBridgeOperator": "The address of the current bridge operator.", - "newbridgeOperator": "The new address of the bridge operator." - }, - "returns": { - "_0": "The selector of the function being called." - } + "initializeREP2()": { + "details": "Helper for running upgrade script, required to only revoked once by the DPoS's governance admin." }, - "onBridgeOperatorsAdded(address[],bool[])": { + "onBridgeOperatorsAdded(address[],uint96[],bool[])": { "details": "Handles the event when bridge operators are added.", "params": { "addeds": "The corresponding boolean values indicating whether the operators were added or not.", @@ -650,76 +565,103 @@ "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas." } }, - "stateVariables": { - "BRIDGE_SLASH_INFOS_SLOT": { - "details": "value is equal to keccak256(\"@ronin.dpos.gateway.BridgeSlash.bridgeSlashInfos.slot\") - 1" - }, - "MINIMUM_VOTE_THRESHOLD": { - "details": "External function to retrieve the value of the minimum vote threshold to execute slashing rule.", - "return": "minimumVoteThreshold The minimum vote threshold value.", - "returns": { - "_0": "minimumVoteThreshold The minimum vote threshold value." - } - }, - "PERCENTAGE_FRACTION": { - "details": "Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]" - }, - "REMOVE_DURATION_THRESHOLD": { - "details": "Returns the threshold duration for removing bridge operators.", - "return": "The duration in period number that exceeds which a bridge operator will be removed.", - "returns": { - "_0": "The duration in period number that exceeds which a bridge operator will be removed." + "events": { + "BridgeSlashed(uint8,address,uint256,uint256)": { + "details": "Event emitted when a bridge operator is slashed.", + "params": { + "bridgeOperator": "The address of the slashed bridge operator.", + "period": "The period in which the operator is slashed.", + "slashUntilPeriod": "The period until which the operator is penalized.", + "tier": "The slash tier of the operator." } }, - "SLASH_PERMANENT_DURATION": { - "details": "This value is set to the maximum value of uint128 to indicate a permanent slash duration." + "BridgeTrackingIncorrectlyResponded()": { + "details": "Event emited when the bridge tracking contract tracks the invalid data, cause malform in sharing bridge reward." }, - "TIER_1_PENALTY_DURATION": { - "details": "Returns the penalty duration for Tier 1 slashing.", - "return": "The duration in period number for Tier 1 slashing.", - "returns": { - "_0": "The duration in period number for Tier 1 slashing." - } + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." }, - "TIER_1_THRESHOLD": { - "details": "Tier 1 slashing threshold ratio is 10%" + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." }, - "TIER_2_PENALTY_DURATION": { - "details": "Returns the penalty duration for Tier 2 slashing.", - "return": "The duration in period number for Tier 2 slashing.", - "returns": { - "_0": "The duration in period number for Tier 2 slashing." + "RemovalRequested(uint256,address)": { + "details": "Emitted when a removal request is made for a bridge operator.", + "params": { + "bridgeOperator": "The address of the bridge operator being requested for removal.", + "period": "The period for which the removal request is made." } - }, - "TIER_2_THRESHOLD": { - "details": "Tier 2 slashing threshold ratio is 30%" } }, - "title": "BridgeSlash", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 + "errors": { + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnexpectedInternalCall(bytes4,uint8,address)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "actual": "The actual address that called to the function.", + "expectedContractType": "The contract type required to perform the function.", + "msgSig": "The function signature (bytes4)." + } + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + }, + "title": "BridgeSlash" }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum IBridgeSlashEvents.Tier\",\"name\":\"tier\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slashUntilPeriod\",\"type\":\"uint256\"}],\"name\":\"BridgeSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"BridgeTrackingIncorrectlyResponded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"RemovalRequested\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MINIMUM_VOTE_THRESHOLD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REMOVE_DURATION_THRESHOLD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIER_1_PENALTY_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIER_2_PENALTY_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ballots\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"totalBallot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalVote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"}],\"name\":\"execSlashBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"getAddedPeriodOf\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"addedPeriods\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPenaltyDurations\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"penaltyDurations\",\"type\":\"uint256[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ballot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalVote\",\"type\":\"uint256\"}],\"name\":\"getSlashTier\",\"outputs\":[{\"internalType\":\"enum IBridgeSlashEvents.Tier\",\"name\":\"tier\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"getSlashUntilPeriodOf\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"untilPeriods\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeTrackingContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dposGA\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeREP2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"},{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsAdded\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsRemoved\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A contract that implements slashing functionality for bridge operators based on their availability.\",\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeSlashed(uint8,address,uint256,uint256)\":{\"details\":\"Event emitted when a bridge operator is slashed.\",\"params\":{\"bridgeOperator\":\"The address of the slashed bridge operator.\",\"period\":\"The period in which the operator is slashed.\",\"slashUntilPeriod\":\"The period until which the operator is penalized.\",\"tier\":\"The slash tier of the operator.\"}},\"BridgeTrackingIncorrectlyResponded()\":{\"details\":\"Event emited when the bridge tracking contract tracks the invalid data, cause malform in sharing bridge reward.\"},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RemovalRequested(uint256,address)\":{\"details\":\"Emitted when a removal request is made for a bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator being requested for removal.\",\"period\":\"The period for which the removal request is made.\"}}},\"kind\":\"dev\",\"methods\":{\"execSlashBridgeOperators(address[],uint256[],uint256,uint256,uint256)\":{\"details\":\"Slashes the unavailability of bridge operators during a specific period.\",\"params\":{\"period\":\"The period to slash the bridge operators for.\"}},\"getAddedPeriodOf(address[])\":{\"details\":\"Retrieves the added periods of the specified bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of bridge operator addresses.\"},\"returns\":{\"addedPeriods\":\"An array of uint256 values representing the added periods for each bridge operator.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getPenaltyDurations()\":{\"details\":\"Retrieve the penalty durations for different slash tiers.\",\"returns\":{\"penaltyDurations\":\"The array of penalty durations for each slash tier.\"}},\"getSlashTier(uint256,uint256)\":{\"details\":\"Gets the slash tier based on the given ballot and total ballots.\",\"params\":{\"ballot\":\"The ballot count for a bridge operator.\",\"totalVote\":\"The total vote count for the period.\"},\"returns\":{\"tier\":\"The slash tier.\"}},\"getSlashUntilPeriodOf(address[])\":{\"details\":\"Returns the penalize durations for the specified bridge operators.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"untilPeriods\":\"The penalized periods for the bridge operators.\"}},\"initializeREP2()\":{\"details\":\"Helper for running upgrade script, required to only revoked once by the DPoS's governance admin.\"},\"onBridgeOperatorsAdded(address[],uint96[],bool[])\":{\"details\":\"Handles the event when bridge operators are added.\",\"params\":{\"addeds\":\"The corresponding boolean values indicating whether the operators were added or not.\",\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"onBridgeOperatorsRemoved(address[],bool[])\":{\"details\":\"Handles the event when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\",\"removeds\":\"The corresponding boolean values indicating whether the operators were removed or not.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"stateVariables\":{\"BRIDGE_SLASH_INFOS_SLOT\":{\"details\":\"value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeSlash.bridgeSlashInfos.slot\\\") - 1\"},\"MINIMUM_VOTE_THRESHOLD\":{\"details\":\"External function to retrieve the value of the minimum vote threshold to execute slashing rule.\",\"return\":\"minimumVoteThreshold The minimum vote threshold value.\",\"returns\":{\"_0\":\"minimumVoteThreshold The minimum vote threshold value.\"}},\"PERCENTAGE_FRACTION\":{\"details\":\"Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\"},\"REMOVE_DURATION_THRESHOLD\":{\"details\":\"Returns the threshold duration for removing bridge operators.\",\"return\":\"The duration in period number that exceeds which a bridge operator will be removed.\",\"returns\":{\"_0\":\"The duration in period number that exceeds which a bridge operator will be removed.\"}},\"SLASH_PERMANENT_DURATION\":{\"details\":\"This value is set to the maximum value of uint128 to indicate a permanent slash duration.\"},\"TIER_1_PENALTY_DURATION\":{\"details\":\"Returns the penalty duration for Tier 1 slashing.\",\"return\":\"The duration in period number for Tier 1 slashing.\",\"returns\":{\"_0\":\"The duration in period number for Tier 1 slashing.\"}},\"TIER_1_THRESHOLD\":{\"details\":\"Tier 1 slashing threshold ratio is 10%\"},\"TIER_2_PENALTY_DURATION\":{\"details\":\"Returns the penalty duration for Tier 2 slashing.\",\"return\":\"The duration in period number for Tier 2 slashing.\",\"returns\":{\"_0\":\"The duration in period number for Tier 2 slashing.\"}},\"TIER_2_THRESHOLD\":{\"details\":\"Tier 2 slashing threshold ratio is 30%\"},\"_startedAtPeriod\":{\"details\":\"The period that the contract allows slashing.\"}},\"title\":\"BridgeSlash\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/BridgeSlash.sol\":\"BridgeSlash\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeTrackingHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nabstract contract BridgeTrackingHelper {\\n /// @dev Event emited when the bridge tracking contract tracks the invalid data, cause malform in sharing bridge reward.\\n event BridgeTrackingIncorrectlyResponded();\\n\\n /**\\n * @dev Internal function to validate the bridge tracking response for a given set of ballots.\\n * @param totalBallot The total number of ballots available for the tracking response.\\n * @param totalVote The total number of votes recorded in the tracking response.\\n * @param ballots An array containing the individual ballot counts in the tracking response.\\n * @return valid A boolean indicating whether the bridge tracking response is valid or not.\\n * @notice The function checks if each individual ballot count is not greater than the total votes recorded.\\n * @notice It also verifies that the sum of all individual ballot counts does not exceed the total available ballots.\\n */\\n function _isValidBridgeTrackingResponse(uint256 totalBallot, uint256 totalVote, uint256[] memory ballots) internal pure returns (bool valid) {\\n valid = true;\\n uint256 sumBallot;\\n uint256 length = ballots.length;\\n\\n unchecked {\\n for (uint256 i; i < length; ++i) {\\n if (ballots[i] > totalVote) {\\n valid = false;\\n break;\\n }\\n\\n sumBallot += ballots[i];\\n }\\n }\\n\\n valid = valid && (sumBallot <= totalBallot);\\n }\\n}\\n\",\"keccak256\":\"0x6c4ace6aed6a3861ad64b30dc2db7a2d8b87585085e049f9f85b8f2efbbc41a0\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeSlash.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeSlashEvents } from \\\"./events/IBridgeSlashEvents.sol\\\";\\n\\n/**\\n * @title IBridgeSlash\\n * @dev Interface for the BridgeSlash contract to manage slashing functionality for bridge operators.\\n */\\ninterface IBridgeSlash is IBridgeSlashEvents {\\n /**\\n * @dev Slashes the unavailability of bridge operators during a specific period.\\n * @param period The period to slash the bridge operators for.\\n */\\n function execSlashBridgeOperators(address[] calldata operators, uint256[] calldata ballots, uint256 totalBallot, uint256 totalVote, uint256 period) external;\\n\\n /**\\n * @dev Returns the penalize durations for the specified bridge operators.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @return untilPeriods The penalized periods for the bridge operators.\\n */\\n function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external returns (uint256[] memory untilPeriods);\\n\\n /**\\n * @dev Retrieves the added periods of the specified bridge operators.\\n * @param bridgeOperators An array of bridge operator addresses.\\n * @return addedPeriods An array of uint256 values representing the added periods for each bridge operator.\\n */\\n function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods);\\n\\n /**\\n * @dev Gets the slash tier based on the given ballot and total ballots.\\n * @param ballot The ballot count for a bridge operator.\\n * @param totalVote The total vote count for the period.\\n * @return tier The slash tier.\\n */\\n function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier);\\n\\n /**\\n * @dev Retrieve the penalty durations for different slash tiers.\\n * @return penaltyDurations The array of penalty durations for each slash tier.\\n */\\n function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 1 slashing.\\n * @return The duration in period number for Tier 1 slashing.\\n */\\n function TIER_1_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 2 slashing.\\n * @return The duration in period number for Tier 2 slashing.\\n */\\n function TIER_2_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the threshold duration for removing bridge operators.\\n * @return The duration in period number that exceeds which a bridge operator will be removed.\\n */\\n function REMOVE_DURATION_THRESHOLD() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the value of the minimum vote threshold to execute slashing rule.\\n * @return minimumVoteThreshold The minimum vote threshold value.\\n */\\n function MINIMUM_VOTE_THRESHOLD() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb22e3ead9060f2c139d143b8db4dcda7cdf4e4e3960fa98a481ad8b3a2460134\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeTracking {\\n struct Request {\\n VoteKind kind;\\n uint256 id;\\n }\\n\\n enum VoteKind {\\n Deposit,\\n Withdrawal,\\n MainchainWithdrawal\\n }\\n\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\n\\n /**\\n * @dev Returns the block that allow incomming mutable call.\\n */\\n function startedAtBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of votes at the specific period `_period`.\\n */\\n function totalVote(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots at the specific period `_period`.\\n */\\n function totalBallot(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\n */\\n function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\n */\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\n\\n /**\\n * @dev Handles the request once it is approved.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\n\\n /**\\n * @dev Records vote for a receipt and a operator.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\n}\\n\",\"keccak256\":\"0x53ac425ff6efebc200030ceef302c2871a4b2edfcc5e512ce326aa704989ff7a\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeSlashEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeSlashEvents {\\n /**\\n * @dev Enumeration representing the slashing tiers for bridge operators.\\n */\\n enum Tier {\\n Tier0,\\n Tier1,\\n Tier2\\n }\\n\\n /**\\n * @dev Struct representing the status of a bridge operator.\\n */\\n struct BridgeSlashInfo {\\n uint128 slashUntilPeriod;\\n uint128 newlyAddedAtPeriod;\\n }\\n\\n /**\\n * @dev Event emitted when a bridge operator is slashed.\\n * @param tier The slash tier of the operator.\\n * @param bridgeOperator The address of the slashed bridge operator.\\n * @param period The period in which the operator is slashed.\\n * @param slashUntilPeriod The period until which the operator is penalized.\\n */\\n event BridgeSlashed(Tier indexed tier, address indexed bridgeOperator, uint256 indexed period, uint256 slashUntilPeriod);\\n\\n /**\\n * @dev Emitted when a removal request is made for a bridge operator.\\n * @param period The period for which the removal request is made.\\n * @param bridgeOperator The address of the bridge operator being requested for removal.\\n */\\n event RemovalRequested(uint256 indexed period, address indexed bridgeOperator);\\n}\\n\",\"keccak256\":\"0x43850ce839ef382c6e6d176e1de4de776fb54b7baa697f52d79858fba13c1b90\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/validator/ICandidateManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ICandidateManager {\\n struct ValidatorCandidate {\\n // Admin of the candidate\\n address admin;\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address that receives mining reward of the validator\\n address payable treasuryAddr;\\n // Address of the bridge operator corresponding to the candidate\\n address ______deprecatedbridgeOperatorAddr;\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\n // Values in range [0; 100_00] stands for 0-100%\\n uint256 commissionRate;\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\n uint256 revokingTimestamp;\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\n uint256 topupDeadline;\\n }\\n\\n struct CommissionSchedule {\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\n uint256 effectiveTimestamp;\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\n uint256 commissionRate;\\n }\\n\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\n /// @dev Emitted when the validator candidate is granted.\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\n /// @dev Emitted when the validator candidate is revoked.\\n event CandidatesRevoked(address[] consensusAddrs);\\n\\n /// @dev Emitted when a schedule for updating commission rate is set.\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\n /// @dev Emitted when the commission rate of a validator is updated.\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\n\\n /// @dev Error of exceeding maximum number of candidates.\\n error ErrExceedsMaxNumberOfCandidate();\\n /// @dev Error of querying for already existent candidate.\\n error ErrExistentCandidate();\\n /// @dev Error of querying for non-existent candidate.\\n error ErrNonExistentCandidate();\\n /// @dev Error of candidate admin already exists.\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\n /// @dev Error of treasury already exists.\\n error ErrExistentTreasury(address _treasuryAddr);\\n /// @dev Error of invalid commission rate.\\n error ErrInvalidCommissionRate();\\n /// @dev Error of invalid effective days onwards.\\n error ErrInvalidEffectiveDaysOnwards();\\n /// @dev Error of invalid min effective days onwards.\\n error ErrInvalidMinEffectiveDaysOnwards();\\n /// @dev Error of already requested revoking candidate before.\\n error ErrAlreadyRequestedRevokingCandidate();\\n /// @dev Error of commission change schedule exists.\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\n /// @dev Error of trusted org cannot renounce.\\n error ErrTrustedOrgCannotRenounce();\\n\\n /**\\n * @dev Returns the maximum number of validator candidate.\\n */\\n function maxValidatorCandidate() external view returns (uint256);\\n\\n /**\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\n */\\n function minEffectiveDaysOnward() external view returns (uint256);\\n\\n /**\\n * @dev Sets the maximum number of validator candidate.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MaxValidatorCandidateUpdated` event.\\n *\\n */\\n function setMaxValidatorCandidate(uint256) external;\\n\\n /**\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\n *\\n */\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\n\\n /**\\n * @dev Grants a validator candidate.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateGranted`.\\n *\\n */\\n function execApplyValidatorCandidate(address _admin, address _consensusAddr, address payable _treasuryAddr, uint256 _commissionRate) external;\\n\\n /**\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\n *\\n */\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\n\\n /**\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\n *\\n * Requirements:\\n * - The method caller is the staking contract.\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\n * - The `_rate` must be in range of [0_00; 100_00].\\n *\\n * Emits the event `CommissionRateUpdateScheduled`.\\n *\\n */\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\n\\n /**\\n * @dev Returns whether the address is a validator (candidate).\\n */\\n function isValidatorCandidate(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns the validator candidate.\\n */\\n function getValidatorCandidates() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns all candidate info.\\n */\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\n\\n /**\\n * @dev Returns the info of a candidate.\\n */\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\n\\n /**\\n * @dev Returns whether the address is the candidate admin.\\n */\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\n\\n /**\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\n */\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\n}\\n\",\"keccak256\":\"0x37b15d36774a3f18291e85efa9df6caaf52b8fa751a8222a3ac8f467656950c1\",\"license\":\"MIT\"},\"src/interfaces/validator/ICoinbaseExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ISlashingExecution.sol\\\";\\n\\ninterface ICoinbaseExecution is ISlashingExecution {\\n enum BlockRewardDeprecatedType {\\n UNKNOWN,\\n UNAVAILABILITY,\\n AFTER_BAILOUT\\n }\\n\\n /// @dev Emitted when the validator set is updated\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated.\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\n\\n /// @dev Emitted when the reward of the block producer is deprecated.\\n event BlockRewardDeprecated(address indexed coinbaseAddr, uint256 rewardAmount, BlockRewardDeprecatedType deprecatedType);\\n /// @dev Emitted when the block reward is submitted.\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\n\\n /// @dev Emitted when the block producer reward is distributed.\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\n event MiningRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\n\\n /// @dev Emitted when the bridge operator reward is distributed.\\n event BridgeOperatorRewardDistributed(address indexed consensusAddr, address indexed bridgeOperator, address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\n event BridgeOperatorRewardDistributionFailed(\\n address indexed consensusAddr, address indexed bridgeOperator, address indexed recipient, uint256 amount, uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the fast finality reward is distributed.\\n event FastFinalityRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the fast finality reward.\\n event FastFinalityRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\n\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\n event StakingRewardDistributionFailed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts, uint256 contractBalance);\\n\\n /// @dev Emitted when the epoch is wrapped up.\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\n\\n /// @dev Error of only allowed at the end of epoch\\n error ErrAtEndOfEpochOnly();\\n /// @dev Error of query for already wrapped up epoch\\n error ErrAlreadyWrappedEpoch();\\n\\n /**\\n * @dev Submits reward of the current block.\\n *\\n * Requirements:\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\n *\\n */\\n function submitBlockReward() external payable;\\n\\n /**\\n * @dev Wraps up the current epoch.\\n *\\n * Requirements:\\n * - The method must be called when the current epoch is ending.\\n * - The epoch is not wrapped yet.\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\n * Emits the event `WrappedUpEpoch`.\\n *\\n */\\n function wrapUpEpoch() external payable;\\n}\\n\",\"keccak256\":\"0x3030ef01bb0277f8607fb3b6358a4cd1d75f6a756e5c884153fbf94f0a16b4d4\",\"license\":\"MIT\"},\"src/interfaces/validator/IEmergencyExit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IEmergencyExit {\\n /// @dev Emitted when the fund is locked from an emergency exit request\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\n event EmergencyExitLockedFundReleased(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\n event EmergencyExitLockedFundReleasingFailed(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount, uint256 contractBalance);\\n\\n /// @dev Emitted when the emergency exit locked amount is updated.\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\n /// @dev Emitted when the emergency expiry duration is updated.\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\n\\n /// @dev Error of already requested emergency exit before.\\n error ErrAlreadyRequestedEmergencyExit();\\n\\n /**\\n * @dev Returns the amount of RON to lock from a consensus address.\\n */\\n function emergencyExitLockedAmount() external returns (uint256);\\n\\n /**\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\n */\\n function emergencyExpiryDuration() external returns (uint256);\\n\\n /**\\n * @dev Sets the amount of RON to lock from a consensus address.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\n *\\n */\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\n\\n /**\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\n *\\n */\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\n\\n /**\\n * @dev Unlocks fund for emergency exit request.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\n *\\n */\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\n\\n /**\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n */\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\n}\\n\",\"keccak256\":\"0x2df640817e7fb957f923dd583e82be9610a8441735b69519db5bd9457683bec2\",\"license\":\"MIT\"},\"src/interfaces/validator/IRoninValidatorSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ICandidateManager.sol\\\";\\nimport \\\"./info-fragments/ICommonInfo.sol\\\";\\nimport \\\"./ICoinbaseExecution.sol\\\";\\nimport \\\"./ISlashingExecution.sol\\\";\\nimport \\\"./IEmergencyExit.sol\\\";\\n\\ninterface IRoninValidatorSet is ICandidateManager, ICommonInfo, ISlashingExecution, ICoinbaseExecution, IEmergencyExit { }\\n\",\"keccak256\":\"0x5ae53ab78a38d9c59d74b4723ead82146bc402874ebbdc90b70ce084516e010f\",\"license\":\"MIT\"},\"src/interfaces/validator/ISlashingExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ISlashingExecution {\\n /// @dev Emitted when the validator is punished.\\n event ValidatorPunished(\\n address indexed consensusAddr,\\n uint256 indexed period,\\n uint256 jailedUntil,\\n uint256 deductedStakingAmount,\\n bool blockProducerRewardDeprecated,\\n bool bridgeOperatorRewardDeprecated\\n );\\n /// @dev Emitted when the validator get out of jail by bailout.\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\n\\n /// @dev Error of cannot bailout due to high tier slash.\\n error ErrCannotBailout(address validator);\\n\\n /**\\n * @dev Finalize the slash request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorPunished`.\\n *\\n */\\n function execSlash(address validatorAddr, uint256 newJailedUntil, uint256 slashAmount, bool cannotBailout) external;\\n\\n /**\\n * @dev Finalize the bailout request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorUnjailed`.\\n *\\n */\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\n}\\n\",\"keccak256\":\"0xac0b772f2fca9dafd7cc6742f91b442f9f545bf9472185b8d817fe045b680193\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/ICommonInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IJailingInfo.sol\\\";\\nimport \\\"./ITimingInfo.sol\\\";\\n\\ninterface ICommonInfo is ITimingInfo, IJailingInfo {\\n struct EmergencyExitInfo {\\n uint256 lockedAmount;\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\n uint256 recyclingAt;\\n }\\n\\n /// @dev Emitted when the deprecated reward is withdrawn.\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\n\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\n error ErrUnauthorizedReceiveRON();\\n /// @dev Error thrown when queries for a non existent info.\\n error NonExistentRecyclingInfo();\\n\\n /**\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\n */\\n function totalDeprecatedReward() external view returns (uint256);\\n\\n /**\\n * @dev Returns the emergency exit request.\\n */\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\n}\\n\",\"keccak256\":\"0x4a215273f535697ecf54a97c8fd9de9c666ca64b88dafe7ab60b2903f71ffb41\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/IJailingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IJailingInfo {\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkJailed(address) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeft(address _addr) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\n */\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\n */\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\n */\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xd83e85bea11509406213b8d06956b33238d27fa1b5e555c1f064bdfd41d6d216\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/ITimingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ITimingInfo {\\n /**\\n * @dev Returns the block that validator set was updated.\\n */\\n function getLastUpdatedBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the number of blocks in a epoch.\\n */\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\n\\n /**\\n * @dev Returns the epoch index from the block number.\\n */\\n function epochOf(uint256 _block) external view returns (uint256);\\n\\n /**\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\n */\\n function epochEndingAt(uint256 _block) external view returns (bool);\\n\\n /**\\n * @dev Tries to get the period index from the epoch number.\\n */\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\n\\n /**\\n * @dev Returns whether the period ending at the current block number.\\n */\\n function isPeriodEnding() external view returns (bool);\\n\\n /**\\n * @dev Returns the period index from the current block.\\n */\\n function currentPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the block number that the current period starts at.\\n */\\n function currentPeriodStartAtBlock() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/Math.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary Math {\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns whether the number `c` is in range of [a; b].\\n */\\n function inRange(uint256 c, uint256 a, uint256 b) internal pure returns (bool) {\\n return a <= c && c <= b;\\n }\\n\\n /**\\n * @dev Returns whether two inclusive ranges [x1;x2] and [y1;y2] overlap.\\n */\\n function twoRangeOverlap(uint256 x1, uint256 x2, uint256 y1, uint256 y2) internal pure returns (bool) {\\n return x1 <= y2 && y1 <= x2;\\n }\\n\\n /**\\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\\n */\\n function addWithUpperbound(uint256 a, uint256 b, uint256 upperbound) internal pure returns (uint256) {\\n return min(a + b, upperbound);\\n }\\n\\n /**\\n * @dev Returns value of a - b; in case of negative result, 0 is returned.\\n */\\n function subNonNegative(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a - b : 0;\\n }\\n\\n /**\\n * @dev Returns value of `a + zeroable` if zerobale is not 0; otherwise, return 0.\\n */\\n function addIfNonZero(uint256 a, uint256 zeroable) internal pure returns (uint256) {\\n return zeroable != 0 ? a + zeroable : 0;\\n }\\n}\\n\",\"keccak256\":\"0xd73170f448c644a47024c7dbcf4afc3cc7ad27f61737c6ea4c3b543ec5cdb7e9\",\"license\":\"UNLICENSED\"},\"src/ronin/gateway/BridgeSlash.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { BridgeTrackingHelper } from \\\"../../extensions/bridge-operator-governance/BridgeTrackingHelper.sol\\\";\\nimport { IHasContracts, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { IBridgeSlash } from \\\"../../interfaces/bridge/IBridgeSlash.sol\\\";\\nimport { IERC165, IBridgeManagerCallback } from \\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { IBridgeTracking } from \\\"../../interfaces/bridge/IBridgeTracking.sol\\\";\\nimport { IRoninValidatorSet } from \\\"../../interfaces/validator/IRoninValidatorSet.sol\\\";\\nimport { Math } from \\\"../../libraries/Math.sol\\\";\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrLengthMismatch } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title BridgeSlash\\n * @dev A contract that implements slashing functionality for bridge operators based on their availability.\\n */\\ncontract BridgeSlash is IBridgeSlash, IBridgeManagerCallback, BridgeTrackingHelper, IdentityGuard, Initializable, HasContracts {\\n /// @inheritdoc IBridgeSlash\\n uint256 public constant TIER_1_PENALTY_DURATION = 1;\\n /// @inheritdoc IBridgeSlash\\n uint256 public constant TIER_2_PENALTY_DURATION = 5;\\n /// @inheritdoc IBridgeSlash\\n uint256 public constant MINIMUM_VOTE_THRESHOLD = 50;\\n /// @inheritdoc IBridgeSlash\\n uint256 public constant REMOVE_DURATION_THRESHOLD = 30;\\n\\n /// @dev Tier 1 slashing threshold ratio is 10%\\n uint256 private constant TIER_1_THRESHOLD = 10_00;\\n /// @dev Tier 2 slashing threshold ratio is 30%\\n uint256 private constant TIER_2_THRESHOLD = 30_00;\\n /// @dev Max percentage 100%. Values [0; 100_00] reflexes [0; 100%]\\n uint256 private constant PERCENTAGE_FRACTION = 100_00;\\n /// @dev This value is set to the maximum value of uint128 to indicate a permanent slash duration.\\n uint256 private constant SLASH_PERMANENT_DURATION = type(uint128).max;\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeSlash.bridgeSlashInfos.slot\\\") - 1\\n bytes32 private constant BRIDGE_SLASH_INFOS_SLOT = 0xd08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfe;\\n\\n /// @dev The period that the contract allows slashing.\\n uint256 internal _startedAtPeriod;\\n\\n /**\\n * @dev The modifier verifies if the `totalVote` is non-zero, indicating the presence of ballots for the period.\\n * @param totalVote The total number of ballots for the period.\\n */\\n modifier onlyPeriodHasEnoughVotes(uint256 totalVote) {\\n if (totalVote <= MINIMUM_VOTE_THRESHOLD) return;\\n _;\\n }\\n\\n modifier skipOnNotStarted(uint256 period) {\\n if (period < _startedAtPeriod) return;\\n _;\\n }\\n\\n constructor() payable {\\n _disableInitializers();\\n }\\n\\n function initialize(address validatorContract, address bridgeManagerContract, address bridgeTrackingContract, address dposGA) external initializer {\\n _setContract(ContractType.VALIDATOR, validatorContract);\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n _setContract(ContractType.BRIDGE_TRACKING, bridgeTrackingContract);\\n _setContract(ContractType.GOVERNANCE_ADMIN, dposGA);\\n _startedAtPeriod = type(uint256).max;\\n }\\n\\n /**\\n * @dev Helper for running upgrade script, required to only revoked once by the DPoS's governance admin.\\n */\\n function initializeREP2() external onlyContract(ContractType.GOVERNANCE_ADMIN) {\\n require(_startedAtPeriod == type(uint256).max, \\\"already init rep 2\\\");\\n _startedAtPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod() + 1;\\n _setContract(ContractType.GOVERNANCE_ADMIN, address(0));\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsAdded(\\n address[] calldata bridgeOperators,\\n uint96[] calldata, /* weights */\\n bool[] memory addeds\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint256 length = bridgeOperators.length;\\n if (length != addeds.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n\\n for (uint256 i; i < length;) {\\n unchecked {\\n if (addeds[i]) {\\n _bridgeSlashInfos[bridgeOperators[i]].newlyAddedAtPeriod = uint128(currentPeriod);\\n }\\n\\n ++i;\\n }\\n }\\n\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function execSlashBridgeOperators(\\n address[] memory operators,\\n uint256[] memory ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) external onlyContract(ContractType.BRIDGE_TRACKING) skipOnNotStarted(period) onlyPeriodHasEnoughVotes(totalVote) {\\n if (operators.length != ballots.length) revert ErrLengthMismatch(msg.sig);\\n if (operators.length == 0) return;\\n if (!_isValidBridgeTrackingResponse(totalBallot, totalVote, ballots)) {\\n emit BridgeTrackingIncorrectlyResponded();\\n return;\\n }\\n\\n // Get penalty durations for each slash tier.\\n uint256[] memory penaltyDurations = _getPenaltyDurations();\\n // Get the storage mapping for bridge slash information.\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n\\n // Declare variables for iteration.\\n BridgeSlashInfo memory status;\\n uint256 slashUntilPeriod;\\n address bridgeOperator;\\n Tier tier;\\n\\n for (uint256 i; i < operators.length;) {\\n bridgeOperator = operators[i];\\n status = _bridgeSlashInfos[bridgeOperator];\\n\\n // Check if the bridge operator was added before the current period.\\n // Bridge operators added in current period will not be slashed.\\n if (status.newlyAddedAtPeriod < period) {\\n // Determine the slash tier for the bridge operator based on their ballots.\\n tier = _getSlashTier(ballots[i], totalVote);\\n\\n slashUntilPeriod = _calcSlashUntilPeriod(tier, period, status.slashUntilPeriod, penaltyDurations);\\n\\n // Check if the slash duration exceeds the threshold for removal.\\n if (_isSlashDurationMetRemovalThreshold(slashUntilPeriod, period)) {\\n slashUntilPeriod = SLASH_PERMANENT_DURATION;\\n emit RemovalRequested(period, bridgeOperator);\\n }\\n\\n // Emit the {BridgeSlashed} event if the tier is not Tier 0 and bridge operator will not be removed.\\n // Update the slash until period number for the bridge operator if the tier is not Tier 0.\\n if (tier != Tier.Tier0) {\\n if (slashUntilPeriod != SLASH_PERMANENT_DURATION) {\\n emit BridgeSlashed(tier, bridgeOperator, period, slashUntilPeriod);\\n }\\n\\n // Store updated slash until period\\n _bridgeSlashInfos[bridgeOperator].slashUntilPeriod = uint128(slashUntilPeriod);\\n }\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsRemoved(address[] calldata, bool[] calldata) external view onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n /**\\n * @inheritdoc IERC165\\n */\\n function supportsInterface(bytes4 interfaceId) external pure returns (bool) {\\n return interfaceId == type(IBridgeManagerCallback).interfaceId || interfaceId == type(IERC165).interfaceId;\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory untilPeriods) {\\n uint256 length = bridgeOperators.length;\\n untilPeriods = new uint256[](length);\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n\\n for (uint256 i; i < length;) {\\n untilPeriods[i] = _bridgeSlashInfos[bridgeOperators[i]].slashUntilPeriod;\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods) {\\n uint256 length = bridgeOperators.length;\\n addedPeriods = new uint256[](length);\\n mapping(address => BridgeSlashInfo) storage _bridgeSlashInfos = _getBridgeSlashInfos();\\n\\n for (uint256 i; i < length;) {\\n addedPeriods[i] = _bridgeSlashInfos[bridgeOperators[i]].newlyAddedAtPeriod;\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations) {\\n penaltyDurations = _getPenaltyDurations();\\n }\\n\\n /**\\n * @inheritdoc IBridgeSlash\\n */\\n function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier) {\\n tier = _getSlashTier(ballot, totalVote);\\n }\\n\\n /**\\n * @dev Checks if the slash duration exceeds the threshold for removal and handles it accordingly.\\n * @param slashUntilPeriod The slash until period number.\\n * @param period The current period.\\n * @return met A boolean indicates that the threshold for removal is met.\\n */\\n function _isSlashDurationMetRemovalThreshold(uint256 slashUntilPeriod, uint256 period) internal pure returns (bool met) {\\n met = slashUntilPeriod - (period - 1) >= REMOVE_DURATION_THRESHOLD;\\n }\\n\\n /**\\n * @dev Calculates the slash until period based on the specified tier, current period, and slash until period.\\n * @param tier The slash tier representing the severity of the slash.\\n * @param period The current period in which the calculation is performed.\\n * @param slashUntilPeriod The existing slash until period.\\n * @param penaltyDurations An array of penalty durations for each slash tier.\\n * @return newSlashUntilPeriod The newly calculated slash until period.\\n */\\n function _calcSlashUntilPeriod(\\n Tier tier,\\n uint256 period,\\n uint256 slashUntilPeriod,\\n uint256[] memory penaltyDurations\\n ) internal pure returns (uint256 newSlashUntilPeriod) {\\n // Calculate the slash until period number.\\n newSlashUntilPeriod = penaltyDurations[uint8(tier)] + Math.max(period - 1, slashUntilPeriod);\\n }\\n\\n /**\\n * @dev Internal function to determine the slashing tier based on the given ballot count and total votes.\\n * @param ballot The individual ballot count of a bridge operator.\\n * @param totalVote The total number of votes recorded for the bridge operator.\\n * @return tier The calculated slashing tier for the bridge operator.\\n * @notice The `ratio` is calculated as the percentage of uncast votes (totalVote - ballot) relative to the total votes.\\n */\\n function _getSlashTier(uint256 ballot, uint256 totalVote) internal pure virtual returns (Tier tier) {\\n uint256 ratio = ((totalVote - ballot) * PERCENTAGE_FRACTION) / totalVote;\\n tier = ratio > TIER_2_THRESHOLD ? Tier.Tier2 : ratio > TIER_1_THRESHOLD ? Tier.Tier1 : Tier.Tier0;\\n }\\n\\n /**\\n * @dev Internal function to access the mapping from bridge operator => BridgeSlashInfo.\\n * @return bridgeSlashInfos the mapping from bridge operator => BridgeSlashInfo.\\n */\\n function _getBridgeSlashInfos() internal pure returns (mapping(address => BridgeSlashInfo) storage bridgeSlashInfos) {\\n assembly (\\\"memory-safe\\\") {\\n bridgeSlashInfos.slot := BRIDGE_SLASH_INFOS_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to retrieve the penalty durations for each slashing tier.\\n * @return penaltyDurations An array containing the penalty durations for Tier0, Tier1, and Tier2 in that order.\\n */\\n function _getPenaltyDurations() internal pure virtual returns (uint256[] memory penaltyDurations) {\\n // reserve index 0\\n penaltyDurations = new uint256[](3);\\n penaltyDurations[uint8(Tier.Tier1)] = TIER_1_PENALTY_DURATION;\\n penaltyDurations[uint8(Tier.Tier2)] = TIER_2_PENALTY_DURATION;\\n }\\n}\\n\",\"keccak256\":\"0x6734513b44a11197c1719065b77afaae24d504009fc7faafba76a162cc0efdff\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192809, + "numDeployments": 2, "storageLayout": { "storage": [ { - "astId": 1373, - "contract": "contracts/ronin/gateway/BridgeSlash.sol:BridgeSlash", + "astId": 58190, + "contract": "src/ronin/gateway/BridgeSlash.sol:BridgeSlash", "label": "_initialized", "offset": 0, "slot": "0", "type": "t_uint8" }, { - "astId": 1376, - "contract": "contracts/ronin/gateway/BridgeSlash.sol:BridgeSlash", + "astId": 58193, + "contract": "src/ronin/gateway/BridgeSlash.sol:BridgeSlash", "label": "_initializing", "offset": 1, "slot": "0", "type": "t_bool" + }, + { + "astId": 118766, + "contract": "src/ronin/gateway/BridgeSlash.sol:BridgeSlash", + "label": "_startedAtPeriod", + "offset": 0, + "slot": "1", + "type": "t_uint256" } ], "types": { @@ -728,11 +670,21 @@ "label": "bool", "numberOfBytes": "1" }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, "t_uint8": { "encoding": "inplace", "label": "uint8", "numberOfBytes": "1" } } + }, + "timestamp": 1713251844, + "userdoc": { + "version": 1, + "kind": "user" } } \ No newline at end of file diff --git a/deployments/ronin-testnet/BridgeTrackingLogic.json b/deployments/ronin-testnet/BridgeTrackingLogic.json index 8696fc26..c4b1a225 100644 --- a/deployments/ronin-testnet/BridgeTrackingLogic.json +++ b/deployments/ronin-testnet/BridgeTrackingLogic.json @@ -1,425 +1,380 @@ { - "address": "0xE9C6e1691Db4c75d48744F32CB80B9Bf0829A4f6", "abi": [ { + "type": "constructor", "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "ErrContractTypeNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "enum RoleAccess", - "name": "expectedRole", - "type": "uint8" - } - ], - "name": "ErrUnauthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "enum ContractType", - "name": "expectedContractType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "actual", - "type": "address" - } - ], - "name": "ErrUnexpectedInternalCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ErrZeroCodeContract", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "reason", - "type": "bytes" - } - ], - "name": "ExternalCallFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "getContract", "inputs": [ { - "internalType": "enum ContractType", "name": "contractType", - "type": "uint8" + "type": "uint8", + "internalType": "enum ContractType" } ], - "name": "getContract", "outputs": [ { - "internalType": "address", "name": "contract_", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getManyTotalBallots", "inputs": [ { - "internalType": "uint256", "name": "period", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address[]", "name": "operators", - "type": "address[]" + "type": "address[]", + "internalType": "address[]" } ], - "name": "getManyTotalBallots", "outputs": [ { - "internalType": "uint256[]", "name": "_res", - "type": "uint256[]" + "type": "uint256[]", + "internalType": "uint256[]" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "handleVoteApproved", "inputs": [ { - "internalType": "enum IBridgeTracking.VoteKind", "name": "kind", - "type": "uint8" + "type": "uint8", + "internalType": "enum IBridgeTracking.VoteKind" }, { - "internalType": "uint256", "name": "requestId", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "handleVoteApproved", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "initialize", "inputs": [ { - "internalType": "address", "name": "bridgeContract", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "validatorContract", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "startedAtBlock_", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "initialize", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "initializeREP2", "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", "name": "initializeV2", + "inputs": [], "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "initializeV3", "inputs": [ { - "internalType": "address", "name": "bridgeManager", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "bridgeSlash", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "bridgeReward", - "type": "address" + "type": "address", + "internalType": "address" + }, + { + "name": "dposGA", + "type": "address", + "internalType": "address" } ], - "name": "initializeV3", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "recordVote", "inputs": [ { - "internalType": "enum IBridgeTracking.VoteKind", "name": "kind", - "type": "uint8" + "type": "uint8", + "internalType": "enum IBridgeTracking.VoteKind" }, { - "internalType": "uint256", "name": "requestId", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "operator", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "recordVote", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setContract", "inputs": [ { - "internalType": "enum ContractType", "name": "contractType", - "type": "uint8" + "type": "uint8", + "internalType": "enum ContractType" }, { - "internalType": "address", "name": "addr", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "setContract", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { - "inputs": [], + "type": "function", "name": "startedAtBlock", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "totalBallot", "inputs": [ { - "internalType": "uint256", "name": "period", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "totalBallot", "outputs": [ { - "internalType": "uint256", "name": "totalBallot_", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "totalBallotOf", "inputs": [ { - "internalType": "uint256", "name": "period", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "bridgeOperator", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "totalBallotOf", "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "totalVote", "inputs": [ { - "internalType": "uint256", "name": "period", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "totalVote", "outputs": [ { - "internalType": "uint256", "name": "totalVote_", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0xe2cdb0009dc7ae5ddf05c63e5102501b8454a1f193fdef41fa3fcd8f1b2a659b", - "receipt": { - "to": null, - "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "contractAddress": "0xE9C6e1691Db4c75d48744F32CB80B9Bf0829A4f6", - "transactionIndex": 0, - "gasUsed": "1523940", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000100000000000000000000040000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000", - "blockHash": "0xe55096fbb487370165a68aebc612e3261ce483f206b6817c8b13088fe3a3bf7d", - "transactionHash": "0xe2cdb0009dc7ae5ddf05c63e5102501b8454a1f193fdef41fa3fcd8f1b2a659b", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 19042842, - "transactionHash": "0xe2cdb0009dc7ae5ddf05c63e5102501b8454a1f193fdef41fa3fcd8f1b2a659b", - "address": "0xE9C6e1691Db4c75d48744F32CB80B9Bf0829A4f6", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 0, - "blockHash": "0xe55096fbb487370165a68aebc612e3261ce483f206b6817c8b13088fe3a3bf7d" - } - ], - "blockNumber": 19042842, - "cumulativeGasUsed": "1523940", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 8, - "solcInputHash": "04a9bbd243a024f931581fbb384106a3", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"ExternalCallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"getManyTotalBallots\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_res\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IBridgeTracking.VoteKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"handleVoteApproved\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"validatorContract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startedAtBlock_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeSlash\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeReward\",\"type\":\"address\"}],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IBridgeTracking.VoteKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"recordVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startedAtBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"}],\"name\":\"totalBallot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalBallot_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"totalBallotOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"}],\"name\":\"totalVote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalVote_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"kind\":\"dev\",\"methods\":{\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getManyTotalBallots(uint256,address[])\":{\"details\":\"Returns the total number of ballots of bridge operators at the specific period `_period`.\"},\"handleVoteApproved(uint8,uint256)\":{\"details\":\"Handles the request once it is approved. Requirements: - The method caller is the bridge contract.\"},\"initialize(address,address,uint256)\":{\"details\":\"Initializes the contract storage.\"},\"recordVote(uint8,uint256,address)\":{\"details\":\"Records vote for a receipt and a operator. Requirements: - The method caller is the bridge contract.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"startedAtBlock()\":{\"details\":\"Returns the block that allow incomming mutable call.\"},\"totalBallot(uint256)\":{\"details\":\"Returns the total number of ballots at the specific period `_period`.\"},\"totalBallotOf(uint256,address)\":{\"details\":\"Returns the total number of ballots of a bridge operator at the specific period `_period`.\"},\"totalVote(uint256)\":{\"details\":\"Returns the total number of votes at the specific period `_period`.\"}},\"stateVariables\":{\"_bufferMetric\":{\"details\":\"The temporary info of votes and ballots\"},\"_lastSyncPeriod\":{\"details\":\"The latest period that get synced with bridge's slashing and rewarding contract\"},\"_periodMetric\":{\"details\":\"Mapping from period number => vote stats based on period\"},\"_receiptTrackingInfo\":{\"details\":\"Mapping from vote kind => receipt id => receipt stats\"},\"_startedAtBlock\":{\"details\":\"The block that the contract allows incoming mutable calls.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ronin/gateway/BridgeTracking.sol\":\"BridgeTracking\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n _requireAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireAdmin() internal view {\\n if (msg.sender != _getAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0x06e5962713a77abf6d5ba646e1cc1cfb6f9c50e7d52520dd82a10bf309534187\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperators() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos()\\n external\\n view\\n returns (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeights() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns an array of bridge operators correspoding to governor addresses.\\n * @return bridgeOperators_ An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_);\\n\\n /**\\n * @dev Retrieves the governors corresponding to a given array of bridge operators.\\n * This external function allows external callers to obtain the governors associated with a given array of bridge operators.\\n * The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.\\n * @param bridgeOperators An array of bridge operator addresses for which governors are to be retrieved.\\n * @return governors An array of addresses representing the governors corresponding to the provided bridge operators.\\n */\\n function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the vote weights of multiple bridge operators.\\n * @param bridgeOperators An array containing the addresses of bridge operators to get the vote weights for.\\n * @return weights An array of vote weights corresponding to the provided bridge operators.\\n */\\n function getBridgeOperatorWeights(\\n address[] calldata bridgeOperators\\n ) external view returns (uint256[] memory weights);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint256 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint256[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n * @return addeds An array of booleans indicating whether each bridge operator was added successfully.\\n *\\n * Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators(\\n * voteWeights,\\n * governors,\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]);\\n * const filteredWeights = weights.filter((_, index) => addeds[index]);\\n * const filteredGovernors = governors.filter((_, index) => addeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function addBridgeOperators(\\n uint96[] calldata voteWeights,\\n address[] calldata governors,\\n address[] calldata bridgeOperators\\n ) external returns (bool[] memory addeds);\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n * @return removeds An array of booleans indicating whether each bridge operator was removed successfully.\\n *\\n * * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators(\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds);\\n\\n /**\\n * @dev Governor updates their corresponding governor and/or operator address.\\n * Requirements:\\n * - The caller must the governor of the operator that is requested changes.\\n * @param bridgeOperator The address of the bridge operator to update.\\n */\\n function updateBridgeOperator(address bridgeOperator) external;\\n}\\n\",\"keccak256\":\"0xf3d02d806105015a62ddccd43fb46ba2ebd760cdc70839fa0a9c870f6abca5c0\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeReward.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { IBridgeRewardEvents } from \\\"./events/IBridgeRewardEvents.sol\\\";\\n\\ninterface IBridgeReward is IBridgeRewardEvents {\\n /**\\n * @dev This function allows bridge operators to manually synchronize the reward for a given period length.\\n * @param periodLength The length of the reward period for which synchronization is requested.\\n */\\n function syncReward(uint256 periodLength) external;\\n\\n /**\\n * @dev Receives RON from any address.\\n */\\n function receiveRON() external payable;\\n\\n /**\\n * @dev Invoke calculate and transfer reward to operators based on their performance.\\n *\\n * Requirements:\\n * - This method is only called once each period.\\n * - The caller must be the bridge tracking contract or a bridge operator.\\n */\\n function execSyncReward(\\n address[] calldata operators,\\n uint256[] calldata ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) external;\\n\\n /**\\n * @dev Retrieve the total amount of rewards that have been topped up in the contract.\\n * @return totalRewardToppedUp The total rewards topped up value.\\n */\\n function getTotalRewardToppedUp() external view returns (uint256);\\n\\n /**\\n * @dev Retrieve the total amount of rewards that have been scattered to bridge operators in the contract.\\n * @return totalRewardScattered The total rewards scattered value.\\n */\\n function getTotalRewardScattered() external view returns (uint256);\\n\\n /**\\n * @dev Getter for all bridge operators per period.\\n */\\n function getRewardPerPeriod() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the latest rewarded period in the contract.\\n * @return latestRewardedPeriod The latest rewarded period value.\\n */\\n function getLatestRewardedPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Setter for all bridge operators per period.\\n */\\n function setRewardPerPeriod(uint256 rewardPerPeriod) external;\\n}\\n\",\"keccak256\":\"0x781f5b4e9257231f008457d41b277058fe6a2b7366ecd3d64bce2591d0eaa216\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeSlash.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeSlashEvents } from \\\"./events/IBridgeSlashEvents.sol\\\";\\n\\n/**\\n * @title IBridgeSlash\\n * @dev Interface for the BridgeSlash contract to manage slashing functionality for bridge operators.\\n */\\ninterface IBridgeSlash is IBridgeSlashEvents {\\n /**\\n * @dev Slashes the unavailability of bridge operators during a specific period.\\n * @param period The period to slash the bridge operators for.\\n */\\n function execSlashBridgeOperators(\\n address[] calldata operators,\\n uint256[] calldata ballots,\\n uint256 totalBallot,\\n uint256 totalVote,\\n uint256 period\\n ) external returns (bool slashed);\\n\\n /**\\n * @dev Returns the penalize durations for the specified bridge operators.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @return untilPeriods The penalized periods for the bridge operators.\\n */\\n function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external returns (uint256[] memory untilPeriods);\\n\\n /**\\n * @dev Retrieves the added periods of the specified bridge operators.\\n * @param bridgeOperators An array of bridge operator addresses.\\n * @return addedPeriods An array of uint256 values representing the added periods for each bridge operator.\\n */\\n function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods);\\n\\n /**\\n * @dev Gets the slash tier based on the given ballot and total ballots.\\n * @param ballot The ballot count for a bridge operator.\\n * @param totalVote The total vote count for the period.\\n * @return tier The slash tier.\\n */\\n function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier);\\n\\n /**\\n * @dev Retrieve the penalty durations for different slash tiers.\\n * @return penaltyDurations The array of penalty durations for each slash tier.\\n */\\n function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 1 slashing.\\n * @return The duration in period number for Tier 1 slashing.\\n */\\n function TIER_1_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 2 slashing.\\n * @return The duration in period number for Tier 2 slashing.\\n */\\n function TIER_2_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the threshold duration for removing bridge operators.\\n * @return The duration in period number that exceeds which a bridge operator will be removed.\\n */\\n function REMOVE_DURATION_THRESHOLD() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the value of the minimum vote threshold to execute slashing rule.\\n * @return minimumVoteThreshold The minimum vote threshold value.\\n */\\n function MINIMUM_VOTE_THRESHOLD() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x45f7a50e6f2e25d9d1ac8abf0eafd1b7579d625245b9269840d42a476745e735\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeTracking {\\n struct Request {\\n VoteKind kind;\\n uint256 id;\\n }\\n\\n enum VoteKind {\\n Deposit,\\n Withdrawal,\\n MainchainWithdrawal\\n }\\n\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\n\\n /**\\n * @dev Returns the block that allow incomming mutable call.\\n */\\n function startedAtBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of votes at the specific period `_period`.\\n */\\n function totalVote(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots at the specific period `_period`.\\n */\\n function totalBallot(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\n */\\n function getManyTotalBallots(\\n uint256 _period,\\n address[] calldata _bridgeOperators\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\n */\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\n\\n /**\\n * @dev Handles the request once it is approved.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\n\\n /**\\n * @dev Records vote for a receipt and a operator.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\n}\\n\",\"keccak256\":\"0x092841025351341cf7ff9cbf0eb6ef78752ffd2b1af329cb6048996d20c789a9\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev The structure representing information about a bridge operator.\\n * @param addr The address of the bridge operator.\\n * @param voteWeight The vote weight assigned to the bridge operator.\\n */\\n struct BridgeOperatorInfo {\\n address addr;\\n uint96 voteWeight;\\n }\\n\\n /**\\n * @dev Emitted when new bridge operators are added.\\n * @param statuses The array of boolean values represents whether the corresponding bridge operator is added successfully.\\n * @param voteWeights The array of vote weights assigned to the added bridge operators.\\n * @param governors The array of addresses representing the governors associated with the added bridge operators.\\n * @param bridgeOperators The array of addresses representing the added bridge operators.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n * @param statuses The array of boolean values representing the statuses of the removed bridge operators.\\n * @param bridgeOperators The array of addresses representing the removed bridge operators.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n * @param governor The address of the governor initiating the update.\\n * @param fromBridgeOperator The address of the bridge operator being updated.\\n * @param toBridgeOperator The updated address of the bridge operator.\\n */\\n event BridgeOperatorUpdated(\\n address indexed governor,\\n address indexed fromBridgeOperator,\\n address indexed toBridgeOperator\\n );\\n}\\n\",\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeRewardEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeRewardEvents {\\n /**\\n * @dev Reward-related information for a bridge operator.\\n * @param claimed The amount of rewards claimed by the bridge operator.\\n * @param slashed The amount of rewards that have been slashed from the bridge operator.\\n */\\n struct BridgeRewardInfo {\\n uint256 claimed;\\n uint256 slashed;\\n }\\n\\n /**\\n * @dev Emitted when RON are safely received as rewards in the contract.\\n * @param from The address of the sender who transferred RON tokens as rewards.\\n * @param balanceBefore The balance of the contract before receiving the RON tokens.\\n * @param amount The amount of RON received.\\n */\\n event SafeReceived(address indexed from, uint256 balanceBefore, uint256 amount);\\n /// @dev Event emitted when the reward per period config is updated.\\n event UpdatedRewardPerPeriod(uint256 newRewardPerPeriod);\\n /// @dev Event emitted when the reward of the `operator` is scattered with `amount`.\\n event BridgeRewardScattered(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the reward of the `operator` is slashed with `amount`.\\n event BridgeRewardSlashed(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the reward of the `operator` is scattered with `amount` but failed to transfer.\\n event BridgeRewardScatterFailed(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the requesting period to sync is too far.\\n event BridgeRewardSyncTooFarPeriod(uint256 requestingPeriod, uint256 latestPeriod);\\n}\\n\",\"keccak256\":\"0xf0efa7130ba933552a16b7fb4040f23e276a41d8d698f27b11c3f82930916e51\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeSlashEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeSlashEvents {\\n /**\\n * @dev Enumeration representing the slashing tiers for bridge operators.\\n */\\n enum Tier {\\n Tier0,\\n Tier1,\\n Tier2\\n }\\n\\n /**\\n * @dev Struct representing the status of a bridge operator.\\n */\\n struct BridgeSlashInfo {\\n uint128 slashUntilPeriod;\\n uint128 newlyAddedAtPeriod;\\n }\\n\\n /**\\n * @dev Event emitted when a bridge operator is slashed.\\n * @param tier The slash tier of the operator.\\n * @param bridgeOperator The address of the slashed bridge operator.\\n * @param period The period in which the operator is slashed.\\n * @param slashUntilPeriod The period until which the operator is penalized.\\n */\\n event Slashed(Tier indexed tier, address indexed bridgeOperator, uint256 indexed period, uint256 slashUntilPeriod);\\n\\n /**\\n * @dev Emitted when a removal request is made for a bridge operator.\\n * @param period The period for which the removal request is made.\\n * @param bridgeOperator The address of the bridge operator being requested for removal.\\n */\\n event RemovalRequested(uint256 indexed period, address indexed bridgeOperator);\\n}\\n\",\"keccak256\":\"0x9611e0d8b85b50bdd8ba9e8148564af526e78ccce5d202e7c84043d2d2ccb75f\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ICandidateManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ICandidateManager {\\n struct ValidatorCandidate {\\n // Admin of the candidate\\n address admin;\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address that receives mining reward of the validator\\n address payable treasuryAddr;\\n // Address of the bridge operator corresponding to the candidate\\n address ______deprecatedbridgeOperatorAddr;\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\n // Values in range [0; 100_00] stands for 0-100%\\n uint256 commissionRate;\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\n uint256 revokingTimestamp;\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\n uint256 topupDeadline;\\n }\\n\\n struct CommissionSchedule {\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\n uint256 effectiveTimestamp;\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\n uint256 commissionRate;\\n }\\n\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\n /// @dev Emitted when the validator candidate is granted.\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\n /// @dev Emitted when the validator candidate is revoked.\\n event CandidatesRevoked(address[] consensusAddrs);\\n\\n /// @dev Emitted when a schedule for updating commission rate is set.\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\n /// @dev Emitted when the commission rate of a validator is updated.\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\n\\n /// @dev Error of exceeding maximum number of candidates.\\n error ErrExceedsMaxNumberOfCandidate();\\n /// @dev Error of querying for already existent candidate.\\n error ErrExistentCandidate();\\n /// @dev Error of querying for non-existent candidate.\\n error ErrNonExistentCandidate();\\n /// @dev Error of candidate admin already exists.\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\n /// @dev Error of treasury already exists.\\n error ErrExistentTreasury(address _treasuryAddr);\\n /// @dev Error of invalid commission rate.\\n error ErrInvalidCommissionRate();\\n /// @dev Error of invalid effective days onwards.\\n error ErrInvalidEffectiveDaysOnwards();\\n /// @dev Error of invalid min effective days onwards.\\n error ErrInvalidMinEffectiveDaysOnwards();\\n /// @dev Error of already requested revoking candidate before.\\n error ErrAlreadyRequestedRevokingCandidate();\\n /// @dev Error of commission change schedule exists.\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\n /// @dev Error of trusted org cannot renounce.\\n error ErrTrustedOrgCannotRenounce();\\n\\n /**\\n * @dev Returns the maximum number of validator candidate.\\n */\\n function maxValidatorCandidate() external view returns (uint256);\\n\\n /**\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\n */\\n function minEffectiveDaysOnwards() external view returns (uint256);\\n\\n /**\\n * @dev Sets the maximum number of validator candidate.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MaxValidatorCandidateUpdated` event.\\n *\\n */\\n function setMaxValidatorCandidate(uint256) external;\\n\\n /**\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\n *\\n */\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\n\\n /**\\n * @dev Grants a validator candidate.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateGranted`.\\n *\\n */\\n function execApplyValidatorCandidate(\\n address _admin,\\n address _consensusAddr,\\n address payable _treasuryAddr,\\n uint256 _commissionRate\\n ) external;\\n\\n /**\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\n *\\n */\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\n\\n /**\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\n *\\n * Requirements:\\n * - The method caller is the staking contract.\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\n * - The `_rate` must be in range of [0_00; 100_00].\\n *\\n * Emits the event `CommissionRateUpdateScheduled`.\\n *\\n */\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\n\\n /**\\n * @dev Returns whether the address is a validator (candidate).\\n */\\n function isValidatorCandidate(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns the validator candidate.\\n */\\n function getValidatorCandidates() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns all candidate info.\\n */\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\n\\n /**\\n * @dev Returns the info of a candidate.\\n */\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\n\\n /**\\n * @dev Returns whether the address is the candidate admin.\\n */\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\n\\n /**\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\n */\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\n}\\n\",\"keccak256\":\"0x9ab205c736f1bcc9a3debe06e08d829f4857141d940e6f608236f136193a7f49\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ICoinbaseExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ISlashingExecution.sol\\\";\\n\\ninterface ICoinbaseExecution is ISlashingExecution {\\n enum BlockRewardDeprecatedType {\\n UNKNOWN,\\n UNAVAILABILITY,\\n AFTER_BAILOUT\\n }\\n\\n /// @dev Emitted when the validator set is updated\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated.\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\n\\n /// @dev Emitted when the reward of the block producer is deprecated.\\n event BlockRewardDeprecated(\\n address indexed coinbaseAddr,\\n uint256 rewardAmount,\\n BlockRewardDeprecatedType deprecatedType\\n );\\n /// @dev Emitted when the block reward is submitted.\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\n\\n /// @dev Emitted when the block producer reward is distributed.\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\n event MiningRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the bridge operator reward is distributed.\\n event BridgeOperatorRewardDistributed(\\n address indexed consensusAddr,\\n address indexed bridgeOperator,\\n address indexed recipientAddr,\\n uint256 amount\\n );\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\n event BridgeOperatorRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed bridgeOperator,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\n event StakingRewardDistributionFailed(\\n uint256 totalAmount,\\n address[] consensusAddrs,\\n uint256[] amounts,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the epoch is wrapped up.\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\n\\n /// @dev Error of method caller must be coinbase\\n error ErrCallerMustBeCoinbase();\\n /// @dev Error of only allowed at the end of epoch\\n error ErrAtEndOfEpochOnly();\\n /// @dev Error of query for already wrapped up epoch\\n error ErrAlreadyWrappedEpoch();\\n\\n /**\\n * @dev Submits reward of the current block.\\n *\\n * Requirements:\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\n *\\n */\\n function submitBlockReward() external payable;\\n\\n /**\\n * @dev Wraps up the current epoch.\\n *\\n * Requirements:\\n * - The method must be called when the current epoch is ending.\\n * - The epoch is not wrapped yet.\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\n * Emits the event `WrappedUpEpoch`.\\n *\\n */\\n function wrapUpEpoch() external payable;\\n}\\n\",\"keccak256\":\"0xe4060b7e3b04a0043bd334011fe4ba67c990b0484dad52d7f14b35040989b6ab\",\"license\":\"MIT\"},\"contracts/interfaces/validator/IEmergencyExit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IEmergencyExit {\\n /// @dev Emitted when the fund is locked from an emergency exit request\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\n event EmergencyExitLockedFundReleased(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 unlockedAmount\\n );\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\n event EmergencyExitLockedFundReleasingFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 unlockedAmount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the emergency exit locked amount is updated.\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\n /// @dev Emitted when the emergency expiry duration is updated.\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\n\\n /// @dev Error of already requested emergency exit before.\\n error ErrAlreadyRequestedEmergencyExit();\\n\\n /**\\n * @dev Returns the amount of RON to lock from a consensus address.\\n */\\n function emergencyExitLockedAmount() external returns (uint256);\\n\\n /**\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\n */\\n function emergencyExpiryDuration() external returns (uint256);\\n\\n /**\\n * @dev Sets the amount of RON to lock from a consensus address.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\n *\\n */\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\n\\n /**\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\n *\\n */\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\n\\n /**\\n * @dev Unlocks fund for emergency exit request.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\n *\\n */\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\n\\n /**\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n */\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\n}\\n\",\"keccak256\":\"0x45161abd1e3db83052a06889a0e3a7a5e7ee3306478601d58ac4ed32ccaa75ad\",\"license\":\"MIT\"},\"contracts/interfaces/validator/IRoninValidatorSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ICandidateManager.sol\\\";\\nimport \\\"./info-fragments/ICommonInfo.sol\\\";\\nimport \\\"./ICoinbaseExecution.sol\\\";\\nimport \\\"./ISlashingExecution.sol\\\";\\nimport \\\"./IEmergencyExit.sol\\\";\\n\\ninterface IRoninValidatorSet is\\n ICandidateManager,\\n ICommonInfo,\\n ISlashingExecution,\\n ICoinbaseExecution,\\n IEmergencyExit\\n{}\\n\",\"keccak256\":\"0x813f34747aea4dfb53bbc147abf8dbe5999ce73111c2db99bcb3efb4cf75bb3d\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ISlashingExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ISlashingExecution {\\n /// @dev Emitted when the validator is punished.\\n event ValidatorPunished(\\n address indexed consensusAddr,\\n uint256 indexed period,\\n uint256 jailedUntil,\\n uint256 deductedStakingAmount,\\n bool blockProducerRewardDeprecated,\\n bool bridgeOperatorRewardDeprecated\\n );\\n /// @dev Emitted when the validator get out of jail by bailout.\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\n\\n /// @dev Error of cannot bailout due to high tier slash.\\n error ErrCannotBailout(address validator);\\n\\n /**\\n * @dev Finalize the slash request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorPunished`.\\n *\\n */\\n function execSlash(\\n address _validatorAddr,\\n uint256 _newJailedUntil,\\n uint256 _slashAmount,\\n bool _cannotBailout\\n ) external;\\n\\n /**\\n * @dev Finalize the bailout request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorUnjailed`.\\n *\\n */\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\n}\\n\",\"keccak256\":\"0x80362c42fdc0ee06543a2abbffee961fe51c15a7c5e18933a9c34897e50d07fe\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/ICommonInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IJailingInfo.sol\\\";\\nimport \\\"./ITimingInfo.sol\\\";\\nimport \\\"./IValidatorInfoV2.sol\\\";\\n\\ninterface ICommonInfo is ITimingInfo, IJailingInfo, IValidatorInfoV2 {\\n struct EmergencyExitInfo {\\n uint256 lockedAmount;\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\n uint256 recyclingAt;\\n }\\n\\n /// @dev Emitted when the deprecated reward is withdrawn.\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\n\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\n error ErrUnauthorizedReceiveRON();\\n /// @dev Error thrown when queries for a non existent info.\\n error NonExistentRecyclingInfo();\\n\\n /**\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\n */\\n function totalDeprecatedReward() external view returns (uint256);\\n\\n /**\\n * @dev Returns the emergency exit request.\\n */\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\n}\\n\",\"keccak256\":\"0x3fdfa86da33b889e5153075ffc028d6b0c607480a96b532fbbbc48ac7bbf27c9\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/IJailingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IJailingInfo {\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkJailed(address) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeft(\\n address _addr\\n ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\n */\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeftAtBlock(\\n address _addr,\\n uint256 _blockNum\\n ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\n */\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\n */\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2b1846b05ca1d636299fb929c1bd7b392b236f5e3f7aa3e7eea2c6d57b8836fb\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/ITimingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ITimingInfo {\\n /**\\n * @dev Returns the block that validator set was updated.\\n */\\n function getLastUpdatedBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the number of blocks in a epoch.\\n */\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\n\\n /**\\n * @dev Returns the epoch index from the block number.\\n */\\n function epochOf(uint256 _block) external view returns (uint256);\\n\\n /**\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\n */\\n function epochEndingAt(uint256 _block) external view returns (bool);\\n\\n /**\\n * @dev Tries to get the period index from the epoch number.\\n */\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\n\\n /**\\n * @dev Returns whether the period ending at the current block number.\\n */\\n function isPeriodEnding() external view returns (bool);\\n\\n /**\\n * @dev Returns the period index from the current block.\\n */\\n function currentPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the block number that the current period starts at.\\n */\\n function currentPeriodStartAtBlock() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/IValidatorInfoV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"../../../libraries/EnumFlags.sol\\\";\\n\\ninterface IValidatorInfoV2 {\\n /**\\n * @dev Error thrown when an invalid maximum prioritized validator number is provided.\\n */\\n error ErrInvalidMaxPrioritizedValidatorNumber();\\n\\n /// @dev Emitted when the number of max validator is updated.\\n event MaxValidatorNumberUpdated(uint256);\\n /// @dev Emitted when the number of reserved slots for prioritized validators is updated.\\n event MaxPrioritizedValidatorNumberUpdated(uint256);\\n\\n /**\\n * @dev Returns the maximum number of validators in the epoch.\\n */\\n function maxValidatorNumber() external view returns (uint256 _maximumValidatorNumber);\\n\\n /**\\n * @dev Returns the number of reserved slots for prioritized validators.\\n */\\n function maxPrioritizedValidatorNumber() external view returns (uint256 _maximumPrioritizedValidatorNumber);\\n\\n /**\\n * @dev Returns the current validator list.\\n */\\n function getValidators() external view returns (address[] memory _validatorList);\\n\\n /**\\n * @dev Returns the current block producer list.\\n */\\n function getBlockProducers() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns whether the address is block producer or not.\\n */\\n function isBlockProducer(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns total numbers of the block producers.\\n */\\n function totalBlockProducers() external view returns (uint256);\\n\\n /**\\n * @dev Updates the max validator number\\n *\\n * Requirements:\\n * - The method caller is admin\\n *\\n * Emits the event `MaxValidatorNumberUpdated`\\n *\\n */\\n function setMaxValidatorNumber(uint256 _maxValidatorNumber) external;\\n\\n /**\\n * @dev Updates the number of reserved slots for prioritized validators\\n *\\n * Requirements:\\n * - The method caller is admin\\n *\\n * Emits the event `MaxPrioritizedValidatorNumberUpdated`\\n *\\n */\\n function setMaxPrioritizedValidatorNumber(uint256 _maxPrioritizedValidatorNumber) external;\\n}\\n\",\"keccak256\":\"0x6213c188a1323b242a098394b91caf9481e257bd57a0804cb2aa890377a993ed\",\"license\":\"MIT\"},\"contracts/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA; ) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB; ) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\"},\"contracts/libraries/EnumFlags.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This library implements checking flag of an enumerated value.\\n * The originated idea is inherited from [Enum.HashFlag(Enum)](https://learn.microsoft.com/en-us/dotnet/api/system.enum.hasflag?view=net-6.0) method of C#.\\n */\\nlibrary EnumFlags {\\n enum ValidatorFlag {\\n None, // bit(00)\\n BlockProducer, // bit(01)\\n DeprecatedBridgeOperator, // bit(10)\\n Both // bit(11)\\n }\\n\\n function isNone(ValidatorFlag _value) internal pure returns (bool) {\\n return uint8(_value) == 0;\\n }\\n\\n /**\\n * @dev Checks if `_value` has `_flag`.\\n */\\n function hasFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (bool) {\\n return (uint8(_value) & uint8(_flag)) != 0;\\n }\\n\\n /**\\n * @dev Calculate new value of `_value` after adding `_flag`.\\n */\\n function addFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\\n return ValidatorFlag(uint8(_value) | uint8(_flag));\\n }\\n\\n /**\\n * @dev Calculate new value of `_value` after remove `_flag`.\\n */\\n function removeFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\\n return ValidatorFlag(uint8(_value) & ~uint8(_flag));\\n }\\n}\\n\",\"keccak256\":\"0xa712f0d1a323ee39f23eb3ee3278b4ec25fe2e536b1ccc629578c66f277c088d\",\"license\":\"UNLICENSED\"},\"contracts/ronin/gateway/BridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../interfaces/bridge/IBridgeTracking.sol\\\";\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeSlash } from \\\"../../interfaces/bridge/IBridgeSlash.sol\\\";\\nimport { IBridgeReward } from \\\"../../interfaces/bridge/IBridgeReward.sol\\\";\\nimport { IRoninValidatorSet } from \\\"../../interfaces/validator/IRoninValidatorSet.sol\\\";\\nimport { HasBridgeDeprecated, HasValidatorDeprecated } from \\\"../../utils/DeprecatedSlots.sol\\\";\\n\\ncontract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContracts, Initializable, IBridgeTracking {\\n struct PeriodVotingMetric {\\n /// @dev Total requests that are tracked in the period. This value is 0 until the {_bufferMetric.requests[]} gets added into a period metric.\\n uint256 totalRequest;\\n uint256 totalBallot;\\n mapping(address => uint256) totalBallotOf;\\n address[] voters;\\n }\\n\\n struct PeriodVotingMetricTimeWrapper {\\n uint256 lastEpoch;\\n Request[] requests;\\n PeriodVotingMetric data;\\n }\\n\\n struct ReceiptTrackingInfo {\\n /// @dev The period that the receipt is approved. Value 0 means the receipt is not approved yet.\\n uint256 approvedPeriod;\\n /// @dev The address list of voters\\n address[] voters;\\n /// @dev Mapping from voter => flag indicating the voter casts vote for this receipt\\n mapping(address => bool) voted;\\n /// @dev The period that the receipt is tracked, i.e. the metric is transferred from buffer to the period. Value 0 means the receipt is currently in buffer or not tracked yet.\\n uint256 trackedPeriod;\\n }\\n\\n /// @dev The block that the contract allows incoming mutable calls.\\n uint256 internal _startedAtBlock;\\n\\n /// @dev The temporary info of votes and ballots\\n PeriodVotingMetricTimeWrapper internal _bufferMetric;\\n /// @dev Mapping from period number => vote stats based on period\\n mapping(uint256 => PeriodVotingMetric) internal _periodMetric;\\n /// @dev Mapping from vote kind => receipt id => receipt stats\\n mapping(VoteKind => mapping(uint256 => ReceiptTrackingInfo)) internal _receiptTrackingInfo;\\n /// @dev The latest period that get synced with bridge's slashing and rewarding contract\\n uint256 internal _lastSyncPeriod;\\n\\n modifier skipOnUnstarted() {\\n _skipOnUnstarted();\\n _;\\n }\\n\\n /**\\n * @dev Returns the whole transaction in case the current block is less than start block.\\n */\\n function _skipOnUnstarted() private view {\\n if (block.number < _startedAtBlock) {\\n assembly {\\n return(0, 0)\\n }\\n }\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /**\\n * @dev Initializes the contract storage.\\n */\\n function initialize(address bridgeContract, address validatorContract, uint256 startedAtBlock_) external initializer {\\n _setContract(ContractType.BRIDGE, bridgeContract);\\n _setContract(ContractType.VALIDATOR, validatorContract);\\n _startedAtBlock = startedAtBlock_;\\n }\\n\\n function initializeV2() external reinitializer(2) {\\n _setContract(ContractType.BRIDGE, ______deprecatedBridge);\\n _setContract(ContractType.VALIDATOR, ______deprecatedValidator);\\n\\n delete ______deprecatedBridge;\\n delete ______deprecatedValidator;\\n }\\n\\n function initializeV3(address bridgeManager, address bridgeSlash, address bridgeReward) external reinitializer(3) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManager);\\n _setContract(ContractType.BRIDGE_SLASH, bridgeSlash);\\n _setContract(ContractType.BRIDGE_REWARD, bridgeReward);\\n _lastSyncPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod() - 1;\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function startedAtBlock() external view override returns (uint256) {\\n return _startedAtBlock;\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function totalVote(uint256 period) public view override returns (uint256 totalVote_) {\\n totalVote_ = _periodMetric[period].totalRequest;\\n if (_isBufferCountedForPeriod(period)) {\\n totalVote_ += _bufferMetric.requests.length;\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function totalBallot(uint256 period) public view override returns (uint256 totalBallot_) {\\n totalBallot_ = _periodMetric[period].totalBallot;\\n if (_isBufferCountedForPeriod(period)) {\\n totalBallot_ += _bufferMetric.data.totalBallot;\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function getManyTotalBallots(\\n uint256 period,\\n address[] calldata operators\\n ) external view override returns (uint256[] memory _res) {\\n _res = _getManyTotalBallots(period, operators);\\n }\\n\\n function _getManyTotalBallots(\\n uint256 period,\\n address[] memory operators\\n ) internal view returns (uint256[] memory res) {\\n uint256 length = operators.length;\\n res = new uint256[](length);\\n bool isBufferCounted = _isBufferCountedForPeriod(period);\\n for (uint i = 0; i < length; ) {\\n res[i] = _totalBallotOf(period, operators[i], isBufferCounted);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function totalBallotOf(uint256 period, address bridgeOperator) public view override returns (uint256) {\\n return _totalBallotOf(period, bridgeOperator, _isBufferCountedForPeriod(period));\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function handleVoteApproved(\\n VoteKind kind,\\n uint256 requestId\\n ) external override onlyContract(ContractType.BRIDGE) skipOnUnstarted {\\n ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId];\\n\\n // Only records for the receipt which not approved\\n if (_receiptInfo.approvedPeriod == 0) {\\n _trySyncBuffer();\\n uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n _receiptInfo.approvedPeriod = currentPeriod;\\n\\n Request storage _bufferRequest = _bufferMetric.requests.push();\\n _bufferRequest.kind = kind;\\n _bufferRequest.id = requestId;\\n\\n address[] storage _voters = _receiptInfo.voters;\\n for (uint i = 0; i < _voters.length; ) {\\n _increaseBallot(kind, requestId, _voters[i], currentPeriod);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n delete _receiptInfo.voters;\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function recordVote(\\n VoteKind kind,\\n uint256 requestId,\\n address operator\\n ) external override onlyContract(ContractType.BRIDGE) skipOnUnstarted {\\n uint256 period = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n _trySyncBuffer();\\n ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId];\\n\\n // When the vote is not approved yet, the voters are saved in the receipt info, and not increase ballot metric.\\n // The ballot metric will be increased later in the {handleVoteApproved} method.\\n if (_receiptInfo.approvedPeriod == 0) {\\n _receiptInfo.voters.push(operator);\\n return;\\n }\\n\\n _increaseBallot(kind, requestId, operator, period);\\n\\n uint256 lastSyncPeriod = _lastSyncPeriod;\\n // When switching to new period, wrap up vote info, then slash and distribute reward accordingly.\\n if (lastSyncPeriod < period) {\\n _lastSyncPeriod = period;\\n\\n address[] memory allOperators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators();\\n uint256[] memory ballots = _getManyTotalBallots(lastSyncPeriod, allOperators);\\n\\n uint256 totalVote_ = totalVote(lastSyncPeriod);\\n uint256 totalBallot_ = totalBallot(lastSyncPeriod);\\n\\n address bridgeSlashContract = getContract(ContractType.BRIDGE_SLASH);\\n (bool success, bytes memory returnOrRevertData) = bridgeSlashContract.call(\\n abi.encodeCall(\\n IBridgeSlash.execSlashBridgeOperators,\\n (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod)\\n )\\n );\\n if (!success) {\\n emit ExternalCallFailed(\\n bridgeSlashContract,\\n IBridgeSlash.execSlashBridgeOperators.selector,\\n returnOrRevertData\\n );\\n }\\n\\n address bridgeRewardContract = getContract(ContractType.BRIDGE_REWARD);\\n (success, returnOrRevertData) = bridgeRewardContract.call(\\n abi.encodeCall(IBridgeReward.execSyncReward, (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod))\\n );\\n if (!success) {\\n emit ExternalCallFailed(bridgeRewardContract, IBridgeReward.execSyncReward.selector, returnOrRevertData);\\n }\\n }\\n }\\n\\n /**\\n * @dev Increases the ballot for the operator at a period.\\n */\\n function _increaseBallot(VoteKind kind, uint256 requestId, address operator, uint256 currentPeriod) internal {\\n ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId];\\n if (_receiptInfo.voted[operator]) {\\n return;\\n }\\n\\n _receiptInfo.voted[operator] = true;\\n\\n uint256 trackedPeriod = _receiptInfo.trackedPeriod;\\n\\n // Do not increase ballot for receipt that is neither in the buffer, nor in the most current tracked period.\\n // If the receipt is not tracked in a period, increase metric in buffer.\\n unchecked {\\n if (trackedPeriod == 0) {\\n if (_bufferMetric.data.totalBallotOf[operator] == 0) {\\n _bufferMetric.data.voters.push(operator);\\n }\\n _bufferMetric.data.totalBallot++;\\n _bufferMetric.data.totalBallotOf[operator]++;\\n }\\n // If the receipt is tracked in the most current tracked period, increase metric in the period.\\n else if (trackedPeriod == currentPeriod) {\\n PeriodVotingMetric storage _metric = _periodMetric[trackedPeriod];\\n _metric.totalBallot++;\\n _metric.totalBallotOf[operator]++;\\n }\\n }\\n }\\n\\n /**\\n * @dev See `totalBallotOf`.\\n */\\n function _totalBallotOf(\\n uint256 period,\\n address operator,\\n bool mustCountLastStats\\n ) internal view returns (uint256 _totalBallot) {\\n _totalBallot = _periodMetric[period].totalBallotOf[operator];\\n if (mustCountLastStats) {\\n _totalBallot += _bufferMetric.data.totalBallotOf[operator];\\n }\\n }\\n\\n /**\\n * @dev Syncs period stats. Move all data from the buffer metric to the period metric.\\n *\\n * Requirements:\\n * - The epoch after the buffer epoch is wrapped up.\\n */\\n function _trySyncBuffer() internal {\\n IRoninValidatorSet validatorContract = IRoninValidatorSet(getContract(ContractType.VALIDATOR));\\n uint256 currentEpoch = validatorContract.epochOf(block.number);\\n if (_bufferMetric.lastEpoch < currentEpoch) {\\n (, uint256 trackedPeriod) = validatorContract.tryGetPeriodOfEpoch(_bufferMetric.lastEpoch + 1);\\n _bufferMetric.lastEpoch = currentEpoch;\\n\\n // Copy numbers of totals\\n PeriodVotingMetric storage _metric = _periodMetric[trackedPeriod];\\n _metric.totalRequest += _bufferMetric.requests.length;\\n _metric.totalBallot += _bufferMetric.data.totalBallot;\\n\\n // Copy voters info and voters' ballot\\n for (uint i = 0; i < _bufferMetric.data.voters.length; ) {\\n address voter = _bufferMetric.data.voters[i];\\n _metric.totalBallotOf[voter] += _bufferMetric.data.totalBallotOf[voter];\\n delete _bufferMetric.data.totalBallotOf[voter]; // need to manually delete each element, due to mapping\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Mark all receipts in the buffer as tracked. Keep total number of receipts and delete receipt details.\\n for (uint i = 0; i < _bufferMetric.requests.length; ) {\\n Request storage _bufferRequest = _bufferMetric.requests[i];\\n ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[_bufferRequest.kind][_bufferRequest.id];\\n _receiptInfo.trackedPeriod = trackedPeriod;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n delete _bufferMetric.requests;\\n delete _bufferMetric.data;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the buffer stats must be counted or not.\\n */\\n function _isBufferCountedForPeriod(uint256 queriedPeriod) internal view returns (bool) {\\n IRoninValidatorSet validatorContract = IRoninValidatorSet(getContract(ContractType.VALIDATOR));\\n uint256 currentEpoch = validatorContract.epochOf(block.number);\\n (bool filled, uint256 periodOfNextTemporaryEpoch) = validatorContract.tryGetPeriodOfEpoch(\\n _bufferMetric.lastEpoch + 1\\n );\\n return filled && queriedPeriod == periodOfNextTemporaryEpoch && _bufferMetric.lastEpoch < currentEpoch;\\n }\\n}\\n\",\"keccak256\":\"0xd26f94308b302f32fe8fa241643053fef7b3651c51486026ca93a45d9c499697\",\"license\":\"MIT\"},\"contracts/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\",\"keccak256\":\"0x951a466bb76f385554960531e63e64a5bd314df341bb6c95e6e81448d6984ac0\",\"license\":\"MIT\"},\"contracts/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n /* 0 */ UNKNOWN,\\n /* 1 */ PAUSE_ENFORCER,\\n /* 2 */ BRIDGE,\\n /* 3 */ BRIDGE_TRACKING,\\n /* 4 */ GOVERNANCE_ADMIN,\\n /* 5 */ MAINTENANCE,\\n /* 6 */ SLASH_INDICATOR,\\n /* 7 */ STAKING_VESTING,\\n /* 8 */ VALIDATOR,\\n /* 9 */ STAKING,\\n /* 10 */ RONIN_TRUSTED_ORGANIZATION,\\n /* 11 */ BRIDGE_MANAGER,\\n /* 12 */ BRIDGE_SLASH,\\n /* 13 */ BRIDGE_REWARD\\n}\\n\",\"keccak256\":\"0xf72feff9afafcb5cadc1b05c6e0b998ea5d66c7ece57c3e482e560d0a1bb4079\",\"license\":\"MIT\"},\"contracts/utils/DeprecatedSlots.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Deprecated Contracts\\n * @dev These abstract contracts are deprecated and should not be used in new implementations.\\n * They provide functionality related to various aspects of a smart contract but have been marked\\n * as deprecated to indicate that they are no longer actively maintained or recommended for use.\\n * The purpose of these contracts is to preserve the slots for already deployed contracts.\\n */\\ncontract HasSlashIndicatorDeprecated {\\n /// @custom:deprecated Previously `_slashIndicatorContract` (non-zero value)\\n address internal ______deprecatedSlashIndicator;\\n}\\n\\ncontract HasStakingVestingDeprecated {\\n /// @custom:deprecated Previously `_stakingVestingContract` (non-zero value)\\n address internal ______deprecatedStakingVesting;\\n}\\n\\ncontract HasBridgeDeprecated {\\n /// @custom:deprecated Previously `_bridgeContract` (non-zero value)\\n address internal ______deprecatedBridge;\\n}\\n\\ncontract HasValidatorDeprecated {\\n /// @custom:deprecated Previously `_validatorContract` (non-zero value)\\n address internal ______deprecatedValidator;\\n}\\n\\ncontract HasStakingDeprecated {\\n /// @custom:deprecated Previously `_stakingContract` (non-zero value)\\n address internal ______deprecatedStakingContract;\\n}\\n\\ncontract HasMaintenanceDeprecated {\\n /// @custom:deprecated Previously `_maintenanceContract` (non-zero value)\\n address internal ______deprecatedMaintenance;\\n}\\n\\ncontract HasTrustedOrgDeprecated {\\n /// @custom:deprecated Previously `_trustedOrgContract` (non-zero value)\\n address internal ______deprecatedTrustedOrg;\\n}\\n\\ncontract HasGovernanceAdminDeprecated {\\n /// @custom:deprecated Previously `_governanceAdminContract` (non-zero value)\\n address internal ______deprecatedGovernanceAdmin;\\n}\\n\\ncontract HasBridgeTrackingDeprecated {\\n /// @custom:deprecated Previously `_bridgeTrackingContract` (non-zero value)\\n address internal ______deprecatedBridgeTracking;\\n}\\n\",\"keccak256\":\"0xe93504aed9f67a6d399475c7162560f2ac4f793fab5b67fe504fc694ac9a2892\",\"license\":\"MIT\"},\"contracts/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface.\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n * @notice If the contract does not support the interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n if (!IERC165(contractAddr).supportsInterface(interfaceId)) {\\n revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2e1aef91018590d52fa9ca9e63708c8ef3e9ee7061e8947d4bb30b07d721a229\",\"license\":\"MIT\"},\"contracts/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n /* 0 */ UNKNOWN,\\n /* 1 */ ADMIN,\\n /* 2 */ COINBASE,\\n /* 3 */ GOVERNOR,\\n /* 4 */ CANDIDATE_ADMIN,\\n /* 5 */ WITHDRAWAL_MIGRATOR,\\n /* 6 */ __DEPRECATED_BRIDGE_OPERATOR,\\n /* 7 */ BLOCK_PRODUCER,\\n /* 8 */ VALIDATOR_CANDIDATE\\n}\\n\",\"keccak256\":\"0xa98cec38c640c4e37f475debbcd366226f1188c3f5ea6e29de768bd33e021873\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100eb565b600154600160a81b900460ff161561008c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60015460ff600160a01b909104811610156100e9576001805460ff60a01b191660ff60a01b17905560405160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611a1f806100fa6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063d25ed4c611610071578063d25ed4c614610135578063de981f1b14610148578063e2a75f3614610173578063e7ec7b3914610186578063f67e815214610199578063f84bd121146101b957600080fd5b80631794bb3c146100b9578063229f88ea146100ce5780634ac0bcda146100e15780635cd8a76b14610107578063865e6fd31461010f578063c7c4fea914610122575b600080fd5b6100cc6100c7366004611455565b6101c1565b005b6100cc6100dc3660046114a5565b6102c2565b6100f46100ef3660046114cf565b61046a565b6040519081526020015b60405180910390f35b6100cc610488565b6100cc61011d36600461150e565b610581565b6100cc61013036600461153a565b6105a0565b6100f461014336600461157a565b61097f565b61015b610156366004611593565b6109b4565b6040516001600160a01b0390911681526020016100fe565b6100f461018136600461157a565b610a2a565b6100cc6101943660046115ae565b610a54565b6101ac6101a73660046115ee565b610b9e565b6040516100fe91906116a8565b6002546100f4565b600154600160a81b900460ff16158080156101e7575060018054600160a01b900460ff16105b806102075750303b158015610207575060018054600160a01b900460ff16145b61022c5760405162461bcd60e51b8152600401610223906116bb565b60405180910390fd5b6001805460ff60a01b1916600160a01b1790558015610259576001805460ff60a81b1916600160a81b1790555b610264600285610be5565b61026f600884610be5565b600282905580156102bc576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b50505050565b60026102cd81610c89565b6102d5610cd8565b6000600a60008560028111156102ed576102ed611709565b60028111156102fe576102fe611709565b81526020019081526020016000206000848152602001908152602001600020905080600001546000036102bc57610333610ce6565b600061033f60086109b4565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561037c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a0919061171f565b808355600480546001818101835560009290925260029081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054939450928892849260ff199092169184908111156103fd576103fd611709565b02179055506001808201869055830160005b81548110156104525761044a888884848154811061042f5761042f611738565b6000918252602090912001546001600160a01b031687610f88565b60010161040f565b506104616001850160006113c8565b50505050505050565b600061047f838361047a86611108565b61122e565b90505b92915050565b600154600290600160a81b900460ff161580156104b3575060015460ff808316600160a01b90920416105b6104cf5760405162461bcd60e51b8152600401610223906116bb565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b17905560005461050f906002906001600160a01b0316610be5565b600154610527906008906001600160a01b0316610be5565b600080546001600160a01b031916905560018054600161ff0160a01b031916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b610589611284565b610592816112de565b61059c8282610be5565b5050565b60026105ab81610c89565b6105b3610cd8565b60006105bf60086109b4565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610620919061171f565b905061062a610ce6565b6000600a600087600281111561064257610642611709565b600281111561065357610653611709565b81526020019081526020016000206000868152602001908152602001600020905080600001546000036106b5576001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b038516179055506102bc565b6106c186868685610f88565b600b548281101561046157600b8381556000906106dd906109b4565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561071a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610742919081019061176f565b905060006107508383611314565b9050600061075d84610a2a565b9050600061076a8561097f565b90506000610778600c6109b4565b9050600080826001600160a01b0316878786888c6040516024016107a0959493929190611834565b60408051601f198184030181529181526020820180516001600160e01b0316634dca592560e01b179052516107d591906118cd565b6000604051808303816000865af19150503d8060008114610812576040519150601f19603f3d011682016040523d82523d6000602084013e610817565b606091505b50915091508161086e57604051634dca592560e01b906001600160a01b038516907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f827906108659085906118e9565b60405180910390a35b600061087a600d6109b4565b9050806001600160a01b0316888887898d60405160240161089f959493929190611834565b60408051601f198184030181529181526020820180516001600160e01b03166335e5b7eb60e11b179052516108d491906118cd565b6000604051808303816000865af19150503d8060008114610911576040519150601f19603f3d011682016040523d82523d6000602084013e610916565b606091505b5090935091508261096e576040516335e5b7eb60e11b906001600160a01b038316907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f827906109659086906118e9565b60405180910390a35b505050505050505050505050505050565b60008181526009602052604090206001015461099a82611108565b156109af576006546109ac9082611932565b90505b919050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600d8111156109eb576109eb611709565b60ff1681526020810191909152604001600020546001600160a01b03169050806109af578160405163409140df60e11b81526004016102239190611959565b600081815260096020526040902054610a4282611108565b156109af576004546109ac9082611932565b600154600390600160a81b900460ff16158015610a7f575060015460ff808316600160a01b90920416105b610a9b5760405162461bcd60e51b8152600401610223906116bb565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055610ace600b85610be5565b610ad9600c84610be5565b610ae4600d83610be5565b6001610af060086109b4565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b51919061171f565b610b5b9190611967565b600b556001805460ff60a81b1916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020016102b3565b6060610bdd8484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061131492505050565b949350505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d811115610c1b57610c1b611709565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d811115610c5c57610c5c611709565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610c92816109b4565b6001600160a01b0316336001600160a01b031614610cd5576000356001600160e01b03191681336040516320e0f98d60e21b81526004016102239392919061197a565b50565b600254431015610ce457005b565b6000610cf260086109b4565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa158015610d3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d60919061171f565b905080600360000154101561059c576000826001600160a01b031663468c96ae6003600001546001610d929190611932565b6040518263ffffffff1660e01b8152600401610db091815260200190565b6040805180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df091906119b1565b60038490556000818152600960205260408120600454815493955090935091839190610e1d908490611932565b9091555050600654600182018054600090610e39908490611932565b90915550600090505b600854811015610ec957600880546000919083908110610e6457610e64611738565b60009182526020808320909101546001600160a01b0316808352600782526040808420546002880190935283208054919450919290610ea4908490611932565b90915550506001600160a01b0316600090815260076020526040812055600101610e42565b5060005b600454811015610f5b57600060036001018281548110610eef57610eef611738565b6000918252602082206002918202018054909350600a91839160ff1690811115610f1b57610f1b611709565b6002811115610f2c57610f2c611709565b815260208082019290925260409081016000908120600195860154825290925290206003018590555001610ecd565b50610f68600460006113e6565b60006005818155600682905590610f806008826113c8565b505050505050565b6000600a6000866002811115610fa057610fa0611709565b6002811115610fb157610fb1611709565b81526020808201929092526040908101600090812087825283528181206001600160a01b038716825260028101909352205490915060ff1615610ff457506102bc565b6001600160a01b03831660009081526002820160205260408120805460ff191660011790556003820154908190036110c1576001600160a01b038416600090815260076020526040812054900361109157600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6006805460019081019091556001600160a01b038516600090815260076020526040902080549091019055610f80565b828103610f8057600090815260096020908152604080832060018082018054820190556001600160a01b039790971684526002019091529020805490930190925550505050565b60008061111560086109b4565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611183919061171f565b9050600080836001600160a01b031663468c96ae60036000015460016111a99190611932565b6040518263ffffffff1660e01b81526004016111c791815260200190565b6040805180830381865afa1580156111e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120791906119b1565b9150915081801561121757508086145b8015611224575060035483115b9695505050505050565b60008381526009602090815260408083206001600160a01b0386168452600201909152902054811561127d576001600160a01b038316600090815260076020526040902054610bdd9082611932565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610ce4576000356001600160e01b0319166001604051620f948f60ea1b81526004016102239291906119e4565b806001600160a01b03163b600003610cd557604051630bfc64a360e21b81526001600160a01b0382166004820152602401610223565b80516060908067ffffffffffffffff8111156113325761133261174e565b60405190808252806020026020018201604052801561135b578160200160208202803683370190505b509150600061136985611108565b905060005b828110156113bf5761139a8686838151811061138c5761138c611738565b60200260200101518461122e565b8482815181106113ac576113ac611738565b602090810291909101015260010161136e565b50505092915050565b5080546000825590600052602060002090810190610cd59190611407565b5080546000825560020290600052602060002090810190610cd59190611420565b5b8082111561141c5760008155600101611408565b5090565b5b8082111561141c57805460ff1916815560006001820155600201611421565b6001600160a01b0381168114610cd557600080fd5b60008060006060848603121561146a57600080fd5b833561147581611440565b9250602084013561148581611440565b929592945050506040919091013590565b8035600381106109af57600080fd5b600080604083850312156114b857600080fd5b6114c183611496565b946020939093013593505050565b600080604083850312156114e257600080fd5b8235915060208301356114f481611440565b809150509250929050565b8035600e81106109af57600080fd5b6000806040838503121561152157600080fd5b61152a836114ff565b915060208301356114f481611440565b60008060006060848603121561154f57600080fd5b61155884611496565b925060208401359150604084013561156f81611440565b809150509250925092565b60006020828403121561158c57600080fd5b5035919050565b6000602082840312156115a557600080fd5b61047f826114ff565b6000806000606084860312156115c357600080fd5b83356115ce81611440565b925060208401356115de81611440565b9150604084013561156f81611440565b60008060006040848603121561160357600080fd5b83359250602084013567ffffffffffffffff8082111561162257600080fd5b818601915086601f83011261163657600080fd5b81358181111561164557600080fd5b8760208260051b850101111561165a57600080fd5b6020830194508093505050509250925092565b600081518084526020808501945080840160005b8381101561169d57815187529582019590820190600101611681565b509495945050505050565b60208152600061047f602083018461166d565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561173157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80516109af81611440565b6000602080838503121561178257600080fd5b825167ffffffffffffffff8082111561179a57600080fd5b818501915085601f8301126117ae57600080fd5b8151818111156117c0576117c061174e565b8060051b604051601f19603f830116810181811085821117156117e5576117e561174e565b60405291825284820192508381018501918883111561180357600080fd5b938501935b828510156118285761181985611764565b84529385019392850192611808565b98975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b828110156118765781516001600160a01b031684529284019290840190600101611851565b5050508381038285015261188a818961166d565b6040850197909752505050606081019290925260809091015292915050565b60005b838110156118c45781810151838201526020016118ac565b50506000910152565b600082516118df8184602087016118a9565b9190910192915050565b60208152600082518060208401526119088160408501602087016118a9565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104825761048261191c565b600e811061195557611955611709565b9052565b602081016104828284611945565b818103818111156104825761048261191c565b6001600160e01b031984168152606081016119986020830185611945565b6001600160a01b03929092166040919091015292915050565b600080604083850312156119c457600080fd5b825180151581146119d457600080fd5b6020939093015192949293505050565b6001600160e01b0319831681526040810160098310611a0557611a05611709565b826020830152939250505056fea164736f6c6343000811000a", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063d25ed4c611610071578063d25ed4c614610135578063de981f1b14610148578063e2a75f3614610173578063e7ec7b3914610186578063f67e815214610199578063f84bd121146101b957600080fd5b80631794bb3c146100b9578063229f88ea146100ce5780634ac0bcda146100e15780635cd8a76b14610107578063865e6fd31461010f578063c7c4fea914610122575b600080fd5b6100cc6100c7366004611455565b6101c1565b005b6100cc6100dc3660046114a5565b6102c2565b6100f46100ef3660046114cf565b61046a565b6040519081526020015b60405180910390f35b6100cc610488565b6100cc61011d36600461150e565b610581565b6100cc61013036600461153a565b6105a0565b6100f461014336600461157a565b61097f565b61015b610156366004611593565b6109b4565b6040516001600160a01b0390911681526020016100fe565b6100f461018136600461157a565b610a2a565b6100cc6101943660046115ae565b610a54565b6101ac6101a73660046115ee565b610b9e565b6040516100fe91906116a8565b6002546100f4565b600154600160a81b900460ff16158080156101e7575060018054600160a01b900460ff16105b806102075750303b158015610207575060018054600160a01b900460ff16145b61022c5760405162461bcd60e51b8152600401610223906116bb565b60405180910390fd5b6001805460ff60a01b1916600160a01b1790558015610259576001805460ff60a81b1916600160a81b1790555b610264600285610be5565b61026f600884610be5565b600282905580156102bc576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b50505050565b60026102cd81610c89565b6102d5610cd8565b6000600a60008560028111156102ed576102ed611709565b60028111156102fe576102fe611709565b81526020019081526020016000206000848152602001908152602001600020905080600001546000036102bc57610333610ce6565b600061033f60086109b4565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561037c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a0919061171f565b808355600480546001818101835560009290925260029081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054939450928892849260ff199092169184908111156103fd576103fd611709565b02179055506001808201869055830160005b81548110156104525761044a888884848154811061042f5761042f611738565b6000918252602090912001546001600160a01b031687610f88565b60010161040f565b506104616001850160006113c8565b50505050505050565b600061047f838361047a86611108565b61122e565b90505b92915050565b600154600290600160a81b900460ff161580156104b3575060015460ff808316600160a01b90920416105b6104cf5760405162461bcd60e51b8152600401610223906116bb565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b17905560005461050f906002906001600160a01b0316610be5565b600154610527906008906001600160a01b0316610be5565b600080546001600160a01b031916905560018054600161ff0160a01b031916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b610589611284565b610592816112de565b61059c8282610be5565b5050565b60026105ab81610c89565b6105b3610cd8565b60006105bf60086109b4565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610620919061171f565b905061062a610ce6565b6000600a600087600281111561064257610642611709565b600281111561065357610653611709565b81526020019081526020016000206000868152602001908152602001600020905080600001546000036106b5576001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b038516179055506102bc565b6106c186868685610f88565b600b548281101561046157600b8381556000906106dd906109b4565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561071a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610742919081019061176f565b905060006107508383611314565b9050600061075d84610a2a565b9050600061076a8561097f565b90506000610778600c6109b4565b9050600080826001600160a01b0316878786888c6040516024016107a0959493929190611834565b60408051601f198184030181529181526020820180516001600160e01b0316634dca592560e01b179052516107d591906118cd565b6000604051808303816000865af19150503d8060008114610812576040519150601f19603f3d011682016040523d82523d6000602084013e610817565b606091505b50915091508161086e57604051634dca592560e01b906001600160a01b038516907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f827906108659085906118e9565b60405180910390a35b600061087a600d6109b4565b9050806001600160a01b0316888887898d60405160240161089f959493929190611834565b60408051601f198184030181529181526020820180516001600160e01b03166335e5b7eb60e11b179052516108d491906118cd565b6000604051808303816000865af19150503d8060008114610911576040519150601f19603f3d011682016040523d82523d6000602084013e610916565b606091505b5090935091508261096e576040516335e5b7eb60e11b906001600160a01b038316907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f827906109659086906118e9565b60405180910390a35b505050505050505050505050505050565b60008181526009602052604090206001015461099a82611108565b156109af576006546109ac9082611932565b90505b919050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600d8111156109eb576109eb611709565b60ff1681526020810191909152604001600020546001600160a01b03169050806109af578160405163409140df60e11b81526004016102239190611959565b600081815260096020526040902054610a4282611108565b156109af576004546109ac9082611932565b600154600390600160a81b900460ff16158015610a7f575060015460ff808316600160a01b90920416105b610a9b5760405162461bcd60e51b8152600401610223906116bb565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055610ace600b85610be5565b610ad9600c84610be5565b610ae4600d83610be5565b6001610af060086109b4565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b51919061171f565b610b5b9190611967565b600b556001805460ff60a81b1916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020016102b3565b6060610bdd8484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061131492505050565b949350505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d811115610c1b57610c1b611709565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d811115610c5c57610c5c611709565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610c92816109b4565b6001600160a01b0316336001600160a01b031614610cd5576000356001600160e01b03191681336040516320e0f98d60e21b81526004016102239392919061197a565b50565b600254431015610ce457005b565b6000610cf260086109b4565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa158015610d3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d60919061171f565b905080600360000154101561059c576000826001600160a01b031663468c96ae6003600001546001610d929190611932565b6040518263ffffffff1660e01b8152600401610db091815260200190565b6040805180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df091906119b1565b60038490556000818152600960205260408120600454815493955090935091839190610e1d908490611932565b9091555050600654600182018054600090610e39908490611932565b90915550600090505b600854811015610ec957600880546000919083908110610e6457610e64611738565b60009182526020808320909101546001600160a01b0316808352600782526040808420546002880190935283208054919450919290610ea4908490611932565b90915550506001600160a01b0316600090815260076020526040812055600101610e42565b5060005b600454811015610f5b57600060036001018281548110610eef57610eef611738565b6000918252602082206002918202018054909350600a91839160ff1690811115610f1b57610f1b611709565b6002811115610f2c57610f2c611709565b815260208082019290925260409081016000908120600195860154825290925290206003018590555001610ecd565b50610f68600460006113e6565b60006005818155600682905590610f806008826113c8565b505050505050565b6000600a6000866002811115610fa057610fa0611709565b6002811115610fb157610fb1611709565b81526020808201929092526040908101600090812087825283528181206001600160a01b038716825260028101909352205490915060ff1615610ff457506102bc565b6001600160a01b03831660009081526002820160205260408120805460ff191660011790556003820154908190036110c1576001600160a01b038416600090815260076020526040812054900361109157600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6006805460019081019091556001600160a01b038516600090815260076020526040902080549091019055610f80565b828103610f8057600090815260096020908152604080832060018082018054820190556001600160a01b039790971684526002019091529020805490930190925550505050565b60008061111560086109b4565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611183919061171f565b9050600080836001600160a01b031663468c96ae60036000015460016111a99190611932565b6040518263ffffffff1660e01b81526004016111c791815260200190565b6040805180830381865afa1580156111e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120791906119b1565b9150915081801561121757508086145b8015611224575060035483115b9695505050505050565b60008381526009602090815260408083206001600160a01b0386168452600201909152902054811561127d576001600160a01b038316600090815260076020526040902054610bdd9082611932565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610ce4576000356001600160e01b0319166001604051620f948f60ea1b81526004016102239291906119e4565b806001600160a01b03163b600003610cd557604051630bfc64a360e21b81526001600160a01b0382166004820152602401610223565b80516060908067ffffffffffffffff8111156113325761133261174e565b60405190808252806020026020018201604052801561135b578160200160208202803683370190505b509150600061136985611108565b905060005b828110156113bf5761139a8686838151811061138c5761138c611738565b60200260200101518461122e565b8482815181106113ac576113ac611738565b602090810291909101015260010161136e565b50505092915050565b5080546000825590600052602060002090810190610cd59190611407565b5080546000825560020290600052602060002090810190610cd59190611420565b5b8082111561141c5760008155600101611408565b5090565b5b8082111561141c57805460ff1916815560006001820155600201611421565b6001600160a01b0381168114610cd557600080fd5b60008060006060848603121561146a57600080fd5b833561147581611440565b9250602084013561148581611440565b929592945050506040919091013590565b8035600381106109af57600080fd5b600080604083850312156114b857600080fd5b6114c183611496565b946020939093013593505050565b600080604083850312156114e257600080fd5b8235915060208301356114f481611440565b809150509250929050565b8035600e81106109af57600080fd5b6000806040838503121561152157600080fd5b61152a836114ff565b915060208301356114f481611440565b60008060006060848603121561154f57600080fd5b61155884611496565b925060208401359150604084013561156f81611440565b809150509250925092565b60006020828403121561158c57600080fd5b5035919050565b6000602082840312156115a557600080fd5b61047f826114ff565b6000806000606084860312156115c357600080fd5b83356115ce81611440565b925060208401356115de81611440565b9150604084013561156f81611440565b60008060006040848603121561160357600080fd5b83359250602084013567ffffffffffffffff8082111561162257600080fd5b818601915086601f83011261163657600080fd5b81358181111561164557600080fd5b8760208260051b850101111561165a57600080fd5b6020830194508093505050509250925092565b600081518084526020808501945080840160005b8381101561169d57815187529582019590820190600101611681565b509495945050505050565b60208152600061047f602083018461166d565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561173157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80516109af81611440565b6000602080838503121561178257600080fd5b825167ffffffffffffffff8082111561179a57600080fd5b818501915085601f8301126117ae57600080fd5b8151818111156117c0576117c061174e565b8060051b604051601f19603f830116810181811085821117156117e5576117e561174e565b60405291825284820192508381018501918883111561180357600080fd5b938501935b828510156118285761181985611764565b84529385019392850192611808565b98975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b828110156118765781516001600160a01b031684529284019290840190600101611851565b5050508381038285015261188a818961166d565b6040850197909752505050606081019290925260809091015292915050565b60005b838110156118c45781810151838201526020016118ac565b50506000910152565b600082516118df8184602087016118a9565b9190910192915050565b60208152600082518060208401526119088160408501602087016118a9565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104825761048261191c565b600e811061195557611955611709565b9052565b602081016104828284611945565b818103818111156104825761048261191c565b6001600160e01b031984168152606081016119986020830185611945565b6001600160a01b03929092166040919091015292915050565b600080604083850312156119c457600080fd5b825180151581146119d457600080fd5b6020939093015192949293505050565b6001600160e01b0319831681526040810160098310611a0557611a05611709565b826020830152939250505056fea164736f6c6343000811000a", - "devdoc": { - "errors": { - "ErrContractTypeNotFound(uint8)": [ + "stateMutability": "view" + }, + { + "type": "event", + "name": "ContractUpdated", + "inputs": [ { - "details": "Error of invalid role." + "name": "contractType", + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "ErrUnauthorized(bytes4,uint8)": [ + "anonymous": false + }, + { + "type": "event", + "name": "ExternalCallFailed", + "inputs": [ { - "details": "Error indicating that the caller is unauthorized to perform a specific function.", - "params": { - "expectedRole": "The role required to perform the function.", - "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." - } + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "msgSig", + "type": "bytes4", + "indexed": true, + "internalType": "bytes4" + }, + { + "name": "reason", + "type": "bytes", + "indexed": false, + "internalType": "bytes" } ], - "ErrUnexpectedInternalCall(bytes4,uint8,address)": [ + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ { - "details": "Error indicating that the caller is unauthorized to perform a specific function.", - "params": { - "actual": "The actual address that called to the function.", - "expectedContractType": "The contract type required to perform the function.", - "msgSig": "The function signature (bytes4)." - } + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" } ], - "ErrZeroCodeContract(address)": [ + "anonymous": false + }, + { + "type": "error", + "name": "ErrContractTypeNotFound", + "inputs": [ { - "details": "Error of set to non-contract." + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" } ] }, + { + "type": "error", + "name": "ErrUnauthorized", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" + } + ] + }, + { + "type": "error", + "name": "ErrUnexpectedInternalCall", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedContractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrZeroCodeContract", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "address": "0x3a3A92ba9d4D49aae06861136D547667c742F1aF", + "args": "0x", + "ast": "", + "blockNumber": 26515571, + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100eb565b600154600160a81b900460ff161561008c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60015460ff600160a01b909104811610156100e9576001805460ff60a01b191660ff60a01b17905560405160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611ad5806100fa6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063c7c4fea91161008c578063de981f1b11610066578063de981f1b1461017e578063e2a75f36146101a9578063f67e8152146101bc578063f84bd121146101dc57600080fd5b8063c7c4fea914610145578063ca21287e14610158578063d25ed4c61461016b57600080fd5b80631794bb3c146100d4578063229f88ea146100e95780633b154455146100fc5780634ac0bcda146101045780635cd8a76b1461012a578063865e6fd314610132575b600080fd5b6100e76100e23660046114df565b6101e4565b005b6100e76100f736600461152f565b6102e4565b6100e761048c565b610117610112366004611559565b61055c565b6040519081526020015b60405180910390f35b6100e761057a565b6100e7610140366004611598565b610673565b6100e76101533660046115c4565b610692565b6100e7610166366004611604565b610a6b565b610117610179366004611660565b610b56565b61019161018c366004611679565b610b8b565b6040516001600160a01b039091168152602001610121565b6101176101b7366004611660565b610c01565b6101cf6101ca366004611694565b610c2b565b604051610121919061174f565b600254610117565b600154600160a81b900460ff161580801561020a575060018054600160a01b900460ff16105b8061022a5750303b15801561022a575060018054600160a01b900460ff16145b61024f5760405162461bcd60e51b815260040161024690611762565b60405180910390fd5b6001805460ff60a01b1916600160a01b179055801561027c576001805460ff60a81b1916600160a81b1790555b610287600285610c72565b610292600884610c72565b600282905580156102de576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60026102ef81610d16565b6102f7610d62565b6000600a600085600281111561030f5761030f6117b0565b6002811115610320576103206117b0565b81526020019081526020016000206000848152602001908152602001600020905080600001546000036102de57610355610d70565b60006103616008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c291906117c6565b808355600480546001818101835560009290925260029081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054939450928892849260ff1990921691849081111561041f5761041f6117b0565b02179055506001808201869055830160005b81548110156104745761046c8888848481548110610451576104516117df565b6000918252602090912001546001600160a01b031687611012565b600101610431565b50610483600185016000611452565b50505050505050565b600461049781610d16565b600019600b54146104df5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610246565b6104e96008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906117c6565b600b5561055960046000610c72565b50565b6000610571838361056c86611192565b6112b8565b90505b92915050565b600154600290600160a81b900460ff161580156105a5575060015460ff808316600160a01b90920416105b6105c15760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055600054610601906002906001600160a01b0316610c72565b600154610619906008906001600160a01b0316610c72565b600080546001600160a01b031916905560018054600161ff0160a01b031916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b61067b61130e565b61068481611368565b61068e8282610c72565b5050565b600261069d81610d16565b6106a5610d62565b60006106b16008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071291906117c6565b905061071c610d70565b6000600a6000876002811115610734576107346117b0565b6002811115610745576107456117b0565b81526020019081526020016000206000868152602001908152602001600020905080600001546000036107a7576001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b038516179055506102de565b6107b386868685611012565b600b548281101561048357600b8381556000906107cf90610b8b565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561080c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108349190810190611816565b90506000610842838361139e565b9050600061084f84610c01565b9050600061085c85610b56565b9050600061086a600c610b8b565b9050600080826001600160a01b0316878786888c6040516024016108929594939291906118db565b60408051601f198184030181529181526020820180516001600160e01b0316634dca592560e01b179052516108c79190611975565b6000604051808303816000865af19150503d8060008114610904576040519150601f19603f3d011682016040523d82523d6000602084013e610909565b606091505b50915091508161096057604051634dca592560e01b906001600160a01b038516907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610957908590611991565b60405180910390a35b600061096c600d610b8b565b9050806001600160a01b03168b60405160240161098b91815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166302ddfca960e61b179052516109c09190611975565b6000604051808303816000865af19150503d80600081146109fd576040519150601f19603f3d011682016040523d82523d6000602084013e610a02565b606091505b50909350915082610a5a576040516302ddfca960e61b906001600160a01b038316907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610a51908690611991565b60405180910390a35b505050505050505050505050505050565b600154600390600160a81b900460ff16158015610a96575060015460ff808316600160a01b90920416105b610ab25760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055610ae5600b86610c72565b610af0600c85610c72565b610afb600d84610c72565b610b06600483610c72565b600019600b556001805460ff60a81b1916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b600081815260096020526040902060010154610b7182611192565b15610b8657600654610b8390826119c4565b90505b919050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bc257610bc26117b0565b60ff1681526020810191909152604001600020546001600160a01b0316905080610b86578160405163409140df60e11b815260040161024691906119f9565b600081815260096020526040902054610c1982611192565b15610b8657600454610b8390826119c4565b6060610c6a8484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061139e92505050565b949350505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610ca857610ca86117b0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610ce957610ce96117b0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610d1f81610b8b565b6001600160a01b0316336001600160a01b031614610559576000356001600160e01b03191681336040516320e0f98d60e21b815260040161024693929190611a07565b600254431015610d6e57005b565b6000610d7c6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa158015610dc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dea91906117c6565b905080600360000154101561068e576000826001600160a01b031663468c96ae6003600001546001610e1c91906119c4565b6040518263ffffffff1660e01b8152600401610e3a91815260200190565b6040805180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a9190611a3e565b60038490556000818152600960205260408120600454815493955090935091839190610ea79084906119c4565b9091555050600654600182018054600090610ec39084906119c4565b90915550600090505b600854811015610f5357600880546000919083908110610eee57610eee6117df565b60009182526020808320909101546001600160a01b0316808352600782526040808420546002880190935283208054919450919290610f2e9084906119c4565b90915550506001600160a01b0316600090815260076020526040812055600101610ecc565b5060005b600454811015610fe557600060036001018281548110610f7957610f796117df565b6000918252602082206002918202018054909350600a91839160ff1690811115610fa557610fa56117b0565b6002811115610fb657610fb66117b0565b815260208082019290925260409081016000908120600195860154825290925290206003018590555001610f57565b50610ff260046000611470565b6000600581815560068290559061100a600882611452565b505050505050565b6000600a600086600281111561102a5761102a6117b0565b600281111561103b5761103b6117b0565b81526020808201929092526040908101600090812087825283528181206001600160a01b038716825260028101909352205490915060ff161561107e57506102de565b6001600160a01b03831660009081526002820160205260408120805460ff1916600117905560038201549081900361114b576001600160a01b038416600090815260076020526040812054900361111b57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6006805460019081019091556001600160a01b03851660009081526007602052604090208054909101905561100a565b82810361100a57600090815260096020908152604080832060018082018054820190556001600160a01b039790971684526002019091529020805490930190925550505050565b60008061119f6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa1580156111e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120d91906117c6565b9050600080836001600160a01b031663468c96ae600360000154600161123391906119c4565b6040518263ffffffff1660e01b815260040161125191815260200190565b6040805180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190611a3e565b915091508180156112a157508086145b80156112ae575060035483115b9695505050505050565b60008381526009602090815260408083206001600160a01b03861684526002019091529020548115611307576001600160a01b038316600090815260076020526040902054610c6a90826119c4565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610d6e576000356001600160e01b0319166001604051620f948f60ea1b8152600401610246929190611a71565b806001600160a01b03163b60000361055957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610246565b80516060908067ffffffffffffffff8111156113bc576113bc6117f5565b6040519080825280602002602001820160405280156113e5578160200160208202803683370190505b50915060006113f385611192565b905060005b828110156114495761142486868381518110611416576114166117df565b6020026020010151846112b8565b848281518110611436576114366117df565b60209081029190910101526001016113f8565b50505092915050565b50805460008255906000526020600020908101906105599190611491565b508054600082556002029060005260206000209081019061055991906114aa565b5b808211156114a65760008155600101611492565b5090565b5b808211156114a657805460ff19168155600060018201556002016114ab565b6001600160a01b038116811461055957600080fd5b6000806000606084860312156114f457600080fd5b83356114ff816114ca565b9250602084013561150f816114ca565b929592945050506040919091013590565b803560038110610b8657600080fd5b6000806040838503121561154257600080fd5b61154b83611520565b946020939093013593505050565b6000806040838503121561156c57600080fd5b82359150602083013561157e816114ca565b809150509250929050565b803560108110610b8657600080fd5b600080604083850312156115ab57600080fd5b6115b483611589565b9150602083013561157e816114ca565b6000806000606084860312156115d957600080fd5b6115e284611520565b92506020840135915060408401356115f9816114ca565b809150509250925092565b6000806000806080858703121561161a57600080fd5b8435611625816114ca565b93506020850135611635816114ca565b92506040850135611645816114ca565b91506060850135611655816114ca565b939692955090935050565b60006020828403121561167257600080fd5b5035919050565b60006020828403121561168b57600080fd5b61057182611589565b6000806000604084860312156116a957600080fd5b83359250602084013567ffffffffffffffff808211156116c857600080fd5b818601915086601f8301126116dc57600080fd5b8135818111156116eb57600080fd5b8760208260051b850101111561170057600080fd5b6020830194508093505050509250925092565b60008151808452602080850194506020840160005b8381101561174457815187529582019590820190600101611728565b509495945050505050565b6020815260006105716020830184611713565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156117d857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8051610b86816114ca565b6000602080838503121561182957600080fd5b825167ffffffffffffffff8082111561184157600080fd5b818501915085601f83011261185557600080fd5b815181811115611867576118676117f5565b8060051b604051601f19603f8301168101818110858211171561188c5761188c6117f5565b6040529182528482019250838101850191888311156118aa57600080fd5b938501935b828510156118cf576118c08561180b565b845293850193928501926118af565b98975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b50505083810360208501526119328189611713565b6040850197909752505050606081019290925260809091015292915050565b60005b8381101561196c578181015183820152602001611954565b50506000910152565b60008251611987818460208701611951565b9190910192915050565b60208152600082518060208401526119b0816040850160208701611951565b601f01601f19169190910160400192915050565b8082018082111561057457634e487b7160e01b600052601160045260246000fd5b601081106119f5576119f56117b0565b9052565b6020810161057482846119e5565b6001600160e01b03198416815260608101611a2560208301856119e5565b6001600160a01b03929092166040919091015292915050565b60008060408385031215611a5157600080fd5b82518015158114611a6157600080fd5b6020939093015192949293505050565b6001600160e01b03198316815260408101600b8310611a9257611a926117b0565b826020830152939250505056fea2646970667358221220262d80d2feb74067f3cddee2705a4fff0aac4921a9a54ee2314b0f244bccac3e64736f6c63430008170033", + "chainId": 2021, + "contractAbsolutePath": "BridgeTracking.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063c7c4fea91161008c578063de981f1b11610066578063de981f1b1461017e578063e2a75f36146101a9578063f67e8152146101bc578063f84bd121146101dc57600080fd5b8063c7c4fea914610145578063ca21287e14610158578063d25ed4c61461016b57600080fd5b80631794bb3c146100d4578063229f88ea146100e95780633b154455146100fc5780634ac0bcda146101045780635cd8a76b1461012a578063865e6fd314610132575b600080fd5b6100e76100e23660046114df565b6101e4565b005b6100e76100f736600461152f565b6102e4565b6100e761048c565b610117610112366004611559565b61055c565b6040519081526020015b60405180910390f35b6100e761057a565b6100e7610140366004611598565b610673565b6100e76101533660046115c4565b610692565b6100e7610166366004611604565b610a6b565b610117610179366004611660565b610b56565b61019161018c366004611679565b610b8b565b6040516001600160a01b039091168152602001610121565b6101176101b7366004611660565b610c01565b6101cf6101ca366004611694565b610c2b565b604051610121919061174f565b600254610117565b600154600160a81b900460ff161580801561020a575060018054600160a01b900460ff16105b8061022a5750303b15801561022a575060018054600160a01b900460ff16145b61024f5760405162461bcd60e51b815260040161024690611762565b60405180910390fd5b6001805460ff60a01b1916600160a01b179055801561027c576001805460ff60a81b1916600160a81b1790555b610287600285610c72565b610292600884610c72565b600282905580156102de576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60026102ef81610d16565b6102f7610d62565b6000600a600085600281111561030f5761030f6117b0565b6002811115610320576103206117b0565b81526020019081526020016000206000848152602001908152602001600020905080600001546000036102de57610355610d70565b60006103616008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c291906117c6565b808355600480546001818101835560009290925260029081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054939450928892849260ff1990921691849081111561041f5761041f6117b0565b02179055506001808201869055830160005b81548110156104745761046c8888848481548110610451576104516117df565b6000918252602090912001546001600160a01b031687611012565b600101610431565b50610483600185016000611452565b50505050505050565b600461049781610d16565b600019600b54146104df5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610246565b6104e96008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906117c6565b600b5561055960046000610c72565b50565b6000610571838361056c86611192565b6112b8565b90505b92915050565b600154600290600160a81b900460ff161580156105a5575060015460ff808316600160a01b90920416105b6105c15760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055600054610601906002906001600160a01b0316610c72565b600154610619906008906001600160a01b0316610c72565b600080546001600160a01b031916905560018054600161ff0160a01b031916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b61067b61130e565b61068481611368565b61068e8282610c72565b5050565b600261069d81610d16565b6106a5610d62565b60006106b16008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071291906117c6565b905061071c610d70565b6000600a6000876002811115610734576107346117b0565b6002811115610745576107456117b0565b81526020019081526020016000206000868152602001908152602001600020905080600001546000036107a7576001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b038516179055506102de565b6107b386868685611012565b600b548281101561048357600b8381556000906107cf90610b8b565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561080c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108349190810190611816565b90506000610842838361139e565b9050600061084f84610c01565b9050600061085c85610b56565b9050600061086a600c610b8b565b9050600080826001600160a01b0316878786888c6040516024016108929594939291906118db565b60408051601f198184030181529181526020820180516001600160e01b0316634dca592560e01b179052516108c79190611975565b6000604051808303816000865af19150503d8060008114610904576040519150601f19603f3d011682016040523d82523d6000602084013e610909565b606091505b50915091508161096057604051634dca592560e01b906001600160a01b038516907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610957908590611991565b60405180910390a35b600061096c600d610b8b565b9050806001600160a01b03168b60405160240161098b91815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166302ddfca960e61b179052516109c09190611975565b6000604051808303816000865af19150503d80600081146109fd576040519150601f19603f3d011682016040523d82523d6000602084013e610a02565b606091505b50909350915082610a5a576040516302ddfca960e61b906001600160a01b038316907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610a51908690611991565b60405180910390a35b505050505050505050505050505050565b600154600390600160a81b900460ff16158015610a96575060015460ff808316600160a01b90920416105b610ab25760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055610ae5600b86610c72565b610af0600c85610c72565b610afb600d84610c72565b610b06600483610c72565b600019600b556001805460ff60a81b1916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b600081815260096020526040902060010154610b7182611192565b15610b8657600654610b8390826119c4565b90505b919050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bc257610bc26117b0565b60ff1681526020810191909152604001600020546001600160a01b0316905080610b86578160405163409140df60e11b815260040161024691906119f9565b600081815260096020526040902054610c1982611192565b15610b8657600454610b8390826119c4565b6060610c6a8484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061139e92505050565b949350505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610ca857610ca86117b0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610ce957610ce96117b0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610d1f81610b8b565b6001600160a01b0316336001600160a01b031614610559576000356001600160e01b03191681336040516320e0f98d60e21b815260040161024693929190611a07565b600254431015610d6e57005b565b6000610d7c6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa158015610dc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dea91906117c6565b905080600360000154101561068e576000826001600160a01b031663468c96ae6003600001546001610e1c91906119c4565b6040518263ffffffff1660e01b8152600401610e3a91815260200190565b6040805180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a9190611a3e565b60038490556000818152600960205260408120600454815493955090935091839190610ea79084906119c4565b9091555050600654600182018054600090610ec39084906119c4565b90915550600090505b600854811015610f5357600880546000919083908110610eee57610eee6117df565b60009182526020808320909101546001600160a01b0316808352600782526040808420546002880190935283208054919450919290610f2e9084906119c4565b90915550506001600160a01b0316600090815260076020526040812055600101610ecc565b5060005b600454811015610fe557600060036001018281548110610f7957610f796117df565b6000918252602082206002918202018054909350600a91839160ff1690811115610fa557610fa56117b0565b6002811115610fb657610fb66117b0565b815260208082019290925260409081016000908120600195860154825290925290206003018590555001610f57565b50610ff260046000611470565b6000600581815560068290559061100a600882611452565b505050505050565b6000600a600086600281111561102a5761102a6117b0565b600281111561103b5761103b6117b0565b81526020808201929092526040908101600090812087825283528181206001600160a01b038716825260028101909352205490915060ff161561107e57506102de565b6001600160a01b03831660009081526002820160205260408120805460ff1916600117905560038201549081900361114b576001600160a01b038416600090815260076020526040812054900361111b57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6006805460019081019091556001600160a01b03851660009081526007602052604090208054909101905561100a565b82810361100a57600090815260096020908152604080832060018082018054820190556001600160a01b039790971684526002019091529020805490930190925550505050565b60008061119f6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa1580156111e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120d91906117c6565b9050600080836001600160a01b031663468c96ae600360000154600161123391906119c4565b6040518263ffffffff1660e01b815260040161125191815260200190565b6040805180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190611a3e565b915091508180156112a157508086145b80156112ae575060035483115b9695505050505050565b60008381526009602090815260408083206001600160a01b03861684526002019091529020548115611307576001600160a01b038316600090815260076020526040902054610c6a90826119c4565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610d6e576000356001600160e01b0319166001604051620f948f60ea1b8152600401610246929190611a71565b806001600160a01b03163b60000361055957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610246565b80516060908067ffffffffffffffff8111156113bc576113bc6117f5565b6040519080825280602002602001820160405280156113e5578160200160208202803683370190505b50915060006113f385611192565b905060005b828110156114495761142486868381518110611416576114166117df565b6020026020010151846112b8565b848281518110611436576114366117df565b60209081029190910101526001016113f8565b50505092915050565b50805460008255906000526020600020908101906105599190611491565b508054600082556002029060005260206000209081019061055991906114aa565b5b808211156114a65760008155600101611492565b5090565b5b808211156114a657805460ff19168155600060018201556002016114ab565b6001600160a01b038116811461055957600080fd5b6000806000606084860312156114f457600080fd5b83356114ff816114ca565b9250602084013561150f816114ca565b929592945050506040919091013590565b803560038110610b8657600080fd5b6000806040838503121561154257600080fd5b61154b83611520565b946020939093013593505050565b6000806040838503121561156c57600080fd5b82359150602083013561157e816114ca565b809150509250929050565b803560108110610b8657600080fd5b600080604083850312156115ab57600080fd5b6115b483611589565b9150602083013561157e816114ca565b6000806000606084860312156115d957600080fd5b6115e284611520565b92506020840135915060408401356115f9816114ca565b809150509250925092565b6000806000806080858703121561161a57600080fd5b8435611625816114ca565b93506020850135611635816114ca565b92506040850135611645816114ca565b91506060850135611655816114ca565b939692955090935050565b60006020828403121561167257600080fd5b5035919050565b60006020828403121561168b57600080fd5b61057182611589565b6000806000604084860312156116a957600080fd5b83359250602084013567ffffffffffffffff808211156116c857600080fd5b818601915086601f8301126116dc57600080fd5b8135818111156116eb57600080fd5b8760208260051b850101111561170057600080fd5b6020830194508093505050509250925092565b60008151808452602080850194506020840160005b8381101561174457815187529582019590820190600101611728565b509495945050505050565b6020815260006105716020830184611713565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156117d857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8051610b86816114ca565b6000602080838503121561182957600080fd5b825167ffffffffffffffff8082111561184157600080fd5b818501915085601f83011261185557600080fd5b815181811115611867576118676117f5565b8060051b604051601f19603f8301168101818110858211171561188c5761188c6117f5565b6040529182528482019250838101850191888311156118aa57600080fd5b938501935b828510156118cf576118c08561180b565b845293850193928501926118af565b98975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b50505083810360208501526119328189611713565b6040850197909752505050606081019290925260809091015292915050565b60005b8381101561196c578181015183820152602001611954565b50506000910152565b60008251611987818460208701611951565b9190910192915050565b60208152600082518060208401526119b0816040850160208701611951565b601f01601f19169190910160400192915050565b8082018082111561057457634e487b7160e01b600052601160045260246000fd5b601081106119f5576119f56117b0565b9052565b6020810161057482846119e5565b6001600160e01b03198416815260608101611a2560208301856119e5565b6001600160a01b03929092166040919091015292915050565b60008060408385031215611a5157600080fd5b82518015158114611a6157600080fd5b6020939093015192949293505050565b6001600160e01b03198316815260408101600b8310611a9257611a926117b0565b826020830152939250505056fea2646970667358221220262d80d2feb74067f3cddee2705a4fff0aac4921a9a54ee2314b0f244bccac3e64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, "kind": "dev", "methods": { "getContract(uint8)": { @@ -440,6 +395,9 @@ "initialize(address,address,uint256)": { "details": "Initializes the contract storage." }, + "initializeREP2()": { + "details": "Helper for running upgrade script, required to only revoked once by the DPoS's governance admin. The following must be assured after initializing REP2: `_lastSyncPeriod` == `{BridgeReward}.latestRewardedPeriod + 1` == `{BridgeSlash}._startedAtPeriod - 1` == `currentPeriod()`" + }, "recordVote(uint8,uint256,address)": { "details": "Records vote for a receipt and a operator. Requirements: - The method caller is the bridge contract." }, @@ -463,99 +421,119 @@ "details": "Returns the total number of votes at the specific period `_period`." } }, - "stateVariables": { - "_bufferMetric": { - "details": "The temporary info of votes and ballots" - }, - "_lastSyncPeriod": { - "details": "The latest period that get synced with bridge's slashing and rewarding contract" + "events": { + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." }, - "_periodMetric": { - "details": "Mapping from period number => vote stats based on period" - }, - "_receiptTrackingInfo": { - "details": "Mapping from vote kind => receipt id => receipt stats" - }, - "_startedAtBlock": { - "details": "The block that the contract allows incoming mutable calls." + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." } }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 + "errors": { + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnexpectedInternalCall(bytes4,uint8,address)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "actual": "The actual address that called to the function.", + "expectedContractType": "The contract type required to perform the function.", + "msgSig": "The function signature (bytes4)." + } + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"ExternalCallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"getManyTotalBallots\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_res\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IBridgeTracking.VoteKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"handleVoteApproved\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"validatorContract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startedAtBlock_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeREP2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeSlash\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeReward\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dposGA\",\"type\":\"address\"}],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IBridgeTracking.VoteKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"recordVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startedAtBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"}],\"name\":\"totalBallot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalBallot_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"totalBallotOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"}],\"name\":\"totalVote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalVote_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getManyTotalBallots(uint256,address[])\":{\"details\":\"Returns the total number of ballots of bridge operators at the specific period `_period`.\"},\"handleVoteApproved(uint8,uint256)\":{\"details\":\"Handles the request once it is approved. Requirements: - The method caller is the bridge contract.\"},\"initialize(address,address,uint256)\":{\"details\":\"Initializes the contract storage.\"},\"initializeREP2()\":{\"details\":\"Helper for running upgrade script, required to only revoked once by the DPoS's governance admin. The following must be assured after initializing REP2: `_lastSyncPeriod` == `{BridgeReward}.latestRewardedPeriod + 1` == `{BridgeSlash}._startedAtPeriod - 1` == `currentPeriod()`\"},\"recordVote(uint8,uint256,address)\":{\"details\":\"Records vote for a receipt and a operator. Requirements: - The method caller is the bridge contract.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"startedAtBlock()\":{\"details\":\"Returns the block that allow incomming mutable call.\"},\"totalBallot(uint256)\":{\"details\":\"Returns the total number of ballots at the specific period `_period`.\"},\"totalBallotOf(uint256,address)\":{\"details\":\"Returns the total number of ballots of a bridge operator at the specific period `_period`.\"},\"totalVote(uint256)\":{\"details\":\"Returns the total number of votes at the specific period `_period`.\"}},\"stateVariables\":{\"_bufferMetric\":{\"details\":\"The temporary info of votes and ballots\"},\"_lastSyncPeriod\":{\"details\":\"The latest period that get synced with bridge's slashing and rewarding contract\"},\"_periodMetric\":{\"details\":\"Mapping from period number => vote stats based on period\"},\"_receiptTrackingInfo\":{\"details\":\"Mapping from vote kind => receipt id => receipt stats\"},\"_startedAtBlock\":{\"details\":\"The block that the contract allows incoming mutable calls.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/BridgeTracking.sol\":\"BridgeTracking\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeReward.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { IBridgeRewardEvents } from \\\"./events/IBridgeRewardEvents.sol\\\";\\n\\ninterface IBridgeReward is IBridgeRewardEvents {\\n /**\\n * @dev This function allows bridge operators to manually synchronize the reward for a given period length.\\n * @param periodCount The length of the reward period for which synchronization is requested.\\n */\\n function syncRewardManual(uint256 periodCount) external;\\n\\n /**\\n * @dev Receives RON from any address.\\n */\\n function receiveRON() external payable;\\n\\n /**\\n * @dev Invoke calculate and transfer reward to operators based on their performance.\\n *\\n * Requirements:\\n * - This method is only called once each period.\\n * - The caller must be the bridge tracking contract\\n */\\n function execSyncRewardAuto(uint256 currentPeriod) external;\\n\\n /**\\n * @dev Returns the total amount of rewards that have been topped up in the contract.\\n */\\n function getTotalRewardToppedUp() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total reward amount scattered to the operators, excluding the slashed reward and failed-to-transfer reward.\\n */\\n function getTotalRewardScattered() external view returns (uint256);\\n\\n /**\\n * @dev Getter for all bridge operators per period.\\n */\\n function getRewardPerPeriod() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the latest rewarded period in the contract.\\n */\\n function getLatestRewardedPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the claimed and slashed reward amount of the `operator`.\\n */\\n function getRewardInfo(address operator) external view returns (BridgeRewardInfo memory rewardInfo);\\n\\n /**\\n * @dev Setter for all bridge operators per period.\\n */\\n function setRewardPerPeriod(uint256 rewardPerPeriod) external;\\n}\\n\",\"keccak256\":\"0x5707468c0c1f1f9bb104d8a5b3c2ae2ec8ffe09bb91229463b1f7dade3dcdfe7\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeSlash.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeSlashEvents } from \\\"./events/IBridgeSlashEvents.sol\\\";\\n\\n/**\\n * @title IBridgeSlash\\n * @dev Interface for the BridgeSlash contract to manage slashing functionality for bridge operators.\\n */\\ninterface IBridgeSlash is IBridgeSlashEvents {\\n /**\\n * @dev Slashes the unavailability of bridge operators during a specific period.\\n * @param period The period to slash the bridge operators for.\\n */\\n function execSlashBridgeOperators(address[] calldata operators, uint256[] calldata ballots, uint256 totalBallot, uint256 totalVote, uint256 period) external;\\n\\n /**\\n * @dev Returns the penalize durations for the specified bridge operators.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @return untilPeriods The penalized periods for the bridge operators.\\n */\\n function getSlashUntilPeriodOf(address[] calldata bridgeOperators) external returns (uint256[] memory untilPeriods);\\n\\n /**\\n * @dev Retrieves the added periods of the specified bridge operators.\\n * @param bridgeOperators An array of bridge operator addresses.\\n * @return addedPeriods An array of uint256 values representing the added periods for each bridge operator.\\n */\\n function getAddedPeriodOf(address[] calldata bridgeOperators) external view returns (uint256[] memory addedPeriods);\\n\\n /**\\n * @dev Gets the slash tier based on the given ballot and total ballots.\\n * @param ballot The ballot count for a bridge operator.\\n * @param totalVote The total vote count for the period.\\n * @return tier The slash tier.\\n */\\n function getSlashTier(uint256 ballot, uint256 totalVote) external pure returns (Tier tier);\\n\\n /**\\n * @dev Retrieve the penalty durations for different slash tiers.\\n * @return penaltyDurations The array of penalty durations for each slash tier.\\n */\\n function getPenaltyDurations() external pure returns (uint256[] memory penaltyDurations);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 1 slashing.\\n * @return The duration in period number for Tier 1 slashing.\\n */\\n function TIER_1_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the penalty duration for Tier 2 slashing.\\n * @return The duration in period number for Tier 2 slashing.\\n */\\n function TIER_2_PENALTY_DURATION() external view returns (uint256);\\n\\n /**\\n * @dev Returns the threshold duration for removing bridge operators.\\n * @return The duration in period number that exceeds which a bridge operator will be removed.\\n */\\n function REMOVE_DURATION_THRESHOLD() external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the value of the minimum vote threshold to execute slashing rule.\\n * @return minimumVoteThreshold The minimum vote threshold value.\\n */\\n function MINIMUM_VOTE_THRESHOLD() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb22e3ead9060f2c139d143b8db4dcda7cdf4e4e3960fa98a481ad8b3a2460134\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeTracking {\\n struct Request {\\n VoteKind kind;\\n uint256 id;\\n }\\n\\n enum VoteKind {\\n Deposit,\\n Withdrawal,\\n MainchainWithdrawal\\n }\\n\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\n\\n /**\\n * @dev Returns the block that allow incomming mutable call.\\n */\\n function startedAtBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of votes at the specific period `_period`.\\n */\\n function totalVote(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots at the specific period `_period`.\\n */\\n function totalBallot(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\n */\\n function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\n */\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\n\\n /**\\n * @dev Handles the request once it is approved.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\n\\n /**\\n * @dev Records vote for a receipt and a operator.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\n}\\n\",\"keccak256\":\"0x53ac425ff6efebc200030ceef302c2871a4b2edfcc5e512ce326aa704989ff7a\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeRewardEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeRewardEvents {\\n /**\\n * @dev Reward-related information for a bridge operator.\\n * @param claimed The amount of rewards claimed by the bridge operator.\\n * @param slashed The amount of rewards that have been slashed from the bridge operator.\\n */\\n struct BridgeRewardInfo {\\n uint256 claimed;\\n uint256 slashed;\\n }\\n\\n /**\\n * @dev Emitted when RON are safely received as rewards in the contract.\\n * @param from The address of the sender who transferred RON tokens as rewards.\\n * @param balanceBefore The balance of the contract before receiving the RON tokens.\\n * @param amount The amount of RON received.\\n */\\n event SafeReceived(address indexed from, uint256 balanceBefore, uint256 amount);\\n /// @dev Event emitted when the reward per period config is updated.\\n event UpdatedRewardPerPeriod(uint256 newRewardPerPeriod);\\n /// @dev Event emitted when the reward of the `operator` is scattered with `amount`.\\n event BridgeRewardScattered(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the reward of the `operator` is slashed with `amount`.\\n event BridgeRewardSlashed(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the reward of the `operator` is scattered with `amount` but failed to transfer.\\n event BridgeRewardScatterFailed(uint256 indexed period, address operator, uint256 amount);\\n /// @dev Event emitted when the requesting period to sync is too far.\\n event BridgeRewardSyncTooFarPeriod(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n error ErrPeriodNotHappen(uint256 currentPeriod, uint256 latestRewardedPeriod, uint256 periodCount);\\n error ErrPeriodAlreadyRewarded(uint256 currentPeriod, uint256 latestRewardedPeriod);\\n error ErrPeriodCountIsZero();\\n}\\n\",\"keccak256\":\"0x715180c3b50edfc2e7b8c4dd6cde55cf383c471a48a96ebc4ca33103a3791356\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeSlashEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeSlashEvents {\\n /**\\n * @dev Enumeration representing the slashing tiers for bridge operators.\\n */\\n enum Tier {\\n Tier0,\\n Tier1,\\n Tier2\\n }\\n\\n /**\\n * @dev Struct representing the status of a bridge operator.\\n */\\n struct BridgeSlashInfo {\\n uint128 slashUntilPeriod;\\n uint128 newlyAddedAtPeriod;\\n }\\n\\n /**\\n * @dev Event emitted when a bridge operator is slashed.\\n * @param tier The slash tier of the operator.\\n * @param bridgeOperator The address of the slashed bridge operator.\\n * @param period The period in which the operator is slashed.\\n * @param slashUntilPeriod The period until which the operator is penalized.\\n */\\n event BridgeSlashed(Tier indexed tier, address indexed bridgeOperator, uint256 indexed period, uint256 slashUntilPeriod);\\n\\n /**\\n * @dev Emitted when a removal request is made for a bridge operator.\\n * @param period The period for which the removal request is made.\\n * @param bridgeOperator The address of the bridge operator being requested for removal.\\n */\\n event RemovalRequested(uint256 indexed period, address indexed bridgeOperator);\\n}\\n\",\"keccak256\":\"0x43850ce839ef382c6e6d176e1de4de776fb54b7baa697f52d79858fba13c1b90\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/validator/ICandidateManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ICandidateManager {\\n struct ValidatorCandidate {\\n // Admin of the candidate\\n address admin;\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address that receives mining reward of the validator\\n address payable treasuryAddr;\\n // Address of the bridge operator corresponding to the candidate\\n address ______deprecatedbridgeOperatorAddr;\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\n // Values in range [0; 100_00] stands for 0-100%\\n uint256 commissionRate;\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\n uint256 revokingTimestamp;\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\n uint256 topupDeadline;\\n }\\n\\n struct CommissionSchedule {\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\n uint256 effectiveTimestamp;\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\n uint256 commissionRate;\\n }\\n\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\n /// @dev Emitted when the validator candidate is granted.\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\n /// @dev Emitted when the validator candidate is revoked.\\n event CandidatesRevoked(address[] consensusAddrs);\\n\\n /// @dev Emitted when a schedule for updating commission rate is set.\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\n /// @dev Emitted when the commission rate of a validator is updated.\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\n\\n /// @dev Error of exceeding maximum number of candidates.\\n error ErrExceedsMaxNumberOfCandidate();\\n /// @dev Error of querying for already existent candidate.\\n error ErrExistentCandidate();\\n /// @dev Error of querying for non-existent candidate.\\n error ErrNonExistentCandidate();\\n /// @dev Error of candidate admin already exists.\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\n /// @dev Error of treasury already exists.\\n error ErrExistentTreasury(address _treasuryAddr);\\n /// @dev Error of invalid commission rate.\\n error ErrInvalidCommissionRate();\\n /// @dev Error of invalid effective days onwards.\\n error ErrInvalidEffectiveDaysOnwards();\\n /// @dev Error of invalid min effective days onwards.\\n error ErrInvalidMinEffectiveDaysOnwards();\\n /// @dev Error of already requested revoking candidate before.\\n error ErrAlreadyRequestedRevokingCandidate();\\n /// @dev Error of commission change schedule exists.\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\n /// @dev Error of trusted org cannot renounce.\\n error ErrTrustedOrgCannotRenounce();\\n\\n /**\\n * @dev Returns the maximum number of validator candidate.\\n */\\n function maxValidatorCandidate() external view returns (uint256);\\n\\n /**\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\n */\\n function minEffectiveDaysOnward() external view returns (uint256);\\n\\n /**\\n * @dev Sets the maximum number of validator candidate.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MaxValidatorCandidateUpdated` event.\\n *\\n */\\n function setMaxValidatorCandidate(uint256) external;\\n\\n /**\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\n *\\n */\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\n\\n /**\\n * @dev Grants a validator candidate.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateGranted`.\\n *\\n */\\n function execApplyValidatorCandidate(address _admin, address _consensusAddr, address payable _treasuryAddr, uint256 _commissionRate) external;\\n\\n /**\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\n *\\n */\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\n\\n /**\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\n *\\n * Requirements:\\n * - The method caller is the staking contract.\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\n * - The `_rate` must be in range of [0_00; 100_00].\\n *\\n * Emits the event `CommissionRateUpdateScheduled`.\\n *\\n */\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\n\\n /**\\n * @dev Returns whether the address is a validator (candidate).\\n */\\n function isValidatorCandidate(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns the validator candidate.\\n */\\n function getValidatorCandidates() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns all candidate info.\\n */\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\n\\n /**\\n * @dev Returns the info of a candidate.\\n */\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\n\\n /**\\n * @dev Returns whether the address is the candidate admin.\\n */\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\n\\n /**\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\n */\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\n}\\n\",\"keccak256\":\"0x37b15d36774a3f18291e85efa9df6caaf52b8fa751a8222a3ac8f467656950c1\",\"license\":\"MIT\"},\"src/interfaces/validator/ICoinbaseExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ISlashingExecution.sol\\\";\\n\\ninterface ICoinbaseExecution is ISlashingExecution {\\n enum BlockRewardDeprecatedType {\\n UNKNOWN,\\n UNAVAILABILITY,\\n AFTER_BAILOUT\\n }\\n\\n /// @dev Emitted when the validator set is updated\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated.\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\n\\n /// @dev Emitted when the reward of the block producer is deprecated.\\n event BlockRewardDeprecated(address indexed coinbaseAddr, uint256 rewardAmount, BlockRewardDeprecatedType deprecatedType);\\n /// @dev Emitted when the block reward is submitted.\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\n\\n /// @dev Emitted when the block producer reward is distributed.\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\n event MiningRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\n\\n /// @dev Emitted when the bridge operator reward is distributed.\\n event BridgeOperatorRewardDistributed(address indexed consensusAddr, address indexed bridgeOperator, address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\n event BridgeOperatorRewardDistributionFailed(\\n address indexed consensusAddr, address indexed bridgeOperator, address indexed recipient, uint256 amount, uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the fast finality reward is distributed.\\n event FastFinalityRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the fast finality reward.\\n event FastFinalityRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\n\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\n event StakingRewardDistributionFailed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts, uint256 contractBalance);\\n\\n /// @dev Emitted when the epoch is wrapped up.\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\n\\n /// @dev Error of only allowed at the end of epoch\\n error ErrAtEndOfEpochOnly();\\n /// @dev Error of query for already wrapped up epoch\\n error ErrAlreadyWrappedEpoch();\\n\\n /**\\n * @dev Submits reward of the current block.\\n *\\n * Requirements:\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\n *\\n */\\n function submitBlockReward() external payable;\\n\\n /**\\n * @dev Wraps up the current epoch.\\n *\\n * Requirements:\\n * - The method must be called when the current epoch is ending.\\n * - The epoch is not wrapped yet.\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\n * Emits the event `WrappedUpEpoch`.\\n *\\n */\\n function wrapUpEpoch() external payable;\\n}\\n\",\"keccak256\":\"0x3030ef01bb0277f8607fb3b6358a4cd1d75f6a756e5c884153fbf94f0a16b4d4\",\"license\":\"MIT\"},\"src/interfaces/validator/IEmergencyExit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IEmergencyExit {\\n /// @dev Emitted when the fund is locked from an emergency exit request\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\n event EmergencyExitLockedFundReleased(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\n event EmergencyExitLockedFundReleasingFailed(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount, uint256 contractBalance);\\n\\n /// @dev Emitted when the emergency exit locked amount is updated.\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\n /// @dev Emitted when the emergency expiry duration is updated.\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\n\\n /// @dev Error of already requested emergency exit before.\\n error ErrAlreadyRequestedEmergencyExit();\\n\\n /**\\n * @dev Returns the amount of RON to lock from a consensus address.\\n */\\n function emergencyExitLockedAmount() external returns (uint256);\\n\\n /**\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\n */\\n function emergencyExpiryDuration() external returns (uint256);\\n\\n /**\\n * @dev Sets the amount of RON to lock from a consensus address.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\n *\\n */\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\n\\n /**\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\n *\\n */\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\n\\n /**\\n * @dev Unlocks fund for emergency exit request.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\n *\\n */\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\n\\n /**\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n */\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\n}\\n\",\"keccak256\":\"0x2df640817e7fb957f923dd583e82be9610a8441735b69519db5bd9457683bec2\",\"license\":\"MIT\"},\"src/interfaces/validator/IRoninValidatorSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ICandidateManager.sol\\\";\\nimport \\\"./info-fragments/ICommonInfo.sol\\\";\\nimport \\\"./ICoinbaseExecution.sol\\\";\\nimport \\\"./ISlashingExecution.sol\\\";\\nimport \\\"./IEmergencyExit.sol\\\";\\n\\ninterface IRoninValidatorSet is ICandidateManager, ICommonInfo, ISlashingExecution, ICoinbaseExecution, IEmergencyExit { }\\n\",\"keccak256\":\"0x5ae53ab78a38d9c59d74b4723ead82146bc402874ebbdc90b70ce084516e010f\",\"license\":\"MIT\"},\"src/interfaces/validator/ISlashingExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ISlashingExecution {\\n /// @dev Emitted when the validator is punished.\\n event ValidatorPunished(\\n address indexed consensusAddr,\\n uint256 indexed period,\\n uint256 jailedUntil,\\n uint256 deductedStakingAmount,\\n bool blockProducerRewardDeprecated,\\n bool bridgeOperatorRewardDeprecated\\n );\\n /// @dev Emitted when the validator get out of jail by bailout.\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\n\\n /// @dev Error of cannot bailout due to high tier slash.\\n error ErrCannotBailout(address validator);\\n\\n /**\\n * @dev Finalize the slash request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorPunished`.\\n *\\n */\\n function execSlash(address validatorAddr, uint256 newJailedUntil, uint256 slashAmount, bool cannotBailout) external;\\n\\n /**\\n * @dev Finalize the bailout request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorUnjailed`.\\n *\\n */\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\n}\\n\",\"keccak256\":\"0xac0b772f2fca9dafd7cc6742f91b442f9f545bf9472185b8d817fe045b680193\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/ICommonInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IJailingInfo.sol\\\";\\nimport \\\"./ITimingInfo.sol\\\";\\n\\ninterface ICommonInfo is ITimingInfo, IJailingInfo {\\n struct EmergencyExitInfo {\\n uint256 lockedAmount;\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\n uint256 recyclingAt;\\n }\\n\\n /// @dev Emitted when the deprecated reward is withdrawn.\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\n\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\n error ErrUnauthorizedReceiveRON();\\n /// @dev Error thrown when queries for a non existent info.\\n error NonExistentRecyclingInfo();\\n\\n /**\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\n */\\n function totalDeprecatedReward() external view returns (uint256);\\n\\n /**\\n * @dev Returns the emergency exit request.\\n */\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\n}\\n\",\"keccak256\":\"0x4a215273f535697ecf54a97c8fd9de9c666ca64b88dafe7ab60b2903f71ffb41\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/IJailingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IJailingInfo {\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkJailed(address) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeft(address _addr) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\n */\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\n */\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\n */\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xd83e85bea11509406213b8d06956b33238d27fa1b5e555c1f064bdfd41d6d216\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/ITimingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ITimingInfo {\\n /**\\n * @dev Returns the block that validator set was updated.\\n */\\n function getLastUpdatedBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the number of blocks in a epoch.\\n */\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\n\\n /**\\n * @dev Returns the epoch index from the block number.\\n */\\n function epochOf(uint256 _block) external view returns (uint256);\\n\\n /**\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\n */\\n function epochEndingAt(uint256 _block) external view returns (bool);\\n\\n /**\\n * @dev Tries to get the period index from the epoch number.\\n */\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\n\\n /**\\n * @dev Returns whether the period ending at the current block number.\\n */\\n function isPeriodEnding() external view returns (bool);\\n\\n /**\\n * @dev Returns the period index from the current block.\\n */\\n function currentPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the block number that the current period starts at.\\n */\\n function currentPeriodStartAtBlock() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/ronin/gateway/BridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../interfaces/bridge/IBridgeTracking.sol\\\";\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeSlash } from \\\"../../interfaces/bridge/IBridgeSlash.sol\\\";\\nimport { IBridgeReward } from \\\"../../interfaces/bridge/IBridgeReward.sol\\\";\\nimport { IRoninValidatorSet } from \\\"../../interfaces/validator/IRoninValidatorSet.sol\\\";\\nimport { HasBridgeDeprecated, HasValidatorDeprecated } from \\\"../../utils/DeprecatedSlots.sol\\\";\\n\\ncontract BridgeTracking is HasBridgeDeprecated, HasValidatorDeprecated, HasContracts, Initializable, IBridgeTracking {\\n struct PeriodVotingMetric {\\n /// @dev Total requests that are tracked in the period. This value is 0 until the {_bufferMetric.requests[]} gets added into a period metric.\\n uint256 totalRequest;\\n uint256 totalBallot;\\n mapping(address => uint256) totalBallotOf;\\n address[] voters;\\n }\\n\\n struct PeriodVotingMetricTimeWrapper {\\n uint256 lastEpoch;\\n Request[] requests;\\n PeriodVotingMetric data;\\n }\\n\\n struct ReceiptTrackingInfo {\\n /// @dev The period that the receipt is approved. Value 0 means the receipt is not approved yet.\\n uint256 approvedPeriod;\\n /// @dev The address list of voters\\n address[] voters;\\n /// @dev Mapping from voter => flag indicating the voter casts vote for this receipt\\n mapping(address => bool) voted;\\n /// @dev The period that the receipt is tracked, i.e. the metric is transferred from buffer to the period. Value 0 means the receipt is currently in buffer or not tracked yet.\\n uint256 trackedPeriod;\\n }\\n\\n /// @dev The block that the contract allows incoming mutable calls.\\n uint256 internal _startedAtBlock;\\n\\n /// @dev The temporary info of votes and ballots\\n PeriodVotingMetricTimeWrapper internal _bufferMetric;\\n /// @dev Mapping from period number => vote stats based on period\\n mapping(uint256 => PeriodVotingMetric) internal _periodMetric;\\n /// @dev Mapping from vote kind => receipt id => receipt stats\\n mapping(VoteKind => mapping(uint256 => ReceiptTrackingInfo)) internal _receiptTrackingInfo;\\n /// @dev The latest period that get synced with bridge's slashing and rewarding contract\\n uint256 internal _lastSyncPeriod;\\n\\n modifier skipOnNotStarted() {\\n _skipOnNotStarted();\\n _;\\n }\\n\\n /**\\n * @dev Returns the whole transaction in case the current block is less than start block.\\n */\\n function _skipOnNotStarted() private view {\\n if (block.number < _startedAtBlock) {\\n assembly {\\n return(0, 0)\\n }\\n }\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /**\\n * @dev Initializes the contract storage.\\n */\\n function initialize(address bridgeContract, address validatorContract, uint256 startedAtBlock_) external initializer {\\n _setContract(ContractType.BRIDGE, bridgeContract);\\n _setContract(ContractType.VALIDATOR, validatorContract);\\n _startedAtBlock = startedAtBlock_;\\n }\\n\\n function initializeV2() external reinitializer(2) {\\n _setContract(ContractType.BRIDGE, ______deprecatedBridge);\\n _setContract(ContractType.VALIDATOR, ______deprecatedValidator);\\n\\n delete ______deprecatedBridge;\\n delete ______deprecatedValidator;\\n }\\n\\n function initializeV3(address bridgeManager, address bridgeSlash, address bridgeReward, address dposGA) external reinitializer(3) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManager);\\n _setContract(ContractType.BRIDGE_SLASH, bridgeSlash);\\n _setContract(ContractType.BRIDGE_REWARD, bridgeReward);\\n _setContract(ContractType.GOVERNANCE_ADMIN, dposGA);\\n _lastSyncPeriod = type(uint256).max;\\n }\\n\\n /**\\n * @dev Helper for running upgrade script, required to only revoked once by the DPoS's governance admin.\\n * The following must be assured after initializing REP2:\\n * `_lastSyncPeriod`\\n * == `{BridgeReward}.latestRewardedPeriod + 1`\\n * == `{BridgeSlash}._startedAtPeriod - 1`\\n * == `currentPeriod()`\\n */\\n function initializeREP2() external onlyContract(ContractType.GOVERNANCE_ADMIN) {\\n require(_lastSyncPeriod == type(uint256).max, \\\"already init rep 2\\\");\\n _lastSyncPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n _setContract(ContractType.GOVERNANCE_ADMIN, address(0));\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function startedAtBlock() external view override returns (uint256) {\\n return _startedAtBlock;\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function totalVote(uint256 period) public view override returns (uint256 totalVote_) {\\n totalVote_ = _periodMetric[period].totalRequest;\\n if (_isBufferCountedForPeriod(period)) {\\n totalVote_ += _bufferMetric.requests.length;\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function totalBallot(uint256 period) public view override returns (uint256 totalBallot_) {\\n totalBallot_ = _periodMetric[period].totalBallot;\\n if (_isBufferCountedForPeriod(period)) {\\n totalBallot_ += _bufferMetric.data.totalBallot;\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function getManyTotalBallots(uint256 period, address[] calldata operators) external view override returns (uint256[] memory _res) {\\n _res = _getManyTotalBallots(period, operators);\\n }\\n\\n function _getManyTotalBallots(uint256 period, address[] memory operators) internal view returns (uint256[] memory res) {\\n uint256 length = operators.length;\\n res = new uint256[](length);\\n bool isBufferCounted = _isBufferCountedForPeriod(period);\\n for (uint i = 0; i < length;) {\\n res[i] = _totalBallotOf(period, operators[i], isBufferCounted);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function totalBallotOf(uint256 period, address bridgeOperator) public view override returns (uint256) {\\n return _totalBallotOf(period, bridgeOperator, _isBufferCountedForPeriod(period));\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function handleVoteApproved(VoteKind kind, uint256 requestId) external override onlyContract(ContractType.BRIDGE) skipOnNotStarted {\\n ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId];\\n\\n // Only records for the receipt which not approved\\n if (_receiptInfo.approvedPeriod == 0) {\\n _trySyncBuffer();\\n uint256 currentPeriod = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n _receiptInfo.approvedPeriod = currentPeriod;\\n\\n Request storage _bufferRequest = _bufferMetric.requests.push();\\n _bufferRequest.kind = kind;\\n _bufferRequest.id = requestId;\\n\\n address[] storage _voters = _receiptInfo.voters;\\n for (uint i = 0; i < _voters.length;) {\\n _increaseBallot(kind, requestId, _voters[i], currentPeriod);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n delete _receiptInfo.voters;\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeTracking\\n */\\n function recordVote(VoteKind kind, uint256 requestId, address operator) external override onlyContract(ContractType.BRIDGE) skipOnNotStarted {\\n uint256 currPd = IRoninValidatorSet(getContract(ContractType.VALIDATOR)).currentPeriod();\\n _trySyncBuffer();\\n ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId];\\n\\n // When the vote is not approved yet, the voters are saved in the receipt info, and not increase ballot metric.\\n // The ballot metric will be increased later in the {handleVoteApproved} method.\\n if (_receiptInfo.approvedPeriod == 0) {\\n _receiptInfo.voters.push(operator);\\n return;\\n }\\n\\n _increaseBallot(kind, requestId, operator, currPd);\\n\\n uint256 lastSyncPeriod = _lastSyncPeriod;\\n // When switching to new period, wrap up vote info, then slash and distribute reward accordingly.\\n if (lastSyncPeriod < currPd) {\\n _lastSyncPeriod = currPd;\\n\\n address[] memory allOperators = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperators();\\n uint256[] memory ballots = _getManyTotalBallots(lastSyncPeriod, allOperators);\\n\\n uint256 totalVote_ = totalVote(lastSyncPeriod);\\n uint256 totalBallot_ = totalBallot(lastSyncPeriod);\\n\\n address bridgeSlashContract = getContract(ContractType.BRIDGE_SLASH);\\n (bool success, bytes memory returnOrRevertData) =\\n bridgeSlashContract.call(abi.encodeCall(IBridgeSlash.execSlashBridgeOperators, (allOperators, ballots, totalBallot_, totalVote_, lastSyncPeriod)));\\n if (!success) {\\n emit ExternalCallFailed(bridgeSlashContract, IBridgeSlash.execSlashBridgeOperators.selector, returnOrRevertData);\\n }\\n\\n address bridgeRewardContract = getContract(ContractType.BRIDGE_REWARD);\\n (success, returnOrRevertData) = bridgeRewardContract.call(abi.encodeCall(IBridgeReward.execSyncRewardAuto, (currPd)));\\n if (!success) {\\n emit ExternalCallFailed(bridgeRewardContract, IBridgeReward.execSyncRewardAuto.selector, returnOrRevertData);\\n }\\n }\\n }\\n\\n /**\\n * @dev Increases the ballot for the operator at a period.\\n */\\n function _increaseBallot(VoteKind kind, uint256 requestId, address operator, uint256 currentPeriod) internal {\\n ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[kind][requestId];\\n if (_receiptInfo.voted[operator]) {\\n return;\\n }\\n\\n _receiptInfo.voted[operator] = true;\\n\\n uint256 trackedPeriod = _receiptInfo.trackedPeriod;\\n\\n // Do not increase ballot for receipt that is neither in the buffer, nor in the most current tracked period.\\n // If the receipt is not tracked in a period, increase metric in buffer.\\n unchecked {\\n if (trackedPeriod == 0) {\\n if (_bufferMetric.data.totalBallotOf[operator] == 0) {\\n _bufferMetric.data.voters.push(operator);\\n }\\n _bufferMetric.data.totalBallot++;\\n _bufferMetric.data.totalBallotOf[operator]++;\\n }\\n // If the receipt is tracked in the most current tracked period, increase metric in the period.\\n else if (trackedPeriod == currentPeriod) {\\n PeriodVotingMetric storage _metric = _periodMetric[trackedPeriod];\\n _metric.totalBallot++;\\n _metric.totalBallotOf[operator]++;\\n }\\n }\\n }\\n\\n /**\\n * @dev See `totalBallotOf`.\\n */\\n function _totalBallotOf(uint256 period, address operator, bool mustCountLastStats) internal view returns (uint256 _totalBallot) {\\n _totalBallot = _periodMetric[period].totalBallotOf[operator];\\n if (mustCountLastStats) {\\n _totalBallot += _bufferMetric.data.totalBallotOf[operator];\\n }\\n }\\n\\n /**\\n * @dev Syncs period stats. Move all data from the buffer metric to the period metric.\\n *\\n * Requirements:\\n * - The epoch after the buffer epoch is wrapped up.\\n */\\n function _trySyncBuffer() internal {\\n IRoninValidatorSet validatorContract = IRoninValidatorSet(getContract(ContractType.VALIDATOR));\\n uint256 currentEpoch = validatorContract.epochOf(block.number);\\n if (_bufferMetric.lastEpoch < currentEpoch) {\\n (, uint256 trackedPeriod) = validatorContract.tryGetPeriodOfEpoch(_bufferMetric.lastEpoch + 1);\\n _bufferMetric.lastEpoch = currentEpoch;\\n\\n // Copy numbers of totals\\n PeriodVotingMetric storage _metric = _periodMetric[trackedPeriod];\\n _metric.totalRequest += _bufferMetric.requests.length;\\n _metric.totalBallot += _bufferMetric.data.totalBallot;\\n\\n // Copy voters info and voters' ballot\\n for (uint i = 0; i < _bufferMetric.data.voters.length;) {\\n address voter = _bufferMetric.data.voters[i];\\n _metric.totalBallotOf[voter] += _bufferMetric.data.totalBallotOf[voter];\\n delete _bufferMetric.data.totalBallotOf[voter]; // need to manually delete each element, due to mapping\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Mark all receipts in the buffer as tracked. Keep total number of receipts and delete receipt details.\\n for (uint i = 0; i < _bufferMetric.requests.length;) {\\n Request storage _bufferRequest = _bufferMetric.requests[i];\\n ReceiptTrackingInfo storage _receiptInfo = _receiptTrackingInfo[_bufferRequest.kind][_bufferRequest.id];\\n _receiptInfo.trackedPeriod = trackedPeriod;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n delete _bufferMetric.requests;\\n delete _bufferMetric.data;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the buffer stats must be counted or not.\\n */\\n function _isBufferCountedForPeriod(uint256 queriedPeriod) internal view returns (bool) {\\n IRoninValidatorSet validatorContract = IRoninValidatorSet(getContract(ContractType.VALIDATOR));\\n uint256 currentEpoch = validatorContract.epochOf(block.number);\\n (bool filled, uint256 periodOfNextTemporaryEpoch) = validatorContract.tryGetPeriodOfEpoch(_bufferMetric.lastEpoch + 1);\\n return filled && queriedPeriod == periodOfNextTemporaryEpoch && _bufferMetric.lastEpoch < currentEpoch;\\n }\\n}\\n\",\"keccak256\":\"0x61371c8207bb80356d02d912376a61bdc60d76eff1d0e508b17c1428bcddee27\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/DeprecatedSlots.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Deprecated Contracts\\n * @dev These abstract contracts are deprecated and should not be used in new implementations.\\n * They provide functionality related to various aspects of a smart contract but have been marked\\n * as deprecated to indicate that they are no longer actively maintained or recommended for use.\\n * The purpose of these contracts is to preserve the slots for already deployed contracts.\\n */\\ncontract HasBridgeDeprecated {\\n /// @custom:deprecated Previously `_bridgeContract` (non-zero value)\\n address internal ______deprecatedBridge;\\n}\\n\\ncontract HasValidatorDeprecated {\\n /// @custom:deprecated Previously `_validatorContract` (non-zero value)\\n address internal ______deprecatedValidator;\\n}\\n\",\"keccak256\":\"0xd468881c7548ff0e125752a85ece9f3046932fdba24a16ac3208dc1b7d3eee0b\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192810, + "numDeployments": 9, "storageLayout": { "storage": [ { - "astId": 39592, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 123451, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "______deprecatedBridge", "offset": 0, "slot": "0", "type": "t_address" }, { - "astId": 39596, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 123455, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "______deprecatedValidator", "offset": 0, "slot": "1", "type": "t_address" }, { - "astId": 1373, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 58190, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "_initialized", "offset": 20, "slot": "1", "type": "t_uint8" }, { - "astId": 1376, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 58193, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "_initializing", "offset": 21, "slot": "1", "type": "t_bool" }, { - "astId": 26922, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119558, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "_startedAtBlock", "offset": 0, "slot": "2", "type": "t_uint256" }, { - "astId": 26926, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119562, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "_bufferMetric", "offset": 0, "slot": "3", - "type": "t_struct(PeriodVotingMetricTimeWrapper)26903_storage" + "type": "t_struct(PeriodVotingMetricTimeWrapper)119539_storage" }, { - "astId": 26932, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119568, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "_periodMetric", "offset": 0, "slot": "9", - "type": "t_mapping(t_uint256,t_struct(PeriodVotingMetric)26893_storage)" + "type": "t_mapping(t_uint256,t_struct(PeriodVotingMetric)119529_storage)" }, { - "astId": 26941, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119577, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "_receiptTrackingInfo", "offset": 0, "slot": "10", - "type": "t_mapping(t_enum(VoteKind)12343,t_mapping(t_uint256,t_struct(ReceiptTrackingInfo)26919_storage))" + "type": "t_mapping(t_enum(VoteKind)110385,t_mapping(t_uint256,t_struct(ReceiptTrackingInfo)119555_storage))" }, { - "astId": 26944, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119580, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "_lastSyncPeriod", "offset": 0, "slot": "11", @@ -569,23 +547,23 @@ "numberOfBytes": "20" }, "t_array(t_address)dyn_storage": { - "base": "t_address", "encoding": "dynamic_array", "label": "address[]", - "numberOfBytes": "32" + "numberOfBytes": "32", + "base": "t_address" }, - "t_array(t_struct(Request)12339_storage)dyn_storage": { - "base": "t_struct(Request)12339_storage", + "t_array(t_struct(Request)110381_storage)dyn_storage": { "encoding": "dynamic_array", "label": "struct IBridgeTracking.Request[]", - "numberOfBytes": "32" + "numberOfBytes": "32", + "base": "t_struct(Request)110381_storage" }, "t_bool": { "encoding": "inplace", "label": "bool", "numberOfBytes": "1" }, - "t_enum(VoteKind)12343": { + "t_enum(VoteKind)110385": { "encoding": "inplace", "label": "enum IBridgeTracking.VoteKind", "numberOfBytes": "1" @@ -604,158 +582,158 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_enum(VoteKind)12343,t_mapping(t_uint256,t_struct(ReceiptTrackingInfo)26919_storage))": { + "t_mapping(t_enum(VoteKind)110385,t_mapping(t_uint256,t_struct(ReceiptTrackingInfo)119555_storage))": { "encoding": "mapping", - "key": "t_enum(VoteKind)12343", + "key": "t_enum(VoteKind)110385", "label": "mapping(enum IBridgeTracking.VoteKind => mapping(uint256 => struct BridgeTracking.ReceiptTrackingInfo))", "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(ReceiptTrackingInfo)26919_storage)" + "value": "t_mapping(t_uint256,t_struct(ReceiptTrackingInfo)119555_storage)" }, - "t_mapping(t_uint256,t_struct(PeriodVotingMetric)26893_storage)": { + "t_mapping(t_uint256,t_struct(PeriodVotingMetric)119529_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct BridgeTracking.PeriodVotingMetric)", "numberOfBytes": "32", - "value": "t_struct(PeriodVotingMetric)26893_storage" + "value": "t_struct(PeriodVotingMetric)119529_storage" }, - "t_mapping(t_uint256,t_struct(ReceiptTrackingInfo)26919_storage)": { + "t_mapping(t_uint256,t_struct(ReceiptTrackingInfo)119555_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct BridgeTracking.ReceiptTrackingInfo)", "numberOfBytes": "32", - "value": "t_struct(ReceiptTrackingInfo)26919_storage" + "value": "t_struct(ReceiptTrackingInfo)119555_storage" }, - "t_struct(PeriodVotingMetric)26893_storage": { + "t_struct(PeriodVotingMetric)119529_storage": { "encoding": "inplace", "label": "struct BridgeTracking.PeriodVotingMetric", + "numberOfBytes": "128", "members": [ { - "astId": 26883, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119519, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "totalRequest", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 26885, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119521, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "totalBallot", "offset": 0, "slot": "1", "type": "t_uint256" }, { - "astId": 26889, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119525, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "totalBallotOf", "offset": 0, "slot": "2", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 26892, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119528, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "voters", "offset": 0, "slot": "3", "type": "t_array(t_address)dyn_storage" } - ], - "numberOfBytes": "128" + ] }, - "t_struct(PeriodVotingMetricTimeWrapper)26903_storage": { + "t_struct(PeriodVotingMetricTimeWrapper)119539_storage": { "encoding": "inplace", "label": "struct BridgeTracking.PeriodVotingMetricTimeWrapper", + "numberOfBytes": "192", "members": [ { - "astId": 26895, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119531, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "lastEpoch", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 26899, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119535, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "requests", "offset": 0, "slot": "1", - "type": "t_array(t_struct(Request)12339_storage)dyn_storage" + "type": "t_array(t_struct(Request)110381_storage)dyn_storage" }, { - "astId": 26902, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119538, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "data", "offset": 0, "slot": "2", - "type": "t_struct(PeriodVotingMetric)26893_storage" + "type": "t_struct(PeriodVotingMetric)119529_storage" } - ], - "numberOfBytes": "192" + ] }, - "t_struct(ReceiptTrackingInfo)26919_storage": { + "t_struct(ReceiptTrackingInfo)119555_storage": { "encoding": "inplace", "label": "struct BridgeTracking.ReceiptTrackingInfo", + "numberOfBytes": "128", "members": [ { - "astId": 26906, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119542, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "approvedPeriod", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 26910, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119546, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "voters", "offset": 0, "slot": "1", "type": "t_array(t_address)dyn_storage" }, { - "astId": 26915, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119551, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "voted", "offset": 0, "slot": "2", "type": "t_mapping(t_address,t_bool)" }, { - "astId": 26918, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 119554, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "trackedPeriod", "offset": 0, "slot": "3", "type": "t_uint256" } - ], - "numberOfBytes": "128" + ] }, - "t_struct(Request)12339_storage": { + "t_struct(Request)110381_storage": { "encoding": "inplace", "label": "struct IBridgeTracking.Request", + "numberOfBytes": "64", "members": [ { - "astId": 12336, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 110378, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "kind", "offset": 0, "slot": "0", - "type": "t_enum(VoteKind)12343" + "type": "t_enum(VoteKind)110385" }, { - "astId": 12338, - "contract": "contracts/ronin/gateway/BridgeTracking.sol:BridgeTracking", + "astId": 110380, + "contract": "src/ronin/gateway/BridgeTracking.sol:BridgeTracking", "label": "id", "offset": 0, "slot": "1", "type": "t_uint256" } - ], - "numberOfBytes": "64" + ] }, "t_uint256": { "encoding": "inplace", @@ -768,5 +746,10 @@ "numberOfBytes": "1" } } + }, + "timestamp": 1713251844, + "userdoc": { + "version": 1, + "kind": "user" } } \ No newline at end of file diff --git a/deployments/ronin-testnet/RoninGatewayPauseEnforcerLogic.json b/deployments/ronin-testnet/RoninGatewayPauseEnforcerLogic.json index 7807ec57..289aef4c 100644 --- a/deployments/ronin-testnet/RoninGatewayPauseEnforcerLogic.json +++ b/deployments/ronin-testnet/RoninGatewayPauseEnforcerLogic.json @@ -1,505 +1,451 @@ { - "address": "0x39394AbCfBeA3D5829eB8b0995073BC48bBFF2cF", "abi": [ { + "type": "constructor", "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "ErrNotOnEmergencyPause", - "type": "error" - }, - { - "inputs": [], - "name": "ErrTargetIsNotOnPaused", - "type": "error" - }, - { - "inputs": [], - "name": "ErrTargetIsOnPaused", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "EmergencyPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "EmergencyUnpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "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": false, - "internalType": "contract IPauseTarget", - "name": "target", - "type": "address" - } - ], - "name": "TargetChanged", - "type": "event" - }, - { - "inputs": [], + "type": "function", "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], "outputs": [ { - "internalType": "bytes32", "name": "", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "SENTRY_ROLE", + "inputs": [], "outputs": [ { - "internalType": "bytes32", "name": "", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "changeTarget", "inputs": [ { - "internalType": "contract IPauseTarget", "name": "_target", - "type": "address" + "type": "address", + "internalType": "contract IPauseTarget" } ], - "name": "changeTarget", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { - "inputs": [], + "type": "function", "name": "emergency", + "inputs": [], "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getRoleAdmin", "inputs": [ { - "internalType": "bytes32", "name": "role", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" } ], - "name": "getRoleAdmin", "outputs": [ { - "internalType": "bytes32", "name": "", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getRoleMember", "inputs": [ { - "internalType": "bytes32", "name": "role", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" }, { - "internalType": "uint256", "name": "index", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "getRoleMember", "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getRoleMemberCount", "inputs": [ { - "internalType": "bytes32", "name": "role", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" } ], - "name": "getRoleMemberCount", "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "grantRole", "inputs": [ { - "internalType": "bytes32", "name": "role", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" }, { - "internalType": "address", "name": "account", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "grantRole", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "grantSentry", "inputs": [ { - "internalType": "address", "name": "_sentry", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "grantSentry", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "hasRole", "inputs": [ { - "internalType": "bytes32", "name": "role", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" }, { - "internalType": "address", "name": "account", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "hasRole", "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "initialize", "inputs": [ { - "internalType": "contract IPauseTarget", "name": "_target", - "type": "address" + "type": "address", + "internalType": "contract IPauseTarget" }, { - "internalType": "address", "name": "_admin", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address[]", "name": "_sentries", - "type": "address[]" + "type": "address[]", + "internalType": "address[]" } ], - "name": "initialize", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "renounceRole", "inputs": [ { - "internalType": "bytes32", "name": "role", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" }, { - "internalType": "address", "name": "account", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "renounceRole", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "revokeRole", "inputs": [ { - "internalType": "bytes32", "name": "role", - "type": "bytes32" + "type": "bytes32", + "internalType": "bytes32" }, { - "internalType": "address", "name": "account", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "revokeRole", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "revokeSentry", "inputs": [ { - "internalType": "address", "name": "_sentry", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "revokeSentry", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "supportsInterface", "inputs": [ { - "internalType": "bytes4", "name": "interfaceId", - "type": "bytes4" + "type": "bytes4", + "internalType": "bytes4" } ], - "name": "supportsInterface", "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "target", + "inputs": [], "outputs": [ { - "internalType": "contract IPauseTarget", "name": "", - "type": "address" + "type": "address", + "internalType": "contract IPauseTarget" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "triggerPause", + "inputs": [], "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { - "inputs": [], + "type": "function", "name": "triggerUnpause", + "inputs": [], "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x71a23d976aeef588c14e34581ac5449358a01a15862420ea979fad26d8f9934a", - "receipt": { - "to": null, - "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "contractAddress": "0x39394AbCfBeA3D5829eB8b0995073BC48bBFF2cF", - "transactionIndex": 0, - "gasUsed": "1052959", - "logsBloom": "0x00000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000010000000000000000000000000000000000000000000000000000000000010000000000000000", - "blockHash": "0xb251a956ac535611fe52c94f508b118f61603bcf7e23aaaf9308e26e64d65cac", - "transactionHash": "0x71a23d976aeef588c14e34581ac5449358a01a15862420ea979fad26d8f9934a", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 18056476, - "transactionHash": "0x71a23d976aeef588c14e34581ac5449358a01a15862420ea979fad26d8f9934a", - "address": "0x39394AbCfBeA3D5829eB8b0995073BC48bBFF2cF", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 0, - "blockHash": "0xb251a956ac535611fe52c94f508b118f61603bcf7e23aaaf9308e26e64d65cac" - } - ], - "blockNumber": 18056476, - "cumulativeGasUsed": "1052959", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "1abe3fccfa260ef2553161b857d04cdf", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrNotOnEmergencyPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsNotOnPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsOnPaused\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"contract IPauseTarget\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SENTRY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"changeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergency\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"grantSentry\",\"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\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_sentries\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"revokeSentry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerUnpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrNotOnEmergencyPause()\":[{\"details\":\"Error thrown when the contract is not on emergency pause.\"}],\"ErrTargetIsNotOnPaused()\":[{\"details\":\"Error thrown when the target is not on paused state.\"}],\"ErrTargetIsOnPaused()\":[{\"details\":\"Error thrown when the target is already on paused state.\"}]},\"events\":{\"EmergencyPaused(address)\":{\"details\":\"Emitted when the emergency ppause is triggered by `account`.\"},\"EmergencyUnpaused(address)\":{\"details\":\"Emitted when the emergency unpause is triggered by `account`.\"},\"TargetChanged(address)\":{\"details\":\"Emitted when the target is changed.\"}},\"kind\":\"dev\",\"methods\":{\"changeTarget(address)\":{\"details\":\"Setter for `target`. Requirements: - Only admin can call this method.\"},\"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. May emit a {RoleGranted} event.\"},\"grantSentry(address)\":{\"details\":\"Grants the SENTRY_ROLE to the specified address.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address[])\":{\"details\":\"Initializes the contract storage.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"revokeSentry(address)\":{\"details\":\"Revokes the SENTRY_ROLE from the specified address.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"triggerPause()\":{\"details\":\"Triggers a pause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is not already paused.\"},\"triggerUnpause()\":{\"details\":\"Triggers an unpause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is already paused. - The target contract is paused in emergency mode.\"}},\"stateVariables\":{\"emergency\":{\"details\":\"Indicating whether or not the target contract is paused in emergency mode.\"},\"target\":{\"details\":\"The contract that can be paused or unpaused by the SENTRY_ROLE.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ronin/gateway/PauseEnforcer.sol\":\"PauseEnforcer\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ronin/contracts/=./contracts/\",\":bridge-operator-governance/=contracts/extensions/bridge-operator-governance/\",\":collections/=contracts/extensions/collections/\",\":consumers/=contracts/extensions/consumers/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":forwarder/=contracts/extensions/forwarder/\",\":sequential-governance/=contracts/extensions/sequential-governance/\",\":slash-indicator/=contracts/interfaces/slash-indicator/\",\":staking/=contracts/interfaces/staking/\",\":validator/=contracts/interfaces/validator/\",\":version-control/=contracts/extensions/version-control/\"]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"contracts/interfaces/IPauseTarget.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IPauseTarget {\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external returns (bool);\\n}\\n\",\"keccak256\":\"0xc91073e61da572de0087b41018fd30b03661d58e0c5061e7b9d1c9235cd7c1c3\",\"license\":\"MIT\"},\"contracts/ronin/gateway/PauseEnforcer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../interfaces/IPauseTarget.sol\\\";\\n\\ncontract PauseEnforcer is AccessControlEnumerable, Initializable {\\n /**\\n * @dev Error thrown when the target is already on paused state.\\n */\\n error ErrTargetIsOnPaused();\\n\\n /**\\n * @dev Error thrown when the target is not on paused state.\\n */\\n error ErrTargetIsNotOnPaused();\\n\\n /**\\n * @dev Error thrown when the contract is not on emergency pause.\\n */\\n error ErrNotOnEmergencyPause();\\n\\n bytes32 public constant SENTRY_ROLE = keccak256(\\\"SENTRY_ROLE\\\");\\n\\n /// @dev The contract that can be paused or unpaused by the SENTRY_ROLE.\\n IPauseTarget public target;\\n /// @dev Indicating whether or not the target contract is paused in emergency mode.\\n bool public emergency;\\n\\n /// @dev Emitted when the emergency ppause is triggered by `account`.\\n event EmergencyPaused(address account);\\n /// @dev Emitted when the emergency unpause is triggered by `account`.\\n event EmergencyUnpaused(address account);\\n /// @dev Emitted when the target is changed.\\n event TargetChanged(IPauseTarget target);\\n\\n modifier onEmergency() {\\n if (!emergency) revert ErrNotOnEmergencyPause();\\n\\n _;\\n }\\n\\n modifier targetPaused() {\\n if (!target.paused()) revert ErrTargetIsOnPaused();\\n\\n _;\\n }\\n\\n modifier targetNotPaused() {\\n if (target.paused()) revert ErrTargetIsNotOnPaused();\\n\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /**\\n * @dev Initializes the contract storage.\\n */\\n function initialize(IPauseTarget _target, address _admin, address[] memory _sentries) external initializer {\\n _changeTarget(_target);\\n _setupRole(DEFAULT_ADMIN_ROLE, _admin);\\n for (uint _i; _i < _sentries.length; ) {\\n _grantRole(SENTRY_ROLE, _sentries[_i]);\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Grants the SENTRY_ROLE to the specified address.\\n */\\n function grantSentry(address _sentry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _grantRole(SENTRY_ROLE, _sentry);\\n }\\n\\n /**\\n * @dev Revokes the SENTRY_ROLE from the specified address.\\n */\\n function revokeSentry(address _sentry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _revokeRole(SENTRY_ROLE, _sentry);\\n }\\n\\n /**\\n * @dev Triggers a pause on the target contract.\\n *\\n * Requirements:\\n * - Only be called by accounts with the SENTRY_ROLE,\\n * - The target contract is not already paused.\\n */\\n function triggerPause() external onlyRole(SENTRY_ROLE) targetNotPaused {\\n emergency = true;\\n target.pause();\\n emit EmergencyPaused(msg.sender);\\n }\\n\\n /**\\n * @dev Triggers an unpause on the target contract.\\n *\\n * Requirements:\\n * - Only be called by accounts with the SENTRY_ROLE,\\n * - The target contract is already paused.\\n * - The target contract is paused in emergency mode.\\n */\\n function triggerUnpause() external onlyRole(SENTRY_ROLE) onEmergency targetPaused {\\n emergency = false;\\n target.unpause();\\n emit EmergencyUnpaused(msg.sender);\\n }\\n\\n /**\\n * @dev Setter for `target`.\\n *\\n * Requirements:\\n * - Only admin can call this method.\\n */\\n function changeTarget(IPauseTarget _target) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _changeTarget(_target);\\n }\\n\\n /**\\n * @dev Internal helper for setting value to `target`.\\n */\\n function _changeTarget(IPauseTarget _target) internal {\\n target = _target;\\n emit TargetChanged(_target);\\n }\\n}\\n\",\"keccak256\":\"0x22412c51c9877e24696d4bf2e0ce86c2cd2a27c6dbd2633e6e9843f720d960e1\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61119b806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca164736f6c6343000811000a", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca164736f6c6343000811000a", - "devdoc": { - "errors": { - "ErrNotOnEmergencyPause()": [ + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "EmergencyPaused", + "inputs": [ { - "details": "Error thrown when the contract is not on emergency pause." + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "ErrTargetIsNotOnPaused()": [ + "anonymous": false + }, + { + "type": "event", + "name": "EmergencyUnpaused", + "inputs": [ { - "details": "Error thrown when the target is not on paused state." + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "ErrTargetIsOnPaused()": [ + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ { - "details": "Error thrown when the target is already on paused state." + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" } - ] + ], + "anonymous": false }, - "events": { - "EmergencyPaused(address)": { - "details": "Emitted when the emergency ppause is triggered by `account`." - }, - "EmergencyUnpaused(address)": { - "details": "Emitted when the emergency unpause is triggered by `account`." - }, - "TargetChanged(address)": { - "details": "Emitted when the target is changed." - } + { + "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": "TargetChanged", + "inputs": [ + { + "name": "target", + "type": "address", + "indexed": false, + "internalType": "contract IPauseTarget" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrNotOnEmergencyPause", + "inputs": [] }, + { + "type": "error", + "name": "ErrTargetIsNotOnPaused", + "inputs": [] + }, + { + "type": "error", + "name": "ErrTargetIsOnPaused", + "inputs": [] + } + ], + "address": "0x4222384E84C248aa8D50FDC702a1b55E6b4efc99", + "args": "0x", + "ast": "", + "blockNumber": 26515571, + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "chainId": 2021, + "contractAbsolutePath": "PauseEnforcer.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, "kind": "dev", "methods": { "changeTarget(address)": { @@ -545,66 +491,96 @@ "details": "Triggers an unpause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is already paused. - The target contract is paused in emergency mode." } }, - "stateVariables": { - "emergency": { - "details": "Indicating whether or not the target contract is paused in emergency mode." + "events": { + "EmergencyPaused(address)": { + "details": "Emitted when the emergency ppause is triggered by `account`." + }, + "EmergencyUnpaused(address)": { + "details": "Emitted when the emergency unpause is triggered by `account`." + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." }, - "target": { - "details": "The contract that can be paused or unpaused by the SENTRY_ROLE." + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "TargetChanged(address)": { + "details": "Emitted when the target is changed." } }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 + "errors": { + "ErrNotOnEmergencyPause()": [ + { + "details": "Error thrown when the contract is not on emergency pause." + } + ], + "ErrTargetIsNotOnPaused()": [ + { + "details": "Error thrown when the target is not on paused state." + } + ], + "ErrTargetIsOnPaused()": [ + { + "details": "Error thrown when the target is already on paused state." + } + ] + } }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrNotOnEmergencyPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsNotOnPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsOnPaused\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"contract IPauseTarget\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SENTRY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"changeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergency\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"grantSentry\",\"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\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_sentries\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"revokeSentry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerUnpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrNotOnEmergencyPause()\":[{\"details\":\"Error thrown when the contract is not on emergency pause.\"}],\"ErrTargetIsNotOnPaused()\":[{\"details\":\"Error thrown when the target is not on paused state.\"}],\"ErrTargetIsOnPaused()\":[{\"details\":\"Error thrown when the target is already on paused state.\"}]},\"events\":{\"EmergencyPaused(address)\":{\"details\":\"Emitted when the emergency ppause is triggered by `account`.\"},\"EmergencyUnpaused(address)\":{\"details\":\"Emitted when the emergency unpause is triggered by `account`.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"TargetChanged(address)\":{\"details\":\"Emitted when the target is changed.\"}},\"kind\":\"dev\",\"methods\":{\"changeTarget(address)\":{\"details\":\"Setter for `target`. Requirements: - Only admin can call this method.\"},\"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. May emit a {RoleGranted} event.\"},\"grantSentry(address)\":{\"details\":\"Grants the SENTRY_ROLE to the specified address.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address[])\":{\"details\":\"Initializes the contract storage.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"revokeSentry(address)\":{\"details\":\"Revokes the SENTRY_ROLE from the specified address.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"triggerPause()\":{\"details\":\"Triggers a pause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is not already paused.\"},\"triggerUnpause()\":{\"details\":\"Triggers an unpause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is already paused. - The target contract is paused in emergency mode.\"}},\"stateVariables\":{\"emergency\":{\"details\":\"Indicating whether or not the target contract is paused in emergency mode.\"},\"target\":{\"details\":\"The contract that can be paused or unpaused by the SENTRY_ROLE.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/PauseEnforcer.sol\":\"PauseEnforcer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/interfaces/IPauseTarget.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IPauseTarget {\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external returns (bool);\\n}\\n\",\"keccak256\":\"0xc91073e61da572de0087b41018fd30b03661d58e0c5061e7b9d1c9235cd7c1c3\",\"license\":\"MIT\"},\"src/ronin/gateway/PauseEnforcer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../interfaces/IPauseTarget.sol\\\";\\n\\ncontract PauseEnforcer is AccessControlEnumerable, Initializable {\\n /**\\n * @dev Error thrown when the target is already on paused state.\\n */\\n error ErrTargetIsOnPaused();\\n\\n /**\\n * @dev Error thrown when the target is not on paused state.\\n */\\n error ErrTargetIsNotOnPaused();\\n\\n /**\\n * @dev Error thrown when the contract is not on emergency pause.\\n */\\n error ErrNotOnEmergencyPause();\\n\\n bytes32 public constant SENTRY_ROLE = keccak256(\\\"SENTRY_ROLE\\\");\\n\\n /// @dev The contract that can be paused or unpaused by the SENTRY_ROLE.\\n IPauseTarget public target;\\n /// @dev Indicating whether or not the target contract is paused in emergency mode.\\n bool public emergency;\\n\\n /// @dev Emitted when the emergency ppause is triggered by `account`.\\n event EmergencyPaused(address account);\\n /// @dev Emitted when the emergency unpause is triggered by `account`.\\n event EmergencyUnpaused(address account);\\n /// @dev Emitted when the target is changed.\\n event TargetChanged(IPauseTarget target);\\n\\n modifier onEmergency() {\\n if (!emergency) revert ErrNotOnEmergencyPause();\\n\\n _;\\n }\\n\\n modifier targetPaused() {\\n if (!target.paused()) revert ErrTargetIsOnPaused();\\n\\n _;\\n }\\n\\n modifier targetNotPaused() {\\n if (target.paused()) revert ErrTargetIsNotOnPaused();\\n\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /**\\n * @dev Initializes the contract storage.\\n */\\n function initialize(IPauseTarget _target, address _admin, address[] memory _sentries) external initializer {\\n _changeTarget(_target);\\n _setupRole(DEFAULT_ADMIN_ROLE, _admin);\\n for (uint _i; _i < _sentries.length;) {\\n _grantRole(SENTRY_ROLE, _sentries[_i]);\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Grants the SENTRY_ROLE to the specified address.\\n */\\n function grantSentry(address _sentry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _grantRole(SENTRY_ROLE, _sentry);\\n }\\n\\n /**\\n * @dev Revokes the SENTRY_ROLE from the specified address.\\n */\\n function revokeSentry(address _sentry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _revokeRole(SENTRY_ROLE, _sentry);\\n }\\n\\n /**\\n * @dev Triggers a pause on the target contract.\\n *\\n * Requirements:\\n * - Only be called by accounts with the SENTRY_ROLE,\\n * - The target contract is not already paused.\\n */\\n function triggerPause() external onlyRole(SENTRY_ROLE) targetNotPaused {\\n emergency = true;\\n target.pause();\\n emit EmergencyPaused(msg.sender);\\n }\\n\\n /**\\n * @dev Triggers an unpause on the target contract.\\n *\\n * Requirements:\\n * - Only be called by accounts with the SENTRY_ROLE,\\n * - The target contract is already paused.\\n * - The target contract is paused in emergency mode.\\n */\\n function triggerUnpause() external onlyRole(SENTRY_ROLE) onEmergency targetPaused {\\n emergency = false;\\n target.unpause();\\n emit EmergencyUnpaused(msg.sender);\\n }\\n\\n /**\\n * @dev Setter for `target`.\\n *\\n * Requirements:\\n * - Only admin can call this method.\\n */\\n function changeTarget(IPauseTarget _target) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _changeTarget(_target);\\n }\\n\\n /**\\n * @dev Internal helper for setting value to `target`.\\n */\\n function _changeTarget(IPauseTarget _target) internal {\\n target = _target;\\n emit TargetChanged(_target);\\n }\\n}\\n\",\"keccak256\":\"0x4a758f6cc62826d0f513903df7cf9e63a5bbd7420d3f8349595fabea346beb37\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192811, + "numDeployments": 2, "storageLayout": { "storage": [ { - "astId": 24, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 56841, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_roles", "offset": 0, "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)" }, { - "astId": 338, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 57155, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_roleMembers", "offset": 0, "slot": "1", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)4026_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)64060_storage)" }, { - "astId": 1373, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 58190, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_initialized", "offset": 0, "slot": "2", "type": "t_uint8" }, { - "astId": 1376, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 58193, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_initializing", "offset": 1, "slot": "2", "type": "t_bool" }, { - "astId": 24083, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 121661, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "target", "offset": 2, "slot": "2", - "type": "t_contract(IPauseTarget)9588" + "type": "t_contract(IPauseTarget)110573" }, { - "astId": 24086, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 121664, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "emergency", "offset": 22, "slot": "2", @@ -618,10 +594,10 @@ "numberOfBytes": "20" }, "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", "encoding": "dynamic_array", "label": "bytes32[]", - "numberOfBytes": "32" + "numberOfBytes": "32", + "base": "t_bytes32" }, "t_bool": { "encoding": "inplace", @@ -633,7 +609,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IPauseTarget)9588": { + "t_contract(IPauseTarget)110573": { "encoding": "inplace", "label": "contract IPauseTarget", "numberOfBytes": "20" @@ -645,19 +621,19 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_bytes32,t_struct(AddressSet)4026_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)64060_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)4026_storage" + "value": "t_struct(AddressSet)64060_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)19_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)19_storage" + "value": "t_struct(RoleData)56836_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -666,66 +642,66 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(AddressSet)4026_storage": { + "t_struct(AddressSet)64060_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", + "numberOfBytes": "64", "members": [ { - "astId": 4025, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 64059, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)3725_storage" + "type": "t_struct(Set)63759_storage" } - ], - "numberOfBytes": "64" + ] }, - "t_struct(RoleData)19_storage": { + "t_struct(RoleData)56836_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", "members": [ { - "astId": 16, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 56833, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "members", "offset": 0, "slot": "0", "type": "t_mapping(t_address,t_bool)" }, { - "astId": 18, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 56835, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "adminRole", "offset": 0, "slot": "1", "type": "t_bytes32" } - ], - "numberOfBytes": "64" + ] }, - "t_struct(Set)3725_storage": { + "t_struct(Set)63759_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", + "numberOfBytes": "64", "members": [ { - "astId": 3720, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 63754, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_values", "offset": 0, "slot": "0", "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 3724, - "contract": "contracts/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", + "astId": 63758, + "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_indexes", "offset": 0, "slot": "1", "type": "t_mapping(t_bytes32,t_uint256)" } - ], - "numberOfBytes": "64" + ] }, "t_uint256": { "encoding": "inplace", @@ -738,5 +714,10 @@ "numberOfBytes": "1" } } + }, + "timestamp": 1713251844, + "userdoc": { + "version": 1, + "kind": "user" } } \ No newline at end of file diff --git a/deployments/ronin-testnet/RoninGatewayV3Logic.json b/deployments/ronin-testnet/RoninGatewayV3Logic.json new file mode 100644 index 00000000..9a8936a0 --- /dev/null +++ b/deployments/ronin-testnet/RoninGatewayV3Logic.json @@ -0,0 +1,3198 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "bulkRequestWithdrawalFor", + "inputs": [ + { + "name": "requests", + "type": "tuple[]", + "internalType": "struct Transfer.Request[]", + "components": [ + { + "name": "recipientAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bulkSubmitWithdrawalSignatures", + "inputs": [ + { + "name": "withdrawals", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "signatures", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "checkThreshold", + "inputs": [ + { + "name": "_voteWeight", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "depositFor", + "inputs": [ + { + "name": "_receipt", + "type": "tuple", + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositVote", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "status", + "type": "uint8", + "internalType": "enum VoteStatusConsumer.VoteStatus" + }, + { + "name": "finalHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "expiredAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "createdAt", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "depositVoted", + "inputs": [ + { + "name": "_chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_depositId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_voter", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "emergencyPauser", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ], + "outputs": [ + { + "name": "contract_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMainchainToken", + "inputs": [ + { + "name": "_roninToken", + "type": "address", + "internalType": "address" + }, + { + "name": "_chainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "_token", + "type": "tuple", + "internalType": "struct MappedTokenConsumer.MappedToken", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "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": "getThreshold", + "inputs": [], + "outputs": [ + { + "name": "num_", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom_", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTrustedThreshold", + "inputs": [], + "outputs": [ + { + "name": "trustedNum_", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "trustedDenom_", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getWithdrawalSignatures", + "inputs": [ + { + "name": "withdrawalId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "operators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "_signatures", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "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": [ + { + "name": "_roleSetter", + "type": "address", + "internalType": "address" + }, + { + "name": "_numerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_denominator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_trustedNumerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_trustedDenominator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_packedAddresses", + "type": "address[][2]", + "internalType": "address[][2]" + }, + { + "name": "_packedNumbers", + "type": "uint256[][2]", + "internalType": "uint256[][2]" + }, + { + "name": "_standards", + "type": "uint8[]", + "internalType": "enum TokenStandard[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeV2", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeV3", + "inputs": [ + { + "name": "bridgeAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mainchainWithdrew", + "inputs": [ + { + "name": "_withdrawalId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mainchainWithdrewVote", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "status", + "type": "uint8", + "internalType": "enum VoteStatusConsumer.VoteStatus" + }, + { + "name": "finalHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "expiredAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "createdAt", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mainchainWithdrewVoted", + "inputs": [ + { + "name": "_withdrawalId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_voter", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mapTokens", + "inputs": [ + { + "name": "_roninTokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_mainchainTokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_chainIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "_standards", + "type": "uint8[]", + "internalType": "enum TokenStandard[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "minimumThreshold", + "inputs": [ + { + "name": "mainchainToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumVoteWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonce", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onERC1155BatchReceived", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onERC1155Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "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": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "requestWithdrawalFor", + "inputs": [ + { + "name": "_request", + "type": "tuple", + "internalType": "struct Transfer.Request", + "components": [ + { + "name": "recipientAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + }, + { + "name": "_chainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "requestWithdrawalSignatures", + "inputs": [ + { + "name": "_withdrawalId", + "type": "uint256", + "internalType": "uint256" + } + ], + "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": "setContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setEmergencyPauser", + "inputs": [ + { + "name": "_addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMinimumThresholds", + "inputs": [ + { + "name": "_tokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "_thresholds", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setThreshold", + "inputs": [ + { + "name": "_numerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_denominator", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTrustedThreshold", + "inputs": [ + { + "name": "_trustedNumerator", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_trustedDenominator", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tryBulkAcknowledgeMainchainWithdrew", + "inputs": [ + { + "name": "_withdrawalIds", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "_executedReceipts", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "tryBulkDepositFor", + "inputs": [ + { + "name": "receipts", + "type": "tuple[]", + "internalType": "struct Transfer.Receipt[]", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "outputs": [ + { + "name": "_executedReceipts", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawal", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "withdrawalCount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "withdrawalStatVote", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "status", + "type": "uint8", + "internalType": "enum VoteStatusConsumer.VoteStatus" + }, + { + "name": "finalHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "expiredAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "createdAt", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "ContractUpdated", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DepositVoted", + "inputs": [ + { + "name": "bridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Deposited", + "inputs": [ + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "receipt", + "type": "tuple", + "indexed": false, + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MainchainWithdrew", + "inputs": [ + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "receipt", + "type": "tuple", + "indexed": false, + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MinimumThresholdsUpdated", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "threshold", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "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": "ThresholdUpdated", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numerator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "previousNumerator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "previousDenominator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMapped", + "inputs": [ + { + "name": "roninTokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "mainchainTokens", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "chainIds", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "standards", + "type": "uint8[]", + "indexed": false, + "internalType": "enum TokenStandard[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TrustedThresholdUpdated", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numerator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "previousNumerator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "previousDenominator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WithdrawalRequested", + "inputs": [ + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "", + "type": "tuple", + "indexed": false, + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WithdrawalSignaturesRequested", + "inputs": [ + { + "name": "receiptHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "", + "type": "tuple", + "indexed": false, + "internalType": "struct Transfer.Receipt", + "components": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum Transfer.Kind" + }, + { + "name": "mainchain", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ronin", + "type": "tuple", + "internalType": "struct TokenOwner", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrAlreadyVoted", + "inputs": [ + { + "name": "voter", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrContractTypeNotFound", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ] + }, + { + "type": "error", + "name": "ErrERC1155MintingFailed", + "inputs": [] + }, + { + "type": "error", + "name": "ErrERC20MintingFailed", + "inputs": [] + }, + { + "type": "error", + "name": "ErrERC721MintingFailed", + "inputs": [] + }, + { + "type": "error", + "name": "ErrEmptyArray", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidChainId", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidInfo", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidReceipt", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidReceiptKind", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidRequest", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidThreshold", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidTokenStandard", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidTrustedThreshold", + "inputs": [] + }, + { + "type": "error", + "name": "ErrLengthMismatch", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrQueryForTooSmallQuantity", + "inputs": [] + }, + { + "type": "error", + "name": "ErrTokenCouldNotTransfer", + "inputs": [ + { + "name": "tokenInfo", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrTokenCouldNotTransferFrom", + "inputs": [ + { + "name": "tokenInfo", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrUnauthorized", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedStandard", + "inputs": [] + }, + { + "type": "error", + "name": "ErrUnsupportedToken", + "inputs": [] + }, + { + "type": "error", + "name": "ErrWithdrawalsMigrated", + "inputs": [] + }, + { + "type": "error", + "name": "ErrWithdrawnOnMainchainAlready", + "inputs": [] + }, + { + "type": "error", + "name": "ErrZeroCodeContract", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "address": "0xdA48f437Eb827CB997a7D09487D53bE72F2C57a8", + "args": "0x", + "ast": "", + "blockNumber": 26515571, + "bytecode": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b603754610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60375460ff9081161015620000ec576037805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6150b880620000fe6000396000f3fe6080604052600436106102975760003560e01c80638456cb591161015a578063ca15c873116100c1578063ecc836491161007a578063ecc836491461089f578063f0ce418e146108cc578063f23a6e6114610912578063f668214a1461093e578063fa3896591461095e578063fc6574bc1461097e576102a6565b8063ca15c873146107e7578063d547741f14610807578063dafae40814610827578063dbd2ef6c14610847578063de981f1b14610867578063e75235b814610887576102a6565b8063affed0e011610113578063affed0e0146106e5578063b9afa177146106fb578063b9c362091461071b578063bc197c811461073b578063bc7f038614610774578063c28f7894146107a1576102a6565b80638456cb591461063b578063865e6fd3146106505780639010d07c1461067057806391d14854146106905780639584a592146106b0578063a217fddf146106d0576102a6565b80633f4ba83a116101fe5780635d6a9a90116101b75780635d6a9a901461057257806364363f781461059f57806371706cbe146105bf57806375535f86146105d55780637de5dedd146105f5578063835fc6ca1461060a576102a6565b80633f4ba83a1461048f57806347b56b2c146104a45780634d92c4f0146104c45780635a7dd06a146105255780635c975abb146105455780635cd8a76b1461055d576102a6565b8063248a9ca311610250578063248a9ca3146103b15780632f2ff15d146103ef5780633101cfcb1461040f57806336568abe1461042f5780633e4574ec1461044f5780633e70838b1461046f576102a6565b806301ffc9a7146102ae578063065b3adf146102e35780630b1ff17f1461031b578063109679ef1461033b57806317892f961461035b57806317fa2ea114610384576102a6565b366102a6576102a46109d0565b005b6102a46109d0565b3480156102ba57600080fd5b506102ce6102c9366004613c2d565b6109e9565b60405190151581526020015b60405180910390f35b3480156102ef57600080fd5b50600554610303906001600160a01b031681565b6040516001600160a01b0390911681526020016102da565b34801561032757600080fd5b506102a4610336366004613c57565b610a09565b34801561034757600080fd5b506102a4610356366004613c88565b610a20565b34801561036757600080fd5b506078546079545b604080519283526020830191909152016102da565b34801561039057600080fd5b506103a461039f366004613ce5565b610a53565b6040516102da9190613d26565b3480156103bd57600080fd5b506103e16103cc366004613d60565b6000908152606b602052604090206001015490565b6040519081526020016102da565b3480156103fb57600080fd5b506102a461040a366004613d99565b610d90565b34801561041b57600080fd5b506102a461042a366004613dc9565b610dba565b34801561043b57600080fd5b506102a461044a366004613d99565b610e66565b34801561045b57600080fd5b506102ce61046a366004613d99565b610ee0565b34801561047b57600080fd5b506102a461048a366004613dc9565b610f10565b34801561049b57600080fd5b506102a4610f3a565b3480156104b057600080fd5b506102a46104bf366004613d60565b610f4c565b3480156104d057600080fd5b506105156104df366004613de6565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b6040516102da9493929190613e1e565b34801561053157600080fd5b506102a4610540366004613e4e565b611117565b34801561055157600080fd5b5060005460ff166102ce565b34801561056957600080fd5b506102a461117e565b34801561057e57600080fd5b5061059261058d366004613ec8565b611280565b6040516102da9190613f04565b3480156105ab57600080fd5b506102a46105ba366004613f30565b611324565b3480156105cb57600080fd5b506103e1606e5481565b3480156105e157600080fd5b5061036f6105f0366004613de6565b611360565b34801561060157600080fd5b506103e1611381565b34801561061657600080fd5b5061062a610625366004613d60565b611398565b6040516102da959493929190613ff8565b34801561064757600080fd5b506102a461146a565b34801561065c57600080fd5b506102a461066b36600461404e565b61147a565b34801561067c57600080fd5b5061030361068b366004613de6565b611495565b34801561069c57600080fd5b506102ce6106ab366004613d99565b6114ad565b3480156106bc57600080fd5b506102a46106cb36600461408b565b6114d8565b3480156106dc57600080fd5b506103e1600081565b3480156106f157600080fd5b506103e160045481565b34801561070757600080fd5b506103a4610716366004614184565b611625565b34801561072757600080fd5b506102a4610736366004613de6565b611743565b34801561074757600080fd5b50610767610756366004614368565b63bc197c8160e01b95945050505050565b6040516102da9190614415565b34801561078057600080fd5b506103e161078f366004613dc9565b60386020526000908152604090205481565b3480156107ad57600080fd5b506105156107bc366004613d60565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156107f357600080fd5b506103e1610802366004613d60565b611755565b34801561081357600080fd5b506102a4610822366004613d99565b61176c565b34801561083357600080fd5b506102ce610842366004613d60565b611791565b34801561085357600080fd5b506102a461086236600461442a565b6117bd565b34801561087357600080fd5b506103036108823660046144ed565b61180f565b34801561089357600080fd5b5060015460025461036f565b3480156108ab57600080fd5b506108bf6108ba366004614508565b61188a565b6040516102da91906145a3565b3480156108d857600080fd5b506105156108e7366004613d60565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561091e57600080fd5b5061076761092d366004614607565b63f23a6e6160e01b95945050505050565b34801561094a57600080fd5b506102ce610959366004613d60565b6119f1565b34801561096a57600080fd5b506102a4610979366004613f30565b611a1f565b34801561098a57600080fd5b506102ce61099936600461466f565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b60006109f482611c1a565b80610a035750610a0382611c3f565b92915050565b610a11611c64565b610a1c823383611caa565b5050565b610a28611c64565b610a30611d79565b610a50610a4236839003830183614746565b33610a4b611381565b611e1a565b50565b6060610a5d611d79565b336000610a68611381565b9050600084806001600160401b03811115610a8557610a856141f9565b604051908082528060200260200182016040528015610aae578160200160208202803683370190505b5094506000610abd600361180f565b905060005b82811015610d8457888882818110610adc57610adc6147d7565b905060200201359350816001600160a01b031663c7c4fea9600286896040518463ffffffff1660e01b8152600401610b16939291906147ed565b600060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b50505050610b51846119f1565b15610b7b576001878281518110610b6a57610b6a6147d7565b911515602092830291909101909101525b600084815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610bc257610bc2613e08565b6001811115610bd357610bd3613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff1690811115610c6b57610c6b613e08565b6002811115610c7c57610c7c613e08565b81526001820154602082015260029091015460409091015290525090506000610ca482612121565b90506000610cb4848b8b856121eb565b90506001816004811115610cca57610cca613e08565b03610d7557835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d0991908c90600401614817565b600060405180830381600087803b158015610d2357600080fd5b505af1158015610d37573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610d6c92919061482e565b60405180910390a15b50505050806001019050610ac2565b50505050505092915050565b6000828152606b6020526040902060010154610dab8161221e565b610db58383612228565b505050565b603754600390610100900460ff16158015610ddc575060375460ff8083169116105b610e015760405162461bcd60e51b8152600401610df89061488d565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e20600b8361224a565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610ed65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610df8565b610a1c82826122ee565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f18612310565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610f4261236a565b610f4a6123d9565b565b610f54611c64565b610f5d816119f1565b15610f7b576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff1690811115610fba57610fba613e08565b6001811115610fcb57610fcb613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff169081111561106357611063613e08565b600281111561107457611074613e08565b8152600182015460208201526002909101546040918201529152606083015101519192505046146110de576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61110882612121565b82604051610e5a92919061482e565b61111f611c64565b816000819003611142576040516316ee9d3b60e11b815260040160405180910390fd5b60005b818110156111775761116f858583818110611162576111626147d7565b905060a002013385611caa565b600101611145565b5050505050565b603754600290610100900460ff161580156111a0575060375460ff8083169116105b6111bc5760405162461bcd60e51b8152600401610df89061488d565b6037805461ffff191660ff8316176101001790556074546111e8906008906001600160a01b031661224a565b607554611200906003906001600160a01b031661224a565b60775461121890600a906001600160a01b031661224a565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660028111156112d4576112d4613e08565b60028111156112e5576112e5613e08565b815290546001600160a01b0361010090910481166020928301529082015191925016610a0357604051631b79f53b60e21b815260040160405180910390fd5b61132c612310565b600083900361134e576040516316ee9d3b60e11b815260040160405180910390fd5b61135a8484848461242b565b50505050565b60008061136b612310565b611375848461250e565b915091505b9250929050565b600061139361138e612598565b612605565b905090565b607160209081526000918252604091829020805460018201548451606080820187526002808601546001600160a01b03908116845260038701548116848901526004870154848a015288518084018a526005880154821681526006880154909116978101979097526007860154878901528751918201909752600885018054949760ff94851697939693959394929391928492169081111561143c5761143c613e08565b600281111561144d5761144d613e08565b815260200160018201548152602001600282015481525050905085565b61147261236a565b610f4a61263b565b611482612310565b61148b81612678565b610a1c828261224a565b6000828152606c60205260408120610f0990836126ae565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff16158080156114f85750603754600160ff909116105b806115125750303b158015611512575060375460ff166001145b61152e5760405162461bcd60e51b8152600401610df89061488d565b6037805460ff191660011790558015611551576037805461ff0019166101001790555b61155c60008d6126ba565b6115668b8b6126c4565b611570898961250e565b506000905061157f86806148db565b905011156115d1576115b261159486806148db565b6115a160208901896148db565b6115ab89806148db565b8989612754565b6115d16115bf86806148db565b6115cc60208801886148db565b61242b565b8015611617576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b606061162f611c64565b611637611d79565b81806001600160401b03811115611650576116506141f9565b604051908082528060200260200182016040528015611679578160200160208202803683370190505b5091506000611686611381565b9050611690613bc0565b60005b83811015611739578686828181106116ad576116ad6147d7565b905061016002018036038101906116c49190614746565b915060026040808401518101516000908152606f6020908152828220865183529052205460ff1660048111156116fc576116fc613e08565b03611726576001858281518110611715576117156147d7565b911515602092830291909101909101525b611731823385611e1a565b600101611693565b5050505092915050565b61174b612310565b610a1c82826126c4565b6000818152606c60205260408120610a0390612970565b6000828152606b60205260409020600101546117878161221e565b610db583836122ee565b600061179b612598565b6001546117a8919061493a565b6002546117b5908461493a565b101592915050565b6117c5612310565b60008790036117f5576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6118058888888888888888612754565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561184657611846613e08565b60ff1681526020810191909152604001600020546001600160a01b0316905080611885578160405163409140df60e11b8152600401610df89190614951565b919050565b6060816001600160401b038111156118a4576118a46141f9565b6040519080825280602002602001820160405280156118d757816020015b60608152602001906001900390816118c25790505b50905060005b828110156119e957600085815260726020526040812090858584818110611906576119066147d7565b905060200201602081019061191b9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002080546119469061496b565b80601f01602080910402602001604051908101604052809291908181526020018280546119729061496b565b80156119bf5780601f10611994576101008083540402835291602001916119bf565b820191906000526020600020905b8154815290600101906020018083116119a257829003601f168201915b50505050508282815181106119d6576119d66147d7565b60209081029190910101526001016118dd565b509392505050565b6000600260008381526070602052604090205460ff166004811115611a1857611a18613e08565b1492915050565b611a27611c64565b611a2f611d79565b33838015801590611a3f57508083145b611a6a576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6000611a74611381565b9050600080611a83600361180f565b905060005b84811015611c0e57898982818110611aa257611aa26147d7565b905060200201359250878782818110611abd57611abd6147d7565b9050602002810190611acf919061499f565b60008581526072602090815260408083206001600160a01b038c168452909152902091611afd919083614a35565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611b2f9060019087908b906004016147ed565b600060405180830381600087803b158015611b4957600080fd5b505af1158015611b5d573d6000803e3d6000fd5b50505060008481526076602052604081209150611b7c828988886121eb565b90506001816004811115611b9257611b92613e08565b03611c0457815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611bd1906001908990600401614817565b600060405180830381600087803b158015611beb57600080fd5b505af1158015611bff573d6000803e3d6000fd5b505050505b5050600101611a88565b50505050505050505050565b60006001600160e01b03198216635a05180f60e01b1480610a035750610a038261297a565b60006001600160e01b03198216630271189760e51b1480610a035750610a0382611c1a565b60005460ff1615610f4a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610df8565b611cc4611cbf36859003850160408601614af4565b6129af565b611ccd836129f3565b6000611ce8611ce26040860160208701613dc9565b83611280565b80519091506002811115611cfe57611cfe613e08565b611d0e6060860160408701614b10565b6002811115611d1f57611d1f613e08565b14611d3c5760405162035e2b60ea1b815260040160405180910390fd5b611d6983611d506040870160208801613dc9565b611d6236889003880160408901614af4565b9190612a71565b6111778483858460200151612bfc565b611d83600b61180f565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ded9190614b2b565b610f4a576000356001600160e01b0319166006604051620f948f60ea1b8152600401610df8929190614b4d565b82516080840151611e2a906129af565b600084602001516001811115611e4257611e42613e08565b14611e605760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611eae576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b6000611eca856060015160200151866040015160400151611280565b6080860151519091506002811115611ee457611ee4613e08565b81516002811115611ef757611ef7613e08565b148015611f2157508460400151602001516001600160a01b031681602001516001600160a01b0316145b611f3e5760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f6020908152828220858352905290812090611f6887612121565b90506000611f78838888856121eb565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b645985604051611fbf91815260200190565b60405180910390a46000611fd3600361180f565b90506001826004811115611fe957611fe9613e08565b036120b357835460ff191660021784556060890151805160209091015160808b01516120189290916000612d8e565b885160405163114fc47560e11b81526001600160a01b0383169163229f88ea9161204791600091600401614817565b600060405180830381600087803b15801561206157600080fd5b505af1158015612075573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524838a6040516120aa92919061482e565b60405180910390a15b885160405163c7c4fea960e01b81526001600160a01b0383169163c7c4fea9916120e4916000918d906004016147ed565b600060405180830381600087803b1580156120fe57600080fd5b505af1158015612112573d6000803e3d6000fd5b50505050505050505050505050565b6000806121318360400151612fa7565b905060006121428460600151612fa7565b905060006121968560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b60006121f8858584612fef565b600061220486846130a5565b9050612212868583866131a9565b9150505b949350505050565b610a5081336131f5565b6122328282613259565b6000828152606c60205260409020610db590826132df565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561228057612280613e08565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156122c1576122c1613e08565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6122f882826132f4565b6000828152606c60205260409020610db5908261335b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806123ac57506005546001600160a01b031633145b610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b6123e1613370565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b828114612459576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b838110156124ca57828282818110612476576124766147d7565b9050602002013560386000878785818110612493576124936147d7565b90506020020160208101906124a89190613dc9565b6001600160a01b0316815260208101919091526040016000205560010161245c565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da848484846040516125009493929190614bf6565b60405180910390a150505050565b600080828411156125325760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba910160405180910390a49250929050565b60006125a4600b61180f565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113939190614c28565b600060025460016002548460015461261d919061493a565b6126279190614c41565b6126319190614c54565b610a039190614c67565b612643611c64565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861240e3390565b806001600160a01b03163b600003610a5057604051630bfc64a360e21b81526001600160a01b0382166004820152602401610df8565b6000610f0983836133b9565b610a1c8282612228565b808211156126f3576000356001600160e01b0319166040516387f6f09560e01b8152600401610df89190614415565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b868514801561276257508683145b61278d576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b87811015612920578686828181106127aa576127aa6147d7565b90506020020160208101906127bf9190613dc9565b607360008b8b858181106127d5576127d56147d7565b90506020020160208101906127ea9190613dc9565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087878581811061281e5761281e6147d7565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555082828281811061286c5761286c6147d7565b90506020020160208101906128819190614b10565b607360008b8b85818110612897576128976147d7565b90506020020160208101906128ac9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008787858181106128e0576128e06147d7565b60209081029290920135835250810191909152604001600020805460ff1916600183600281111561291357612913613e08565b0217905550600101612790565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401888888888888888860405161295e989796959493929190614c89565b60405180910390a15050505050505050565b6000610a03825490565b60006001600160e01b03198216637965db0b60e01b1480610a0357506301ffc9a760e01b6001600160e01b0319831614610a03565b6129b8816133e3565b806129c757506129c78161341a565b806129d657506129d681613442565b610a505760405163034992a760e51b815260040160405180910390fd5b6000612a056060830160408401614b10565b6002811115612a1657612a16613e08565b148015612a53575060386000612a326040840160208501613dc9565b6001600160a01b031681526020810191909152604001600020546080820135105b15610a5057604051636eff4a8560e11b815260040160405180910390fd5b600060608185516002811115612a8957612a89613e08565b03612b645760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612af09190614d18565b6000604051808303816000865af19150503d8060008114612b2d576040519150601f19603f3d011682016040523d82523d6000602084013e612b32565b606091505b509092509050818015612b5d575080511580612b5d575080806020019051810190612b5d9190614b2b565b9150612bd6565b600185516002811115612b7957612b79613e08565b03612b8e57612b5d838530886020015161346b565b600285516002811115612ba357612ba3613e08565b03612bbd57612b5d83853088602001518960400151613519565b6040516361e411a760e11b815260040160405180910390fd5b816111775784843085604051639d2e4c6760e01b8152600401610df89493929190614d34565b606e805460009182612c0d83614d6a565b9091555090506000612c3484838588612c2b368c90038c018c614d83565b939291906135cd565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612c7357612c73613e08565b02179055506040828101518051600280850180546001600160a01b039384166001600160a01b03199182161790915560208085015160038801805491861691841691909117905593850151600487015560608701518051600588018054918616918416919091179055938401516006870180549190941691161790915591015160078301556080830151805160088401805492939092839160ff19909116906001908490811115612d2657612d26613e08565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612d6e82612121565b82604051612d7d92919061482e565b60405180910390a150949350505050565b806001600160a01b0316826001600160a01b031603612e3b5760408085015190516001600160a01b0385169180156108fc02916000818181858888f19350505050612e3657806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e1257600080fd5b505af1158015612e26573d6000803e3d6000fd5b5050505050612e36848484613639565b61135a565b600084516002811115612e5057612e50613e08565b03612f16576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015612e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec09190614c28565b90508460400151811015612f0557612ee88330838860400151612ee39190614c54565b6136b8565b612f0557604051632f739fff60e11b815260040160405180910390fd5b612f10858585613639565b5061135a565b600184516002811115612f2b57612f2b613e08565b03612f5c57612f3f8284866020015161375d565b612e365760405163c8e3a09f60e01b815260040160405180910390fd5b600284516002811115612f7157612f71613e08565b03612bbd57612f8a828486602001518760400151613784565b612e36576040516334b471a760e21b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b60008360030154118015613007575042836003015411155b1561301857825460ff191660041783555b6001600160a01b03821660009081526002840160205260409020541561305c5760405163025fd59560e41b81526001600160a01b0383166004820152602401610df8565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b60008060006130b4600b61180f565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa1580156130f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131199190810190614e3e565b81519194509250905060005b818110156117395785876002016000868481518110613146576131466147d7565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036131a157828181518110613186576131866147d7565b60200260200101516bffffffffffffffffffffffff16850194505b600101613125565b60008383101580156131d057506000855460ff1660048111156131ce576131ce613e08565b145b156131e857845460ff19166001908117865585018290555b5050915460ff1692915050565b6131ff82826114ad565b610a1c57613217816001600160a01b031660146137ad565b6132228360206137ad565b604051602001613233929190614f36565b60408051601f198184030181529082905262461bcd60e51b8252610df891600401614fab565b61326382826114ad565b610a1c576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561329b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f09836001600160a01b038416613948565b6132fe82826114ad565b15610a1c576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f09836001600160a01b038416613997565b60005460ff16610f4a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610df8565b60008260000182815481106133d0576133d06147d7565b9060005260206000200154905092915050565b600080825160028111156133f9576133f9613e08565b14801561340a575060008260400151115b8015610a03575050602001511590565b600060018251600281111561343157613431613e08565b148015610a03575050604001511590565b600060028251600281111561345957613459613e08565b148015610a0357505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928716916134cb91614d18565b6000604051808303816000865af19150503d8060008114613508576040519150601f19603f3d011682016040523d82523d6000602084013e61350d565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b0387169061354990879087908790879060448101614fbe565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b1790525161357e9190614d18565b6000604051808303816000865af19150503d80600081146135bb576040519150601f19603f3d011682016040523d82523d6000602084013e6135c0565b606091505b5090979650505050505050565b6135d5613bc0565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b6000808451600281111561364f5761364f613e08565b0361366a5761366382848660400151613a8a565b9050613694565b60018451600281111561367f5761367f613e08565b03612bbd57613663823085876020015161346b565b8061135a578383836040516341bd7d9160e11b8152600401610df893929190614ff8565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b179052915160009286169161371091614d18565b6000604051808303816000865af19150503d806000811461374d576040519150601f19603f3d011682016040523d82523d6000602084013e613752565b606091505b509095945050505050565b600061376b8430858561346b565b905080610f095761377d8484846136b8565b9050610f09565b60006137938530868686613519565b905080612216576137a685858585613b5d565b9050612216565b606060006137bc83600261493a565b6137c7906002614c41565b6001600160401b038111156137de576137de6141f9565b6040519080825280601f01601f191660200182016040528015613808576020820181803683370190505b509050600360fc1b81600081518110613823576138236147d7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613852576138526147d7565b60200101906001600160f81b031916908160001a905350600061387684600261493a565b613881906001614c41565b90505b60018111156138f9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106138b5576138b56147d7565b1a60f81b8282815181106138cb576138cb6147d7565b60200101906001600160f81b031916908160001a90535060049490941c936138f281615028565b9050613884565b508315610f095760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610df8565b600081815260018301602052604081205461398f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a03565b506000610a03565b60008181526001830160205260408120548015613a805760006139bb600183614c54565b85549091506000906139cf90600190614c54565b9050818114613a345760008660000182815481106139ef576139ef6147d7565b9060005260206000200154905080876000018481548110613a1257613a126147d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613a4557613a4561503f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a03565b6000915050610a03565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613ae79190614d18565b6000604051808303816000865af19150503d8060008114613b24576040519150601f19603f3d011682016040523d82523d6000602084013e613b29565b606091505b509092509050818015613b54575080511580613b54575080806020019051810190613b549190614b2b565b95945050505050565b604080516000808252602082019092526001600160a01b03861690613b8b9086908690869060448101615055565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b179052516134cb9190614d18565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613c3f57600080fd5b81356001600160e01b031981168114610f0957600080fd5b60008082840360c0811215613c6b57600080fd5b60a0811215613c7957600080fd5b50919360a08501359350915050565b60006101608284031215613c9b57600080fd5b50919050565b60008083601f840112613cb357600080fd5b5081356001600160401b03811115613cca57600080fd5b6020830191508360208260051b850101111561137a57600080fd5b60008060208385031215613cf857600080fd5b82356001600160401b03811115613d0e57600080fd5b613d1a85828601613ca1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561350d578351151583529284019291840191600101613d42565b600060208284031215613d7257600080fd5b5035919050565b6001600160a01b0381168114610a5057600080fd5b803561188581613d79565b60008060408385031215613dac57600080fd5b823591506020830135613dbe81613d79565b809150509250929050565b600060208284031215613ddb57600080fd5b8135610f0981613d79565b60008060408385031215613df957600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6080810160058610613e3257613e32613e08565b9481526020810193909352604083019190915260609091015290565b600080600060408486031215613e6357600080fd5b83356001600160401b0380821115613e7a57600080fd5b818601915086601f830112613e8e57600080fd5b813581811115613e9d57600080fd5b87602060a083028501011115613eb257600080fd5b6020928301989097509590910135949350505050565b60008060408385031215613edb57600080fd5b8235613ee681613d79565b946020939093013593505050565b60038110610a5057610a50613e08565b81516040820190613f1481613ef4565b82526020928301516001600160a01b0316929091019190915290565b60008060008060408587031215613f4657600080fd5b84356001600160401b0380821115613f5d57600080fd5b613f6988838901613ca1565b90965094506020870135915080821115613f8257600080fd5b50613f8f87828801613ca1565b95989497509550505050565b60028110613fab57613fab613e08565b9052565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b8051613fe181613ef4565b825260208181015190830152604090810151910152565b858152610160810161400d6020830187613f9b565b61401a6040830186613faf565b61402760a0830185613faf565b614035610100830184613fd6565b9695505050505050565b80356010811061188557600080fd5b6000806040838503121561406157600080fd5b61406a8361403f565b91506020830135613dbe81613d79565b8060408101831015610a0357600080fd5b60008060008060008060008060008060006101208c8e0312156140ad57600080fd5b6140b68c613d8e565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e013511156140ed57600080fd5b6140fd8e60a08f01358f01613ca1565b909750955060c08d013581101561411357600080fd5b6141238e60c08f01358f0161407a565b94508060e08e0135111561413657600080fd5b6141468e60e08f01358f0161407a565b9350806101008e0135111561415a57600080fd5b5061416c8d6101008e01358e01613ca1565b81935080925050509295989b509295989b9093969950565b6000806020838503121561419757600080fd5b82356001600160401b03808211156141ae57600080fd5b818501915085601f8301126141c257600080fd5b8135818111156141d157600080fd5b866020610160830285010111156141e757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614231576142316141f9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561425f5761425f6141f9565b604052919050565b60006001600160401b03821115614280576142806141f9565b5060051b60200190565b600082601f83011261429b57600080fd5b813560206142b06142ab83614267565b614237565b8083825260208201915060208460051b8701019350868411156142d257600080fd5b602086015b848110156142ee57803583529183019183016142d7565b509695505050505050565b600082601f83011261430a57600080fd5b81356001600160401b03811115614323576143236141f9565b614336601f8201601f1916602001614237565b81815284602083860101111561434b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561438057600080fd5b853561438b81613d79565b9450602086013561439b81613d79565b935060408601356001600160401b03808211156143b757600080fd5b6143c389838a0161428a565b945060608801359150808211156143d957600080fd5b6143e589838a0161428a565b935060808801359150808211156143fb57600080fd5b50614408888289016142f9565b9150509295509295909350565b6001600160e01b031991909116815260200190565b6000806000806000806000806080898b03121561444657600080fd5b88356001600160401b038082111561445d57600080fd5b6144698c838d01613ca1565b909a50985060208b013591508082111561448257600080fd5b61448e8c838d01613ca1565b909850965060408b01359150808211156144a757600080fd5b6144b38c838d01613ca1565b909650945060608b01359150808211156144cc57600080fd5b506144d98b828c01613ca1565b999c989b5096995094979396929594505050565b6000602082840312156144ff57600080fd5b610f098261403f565b60008060006040848603121561451d57600080fd5b8335925060208401356001600160401b0381111561453a57600080fd5b61454686828701613ca1565b9497909650939450505050565b60005b8381101561456e578181015183820152602001614556565b50506000910152565b6000815180845261458f816020860160208601614553565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156145fa57603f198886030184526145e8858351614577565b945092850192908501906001016145cc565b5092979650505050505050565b600080600080600060a0868803121561461f57600080fd5b853561462a81613d79565b9450602086013561463a81613d79565b9350604086013592506060860135915060808601356001600160401b0381111561466357600080fd5b614408888289016142f9565b60008060006060848603121561468457600080fd5b8335925060208401359150604084013561469d81613d79565b809150509250925092565b6000606082840312156146ba57600080fd5b6146c261420f565b905081356146cf81613d79565b815260208201356146df81613d79565b806020830152506040820135604082015292915050565b80356003811061188557600080fd5b60006060828403121561471757600080fd5b61471f61420f565b905061472a826146f6565b8152602082013560208201526040820135604082015292915050565b6000610160828403121561475957600080fd5b60405160a081018181106001600160401b038211171561477b5761477b6141f9565b6040528235815260208301356002811061479457600080fd5b60208201526147a684604085016146a8565b60408201526147b88460a085016146a8565b60608201526147cb846101008501614705565b60808201529392505050565b634e487b7160e01b600052603260045260246000fd5b606081016147fa85613ef4565b93815260208101929092526001600160a01b031660409091015290565b6040810161482484613ef4565b9281526020015290565b6000610180820190508382528251602083015260208301516148536040840182613f9b565b5060408301516148666060840182613faf565b50606083015161487960c0840182613faf565b5060808301516119e9610120840182613fd6565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e198436030181126148f257600080fd5b8301803591506001600160401b0382111561490c57600080fd5b6020019150600581901b360382131561137a57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a0357610a03614924565b602081016010831061496557614965613e08565b91905290565b600181811c9082168061497f57607f821691505b602082108103613c9b57634e487b7160e01b600052602260045260246000fd5b6000808335601e198436030181126149b657600080fd5b8301803591506001600160401b038211156149d057600080fd5b60200191503681900382131561137a57600080fd5b601f821115610db5576000816000526020600020601f850160051c81016020861015614a0e5750805b601f850160051c820191505b81811015614a2d57828155600101614a1a565b505050505050565b6001600160401b03831115614a4c57614a4c6141f9565b614a6083614a5a835461496b565b836149e5565b6000601f841160018114614a945760008515614a7c5750838201355b600019600387901b1c1916600186901b178355611177565b600083815260209020601f19861690835b82811015614ac55786850135825560209485019460019092019101614aa5565b5086821015614ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060608284031215614b0657600080fd5b610f098383614705565b600060208284031215614b2257600080fd5b610f09826146f6565b600060208284031215614b3d57600080fd5b81518015158114610f0957600080fd5b6001600160e01b03198316815260408101600b8310614b6e57614b6e613e08565b8260208301529392505050565b8183526000602080850194508260005b85811015614bb9578135614b9e81613d79565b6001600160a01b031687529582019590820190600101614b8b565b509495945050505050565b81835260006001600160fb1b03831115614bdd57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000614c0a604083018688614b7b565b8281036020840152614c1d818587614bc4565b979650505050505050565b600060208284031215614c3a57600080fd5b5051919050565b80820180821115610a0357610a03614924565b81810381811115610a0357610a03614924565b600082614c8457634e487b7160e01b600052601260045260246000fd5b500490565b608081526000614c9d608083018a8c614b7b565b60208382036020850152614cb2828a8c614b7b565b91508382036040850152614cc782888a614bc4565b848103606086015285815286925060200160005b86811015614d0757614cec846146f6565b614cf581613ef4565b82529282019290820190600101614cdb565b509c9b505050505050505050505050565b60008251614d2a818460208701614553565b9190910192915050565b60c08101614d428287613fd6565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b600060018201614d7c57614d7c614924565b5060010190565b600060a08284031215614d9557600080fd5b614d9d61420f565b8235614da881613d79565b81526020830135614db881613d79565b6020820152614dca8460408501614705565b60408201529392505050565b600082601f830112614de757600080fd5b81516020614df76142ab83614267565b8083825260208201915060208460051b870101935086841115614e1957600080fd5b602086015b848110156142ee578051614e3181613d79565b8352918301918301614e1e565b600080600060608486031215614e5357600080fd5b83516001600160401b0380821115614e6a57600080fd5b614e7687838801614dd6565b9450602091508186015181811115614e8d57600080fd5b614e9988828901614dd6565b945050604086015181811115614eae57600080fd5b86019050601f81018713614ec157600080fd5b8051614ecf6142ab82614267565b81815260059190911b82018301908381019089831115614eee57600080fd5b928401925b82841015614f275783516bffffffffffffffffffffffff81168114614f185760008081fd5b82529284019290840190614ef3565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f6e816017850160208801614553565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614f9f816028840160208801614553565b01602801949350505050565b602081526000610f096020830184614577565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614c1d90830184614577565b60a081016150068286613fd6565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161503757615037614924565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0385168152836020820152826040820152608060608201526000614035608083018461457756fea2646970667358221220f2c96cbb22626006ee11ff90975b91b23886e548ed7a61504409d1948b356f0f64736f6c63430008170033", + "chainId": 2021, + "contractAbsolutePath": "RoninGatewayV3.sol", + "deployedBytecode": "0x6080604052600436106102975760003560e01c80638456cb591161015a578063ca15c873116100c1578063ecc836491161007a578063ecc836491461089f578063f0ce418e146108cc578063f23a6e6114610912578063f668214a1461093e578063fa3896591461095e578063fc6574bc1461097e576102a6565b8063ca15c873146107e7578063d547741f14610807578063dafae40814610827578063dbd2ef6c14610847578063de981f1b14610867578063e75235b814610887576102a6565b8063affed0e011610113578063affed0e0146106e5578063b9afa177146106fb578063b9c362091461071b578063bc197c811461073b578063bc7f038614610774578063c28f7894146107a1576102a6565b80638456cb591461063b578063865e6fd3146106505780639010d07c1461067057806391d14854146106905780639584a592146106b0578063a217fddf146106d0576102a6565b80633f4ba83a116101fe5780635d6a9a90116101b75780635d6a9a901461057257806364363f781461059f57806371706cbe146105bf57806375535f86146105d55780637de5dedd146105f5578063835fc6ca1461060a576102a6565b80633f4ba83a1461048f57806347b56b2c146104a45780634d92c4f0146104c45780635a7dd06a146105255780635c975abb146105455780635cd8a76b1461055d576102a6565b8063248a9ca311610250578063248a9ca3146103b15780632f2ff15d146103ef5780633101cfcb1461040f57806336568abe1461042f5780633e4574ec1461044f5780633e70838b1461046f576102a6565b806301ffc9a7146102ae578063065b3adf146102e35780630b1ff17f1461031b578063109679ef1461033b57806317892f961461035b57806317fa2ea114610384576102a6565b366102a6576102a46109d0565b005b6102a46109d0565b3480156102ba57600080fd5b506102ce6102c9366004613c2d565b6109e9565b60405190151581526020015b60405180910390f35b3480156102ef57600080fd5b50600554610303906001600160a01b031681565b6040516001600160a01b0390911681526020016102da565b34801561032757600080fd5b506102a4610336366004613c57565b610a09565b34801561034757600080fd5b506102a4610356366004613c88565b610a20565b34801561036757600080fd5b506078546079545b604080519283526020830191909152016102da565b34801561039057600080fd5b506103a461039f366004613ce5565b610a53565b6040516102da9190613d26565b3480156103bd57600080fd5b506103e16103cc366004613d60565b6000908152606b602052604090206001015490565b6040519081526020016102da565b3480156103fb57600080fd5b506102a461040a366004613d99565b610d90565b34801561041b57600080fd5b506102a461042a366004613dc9565b610dba565b34801561043b57600080fd5b506102a461044a366004613d99565b610e66565b34801561045b57600080fd5b506102ce61046a366004613d99565b610ee0565b34801561047b57600080fd5b506102a461048a366004613dc9565b610f10565b34801561049b57600080fd5b506102a4610f3a565b3480156104b057600080fd5b506102a46104bf366004613d60565b610f4c565b3480156104d057600080fd5b506105156104df366004613de6565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b6040516102da9493929190613e1e565b34801561053157600080fd5b506102a4610540366004613e4e565b611117565b34801561055157600080fd5b5060005460ff166102ce565b34801561056957600080fd5b506102a461117e565b34801561057e57600080fd5b5061059261058d366004613ec8565b611280565b6040516102da9190613f04565b3480156105ab57600080fd5b506102a46105ba366004613f30565b611324565b3480156105cb57600080fd5b506103e1606e5481565b3480156105e157600080fd5b5061036f6105f0366004613de6565b611360565b34801561060157600080fd5b506103e1611381565b34801561061657600080fd5b5061062a610625366004613d60565b611398565b6040516102da959493929190613ff8565b34801561064757600080fd5b506102a461146a565b34801561065c57600080fd5b506102a461066b36600461404e565b61147a565b34801561067c57600080fd5b5061030361068b366004613de6565b611495565b34801561069c57600080fd5b506102ce6106ab366004613d99565b6114ad565b3480156106bc57600080fd5b506102a46106cb36600461408b565b6114d8565b3480156106dc57600080fd5b506103e1600081565b3480156106f157600080fd5b506103e160045481565b34801561070757600080fd5b506103a4610716366004614184565b611625565b34801561072757600080fd5b506102a4610736366004613de6565b611743565b34801561074757600080fd5b50610767610756366004614368565b63bc197c8160e01b95945050505050565b6040516102da9190614415565b34801561078057600080fd5b506103e161078f366004613dc9565b60386020526000908152604090205481565b3480156107ad57600080fd5b506105156107bc366004613d60565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156107f357600080fd5b506103e1610802366004613d60565b611755565b34801561081357600080fd5b506102a4610822366004613d99565b61176c565b34801561083357600080fd5b506102ce610842366004613d60565b611791565b34801561085357600080fd5b506102a461086236600461442a565b6117bd565b34801561087357600080fd5b506103036108823660046144ed565b61180f565b34801561089357600080fd5b5060015460025461036f565b3480156108ab57600080fd5b506108bf6108ba366004614508565b61188a565b6040516102da91906145a3565b3480156108d857600080fd5b506105156108e7366004613d60565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561091e57600080fd5b5061076761092d366004614607565b63f23a6e6160e01b95945050505050565b34801561094a57600080fd5b506102ce610959366004613d60565b6119f1565b34801561096a57600080fd5b506102a4610979366004613f30565b611a1f565b34801561098a57600080fd5b506102ce61099936600461466f565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b60006109f482611c1a565b80610a035750610a0382611c3f565b92915050565b610a11611c64565b610a1c823383611caa565b5050565b610a28611c64565b610a30611d79565b610a50610a4236839003830183614746565b33610a4b611381565b611e1a565b50565b6060610a5d611d79565b336000610a68611381565b9050600084806001600160401b03811115610a8557610a856141f9565b604051908082528060200260200182016040528015610aae578160200160208202803683370190505b5094506000610abd600361180f565b905060005b82811015610d8457888882818110610adc57610adc6147d7565b905060200201359350816001600160a01b031663c7c4fea9600286896040518463ffffffff1660e01b8152600401610b16939291906147ed565b600060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b50505050610b51846119f1565b15610b7b576001878281518110610b6a57610b6a6147d7565b911515602092830291909101909101525b600084815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610bc257610bc2613e08565b6001811115610bd357610bd3613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff1690811115610c6b57610c6b613e08565b6002811115610c7c57610c7c613e08565b81526001820154602082015260029091015460409091015290525090506000610ca482612121565b90506000610cb4848b8b856121eb565b90506001816004811115610cca57610cca613e08565b03610d7557835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d0991908c90600401614817565b600060405180830381600087803b158015610d2357600080fd5b505af1158015610d37573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610d6c92919061482e565b60405180910390a15b50505050806001019050610ac2565b50505050505092915050565b6000828152606b6020526040902060010154610dab8161221e565b610db58383612228565b505050565b603754600390610100900460ff16158015610ddc575060375460ff8083169116105b610e015760405162461bcd60e51b8152600401610df89061488d565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e20600b8361224a565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610ed65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610df8565b610a1c82826122ee565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f18612310565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610f4261236a565b610f4a6123d9565b565b610f54611c64565b610f5d816119f1565b15610f7b576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff1690811115610fba57610fba613e08565b6001811115610fcb57610fcb613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff169081111561106357611063613e08565b600281111561107457611074613e08565b8152600182015460208201526002909101546040918201529152606083015101519192505046146110de576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61110882612121565b82604051610e5a92919061482e565b61111f611c64565b816000819003611142576040516316ee9d3b60e11b815260040160405180910390fd5b60005b818110156111775761116f858583818110611162576111626147d7565b905060a002013385611caa565b600101611145565b5050505050565b603754600290610100900460ff161580156111a0575060375460ff8083169116105b6111bc5760405162461bcd60e51b8152600401610df89061488d565b6037805461ffff191660ff8316176101001790556074546111e8906008906001600160a01b031661224a565b607554611200906003906001600160a01b031661224a565b60775461121890600a906001600160a01b031661224a565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660028111156112d4576112d4613e08565b60028111156112e5576112e5613e08565b815290546001600160a01b0361010090910481166020928301529082015191925016610a0357604051631b79f53b60e21b815260040160405180910390fd5b61132c612310565b600083900361134e576040516316ee9d3b60e11b815260040160405180910390fd5b61135a8484848461242b565b50505050565b60008061136b612310565b611375848461250e565b915091505b9250929050565b600061139361138e612598565b612605565b905090565b607160209081526000918252604091829020805460018201548451606080820187526002808601546001600160a01b03908116845260038701548116848901526004870154848a015288518084018a526005880154821681526006880154909116978101979097526007860154878901528751918201909752600885018054949760ff94851697939693959394929391928492169081111561143c5761143c613e08565b600281111561144d5761144d613e08565b815260200160018201548152602001600282015481525050905085565b61147261236a565b610f4a61263b565b611482612310565b61148b81612678565b610a1c828261224a565b6000828152606c60205260408120610f0990836126ae565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff16158080156114f85750603754600160ff909116105b806115125750303b158015611512575060375460ff166001145b61152e5760405162461bcd60e51b8152600401610df89061488d565b6037805460ff191660011790558015611551576037805461ff0019166101001790555b61155c60008d6126ba565b6115668b8b6126c4565b611570898961250e565b506000905061157f86806148db565b905011156115d1576115b261159486806148db565b6115a160208901896148db565b6115ab89806148db565b8989612754565b6115d16115bf86806148db565b6115cc60208801886148db565b61242b565b8015611617576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b606061162f611c64565b611637611d79565b81806001600160401b03811115611650576116506141f9565b604051908082528060200260200182016040528015611679578160200160208202803683370190505b5091506000611686611381565b9050611690613bc0565b60005b83811015611739578686828181106116ad576116ad6147d7565b905061016002018036038101906116c49190614746565b915060026040808401518101516000908152606f6020908152828220865183529052205460ff1660048111156116fc576116fc613e08565b03611726576001858281518110611715576117156147d7565b911515602092830291909101909101525b611731823385611e1a565b600101611693565b5050505092915050565b61174b612310565b610a1c82826126c4565b6000818152606c60205260408120610a0390612970565b6000828152606b60205260409020600101546117878161221e565b610db583836122ee565b600061179b612598565b6001546117a8919061493a565b6002546117b5908461493a565b101592915050565b6117c5612310565b60008790036117f5576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6118058888888888888888612754565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561184657611846613e08565b60ff1681526020810191909152604001600020546001600160a01b0316905080611885578160405163409140df60e11b8152600401610df89190614951565b919050565b6060816001600160401b038111156118a4576118a46141f9565b6040519080825280602002602001820160405280156118d757816020015b60608152602001906001900390816118c25790505b50905060005b828110156119e957600085815260726020526040812090858584818110611906576119066147d7565b905060200201602081019061191b9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002080546119469061496b565b80601f01602080910402602001604051908101604052809291908181526020018280546119729061496b565b80156119bf5780601f10611994576101008083540402835291602001916119bf565b820191906000526020600020905b8154815290600101906020018083116119a257829003601f168201915b50505050508282815181106119d6576119d66147d7565b60209081029190910101526001016118dd565b509392505050565b6000600260008381526070602052604090205460ff166004811115611a1857611a18613e08565b1492915050565b611a27611c64565b611a2f611d79565b33838015801590611a3f57508083145b611a6a576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6000611a74611381565b9050600080611a83600361180f565b905060005b84811015611c0e57898982818110611aa257611aa26147d7565b905060200201359250878782818110611abd57611abd6147d7565b9050602002810190611acf919061499f565b60008581526072602090815260408083206001600160a01b038c168452909152902091611afd919083614a35565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611b2f9060019087908b906004016147ed565b600060405180830381600087803b158015611b4957600080fd5b505af1158015611b5d573d6000803e3d6000fd5b50505060008481526076602052604081209150611b7c828988886121eb565b90506001816004811115611b9257611b92613e08565b03611c0457815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611bd1906001908990600401614817565b600060405180830381600087803b158015611beb57600080fd5b505af1158015611bff573d6000803e3d6000fd5b505050505b5050600101611a88565b50505050505050505050565b60006001600160e01b03198216635a05180f60e01b1480610a035750610a038261297a565b60006001600160e01b03198216630271189760e51b1480610a035750610a0382611c1a565b60005460ff1615610f4a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610df8565b611cc4611cbf36859003850160408601614af4565b6129af565b611ccd836129f3565b6000611ce8611ce26040860160208701613dc9565b83611280565b80519091506002811115611cfe57611cfe613e08565b611d0e6060860160408701614b10565b6002811115611d1f57611d1f613e08565b14611d3c5760405162035e2b60ea1b815260040160405180910390fd5b611d6983611d506040870160208801613dc9565b611d6236889003880160408901614af4565b9190612a71565b6111778483858460200151612bfc565b611d83600b61180f565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ded9190614b2b565b610f4a576000356001600160e01b0319166006604051620f948f60ea1b8152600401610df8929190614b4d565b82516080840151611e2a906129af565b600084602001516001811115611e4257611e42613e08565b14611e605760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611eae576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b6000611eca856060015160200151866040015160400151611280565b6080860151519091506002811115611ee457611ee4613e08565b81516002811115611ef757611ef7613e08565b148015611f2157508460400151602001516001600160a01b031681602001516001600160a01b0316145b611f3e5760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f6020908152828220858352905290812090611f6887612121565b90506000611f78838888856121eb565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b645985604051611fbf91815260200190565b60405180910390a46000611fd3600361180f565b90506001826004811115611fe957611fe9613e08565b036120b357835460ff191660021784556060890151805160209091015160808b01516120189290916000612d8e565b885160405163114fc47560e11b81526001600160a01b0383169163229f88ea9161204791600091600401614817565b600060405180830381600087803b15801561206157600080fd5b505af1158015612075573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524838a6040516120aa92919061482e565b60405180910390a15b885160405163c7c4fea960e01b81526001600160a01b0383169163c7c4fea9916120e4916000918d906004016147ed565b600060405180830381600087803b1580156120fe57600080fd5b505af1158015612112573d6000803e3d6000fd5b50505050505050505050505050565b6000806121318360400151612fa7565b905060006121428460600151612fa7565b905060006121968560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b60006121f8858584612fef565b600061220486846130a5565b9050612212868583866131a9565b9150505b949350505050565b610a5081336131f5565b6122328282613259565b6000828152606c60205260409020610db590826132df565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561228057612280613e08565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156122c1576122c1613e08565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6122f882826132f4565b6000828152606c60205260409020610db5908261335b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806123ac57506005546001600160a01b031633145b610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b6123e1613370565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b828114612459576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b838110156124ca57828282818110612476576124766147d7565b9050602002013560386000878785818110612493576124936147d7565b90506020020160208101906124a89190613dc9565b6001600160a01b0316815260208101919091526040016000205560010161245c565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da848484846040516125009493929190614bf6565b60405180910390a150505050565b600080828411156125325760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba910160405180910390a49250929050565b60006125a4600b61180f565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113939190614c28565b600060025460016002548460015461261d919061493a565b6126279190614c41565b6126319190614c54565b610a039190614c67565b612643611c64565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861240e3390565b806001600160a01b03163b600003610a5057604051630bfc64a360e21b81526001600160a01b0382166004820152602401610df8565b6000610f0983836133b9565b610a1c8282612228565b808211156126f3576000356001600160e01b0319166040516387f6f09560e01b8152600401610df89190614415565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b868514801561276257508683145b61278d576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b87811015612920578686828181106127aa576127aa6147d7565b90506020020160208101906127bf9190613dc9565b607360008b8b858181106127d5576127d56147d7565b90506020020160208101906127ea9190613dc9565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087878581811061281e5761281e6147d7565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555082828281811061286c5761286c6147d7565b90506020020160208101906128819190614b10565b607360008b8b85818110612897576128976147d7565b90506020020160208101906128ac9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008787858181106128e0576128e06147d7565b60209081029290920135835250810191909152604001600020805460ff1916600183600281111561291357612913613e08565b0217905550600101612790565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401888888888888888860405161295e989796959493929190614c89565b60405180910390a15050505050505050565b6000610a03825490565b60006001600160e01b03198216637965db0b60e01b1480610a0357506301ffc9a760e01b6001600160e01b0319831614610a03565b6129b8816133e3565b806129c757506129c78161341a565b806129d657506129d681613442565b610a505760405163034992a760e51b815260040160405180910390fd5b6000612a056060830160408401614b10565b6002811115612a1657612a16613e08565b148015612a53575060386000612a326040840160208501613dc9565b6001600160a01b031681526020810191909152604001600020546080820135105b15610a5057604051636eff4a8560e11b815260040160405180910390fd5b600060608185516002811115612a8957612a89613e08565b03612b645760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612af09190614d18565b6000604051808303816000865af19150503d8060008114612b2d576040519150601f19603f3d011682016040523d82523d6000602084013e612b32565b606091505b509092509050818015612b5d575080511580612b5d575080806020019051810190612b5d9190614b2b565b9150612bd6565b600185516002811115612b7957612b79613e08565b03612b8e57612b5d838530886020015161346b565b600285516002811115612ba357612ba3613e08565b03612bbd57612b5d83853088602001518960400151613519565b6040516361e411a760e11b815260040160405180910390fd5b816111775784843085604051639d2e4c6760e01b8152600401610df89493929190614d34565b606e805460009182612c0d83614d6a565b9091555090506000612c3484838588612c2b368c90038c018c614d83565b939291906135cd565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612c7357612c73613e08565b02179055506040828101518051600280850180546001600160a01b039384166001600160a01b03199182161790915560208085015160038801805491861691841691909117905593850151600487015560608701518051600588018054918616918416919091179055938401516006870180549190941691161790915591015160078301556080830151805160088401805492939092839160ff19909116906001908490811115612d2657612d26613e08565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612d6e82612121565b82604051612d7d92919061482e565b60405180910390a150949350505050565b806001600160a01b0316826001600160a01b031603612e3b5760408085015190516001600160a01b0385169180156108fc02916000818181858888f19350505050612e3657806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e1257600080fd5b505af1158015612e26573d6000803e3d6000fd5b5050505050612e36848484613639565b61135a565b600084516002811115612e5057612e50613e08565b03612f16576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015612e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec09190614c28565b90508460400151811015612f0557612ee88330838860400151612ee39190614c54565b6136b8565b612f0557604051632f739fff60e11b815260040160405180910390fd5b612f10858585613639565b5061135a565b600184516002811115612f2b57612f2b613e08565b03612f5c57612f3f8284866020015161375d565b612e365760405163c8e3a09f60e01b815260040160405180910390fd5b600284516002811115612f7157612f71613e08565b03612bbd57612f8a828486602001518760400151613784565b612e36576040516334b471a760e21b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b60008360030154118015613007575042836003015411155b1561301857825460ff191660041783555b6001600160a01b03821660009081526002840160205260409020541561305c5760405163025fd59560e41b81526001600160a01b0383166004820152602401610df8565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b60008060006130b4600b61180f565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa1580156130f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131199190810190614e3e565b81519194509250905060005b818110156117395785876002016000868481518110613146576131466147d7565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036131a157828181518110613186576131866147d7565b60200260200101516bffffffffffffffffffffffff16850194505b600101613125565b60008383101580156131d057506000855460ff1660048111156131ce576131ce613e08565b145b156131e857845460ff19166001908117865585018290555b5050915460ff1692915050565b6131ff82826114ad565b610a1c57613217816001600160a01b031660146137ad565b6132228360206137ad565b604051602001613233929190614f36565b60408051601f198184030181529082905262461bcd60e51b8252610df891600401614fab565b61326382826114ad565b610a1c576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561329b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f09836001600160a01b038416613948565b6132fe82826114ad565b15610a1c576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f09836001600160a01b038416613997565b60005460ff16610f4a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610df8565b60008260000182815481106133d0576133d06147d7565b9060005260206000200154905092915050565b600080825160028111156133f9576133f9613e08565b14801561340a575060008260400151115b8015610a03575050602001511590565b600060018251600281111561343157613431613e08565b148015610a03575050604001511590565b600060028251600281111561345957613459613e08565b148015610a0357505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928716916134cb91614d18565b6000604051808303816000865af19150503d8060008114613508576040519150601f19603f3d011682016040523d82523d6000602084013e61350d565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b0387169061354990879087908790879060448101614fbe565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b1790525161357e9190614d18565b6000604051808303816000865af19150503d80600081146135bb576040519150601f19603f3d011682016040523d82523d6000602084013e6135c0565b606091505b5090979650505050505050565b6135d5613bc0565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b6000808451600281111561364f5761364f613e08565b0361366a5761366382848660400151613a8a565b9050613694565b60018451600281111561367f5761367f613e08565b03612bbd57613663823085876020015161346b565b8061135a578383836040516341bd7d9160e11b8152600401610df893929190614ff8565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b179052915160009286169161371091614d18565b6000604051808303816000865af19150503d806000811461374d576040519150601f19603f3d011682016040523d82523d6000602084013e613752565b606091505b509095945050505050565b600061376b8430858561346b565b905080610f095761377d8484846136b8565b9050610f09565b60006137938530868686613519565b905080612216576137a685858585613b5d565b9050612216565b606060006137bc83600261493a565b6137c7906002614c41565b6001600160401b038111156137de576137de6141f9565b6040519080825280601f01601f191660200182016040528015613808576020820181803683370190505b509050600360fc1b81600081518110613823576138236147d7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613852576138526147d7565b60200101906001600160f81b031916908160001a905350600061387684600261493a565b613881906001614c41565b90505b60018111156138f9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106138b5576138b56147d7565b1a60f81b8282815181106138cb576138cb6147d7565b60200101906001600160f81b031916908160001a90535060049490941c936138f281615028565b9050613884565b508315610f095760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610df8565b600081815260018301602052604081205461398f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a03565b506000610a03565b60008181526001830160205260408120548015613a805760006139bb600183614c54565b85549091506000906139cf90600190614c54565b9050818114613a345760008660000182815481106139ef576139ef6147d7565b9060005260206000200154905080876000018481548110613a1257613a126147d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613a4557613a4561503f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a03565b6000915050610a03565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613ae79190614d18565b6000604051808303816000865af19150503d8060008114613b24576040519150601f19603f3d011682016040523d82523d6000602084013e613b29565b606091505b509092509050818015613b54575080511580613b54575080806020019051810190613b549190614b2b565b95945050505050565b604080516000808252602082019092526001600160a01b03861690613b8b9086908690869060448101615055565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b179052516134cb9190614d18565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613c3f57600080fd5b81356001600160e01b031981168114610f0957600080fd5b60008082840360c0811215613c6b57600080fd5b60a0811215613c7957600080fd5b50919360a08501359350915050565b60006101608284031215613c9b57600080fd5b50919050565b60008083601f840112613cb357600080fd5b5081356001600160401b03811115613cca57600080fd5b6020830191508360208260051b850101111561137a57600080fd5b60008060208385031215613cf857600080fd5b82356001600160401b03811115613d0e57600080fd5b613d1a85828601613ca1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561350d578351151583529284019291840191600101613d42565b600060208284031215613d7257600080fd5b5035919050565b6001600160a01b0381168114610a5057600080fd5b803561188581613d79565b60008060408385031215613dac57600080fd5b823591506020830135613dbe81613d79565b809150509250929050565b600060208284031215613ddb57600080fd5b8135610f0981613d79565b60008060408385031215613df957600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6080810160058610613e3257613e32613e08565b9481526020810193909352604083019190915260609091015290565b600080600060408486031215613e6357600080fd5b83356001600160401b0380821115613e7a57600080fd5b818601915086601f830112613e8e57600080fd5b813581811115613e9d57600080fd5b87602060a083028501011115613eb257600080fd5b6020928301989097509590910135949350505050565b60008060408385031215613edb57600080fd5b8235613ee681613d79565b946020939093013593505050565b60038110610a5057610a50613e08565b81516040820190613f1481613ef4565b82526020928301516001600160a01b0316929091019190915290565b60008060008060408587031215613f4657600080fd5b84356001600160401b0380821115613f5d57600080fd5b613f6988838901613ca1565b90965094506020870135915080821115613f8257600080fd5b50613f8f87828801613ca1565b95989497509550505050565b60028110613fab57613fab613e08565b9052565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b8051613fe181613ef4565b825260208181015190830152604090810151910152565b858152610160810161400d6020830187613f9b565b61401a6040830186613faf565b61402760a0830185613faf565b614035610100830184613fd6565b9695505050505050565b80356010811061188557600080fd5b6000806040838503121561406157600080fd5b61406a8361403f565b91506020830135613dbe81613d79565b8060408101831015610a0357600080fd5b60008060008060008060008060008060006101208c8e0312156140ad57600080fd5b6140b68c613d8e565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e013511156140ed57600080fd5b6140fd8e60a08f01358f01613ca1565b909750955060c08d013581101561411357600080fd5b6141238e60c08f01358f0161407a565b94508060e08e0135111561413657600080fd5b6141468e60e08f01358f0161407a565b9350806101008e0135111561415a57600080fd5b5061416c8d6101008e01358e01613ca1565b81935080925050509295989b509295989b9093969950565b6000806020838503121561419757600080fd5b82356001600160401b03808211156141ae57600080fd5b818501915085601f8301126141c257600080fd5b8135818111156141d157600080fd5b866020610160830285010111156141e757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614231576142316141f9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561425f5761425f6141f9565b604052919050565b60006001600160401b03821115614280576142806141f9565b5060051b60200190565b600082601f83011261429b57600080fd5b813560206142b06142ab83614267565b614237565b8083825260208201915060208460051b8701019350868411156142d257600080fd5b602086015b848110156142ee57803583529183019183016142d7565b509695505050505050565b600082601f83011261430a57600080fd5b81356001600160401b03811115614323576143236141f9565b614336601f8201601f1916602001614237565b81815284602083860101111561434b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561438057600080fd5b853561438b81613d79565b9450602086013561439b81613d79565b935060408601356001600160401b03808211156143b757600080fd5b6143c389838a0161428a565b945060608801359150808211156143d957600080fd5b6143e589838a0161428a565b935060808801359150808211156143fb57600080fd5b50614408888289016142f9565b9150509295509295909350565b6001600160e01b031991909116815260200190565b6000806000806000806000806080898b03121561444657600080fd5b88356001600160401b038082111561445d57600080fd5b6144698c838d01613ca1565b909a50985060208b013591508082111561448257600080fd5b61448e8c838d01613ca1565b909850965060408b01359150808211156144a757600080fd5b6144b38c838d01613ca1565b909650945060608b01359150808211156144cc57600080fd5b506144d98b828c01613ca1565b999c989b5096995094979396929594505050565b6000602082840312156144ff57600080fd5b610f098261403f565b60008060006040848603121561451d57600080fd5b8335925060208401356001600160401b0381111561453a57600080fd5b61454686828701613ca1565b9497909650939450505050565b60005b8381101561456e578181015183820152602001614556565b50506000910152565b6000815180845261458f816020860160208601614553565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156145fa57603f198886030184526145e8858351614577565b945092850192908501906001016145cc565b5092979650505050505050565b600080600080600060a0868803121561461f57600080fd5b853561462a81613d79565b9450602086013561463a81613d79565b9350604086013592506060860135915060808601356001600160401b0381111561466357600080fd5b614408888289016142f9565b60008060006060848603121561468457600080fd5b8335925060208401359150604084013561469d81613d79565b809150509250925092565b6000606082840312156146ba57600080fd5b6146c261420f565b905081356146cf81613d79565b815260208201356146df81613d79565b806020830152506040820135604082015292915050565b80356003811061188557600080fd5b60006060828403121561471757600080fd5b61471f61420f565b905061472a826146f6565b8152602082013560208201526040820135604082015292915050565b6000610160828403121561475957600080fd5b60405160a081018181106001600160401b038211171561477b5761477b6141f9565b6040528235815260208301356002811061479457600080fd5b60208201526147a684604085016146a8565b60408201526147b88460a085016146a8565b60608201526147cb846101008501614705565b60808201529392505050565b634e487b7160e01b600052603260045260246000fd5b606081016147fa85613ef4565b93815260208101929092526001600160a01b031660409091015290565b6040810161482484613ef4565b9281526020015290565b6000610180820190508382528251602083015260208301516148536040840182613f9b565b5060408301516148666060840182613faf565b50606083015161487960c0840182613faf565b5060808301516119e9610120840182613fd6565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e198436030181126148f257600080fd5b8301803591506001600160401b0382111561490c57600080fd5b6020019150600581901b360382131561137a57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a0357610a03614924565b602081016010831061496557614965613e08565b91905290565b600181811c9082168061497f57607f821691505b602082108103613c9b57634e487b7160e01b600052602260045260246000fd5b6000808335601e198436030181126149b657600080fd5b8301803591506001600160401b038211156149d057600080fd5b60200191503681900382131561137a57600080fd5b601f821115610db5576000816000526020600020601f850160051c81016020861015614a0e5750805b601f850160051c820191505b81811015614a2d57828155600101614a1a565b505050505050565b6001600160401b03831115614a4c57614a4c6141f9565b614a6083614a5a835461496b565b836149e5565b6000601f841160018114614a945760008515614a7c5750838201355b600019600387901b1c1916600186901b178355611177565b600083815260209020601f19861690835b82811015614ac55786850135825560209485019460019092019101614aa5565b5086821015614ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060608284031215614b0657600080fd5b610f098383614705565b600060208284031215614b2257600080fd5b610f09826146f6565b600060208284031215614b3d57600080fd5b81518015158114610f0957600080fd5b6001600160e01b03198316815260408101600b8310614b6e57614b6e613e08565b8260208301529392505050565b8183526000602080850194508260005b85811015614bb9578135614b9e81613d79565b6001600160a01b031687529582019590820190600101614b8b565b509495945050505050565b81835260006001600160fb1b03831115614bdd57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000614c0a604083018688614b7b565b8281036020840152614c1d818587614bc4565b979650505050505050565b600060208284031215614c3a57600080fd5b5051919050565b80820180821115610a0357610a03614924565b81810381811115610a0357610a03614924565b600082614c8457634e487b7160e01b600052601260045260246000fd5b500490565b608081526000614c9d608083018a8c614b7b565b60208382036020850152614cb2828a8c614b7b565b91508382036040850152614cc782888a614bc4565b848103606086015285815286925060200160005b86811015614d0757614cec846146f6565b614cf581613ef4565b82529282019290820190600101614cdb565b509c9b505050505050505050505050565b60008251614d2a818460208701614553565b9190910192915050565b60c08101614d428287613fd6565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b600060018201614d7c57614d7c614924565b5060010190565b600060a08284031215614d9557600080fd5b614d9d61420f565b8235614da881613d79565b81526020830135614db881613d79565b6020820152614dca8460408501614705565b60408201529392505050565b600082601f830112614de757600080fd5b81516020614df76142ab83614267565b8083825260208201915060208460051b870101935086841115614e1957600080fd5b602086015b848110156142ee578051614e3181613d79565b8352918301918301614e1e565b600080600060608486031215614e5357600080fd5b83516001600160401b0380821115614e6a57600080fd5b614e7687838801614dd6565b9450602091508186015181811115614e8d57600080fd5b614e9988828901614dd6565b945050604086015181811115614eae57600080fd5b86019050601f81018713614ec157600080fd5b8051614ecf6142ab82614267565b81815260059190911b82018301908381019089831115614eee57600080fd5b928401925b82841015614f275783516bffffffffffffffffffffffff81168114614f185760008081fd5b82529284019290840190614ef3565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f6e816017850160208801614553565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614f9f816028840160208801614553565b01602801949350505050565b602081526000610f096020830184614577565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614c1d90830184614577565b60a081016150068286613fd6565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161503757615037614924565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0385168152836020820152826040820152608060608201526000614035608083018461457756fea2646970667358221220f2c96cbb22626006ee11ff90975b91b23886e548ed7a61504409d1948b356f0f64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "bulkRequestWithdrawalFor((address,address,(uint8,uint256,uint256))[],uint256)": { + "details": "Bulk requests withdrawals. Emits the `WithdrawalRequested` events." + }, + "bulkSubmitWithdrawalSignatures(uint256[],bytes[])": { + "details": "Submits withdrawal signatures. Requirements: - The method caller is a validator." + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Deposits based on the receipt. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released." + }, + "depositVoted(uint256,uint256,address)": { + "details": "Returns whether the deposit is casted by the voter." + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getMainchainToken(address,uint256)": { + "details": "Returns mainchain token address. Reverts for unsupported token." + }, + "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." + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTrustedThreshold()": { + "details": "Returns the threshold about trusted org." + }, + "getWithdrawalSignatures(uint256,address[])": { + "details": "Returns withdrawal signatures." + }, + "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. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,uint256,uint256,uint256,uint256,address[],address[][2],uint256[][2],uint8[])": { + "details": "Initializes contract storage." + }, + "mainchainWithdrew(uint256)": { + "details": "Returns whether the withdrawal is done on mainchain." + }, + "mainchainWithdrewVoted(uint256,address)": { + "details": "Returns whether the mainchain withdrew is casted by the voter." + }, + "mapTokens(address[],address[],uint256[],uint8[])": { + "details": "Maps Ronin tokens to mainchain networks. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "pause()": { + "details": "Triggers paused state." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "requestWithdrawalFor((address,address,(uint8,uint256,uint256)),uint256)": { + "details": "Locks the assets and request withdrawal. Emits the `WithdrawalRequested` event." + }, + "requestWithdrawalSignatures(uint256)": { + "details": "Requests withdrawal signatures for a specific withdrawal. Emits the `WithdrawalSignaturesRequested` event." + }, + "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. May emit a {RoleRevoked} event." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setEmergencyPauser(address)": { + "details": "Grant emergency pauser role for `_addr`." + }, + "setMinimumThresholds(address[],uint256[])": { + "details": "Sets the minimum thresholds to withdraw. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `MinimumThresholdsUpdated` event." + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "tryBulkAcknowledgeMainchainWithdrew(uint256[])": { + "details": "Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal vote is already done before. Requirements: - The method caller is a validator. Emits the `MainchainWithdrew` once the valid call passes the quorum threshold." + }, + "tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])": { + "details": "Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote is already done before. Reverts if the deposit is invalid or is voted by the validator again. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released." + }, + "unpause()": { + "details": "Triggers unpaused state." + } + }, + "events": { + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "DepositVoted(address,uint256,uint256,bytes32)": { + "details": "Emitted when a deposit is voted" + }, + "Deposited(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the assets are depositted" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MainchainWithdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the assets are withdrawn on mainchain" + }, + "MinimumThresholdsUpdated(address[],uint256[])": { + "details": "Emitted when the minimum thresholds are updated" + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + }, + "TokenMapped(address[],address[],uint256[],uint8[])": { + "details": "Emitted when the tokens are mapped" + }, + "TrustedThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + }, + "WithdrawalRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the withdrawal is requested" + }, + "WithdrawalSignaturesRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the withdrawal signatures is requested" + } + }, + "errors": { + "ErrAlreadyVoted(address)": [ + { + "details": "Error indicating that a voter has already voted.", + "params": { + "voter": "The address of the voter who has already voted." + } + } + ], + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrERC1155MintingFailed()": [ + { + "details": "Error indicating that the mint of ERC1155 tokens has failed." + } + ], + "ErrERC20MintingFailed()": [ + { + "details": "Error indicating that the minting of ERC20 tokens has failed." + } + ], + "ErrERC721MintingFailed()": [ + { + "details": "Error indicating that the minting of ERC721 tokens has failed." + } + ], + "ErrEmptyArray()": [ + { + "details": "Error indicating that an array is empty when it should contain elements." + } + ], + "ErrInvalidChainId(bytes4,uint256,uint256)": [ + { + "details": "Error indicating that the chain ID is invalid.", + "params": { + "actual": "Current chain ID that executing function.", + "expected": "Expected chain ID required for the tx to success.", + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." + } + } + ], + "ErrInvalidInfo()": [ + { + "details": "Error indicating that the provided information is invalid." + } + ], + "ErrInvalidReceipt()": [ + { + "details": "Error indicating that a receipt is invalid." + } + ], + "ErrInvalidReceiptKind()": [ + { + "details": "Error indicating that a receipt kind is invalid." + } + ], + "ErrInvalidRequest()": [ + { + "details": "Error indicating that a request is invalid." + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidTokenStandard()": [ + { + "details": "Error indicating that a token standard is invalid." + } + ], + "ErrInvalidTrustedThreshold()": [ + { + "details": "Error thrown when an invalid trusted threshold is specified." + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrQueryForTooSmallQuantity()": [ + { + "details": "Throwed when the ERC20 withdrawal quantity is less than the minimum threshold." + } + ], + "ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)": [ + { + "details": "Error indicating that the `transfer` has failed.", + "params": { + "to": "Receiver of the token value.", + "token": "Address of the token.", + "tokenInfo": "Info of the token including ERC standard, id or quantity." + } + } + ], + "ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)": [ + { + "details": "Error indicating that the `handleAssetIn` has failed.", + "params": { + "from": "Owner of the token value.", + "to": "Receiver of the token value.", + "token": "Address of the token.", + "tokenInfo": "Info of the token including ERC standard, id or quantity." + } + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedStandard()": [ + { + "details": "Error indicating that an unsupported standard is encountered." + } + ], + "ErrUnsupportedToken()": [ + { + "details": "Error indicating that a token is not supported." + } + ], + "ErrWithdrawalsMigrated()": [ + { + "details": "Error thrown when attempting to withdraw funds that have already been migrated." + } + ], + "ErrWithdrawnOnMainchainAlready()": [ + { + "details": "Error thrown when attempting to withdraw funds that have already been withdrawn on the mainchain." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"ErrAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC1155MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTrustedThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForTooSmallQuantity\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrWithdrawalsMigrated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrWithdrawnOnMainchainAlready\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"}],\"name\":\"DepositVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"MainchainWithdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"threshold\",\"type\":\"uint256[]\"}],\"name\":\"MinimumThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"enum TokenStandard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"TrustedThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"WithdrawalRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"WithdrawalSignaturesRequested\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request[]\",\"name\":\"requests\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"bulkRequestWithdrawalFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"withdrawals\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"bulkSubmitWithdrawalSignatures\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"}],\"name\":\"depositFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"depositVote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"finalHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiredAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"depositVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roninToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"}],\"name\":\"getMainchainToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"_token\",\"type\":\"tuple\"}],\"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\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTrustedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"trustedNum_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"trustedDenom_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"withdrawalId\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"getWithdrawalSignatures\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_signatures\",\"type\":\"bytes[]\"}],\"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\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_trustedNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_trustedDenominator\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"address[][2]\",\"name\":\"_packedAddresses\",\"type\":\"address[][2]\"},{\"internalType\":\"uint256[][2]\",\"name\":\"_packedNumbers\",\"type\":\"uint256[][2]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeAdmin\",\"type\":\"address\"}],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawalId\",\"type\":\"uint256\"}],\"name\":\"mainchainWithdrew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"mainchainWithdrewVote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"finalHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiredAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawalId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"mainchainWithdrewVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_chainIds\",\"type\":\"uint256[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"mainchainToken\",\"type\":\"address\"}],\"name\":\"minimumThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawalFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawalId\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawalSignatures\",\"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\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setMinimumThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_trustedNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_trustedDenominator\",\"type\":\"uint256\"}],\"name\":\"setTrustedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_withdrawalIds\",\"type\":\"uint256[]\"}],\"name\":\"tryBulkAcknowledgeMainchainWithdrew\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"_executedReceipts\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt[]\",\"name\":\"receipts\",\"type\":\"tuple[]\"}],\"name\":\"tryBulkDepositFor\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"_executedReceipts\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalStatVote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"finalHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiredAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrAlreadyVoted(address)\":[{\"details\":\"Error indicating that a voter has already voted.\",\"params\":{\"voter\":\"The address of the voter who has already voted.\"}}],\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC1155MintingFailed()\":[{\"details\":\"Error indicating that the mint of ERC1155 tokens has failed.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrInvalidTrustedThreshold()\":[{\"details\":\"Error thrown when an invalid trusted threshold is specified.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForTooSmallQuantity()\":[{\"details\":\"Throwed when the ERC20 withdrawal quantity is less than the minimum threshold.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `handleAssetIn` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrWithdrawalsMigrated()\":[{\"details\":\"Error thrown when attempting to withdraw funds that have already been migrated.\"}],\"ErrWithdrawnOnMainchainAlready()\":[{\"details\":\"Error thrown when attempting to withdraw funds that have already been withdrawn on the mainchain.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"DepositVoted(address,uint256,uint256,bytes32)\":{\"details\":\"Emitted when a deposit is voted\"},\"Deposited(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are depositted\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MainchainWithdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are withdrawn on mainchain\"},\"MinimumThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the minimum thresholds are updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"TokenMapped(address[],address[],uint256[],uint8[])\":{\"details\":\"Emitted when the tokens are mapped\"},\"TrustedThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawalRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is requested\"},\"WithdrawalSignaturesRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal signatures is requested\"}},\"kind\":\"dev\",\"methods\":{\"bulkRequestWithdrawalFor((address,address,(uint8,uint256,uint256))[],uint256)\":{\"details\":\"Bulk requests withdrawals. Emits the `WithdrawalRequested` events.\"},\"bulkSubmitWithdrawalSignatures(uint256[],bytes[])\":{\"details\":\"Submits withdrawal signatures. Requirements: - The method caller is a validator.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Deposits based on the receipt. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released.\"},\"depositVoted(uint256,uint256,address)\":{\"details\":\"Returns whether the deposit is casted by the voter.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getMainchainToken(address,uint256)\":{\"details\":\"Returns mainchain token address. Reverts for unsupported token.\"},\"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.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTrustedThreshold()\":{\"details\":\"Returns the threshold about trusted org.\"},\"getWithdrawalSignatures(uint256,address[])\":{\"details\":\"Returns withdrawal signatures.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,uint256,uint256,uint256,uint256,address[],address[][2],uint256[][2],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mainchainWithdrew(uint256)\":{\"details\":\"Returns whether the withdrawal is done on mainchain.\"},\"mainchainWithdrewVoted(uint256,address)\":{\"details\":\"Returns whether the mainchain withdrew is casted by the voter.\"},\"mapTokens(address[],address[],uint256[],uint8[])\":{\"details\":\"Maps Ronin tokens to mainchain networks. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestWithdrawalFor((address,address,(uint8,uint256,uint256)),uint256)\":{\"details\":\"Locks the assets and request withdrawal. Emits the `WithdrawalRequested` event.\"},\"requestWithdrawalSignatures(uint256)\":{\"details\":\"Requests withdrawal signatures for a specific withdrawal. Emits the `WithdrawalSignaturesRequested` event.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setMinimumThresholds(address[],uint256[])\":{\"details\":\"Sets the minimum thresholds to withdraw. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `MinimumThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"tryBulkAcknowledgeMainchainWithdrew(uint256[])\":{\"details\":\"Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal vote is already done before. Requirements: - The method caller is a validator. Emits the `MainchainWithdrew` once the valid call passes the quorum threshold.\"},\"tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])\":{\"details\":\"Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote is already done before. Reverts if the deposit is invalid or is voted by the validator again. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"____deprecated0\":{\"custom:deprecated\":\"Previously `_validatorContract` (non-zero value)\"},\"____deprecated1\":{\"custom:deprecated\":\"Previously `_bridgeTrackingContract` (non-zero value)\"},\"____deprecated2\":{\"custom:deprecated\":\"Previously `_trustedOrgContract` (non-zero value)\"},\"___deprecated4\":{\"custom:deprecated\":\"Previously `withdrawalMigrated` (non-zero value)\"},\"_mainchainToken\":{\"details\":\"Mapping from token address => chain id => mainchain token address\"},\"_withdrawalSig\":{\"details\":\"Mapping from withdrawal id => validator address => signatures\"},\"depositVote\":{\"details\":\"Mapping from chain id => deposit id => deposit vote\"},\"mainchainWithdrewVote\":{\"details\":\"Mapping from withdrawal id => mainchain withdrew vote\"},\"withdrawal\":{\"details\":\"Mapping from withdrawal id => withdrawal receipt\"},\"withdrawalCount\":{\"details\":\"Total withdrawal\"},\"withdrawalStatVote\":{\"details\":\"Mapping from withdrawal id => vote for recording withdrawal stats\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"notice\":\"The assets will be transferred whenever the valid call passes the quorum threshold.\"},\"tryBulkAcknowledgeMainchainWithdrew(uint256[])\":{\"notice\":\"Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\"},\"tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])\":{\"notice\":\"The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/RoninGatewayV3.sol\":\"RoninGatewayV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(\\n address account,\\n uint256 id,\\n uint256 value\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(\\n address account,\\n uint256[] memory ids,\\n uint256[] memory values\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../extensions/ERC1155Burnable.sol\\\";\\nimport \\\"../extensions/ERC1155Pausable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerable.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev {ERC1155} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n *\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\n */\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\n * deploys the contract.\\n */\\n constructor(string memory uri) ERC1155(uri) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\n *\\n * See {ERC1155-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mint(to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\n */\\n function mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControlEnumerable, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\n uint256 prevNum = _num;\\n uint256 prevDenom = _denom;\\n _num = num;\\n _denom = denom;\\n unchecked {\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\",\"license\":\"MIT\"},\"src/extensions/MinimumWithdrawal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\nabstract contract MinimumWithdrawal is HasProxyAdmin {\\n /// @dev Throwed when the ERC20 withdrawal quantity is less than the minimum threshold.\\n error ErrQueryForTooSmallQuantity();\\n\\n /// @dev Emitted when the minimum thresholds are updated\\n event MinimumThresholdsUpdated(address[] tokens, uint256[] threshold);\\n\\n /// @dev Mapping from mainchain token address => minimum thresholds\\n mapping(address mainchainToken => uint256) public minimumThreshold;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Sets the minimum thresholds to withdraw.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `MinimumThresholdsUpdated` event.\\n *\\n */\\n function setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setMinimumThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets minimum thresholds.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `MinimumThresholdsUpdated` event.\\n *\\n */\\n function _setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n minimumThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit MinimumThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Checks whether the request is larger than or equal to the minimum threshold.\\n */\\n function _checkWithdrawal(Transfer.Request calldata _request) internal view {\\n if (_request.info.erc == TokenStandard.ERC20 && _request.info.quantity < minimumThreshold[_request.tokenAddr]) {\\n revert ErrQueryForTooSmallQuantity();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x56a1e5650f8a9046d5afbc161ac9ffdb75cc2c9c4bea13325f2363abafee6985\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/IERC20Mintable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.2;\\n\\ninterface IERC20Mintable {\\n function mint(address _to, uint256 _value) external returns (bool _success);\\n}\\n\",\"keccak256\":\"0x6632cb3345e581a0b7868d6ce9a883f55d107576f9557f500a042c8285e51005\",\"license\":\"MIT\"},\"src/interfaces/IERC721Mintable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IERC721Mintable {\\n function mint(address _to, uint256 _tokenId) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4f001516a2596c79c205a9e28de092aa866eb440040e78b8be9027451028f169\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/IRoninGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\n\\ninterface IRoninGatewayV3 is MappedTokenConsumer {\\n /**\\n * @dev Error thrown when attempting to withdraw funds that have already been migrated.\\n */\\n error ErrWithdrawalsMigrated();\\n\\n /**\\n * @dev Error thrown when an invalid trusted threshold is specified.\\n */\\n error ErrInvalidTrustedThreshold();\\n\\n /**\\n * @dev Error thrown when attempting to withdraw funds that have already been withdrawn on the mainchain.\\n */\\n error ErrWithdrawnOnMainchainAlready();\\n\\n /// @dev Emitted when the assets are depositted\\n event Deposited(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is requested\\n event WithdrawalRequested(bytes32 receiptHash, Transfer.Receipt);\\n /// @dev Emitted when the assets are withdrawn on mainchain\\n event MainchainWithdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal signatures is requested\\n event WithdrawalSignaturesRequested(bytes32 receiptHash, Transfer.Receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, TokenStandard[] standards);\\n /// @dev Emitted when the threshold is updated\\n event TrustedThresholdUpdated(\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\n );\\n /// @dev Emitted when a deposit is voted\\n event DepositVoted(address indexed bridgeOperator, uint256 indexed id, uint256 indexed chainId, bytes32 receiptHash);\\n\\n /**\\n * @dev Returns withdrawal count.\\n */\\n function withdrawalCount() external view returns (uint256);\\n\\n /**\\n * @dev Returns withdrawal signatures.\\n */\\n function getWithdrawalSignatures(uint256 _withdrawalId, address[] calldata _validators) external view returns (bytes[] memory);\\n\\n /**\\n * @dev Deposits based on the receipt.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Deposited` once the assets are released.\\n *\\n * @notice The assets will be transferred whenever the valid call passes the quorum threshold.\\n *\\n */\\n function depositFor(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal\\n * vote is already done before.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `MainchainWithdrew` once the valid call passes the quorum threshold.\\n *\\n * @notice Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the\\n * same time.\\n *\\n */\\n function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external returns (bool[] memory);\\n\\n /**\\n * @dev Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote\\n * is already done before. Reverts if the deposit is invalid or is voted by the validator again.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Deposited` once the assets are released.\\n *\\n * @notice The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not\\n * reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\\n *\\n */\\n function tryBulkDepositFor(Transfer.Receipt[] calldata _receipts) external returns (bool[] memory);\\n\\n /**\\n * @dev Locks the assets and request withdrawal.\\n *\\n * Emits the `WithdrawalRequested` event.\\n *\\n */\\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external;\\n\\n /**\\n * @dev Bulk requests withdrawals.\\n *\\n * Emits the `WithdrawalRequested` events.\\n *\\n */\\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external;\\n\\n /**\\n * @dev Requests withdrawal signatures for a specific withdrawal.\\n *\\n * Emits the `WithdrawalSignaturesRequested` event.\\n *\\n */\\n function requestWithdrawalSignatures(uint256 _withdrawalId) external;\\n\\n /**\\n * @dev Submits withdrawal signatures.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n */\\n function bulkSubmitWithdrawalSignatures(uint256[] calldata _withdrawals, bytes[] calldata _signatures) external;\\n\\n /**\\n * @dev Maps Ronin tokens to mainchain networks.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(\\n address[] calldata _roninTokens,\\n address[] calldata _mainchainTokens,\\n uint256[] calldata chainIds,\\n TokenStandard[] calldata _standards\\n ) external;\\n\\n /**\\n * @dev Returns whether the deposit is casted by the voter.\\n */\\n function depositVoted(uint256 _chainId, uint256 _depositId, address _voter) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the mainchain withdrew is casted by the voter.\\n */\\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the withdrawal is done on mainchain.\\n */\\n function mainchainWithdrew(uint256 _withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns mainchain token address.\\n * Reverts for unsupported token.\\n */\\n function getMainchainToken(address _roninToken, uint256 _chainId) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x063bbad71da3acad745c2f2bf306643a3e089f430d1ba10e095de2ba108aeb87\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeTracking {\\n struct Request {\\n VoteKind kind;\\n uint256 id;\\n }\\n\\n enum VoteKind {\\n Deposit,\\n Withdrawal,\\n MainchainWithdrawal\\n }\\n\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\n\\n /**\\n * @dev Returns the block that allow incomming mutable call.\\n */\\n function startedAtBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of votes at the specific period `_period`.\\n */\\n function totalVote(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots at the specific period `_period`.\\n */\\n function totalBallot(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\n */\\n function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\n */\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\n\\n /**\\n * @dev Handles the request once it is approved.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\n\\n /**\\n * @dev Records vote for a receipt and a operator.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\n}\\n\",\"keccak256\":\"0x53ac425ff6efebc200030ceef302c2871a4b2edfcc5e512ce326aa704989ff7a\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/LibTokenInfo.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n TokenStandard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\",\"license\":\"MIT\"},\"src/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"src/interfaces/validator/ICandidateManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ICandidateManager {\\n struct ValidatorCandidate {\\n // Admin of the candidate\\n address admin;\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address that receives mining reward of the validator\\n address payable treasuryAddr;\\n // Address of the bridge operator corresponding to the candidate\\n address ______deprecatedbridgeOperatorAddr;\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\n // Values in range [0; 100_00] stands for 0-100%\\n uint256 commissionRate;\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\n uint256 revokingTimestamp;\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\n uint256 topupDeadline;\\n }\\n\\n struct CommissionSchedule {\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\n uint256 effectiveTimestamp;\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\n uint256 commissionRate;\\n }\\n\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\n /// @dev Emitted when the validator candidate is granted.\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\n /// @dev Emitted when the validator candidate is revoked.\\n event CandidatesRevoked(address[] consensusAddrs);\\n\\n /// @dev Emitted when a schedule for updating commission rate is set.\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\n /// @dev Emitted when the commission rate of a validator is updated.\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\n\\n /// @dev Error of exceeding maximum number of candidates.\\n error ErrExceedsMaxNumberOfCandidate();\\n /// @dev Error of querying for already existent candidate.\\n error ErrExistentCandidate();\\n /// @dev Error of querying for non-existent candidate.\\n error ErrNonExistentCandidate();\\n /// @dev Error of candidate admin already exists.\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\n /// @dev Error of treasury already exists.\\n error ErrExistentTreasury(address _treasuryAddr);\\n /// @dev Error of invalid commission rate.\\n error ErrInvalidCommissionRate();\\n /// @dev Error of invalid effective days onwards.\\n error ErrInvalidEffectiveDaysOnwards();\\n /// @dev Error of invalid min effective days onwards.\\n error ErrInvalidMinEffectiveDaysOnwards();\\n /// @dev Error of already requested revoking candidate before.\\n error ErrAlreadyRequestedRevokingCandidate();\\n /// @dev Error of commission change schedule exists.\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\n /// @dev Error of trusted org cannot renounce.\\n error ErrTrustedOrgCannotRenounce();\\n\\n /**\\n * @dev Returns the maximum number of validator candidate.\\n */\\n function maxValidatorCandidate() external view returns (uint256);\\n\\n /**\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\n */\\n function minEffectiveDaysOnward() external view returns (uint256);\\n\\n /**\\n * @dev Sets the maximum number of validator candidate.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MaxValidatorCandidateUpdated` event.\\n *\\n */\\n function setMaxValidatorCandidate(uint256) external;\\n\\n /**\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\n *\\n */\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\n\\n /**\\n * @dev Grants a validator candidate.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateGranted`.\\n *\\n */\\n function execApplyValidatorCandidate(address _admin, address _consensusAddr, address payable _treasuryAddr, uint256 _commissionRate) external;\\n\\n /**\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\n *\\n */\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\n\\n /**\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\n *\\n * Requirements:\\n * - The method caller is the staking contract.\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\n * - The `_rate` must be in range of [0_00; 100_00].\\n *\\n * Emits the event `CommissionRateUpdateScheduled`.\\n *\\n */\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\n\\n /**\\n * @dev Returns whether the address is a validator (candidate).\\n */\\n function isValidatorCandidate(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns the validator candidate.\\n */\\n function getValidatorCandidates() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns all candidate info.\\n */\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\n\\n /**\\n * @dev Returns the info of a candidate.\\n */\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\n\\n /**\\n * @dev Returns whether the address is the candidate admin.\\n */\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\n\\n /**\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\n */\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\n}\\n\",\"keccak256\":\"0x37b15d36774a3f18291e85efa9df6caaf52b8fa751a8222a3ac8f467656950c1\",\"license\":\"MIT\"},\"src/interfaces/validator/ICoinbaseExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ISlashingExecution.sol\\\";\\n\\ninterface ICoinbaseExecution is ISlashingExecution {\\n enum BlockRewardDeprecatedType {\\n UNKNOWN,\\n UNAVAILABILITY,\\n AFTER_BAILOUT\\n }\\n\\n /// @dev Emitted when the validator set is updated\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated.\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\n\\n /// @dev Emitted when the reward of the block producer is deprecated.\\n event BlockRewardDeprecated(address indexed coinbaseAddr, uint256 rewardAmount, BlockRewardDeprecatedType deprecatedType);\\n /// @dev Emitted when the block reward is submitted.\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\n\\n /// @dev Emitted when the block producer reward is distributed.\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\n event MiningRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\n\\n /// @dev Emitted when the bridge operator reward is distributed.\\n event BridgeOperatorRewardDistributed(address indexed consensusAddr, address indexed bridgeOperator, address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\n event BridgeOperatorRewardDistributionFailed(\\n address indexed consensusAddr, address indexed bridgeOperator, address indexed recipient, uint256 amount, uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the fast finality reward is distributed.\\n event FastFinalityRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the fast finality reward.\\n event FastFinalityRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\n\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\n event StakingRewardDistributionFailed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts, uint256 contractBalance);\\n\\n /// @dev Emitted when the epoch is wrapped up.\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\n\\n /// @dev Error of only allowed at the end of epoch\\n error ErrAtEndOfEpochOnly();\\n /// @dev Error of query for already wrapped up epoch\\n error ErrAlreadyWrappedEpoch();\\n\\n /**\\n * @dev Submits reward of the current block.\\n *\\n * Requirements:\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\n *\\n */\\n function submitBlockReward() external payable;\\n\\n /**\\n * @dev Wraps up the current epoch.\\n *\\n * Requirements:\\n * - The method must be called when the current epoch is ending.\\n * - The epoch is not wrapped yet.\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\n * Emits the event `WrappedUpEpoch`.\\n *\\n */\\n function wrapUpEpoch() external payable;\\n}\\n\",\"keccak256\":\"0x3030ef01bb0277f8607fb3b6358a4cd1d75f6a756e5c884153fbf94f0a16b4d4\",\"license\":\"MIT\"},\"src/interfaces/validator/IEmergencyExit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IEmergencyExit {\\n /// @dev Emitted when the fund is locked from an emergency exit request\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\n event EmergencyExitLockedFundReleased(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\n event EmergencyExitLockedFundReleasingFailed(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount, uint256 contractBalance);\\n\\n /// @dev Emitted when the emergency exit locked amount is updated.\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\n /// @dev Emitted when the emergency expiry duration is updated.\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\n\\n /// @dev Error of already requested emergency exit before.\\n error ErrAlreadyRequestedEmergencyExit();\\n\\n /**\\n * @dev Returns the amount of RON to lock from a consensus address.\\n */\\n function emergencyExitLockedAmount() external returns (uint256);\\n\\n /**\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\n */\\n function emergencyExpiryDuration() external returns (uint256);\\n\\n /**\\n * @dev Sets the amount of RON to lock from a consensus address.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\n *\\n */\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\n\\n /**\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\n *\\n */\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\n\\n /**\\n * @dev Unlocks fund for emergency exit request.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\n *\\n */\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\n\\n /**\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n */\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\n}\\n\",\"keccak256\":\"0x2df640817e7fb957f923dd583e82be9610a8441735b69519db5bd9457683bec2\",\"license\":\"MIT\"},\"src/interfaces/validator/IRoninValidatorSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ICandidateManager.sol\\\";\\nimport \\\"./info-fragments/ICommonInfo.sol\\\";\\nimport \\\"./ICoinbaseExecution.sol\\\";\\nimport \\\"./ISlashingExecution.sol\\\";\\nimport \\\"./IEmergencyExit.sol\\\";\\n\\ninterface IRoninValidatorSet is ICandidateManager, ICommonInfo, ISlashingExecution, ICoinbaseExecution, IEmergencyExit { }\\n\",\"keccak256\":\"0x5ae53ab78a38d9c59d74b4723ead82146bc402874ebbdc90b70ce084516e010f\",\"license\":\"MIT\"},\"src/interfaces/validator/ISlashingExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ISlashingExecution {\\n /// @dev Emitted when the validator is punished.\\n event ValidatorPunished(\\n address indexed consensusAddr,\\n uint256 indexed period,\\n uint256 jailedUntil,\\n uint256 deductedStakingAmount,\\n bool blockProducerRewardDeprecated,\\n bool bridgeOperatorRewardDeprecated\\n );\\n /// @dev Emitted when the validator get out of jail by bailout.\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\n\\n /// @dev Error of cannot bailout due to high tier slash.\\n error ErrCannotBailout(address validator);\\n\\n /**\\n * @dev Finalize the slash request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorPunished`.\\n *\\n */\\n function execSlash(address validatorAddr, uint256 newJailedUntil, uint256 slashAmount, bool cannotBailout) external;\\n\\n /**\\n * @dev Finalize the bailout request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorUnjailed`.\\n *\\n */\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\n}\\n\",\"keccak256\":\"0xac0b772f2fca9dafd7cc6742f91b442f9f545bf9472185b8d817fe045b680193\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/ICommonInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IJailingInfo.sol\\\";\\nimport \\\"./ITimingInfo.sol\\\";\\n\\ninterface ICommonInfo is ITimingInfo, IJailingInfo {\\n struct EmergencyExitInfo {\\n uint256 lockedAmount;\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\n uint256 recyclingAt;\\n }\\n\\n /// @dev Emitted when the deprecated reward is withdrawn.\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\n\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\n error ErrUnauthorizedReceiveRON();\\n /// @dev Error thrown when queries for a non existent info.\\n error NonExistentRecyclingInfo();\\n\\n /**\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\n */\\n function totalDeprecatedReward() external view returns (uint256);\\n\\n /**\\n * @dev Returns the emergency exit request.\\n */\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\n}\\n\",\"keccak256\":\"0x4a215273f535697ecf54a97c8fd9de9c666ca64b88dafe7ab60b2903f71ffb41\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/IJailingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IJailingInfo {\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkJailed(address) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeft(address _addr) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\n */\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\n */\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\n */\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xd83e85bea11509406213b8d06956b33238d27fa1b5e555c1f064bdfd41d6d216\",\"license\":\"MIT\"},\"src/interfaces/validator/info-fragments/ITimingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ITimingInfo {\\n /**\\n * @dev Returns the block that validator set was updated.\\n */\\n function getLastUpdatedBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the number of blocks in a epoch.\\n */\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\n\\n /**\\n * @dev Returns the epoch index from the block number.\\n */\\n function epochOf(uint256 _block) external view returns (uint256);\\n\\n /**\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\n */\\n function epochEndingAt(uint256 _block) external view returns (bool);\\n\\n /**\\n * @dev Tries to get the period index from the epoch number.\\n */\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\n\\n /**\\n * @dev Returns whether the period ending at the current block number.\\n */\\n function isPeriodEnding() external view returns (bool);\\n\\n /**\\n * @dev Returns the period index from the current block.\\n */\\n function currentPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the block number that the current period starts at.\\n */\\n function currentPeriodStartAtBlock() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/IsolatedGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../interfaces/consumers/VoteStatusConsumer.sol\\\";\\nimport \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary IsolatedGovernance {\\n struct Vote {\\n VoteStatusConsumer.VoteStatus status;\\n bytes32 finalHash;\\n /// @dev Mapping from voter => receipt hash\\n mapping(address => bytes32) voteHashOf;\\n /// @dev The timestamp that voting is expired (no expiration=0)\\n uint256 expiredAt;\\n /// @dev The timestamp that voting is created\\n uint256 createdAt;\\n /// @dev The list of voters\\n address[] voters;\\n }\\n\\n /**\\n * @dev Casts vote for the receipt with the receipt hash `_hash`.\\n *\\n * Requirements:\\n * - The voter has not voted for the round.\\n *\\n */\\n function castVote(Vote storage _v, address _voter, bytes32 _hash) internal {\\n if (_v.expiredAt > 0 && _v.expiredAt <= block.timestamp) {\\n _v.status = VoteStatusConsumer.VoteStatus.Expired;\\n }\\n\\n if (voted(_v, _voter)) revert ErrAlreadyVoted(_voter);\\n\\n _v.voteHashOf[_voter] = _hash;\\n _v.voters.push(_voter);\\n }\\n\\n /**\\n * @dev Updates vote with the requirement of minimum vote weight.\\n */\\n function syncVoteStatus(\\n Vote storage _v,\\n uint256 _minimumVoteWeight,\\n uint256 _votedWeightForHash,\\n bytes32 _hash\\n ) internal returns (VoteStatusConsumer.VoteStatus _status) {\\n if (_votedWeightForHash >= _minimumVoteWeight && _v.status == VoteStatusConsumer.VoteStatus.Pending) {\\n _v.status = VoteStatusConsumer.VoteStatus.Approved;\\n _v.finalHash = _hash;\\n }\\n\\n return _v.status;\\n }\\n\\n /**\\n * @dev Returns the list of vote's addresses that voted for the hash `_hash`.\\n */\\n function filterByHash(Vote storage _v, bytes32 _hash) internal view returns (address[] memory _voters) {\\n uint256 _count;\\n _voters = new address[](_v.voters.length);\\n\\n unchecked {\\n for (uint _i; _i < _voters.length; ++_i) {\\n address _voter = _v.voters[_i];\\n if (_v.voteHashOf[_voter] == _hash) {\\n _voters[_count++] = _voter;\\n }\\n }\\n }\\n\\n assembly {\\n mstore(_voters, _count)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function voted(Vote storage _v, address _voter) internal view returns (bool) {\\n return _v.voteHashOf[_voter] != bytes32(0);\\n }\\n}\\n\",\"keccak256\":\"0xa6a1e04b914580c099ac87f65ec24c35445eee34809e3decf1c57b6c52942d36\",\"license\":\"MIT\"},\"src/libraries/LibTokenInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nenum TokenStandard {\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\\nstruct TokenInfo {\\n TokenStandard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n}\\n\\n/**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\n\\n/**\\n * @dev Error indicating that the `handleAssetIn` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\n\\n/// @dev Error indicating that the provided information is invalid.\\nerror ErrInvalidInfo();\\n\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\nerror ErrERC20MintingFailed();\\n\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\nerror ErrERC721MintingFailed();\\n\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\nerror ErrERC1155TransferFailed();\\n\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\nerror ErrERC1155MintingFailed();\\n\\n/// @dev Error indicating that an unsupported standard is encountered.\\nerror ErrUnsupportedStandard();\\n\\nlibrary LibTokenInfo {\\n /**\\n *\\n * HASH\\n *\\n */\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n *\\n * VALIDATE\\n *\\n */\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(TokenInfo memory self) internal pure {\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\n revert ErrInvalidInfo();\\n }\\n }\\n\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\n }\\n\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\n }\\n\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\n }\\n\\n /**\\n *\\n * TRANSFER IN/OUT METHOD\\n *\\n */\\n\\n /**\\n * @dev Transfer asset in.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\n bool success;\\n bytes memory data;\\n if (self.erc == TokenStandard.ERC20) {\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\n } else if (self.erc == TokenStandard.ERC1155) {\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\n }\\n\\n /**\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\n if (token == address(wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!to.send(self.quantity)) {\\n wrappedNativeToken.deposit{ value: self.quantity }();\\n _transferTokenOut(self, to, token);\\n }\\n\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC20) {\\n uint256 balance = IERC20(token).balanceOf(address(this));\\n if (balance < self.quantity) {\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\n }\\n\\n _transferTokenOut(self, to, token);\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC721) {\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\n revert ErrERC721MintingFailed();\\n }\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC1155) {\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\n revert ErrERC1155MintingFailed();\\n }\\n return;\\n }\\n\\n revert ErrUnsupportedStandard();\\n }\\n\\n /**\\n *\\n * TRANSFER HELPERS\\n *\\n */\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\n bool success;\\n if (self.erc == TokenStandard.ERC20) {\\n success = _tryTransferERC20(token, to, self.quantity);\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\n }\\n\\n /**\\n * TRANSFER ERC-20\\n */\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n bytes memory data;\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n }\\n\\n /**\\n * @dev Mints ERC20 token and returns the result.\\n */\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\n }\\n\\n /**\\n * TRANSFER ERC-721\\n */\\n\\n /**\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n success = _tryTransferFromERC721(token, address(this), to, id);\\n if (!success) {\\n return _tryMintERC721(token, to, id);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\n }\\n\\n /**\\n * @dev Mints ERC721 token and returns the result.\\n */\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\n }\\n\\n /**\\n * TRANSFER ERC-1155\\n */\\n\\n /**\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\n if (!success) {\\n return _tryMintERC1155(token, to, id, amount);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC1155 token and returns the result.\\n */\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\n }\\n\\n /**\\n * @dev Mints ERC1155 token and returns the result.\\n */\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\n }\\n}\\n\",\"keccak256\":\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\",\"license\":\"MIT\"},\"src/libraries/LibTokenOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TokenOwner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n}\\n\\nlibrary LibTokenOwner {\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\",\"license\":\"MIT\"},\"src/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./LibTokenInfo.sol\\\";\\nimport \\\"./LibTokenOwner.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n using LibTokenOwner for TokenOwner;\\n using LibTokenInfo for TokenInfo;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n TokenInfo info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n TokenOwner mainchain;\\n TokenOwner ronin;\\n TokenInfo info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\",\"license\":\"MIT\"},\"src/ronin/gateway/RoninGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport \\\"../../extensions/GatewayV3.sol\\\";\\nimport \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../extensions/MinimumWithdrawal.sol\\\";\\nimport \\\"../../interfaces/IERC20Mintable.sol\\\";\\nimport \\\"../../interfaces/IERC721Mintable.sol\\\";\\nimport \\\"../../interfaces/bridge/IBridgeTracking.sol\\\";\\nimport \\\"../../interfaces/IRoninGatewayV3.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\nimport \\\"../../interfaces/validator/IRoninValidatorSet.sol\\\";\\nimport \\\"../../libraries/IsolatedGovernance.sol\\\";\\nimport \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\n\\ncontract RoninGatewayV3 is\\n GatewayV3,\\n Initializable,\\n MinimumWithdrawal,\\n AccessControlEnumerable,\\n ERC1155Holder,\\n VoteStatusConsumer,\\n IRoninGatewayV3,\\n HasContracts\\n{\\n using LibTokenInfo for TokenInfo;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n using IsolatedGovernance for IsolatedGovernance.Vote;\\n\\n /// @custom:deprecated Previously `withdrawalMigrated` (non-zero value)\\n bool private ___deprecated4;\\n /// @dev Total withdrawal\\n uint256 public withdrawalCount;\\n /// @dev Mapping from chain id => deposit id => deposit vote\\n mapping(uint256 => mapping(uint256 => IsolatedGovernance.Vote)) public depositVote;\\n /// @dev Mapping from withdrawal id => mainchain withdrew vote\\n mapping(uint256 => IsolatedGovernance.Vote) public mainchainWithdrewVote;\\n /// @dev Mapping from withdrawal id => withdrawal receipt\\n mapping(uint256 => Transfer.Receipt) public withdrawal;\\n /// @dev Mapping from withdrawal id => validator address => signatures\\n mapping(uint256 => mapping(address => bytes)) internal _withdrawalSig;\\n /// @dev Mapping from token address => chain id => mainchain token address\\n mapping(address => mapping(uint256 => MappedToken)) internal _mainchainToken;\\n\\n /// @custom:deprecated Previously `_validatorContract` (non-zero value)\\n address private ____deprecated0;\\n /// @custom:deprecated Previously `_bridgeTrackingContract` (non-zero value)\\n address private ____deprecated1;\\n\\n /// @dev Mapping from withdrawal id => vote for recording withdrawal stats\\n mapping(uint256 => IsolatedGovernance.Vote) public withdrawalStatVote;\\n\\n /// @custom:deprecated Previously `_trustedOrgContract` (non-zero value)\\n address private ____deprecated2;\\n\\n uint256 internal _trustedNum;\\n uint256 internal _trustedDenom;\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n modifier onlyBridgeOperator() {\\n _requireBridgeOperator();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the method caller is not bridge operator.\\n */\\n function _requireBridgeOperator() internal view {\\n if (!IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).isBridgeOperator(msg.sender)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.__DEPRECATED_BRIDGE_OPERATOR);\\n }\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n uint256 _numerator,\\n uint256 _denominator,\\n uint256 _trustedNumerator,\\n uint256 _trustedDenominator,\\n address[] calldata, /* _withdrawalMigrators */\\n // _packedAddresses[0]: roninTokens\\n // _packedAddresses[1]: mainchainTokens\\n address[][2] calldata _packedAddresses,\\n // _packedNumbers[0]: chainIds\\n // _packedNumbers[1]: minimumThresholds\\n uint256[][2] calldata _packedNumbers,\\n TokenStandard[] calldata _standards\\n ) external virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n _setThreshold(_numerator, _denominator);\\n _setTrustedThreshold(_trustedNumerator, _trustedDenominator);\\n if (_packedAddresses[0].length > 0) {\\n _mapTokens(_packedAddresses[0], _packedAddresses[1], _packedNumbers[0], _standards);\\n _setMinimumThresholds(_packedAddresses[0], _packedNumbers[1]);\\n }\\n }\\n\\n function initializeV2() external reinitializer(2) {\\n _setContract(ContractType.VALIDATOR, ____deprecated0);\\n _setContract(ContractType.BRIDGE_TRACKING, ____deprecated1);\\n _setContract(ContractType.RONIN_TRUSTED_ORGANIZATION, ____deprecated2);\\n delete ____deprecated0;\\n delete ____deprecated1;\\n delete ____deprecated2;\\n }\\n\\n function initializeV3(address bridgeAdmin) external reinitializer(3) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeAdmin);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function getWithdrawalSignatures(uint256 withdrawalId, address[] calldata operators) external view returns (bytes[] memory _signatures) {\\n _signatures = new bytes[](operators.length);\\n for (uint256 _i = 0; _i < operators.length;) {\\n _signatures[_i] = _withdrawalSig[withdrawalId][operators[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function depositFor(Transfer.Receipt calldata _receipt) external whenNotPaused onlyBridgeOperator {\\n _depositFor(_receipt, msg.sender, minimumVoteWeight());\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external onlyBridgeOperator returns (bool[] memory _executedReceipts) {\\n address governor = msg.sender;\\n uint256 minVoteWeight = minimumVoteWeight();\\n\\n uint256 withdrawalId;\\n uint length = _withdrawalIds.length;\\n\\n _executedReceipts = new bool[](length);\\n IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\n\\n for (uint256 i; i < length; ++i) {\\n withdrawalId = _withdrawalIds[i];\\n bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId, governor);\\n\\n // Mark the withdrawal is executed\\n if (mainchainWithdrew(withdrawalId)) {\\n _executedReceipts[i] = true;\\n }\\n\\n // Process all votes, not early-exit to track all votes in BridgeTracking\\n IsolatedGovernance.Vote storage _vote = mainchainWithdrewVote[withdrawalId];\\n Transfer.Receipt memory _withdrawal = withdrawal[withdrawalId];\\n bytes32 _hash = _withdrawal.hash();\\n VoteStatus _status = _castIsolatedVote(_vote, governor, minVoteWeight, _hash);\\n if (_status == VoteStatus.Approved) {\\n _vote.status = VoteStatus.Executed;\\n bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId);\\n emit MainchainWithdrew(_hash, _withdrawal);\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function tryBulkDepositFor(Transfer.Receipt[] calldata receipts) external whenNotPaused onlyBridgeOperator returns (bool[] memory _executedReceipts) {\\n uint length = receipts.length;\\n _executedReceipts = new bool[](length);\\n uint256 minVoteWeight = minimumVoteWeight();\\n\\n Transfer.Receipt memory iReceipt;\\n for (uint i; i < length; ++i) {\\n iReceipt = receipts[i];\\n if (depositVote[iReceipt.mainchain.chainId][iReceipt.id].status == VoteStatus.Executed) {\\n _executedReceipts[i] = true;\\n }\\n\\n // Process all votes, not early-exit to track all votes in BridgeTracking\\n _depositFor(iReceipt, msg.sender, minVoteWeight);\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external whenNotPaused {\\n _requestWithdrawalFor(_request, msg.sender, _chainId);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata requests, uint256 chainId) external whenNotPaused {\\n uint length = requests.length;\\n if (length == 0) revert ErrEmptyArray();\\n\\n for (uint i; i < length; ++i) {\\n _requestWithdrawalFor(requests[i], msg.sender, chainId);\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function requestWithdrawalSignatures(uint256 _withdrawalId) external whenNotPaused {\\n if (mainchainWithdrew(_withdrawalId)) revert ErrWithdrawnOnMainchainAlready();\\n\\n Transfer.Receipt memory _receipt = withdrawal[_withdrawalId];\\n if (_receipt.ronin.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, _receipt.ronin.chainId, block.chainid);\\n }\\n\\n emit WithdrawalSignaturesRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function bulkSubmitWithdrawalSignatures(uint256[] calldata withdrawals, bytes[] calldata signatures) external whenNotPaused onlyBridgeOperator {\\n address operator = msg.sender;\\n\\n uint length = withdrawals.length;\\n if (!(length > 0 && length == signatures.length)) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n uint256 _minVoteWeight = minimumVoteWeight();\\n\\n uint256 id;\\n IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\n for (uint i; i < length; ++i) {\\n id = withdrawals[i];\\n _withdrawalSig[id][operator] = signatures[i];\\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Withdrawal, id, operator);\\n\\n IsolatedGovernance.Vote storage _proposal = withdrawalStatVote[id];\\n VoteStatus _status = _castIsolatedVote(_proposal, operator, _minVoteWeight, bytes32(id));\\n if (_status == VoteStatus.Approved) {\\n _proposal.status = VoteStatus.Executed;\\n _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Withdrawal, id);\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function mapTokens(\\n address[] calldata _roninTokens,\\n address[] calldata _mainchainTokens,\\n uint256[] calldata _chainIds,\\n TokenStandard[] calldata _standards\\n ) external onlyProxyAdmin {\\n if (_roninTokens.length == 0) revert ErrLengthMismatch(msg.sig);\\n _mapTokens(_roninTokens, _mainchainTokens, _chainIds, _standards);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function depositVoted(uint256 _chainId, uint256 _depositId, address _voter) external view returns (bool) {\\n return depositVote[_chainId][_depositId].voted(_voter);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool) {\\n return mainchainWithdrewVote[_withdrawalId].voted(_voter);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function mainchainWithdrew(uint256 _withdrawalId) public view returns (bool) {\\n return mainchainWithdrewVote[_withdrawalId].status == VoteStatus.Executed;\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function getMainchainToken(address _roninToken, uint256 _chainId) public view returns (MappedToken memory _token) {\\n _token = _mainchainToken[_roninToken][_chainId];\\n if (_token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps Ronin tokens to mainchain networks.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(\\n address[] calldata _roninTokens,\\n address[] calldata _mainchainTokens,\\n uint256[] calldata _chainIds,\\n TokenStandard[] calldata _standards\\n ) internal {\\n if (!(_roninTokens.length == _mainchainTokens.length && _roninTokens.length == _chainIds.length)) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n for (uint256 _i; _i < _roninTokens.length;) {\\n _mainchainToken[_roninTokens[_i]][_chainIds[_i]].tokenAddr = _mainchainTokens[_i];\\n _mainchainToken[_roninTokens[_i]][_chainIds[_i]].erc = _standards[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n\\n emit TokenMapped(_roninTokens, _mainchainTokens, _chainIds, _standards);\\n }\\n\\n /**\\n * @dev Deposits based on the receipt.\\n *\\n * Emits the `Deposited` once the assets are released.\\n *\\n */\\n function _depositFor(Transfer.Receipt memory receipt, address operator, uint256 minVoteWeight) internal {\\n uint256 id = receipt.id;\\n receipt.info.validate();\\n if (receipt.kind != Transfer.Kind.Deposit) revert ErrInvalidReceiptKind();\\n if (receipt.ronin.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, receipt.ronin.chainId, block.chainid);\\n\\n MappedToken memory token = getMainchainToken(receipt.ronin.tokenAddr, receipt.mainchain.chainId);\\n\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.mainchain.tokenAddr)) {\\n revert ErrInvalidReceipt();\\n }\\n\\n IsolatedGovernance.Vote storage _proposal = depositVote[receipt.mainchain.chainId][id];\\n bytes32 _receiptHash = receipt.hash();\\n VoteStatus status = _castIsolatedVote(_proposal, operator, minVoteWeight, _receiptHash);\\n emit DepositVoted(operator, id, receipt.mainchain.chainId, _receiptHash);\\n\\n // Transfer assets and handle when the vote is approved.\\n IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\n if (status == VoteStatus.Approved) {\\n _proposal.status = VoteStatus.Executed;\\n receipt.info.handleAssetOut(payable(receipt.ronin.addr), receipt.ronin.tokenAddr, IWETH(address(0)));\\n bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Deposit, receipt.id);\\n emit Deposited(_receiptHash, receipt);\\n }\\n\\n // Announce to BridgeTracking to record the vote, after marking the VoteStatus as Executed.\\n bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, receipt.id, operator);\\n }\\n\\n /**\\n * @dev Locks the assets and request withdrawal.\\n *\\n * Requirements:\\n * - The token info is valid.\\n *\\n * Emits the `WithdrawalRequested` event.\\n *\\n */\\n function _requestWithdrawalFor(Transfer.Request calldata _request, address _requester, uint256 _chainId) internal {\\n _request.info.validate();\\n _checkWithdrawal(_request);\\n MappedToken memory _token = getMainchainToken(_request.tokenAddr, _chainId);\\n if (_request.info.erc != _token.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\n _storeAsReceipt(_request, _chainId, _requester, _token.tokenAddr);\\n }\\n\\n /**\\n * @dev Stores the withdrawal request as a receipt.\\n *\\n * Emits the `WithdrawalRequested` event.\\n *\\n */\\n function _storeAsReceipt(\\n Transfer.Request calldata _request,\\n uint256 _chainId,\\n address _requester,\\n address _mainchainTokenAddr\\n ) internal returns (uint256 _withdrawalId) {\\n _withdrawalId = withdrawalCount++;\\n Transfer.Receipt memory _receipt = _request.into_withdrawal_receipt(_requester, _withdrawalId, _mainchainTokenAddr, _chainId);\\n withdrawal[_withdrawalId] = _receipt;\\n emit WithdrawalRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Don't send me RON.\\n */\\n function _fallback() internal virtual {\\n revert ErrInvalidRequest();\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\n return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getTotalWeight();\\n }\\n\\n /**\\n * @dev Casts and updates the vote result.\\n *\\n * Requirements:\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n */\\n function _castIsolatedVote(\\n IsolatedGovernance.Vote storage _v,\\n address _voter,\\n uint256 _minVoteWeight,\\n bytes32 _hash\\n ) internal virtual returns (VoteStatus _status) {\\n _v.castVote(_voter, _hash);\\n uint256 _totalWeight = _getVoteWeight(_v, _hash);\\n return _v.syncVoteStatus(_minVoteWeight, _totalWeight, _hash);\\n }\\n\\n /**\\n * @dev Returns the vote weight for a specified hash.\\n */\\n function _getVoteWeight(IsolatedGovernance.Vote storage _v, bytes32 _hash) internal view returns (uint256 _totalWeight) {\\n (, address[] memory bridgeOperators, uint96[] memory weights) = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getFullBridgeOperatorInfos();\\n uint256 length = bridgeOperators.length;\\n unchecked {\\n for (uint _i; _i < length; ++_i) {\\n if (_v.voteHashOf[bridgeOperators[_i]] == _hash) {\\n _totalWeight += weights[_i];\\n }\\n }\\n }\\n }\\n\\n function setTrustedThreshold(uint256 _trustedNumerator, uint256 _trustedDenominator) external virtual onlyProxyAdmin returns (uint256, uint256) {\\n return _setTrustedThreshold(_trustedNumerator, _trustedDenominator);\\n }\\n\\n /**\\n * @dev Returns the threshold about trusted org.\\n */\\n function getTrustedThreshold() external view virtual returns (uint256 trustedNum_, uint256 trustedDenom_) {\\n return (_trustedNum, _trustedDenom);\\n }\\n\\n /**\\n * @dev Sets trusted threshold and returns the old one.\\n *\\n * Emits the `TrustedThresholdUpdated` event.\\n *\\n */\\n function _setTrustedThreshold(\\n uint256 _trustedNumerator,\\n uint256 _trustedDenominator\\n ) internal virtual returns (uint256 _previousTrustedNum, uint256 _previousTrustedDenom) {\\n if (_trustedNumerator > _trustedDenominator) revert ErrInvalidTrustedThreshold();\\n\\n _previousTrustedNum = _num;\\n _previousTrustedDenom = _denom;\\n _trustedNum = _trustedNumerator;\\n _trustedDenom = _trustedDenominator;\\n unchecked {\\n emit TrustedThresholdUpdated(nonce++, _trustedNumerator, _trustedDenominator, _previousTrustedNum, _previousTrustedDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum trusted vote weight.\\n */\\n function _minimumTrustedVoteWeight(uint256 _totalTrustedWeight) internal view virtual returns (uint256) {\\n return (_trustedNum * _totalTrustedWeight + _trustedDenom - 1) / _trustedDenom;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, ERC1155Receiver) returns (bool) {\\n return AccessControlEnumerable.supportsInterface(interfaceId) || ERC1155Receiver.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x07763d6e838ecb550b9f8276fe4e4706be18f29707e1d8124db2abdf0f6489e1\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192812, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 58352, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_paused", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 103484, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_num", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 103486, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_denom", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 103488, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "______deprecated", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 103490, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "nonce", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 103492, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "emergencyPauser", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 103497, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "______gap", + "offset": 0, + "slot": "6", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 58190, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_initialized", + "offset": 0, + "slot": "55", + "type": "t_uint8" + }, + { + "astId": 58193, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_initializing", + "offset": 1, + "slot": "55", + "type": "t_bool" + }, + { + "astId": 103711, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "minimumThreshold", + "offset": 0, + "slot": "56", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 103716, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "______gap", + "offset": 0, + "slot": "57", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 56841, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_roles", + "offset": 0, + "slot": "107", + "type": "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)" + }, + { + "astId": 57155, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_roleMembers", + "offset": 0, + "slot": "108", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)63339_storage)" + }, + { + "astId": 121409, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "___deprecated4", + "offset": 0, + "slot": "109", + "type": "t_bool" + }, + { + "astId": 121412, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "withdrawalCount", + "offset": 0, + "slot": "110", + "type": "t_uint256" + }, + { + "astId": 121420, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "depositVote", + "offset": 0, + "slot": "111", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(Vote)111952_storage))" + }, + { + "astId": 121426, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "mainchainWithdrewVote", + "offset": 0, + "slot": "112", + "type": "t_mapping(t_uint256,t_struct(Vote)111952_storage)" + }, + { + "astId": 121432, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "withdrawal", + "offset": 0, + "slot": "113", + "type": "t_mapping(t_uint256,t_struct(Receipt)114148_storage)" + }, + { + "astId": 121439, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_withdrawalSig", + "offset": 0, + "slot": "114", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_bytes_storage))" + }, + { + "astId": 121447, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_mainchainToken", + "offset": 0, + "slot": "115", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(MappedToken)110667_storage))" + }, + { + "astId": 121450, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "____deprecated0", + "offset": 0, + "slot": "116", + "type": "t_address" + }, + { + "astId": 121453, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "____deprecated1", + "offset": 0, + "slot": "117", + "type": "t_address" + }, + { + "astId": 121459, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "withdrawalStatVote", + "offset": 0, + "slot": "118", + "type": "t_mapping(t_uint256,t_struct(Vote)111952_storage)" + }, + { + "astId": 121462, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "____deprecated2", + "offset": 0, + "slot": "119", + "type": "t_address" + }, + { + "astId": 121464, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_trustedNum", + "offset": 0, + "slot": "120", + "type": "t_uint256" + }, + { + "astId": 121466, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_trustedDenom", + "offset": 0, + "slot": "121", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32", + "base": "t_address" + }, + "t_array(t_bytes32)dyn_storage": { + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32", + "base": "t_bytes32" + }, + "t_array(t_uint256)49_storage": { + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568", + "base": "t_uint256" + }, + "t_array(t_uint256)50_storage": { + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600", + "base": "t_uint256" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_enum(Kind)113945": { + "encoding": "inplace", + "label": "enum Transfer.Kind", + "numberOfBytes": "1" + }, + "t_enum(TokenStandard)112271": { + "encoding": "inplace", + "label": "enum TokenStandard", + "numberOfBytes": "1" + }, + "t_enum(VoteStatus)110686": { + "encoding": "inplace", + "label": "enum VoteStatusConsumer.VoteStatus", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_bytes32)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_mapping(t_address,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_struct(MappedToken)110667_storage))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => struct MappedTokenConsumer.MappedToken))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(MappedToken)110667_storage)" + }, + "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_struct(AddressSet)63339_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)63339_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)56836_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_bytes_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => bytes))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bytes_storage)" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(Vote)111952_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(uint256 => struct IsolatedGovernance.Vote))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(Vote)111952_storage)" + }, + "t_mapping(t_uint256,t_struct(MappedToken)110667_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct MappedTokenConsumer.MappedToken)", + "numberOfBytes": "32", + "value": "t_struct(MappedToken)110667_storage" + }, + "t_mapping(t_uint256,t_struct(Receipt)114148_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct Transfer.Receipt)", + "numberOfBytes": "32", + "value": "t_struct(Receipt)114148_storage" + }, + "t_mapping(t_uint256,t_struct(Vote)111952_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct IsolatedGovernance.Vote)", + "numberOfBytes": "32", + "value": "t_struct(Vote)111952_storage" + }, + "t_struct(AddressSet)63339_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.AddressSet", + "numberOfBytes": "64", + "members": [ + { + "astId": 63338, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)63038_storage" + } + ] + }, + "t_struct(MappedToken)110667_storage": { + "encoding": "inplace", + "label": "struct MappedTokenConsumer.MappedToken", + "numberOfBytes": "32", + "members": [ + { + "astId": 110664, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "erc", + "offset": 0, + "slot": "0", + "type": "t_enum(TokenStandard)112271" + }, + { + "astId": 110666, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "tokenAddr", + "offset": 1, + "slot": "0", + "type": "t_address" + } + ] + }, + "t_struct(Receipt)114148_storage": { + "encoding": "inplace", + "label": "struct Transfer.Receipt", + "numberOfBytes": "352", + "members": [ + { + "astId": 114135, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 114138, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "kind", + "offset": 0, + "slot": "1", + "type": "t_enum(Kind)113945" + }, + { + "astId": 114141, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "mainchain", + "offset": 0, + "slot": "2", + "type": "t_struct(TokenOwner)113435_storage" + }, + { + "astId": 114144, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "ronin", + "offset": 0, + "slot": "5", + "type": "t_struct(TokenOwner)113435_storage" + }, + { + "astId": 114147, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "info", + "offset": 0, + "slot": "8", + "type": "t_struct(TokenInfo)112279_storage" + } + ] + }, + "t_struct(RoleData)56836_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", + "members": [ + { + "astId": 56833, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 56835, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ] + }, + "t_struct(Set)63038_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "numberOfBytes": "64", + "members": [ + { + "astId": 63033, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 63037, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_struct(TokenInfo)112279_storage": { + "encoding": "inplace", + "label": "struct TokenInfo", + "numberOfBytes": "96", + "members": [ + { + "astId": 112274, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "erc", + "offset": 0, + "slot": "0", + "type": "t_enum(TokenStandard)112271" + }, + { + "astId": 112276, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "id", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 112278, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "quantity", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ] + }, + "t_struct(TokenOwner)113435_storage": { + "encoding": "inplace", + "label": "struct TokenOwner", + "numberOfBytes": "96", + "members": [ + { + "astId": 113430, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "addr", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 113432, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "tokenAddr", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 113434, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "chainId", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ] + }, + "t_struct(Vote)111952_storage": { + "encoding": "inplace", + "label": "struct IsolatedGovernance.Vote", + "numberOfBytes": "192", + "members": [ + { + "astId": 111934, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(VoteStatus)110686" + }, + { + "astId": 111936, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "finalHash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 111941, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "voteHashOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_bytes32)" + }, + { + "astId": 111944, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "expiredAt", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 111947, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "createdAt", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 111951, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "voters", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1713251844, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "notice": "The assets will be transferred whenever the valid call passes the quorum threshold." + }, + "tryBulkAcknowledgeMainchainWithdrew(uint256[])": { + "notice": "Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time." + }, + "tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])": { + "notice": "The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time." + } + } + } +} \ No newline at end of file From 45101441222066cabd1e079624710774760e91ca Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 15:11:48 +0700 Subject: [PATCH 191/305] chore: add artifacts Mainchain side --- .../sepolia/MainchainBridgeManagerLogic.json | 2324 +++++++++++++++++ .../sepolia/MainchainBridgeManagerProxy.json | 218 ++ .../MainchainGatewayPauseEnforcerLogic.json | 64 +- .../sepolia/MainchainGatewayV3Logic.json | 497 +++- deployments/sepolia/WethUnwrapper.json | 134 + 5 files changed, 3085 insertions(+), 152 deletions(-) create mode 100644 deployments/sepolia/MainchainBridgeManagerLogic.json create mode 100644 deployments/sepolia/MainchainBridgeManagerProxy.json create mode 100644 deployments/sepolia/WethUnwrapper.json diff --git a/deployments/sepolia/MainchainBridgeManagerLogic.json b/deployments/sepolia/MainchainBridgeManagerLogic.json new file mode 100644 index 00000000..5aa46af1 --- /dev/null +++ b/deployments/sepolia/MainchainBridgeManagerLogic.json @@ -0,0 +1,2324 @@ +{ + "abi": [ + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addBridgeOperators", + "inputs": [ + { + "name": "voteWeights", + "type": "uint96[]", + "internalType": "uint96[]" + }, + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "checkThreshold", + "inputs": [ + { + "name": "voteWeight", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeOperatorWeight", + "inputs": [ + { + "name": "bridgeOperator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "weight", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeOperators", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getCallbackRegisters", + "inputs": [], + "outputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ], + "outputs": [ + { + "name": "contract_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getFullBridgeOperatorInfos", + "inputs": [], + "outputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorOf", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorWeight", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "weight", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernorWeights", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGovernors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOperatorOf", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProposalExpiryDuration", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThreshold", + "inputs": [], + "outputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTotalWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "globalProposalRelayed", + "inputs": [ + { + "name": "_round", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "roninChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bridgeContract", + "type": "address", + "internalType": "address" + }, + { + "name": "callbackRegisters", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "voteWeights", + "type": "uint96[]", + "internalType": "uint96[]" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isBridgeOperator", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumVoteWeight", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "registerCallbacks", + "inputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "relayGlobalProposal", + "inputs": [ + { + "name": "globalProposal", + "type": "tuple", + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "relayProposal", + "inputs": [ + { + "name": "proposal", + "type": "tuple", + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "supports_", + "type": "uint8[]", + "internalType": "enum Ballot.VoteType[]" + }, + { + "name": "signatures", + "type": "tuple[]", + "internalType": "struct SignatureConsumer.Signature[]", + "components": [ + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeBridgeOperators", + "inputs": [ + { + "name": "bridgeOperators", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "resolveTargets", + "inputs": [ + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + } + ], + "outputs": [ + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "round", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setContract", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMinRequiredGovernor", + "inputs": [ + { + "name": "min", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setThreshold", + "inputs": [ + { + "name": "num", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "denom", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sumGovernorsWeight", + "inputs": [ + { + "name": "governors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "sum", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalBridgeOperator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unregisterCallbacks", + "inputs": [ + { + "name": "registers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateManyTargetOption", + "inputs": [ + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "vote", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "status", + "type": "uint8", + "internalType": "enum VoteStatusConsumer.VoteStatus" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "againstVoteWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "forVoteWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "BridgeOperatorAddingFailed", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorRemovingFailed", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorUpdated", + "inputs": [ + { + "name": "governor", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fromBridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "toBridgeOperator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorsAdded", + "inputs": [ + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "voteWeights", + "type": "uint96[]", + "indexed": false, + "internalType": "uint96[]" + }, + { + "name": "governors", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BridgeOperatorsRemoved", + "inputs": [ + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "bridgeOperators", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CallbackRegistered", + "inputs": [ + { + "name": "", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ContractUpdated", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "indexed": true, + "internalType": "enum ContractType" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GlobalProposalCreated", + "inputs": [ + { + "name": "round", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "proposal", + "type": "tuple", + "indexed": false, + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "globalProposalHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "globalProposal", + "type": "tuple", + "indexed": false, + "internalType": "struct GlobalProposal.GlobalProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targetOptions", + "type": "uint8[]", + "internalType": "enum GlobalProposal.TargetOption[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "creator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MinRequiredGovernorUpdated", + "inputs": [ + { + "name": "min", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Notified", + "inputs": [ + { + "name": "callData", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "registers", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + }, + { + "name": "statuses", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "returnDatas", + "type": "bytes[]", + "indexed": false, + "internalType": "bytes[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalApproved", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalCreated", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "round", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "proposal", + "type": "tuple", + "indexed": false, + "internalType": "struct Proposal.ProposalDetail", + "components": [ + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiryTimestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "targets", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "values", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "calldatas", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "gasAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "creator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExecuted", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "successCalls", + "type": "bool[]", + "indexed": false, + "internalType": "bool[]" + }, + { + "name": "returnDatas", + "type": "bytes[]", + "indexed": false, + "internalType": "bytes[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExpired", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalExpiryDurationChanged", + "inputs": [ + { + "name": "duration", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalRejected", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProposalVoted", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "voter", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "support", + "type": "uint8", + "indexed": false, + "internalType": "enum Ballot.VoteType" + }, + { + "name": "weight", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TargetOptionUpdated", + "inputs": [ + { + "name": "targetOption", + "type": "uint8", + "indexed": true, + "internalType": "enum GlobalProposal.TargetOption" + }, + { + "name": "addr", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThresholdUpdated", + "inputs": [ + { + "name": "nonce", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numerator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "denominator", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "previousNumerator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "previousDenominator", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrBelowMinRequiredGovernors", + "inputs": [] + }, + { + "type": "error", + "name": "ErrContractTypeNotFound", + "inputs": [ + { + "name": "contractType", + "type": "uint8", + "internalType": "enum ContractType" + } + ] + }, + { + "type": "error", + "name": "ErrCurrentProposalIsNotCompleted", + "inputs": [] + }, + { + "type": "error", + "name": "ErrDuplicated", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrExistOneInternalCallFailed", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "callData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "ErrGovernorNotFound", + "inputs": [ + { + "name": "governor", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrGovernorNotMatch", + "inputs": [ + { + "name": "required", + "type": "address", + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrInsufficientGas", + "inputs": [ + { + "name": "proposalHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidArguments", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidChainId", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidExpiryTimestamp", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidInput", + "inputs": [] + }, + { + "type": "error", + "name": "ErrInvalidOrder", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidProposalNonce", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidThreshold", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrInvalidVoteWeight", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrLengthMismatch", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrLooseProposalInternallyRevert", + "inputs": [ + { + "name": "callIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "revertMsg", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "ErrNonExecutorCannotRelay", + "inputs": [ + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrOnlySelfCall", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrOperatorNotFound", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrRelayFailed", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrUnauthorized", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedRole", + "type": "uint8", + "internalType": "enum RoleAccess" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedVoteType", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrVoteIsFinalized", + "inputs": [] + }, + { + "type": "error", + "name": "ErrZeroAddress", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrZeroCodeContract", + "inputs": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + } + ] + } + ], + "address": "0x31b070817dbF268Bfe1484bD1b4D902c8c4f62df", + "args": "0x", + "ast": "", + "blockNumber": 5709352, + "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61519e80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212200c6f63384302c679c24a323da0191d39419570db3a104ad821b83178df1126da64736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MainchainBridgeManager.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212200c6f63384302c679c24a323da0191d39419570db3a104ad821b83178df1126da64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "addBridgeOperators(uint96[],address[],address[])": { + "details": "Adds multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to add.", + "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." + } + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "getBridgeOperatorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific bridge operator.", + "params": { + "bridgeOperator": "The address of the bridge operator to get the vote weight for." + }, + "returns": { + "weight": "The vote weight of the specified bridge operator." + } + }, + "getBridgeOperators()": { + "details": "Returns an array of all bridge operators.", + "returns": { + "_0": "An array containing the addresses of all bridge operators." + } + }, + "getCallbackRegisters()": { + "details": "Retrieves the addresses of registered callbacks.", + "returns": { + "registers": "An array containing the addresses of registered callbacks." + } + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getFullBridgeOperatorInfos()": { + "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", + "returns": { + "bridgeOperators": "An array of addresses representing the registered bridge operators.", + "governors": "An array of addresses representing the governors of each bridge operator.", + "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" + } + }, + "getGovernorOf(address)": { + "details": "Returns the corresponding `governor` of a `operator`." + }, + "getGovernorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific governor.", + "params": { + "governor": "The address of the governor to get the vote weight for." + }, + "returns": { + "weight": "voteWeight The vote weight of the specified governor." + } + }, + "getGovernorWeights(address[])": { + "details": "Returns the weights of a list of governor addresses." + }, + "getGovernors()": { + "details": "Returns an array of all governors.", + "returns": { + "_0": "An array containing the addresses of all governors." + } + }, + "getOperatorOf(address)": { + "details": "Returns the corresponding `operator` of a `governor`." + }, + "getProposalExpiryDuration()": { + "details": "Returns the expiry duration for a new proposal." + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTotalWeight()": { + "details": "Returns total weights." + }, + "globalProposalRelayed(uint256)": { + "details": "Returns whether the voter `_voter` casted vote for the proposal." + }, + "isBridgeOperator(address)": { + "details": "Checks if the given address is a bridge operator.", + "params": { + "addr": "The address to check." + }, + "returns": { + "_0": "A boolean indicating whether the address is a bridge operator." + } + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "registerCallbacks(address[])": { + "details": "Registers multiple callbacks with the bridge.", + "params": { + "registers": "The array of callback addresses to register." + } + }, + "relayGlobalProposal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor." + }, + "relayProposal((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor." + }, + "removeBridgeOperators(address[])": { + "details": "Removes multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to remove." + } + }, + "resolveTargets(uint8[])": { + "details": "Returns corresponding address of target options. Return address(0) on non-existent target." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setMinRequiredGovernor(uint256)": { + "details": "Self-call to update the minimum required governor.", + "params": { + "min": "The minimum number, this must not less than 3." + } + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "sumGovernorsWeight(address[])": { + "details": "Returns total weights of the governor list." + }, + "totalBridgeOperator()": { + "details": "Returns the total number of bridge operators.", + "returns": { + "_0": "The total number of bridge operators." + } + }, + "unregisterCallbacks(address[])": { + "details": "Unregisters multiple callbacks from the bridge.", + "params": { + "registers": "The array of callback addresses to unregister." + } + }, + "updateManyTargetOption(uint8[],address[])": { + "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal." + } + }, + "events": { + "BridgeOperatorAddingFailed(address)": { + "details": "Emitted when a bridge operator is failed to add." + }, + "BridgeOperatorRemovingFailed(address)": { + "details": "Emitted when a bridge operator is failed to remove." + }, + "BridgeOperatorUpdated(address,address,address)": { + "details": "Emitted when a bridge operator is updated." + }, + "BridgeOperatorsAdded(bool[],uint96[],address[],address[])": { + "details": "Emitted when new bridge operators are added." + }, + "BridgeOperatorsRemoved(bool[],address[])": { + "details": "Emitted when bridge operators are removed." + }, + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MinRequiredGovernorUpdated(uint256)": { + "details": "Emitted when the minimum number of required governors is updated." + }, + "Notified(bytes,address[],bool[],bytes[])": { + "details": "Emitted when the contract notifies multiple registers with statuses and return data." + }, + "ProposalApproved(bytes32)": { + "details": "Emitted when the proposal is approved" + }, + "ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "ProposalExecuted(bytes32,bool[],bytes[])": { + "details": "Emitted when the proposal is executed" + }, + "ProposalExpired(bytes32)": { + "details": "Emitted when the vote is expired" + }, + "ProposalExpiryDurationChanged(uint256)": { + "details": "Emitted when the proposal expiry duration is changed." + }, + "ProposalRejected(bytes32)": { + "details": "Emitted when the vote is reject" + }, + "ProposalVoted(bytes32,address,uint8,uint256)": { + "details": "Emitted when the proposal is voted" + }, + "TargetOptionUpdated(uint8,address)": { + "details": "Emitted when the target options are updated" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + } + }, + "errors": { + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrCurrentProposalIsNotCompleted()": [ + { + "details": "Error thrown when the current proposal is not completed." + } + ], + "ErrDuplicated(bytes4)": [ + { + "details": "Error thrown when a duplicated element is detected in an array.", + "params": { + "msgSig": "The function signature that invoke the error." + } + } + ], + "ErrInsufficientGas(bytes32)": [ + { + "details": "Error thrown when there is insufficient gas to execute a function." + } + ], + "ErrInvalidArguments(bytes4)": [ + { + "details": "Error indicating that arguments are invalid." + } + ], + "ErrInvalidChainId(bytes4,uint256,uint256)": [ + { + "details": "Error indicating that the chain ID is invalid.", + "params": { + "actual": "Current chain ID that executing function.", + "expected": "Expected chain ID required for the tx to success.", + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." + } + } + ], + "ErrInvalidExpiryTimestamp()": [ + { + "details": "Error thrown when an invalid expiry timestamp is provided." + } + ], + "ErrInvalidOrder(bytes4)": [ + { + "details": "Error indicating that an order is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." + } + } + ], + "ErrInvalidProposalNonce(bytes4)": [ + { + "details": "Error indicating that the proposal nonce is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid proposal nonce." + } + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidVoteWeight(bytes4)": [ + { + "details": "Error indicating that a vote weight is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." + } + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrLooseProposalInternallyRevert(uint256,bytes)": [ + { + "details": "Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`." + } + ], + "ErrNonExecutorCannotRelay(address,address)": [ + { + "details": "Error of the `caller` to relay is not the specified `executor`." + } + ], + "ErrOnlySelfCall(bytes4)": [ + { + "details": "Error indicating that a function can only be called by the contract itself.", + "params": { + "msgSig": "The function signature (bytes4) that can only be called by the contract itself." + } + } + ], + "ErrRelayFailed(bytes4)": [ + { + "details": "Error indicating that a relay call has failed.", + "params": { + "msgSig": "The function signature (bytes4) of the relay call that failed." + } + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedInterface(bytes4,address)": [ + { + "details": "The error indicating an unsupported interface.", + "params": { + "addr": "The address where the unsupported interface was encountered.", + "interfaceId": "The bytes4 interface identifier that is not supported." + } + } + ], + "ErrUnsupportedVoteType(bytes4)": [ + { + "details": "Error indicating that a vote type is not supported.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an unsupported vote type." + } + } + ], + "ErrVoteIsFinalized()": [ + { + "details": "Error thrown when attempting to interact with a finalized vote." + } + ], + "ErrZeroAddress(bytes4)": [ + { + "details": "Error indicating that given address is null when it should not." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ErrBelowMinRequiredGovernors\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCurrentProposalIsNotCompleted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrDuplicated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"name\":\"ErrExistOneInternalCallFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"required\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ErrInsufficientGas\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidExpiryTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidProposalNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidVoteWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"callIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"revertMsg\",\"type\":\"bytes\"}],\"name\":\"ErrLooseProposalInternallyRevert\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"ErrNonExecutorCannotRelay\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ErrOperatorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrRelayFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrUnsupportedInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnsupportedVoteType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrVoteIsFinalized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorAddingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorRemovingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromBridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toBridgeOperator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"CallbackRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"MinRequiredGovernorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"Notified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"ProposalExpiryDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\",\"name\":\"targetOption\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"TargetOptionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"addBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"getBridgeOperatorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCallbackRegisters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullBridgeOperatorInfos\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getGovernorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getOperatorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProposalExpiryDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"globalProposalRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"callbackRegisters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isBridgeOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"registerCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayGlobalProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"removeBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"}],\"name\":\"resolveTargets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"setMinRequiredGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"sumGovernorsWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBridgeOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"unregisterCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateManyTargetOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrCurrentProposalIsNotCompleted()\":[{\"details\":\"Error thrown when the current proposal is not completed.\"}],\"ErrDuplicated(bytes4)\":[{\"details\":\"Error thrown when a duplicated element is detected in an array.\",\"params\":{\"msgSig\":\"The function signature that invoke the error.\"}}],\"ErrInsufficientGas(bytes32)\":[{\"details\":\"Error thrown when there is insufficient gas to execute a function.\"}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidExpiryTimestamp()\":[{\"details\":\"Error thrown when an invalid expiry timestamp is provided.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidProposalNonce(bytes4)\":[{\"details\":\"Error indicating that the proposal nonce is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\"}}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidVoteWeight(bytes4)\":[{\"details\":\"Error indicating that a vote weight is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid vote weight.\"}}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrLooseProposalInternallyRevert(uint256,bytes)\":[{\"details\":\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\"}],\"ErrNonExecutorCannotRelay(address,address)\":[{\"details\":\"Error of the `caller` to relay is not the specified `executor`.\"}],\"ErrOnlySelfCall(bytes4)\":[{\"details\":\"Error indicating that a function can only be called by the contract itself.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that can only be called by the contract itself.\"}}],\"ErrRelayFailed(bytes4)\":[{\"details\":\"Error indicating that a relay call has failed.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the relay call that failed.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedInterface(bytes4,address)\":[{\"details\":\"The error indicating an unsupported interface.\",\"params\":{\"addr\":\"The address where the unsupported interface was encountered.\",\"interfaceId\":\"The bytes4 interface identifier that is not supported.\"}}],\"ErrUnsupportedVoteType(bytes4)\":[{\"details\":\"Error indicating that a vote type is not supported.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\"}}],\"ErrVoteIsFinalized()\":[{\"details\":\"Error thrown when attempting to interact with a finalized vote.\"}],\"ErrZeroAddress(bytes4)\":[{\"details\":\"Error indicating that given address is null when it should not.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeOperatorAddingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to add.\"},\"BridgeOperatorRemovingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to remove.\"},\"BridgeOperatorUpdated(address,address,address)\":{\"details\":\"Emitted when a bridge operator is updated.\"},\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\":{\"details\":\"Emitted when new bridge operators are added.\"},\"BridgeOperatorsRemoved(bool[],address[])\":{\"details\":\"Emitted when bridge operators are removed.\"},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MinRequiredGovernorUpdated(uint256)\":{\"details\":\"Emitted when the minimum number of required governors is updated.\"},\"Notified(bytes,address[],bool[],bytes[])\":{\"details\":\"Emitted when the contract notifies multiple registers with statuses and return data.\"},\"ProposalApproved(bytes32)\":{\"details\":\"Emitted when the proposal is approved\"},\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"ProposalExecuted(bytes32,bool[],bytes[])\":{\"details\":\"Emitted when the proposal is executed\"},\"ProposalExpired(bytes32)\":{\"details\":\"Emitted when the vote is expired\"},\"ProposalExpiryDurationChanged(uint256)\":{\"details\":\"Emitted when the proposal expiry duration is changed.\"},\"ProposalRejected(bytes32)\":{\"details\":\"Emitted when the vote is reject\"},\"ProposalVoted(bytes32,address,uint8,uint256)\":{\"details\":\"Emitted when the proposal is voted\"},\"TargetOptionUpdated(uint8,address)\":{\"details\":\"Emitted when the target options are updated\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"}},\"kind\":\"dev\",\"methods\":{\"addBridgeOperators(uint96[],address[],address[])\":{\"details\":\"Adds multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to add.\",\"governors\":\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\"}},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getBridgeOperatorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to get the vote weight for.\"},\"returns\":{\"weight\":\"The vote weight of the specified bridge operator.\"}},\"getBridgeOperators()\":{\"details\":\"Returns an array of all bridge operators.\",\"returns\":{\"_0\":\"An array containing the addresses of all bridge operators.\"}},\"getCallbackRegisters()\":{\"details\":\"Retrieves the addresses of registered callbacks.\",\"returns\":{\"registers\":\"An array containing the addresses of registered callbacks.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getFullBridgeOperatorInfos()\":{\"details\":\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\",\"returns\":{\"bridgeOperators\":\"An array of addresses representing the registered bridge operators.\",\"governors\":\"An array of addresses representing the governors of each bridge operator.\",\"weights\":\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\"}},\"getGovernorOf(address)\":{\"details\":\"Returns the corresponding `governor` of a `operator`.\"},\"getGovernorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific governor.\",\"params\":{\"governor\":\"The address of the governor to get the vote weight for.\"},\"returns\":{\"weight\":\"voteWeight The vote weight of the specified governor.\"}},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getGovernors()\":{\"details\":\"Returns an array of all governors.\",\"returns\":{\"_0\":\"An array containing the addresses of all governors.\"}},\"getOperatorOf(address)\":{\"details\":\"Returns the corresponding `operator` of a `governor`.\"},\"getProposalExpiryDuration()\":{\"details\":\"Returns the expiry duration for a new proposal.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTotalWeight()\":{\"details\":\"Returns total weights.\"},\"globalProposalRelayed(uint256)\":{\"details\":\"Returns whether the voter `_voter` casted vote for the proposal.\"},\"isBridgeOperator(address)\":{\"details\":\"Checks if the given address is a bridge operator.\",\"params\":{\"addr\":\"The address to check.\"},\"returns\":{\"_0\":\"A boolean indicating whether the address is a bridge operator.\"}},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"registerCallbacks(address[])\":{\"details\":\"Registers multiple callbacks with the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to register.\"}},\"relayGlobalProposal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor.\"},\"relayProposal((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor.\"},\"removeBridgeOperators(address[])\":{\"details\":\"Removes multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to remove.\"}},\"resolveTargets(uint8[])\":{\"details\":\"Returns corresponding address of target options. Return address(0) on non-existent target.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setMinRequiredGovernor(uint256)\":{\"details\":\"Self-call to update the minimum required governor.\",\"params\":{\"min\":\"The minimum number, this must not less than 3.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumGovernorsWeight(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalBridgeOperator()\":{\"details\":\"Returns the total number of bridge operators.\",\"returns\":{\"_0\":\"The total number of bridge operators.\"}},\"unregisterCallbacks(address[])\":{\"details\":\"Unregisters multiple callbacks from the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to unregister.\"}},\"updateManyTargetOption(uint8[],address[])\":{\"details\":\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\"}},\"version\":1},\"userdoc\":{\"errors\":{\"ErrBelowMinRequiredGovernors()\":[{\"notice\":\"Error indicating that the governors list will go below minimum number of required governor.\"}],\"ErrGovernorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying governor\"}],\"ErrGovernorNotMatch(address,address)\":[{\"notice\":\"Error indicating that the msg.sender is not match the required governor\"}],\"ErrInvalidInput()\":[{\"notice\":\"Common invalid input error\"}],\"ErrOperatorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying operator\"}]},\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainBridgeManager.sol\":\"MainchainBridgeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\"./BridgeManagerCallbackRegister.sol\\\";\\nimport { IHasContracts, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\n\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { AddressArrayUtils } from \\\"../../libraries/AddressArrayUtils.sol\\\";\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\nimport { RoleAccess } from \\\"../../utils/RoleAccess.sol\\\";\\nimport { TUint256Slot } from \\\"../../types/Types.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"./BridgeManagerQuorum.sol\\\";\\n\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\n using AddressArrayUtils for address[];\\n\\n struct BridgeManagerStorage {\\n /// @notice List of the governors.\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\n address[] _governors;\\n address[] _operators;\\n /// @dev Mapping from address to the governor weight\\n mapping(address governor => uint96 weight) _governorWeight;\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\n mapping(address operator => uint96 weight) _operatorWeight;\\n /// @dev Total weight of all governors / operators.\\n uint256 _totalWeight;\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\n uint256 _minRequiredGovernor;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerStorageLocation\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n bytes32 public DOMAIN_SEPARATOR;\\n\\n modifier onlyGovernor() virtual {\\n _requireGovernor(msg.sender);\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function __BridgeManager_init(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n __BridgeManagerQuorum_init_unchained(num, denom);\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\n }\\n\\n function __BridgeManager_init_unchained(\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n _setContract(ContractType.BRIDGE, bridgeContract);\\n\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,bytes32 salt)\\\"),\\n keccak256(\\\"BridgeManager\\\"), // name hash\\n keccak256(\\\"3\\\"), // version hash\\n keccak256(abi.encode(\\\"BRIDGE_MANAGER\\\", roninChainId)) // salt\\n )\\n );\\n\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n _setMinRequiredGovernor(3);\\n }\\n\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerStorageLocation\\n }\\n }\\n\\n // ===================== CONFIG ========================\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\n _setMinRequiredGovernor(min);\\n }\\n\\n function _setMinRequiredGovernor(uint min) internal {\\n if (min < 3) revert ErrInvalidInput();\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n $._minRequiredGovernor = min;\\n emit MinRequiredGovernorUpdated(min);\\n }\\n\\n /**\\n * @dev Internal function to require that the caller has governor role access.\\n */\\n function _requireGovernor(address addr) internal view {\\n if (_getGovernorWeight(addr) == 0) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\n }\\n }\\n\\n // ===================== WEIGHTS METHOD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getTotalWeight() public view returns (uint256) {\\n return _totalWeight();\\n }\\n\\n function _totalWeight() internal view override returns (uint256) {\\n return _getBridgeManagerStorage()._totalWeight;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\n weights = _getGovernorWeights(governors);\\n }\\n\\n /**\\n * @dev Internal function to get the vote weights of a given array of governors.\\n */\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n weights = new uint96[](governors.length);\\n\\n for (uint256 i; i < governors.length; i++) {\\n weights[i] = $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\n weight = _getGovernorWeight(governor);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\n */\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\n return _getBridgeManagerStorage()._governorWeight[governor];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\n sum = _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\n * @param governors The non-duplicated input.\\n */\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n for (uint256 i; i < governors.length; i++) {\\n sum += $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n return $._operatorWeight[bridgeOperator];\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n (uint256 numerator, uint256 denominator) = getThreshold();\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\n }\\n\\n // ===================== MANAGER CRUD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _removeBridgeOperators(bridgeOperators);\\n }\\n\\n /**\\n * @dev Internal function to add bridge operators.\\n *\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to add bridge operators.\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\n *\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\n */\\n function _addBridgeOperators(\\n uint96[] memory voteWeights,\\n address[] memory newGovernors,\\n address[] memory newOperators\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = newOperators.length;\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\n addeds = new bool[](length);\\n\\n // simply skip add operations if inputs are empty.\\n if (length == 0) return addeds;\\n\\n address iGovernor;\\n address iOperator;\\n uint96 iVoteWeight;\\n uint256 accumulatedWeight;\\n\\n for (uint256 i; i < length; i++) {\\n iGovernor = newGovernors[i];\\n iOperator = newOperators[i];\\n iVoteWeight = voteWeights[i];\\n\\n // Check non-zero inputs\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n\\n // Check not yet added operators\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\n\\n // Only add the valid operator\\n if (addeds[i]) {\\n // Add governor to list, update governor weight\\n $._governors.push(iGovernor);\\n $._governorWeight[iGovernor] = iVoteWeight;\\n\\n // Add operator to list, update governor weight\\n $._operators.push(iOperator);\\n $._operatorWeight[iOperator] = iVoteWeight;\\n\\n accumulatedWeight += iVoteWeight;\\n }\\n }\\n\\n $._totalWeight += accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\n\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\n }\\n\\n /**\\n * @dev Internal function to remove bridge operators.\\n *\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to remove bridge operators.\\n *\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\n */\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = removingOperators.length;\\n removeds = new bool[](length);\\n\\n // simply skip remove operations if inputs are empty.\\n if (length == 0) return removeds;\\n if ($._governors.length - length < $._minRequiredGovernor) {\\n revert ErrBelowMinRequiredGovernors();\\n }\\n\\n address iGovernor;\\n address iOperator;\\n uint256 accumulatedWeight;\\n uint idx;\\n\\n for (uint256 i; i < length; i++) {\\n iOperator = removingOperators[i];\\n\\n // Check non-zero inputs\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n\\n // Check existing operators\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\n\\n // Only remove the valid operator\\n if (removeds[i]) {\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\n\\n // Remove governor from list, update governor weight\\n uint lastIdx = $._governors.length - 1;\\n $._governors[idx] = $._governors[lastIdx];\\n $._governors.pop();\\n delete $._governorWeight[iGovernor];\\n\\n // Remove operator from list, update operator weight\\n $._operators[idx] = $._operators[lastIdx];\\n $._operators.pop();\\n delete $._operatorWeight[iOperator];\\n\\n accumulatedWeight += removingVoteWeight;\\n }\\n }\\n\\n $._totalWeight -= accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\n\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\n }\\n\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\n for (uint i; i < $_array.length; i++) {\\n if (addr == $_array[i]) {\\n return (true, i);\\n }\\n }\\n\\n return (false, type(uint256).max);\\n }\\n\\n // ================= MANAGER VIEW METHODS =============\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function totalBridgeOperator() external view returns (uint256) {\\n return _getBridgeManagerStorage()._operators.length;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function isBridgeOperator(address addr) external view returns (bool) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n return $._operatorWeight[addr] > 0;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperators() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._operators;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernors() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._governors;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getOperatorOf(address governor) external view returns (address operator) {\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\n if (!found) revert ErrGovernorNotFound(governor);\\n\\n return _getBridgeManagerStorage()._operators[idx];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorOf(address operator) external view returns (address governor) {\\n (governor,) = _getGovernorOf(operator);\\n }\\n\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\n if (!found) revert ErrOperatorNotFound(operator);\\n\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n governors = $._governors;\\n bridgeOperators = $._operators;\\n weights = _getGovernorWeights(governors);\\n }\\n}\\n\",\"keccak256\":\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { IBridgeManagerCallbackRegister } from \\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\n\\n/**\\n * @title BridgeManagerCallbackRegister\\n * @dev A contract that manages callback registrations and execution for a bridge.\\n */\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n /**\\n * @dev Storage slot for the address set of callback registers.\\n * @dev Value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\") - 1.\\n */\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\n\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\n _registerCallbacks(callbackRegisters);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\n _registerCallbacks(registers);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n\\n for (uint256 i; i < registers.length; i++) {\\n _callbackRegisters.remove(registers[i]);\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\n registers = _getCallbackRegisters().values();\\n }\\n\\n /**\\n * @dev Internal function to register multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n address register;\\n bool regSuccess;\\n\\n for (uint256 i; i < registers.length; i++) {\\n register = registers[i];\\n\\n _requireHasCode(register);\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\n\\n regSuccess = _callbackRegisters.add(register);\\n\\n emit CallbackRegistered(register, regSuccess);\\n }\\n }\\n\\n /**\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\n */\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\n }\\n }\\n\\n /**\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\n * @param callbackFnSig The function signature of the callback method.\\n * @param inputs The data to pass to the callback method.\\n * @return allSuccess Return true if all internal calls are success\\n */\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\n allSuccess = true;\\n\\n address[] memory registers = _getCallbackRegisters().values();\\n uint256 length = registers.length;\\n if (length == 0) return allSuccess;\\n\\n bool[] memory successes = new bool[](length);\\n bytes[] memory returnDatas = new bytes[](length);\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\n\\n for (uint256 i; i < length; i++) {\\n // First, attempt to call normally\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\n\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\n if (!successes[i]) {\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\n allSuccess = allSuccess && successes[i];\\n }\\n }\\n\\n emit Notified(callData, registers, successes, returnDatas);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the address set of callback registers.\\n * @return callbackRegisters The storage reference to the callback registers.\\n */\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\n assembly (\\\"memory-safe\\\") {\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IQuorum } from \\\"../../interfaces/IQuorum.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\n struct BridgeManagerQuorumStorage {\\n uint256 _nonce;\\n uint256 _numerator;\\n uint256 _denominator;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerQuorumStorage\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\n\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n $._nonce = 1;\\n\\n _setThreshold(num, denom);\\n }\\n\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerQuorumStorage\\n }\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n return ($._numerator, $._denominator);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\n\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n uint256 prevNum = $._numerator;\\n uint256 prevDenom = $._denominator;\\n\\n $._numerator = num;\\n $._denominator = denom;\\n\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\n }\\n\\n function _totalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/CoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"../../libraries/Ballot.sol\\\";\\nimport \\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/SignatureConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\n\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Error thrown when attempting to interact with a finalized vote.\\n */\\n error ErrVoteIsFinalized();\\n\\n /**\\n * @dev Error thrown when the current proposal is not completed.\\n */\\n error ErrCurrentProposalIsNotCompleted();\\n\\n struct ProposalVote {\\n VoteStatus status;\\n bytes32 hash;\\n uint256 againstVoteWeight; // Total weight of against votes\\n uint256 forVoteWeight; // Total weight of for votes\\n address[] forVoteds; // Array of addresses voting for\\n address[] againstVoteds; // Array of addresses voting against\\n uint256 expiryTimestamp;\\n mapping(address => Signature) sig;\\n mapping(address => bool) voted;\\n }\\n\\n /// @dev Emitted when a proposal is created\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\n /// @dev Emitted when the proposal is voted\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\n /// @dev Emitted when the proposal is approved\\n event ProposalApproved(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is reject\\n event ProposalRejected(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is expired\\n event ProposalExpired(bytes32 indexed proposalHash);\\n /// @dev Emitted when the proposal is executed\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\n /// @dev Emitted when the proposal expiry duration is changed.\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\n\\n /// @dev Mapping from chain id => vote round\\n /// @notice chain id = 0 for global proposal\\n mapping(uint256 => uint256) public round;\\n /// @dev Mapping from chain id => vote round => proposal vote\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\n\\n uint256 internal _proposalExpiryDuration;\\n\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\n __CoreGovernance_init_unchained(expiryDuration);\\n }\\n\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\n _setProposalExpiryDuration(expiryDuration);\\n }\\n\\n /**\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\n * if it is expired and not increase the `_round`.\\n */\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\n _round = round[_chainId];\\n // Skip checking for the first ever round\\n if (_round == 0) {\\n _round = round[_chainId] = 1;\\n } else {\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\n if (!_isExpired) {\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\n unchecked {\\n _round = ++round[_chainId];\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\n */\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\n _vote.hash = _proposalHash;\\n _vote.expiryTimestamp = _expiryTimestamp;\\n }\\n\\n /**\\n * @dev Proposes proposal struct.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\n uint256 chainId = proposal.chainId;\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n round_ = _createVotingRound(chainId);\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\n }\\n\\n /**\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the round.\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\n * proposal is approved, executed or rejected.\\n *\\n */\\n function _castVote(\\n Proposal.ProposalDetail memory proposal,\\n Ballot.VoteType support,\\n uint256 minimumForVoteWeight,\\n uint256 minimumAgainstVoteWeight,\\n address voter,\\n Signature memory signature,\\n uint256 voterWeight\\n ) internal virtual returns (bool done) {\\n uint256 chainId = proposal.chainId;\\n uint256 round_ = proposal.nonce;\\n ProposalVote storage _vote = vote[chainId][round_];\\n\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\n return true;\\n }\\n\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\n\\n _vote.voted[voter] = true;\\n // Stores the signature if it is not empty\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\n _vote.sig[voter] = signature;\\n }\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\n\\n uint256 _forVoteWeight;\\n uint256 _againstVoteWeight;\\n if (support == Ballot.VoteType.For) {\\n _vote.forVoteds.push(voter);\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\n } else if (support == Ballot.VoteType.Against) {\\n _vote.againstVoteds.push(voter);\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_forVoteWeight >= minimumForVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n if (proposal.isAutoExecute()) {\\n _tryExecute(_vote, proposal);\\n }\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n }\\n }\\n\\n /**\\n * @dev The specified executor executes the proposal on an approved proposal.\\n */\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\n bytes32 proposalHash = proposal.hash();\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\n\\n if (_vote.hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\n }\\n\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\n\\n _tryExecute(_vote, proposal);\\n }\\n\\n /**\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\n *\\n * Emits the event `ProposalExpired` if the vote is expired.\\n *\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\n * before or it will emit an unexpected event of `ProposalExpired`.\\n */\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\n\\n if (isExpired) {\\n emit ProposalExpired(proposalVote.hash);\\n\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n delete proposalVote.status;\\n delete proposalVote.hash;\\n delete proposalVote.againstVoteWeight;\\n delete proposalVote.forVoteWeight;\\n delete proposalVote.forVoteds;\\n delete proposalVote.againstVoteds;\\n delete proposalVote.expiryTimestamp;\\n }\\n }\\n\\n /**\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\n */\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\n if (proposal.executable()) {\\n vote_.status = VoteStatus.Executed;\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\n }\\n }\\n\\n /**\\n * @dev Sets the expiry duration for a new proposal.\\n */\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\n _proposalExpiryDuration = expiryDuration;\\n emit ProposalExpiryDurationChanged(expiryDuration);\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\n return vote_.voted[voter];\\n }\\n\\n /**\\n * @dev Returns total weight from validators.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns minimum vote to pass a proposal.\\n */\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\n */\\n function _getChainType() internal view virtual returns (ChainType);\\n}\\n\",\"keccak256\":\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"./CoreGovernance.sol\\\";\\n\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\n\\n /// @dev Emitted when a proposal is created\\n event GlobalProposalCreated(\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n bytes32 globalProposalHash,\\n GlobalProposal.GlobalProposalDetail globalProposal,\\n address creator\\n );\\n\\n /// @dev Emitted when the target options are updated\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\n\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\n }\\n\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\n _updateManyTargetOption(targetOptions, addrs);\\n }\\n\\n /**\\n * @dev Proposes for a global proposal.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobal(\\n uint256 expiryTimestamp,\\n GlobalProposal.TargetOption[] calldata targetOptions,\\n address executor,\\n uint256[] memory values,\\n bytes[] memory calldatas,\\n uint256[] memory gasAmounts,\\n address creator\\n ) internal virtual {\\n uint256 round_ = _createVotingRound(0);\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Proposes global proposal struct.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobalStruct(\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\n address creator\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n uint256 round_ = _createVotingRound(0);\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\n\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\n */\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\n }\\n\\n /**\\n * @dev Internal helper of {resolveTargets}.\\n *\\n * @param strict When the param is set to `true`, revert on non-existent target.\\n */\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\n targets = new address[](targetOptions.length);\\n\\n for (uint256 i; i < targetOptions.length; ++i) {\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\n }\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n *\\n * Requirement:\\n * - Only allow self-call through proposal.\\n *\\n */\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\n // HACK: Cannot reuse the existing library due to too deep stack\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n _updateManyTargetOption(targetOptions, targets);\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n */\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\n for (uint256 i; i < targetOptions.length; ++i) {\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\n _updateTargetOption(targetOptions[i], targets[i]);\\n }\\n }\\n\\n /**\\n * @dev Updates `targetOption` to `target`.\\n *\\n * Requirement:\\n * - Emit a `TargetOptionUpdated` event.\\n */\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\n _targetOptionsMap[targetOption] = target;\\n emit TargetOptionUpdated(targetOption, target);\\n }\\n}\\n\",\"keccak256\":\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\n\\nabstract contract CommonGovernanceRelay is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Relays votes by signatures.\\n *\\n * @notice Does not store the voter signature into storage.\\n *\\n */\\n function _relayVotesBySignatures(\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 proposalHash\\n ) internal {\\n if (!(_supports.length > 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\n\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\n\\n address[] memory _forVoteSigners = new address[](_signatures.length);\\n address[] memory _againstVoteSigners = new address[](_signatures.length);\\n\\n {\\n uint256 _forVoteCount;\\n uint256 _againstVoteCount;\\n\\n {\\n address _signer;\\n address _lastSigner;\\n Ballot.VoteType _support;\\n Signature calldata _sig;\\n\\n for (uint256 _i; _i < _signatures.length;) {\\n _sig = _signatures[_i];\\n _support = _supports[_i];\\n\\n if (_support == Ballot.VoteType.For) {\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\n _forVoteSigners[_forVoteCount++] = _signer;\\n } else if (_support == Ballot.VoteType.Against) {\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\n _againstVoteSigners[_againstVoteCount++] = _signer;\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\n _lastSigner = _signer;\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n assembly {\\n mstore(_forVoteSigners, _forVoteCount)\\n mstore(_againstVoteSigners, _againstVoteCount)\\n }\\n }\\n\\n ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce];\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _totalForVoteWeight = _sumWeight(_forVoteSigners);\\n if (_totalForVoteWeight >= _minimumForVoteWeight) {\\n if (_totalForVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n _tryExecute(_vote, _proposal);\\n return;\\n }\\n\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\n uint256 _totalAgainstVoteWeight = _sumWeight(_againstVoteSigners);\\n if (_totalAgainstVoteWeight >= _minimumAgainstVoteWeight) {\\n if (_totalAgainstVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n return;\\n }\\n\\n revert ErrRelayFailed(msg.sig);\\n }\\n\\n /**\\n * @dev Returns the weight of the governor list.\\n */\\n function _sumWeight(address[] memory _governors) internal view virtual returns (uint256);\\n\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\n}\\n\",\"keccak256\":\"0x48b03ea86a3e312de4242115554d2188891719bcd3a20d8e4504b03319ba6993\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../GlobalCoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceRelay.sol\\\";\\n\\nabstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGovernance {\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\n */\\n function globalProposalRelayed(uint256 _round) external view returns (bool) {\\n return vote[0][_round].status != VoteStatus.Pending;\\n }\\n\\n /**\\n * @dev Relays voted global proposal.\\n *\\n * Requirements:\\n * - The relay proposal is finalized.\\n *\\n */\\n function _relayGlobalProposal(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures,\\n address creator\\n ) internal {\\n Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator);\\n _relayVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\n }\\n}\\n\",\"keccak256\":\"0x1d168ae3300e07f3b6312c61ea3d6021a12722c7122d9f2f3f782909d47e05d4\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceRelay.sol\\\";\\n\\nabstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Relays voted proposal.\\n *\\n * Requirements:\\n * - The relay proposal is finalized.\\n *\\n */\\n function _relayProposal(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n address _creator\\n ) internal {\\n _proposeProposalStruct(_proposal, _creator);\\n _relayVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\n }\\n}\\n\",\"keccak256\":\"0x050da96d4079cfb515a09ee8a61d5b6c782adf4559b2c66b618bd51f41ca1cd4\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerCallbackRegister {\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\n\\n event CallbackRegistered(address, bool);\\n /**\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\n */\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\n\\n /**\\n * @dev Retrieves the addresses of registered callbacks.\\n * @return registers An array containing the addresses of registered callbacks.\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers);\\n\\n /**\\n * @dev Registers multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function registerCallbacks(address[] calldata registers) external;\\n\\n /**\\n * @dev Unregisters multiple callbacks from the bridge.\\n * @param registers The array of callback addresses to unregister.\\n */\\n function unregisterCallbacks(address[] calldata registers) external;\\n}\\n\",\"keccak256\":\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/ChainTypeConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface ChainTypeConsumer {\\n enum ChainType {\\n RoninChain,\\n Mainchain\\n }\\n}\\n\",\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/Ballot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\n\\nlibrary Ballot {\\n using ECDSA for bytes32;\\n\\n enum VoteType {\\n For,\\n Against\\n }\\n\\n // keccak256(\\\"Ballot(bytes32 proposalHash,uint8 support)\\\");\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\n\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, BALLOT_TYPEHASH)\\n mstore(add(ptr, 0x20), _proposalHash)\\n mstore(add(ptr, 0x40), _support)\\n digest := keccak256(ptr, 0x60)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\",\"license\":\"MIT\"},\"src/libraries/GlobalProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proposal.sol\\\";\\n\\nlibrary GlobalProposal {\\n /**\\n * @dev Error thrown when attempting to interact with an unsupported target.\\n */\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\n\\n enum TargetOption {\\n BridgeManager, // 0\\n GatewayContract, // 1\\n BridgeReward, // 2\\n BridgeSlash, // 3\\n BridgeTracking, // 4\\n PauseEnforcer // 5\\n\\n }\\n\\n struct GlobalProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n uint256 expiryTimestamp;\\n address executor;\\n TargetOption[] targetOptions;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = self.values;\\n TargetOption[] memory targets = self.targetOptions;\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\n uint256[] memory gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length;) {\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * proposal.nonce,\\n * proposal.expiryTimestamp,\\n * proposal.executor,\\n * targetsHash,\\n * valuesHash,\\n * calldatasHash,\\n * gasAmountsHash\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0x80), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n digest_ := keccak256(ptr, 0x100)\\n }\\n }\\n\\n /**\\n * @dev Converts into the normal proposal.\\n */\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\n detail_.nonce = self.nonce;\\n detail_.chainId = 0;\\n detail_.expiryTimestamp = self.expiryTimestamp;\\n detail_.executor = self.executor;\\n\\n detail_.targets = new address[](self.targetOptions.length);\\n detail_.values = self.values;\\n detail_.calldatas = self.calldatas;\\n detail_.gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\n detail_.targets[i] = targets[i];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\",\"license\":\"MIT\"},\"src/libraries/Proposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary Proposal {\\n /**\\n * @dev Error thrown when there is insufficient gas to execute a function.\\n */\\n error ErrInsufficientGas(bytes32 proposalHash);\\n\\n /**\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\n */\\n error ErrInvalidExpiryTimestamp();\\n\\n /**\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\n */\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\n\\n struct ProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n // Value 0: all chain should run this proposal\\n // Other values: only specific chain has to execute\\n uint256 chainId;\\n uint256 expiryTimestamp;\\n // The address that execute the proposal after the proposal passes.\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\n address executor;\\n address[] targets;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\n\\n /**\\n * @dev Validates the proposal.\\n */\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\n if (\\n !(\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\n && proposal.targets.length == proposal.gasAmounts.length\\n )\\n ) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\n revert ErrInvalidExpiryTimestamp();\\n }\\n }\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = proposal.values;\\n address[] memory targets = proposal.targets;\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length; ++i) {\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\n }\\n\\n // return\\n // keccak256(\\n // abi.encode(\\n // TYPE_HASH,\\n // proposal.nonce,\\n // proposal.chainId,\\n // proposal.expiryTimestamp\\n // proposal.executor\\n // targetsHash,\\n // valuesHash,\\n // calldatasHash,\\n // gasAmountsHash\\n // )\\n // );\\n // /\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0x100), arrayHashed)\\n digest_ := keccak256(ptr, 0x120)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\n */\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\n return proposal.executor == address(0);\\n }\\n\\n /**\\n * @dev Returns whether the proposal is executable for the current chain.\\n *\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\n *\\n */\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\n }\\n\\n /**\\n * @dev Executes the proposal.\\n */\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\n\\n successCalls = new bool[](proposal.targets.length);\\n returnDatas = new bytes[](proposal.targets.length);\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\n\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\n\\n if (!successCalls[i]) {\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\",\"license\":\"MIT\"},\"src/mainchain/MainchainBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { CoreGovernance } from \\\"../extensions/sequential-governance/CoreGovernance.sol\\\";\\nimport { GlobalCoreGovernance, GlobalGovernanceRelay } from \\\"../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\";\\nimport { GovernanceRelay } from \\\"../extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\";\\nimport { ContractType, BridgeManager } from \\\"../extensions/bridge-operator-governance/BridgeManager.sol\\\";\\nimport { Ballot } from \\\"../libraries/Ballot.sol\\\";\\nimport { Proposal } from \\\"../libraries/Proposal.sol\\\";\\nimport { GlobalProposal } from \\\"../libraries/GlobalProposal.sol\\\";\\nimport \\\"../utils/CommonErrors.sol\\\";\\n\\ncontract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGovernanceRelay {\\n uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255;\\n\\n function initialize(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights,\\n GlobalProposal.TargetOption[] memory targetOptions,\\n address[] memory targets\\n ) external initializer {\\n __CoreGovernance_init(DEFAULT_EXPIRY_DURATION);\\n __GlobalCoreGovernance_init(targetOptions, targets);\\n __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights);\\n }\\n\\n /**\\n * @dev See `GovernanceRelay-_relayProposal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n */\\n function relayProposal(\\n Proposal.ProposalDetail calldata proposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external onlyGovernor {\\n _requireExecutor(proposal.executor, msg.sender);\\n _relayProposal(proposal, supports_, signatures, msg.sender);\\n }\\n\\n /**\\n * @dev See `GovernanceRelay-_relayGlobalProposal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n */\\n function relayGlobalProposal(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external onlyGovernor {\\n _requireExecutor(globalProposal.executor, msg.sender);\\n _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender });\\n }\\n\\n function _requireExecutor(address executor, address caller) internal pure {\\n if (executor != address(0) && caller != executor) {\\n revert ErrNonExecutorCannotRelay(executor, caller);\\n }\\n }\\n\\n /**\\n * @dev Internal function to retrieve the minimum vote weight required for governance actions.\\n * @return minimumVoteWeight The minimum vote weight required for governance actions.\\n */\\n function _getMinimumVoteWeight() internal view override returns (uint256) {\\n return minimumVoteWeight();\\n }\\n\\n /**\\n * @dev Returns the expiry duration for a new proposal.\\n */\\n function getProposalExpiryDuration() external view returns (uint256) {\\n return _proposalExpiryDuration;\\n }\\n\\n /**\\n * @dev Internal function to retrieve the total weights of all governors.\\n * @return totalWeights The total weights of all governors combined.\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return getTotalWeight();\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of weights for a given array of governors.\\n * @param governors An array containing the addresses of governors to calculate the sum of weights.\\n * @return sumWeights The sum of weights for the provided governors.\\n */\\n function _sumWeight(address[] memory governors) internal view override returns (uint256) {\\n return _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the chain type of the contract.\\n * @return chainType The chain type, indicating the type of the chain the contract operates on (e.g., Mainchain).\\n */\\n function _getChainType() internal pure override returns (ChainType) {\\n return ChainType.Mainchain;\\n }\\n\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\n return DOMAIN_SEPARATOR;\\n }\\n}\\n\",\"keccak256\":\"0xea177997b7100f310369b8fd530ea48ab823b06a53424c14f150cef723584c02\",\"license\":\"MIT\"},\"src/types/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { LibTUint256Slot } from \\\"./operations/LibTUint256Slot.sol\\\";\\n\\ntype TUint256Slot is bytes32;\\n\\nusing {\\n LibTUint256Slot.add,\\n LibTUint256Slot.sub,\\n LibTUint256Slot.mul,\\n LibTUint256Slot.div,\\n LibTUint256Slot.load,\\n LibTUint256Slot.store,\\n LibTUint256Slot.addAssign,\\n LibTUint256Slot.subAssign,\\n LibTUint256Slot.preDecrement,\\n LibTUint256Slot.postDecrement,\\n LibTUint256Slot.preIncrement,\\n LibTUint256Slot.postIncrement\\n} for TUint256Slot global;\\n\",\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\"},\"src/types/operations/LibTUint256Slot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { TUint256Slot } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title LibTUint256Slot\\n * @dev Library for handling unsigned 256-bit integers.\\n */\\nlibrary LibTUint256Slot {\\n /// @dev value is equal to bytes4(keccak256(\\\"Panic(uint256)\\\"))\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\n /// @dev error code for {Arithmetic over/underflow} error\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\n /// @dev error code for {Division or modulo by 0} error\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\n\\n /**\\n * @dev Loads the value of the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @return val The loaded value.\\n */\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\n assembly {\\n val := sload(self)\\n }\\n }\\n\\n /**\\n * @dev Stores a value into the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to be stored.\\n */\\n function store(TUint256Slot self, uint256 other) internal {\\n assembly {\\n sstore(self, other)\\n }\\n }\\n\\n /**\\n * @dev Multiplies the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to multiply by.\\n * @return res The resulting value after multiplication.\\n */\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n if iszero(iszero(storedVal)) {\\n res := mul(storedVal, other)\\n\\n // Overflow check\\n if iszero(eq(other, div(res, storedVal))) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Divides the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to divide by.\\n * @return res The resulting value after division.\\n */\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n // revert if divide by zero\\n if iszero(other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, DIVISION_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n res := div(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction.\\n */\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n\\n // Underflow check\\n if lt(storedVal, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n\\n res := sub(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition.\\n */\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n res := add(storedVal, other)\\n\\n // Overflow check\\n if lt(res, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after incrementing.\\n */\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = addAssign(self, 1);\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\n * @param self The TUint256Slot variable.\\n * @return res The original value before incrementing.\\n */\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res + 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after decrementing.\\n */\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = subAssign(self, 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value before decrementing.\\n */\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res - 1);\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition and storage.\\n */\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = add(self, other));\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction and storage.\\n */\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = sub(self, other));\\n }\\n}\\n\",\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 23, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 58190, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 58193, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 104934, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "DOMAIN_SEPARATOR", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 106983, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "round", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 106991, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "vote", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)106921_storage))" + }, + { + "astId": 106993, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_proposalExpiryDuration", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 107715, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_targetOptionsMap", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_enum(TargetOption)111729,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32", + "base": "t_address" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(TargetOption)111729": { + "encoding": "inplace", + "label": "enum GlobalProposal.TargetOption", + "numberOfBytes": "1" + }, + "t_enum(VoteStatus)110681": { + "encoding": "inplace", + "label": "enum VoteStatusConsumer.VoteStatus", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(Signature)110672_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SignatureConsumer.Signature)", + "numberOfBytes": "32", + "value": "t_struct(Signature)110672_storage" + }, + "t_mapping(t_enum(TargetOption)111729,t_address)": { + "encoding": "mapping", + "key": "t_enum(TargetOption)111729", + "label": "mapping(enum GlobalProposal.TargetOption => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)106921_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(ProposalVote)106921_storage)" + }, + "t_mapping(t_uint256,t_struct(ProposalVote)106921_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVote)106921_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(ProposalVote)106921_storage": { + "encoding": "inplace", + "label": "struct CoreGovernance.ProposalVote", + "numberOfBytes": "288", + "members": [ + { + "astId": 106897, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(VoteStatus)110681" + }, + { + "astId": 106899, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "hash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 106901, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "againstVoteWeight", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 106903, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "forVoteWeight", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 106906, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "forVoteds", + "offset": 0, + "slot": "4", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 106909, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "againstVoteds", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 106911, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "expiryTimestamp", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 106916, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "sig", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Signature)110672_storage)" + }, + { + "astId": 106920, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "voted", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ] + }, + "t_struct(Signature)110672_storage": { + "encoding": "inplace", + "label": "struct SignatureConsumer.Signature", + "numberOfBytes": "96", + "members": [ + { + "astId": 110667, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "v", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 110669, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "r", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 110671, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "s", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1713254676, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "round(uint256)": { + "notice": "chain id = 0 for global proposal" + } + }, + "errors": { + "ErrBelowMinRequiredGovernors()": [ + { + "notice": "Error indicating that the governors list will go below minimum number of required governor." + } + ], + "ErrGovernorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying governor" + } + ], + "ErrGovernorNotMatch(address,address)": [ + { + "notice": "Error indicating that the msg.sender is not match the required governor" + } + ], + "ErrInvalidInput()": [ + { + "notice": "Common invalid input error" + } + ], + "ErrOperatorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying operator" + } + ] + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/MainchainBridgeManagerProxy.json b/deployments/sepolia/MainchainBridgeManagerProxy.json new file mode 100644 index 00000000..51a6890f --- /dev/null +++ b/deployments/sepolia/MainchainBridgeManagerProxy.json @@ -0,0 +1,218 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "admin", + "inputs": [], + "outputs": [ + { + "name": "admin_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "changeAdmin", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "functionDelegateCall", + "inputs": [ + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "implementation", + "inputs": [], + "outputs": [ + { + "name": "implementation_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeTo", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ], + "address": "0xdbf1c9FB0cb61Ae76901e55c5C04e77d2BE131A1", + "args": "0xf896f0700000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df", + "ast": "", + "blockNumber": 5709352, + "bytecode": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c665d628940e317f0b6d03df17271fb51c4d35c9dbf89cce5e4d9768343c58a864736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "chainId": 11155111, + "contractAbsolutePath": "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "deployedBytecode": "0x6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c665d628940e317f0b6d03df17271fb51c4d35c9dbf89cce5e4d9768343c58a864736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 24, + "numDeployments": 1, + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1713254676, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json b/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json index f5b1c2a0..6a29ede2 100644 --- a/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json +++ b/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json @@ -435,15 +435,15 @@ "inputs": [] } ], - "address": "0xC2cb024747e86a05A2d2839Dd02ceb78f939F983", + "address": "0x3C4e17b9056272Ce1b49F6900d8cFD6171a1869d", "args": "0x", "ast": "", - "blockNumber": 5632711, - "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca264697066735822122024939a448abbecaf74c9f8ef1d3326da17dd252cccddf0ade66be800061b239364736f6c63430008170033", + "blockNumber": 5709352, + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "PauseEnforcer.sol", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca264697066735822122024939a448abbecaf74c9f8ef1d3326da17dd252cccddf0ade66be800061b239364736f6c63430008170033", - "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, "kind": "dev", @@ -533,29 +533,29 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrNotOnEmergencyPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsNotOnPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsOnPaused\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"contract IPauseTarget\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SENTRY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"changeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergency\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"grantSentry\",\"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\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_sentries\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"revokeSentry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerUnpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrNotOnEmergencyPause()\":[{\"details\":\"Error thrown when the contract is not on emergency pause.\"}],\"ErrTargetIsNotOnPaused()\":[{\"details\":\"Error thrown when the target is not on paused state.\"}],\"ErrTargetIsOnPaused()\":[{\"details\":\"Error thrown when the target is already on paused state.\"}]},\"events\":{\"EmergencyPaused(address)\":{\"details\":\"Emitted when the emergency ppause is triggered by `account`.\"},\"EmergencyUnpaused(address)\":{\"details\":\"Emitted when the emergency unpause is triggered by `account`.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"TargetChanged(address)\":{\"details\":\"Emitted when the target is changed.\"}},\"kind\":\"dev\",\"methods\":{\"changeTarget(address)\":{\"details\":\"Setter for `target`. Requirements: - Only admin can call this method.\"},\"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. May emit a {RoleGranted} event.\"},\"grantSentry(address)\":{\"details\":\"Grants the SENTRY_ROLE to the specified address.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address[])\":{\"details\":\"Initializes the contract storage.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"revokeSentry(address)\":{\"details\":\"Revokes the SENTRY_ROLE from the specified address.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"triggerPause()\":{\"details\":\"Triggers a pause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is not already paused.\"},\"triggerUnpause()\":{\"details\":\"Triggers an unpause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is already paused. - The target contract is paused in emergency mode.\"}},\"stateVariables\":{\"emergency\":{\"details\":\"Indicating whether or not the target contract is paused in emergency mode.\"},\"target\":{\"details\":\"The contract that can be paused or unpaused by the SENTRY_ROLE.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/PauseEnforcer.sol\":\"PauseEnforcer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba8eb2d22f9321bd4660f6617c181d9611ff30a9b089408b8c6e2216d6d5cdc5\",\"dweb:/ipfs/QmTSJvhjHfnUV1j4hsqDv8PmLvGBLRs9gHLjTUXrUJ5Y9q\"]},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7ee05f28f549a5d6515e152580716b87636ed4bfab9812499a6e3803df88288b\",\"dweb:/ipfs/QmeEnhdwY1t5Y3YU5a4ffzgXuToydH2PNdNxV9W7dEPRQJ\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3dcc7b09bfa6e18aab262ca372f4a9b1fc82e294b430706a4e1378cf58e6a276\",\"dweb:/ipfs/QmT8oSAcesdctR15HMLhr2a1HRpXymxdjTfdtfTYJcj2N2\"]},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3313a8f9bb1f9476857c9050067b31982bf2140b83d84f3bc0cec1f62bbe947f\",\"dweb:/ipfs/Qma17Pk8NRe7aB4UD3jjVxk7nSFaov3eQyv86hcyqkwJRV\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d4831d777a29ebdf9f2caecd70e74b97bff1b70e53622fd0a02aed01e21c8271\",\"dweb:/ipfs/QmUqurVVnCc7XkMxb2k23TVQUtuhHZduJ3hTZarTJrqU24\"]},\"src/interfaces/IPauseTarget.sol\":{\"keccak256\":\"0xc91073e61da572de0087b41018fd30b03661d58e0c5061e7b9d1c9235cd7c1c3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0800b40eb3f323d0e450ca7e47f1eb68518d0bc71a4143d6026bf5ad8c9814a6\",\"dweb:/ipfs/QmeJS39F9UTNo9cFhbfgiYDNfvuMKMFnM8XHrj9x3iqbjo\"]},\"src/ronin/gateway/PauseEnforcer.sol\":{\"keccak256\":\"0x22412c51c9877e24696d4bf2e0ce86c2cd2a27c6dbd2633e6e9843f720d960e1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ff67aa9238c6f93a5722607b92fc5c9b4acf634d16acafe078d973784723eba8\",\"dweb:/ipfs/QmcxFuocVK5tnSkDvs7VMBZaFp3YCFLSFzrpNmqG98cCEo\"]}},\"version\":1}", - "nonce": 0, - "numDeployments": 1, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrNotOnEmergencyPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsNotOnPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsOnPaused\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"contract IPauseTarget\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SENTRY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"changeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergency\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"grantSentry\",\"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\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_sentries\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"revokeSentry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerUnpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrNotOnEmergencyPause()\":[{\"details\":\"Error thrown when the contract is not on emergency pause.\"}],\"ErrTargetIsNotOnPaused()\":[{\"details\":\"Error thrown when the target is not on paused state.\"}],\"ErrTargetIsOnPaused()\":[{\"details\":\"Error thrown when the target is already on paused state.\"}]},\"events\":{\"EmergencyPaused(address)\":{\"details\":\"Emitted when the emergency ppause is triggered by `account`.\"},\"EmergencyUnpaused(address)\":{\"details\":\"Emitted when the emergency unpause is triggered by `account`.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"TargetChanged(address)\":{\"details\":\"Emitted when the target is changed.\"}},\"kind\":\"dev\",\"methods\":{\"changeTarget(address)\":{\"details\":\"Setter for `target`. Requirements: - Only admin can call this method.\"},\"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. May emit a {RoleGranted} event.\"},\"grantSentry(address)\":{\"details\":\"Grants the SENTRY_ROLE to the specified address.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address[])\":{\"details\":\"Initializes the contract storage.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"revokeSentry(address)\":{\"details\":\"Revokes the SENTRY_ROLE from the specified address.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"triggerPause()\":{\"details\":\"Triggers a pause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is not already paused.\"},\"triggerUnpause()\":{\"details\":\"Triggers an unpause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is already paused. - The target contract is paused in emergency mode.\"}},\"stateVariables\":{\"emergency\":{\"details\":\"Indicating whether or not the target contract is paused in emergency mode.\"},\"target\":{\"details\":\"The contract that can be paused or unpaused by the SENTRY_ROLE.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/PauseEnforcer.sol\":\"PauseEnforcer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/interfaces/IPauseTarget.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IPauseTarget {\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external returns (bool);\\n}\\n\",\"keccak256\":\"0xc91073e61da572de0087b41018fd30b03661d58e0c5061e7b9d1c9235cd7c1c3\",\"license\":\"MIT\"},\"src/ronin/gateway/PauseEnforcer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../interfaces/IPauseTarget.sol\\\";\\n\\ncontract PauseEnforcer is AccessControlEnumerable, Initializable {\\n /**\\n * @dev Error thrown when the target is already on paused state.\\n */\\n error ErrTargetIsOnPaused();\\n\\n /**\\n * @dev Error thrown when the target is not on paused state.\\n */\\n error ErrTargetIsNotOnPaused();\\n\\n /**\\n * @dev Error thrown when the contract is not on emergency pause.\\n */\\n error ErrNotOnEmergencyPause();\\n\\n bytes32 public constant SENTRY_ROLE = keccak256(\\\"SENTRY_ROLE\\\");\\n\\n /// @dev The contract that can be paused or unpaused by the SENTRY_ROLE.\\n IPauseTarget public target;\\n /// @dev Indicating whether or not the target contract is paused in emergency mode.\\n bool public emergency;\\n\\n /// @dev Emitted when the emergency ppause is triggered by `account`.\\n event EmergencyPaused(address account);\\n /// @dev Emitted when the emergency unpause is triggered by `account`.\\n event EmergencyUnpaused(address account);\\n /// @dev Emitted when the target is changed.\\n event TargetChanged(IPauseTarget target);\\n\\n modifier onEmergency() {\\n if (!emergency) revert ErrNotOnEmergencyPause();\\n\\n _;\\n }\\n\\n modifier targetPaused() {\\n if (!target.paused()) revert ErrTargetIsOnPaused();\\n\\n _;\\n }\\n\\n modifier targetNotPaused() {\\n if (target.paused()) revert ErrTargetIsNotOnPaused();\\n\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /**\\n * @dev Initializes the contract storage.\\n */\\n function initialize(IPauseTarget _target, address _admin, address[] memory _sentries) external initializer {\\n _changeTarget(_target);\\n _setupRole(DEFAULT_ADMIN_ROLE, _admin);\\n for (uint _i; _i < _sentries.length;) {\\n _grantRole(SENTRY_ROLE, _sentries[_i]);\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Grants the SENTRY_ROLE to the specified address.\\n */\\n function grantSentry(address _sentry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _grantRole(SENTRY_ROLE, _sentry);\\n }\\n\\n /**\\n * @dev Revokes the SENTRY_ROLE from the specified address.\\n */\\n function revokeSentry(address _sentry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _revokeRole(SENTRY_ROLE, _sentry);\\n }\\n\\n /**\\n * @dev Triggers a pause on the target contract.\\n *\\n * Requirements:\\n * - Only be called by accounts with the SENTRY_ROLE,\\n * - The target contract is not already paused.\\n */\\n function triggerPause() external onlyRole(SENTRY_ROLE) targetNotPaused {\\n emergency = true;\\n target.pause();\\n emit EmergencyPaused(msg.sender);\\n }\\n\\n /**\\n * @dev Triggers an unpause on the target contract.\\n *\\n * Requirements:\\n * - Only be called by accounts with the SENTRY_ROLE,\\n * - The target contract is already paused.\\n * - The target contract is paused in emergency mode.\\n */\\n function triggerUnpause() external onlyRole(SENTRY_ROLE) onEmergency targetPaused {\\n emergency = false;\\n target.unpause();\\n emit EmergencyUnpaused(msg.sender);\\n }\\n\\n /**\\n * @dev Setter for `target`.\\n *\\n * Requirements:\\n * - Only admin can call this method.\\n */\\n function changeTarget(IPauseTarget _target) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _changeTarget(_target);\\n }\\n\\n /**\\n * @dev Internal helper for setting value to `target`.\\n */\\n function _changeTarget(IPauseTarget _target) internal {\\n target = _target;\\n emit TargetChanged(_target);\\n }\\n}\\n\",\"keccak256\":\"0x4a758f6cc62826d0f513903df7cf9e63a5bbd7420d3f8349595fabea346beb37\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 27, + "numDeployments": 2, "storageLayout": { "storage": [ { - "astId": 102425, + "astId": 56841, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_roles", "offset": 0, "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)102420_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)" }, { - "astId": 102739, + "astId": 57155, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_roleMembers", "offset": 0, "slot": "1", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)106833_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)64060_storage)" }, { - "astId": 103525, + "astId": 58190, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_initialized", "offset": 0, @@ -563,7 +563,7 @@ "type": "t_uint8" }, { - "astId": 103528, + "astId": 58193, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_initializing", "offset": 1, @@ -571,15 +571,15 @@ "type": "t_bool" }, { - "astId": 147977, + "astId": 121661, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "target", "offset": 2, "slot": "2", - "type": "t_contract(IPauseTarget)138692" + "type": "t_contract(IPauseTarget)110573" }, { - "astId": 147980, + "astId": 121664, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "emergency", "offset": 22, @@ -609,7 +609,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IPauseTarget)138692": { + "t_contract(IPauseTarget)110573": { "encoding": "inplace", "label": "contract IPauseTarget", "numberOfBytes": "20" @@ -621,19 +621,19 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_bytes32,t_struct(AddressSet)106833_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)64060_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)106833_storage" + "value": "t_struct(AddressSet)64060_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)102420_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)102420_storage" + "value": "t_struct(RoleData)56836_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -642,28 +642,28 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(AddressSet)106833_storage": { + "t_struct(AddressSet)64060_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 106832, + "astId": 64059, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)106532_storage" + "type": "t_struct(Set)63759_storage" } ] }, - "t_struct(RoleData)102420_storage": { + "t_struct(RoleData)56836_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", "numberOfBytes": "64", "members": [ { - "astId": 102417, + "astId": 56833, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "members", "offset": 0, @@ -671,7 +671,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 102419, + "astId": 56835, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "adminRole", "offset": 0, @@ -680,13 +680,13 @@ } ] }, - "t_struct(Set)106532_storage": { + "t_struct(Set)63759_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 106527, + "astId": 63754, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_values", "offset": 0, @@ -694,7 +694,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 106531, + "astId": 63758, "contract": "src/ronin/gateway/PauseEnforcer.sol:PauseEnforcer", "label": "_indexes", "offset": 0, @@ -715,7 +715,7 @@ } } }, - "timestamp": 1712300364, + "timestamp": 1713254676, "userdoc": { "version": 1, "kind": "user" diff --git a/deployments/sepolia/MainchainGatewayV3Logic.json b/deployments/sepolia/MainchainGatewayV3Logic.json index a805d2f1..984952fa 100644 --- a/deployments/sepolia/MainchainGatewayV3Logic.json +++ b/deployments/sepolia/MainchainGatewayV3Logic.json @@ -1,5 +1,10 @@ { "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, { "type": "fallback", "stateMutability": "payable" @@ -247,21 +252,21 @@ "name": "getRoninToken", "inputs": [ { - "name": "_mainchainToken", + "name": "mainchainToken", "type": "address", "internalType": "address" } ], "outputs": [ { - "name": "_token", + "name": "token", "type": "tuple", "internalType": "struct MappedTokenConsumer.MappedToken", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "tokenAddr", @@ -399,7 +404,7 @@ { "name": "_standards", "type": "uint8[]", - "internalType": "enum Token.Standard[]" + "internalType": "enum TokenStandard[]" } ], "outputs": [], @@ -418,6 +423,26 @@ "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "initializeV3", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeV4", + "inputs": [ + { + "name": "wethUnwrapper_", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "lastDateSynced", @@ -492,7 +517,7 @@ { "name": "_standards", "type": "uint8[]", - "internalType": "enum Token.Standard[]" + "internalType": "enum TokenStandard[]" } ], "outputs": [], @@ -515,7 +540,7 @@ { "name": "_standards", "type": "uint8[]", - "internalType": "enum Token.Standard[]" + "internalType": "enum TokenStandard[]" }, { "name": "_thresholds", @@ -552,6 +577,137 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "onBridgeOperatorsAdded", + "inputs": [ + { + "name": "operators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "weights", + "type": "uint96[]", + "internalType": "uint96[]" + }, + { + "name": "addeds", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onBridgeOperatorsRemoved", + "inputs": [ + { + "name": "operators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "removeds", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onERC1155BatchReceived", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onERC1155Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "pause", @@ -643,12 +799,12 @@ { "name": "info", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -818,28 +974,17 @@ "name": "setThreshold", "inputs": [ { - "name": "_numerator", + "name": "num", "type": "uint256", "internalType": "uint256" }, { - "name": "_denominator", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "_previousNum", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_previousDenom", + "name": "denom", "type": "uint256", "internalType": "uint256" } ], + "outputs": [], "stateMutability": "nonpayable" }, { @@ -895,7 +1040,7 @@ { "name": "mainchain", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -917,7 +1062,7 @@ { "name": "ronin", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -939,12 +1084,12 @@ { "name": "info", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -1035,7 +1180,7 @@ "name": "unlockWithdrawal", "inputs": [ { - "name": "_receipt", + "name": "receipt", "type": "tuple", "internalType": "struct Transfer.Receipt", "components": [ @@ -1052,7 +1197,7 @@ { "name": "mainchain", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1074,7 +1219,7 @@ { "name": "ronin", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1096,12 +1241,12 @@ { "name": "info", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -1128,6 +1273,19 @@ "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "wethUnwrapper", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract WethUnwrapper" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "withdrawalHash", @@ -1246,7 +1404,7 @@ { "name": "mainchain", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1268,7 +1426,7 @@ { "name": "ronin", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1290,12 +1448,12 @@ { "name": "info", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -1547,7 +1705,7 @@ "name": "standards", "type": "uint8[]", "indexed": false, - "internalType": "enum Token.Standard[]" + "internalType": "enum TokenStandard[]" } ], "anonymous": false @@ -1613,7 +1771,7 @@ { "name": "mainchain", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1635,7 +1793,7 @@ { "name": "ronin", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1657,12 +1815,12 @@ { "name": "info", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -1710,7 +1868,7 @@ { "name": "mainchain", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1732,7 +1890,7 @@ { "name": "ronin", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1754,12 +1912,12 @@ { "name": "info", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -1807,7 +1965,7 @@ { "name": "mainchain", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1829,7 +1987,7 @@ { "name": "ronin", "type": "tuple", - "internalType": "struct Token.Owner", + "internalType": "struct TokenOwner", "components": [ { "name": "addr", @@ -1851,12 +2009,12 @@ { "name": "info", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -1899,6 +2057,11 @@ } ] }, + { + "type": "error", + "name": "ErrERC1155MintingFailed", + "inputs": [] + }, { "type": "error", "name": "ErrERC20MintingFailed", @@ -2025,12 +2188,12 @@ { "name": "tokenInfo", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -2063,12 +2226,12 @@ { "name": "tokenInfo", "type": "tuple", - "internalType": "struct Token.Info", + "internalType": "struct TokenInfo", "components": [ { "name": "erc", "type": "uint8", - "internalType": "enum Token.Standard" + "internalType": "enum TokenStandard" }, { "name": "id", @@ -2115,6 +2278,27 @@ } ] }, + { + "type": "error", + "name": "ErrUnexpectedInternalCall", + "inputs": [ + { + "name": "msgSig", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expectedContractType", + "type": "uint8", + "internalType": "enum ContractType" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, { "type": "error", "name": "ErrUnsupportedStandard", @@ -2137,15 +2321,15 @@ ] } ], - "address": "0x762f3E2221C0DeE575d1Bd43145Bafeebe965ef2", + "address": "0x82f5483623D636BC3deBA8Ae67E1751b6CF2Bad2", "args": "0x", "ast": "", - "blockNumber": 5632711, - "bytecode": "0x608060405234801561001057600080fd5b506000805460ff1916905561470d8061002a6000396000f3fe60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614007565b90501115610f1d57610e85610e718680614007565b610e7e6020890189614007565b8787611a1f565b610eab610e928680614007565b8660005b602002810190610ea69190614007565b6123a2565b610ed1610eb88680614007565b8660015b602002810190610ecc9190614007565b61194a565b610ef7610ede8680614007565b8660025b602002810190610ef29190614007565b612477565b610f1d610f048680614007565b8660035b602002810190610f189190614007565b612588565b60005b610f2d6040870187614007565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614007565b84818110610f7757610f77613ff1565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d6110983685900385018561409f565b612843565b90506110b16110983685900385018561409f565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b9083908690614173565b60405180910390a160006111756080850160608601613a7f565b9050600061118b61012086016101008701614200565b600181111561119c5761119c613d3c565b036112635760006111b6368690038601610100870161421d565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc368790038701610100880161421d565b60408301519091506112139061014088013561424f565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a0161421d565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d0929190614173565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f9190614262565b60385461138c9084614262565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e69190614262565b60025461138c9084614262565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b369190614279565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b607680546000918261184983614293565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142ce565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b838110156119e95782828281811061199557611995613ff1565b90506020020135603a60008787858181106119b2576119b2613ff1565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d094939291906143f8565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b85811015611b7c57848482818110611a7557611a75613ff1565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa0613ff1565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd613ff1565b9050602002016020810190611b129190614200565b60786000898985818110611b2857611b28613ff1565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c368890038801610100890161421d565b612c6d565b6001611db36040880160208901614200565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d61012088016101008901614200565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a01614200565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a61409f565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d01614200565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca613ff1565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b36919061439a565b84935061208685613229565b61209090836144be565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d90614173565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611297919061421d565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be929190614173565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b6002546037546123659190614262565b6038546001546123759190614262565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612441578282828181106123ed576123ed613ff1565b905060200201356039600087878581811061240a5761240a613ff1565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d094939291906143f8565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b8381101561255257620f42408383838181106124c6576124c6613ff1565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe613ff1565b90506020020135603b600087878581811061251b5761251b613ff1565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d094939291906143f8565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612627578282828181106125d3576125d3613ff1565b90506020020135603c60008787858181106125f0576125f0613ff1565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d094939291906143f8565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144d1565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144be565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101291906144f3565b60006002546001600254846001546127a69190614262565b6127b091906144be565b6127ba919061424f565b610a7691906144d1565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d8385614262565b610ff991906144d1565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b91906144f3565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061424f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add9190614530565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd9190614530565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d699190614530565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd6919061454c565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b9190614530565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b36949392919061456e565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145a4565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614619565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a1919061464c565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144d1565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144be565b9091555050505050565b600082600001828154811061335c5761335c613ff1565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b369392919061467a565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009286169161349391614530565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef836002614262565b6134fa9060026144be565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b8160008151811061355757613557613ff1565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061358657613586613ff1565b60200101906001600160f81b031916908160001a90535060006135aa846002614262565b6135b59060016144be565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e9613ff1565b1a60f81b8282815181106135ff576135ff613ff1565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146aa565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361424f565b85549091506000906137039060019061424f565b905081811461376857600086600001828154811061372357613723613ff1565b906000526020600020015490508087600001848154811061374657613746613ff1565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146c1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a69190614262565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916138339190614530565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a0919061454c565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b613fc1613ecb565b823560ff81168114613fd257600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261401e57600080fd5b83018035915067ffffffffffffffff82111561403957600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561406357600080fd5b61406b613ecb565b9050813561407881613a5f565b8152602082013561408881613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140b257600080fd5b60405160a0810181811067ffffffffffffffff821117156140e357634e487b7160e01b600052604160045260246000fd5b6040528235815260208301356140f881613f02565b602082015261410a8460408501614051565b604082015261411c8460a08501614051565b606082015261412f846101008501613f0f565b60808201529392505050565b803561414681613a5f565b6001600160a01b03908116835260208201359061416282613a5f565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561419481613f02565b61419d81613d52565b806040840152506141b4606083016040850161413b565b6141c460c0830160a0850161413b565b6101206101008401356141d681613f02565b6141df81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561421257600080fd5b8135610ff981613f02565b60006060828403121561422f57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614239565b8082028115828204841417610a7657610a76614239565b602081016010831061428d5761428d613d3c565b91905290565b6000600182016142a5576142a5614239565b5060010190565b80516142b781613d52565b825260208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516142ef81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143646101208401826142ac565b509392505050565b6001600160e01b03198316815260408101600b831061438d5761438d613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156143ed5781356143d281613a5f565b6001600160a01b0316875295820195908201906001016143bf565b509495945050505050565b60408152600061440c6040830186886143af565b82810360208401528381526001600160fb1b0384111561442b57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061445860608301888a6143af565b6020838203602085015261446d82888a6143af565b848103604086015285815286925060200160005b868110156144af57833561449481613f02565b61449d81613d52565b82529282019290820190600101614481565b509a9950505050505050505050565b80820180821115610a7657610a76614239565b6000826144ee57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561450557600080fd5b5051919050565b60005b8381101561452757818101518382015260200161450f565b50506000910152565b6000825161454281846020870161450c565b9190910192915050565b60006020828403121561455e57600080fd5b81518015158114610ff957600080fd5b60c0810161457c82876142ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516145dc81601785016020880161450c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161460d81602884016020880161450c565b01602801949350505050565b602081526000825180602084015261463881604085016020870161450c565b601f01601f19169190910160400192915050565b60006020828403121561465e57600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a0810161468882866142ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146b9576146b9614239565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec8cc7f89d632f5b6c36d2cdb75ab664383134c4e4a6f2157e2624267b4eadfe64736f6c63430008170033", + "blockNumber": 5709352, + "bytecode": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b607154610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60715460ff9081161015620000ec576071805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61556180620000fe6000396000f3fe60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a264697066735822122039bdd676fa56a806e2f91eb197d0a444b13ff0899114d328ae5983c28d58606164736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "MainchainGatewayV3.sol", - "deployedBytecode": "0x60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614007565b90501115610f1d57610e85610e718680614007565b610e7e6020890189614007565b8787611a1f565b610eab610e928680614007565b8660005b602002810190610ea69190614007565b6123a2565b610ed1610eb88680614007565b8660015b602002810190610ecc9190614007565b61194a565b610ef7610ede8680614007565b8660025b602002810190610ef29190614007565b612477565b610f1d610f048680614007565b8660035b602002810190610f189190614007565b612588565b60005b610f2d6040870187614007565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614007565b84818110610f7757610f77613ff1565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d6110983685900385018561409f565b612843565b90506110b16110983685900385018561409f565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b9083908690614173565b60405180910390a160006111756080850160608601613a7f565b9050600061118b61012086016101008701614200565b600181111561119c5761119c613d3c565b036112635760006111b6368690038601610100870161421d565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc368790038701610100880161421d565b60408301519091506112139061014088013561424f565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a0161421d565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d0929190614173565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f9190614262565b60385461138c9084614262565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e69190614262565b60025461138c9084614262565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b369190614279565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b607680546000918261184983614293565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142ce565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b838110156119e95782828281811061199557611995613ff1565b90506020020135603a60008787858181106119b2576119b2613ff1565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d094939291906143f8565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b85811015611b7c57848482818110611a7557611a75613ff1565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa0613ff1565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd613ff1565b9050602002016020810190611b129190614200565b60786000898985818110611b2857611b28613ff1565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b3692919061436c565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c368890038801610100890161421d565b612c6d565b6001611db36040880160208901614200565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d61012088016101008901614200565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a01614200565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a61409f565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d01614200565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca613ff1565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b36919061439a565b84935061208685613229565b61209090836144be565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d90614173565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611297919061421d565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be929190614173565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b6002546037546123659190614262565b6038546001546123759190614262565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b36919061439a565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612441578282828181106123ed576123ed613ff1565b905060200201356039600087878581811061240a5761240a613ff1565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d094939291906143f8565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b8381101561255257620f42408383838181106124c6576124c6613ff1565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe613ff1565b90506020020135603b600087878581811061251b5761251b613ff1565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d094939291906143f8565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b36919061439a565b60005b83811015612627578282828181106125d3576125d3613ff1565b90506020020135603c60008787858181106125f0576125f0613ff1565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d094939291906143f8565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144d1565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144be565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101291906144f3565b60006002546001600254846001546127a69190614262565b6127b091906144be565b6127ba919061424f565b610a7691906144d1565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d8385614262565b610ff991906144d1565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b91906144f3565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061424f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add9190614530565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd9190614530565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d699190614530565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd6919061454c565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b9190614530565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b36949392919061456e565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145a4565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614619565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a1919061464c565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144d1565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144be565b9091555050505050565b600082600001828154811061335c5761335c613ff1565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b369392919061467a565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009286169161349391614530565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef836002614262565b6134fa9060026144be565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b8160008151811061355757613557613ff1565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061358657613586613ff1565b60200101906001600160f81b031916908160001a90535060006135aa846002614262565b6135b59060016144be565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e9613ff1565b1a60f81b8282815181106135ff576135ff613ff1565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146aa565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361424f565b85549091506000906137039060019061424f565b905081811461376857600086600001828154811061372357613723613ff1565b906000526020600020015490508087600001848154811061374657613746613ff1565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146c1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a69190614262565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916138339190614530565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a0919061454c565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b613fc1613ecb565b823560ff81168114613fd257600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261401e57600080fd5b83018035915067ffffffffffffffff82111561403957600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561406357600080fd5b61406b613ecb565b9050813561407881613a5f565b8152602082013561408881613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140b257600080fd5b60405160a0810181811067ffffffffffffffff821117156140e357634e487b7160e01b600052604160045260246000fd5b6040528235815260208301356140f881613f02565b602082015261410a8460408501614051565b604082015261411c8460a08501614051565b606082015261412f846101008501613f0f565b60808201529392505050565b803561414681613a5f565b6001600160a01b03908116835260208201359061416282613a5f565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561419481613f02565b61419d81613d52565b806040840152506141b4606083016040850161413b565b6141c460c0830160a0850161413b565b6101206101008401356141d681613f02565b6141df81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561421257600080fd5b8135610ff981613f02565b60006060828403121561422f57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614239565b8082028115828204841417610a7657610a76614239565b602081016010831061428d5761428d613d3c565b91905290565b6000600182016142a5576142a5614239565b5060010190565b80516142b781613d52565b825260208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516142ef81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143646101208401826142ac565b509392505050565b6001600160e01b03198316815260408101600b831061438d5761438d613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156143ed5781356143d281613a5f565b6001600160a01b0316875295820195908201906001016143bf565b509495945050505050565b60408152600061440c6040830186886143af565b82810360208401528381526001600160fb1b0384111561442b57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061445860608301888a6143af565b6020838203602085015261446d82888a6143af565b848103604086015285815286925060200160005b868110156144af57833561449481613f02565b61449d81613d52565b82529282019290820190600101614481565b509a9950505050505050505050565b80820180821115610a7657610a76614239565b6000826144ee57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561450557600080fd5b5051919050565b60005b8381101561452757818101518382015260200161450f565b50506000910152565b6000825161454281846020870161450c565b9190910192915050565b60006020828403121561455e57600080fd5b81518015158114610ff957600080fd5b60c0810161457c82876142ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516145dc81601785016020880161450c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161460d81602884016020880161450c565b01602801949350505050565b602081526000825180602084015261463881604085016020870161450c565b601f01601f19169190910160400192915050565b60006020828403121561465e57600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a0810161468882866142ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146b9576146b9614239565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec8cc7f89d632f5b6c36d2cdb75ab664383134c4e4a6f2157e2624267b4eadfe64736f6c63430008170033", - "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", + "deployedBytecode": "0x60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a264697066735822122039bdd676fa56a806e2f91eb197d0a444b13ff0899114d328ae5983c28d58606164736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, "kind": "dev", @@ -2204,6 +2388,26 @@ "minimumVoteWeight()": { "details": "Returns the minimum vote weight to pass the threshold." }, + "onBridgeOperatorsAdded(address[],uint96[],bool[])": { + "details": "Handles the event when bridge operators are added.", + "params": { + "addeds": "The corresponding boolean values indicating whether the operators were added or not.", + "bridgeOperators": "The addresses of the bridge operators." + }, + "returns": { + "_0": "The selector of the function being called." + } + }, + "onBridgeOperatorsRemoved(address[],bool[])": { + "details": "Handles the event when bridge operators are removed.", + "params": { + "bridgeOperators": "The addresses of the bridge operators.", + "removeds": "The corresponding boolean values indicating whether the operators were removed or not." + }, + "returns": { + "_0": "The selector of the function being called." + } + }, "pause()": { "details": "Triggers paused state." }, @@ -2259,9 +2463,6 @@ "submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])": { "details": "Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released." }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, "unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { "details": "Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released." }, @@ -2334,6 +2535,11 @@ "details": "Error of invalid role." } ], + "ErrERC1155MintingFailed()": [ + { + "details": "Error indicating that the mint of ERC1155 tokens has failed." + } + ], "ErrERC20MintingFailed()": [ { "details": "Error indicating that the minting of ERC20 tokens has failed." @@ -2445,7 +2651,7 @@ ], "ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)": [ { - "details": "Error indicating that the `transferFrom` has failed.", + "details": "Error indicating that the `handleAssetIn` has failed.", "params": { "from": "Owner of the token value.", "to": "Receiver of the token value.", @@ -2463,6 +2669,16 @@ } } ], + "ErrUnexpectedInternalCall(bytes4,uint8,address)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "actual": "The actual address that called to the function.", + "expectedContractType": "The contract type required to perform the function.", + "msgSig": "The function signature (bytes4)." + } + } + ], "ErrUnsupportedStandard()": [ { "details": "Error indicating that an unsupported standard is encountered." @@ -2481,13 +2697,13 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForApprovedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForInsufficientVoteWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForProcessedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrReachedDailyWithdrawalLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum Token.Standard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"_mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"_token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidPercentage()\":[{\"details\":\"Error of invalid percentage.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForApprovedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for an approved withdrawal.\"}],\"ErrQueryForInsufficientVoteWeight()\":[{\"details\":\"Error indicating that a query was made for insufficient vote weight.\"}],\"ErrQueryForProcessedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for a processed withdrawal.\"}],\"ErrReachedDailyWithdrawalLimit()\":[{\"details\":\"Error indicating that the daily withdrawal limit has been reached.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `transferFrom` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"DailyWithdrawalLimitsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the daily limit thresholds are updated\"},\"DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the deposit is requested\"},\"HighTierThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\"},\"HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the high-tier vote weight threshold is updated\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LockedThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for locked withdrawals are updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"TokenMapped(address[],address[],uint8[])\":{\"details\":\"Emitted when the tokens are mapped\"},\"UnlockFeePercentagesUpdated(address[],uint256[])\":{\"details\":\"Emitted when the fee percentages to unlock withdraw are updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is locked\"},\"WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is unlocked\"},\"Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are withdrawn\"},\"WrappedNativeTokenContractUpdated(address)\":{\"details\":\"Emitted when the wrapped native token contract is updated\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"______deprecatedBridgeOperatorAddedBlock\":{\"custom:deprecated\":\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\"},\"______deprecatedBridgeOperators\":{\"custom:deprecated\":\"Previously `_bridgeOperators` (uint256[])\"},\"_domainSeparator\":{\"details\":\"Domain seperator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainGatewayV3.sol\":\"MainchainGatewayV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba8eb2d22f9321bd4660f6617c181d9611ff30a9b089408b8c6e2216d6d5cdc5\",\"dweb:/ipfs/QmTSJvhjHfnUV1j4hsqDv8PmLvGBLRs9gHLjTUXrUJ5Y9q\"]},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7ee05f28f549a5d6515e152580716b87636ed4bfab9812499a6e3803df88288b\",\"dweb:/ipfs/QmeEnhdwY1t5Y3YU5a4ffzgXuToydH2PNdNxV9W7dEPRQJ\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3dcc7b09bfa6e18aab262ca372f4a9b1fc82e294b430706a4e1378cf58e6a276\",\"dweb:/ipfs/QmT8oSAcesdctR15HMLhr2a1HRpXymxdjTfdtfTYJcj2N2\"]},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://383fb7b8181016ac5ccf07bc9cdb7c1b5045ea36e2cc4df52bcbf20396fc7688\",\"dweb:/ipfs/QmYJ7Cg4WmE3rR8KGQxjUCXFfTH6TcwZ2Z1f6tPrq7jHFr\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://96b6d77a20bebd4eb06b801d3d020c7e82be13bd535cb0d0a6b7181c51dab5d5\",\"dweb:/ipfs/QmPUR9Cv9jNFdQX6PtBfaBW1ZCnKwiu65R2VD5kbdanDyn\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://89c2a0f70157c13845be5cb49b078a6374fee3a78fa950052a3af26190255da8\",\"dweb:/ipfs/QmUcvMEQH1oMM2pUyMuDiBUKdvvnTz1NRB8bmPHrVq8725\"]},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8831721b6f4cc26534d190f9f1631c3f59c9ff38efdd911f85e0882b8e360472\",\"dweb:/ipfs/QmQZnLErZNStirSQ13ZNWQgvEYUtGE5tXYwn4QUPaVUfPN\"]},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a6c4477d480bac20d681ade0e712b77ad828acf530a1d5c0abc5fb78068a05a1\",\"dweb:/ipfs/QmdBqsK8CcUceTeWzhHwFDEvKMoHimwtV96Lbim7ZBtCb8\"]},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3313a8f9bb1f9476857c9050067b31982bf2140b83d84f3bc0cec1f62bbe947f\",\"dweb:/ipfs/Qma17Pk8NRe7aB4UD3jjVxk7nSFaov3eQyv86hcyqkwJRV\"]},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ddabb16009cd17eaca3143feadf450ac13e72919ebe2ca50e00f61cb78bc004\",\"dweb:/ipfs/QmSPwPxX7d6TTWakN5jy5wsaGkS1y9TW8fuhGSraMkLk2B\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://20a97f891d06f0fe91560ea1a142aaa26fdd22bed1b51606b7d48f670deeb50f\",\"dweb:/ipfs/QmTbCtZKChpaX5H2iRiTDMcSz29GSLCpTCDgJpcMR4wg8x\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://39e096c60a6eb1c6a257122d515496bd92d0c6a693a8f07acb6aa4b1263e95d4\",\"dweb:/ipfs/QmPs5trJBacCiSkezP6tpevapuRYWNY6mqSFzsMCJj7e6B\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bf52bdf22a33263f5ca6227a35faeac3b81e7d2c692fbcc6a079d488710c5900\",\"dweb:/ipfs/QmcmsjkP4yq3UhiJbvyzwufaY2EKh1zhHaRK8ATag2cpD2\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d4831d777a29ebdf9f2caecd70e74b97bff1b70e53622fd0a02aed01e21c8271\",\"dweb:/ipfs/QmUqurVVnCc7XkMxb2k23TVQUtuhHZduJ3hTZarTJrqU24\"]},\"src/extensions/GatewayV3.sol\":{\"keccak256\":\"0xfcb8d4fa4358387c477a40da4d8a5108c298f23333c4161ce939c1b27a09ffde\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c29d478e6cc8a5a36a6986ba2a8bd39cea69c9171488cf0a8f8043fd5c3622a\",\"dweb:/ipfs/QmXUn3Y2AXDca9VAGzvWoYK6kV9NMXJ7Dh4DMf1LUPJgGn\"]},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://370c93bc1e962fcf8eab41d217d901716769f05c51a2cb25aae12abc84e871da\",\"dweb:/ipfs/QmQYL5QrJmXCdi5UN9K7imt1iPm9ydZQm6ifShpt451afd\"]},\"src/extensions/WithdrawalLimitation.sol\":{\"keccak256\":\"0xb574848e6c3fa2ceeb7f5e907bc76dc096ef577315dbf78452f9640bd92d8a32\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0bf1b3bd2046f7b5faa55da45b80ab972135d931b31c5a54c66415707089bbc6\",\"dweb:/ipfs/QmRDLTzXTG2UnSv8zqLfiPak3Ayx8U256Thytr8NKaNiC8\"]},\"src/extensions/collections/HasContracts.sol\":{\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b8903232a7a609b250a1ff2e9522a2366979652145af74637f9c0089916e3da3\",\"dweb:/ipfs/QmVoxZamJEhjYhr9RKVSAKGzakgqmFLfZXhZcDGor7DZe5\"]},\"src/extensions/collections/HasProxyAdmin.sol\":{\"keccak256\":\"0x0916021d04ea0c93c54978dc2fd46575fd2bd867369fbf9ce49f316939ddaf25\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e220c59eb50b4e206d0a126f8cd2f7f2aa6865f56a0b4b091149e6928bf97b8\",\"dweb:/ipfs/QmRBk5hhn1w2MghZ8pRfaU1CvgRAZN7nZvxySSPDvkVuGp\"]},\"src/interfaces/IMainchainGatewayV3.sol\":{\"keccak256\":\"0xa82b8172f40ec733e5a03b019a8a7d597af284779c872c620ecc91a28af55461\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cb6989a96dea2d796752c6c8d9a54e6551b158a21c5d22702abd5d9fa715d4c4\",\"dweb:/ipfs/Qmd1mMZz7H3WtJ4ckKRjfc98opazaKhnq6WDnKD3e4U9yJ\"]},\"src/interfaces/IQuorum.sol\":{\"keccak256\":\"0x6b7920b04a73a0e1ff7404aa1a3b5fc738fc0b6154839480f666fd69b55123f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a8c81134e4632e1240aead39fd5393b376a4be53668caf2a390f511f3c6d422d\",\"dweb:/ipfs/QmWPaQPP1WkpdPjLhK7wFXsih8HWs6kRQqjX5zGLu6McGH\"]},\"src/interfaces/IWETH.sol\":{\"keccak256\":\"0x8acead2ae4364dee80c9bc76d52cc04d3763105e1743728e67d237f816155142\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c90c7fa5b39a2ca17297cd3548a2d9763c7ab1c2873d8c202c3633f7be98d7b\",\"dweb:/ipfs/QmUPRnUXTrJRR7aogvDrfgjzj9haHfcmMqksoTDxC3ZbgQ\"]},\"src/interfaces/bridge/IBridgeManager.sol\":{\"keccak256\":\"0x9339ce2f14bc1e4d0e368a351506ff5735bcbc0a2e41aa633149198bbed76a60\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c234bc4f4faa82434fcfeab5b50af61b7027a75f3f773b70b542860d10607574\",\"dweb:/ipfs/QmYPcxU5UMEEoxQphF8KA6P7jCRuGAXRjvoiu3McYfuxER\"]},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"keccak256\":\"0xfd6868a1041577a463b6c96713edcb18063dc817154d09710abfd5783e4629ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://acaccf9b0280ec924dfdd641d122da9c0d6944c6bcf55019682ab5f7a925ab32\",\"dweb:/ipfs/QmR4ta1PNirxkJEiSqJVfEo9CRxQjvdfKZMGzf84nekZos\"]},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c34d339fa8e240c62ea8da11b4fe8745fbe5b6091dbcd40505160ae952f33e16\",\"dweb:/ipfs/QmR6CBz9VAvCSTR7uS3R4yocptsHPz3aodqdDEwSc2xZaE\"]},\"src/interfaces/collections/IHasContracts.sol\":{\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://03390ff29b496e244faf4eab55565712f0aea5fecdcb915e3c5866ef29d5686d\",\"dweb:/ipfs/QmdGpXn3VSxfNvjFBxfho7rc41JTq5m6bonrfmpzShhRVs\"]},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"keccak256\":\"0xfa220e968221af9b789e6c1dc4133631e90600c4a2bd63b7f01e96cb01f13e9b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://29643ec9bc5ac71e1500bd752585bff52e58ec42da4e892a9f01e7be5bf1fbf7\",\"dweb:/ipfs/QmetcnBNnvrUVonAKawF9mS3JzeDwAsBdp4tG3kC2qwoMA\"]},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba168a64188bbbecbac288295bd9d5ce6dc215f876b144271428a6f91cba792a\",\"dweb:/ipfs/QmX3bM7QUo2xHxsXetU9RtXG11sKktvrdGovSJfxPEy5QN\"]},\"src/libraries/AddressArrayUtils.sol\":{\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://3a413f290b8e81540bc6feb739bcfbacf56419b2e657bbce5be43826569b4406\",\"dweb:/ipfs/QmWRjGLBXs7WK92oPm51QpjxMYGuMTBx85Pv7QcGbUZE72\"]},\"src/libraries/Token.sol\":{\"keccak256\":\"0x8d11e48d878ba37ea2ca7395dceaa5591bb9ba2d4e5fdac1565760456e104991\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9d5cc02a0ba8d1bb1e757321ce6b4a2a3100dfd9ba2b7d2eb1510017c80b0cb0\",\"dweb:/ipfs/QmUzXg9R4v9Er3CYeNeL3ZCouPxCe9pJP6mCmZ8RVXFHsP\"]},\"src/libraries/Transfer.sol\":{\"keccak256\":\"0xe73e11942bcae9034abc2058e9976a583e3518bdfeefa863e97cb6e51edf4522\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ccacabe19f50e8a76618eda6c8296f2f732a7c67fcbb925c8d66657f5c53703e\",\"dweb:/ipfs/QmXc6cdqnaApGPrPk34hqfzQ3aDan3rTacPezqmChgLMvd\"]},\"src/mainchain/MainchainGatewayV3.sol\":{\"keccak256\":\"0x6d9923fbf928b82fcf10506e5637fe851e87db9a6d9cbc4297c8e2d9ac1f11d5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://00dd9001904b7cc0196c7035972db0d5b38ec77e804bd8cd58b620b2cc23b153\",\"dweb:/ipfs/QmSMkGX4MRryJ3Lsf6NiuG5SZrV2L5T8DqgQFRQmLwgi8R\"]},\"src/utils/CommonErrors.sol\":{\"keccak256\":\"0x22942c8fea2d1ca863ac1f9c1662d714b8ac0856684e36f8aaf19508648c1053\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7e47ff198edb68a65d65938c67f860c041a4b7f64cff5b101a333869096044b\",\"dweb:/ipfs/QmTFwEY7jPiUSKc3GvYDY7qHqXJzUYCmSjoVrcgFhi8gZz\"]},\"src/utils/ContractType.sol\":{\"keccak256\":\"0x7f547a44265f4c4b03d8971f7fc5eaa2e6064ea8cd509c1b761108f9800dab68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://130e3f8353d9f34098fbf2867c3bf812a5184904d0113d55c5c820eb64f2547b\",\"dweb:/ipfs/QmeFSUbPi8fyG1W7kKegFRtCqALjQBXQyVvQ4sjpi6SWH3\"]},\"src/utils/IdentityGuard.sol\":{\"keccak256\":\"0x2d0dfcef3636945bc1785c1fa5a05f5203c79cbb81b2eee92a3ac6a2378c2ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5e4cedc10e50bfaacdc732eab78768b5e0abbc8336eeaffa15de2a7be90de504\",\"dweb:/ipfs/QmR17AgM71NkH5ZeLpmaRMzPyXAKyhafoK2TZUnLw2z3Mv\"]},\"src/utils/RoleAccess.sol\":{\"keccak256\":\"0x7da4631824b53be17e246102ad59458f91f2395710561ac9bface18d35fb2502\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://070d8254ea4d6fde54ae02e121bb84bdb63a3c5a8513d2d364ad5038f6a95493\",\"dweb:/ipfs/QmfXpp3t8XcGFXewoVRmoQMKJb9vPo95Kj4vsGfNBf7gSH\"]}},\"version\":1}", - "nonce": 2, - "numDeployments": 1, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC1155MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForApprovedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForInsufficientVoteWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForProcessedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrReachedDailyWithdrawalLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum TokenStandard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"wethUnwrapper_\",\"type\":\"address\"}],\"name\":\"initializeV4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"},{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsAdded\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"removeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsRemoved\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wethUnwrapper\",\"outputs\":[{\"internalType\":\"contract WethUnwrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC1155MintingFailed()\":[{\"details\":\"Error indicating that the mint of ERC1155 tokens has failed.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidPercentage()\":[{\"details\":\"Error of invalid percentage.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForApprovedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for an approved withdrawal.\"}],\"ErrQueryForInsufficientVoteWeight()\":[{\"details\":\"Error indicating that a query was made for insufficient vote weight.\"}],\"ErrQueryForProcessedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for a processed withdrawal.\"}],\"ErrReachedDailyWithdrawalLimit()\":[{\"details\":\"Error indicating that the daily withdrawal limit has been reached.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `handleAssetIn` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"DailyWithdrawalLimitsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the daily limit thresholds are updated\"},\"DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the deposit is requested\"},\"HighTierThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\"},\"HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the high-tier vote weight threshold is updated\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LockedThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for locked withdrawals are updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"TokenMapped(address[],address[],uint8[])\":{\"details\":\"Emitted when the tokens are mapped\"},\"UnlockFeePercentagesUpdated(address[],uint256[])\":{\"details\":\"Emitted when the fee percentages to unlock withdraw are updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is locked\"},\"WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is unlocked\"},\"Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are withdrawn\"},\"WrappedNativeTokenContractUpdated(address)\":{\"details\":\"Emitted when the wrapped native token contract is updated\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"onBridgeOperatorsAdded(address[],uint96[],bool[])\":{\"details\":\"Handles the event when bridge operators are added.\",\"params\":{\"addeds\":\"The corresponding boolean values indicating whether the operators were added or not.\",\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"onBridgeOperatorsRemoved(address[],bool[])\":{\"details\":\"Handles the event when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\",\"removeds\":\"The corresponding boolean values indicating whether the operators were removed or not.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"______deprecatedBridgeOperatorAddedBlock\":{\"custom:deprecated\":\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\"},\"______deprecatedBridgeOperators\":{\"custom:deprecated\":\"Previously `_bridgeOperators` (uint256[])\"},\"_domainSeparator\":{\"details\":\"Domain separator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainGatewayV3.sol\":\"MainchainGatewayV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\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 ReentrancyGuard {\\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 constructor() {\\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 making 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}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(\\n address account,\\n uint256 id,\\n uint256 value\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(\\n address account,\\n uint256[] memory ids,\\n uint256[] memory values\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../extensions/ERC1155Burnable.sol\\\";\\nimport \\\"../extensions/ERC1155Pausable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerable.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev {ERC1155} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n *\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\n */\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\n * deploys the contract.\\n */\\n constructor(string memory uri) ERC1155(uri) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\n *\\n * See {ERC1155-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mint(to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\n */\\n function mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControlEnumerable, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\n uint256 prevNum = _num;\\n uint256 prevDenom = _denom;\\n _num = num;\\n _denom = denom;\\n unchecked {\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/WethUnwrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\ncontract WethUnwrapper is ReentrancyGuard {\\n IWETH public immutable weth;\\n\\n error ErrCannotTransferFrom();\\n error ErrNotWrappedContract();\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\n\\n constructor(address weth_) {\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\n weth = IWETH(weth_);\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n function unwrap(uint256 amount) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(msg.sender), amount);\\n }\\n\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(to), amount);\\n }\\n\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\n if (!success) revert ErrCannotTransferFrom();\\n\\n weth.withdraw(amount);\\n }\\n\\n function _sendNativeTo(address payable to, uint256 val) internal {\\n (bool success,) = to.call{ value: val }(\\\"\\\");\\n if (!success) {\\n revert ErrExternalCallFailed(to, msg.sig);\\n }\\n }\\n\\n function _fallback() internal view {\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\n }\\n}\\n\",\"keccak256\":\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\",\"license\":\"MIT\"},\"src/extensions/WithdrawalLimitation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./GatewayV3.sol\\\";\\n\\nabstract contract WithdrawalLimitation is GatewayV3 {\\n /// @dev Error of invalid percentage.\\n error ErrInvalidPercentage();\\n\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\n event HighTierVoteWeightThresholdUpdated(\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\n );\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\n /// @dev Emitted when the daily limit thresholds are updated\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\n\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\n\\n uint256 internal _highTierVWNum;\\n uint256 internal _highTierVWDenom;\\n\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\n mapping(address => uint256) public highTierThreshold;\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\n mapping(address => uint256) public lockedThreshold;\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\n /// @notice Values 0-1,000,000 map to 0%-100%\\n mapping(address => uint256) public unlockFeePercentages;\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\n mapping(address => uint256) public dailyWithdrawalLimit;\\n /// @dev Mapping from token address => today withdrawal amount\\n mapping(address => uint256) public lastSyncedWithdrawal;\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\n mapping(address => uint256) public lastDateSynced;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `GatewayV3-setThreshold`.\\n *\\n * Requirements:\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n */\\n function setThreshold(uint256 num, uint256 denom) external virtual override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Returns the high-tier vote weight threshold.\\n */\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\n return (_highTierVWNum, _highTierVWDenom);\\n }\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\n */\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function setHighTierVoteWeightThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyProxyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setHighTierThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setLockedThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setUnlockFeePercentages(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setDailyWithdrawalLimits(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the limitation.\\n */\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\n return _reachedWithdrawalLimit(_token, _quantity);\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n\\n _previousNum = _highTierVWNum;\\n _previousDenom = _highTierVWDenom;\\n _highTierVWNum = _numerator;\\n _highTierVWDenom = _denominator;\\n\\n unchecked {\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n * - The percentage is equal to or less than 100_000.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\n if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage();\\n\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\n if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\n *\\n * Requirements:\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\n *\\n */\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\n return false;\\n }\\n\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n return dailyWithdrawalLimit[_token] <= _quantity;\\n } else {\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\n }\\n }\\n\\n /**\\n * @dev Record withdrawal token.\\n */\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n lastDateSynced[_token] = _currentDate;\\n lastSyncedWithdrawal[_token] = _quantity;\\n } else {\\n lastSyncedWithdrawal[_token] += _quantity;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the withdrawal request is locked or not.\\n */\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n return lockedThreshold[_token] <= _quantity;\\n }\\n\\n /**\\n * @dev Computes fee percentage.\\n */\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\n }\\n\\n /**\\n * @dev Returns high-tier vote weight.\\n */\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\n }\\n\\n /**\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\n */\\n function _verifyThresholds() internal view {\\n if (_num * _highTierVWDenom > _highTierVWNum * _denom) revert ErrInvalidThreshold(msg.sig);\\n }\\n}\\n\",\"keccak256\":\"0x4b7d559d4b1f53239b8690776318db8d63f578f72fb269d8024570aa70c2c2a6\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/IMainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./consumers/SignatureConsumer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\n /**\\n * @dev Error indicating that a query was made for an approved withdrawal.\\n */\\n error ErrQueryForApprovedWithdrawal();\\n\\n /**\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\n */\\n error ErrReachedDailyWithdrawalLimit();\\n\\n /**\\n * @dev Error indicating that a query was made for a processed withdrawal.\\n */\\n error ErrQueryForProcessedWithdrawal();\\n\\n /**\\n * @dev Error indicating that a query was made for insufficient vote weight.\\n */\\n error ErrQueryForInsufficientVoteWeight();\\n\\n /// @dev Emitted when the deposit is requested\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the assets are withdrawn\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards);\\n /// @dev Emitted when the wrapped native token contract is updated\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\n /// @dev Emitted when the withdrawal is locked\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is unlocked\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n\\n /**\\n * @dev Returns the domain seperator.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns deposit count.\\n */\\n function depositCount() external view returns (uint256);\\n\\n /**\\n * @dev Sets the wrapped native token contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\n\\n /**\\n * @dev Returns whether the withdrawal is locked.\\n */\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns the withdrawal hash.\\n */\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\n\\n /**\\n * @dev Locks the assets and request deposit.\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\n\\n /**\\n * @dev Withdraws based on the receipt and the validator signatures.\\n * Returns whether the withdrawal is locked.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked);\\n\\n /**\\n * @dev Approves a specific withdrawal.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n uint256[][4] calldata _thresholds\\n ) external;\\n\\n /**\\n * @dev Returns token address on Ronin network.\\n * Note: Reverts for unsupported token.\\n */\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x2d4f53a65e76e903040f5f4dbe5aea53367d61243c60efdc8402ff184bd50a87\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/LibTokenInfo.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n TokenStandard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/LibTokenInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nenum TokenStandard {\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\\nstruct TokenInfo {\\n TokenStandard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n}\\n\\n/**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\n\\n/**\\n * @dev Error indicating that the `handleAssetIn` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\n\\n/// @dev Error indicating that the provided information is invalid.\\nerror ErrInvalidInfo();\\n\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\nerror ErrERC20MintingFailed();\\n\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\nerror ErrERC721MintingFailed();\\n\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\nerror ErrERC1155TransferFailed();\\n\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\nerror ErrERC1155MintingFailed();\\n\\n/// @dev Error indicating that an unsupported standard is encountered.\\nerror ErrUnsupportedStandard();\\n\\nlibrary LibTokenInfo {\\n /**\\n *\\n * HASH\\n *\\n */\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n *\\n * VALIDATE\\n *\\n */\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(TokenInfo memory self) internal pure {\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\n revert ErrInvalidInfo();\\n }\\n }\\n\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\n }\\n\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\n }\\n\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\n }\\n\\n /**\\n *\\n * TRANSFER IN/OUT METHOD\\n *\\n */\\n\\n /**\\n * @dev Transfer asset in.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\n bool success;\\n bytes memory data;\\n if (self.erc == TokenStandard.ERC20) {\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\n } else if (self.erc == TokenStandard.ERC1155) {\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\n }\\n\\n /**\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\n if (token == address(wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!to.send(self.quantity)) {\\n wrappedNativeToken.deposit{ value: self.quantity }();\\n _transferTokenOut(self, to, token);\\n }\\n\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC20) {\\n uint256 balance = IERC20(token).balanceOf(address(this));\\n if (balance < self.quantity) {\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\n }\\n\\n _transferTokenOut(self, to, token);\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC721) {\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\n revert ErrERC721MintingFailed();\\n }\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC1155) {\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\n revert ErrERC1155MintingFailed();\\n }\\n return;\\n }\\n\\n revert ErrUnsupportedStandard();\\n }\\n\\n /**\\n *\\n * TRANSFER HELPERS\\n *\\n */\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\n bool success;\\n if (self.erc == TokenStandard.ERC20) {\\n success = _tryTransferERC20(token, to, self.quantity);\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\n }\\n\\n /**\\n * TRANSFER ERC-20\\n */\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n bytes memory data;\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n }\\n\\n /**\\n * @dev Mints ERC20 token and returns the result.\\n */\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\n }\\n\\n /**\\n * TRANSFER ERC-721\\n */\\n\\n /**\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n success = _tryTransferFromERC721(token, address(this), to, id);\\n if (!success) {\\n return _tryMintERC721(token, to, id);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\n }\\n\\n /**\\n * @dev Mints ERC721 token and returns the result.\\n */\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\n }\\n\\n /**\\n * TRANSFER ERC-1155\\n */\\n\\n /**\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\n if (!success) {\\n return _tryMintERC1155(token, to, id, amount);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC1155 token and returns the result.\\n */\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\n }\\n\\n /**\\n * @dev Mints ERC1155 token and returns the result.\\n */\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\n }\\n}\\n\",\"keccak256\":\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\",\"license\":\"MIT\"},\"src/libraries/LibTokenOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TokenOwner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n}\\n\\nlibrary LibTokenOwner {\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\",\"license\":\"MIT\"},\"src/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./LibTokenInfo.sol\\\";\\nimport \\\"./LibTokenOwner.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n using LibTokenOwner for TokenOwner;\\n using LibTokenInfo for TokenInfo;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n TokenInfo info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n TokenOwner mainchain;\\n TokenOwner ronin;\\n TokenInfo info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\",\"license\":\"MIT\"},\"src/mainchain/MainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport { IBridgeManager } from \\\"../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts, ContractType } from \\\"../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../extensions/WethUnwrapper.sol\\\";\\nimport \\\"../extensions/WithdrawalLimitation.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"../interfaces/IMainchainGatewayV3.sol\\\";\\n\\ncontract MainchainGatewayV3 is\\n WithdrawalLimitation,\\n Initializable,\\n AccessControlEnumerable,\\n ERC1155Holder,\\n IMainchainGatewayV3,\\n HasContracts,\\n IBridgeManagerCallback\\n{\\n using LibTokenInfo for TokenInfo;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n\\n /// @dev Withdrawal unlocker role hash\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\"WITHDRAWAL_UNLOCKER_ROLE\\\");\\n\\n /// @dev Wrapped native token address\\n IWETH public wrappedNativeToken;\\n /// @dev Ronin network id\\n uint256 public roninChainId;\\n /// @dev Total deposit\\n uint256 public depositCount;\\n /// @dev Domain separator\\n bytes32 internal _domainSeparator;\\n /// @dev Mapping from mainchain token => token address on Ronin network\\n mapping(address => MappedToken) internal _roninToken;\\n /// @dev Mapping from withdrawal id => withdrawal hash\\n mapping(uint256 => bytes32) public withdrawalHash;\\n /// @dev Mapping from withdrawal id => locked\\n mapping(uint256 => bool) public withdrawalLocked;\\n\\n /// @custom:deprecated Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\n uint256 private ______deprecatedBridgeOperatorAddedBlock;\\n /// @custom:deprecated Previously `_bridgeOperators` (uint256[])\\n uint256 private ______deprecatedBridgeOperators;\\n\\n uint96 private _totalOperatorWeight;\\n mapping(address operator => uint96 weight) private _operatorWeight;\\n WethUnwrapper public wethUnwrapper;\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n IWETH _wrappedToken,\\n uint256 _roninChainId,\\n uint256 _numerator,\\n uint256 _highTierVWNumerator,\\n uint256 _denominator,\\n // _addresses[0]: mainchainTokens\\n // _addresses[1]: roninTokens\\n // _addresses[2]: withdrawalUnlockers\\n address[][3] calldata _addresses,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds,\\n TokenStandard[] calldata _standards\\n ) external payable virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n roninChainId = _roninChainId;\\n\\n _setWrappedNativeTokenContract(_wrappedToken);\\n _updateDomainSeparator();\\n _setThreshold(_numerator, _denominator);\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\n _verifyThresholds();\\n\\n if (_addresses[0].length > 0) {\\n // Map mainchain tokens to ronin tokens\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\n // Sets thresholds based on the mainchain tokens\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\n }\\n\\n // Grant role for withdrawal unlocker\\n for (uint256 i; i < _addresses[2].length; i++) {\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][i]);\\n }\\n }\\n\\n function initializeV2(address bridgeManagerContract) external reinitializer(2) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n }\\n\\n function initializeV3() external reinitializer(3) {\\n IBridgeManager mainchainBridgeManager = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER));\\n (, address[] memory operators, uint96[] memory weights) = mainchainBridgeManager.getFullBridgeOperatorInfos();\\n\\n uint96 totalWeight;\\n for (uint i; i < operators.length; i++) {\\n _operatorWeight[operators[i]] = weights[i];\\n totalWeight += weights[i];\\n }\\n _totalOperatorWeight = totalWeight;\\n }\\n\\n function initializeV4(address payable wethUnwrapper_) external reinitializer(4) {\\n wethUnwrapper = WethUnwrapper(wethUnwrapper_);\\n }\\n\\n /**\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\n */\\n function receiveEther() external payable { }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparator;\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyProxyAdmin {\\n _setWrappedNativeTokenContract(_wrappedToken);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\n _requestDepositFor(_request, msg.sender);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) {\\n return _submitWithdrawal(_receipt, _signatures);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\n bytes32 _receiptHash = receipt.hash();\\n if (withdrawalHash[receipt.id] != receipt.hash()) {\\n revert ErrInvalidReceipt();\\n }\\n if (!withdrawalLocked[receipt.id]) {\\n revert ErrQueryForApprovedWithdrawal();\\n }\\n delete withdrawalLocked[receipt.id];\\n emit WithdrawalUnlocked(_receiptHash, receipt);\\n\\n address token = receipt.mainchain.tokenAddr;\\n if (receipt.info.erc == TokenStandard.ERC20) {\\n TokenInfo memory feeInfo = receipt.info;\\n feeInfo.quantity = _computeFeePercentage(receipt.info.quantity, unlockFeePercentages[token]);\\n TokenInfo memory withdrawInfo = receipt.info;\\n withdrawInfo.quantity = receipt.info.quantity - feeInfo.quantity;\\n\\n feeInfo.handleAssetOut(payable(msg.sender), token, wrappedNativeToken);\\n withdrawInfo.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n } else {\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n }\\n\\n emit Withdrew(_receiptHash, receipt);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds\\n ) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function getRoninToken(address mainchainToken) public view returns (MappedToken memory token) {\\n token = _roninToken[mainchainToken];\\n if (token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(address[] calldata mainchainTokens, address[] calldata roninTokens, TokenStandard[] calldata standards) internal virtual {\\n if (!(mainchainTokens.length == roninTokens.length && mainchainTokens.length == standards.length)) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 i; i < mainchainTokens.length; ++i) {\\n _roninToken[mainchainTokens[i]].tokenAddr = roninTokens[i];\\n _roninToken[mainchainTokens[i]].erc = standards[i];\\n }\\n\\n emit TokenMapped(mainchainTokens, roninTokens, standards);\\n }\\n\\n /**\\n * @dev Submits withdrawal receipt.\\n *\\n * Requirements:\\n * - The receipt kind is withdrawal.\\n * - The receipt is to withdraw on this chain.\\n * - The receipt is not used to withdraw before.\\n * - The withdrawal is not reached the limit threshold.\\n * - The signer weight total is larger than or equal to the minimum threshold.\\n * - The signature signers are in order.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function _submitWithdrawal(Transfer.Receipt calldata receipt, Signature[] memory signatures) internal virtual returns (bool locked) {\\n uint256 id = receipt.id;\\n uint256 quantity = receipt.info.quantity;\\n address tokenAddr = receipt.mainchain.tokenAddr;\\n\\n receipt.info.validate();\\n if (receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind();\\n\\n if (receipt.mainchain.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, receipt.mainchain.chainId, block.chainid);\\n }\\n\\n MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr);\\n\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr && receipt.ronin.chainId == roninChainId)) {\\n revert ErrInvalidReceipt();\\n }\\n\\n if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal();\\n\\n if (!(receipt.info.erc == TokenStandard.ERC721 || !_reachedWithdrawalLimit(tokenAddr, quantity))) {\\n revert ErrReachedDailyWithdrawalLimit();\\n }\\n\\n bytes32 receiptHash = receipt.hash();\\n bytes32 receiptDigest = Transfer.receiptDigest(_domainSeparator, receiptHash);\\n\\n uint256 minimumWeight;\\n (minimumWeight, locked) = _computeMinVoteWeight(receipt.info.erc, tokenAddr, quantity);\\n\\n {\\n bool passed;\\n address signer;\\n address lastSigner;\\n Signature memory sig;\\n uint256 weight;\\n for (uint256 i; i < signatures.length; i++) {\\n sig = signatures[i];\\n signer = ecrecover(receiptDigest, sig.v, sig.r, sig.s);\\n if (lastSigner >= signer) revert ErrInvalidOrder(msg.sig);\\n\\n lastSigner = signer;\\n\\n weight += _getWeight(signer);\\n if (weight >= minimumWeight) {\\n passed = true;\\n break;\\n }\\n }\\n\\n if (!passed) revert ErrQueryForInsufficientVoteWeight();\\n withdrawalHash[id] = receiptHash;\\n }\\n\\n if (locked) {\\n withdrawalLocked[id] = true;\\n emit WithdrawalLocked(receiptHash, receipt);\\n return locked;\\n }\\n\\n _recordWithdrawal(tokenAddr, quantity);\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), tokenAddr, wrappedNativeToken);\\n emit Withdrew(receiptHash, receipt);\\n }\\n\\n /**\\n * @dev Requests deposit made by `_requester` address.\\n *\\n * Requirements:\\n * - The token info is valid.\\n * - The `msg.value` is 0 while depositing ERC20 token.\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\n *\\n * Emits the `DepositRequested` event.\\n *\\n */\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\n MappedToken memory _token;\\n address _roninWeth = address(wrappedNativeToken);\\n\\n _request.info.validate();\\n if (_request.tokenAddr == address(0)) {\\n if (_request.info.quantity != msg.value) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_roninWeth);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.tokenAddr = _roninWeth;\\n } else {\\n if (msg.value != 0) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_request.tokenAddr);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\n // Withdraw if token is WETH\\n // The withdraw of WETH must go via `WethUnwrapper`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy.\\n if (_roninWeth == _request.tokenAddr) {\\n wrappedNativeToken.approve(address(wethUnwrapper), _request.info.quantity);\\n wethUnwrapper.unwrap(_request.info.quantity);\\n }\\n }\\n\\n uint256 _depositId = depositCount++;\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId);\\n\\n emit DepositRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Returns the minimum vote weight for the token.\\n */\\n function _computeMinVoteWeight(TokenStandard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) {\\n uint256 _totalWeight = _getTotalWeight();\\n _weight = _minimumVoteWeight(_totalWeight);\\n if (_erc == TokenStandard.ERC20) {\\n if (highTierThreshold[_token] <= _quantity) {\\n _weight = _highTierVoteWeight(_totalWeight);\\n }\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\n }\\n }\\n\\n /**\\n * @dev Update domain seperator.\\n */\\n function _updateDomainSeparator() internal {\\n /*\\n * _domainSeparator = keccak256(\\n * abi.encode(\\n * keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n * keccak256(\\\"MainchainGatewayV2\\\"),\\n * keccak256(\\\"2\\\"),\\n * block.chainid,\\n * address(this)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n // keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")\\n mstore(ptr, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)\\n // keccak256(\\\"MainchainGatewayV2\\\")\\n mstore(add(ptr, 0x20), 0x159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b)\\n // keccak256(\\\"2\\\")\\n mstore(add(ptr, 0x40), 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5)\\n mstore(add(ptr, 0x60), chainid())\\n mstore(add(ptr, 0x80), address())\\n sstore(_domainSeparator.slot, keccak256(ptr, 0xa0))\\n }\\n }\\n\\n /**\\n * @dev Sets the WETH contract.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\n wrappedNativeToken = _wrapedToken;\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\n }\\n\\n /**\\n * @dev Receives ETH from WETH or creates deposit request if sender is not WETH or WETHUnwrapper.\\n */\\n function _fallback() internal virtual {\\n if (msg.sender == address(wrappedNativeToken) || msg.sender == address(wethUnwrapper)) {\\n return;\\n }\\n\\n _createDepositOnFallback();\\n }\\n\\n /**\\n * @dev Creates deposit request.\\n */\\n function _createDepositOnFallback() internal virtual whenNotPaused {\\n Transfer.Request memory _request;\\n _request.recipientAddr = msg.sender;\\n _request.info.quantity = msg.value;\\n _requestDepositFor(_request, _request.recipientAddr);\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return _totalOperatorWeight;\\n }\\n\\n /**\\n * @dev Returns the weight of an address.\\n */\\n function _getWeight(address addr) internal view returns (uint256) {\\n return _operatorWeight[addr];\\n }\\n\\n ///////////////////////////////////////////////\\n // CALLBACKS\\n ///////////////////////////////////////////////\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsAdded(\\n address[] calldata operators,\\n uint96[] calldata weights,\\n bool[] memory addeds\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint256 length = operators.length;\\n if (length != addeds.length || length != weights.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n for (uint256 i; i < length; ++i) {\\n unchecked {\\n if (addeds[i]) {\\n _totalOperatorWeight += weights[i];\\n _operatorWeight[operators[i]] = weights[i];\\n }\\n }\\n }\\n\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint length = operators.length;\\n if (length != removeds.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n uint96 totalRemovingWeight;\\n for (uint i; i < length; ++i) {\\n unchecked {\\n if (removeds[i]) {\\n totalRemovingWeight += _operatorWeight[operators[i]];\\n delete _operatorWeight[operators[i]];\\n }\\n }\\n }\\n\\n _totalOperatorWeight -= totalRemovingWeight;\\n\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) {\\n return interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xec96f442086b449ebfd100c3bee1c866e816fea34a443a4b43a0dd7b85751595\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 28, + "numDeployments": 2, "storageLayout": { "storage": [ { - "astId": 103687, + "astId": 58352, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_paused", "offset": 0, @@ -2495,7 +2711,7 @@ "type": "t_bool" }, { - "astId": 132559, + "astId": 103479, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_num", "offset": 0, @@ -2503,7 +2719,7 @@ "type": "t_uint256" }, { - "astId": 132561, + "astId": 103481, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_denom", "offset": 0, @@ -2511,7 +2727,7 @@ "type": "t_uint256" }, { - "astId": 132563, + "astId": 103483, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecated", "offset": 0, @@ -2519,7 +2735,7 @@ "type": "t_address" }, { - "astId": 132565, + "astId": 103485, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "nonce", "offset": 0, @@ -2527,7 +2743,7 @@ "type": "t_uint256" }, { - "astId": 132567, + "astId": 103487, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "emergencyPauser", "offset": 0, @@ -2535,7 +2751,7 @@ "type": "t_address" }, { - "astId": 132572, + "astId": 103492, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______gap", "offset": 0, @@ -2543,7 +2759,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 133120, + "astId": 104214, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_highTierVWNum", "offset": 0, @@ -2551,7 +2767,7 @@ "type": "t_uint256" }, { - "astId": 133122, + "astId": 104216, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_highTierVWDenom", "offset": 0, @@ -2559,7 +2775,7 @@ "type": "t_uint256" }, { - "astId": 133127, + "astId": 104221, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "highTierThreshold", "offset": 0, @@ -2567,7 +2783,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 133132, + "astId": 104226, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lockedThreshold", "offset": 0, @@ -2575,7 +2791,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 133137, + "astId": 104231, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "unlockFeePercentages", "offset": 0, @@ -2583,7 +2799,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 133142, + "astId": 104236, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "dailyWithdrawalLimit", "offset": 0, @@ -2591,7 +2807,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 133147, + "astId": 104241, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lastSyncedWithdrawal", "offset": 0, @@ -2599,7 +2815,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 133152, + "astId": 104246, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lastDateSynced", "offset": 0, @@ -2607,7 +2823,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 133157, + "astId": 104251, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______gap", "offset": 0, @@ -2615,7 +2831,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 103525, + "astId": 58190, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_initialized", "offset": 0, @@ -2623,7 +2839,7 @@ "type": "t_uint8" }, { - "astId": 103528, + "astId": 58193, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_initializing", "offset": 1, @@ -2631,31 +2847,31 @@ "type": "t_bool" }, { - "astId": 102425, + "astId": 56841, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roles", "offset": 0, "slot": "114", - "type": "t_mapping(t_bytes32,t_struct(RoleData)102420_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)" }, { - "astId": 102739, + "astId": 57155, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roleMembers", "offset": 0, "slot": "115", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)106833_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)63339_storage)" }, { - "astId": 142559, + "astId": 114774, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "wrappedNativeToken", "offset": 0, "slot": "116", - "type": "t_contract(IWETH)138987" + "type": "t_contract(IWETH)109972" }, { - "astId": 142562, + "astId": 114777, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "roninChainId", "offset": 0, @@ -2663,7 +2879,7 @@ "type": "t_uint256" }, { - "astId": 142565, + "astId": 114780, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "depositCount", "offset": 0, @@ -2671,7 +2887,7 @@ "type": "t_uint256" }, { - "astId": 142568, + "astId": 114783, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_domainSeparator", "offset": 0, @@ -2679,15 +2895,15 @@ "type": "t_bytes32" }, { - "astId": 142574, + "astId": 114789, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roninToken", "offset": 0, "slot": "120", - "type": "t_mapping(t_address,t_struct(MappedToken)139639_storage)" + "type": "t_mapping(t_address,t_struct(MappedToken)110662_storage)" }, { - "astId": 142579, + "astId": 114794, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "withdrawalHash", "offset": 0, @@ -2695,7 +2911,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 142584, + "astId": 114799, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "withdrawalLocked", "offset": 0, @@ -2703,7 +2919,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 142587, + "astId": 114802, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecatedBridgeOperatorAddedBlock", "offset": 0, @@ -2711,12 +2927,36 @@ "type": "t_uint256" }, { - "astId": 142590, + "astId": 114805, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecatedBridgeOperators", "offset": 0, "slot": "124", "type": "t_uint256" + }, + { + "astId": 114807, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_totalOperatorWeight", + "offset": 0, + "slot": "125", + "type": "t_uint96" + }, + { + "astId": 114811, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_operatorWeight", + "offset": 0, + "slot": "126", + "type": "t_mapping(t_address,t_uint96)" + }, + { + "astId": 114814, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "wethUnwrapper", + "offset": 0, + "slot": "127", + "type": "t_contract(WethUnwrapper)104152" } ], "types": { @@ -2753,14 +2993,19 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IWETH)138987": { + "t_contract(IWETH)109972": { "encoding": "inplace", "label": "contract IWETH", "numberOfBytes": "20" }, - "t_enum(Standard)141582": { + "t_contract(WethUnwrapper)104152": { + "encoding": "inplace", + "label": "contract WethUnwrapper", + "numberOfBytes": "20" + }, + "t_enum(TokenStandard)112266": { "encoding": "inplace", - "label": "enum Token.Standard", + "label": "enum TokenStandard", "numberOfBytes": "1" }, "t_mapping(t_address,t_bool)": { @@ -2770,12 +3015,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_address,t_struct(MappedToken)139639_storage)": { + "t_mapping(t_address,t_struct(MappedToken)110662_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct MappedTokenConsumer.MappedToken)", "numberOfBytes": "32", - "value": "t_struct(MappedToken)139639_storage" + "value": "t_struct(MappedToken)110662_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -2784,19 +3029,26 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_bytes32,t_struct(AddressSet)106833_storage)": { + "t_mapping(t_address,t_uint96)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint96)", + "numberOfBytes": "32", + "value": "t_uint96" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)63339_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)106833_storage" + "value": "t_struct(AddressSet)63339_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)102420_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)102420_storage" + "value": "t_struct(RoleData)56836_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -2819,36 +3071,36 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(AddressSet)106833_storage": { + "t_struct(AddressSet)63339_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 106832, + "astId": 63338, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)106532_storage" + "type": "t_struct(Set)63038_storage" } ] }, - "t_struct(MappedToken)139639_storage": { + "t_struct(MappedToken)110662_storage": { "encoding": "inplace", "label": "struct MappedTokenConsumer.MappedToken", "numberOfBytes": "32", "members": [ { - "astId": 139636, + "astId": 110659, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "erc", "offset": 0, "slot": "0", - "type": "t_enum(Standard)141582" + "type": "t_enum(TokenStandard)112266" }, { - "astId": 139638, + "astId": 110661, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "tokenAddr", "offset": 1, @@ -2857,13 +3109,13 @@ } ] }, - "t_struct(RoleData)102420_storage": { + "t_struct(RoleData)56836_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", "numberOfBytes": "64", "members": [ { - "astId": 102417, + "astId": 56833, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "members", "offset": 0, @@ -2871,7 +3123,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 102419, + "astId": 56835, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "adminRole", "offset": 0, @@ -2880,13 +3132,13 @@ } ] }, - "t_struct(Set)106532_storage": { + "t_struct(Set)63038_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 106527, + "astId": 63033, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_values", "offset": 0, @@ -2894,7 +3146,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 106531, + "astId": 63037, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_indexes", "offset": 0, @@ -2912,10 +3164,15 @@ "encoding": "inplace", "label": "uint8", "numberOfBytes": "1" + }, + "t_uint96": { + "encoding": "inplace", + "label": "uint96", + "numberOfBytes": "12" } } }, - "timestamp": 1712300364, + "timestamp": 1713254676, "userdoc": { "version": 1, "kind": "user", diff --git a/deployments/sepolia/WethUnwrapper.json b/deployments/sepolia/WethUnwrapper.json new file mode 100644 index 00000000..e4f5d0ed --- /dev/null +++ b/deployments/sepolia/WethUnwrapper.json @@ -0,0 +1,134 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "weth_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "unwrap", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unwrapTo", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IWETH" + } + ], + "stateMutability": "view" + }, + { + "type": "error", + "name": "ErrCannotTransferFrom", + "inputs": [] + }, + { + "type": "error", + "name": "ErrExternalCallFailed", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "sig", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ErrNotWrappedContract", + "inputs": [] + } + ], + "address": "0x1050f2E63177b5eD18f3E88D000DB3a600d664e3", + "args": "0x0000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f08", + "ast": "", + "blockNumber": 5709352, + "bytecode": "0x60a060405234801561001057600080fd5b5060405161059138038061059183398101604081905261002f91610071565b600160009081556001600160a01b0382163b90036100605760405163155634d360e31b815260040160405180910390fd5b6001600160a01b03166080526100a1565b60006020828403121561008357600080fd5b81516001600160a01b038116811461009a57600080fd5b9392505050565b6080516104c26100cf6000396000818160610152818160ea01528181610237015261030a01526104c26000f3fe6080604052600436106100385760003560e01c80633fc8cef31461004f5780635dbd60591461009f578063de0e9a3e146100bf57610047565b36610047576100456100df565b005b6100456100df565b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ab57600080fd5b506100456100ba366004610408565b61012a565b3480156100cb57600080fd5b506100456100da366004610444565b6101a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101285760405163155634d360e31b815260040160405180910390fd5b565b6002600054036101815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005561018f82610214565b6101998183610372565b50506001600055565b6002600054036101f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610178565b600260005561020281610214565b61020c3382610372565b506001600055565b604051336024820152306044820152606481018290526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610290919061045d565b6000604051808303816000865af19150503d80600081146102cd576040519150601f19603f3d011682016040523d82523d6000602084013e6102d2565b606091505b50509050806102f4576040516302805e0360e11b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561035657600080fd5b505af115801561036a573d6000803e3d6000fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103bf576040519150601f19603f3d011682016040523d82523d6000602084013e6103c4565b606091505b50509050806104035760405163094b984760e21b81526001600160a01b03841660048201526001600160e01b0319600035166024820152604401610178565b505050565b6000806040838503121561041b57600080fd5b8235915060208301356001600160a01b038116811461043957600080fd5b809150509250929050565b60006020828403121561045657600080fd5b5035919050565b6000825160005b8181101561047e5760208186018101518583015201610464565b50600092019182525091905056fea2646970667358221220aaebf21164f6d2f08d44be8bf09fb75965583264b715eb60df75d1b1d0f7cb9e64736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "WethUnwrapper.sol", + "deployedBytecode": "0x6080604052600436106100385760003560e01c80633fc8cef31461004f5780635dbd60591461009f578063de0e9a3e146100bf57610047565b36610047576100456100df565b005b6100456100df565b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ab57600080fd5b506100456100ba366004610408565b61012a565b3480156100cb57600080fd5b506100456100da366004610444565b6101a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101285760405163155634d360e31b815260040160405180910390fd5b565b6002600054036101815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005561018f82610214565b6101998183610372565b50506001600055565b6002600054036101f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610178565b600260005561020281610214565b61020c3382610372565b506001600055565b604051336024820152306044820152606481018290526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610290919061045d565b6000604051808303816000865af19150503d80600081146102cd576040519150601f19603f3d011682016040523d82523d6000602084013e6102d2565b606091505b50509050806102f4576040516302805e0360e11b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561035657600080fd5b505af115801561036a573d6000803e3d6000fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103bf576040519150601f19603f3d011682016040523d82523d6000602084013e6103c4565b606091505b50509050806104035760405163094b984760e21b81526001600160a01b03841660048201526001600160e01b0319600035166024820152604401610178565b505050565b6000806040838503121561041b57600080fd5b8235915060208301356001600160a01b038116811461043957600080fd5b809150509250929050565b60006020828403121561045657600080fd5b5035919050565b6000825160005b8181101561047e5760208186018101518583015201610464565b50600092019182525091905056fea2646970667358221220aaebf21164f6d2f08d44be8bf09fb75965583264b715eb60df75d1b1d0f7cb9e64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev" + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"weth_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrCannotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"sig\",\"type\":\"bytes4\"}],\"name\":\"ErrExternalCallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrNotWrappedContract\",\"type\":\"error\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unwrap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"unwrapTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/WethUnwrapper.sol\":\"WethUnwrapper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\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 ReentrancyGuard {\\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 constructor() {\\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 making 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}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"src/extensions/WethUnwrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\ncontract WethUnwrapper is ReentrancyGuard {\\n IWETH public immutable weth;\\n\\n error ErrCannotTransferFrom();\\n error ErrNotWrappedContract();\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\n\\n constructor(address weth_) {\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\n weth = IWETH(weth_);\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n function unwrap(uint256 amount) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(msg.sender), amount);\\n }\\n\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(to), amount);\\n }\\n\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\n if (!success) revert ErrCannotTransferFrom();\\n\\n weth.withdraw(amount);\\n }\\n\\n function _sendNativeTo(address payable to, uint256 val) internal {\\n (bool success,) = to.call{ value: val }(\\\"\\\");\\n if (!success) {\\n revert ErrExternalCallFailed(to, msg.sig);\\n }\\n }\\n\\n function _fallback() internal view {\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\n }\\n}\\n\",\"keccak256\":\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 26, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 58453, + "contract": "src/extensions/WethUnwrapper.sol:WethUnwrapper", + "label": "_status", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "types": { + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1713254676, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file From cf565adcbcc0860f3adb942ef201fedb0f386935 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 15:12:02 +0700 Subject: [PATCH 192/305] chore: add broadcast log --- .../2021/run-1713240478.json | 112 +++ .../2021/run-1713240671.json | 118 +++ .../2021/run-1713240678.json | 452 ++++++++++ .../2021/run-1713246801.json | 235 ++++++ .../2021/run-1713250237.json | 316 +++++++ .../2021/run-1713251065.json | 348 ++++++++ .../2021/run-1713252455.json | 776 ++++++++++++++++++ .../11155111/run-1713254298.json | 260 ++++++ .../11155111/run-1713254978.json | 738 +++++++++++++++++ 9 files changed, 3355 insertions(+) create mode 100644 broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240478.json create mode 100644 broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240671.json create mode 100644 broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240678.json create mode 100644 broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713246801.json create mode 100644 broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713250237.json create mode 100644 broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713251065.json create mode 100644 broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713252455.json create mode 100644 broadcast/20240411-p3-upgrade-bridge-main-chain.s.sol/11155111/run-1713254298.json create mode 100644 broadcast/20240411-p3-upgrade-bridge-main-chain.s.sol/11155111/run-1713254978.json diff --git a/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240478.json b/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240478.json new file mode 100644 index 00000000..2d026e0a --- /dev/null +++ b/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240478.json @@ -0,0 +1,112 @@ +{ + "transactions": [ + { + "hash": null, + "transactionType": "CREATE", + "contractName": "RoninBridgeManagerConstructor", + "contractAddress": "0x2e8006C2Af701925915417D29c47b6D16e3C8cc8", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x637700", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61398280620000f46000396000f3fe608060405234801561001057600080fd5b50600436106101965760003560e01c806301a5f43f1461019b57806306aba0e1146101b05780630a44fa43146101cb5780630f7c3189146101de5780631c905e39146101f35780631f425338146102155780632c5e6520146102285780632d6d7d731461024b57806334d5f37b1461025e57806335da81211461027e5780633644e515146102915780637d4c1d781461029a5780637de5dedd146102ad5780637f7fe058146102b5578063800eaab3146102d5578063828fc1a1146102e8578063865e6fd3146102fb578063901979d51461030e5780639b19dbfd14610339578063a64a838014610341578063aee1767f14610354578063b384abef14610367578063b405aaf2146103c2578063b9c36209146103d5578063bc4e068f146103e8578063c441c4a8146103fb578063cc7e6b3b14610412578063d0a50db014610432578063d78392f81461043a578063dafae4081461044d578063de981f1b14610460578063e75235b814610473578063e9c0349814610490578063f80b5352146104a3575b600080fd5b6101ae6101a9366004612d91565b6104ab565b005b6101b861055a565b6040519081526020015b60405180910390f35b6101b86101d9366004612e2a565b610569565b6101e66105ee565b6040516101c29190612eb0565b610206610201366004612ec3565b610600565b6040516101c293929190612efb565b6101ae610223366004612e2a565b61061c565b61023b610236366004612fce565b6106bb565b60405190151581526020016101c2565b6101e6610259366004612e2a565b6106c8565b6101b861026c366004613003565b60026020526000908152604090205481565b6101ae61028c366004612e2a565b61070f565b6101b860015481565b6101ae6102a83660046131dd565b610757565b6101b8610893565b6102c86102c3366004613317565b6108e9565b6040516101c29190613332565b6101ae6102e3366004613346565b61095c565b61023b6102f63660046133a9565b610994565b6101ae6103093660046133e4565b6109a2565b61032161031c366004613317565b6109bd565b6040516001600160601b0390911681526020016101c2565b6101e66109f3565b6101ae61034f366004613003565b610a5e565b6102c8610362366004613317565b610a72565b6103b1610375366004612ec3565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101c295949392919061340e565b61023b6103d0366004613317565b610a84565b6101ae6103e3366004612ec3565b610abc565b6102066103f6366004613003565b610ace565b610403610aeb565b6040516101c29392919061347d565b610425610420366004612e2a565b610bc5565b6040516101c291906134c0565b6101b8610c03565b610321610448366004613317565b610c16565b61023b61045b366004613003565b610c21565b6102c861046e3660046134d3565b610c5d565b61047b610cbf565b604080519283526020830191909152016101c2565b6101ae61049e366004612e2a565b610ce1565b6101e6610d2a565b6104b3610d8d565b61055186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610de992505050565b50505050505050565b600061056461114b565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105aa925083915061115e9050565b6105e684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061119392505050565b949350505050565b60606105646105fb611218565b61123c565b606080606061060f8585611250565b9250925092509250925092565b610624610d8d565b818180806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610663925083915061115e9050565b600061066d611218565b905060005b838110156106b4576106ab85858381811061068f5761068f6134ee565b90506020020160208101906106a49190613317565b8390611639565b50600101610672565b5050505050565b60006105e684848461164e565b606061070683838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611684915050565b90505b92915050565b610717610d8d565b6107538282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506117d792505050565b5050565b600054610100900460ff16158080156107775750600054600160ff909116105b806107915750303b158015610791575060005460ff166001145b6107f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561081c576000805461ff0019166101001790555b61082589611892565b61082f83836118c2565b61083f8c8c8c8b8b8b8b8b6118f3565b8015610885576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60008061089e611944565b90506000806108ab610cbf565b91509150806001828560040154856108c3919061351a565b6108cd9190613531565b6108d79190613544565b6108e19190613557565b935050505090565b60008060006108ff6108f9611944565b85611968565b9150915081610923578360405163141e2e1f60e11b81526004016107f09190613332565b61092b611944565b600101818154811061093f5761093f6134ee565b6000918252602090912001546001600160a01b0316949350505050565b33301461098a576000356001600160e01b0319166040516307337e1960e41b81526004016107f09190613579565b61075382826119cd565b60006107066000848461164e565b6109aa610d8d565b6109b381611a76565b6107538282611aa3565b6000806109c8611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109fd611944565b600101805480602002602001604051908101604052809291908181526020018280548015610a5457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a36575b5050505050905090565b610a66610d8d565b610a6f81611b2e565b50565b6000610a7d82611b9b565b5092915050565b600080610a8f611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610ac4610d8d565b6107538282611c12565b6060806060610ade600085611250565b9250925092509193909250565b60608060606000610afa611944565b805460408051602080840282018101909252828152929350839190830182828015610b4e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b30575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b50505050509250610bbd84611cc4565b915050909192565b6060610706838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611cc492505050565b6000610c0d611944565b60010154919050565b600061070982611db0565b600080610c2c611de5565b9050610c3661114b565b8160010154610c45919061351a565b6002820154610c54908561351a565b10159392505050565b6000610c67611e09565b600083600f811115610c7b57610c7b612ee5565b60ff1681526020810191909152604001600020546001600160a01b0316905080610cba578160405163409140df60e11b81526004016107f0919061358e565b919050565b6000806000610ccc611de5565b90508060010154816002015492509250509091565b610ce9610d8d565b610d25828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e2d92505050565b505050565b6060610d34611944565b805460408051602080840282018101909252828152929190830182828015610a54576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a36575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610de7576000356001600160e01b0319166001604051620f948f60ea1b81526004016107f09291906135a8565b565b6060610df58383612213565b610dfe8161115e565b6000610e08611944565b845187519192509081148015610e1e5750855181145b610e49576000356001600160e01b0319166040516306b5667560e21b81526004016107f09190613579565b806001600160401b03811115610e6157610e6161301c565b604051908082528060200260200182016040528015610e8a578160200160208202803683370190505b50935080600003610e9c575050611143565b60008060008060005b858110156110af578a8181518110610ebf57610ebf6134ee565b60200260200101519450898181518110610edb57610edb6134ee565b602002602001015193508b8181518110610ef757610ef76134ee565b60200260200101519250610f0a8561231d565b610f138461231d565b826001600160601b0316600003610f4b576000356001600160e01b031916604051637f11b8a360e11b81526004016107f09190613579565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692610fa39290811691166135d6565b610fad91906135d6565b610fb791906135d6565b6001600160601b0316600014898281518110610fd557610fd56134ee565b602002602001019015159081151581525050888181518110610ff957610ff96134ee565b6020026020010151156110a7578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556110a49083613531565b91505b600101610ea5565b50808660040160008282546110c49190613531565b90915550506040516110ff906347c28ec560e11b906110eb908c908f908d90602001613629565b604051602081830303815290604052612352565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516111349493929190613662565b60405180910390a15050505050505b509392505050565b6000611155611944565b60040154905090565b6111678161237f565b15610a6f576000356001600160e01b031916604051630d697db160e11b81526004016107f09190613579565b60008161119f8161115e565b60006111a9611944565b905060005b8451811015611210578160020160008683815181106111cf576111cf6134ee565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611206906001600160601b031685613531565b93506001016111ae565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b606060006112498361241e565b9392505050565b600082815260036020908152604080832084845290915281206004810154600582015460609384938493909290916112888284613531565b9050806001600160401b038111156112a2576112a261301c565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509550806001600160401b038111156112e6576112e661301c565b60405190808252806020026020018201604052801561133157816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816113045790505b509450806001600160401b0381111561134c5761134c61301c565b604051908082528060200260200182016040528015611375578160200160208202803683370190505b50965060005b838110156114ca576000878281518110611397576113976134ee565b602002602001019060018111156113b0576113b0612ee5565b908160018111156113c3576113c3612ee5565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106113fc576113fc6134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061145a5761145a6134ee565b602002602001018190525084600401818154811061147a5761147a6134ee565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106114aa576114aa6134ee565b6001600160a01b039092166020928302919091019091015260010161137b565b5060005b8281101561162d576001876114e38684613531565b815181106114f3576114f36134ee565b6020026020010190600181111561150c5761150c612ee5565b9081600181111561151f5761151f612ee5565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611558576115586134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866115ad8684613531565b815181106115bd576115bd6134ee565b60200260200101819052508460050181815481106115dd576115dd6134ee565b6000918252602090912001546001600160a01b0316886115fd8684613531565b8151811061160d5761160d6134ee565b6001600160a01b03909216602092830291909101909101526001016114ce565b50505050509250925092565b6000610706836001600160a01b03841661247a565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff166105e6565b606082516001600160401b0381111561169f5761169f61301c565b6040519080825280602002602001820160405280156116c8578160200160208202803683370190505b50905060005b8351811015610a7d57600560008583815181106116ed576116ed6134ee565b6020026020010151600581111561170657611706612ee5565b600581111561171757611717612ee5565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061174b5761174b6134ee565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156117a3575060006001600160a01b0316828281518110611790576117906134ee565b60200260200101516001600160a01b0316145b156117cf576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b6001016116ce565b806117e18161115e565b60006117eb611218565b905060008060005b855181101561188a5785818151811061180e5761180e6134ee565b6020026020010151925061182183611a76565b611832836312c0151560e21b61256d565b61183c8484612700565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016117f3565b505050505050565b600054610100900460ff166118b95760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612715565b600054610100900460ff166118e95760405162461bcd60e51b81526004016107f0906136ba565b6107538282612745565b600054610100900460ff1661191a5760405162461bcd60e51b81526004016107f0906136ba565b6119248888612777565b61192d846127b8565b61193a86868585856127e8565b5050505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156119bb57848181548110611989576119896134ee565b6000918252602090912001546001600160a01b03908116908516036119b3576001925090506119c6565b60010161196e565b506000600019915091505b9250929050565b60005b8251811015610d2557306001600160a01b03168282815181106119f5576119f56134ee565b60200260200101516001600160a01b031603611a32576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b611a6e838281518110611a4757611a476134ee565b6020026020010151838381518110611a6157611a616134ee565b6020026020010151612912565b6001016119d0565b806001600160a01b03163b600003610a6f5780604051630bfc64a360e21b81526004016107f09190613332565b80611aac611e09565b600084600f811115611ac057611ac0612ee5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b0157611b01612ee5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611b50576040516305f4dee960e31b815260040160405180910390fd5b6000611b5a611944565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611bb5611bac611944565b60010186611968565b9150915081611bd957846040516326527e1760e01b81526004016107f09190613332565b611be1611944565b805482908110611bf357611bf36134ee565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611c21575060018111155b15611c4d576000356001600160e01b0319166040516387f6f09560e01b81526004016107f09190613579565b6000611c57611de5565b6001810180546002830180549287905585905582549293509184908690856000611c8083613705565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611cd0611944565b905082516001600160401b03811115611ceb57611ceb61301c565b604051908082528060200260200182016040528015611d14578160200160208202803683370190505b50915060005b8351811015611da957816002016000858381518110611d3b57611d3b6134ee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611d8957611d896134ee565b6001600160601b0390921660209283029190910190910152600101611d1a565b5050919050565b6000611dba611944565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081611e398161115e565b6000611e43611944565b8451909150806001600160401b03811115611e6057611e6061301c565b604051908082528060200260200182016040528015611e89578160200160208202803683370190505b50935080600003611e9b57505061220d565b60058201548254611ead908390613544565b1015611ecc5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561219357898181518110611eef57611eef6134ee565b60200260200101519350611f0284611b9b565b9095509150611f108561231d565b611f198461231d565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611f6d57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611f7f57611f7f6134ee565b602002602001019015159081151581525050888181518110611fa357611fa36134ee565b60200260200101511561218b576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611fe690600190613544565b9050886000018181548110611ffd57611ffd6134ee565b60009182526020909120015489546001600160a01b03909116908a9086908110612029576120296134ee565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120635761206361371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106120c3576120c36134ee565b60009182526020909120015460018a0180546001600160a01b0390921691869081106120f1576120f16134ee565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121325761213261371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b03191690556121868286613531565b945050505b600101611ed5565b50818660040160008282546121a89190613544565b90915550506040516121cd90636242a4ef60e11b906110eb908c908c90602001613734565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516121fe929190613762565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122355761223561301c565b60405190808252806020026020018201604052801561225e578160200160208202803683370190505b50925060005b828110156122b85785818151811061227e5761227e6134ee565b6020026020010151848281518110612298576122986134ee565b6001600160a01b0390921660209283029190910190910152600101612264565b60005b82811015612313578581815181106122d5576122d56134ee565b60200260200101518583815181106122ef576122ef6134ee565b6001600160a01b0390921660209283029190910190910152600191820191016122bb565b5050505092915050565b6001600160a01b038116610a6f576000356001600160e01b03191660405163104c66df60e31b81526004016107f09190613579565b61235c82826129a5565b610753573382826040516319b5fdcb60e31b81526004016107f0939291906137d7565b6000815160000361239257506000919050565b60005b600183510381101561241557600181015b835181101561240c578381815181106123c1576123c16134ee565b60200260200101516001600160a01b03168483815181106123e4576123e46134ee565b60200260200101516001600160a01b031603612404575060019392505050565b6001016123a6565b50600101612395565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561246e57602002820191906000526020600020905b81548152602001906001019080831161245a575b50505050509050919050565b6000818152600183016020526040812054801561256357600061249e600183613544565b85549091506000906124b290600190613544565b90508181146125175760008660000182815481106124d2576124d26134ee565b90600052602060002001549050808760000184815481106124f5576124f56134ee565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125285761252861371e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610709565b6000915050610709565b6000816040516024016125809190613579565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906125c990859061380b565b600060405180830381855afa9150503d8060008114612604576040519150601f19603f3d011682016040523d82523d6000602084013e612609565b606091505b5091509150816126cb57846001600160a01b03168360405160240161262e9190613827565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251612663919061380b565b600060405180830381855afa9150503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b509092509050816126cb57838560405163069d427960e11b81526004016107f092919061383a565b808060200190518101906126df919061385d565b6106b457838560405163069d427960e11b81526004016107f092919061383a565b6000610706836001600160a01b038416612ccb565b600054610100900460ff1661273c5760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612d1a565b600054610100900460ff1661276c5760405162461bcd60e51b81526004016107f0906136ba565b61098a600030612912565b600054610100900460ff1661279e5760405162461bcd60e51b81526004016107f0906136ba565b60006127a8611de5565b600181559050610d258383611c12565b600054610100900460ff166127df5760405162461bcd60e51b81526004016107f0906136ba565b610a6f816117d7565b600054610100900460ff1661280f5760405162461bcd60e51b81526004016107f0906136ba565b61281a600285611aa3565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155612907818385610de9565b506106b46003611b2e565b806005600084600581111561292957612929612ee5565b600581111561293a5761293a612ee5565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561297857612978612ee5565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b600160006129b46105fb611218565b805190915060008190036129c9575050610709565b6000816001600160401b038111156129e3576129e361301c565b604051908082528060200260200182016040528015612a0c578160200160208202803683370190505b5090506000826001600160401b03811115612a2957612a2961301c565b604051908082528060200260200182016040528015612a5c57816020015b6060815260200190600190039081612a475790505b50905060008787604051602001612a7492919061387f565b6040516020818303038152906040529050600081604051602401612a989190613827565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612c8157868181518110612ae157612ae16134ee565b60200260200101516001600160a01b031683604051612b00919061380b565b6000604051808303816000865af19150503d8060008114612b3d576040519150601f19603f3d011682016040523d82523d6000602084013e612b42565b606091505b50868381518110612b5557612b556134ee565b60200260200101868481518110612b6e57612b6e6134ee565b6020026020010182905282151515158152505050848181518110612b9457612b946134ee565b6020026020010151612c7957868181518110612bb257612bb26134ee565b60200260200101516001600160a01b031682604051612bd1919061380b565b6000604051808303816000865af19150503d8060008114612c0e576040519150601f19603f3d011682016040523d82523d6000602084013e612c13565b606091505b50868381518110612c2657612c266134ee565b60200260200101868481518110612c3f57612c3f6134ee565b6020026020010182905282151515158152505050878015612c765750848181518110612c6d57612c6d6134ee565b60200260200101515b97505b600101612ac7565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612cb794939291906138b0565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612d1257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610709565b506000610709565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b60008083601f840112612d5f57600080fd5b5081356001600160401b03811115612d7657600080fd5b6020830191508360208260051b85010111156119c657600080fd5b60008060008060008060608789031215612daa57600080fd5b86356001600160401b0380821115612dc157600080fd5b612dcd8a838b01612d4d565b90985096506020890135915080821115612de657600080fd5b612df28a838b01612d4d565b90965094506040890135915080821115612e0b57600080fd5b50612e1889828a01612d4d565b979a9699509497509295939492505050565b60008060208385031215612e3d57600080fd5b82356001600160401b03811115612e5357600080fd5b612e5f85828601612d4d565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612ea55781516001600160a01b031687529582019590820190600101612e80565b509495945050505050565b6020815260006107066020830184612e6b565b60008060408385031215612ed657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60006060808352612f0f6060840187612e6b565b83810360208581019190915286518083528782019282019060005b81811015612f5657845160028110612f4457612f44612ee5565b83529383019391830191600101612f2a565b50506040925085810360408701528087518083528383019150838901925060005b81811015612fa7578351805160ff1684528581015186850152860151868401529284019291860191600101612f77565b50909a9950505050505050505050565b80356001600160a01b0381168114610cba57600080fd5b600080600060608486031215612fe357600080fd5b8335925060208401359150612ffa60408501612fb7565b90509250925092565b60006020828403121561301557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561305a5761305a61301c565b604052919050565b60006001600160401b0382111561307b5761307b61301c565b5060051b60200190565b600082601f83011261309657600080fd5b813560206130ab6130a683613062565b613032565b8083825260208201915060208460051b8701019350868411156130cd57600080fd5b602086015b848110156130f0576130e381612fb7565b83529183019183016130d2565b509695505050505050565b600082601f83011261310c57600080fd5b8135602061311c6130a683613062565b8083825260208201915060208460051b87010193508684111561313e57600080fd5b602086015b848110156130f05780356001600160601b03811681146131635760008081fd5b8352918301918301613143565b600082601f83011261318157600080fd5b813560206131916130a683613062565b8083825260208201915060208460051b8701019350868411156131b357600080fd5b602086015b848110156130f0578035600681106131d05760008081fd5b83529183019183016131b8565b60008060008060008060008060008060006101608c8e0312156131ff57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975061322460808d01612fb7565b96506001600160401b0360a08d013581101561323f57600080fd5b61324f8e60a08f01358f01613085565b96508060c08e0135111561326257600080fd5b6132728e60c08f01358f01613085565b95508060e08e0135111561328557600080fd5b6132958e60e08f01358f01613085565b9450806101008e013511156132a957600080fd5b6132ba8e6101008f01358f016130fb565b9350806101208e013511156132ce57600080fd5b6132df8e6101208f01358f01613170565b9250806101408e013511156132f357600080fd5b506133058d6101408e01358e01613085565b90509295989b509295989b9093969950565b60006020828403121561332957600080fd5b61070682612fb7565b6001600160a01b0391909116815260200190565b6000806040838503121561335957600080fd5b82356001600160401b038082111561337057600080fd5b61337c86838701613170565b9350602085013591508082111561339257600080fd5b5061339f85828601613085565b9150509250929050565b600080604083850312156133bc57600080fd5b823591506133cc60208401612fb7565b90509250929050565b803560108110610cba57600080fd5b600080604083850312156133f757600080fd5b613400836133d5565b91506133cc60208401612fb7565b60a081016005871061342257613422612ee5565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612ea55781516001600160601b031687529582019590820190600101613458565b6060815260006134906060830186612e6b565b82810360208401526134a28186612e6b565b905082810360408401526134b68185613443565b9695505050505050565b6020815260006107066020830184613443565b6000602082840312156134e557600080fd5b610706826133d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761070957610709613504565b8082018082111561070957610709613504565b8181038181111561070957610709613504565b60008261357457634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60208101601083106135a2576135a2612ee5565b91905290565b6001600160e01b03198316815260408101600b83106135c9576135c9612ee5565b8260208301529392505050565b6001600160601b03818116838216019080821115610a7d57610a7d613504565b60008151808452602080850194506020840160005b83811015612ea557815115158752958201959082019060010161360b565b60608152600061363c6060830186612e6b565b828103602084015261364e8186613443565b905082810360408401526134b681856135f6565b60808152600061367560808301876135f6565b82810360208401526136878187613443565b9050828103604084015261369b8186612e6b565b905082810360608401526136af8185612e6b565b979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001820161371757613717613504565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006137476040830185612e6b565b828103602084015261375981856135f6565b95945050505050565b60408152600061377560408301856135f6565b82810360208401526137598185612e6b565b60005b838110156137a257818101518382015260200161378a565b50506000910152565b600081518084526137c3816020860160208601613787565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090613759908301846137ab565b6000825161381d818460208701613787565b9190910192915050565b60208152600061070660208301846137ab565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561386f57600080fd5b8151801515811461124957600080fd5b6001600160e01b03198316815281516000906138a2816004850160208701613787565b919091016004019392505050565b6080815260006138c360808301876137ab565b6020838203818501526138d68288612e6b565b915083820360408501526138ea82876135f6565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561393b57601f198784030185526139298383516137ab565b9486019492509085019060010161390d565b50909b9a505050505050505050505056fea2646970667358221220d83003b43962afe3120b34eb387ecaaf4912a01d9c682ac0fb953cf65d90b77c64736f6c63430008170033", + "nonce": "0x2f121" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "function": null, + "arguments": [ + "0x2e8006C2Af701925915417D29c47b6D16e3C8cc8", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x7d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000000127500000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2b7868", + "value": "0x0", + "data": "0x608060405260405162000eed38038062000eed833981016040819052620000269162000429565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200055c565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000ea6833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000ec6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000ea68339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002118162000383565b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b6060620002aa8462000383565b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b03168560405162000324919062000509565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000392565b9695505050505050565b6001600160a01b03163b151590565b60608315620003a357508162000161565b825115620003b45782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000527565b80516001600160a01b0381168114620003e857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200042057818101518382015260200162000406565b50506000910152565b6000806000606084860312156200043f57600080fd5b6200044a84620003d0565b92506200045a60208501620003d0565b60408501519092506001600160401b03808211156200047857600080fd5b818601915086601f8301126200048d57600080fd5b815181811115620004a257620004a2620003ed565b604051601f8201601f19908116603f01168101908382118183101715620004cd57620004cd620003ed565b81604052828152896020848701011115620004e757600080fd5b620004fa83602083016020880162000403565b80955050505050509250925092565b600082516200051d81846020870162000403565b9190910192915050565b60208152600082518060208401526200054881604085016020870162000403565b601f01601f19169190910160400192915050565b61093a806200056c6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b3660046106c7565b610136565b61006661009e3660046106f8565b610173565b6100666100b13660046107a8565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b506100666101023660046106c7565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610370565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610370915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b576101688161039b565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006102406103ef565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b600060008051602061089e8339815191525b546001600160a01b0316919050565b61037983610405565b6000825111806103865750805b15610212576103958383610445565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c461034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610471565b60006000805160206108be833981519152610361565b61040e81610508565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061046a83836040518060600160405280602781526020016108de60279139610588565b9392505050565b6001600160a01b0381166104d65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b8060008051602061089e8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051181610663565b6105735760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b806000805160206108be8339815191526104e7565b606061059384610663565b6105ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610609919061084e565b600060405180830381855af49150503d8060008114610644576040519150601f19603f3d011682016040523d82523d6000602084013e610649565b606091505b5091509150610659828286610672565b9695505050505050565b6001600160a01b03163b151590565b6060831561068157508161046a565b8251156106915782518084602001fd5b8160405162461bcd60e51b815260040161031d919061086a565b80356001600160a01b03811681146106c257600080fd5b919050565b6000602082840312156106d957600080fd5b61046a826106ab565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561070a57600080fd5b81356001600160401b038082111561072157600080fd5b818401915084601f83011261073557600080fd5b813581811115610747576107476106e2565b604051601f8201601f19908116603f0116810190838211818310171561076f5761076f6106e2565b8160405282815287602084870101111561078857600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107bd57600080fd5b6107c6846106ab565b925060208401356001600160401b03808211156107e257600080fd5b818601915086601f8301126107f657600080fd5b81358181111561080557600080fd5b87602082850101111561081757600080fd5b6020830194508093505050509250925092565b60005b8381101561084557818101518382015260200161082d565b50506000910152565b6000825161086081846020870161082a565b9190910192915050565b602081526000825180602084015261088981604085016020870161082a565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205d5db908d6bad5bfc298cb89bc49c38963bb1499be9336506651cff965fb333264736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65640000000000000000000000002e8006c2af701925915417d29c47b6d16e3c8cc8000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000004e47d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000000127500000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab9500000000000000000000000000000000000000000000000000000000", + "nonce": "0x2f122" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "RoninBridgeManager", + "contractAddress": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0xa304fa", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615f2b80620000f46000396000f3fe608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fbc7cf0cc42a480ef3d40d76fe731fb7fad911d9e6f97db06cb768d5fde5e16d64736f6c63430008170033", + "nonce": "0x2f123" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": "src/extensions/TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "contractAddress": "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "function": "upgradeTo(address)", + "arguments": [ + "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0xd05a72c0a593983aa8336c997736e2172e745ff1", + "gas": "0xfea6", + "value": "0x0", + "data": "0x3659cfe60000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf", + "nonce": "0x2f124" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": "src/extensions/TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "contractAddress": "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "function": "changeAdmin(address)", + "arguments": [ + "0xb0507f2f22697022eCb25963a00D3D076dAc5753" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0xd05a72c0a593983aa8336c997736e2172e745ff1", + "gas": "0x10116", + "value": "0x0", + "data": "0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753", + "nonce": "0x2f125" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1713240478, + "chain": 2021, + "multi": false, + "commit": "6964a97" +} \ No newline at end of file diff --git a/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240671.json b/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240671.json new file mode 100644 index 00000000..c9be81eb --- /dev/null +++ b/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240671.json @@ -0,0 +1,118 @@ +{ + "transactions": [ + { + "hash": "0x32330f2782488f77d3a5754841fe7628ae853c71cc9be98bc58221d40d6b7022", + "transactionType": "CREATE", + "contractName": "RoninBridgeManagerConstructor", + "contractAddress": "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x637700", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61398280620000f46000396000f3fe608060405234801561001057600080fd5b50600436106101965760003560e01c806301a5f43f1461019b57806306aba0e1146101b05780630a44fa43146101cb5780630f7c3189146101de5780631c905e39146101f35780631f425338146102155780632c5e6520146102285780632d6d7d731461024b57806334d5f37b1461025e57806335da81211461027e5780633644e515146102915780637d4c1d781461029a5780637de5dedd146102ad5780637f7fe058146102b5578063800eaab3146102d5578063828fc1a1146102e8578063865e6fd3146102fb578063901979d51461030e5780639b19dbfd14610339578063a64a838014610341578063aee1767f14610354578063b384abef14610367578063b405aaf2146103c2578063b9c36209146103d5578063bc4e068f146103e8578063c441c4a8146103fb578063cc7e6b3b14610412578063d0a50db014610432578063d78392f81461043a578063dafae4081461044d578063de981f1b14610460578063e75235b814610473578063e9c0349814610490578063f80b5352146104a3575b600080fd5b6101ae6101a9366004612d91565b6104ab565b005b6101b861055a565b6040519081526020015b60405180910390f35b6101b86101d9366004612e2a565b610569565b6101e66105ee565b6040516101c29190612eb0565b610206610201366004612ec3565b610600565b6040516101c293929190612efb565b6101ae610223366004612e2a565b61061c565b61023b610236366004612fce565b6106bb565b60405190151581526020016101c2565b6101e6610259366004612e2a565b6106c8565b6101b861026c366004613003565b60026020526000908152604090205481565b6101ae61028c366004612e2a565b61070f565b6101b860015481565b6101ae6102a83660046131dd565b610757565b6101b8610893565b6102c86102c3366004613317565b6108e9565b6040516101c29190613332565b6101ae6102e3366004613346565b61095c565b61023b6102f63660046133a9565b610994565b6101ae6103093660046133e4565b6109a2565b61032161031c366004613317565b6109bd565b6040516001600160601b0390911681526020016101c2565b6101e66109f3565b6101ae61034f366004613003565b610a5e565b6102c8610362366004613317565b610a72565b6103b1610375366004612ec3565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101c295949392919061340e565b61023b6103d0366004613317565b610a84565b6101ae6103e3366004612ec3565b610abc565b6102066103f6366004613003565b610ace565b610403610aeb565b6040516101c29392919061347d565b610425610420366004612e2a565b610bc5565b6040516101c291906134c0565b6101b8610c03565b610321610448366004613317565b610c16565b61023b61045b366004613003565b610c21565b6102c861046e3660046134d3565b610c5d565b61047b610cbf565b604080519283526020830191909152016101c2565b6101ae61049e366004612e2a565b610ce1565b6101e6610d2a565b6104b3610d8d565b61055186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610de992505050565b50505050505050565b600061056461114b565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105aa925083915061115e9050565b6105e684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061119392505050565b949350505050565b60606105646105fb611218565b61123c565b606080606061060f8585611250565b9250925092509250925092565b610624610d8d565b818180806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610663925083915061115e9050565b600061066d611218565b905060005b838110156106b4576106ab85858381811061068f5761068f6134ee565b90506020020160208101906106a49190613317565b8390611639565b50600101610672565b5050505050565b60006105e684848461164e565b606061070683838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611684915050565b90505b92915050565b610717610d8d565b6107538282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506117d792505050565b5050565b600054610100900460ff16158080156107775750600054600160ff909116105b806107915750303b158015610791575060005460ff166001145b6107f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561081c576000805461ff0019166101001790555b61082589611892565b61082f83836118c2565b61083f8c8c8c8b8b8b8b8b6118f3565b8015610885576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60008061089e611944565b90506000806108ab610cbf565b91509150806001828560040154856108c3919061351a565b6108cd9190613531565b6108d79190613544565b6108e19190613557565b935050505090565b60008060006108ff6108f9611944565b85611968565b9150915081610923578360405163141e2e1f60e11b81526004016107f09190613332565b61092b611944565b600101818154811061093f5761093f6134ee565b6000918252602090912001546001600160a01b0316949350505050565b33301461098a576000356001600160e01b0319166040516307337e1960e41b81526004016107f09190613579565b61075382826119cd565b60006107066000848461164e565b6109aa610d8d565b6109b381611a76565b6107538282611aa3565b6000806109c8611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109fd611944565b600101805480602002602001604051908101604052809291908181526020018280548015610a5457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a36575b5050505050905090565b610a66610d8d565b610a6f81611b2e565b50565b6000610a7d82611b9b565b5092915050565b600080610a8f611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610ac4610d8d565b6107538282611c12565b6060806060610ade600085611250565b9250925092509193909250565b60608060606000610afa611944565b805460408051602080840282018101909252828152929350839190830182828015610b4e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b30575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b50505050509250610bbd84611cc4565b915050909192565b6060610706838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611cc492505050565b6000610c0d611944565b60010154919050565b600061070982611db0565b600080610c2c611de5565b9050610c3661114b565b8160010154610c45919061351a565b6002820154610c54908561351a565b10159392505050565b6000610c67611e09565b600083600f811115610c7b57610c7b612ee5565b60ff1681526020810191909152604001600020546001600160a01b0316905080610cba578160405163409140df60e11b81526004016107f0919061358e565b919050565b6000806000610ccc611de5565b90508060010154816002015492509250509091565b610ce9610d8d565b610d25828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e2d92505050565b505050565b6060610d34611944565b805460408051602080840282018101909252828152929190830182828015610a54576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a36575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610de7576000356001600160e01b0319166001604051620f948f60ea1b81526004016107f09291906135a8565b565b6060610df58383612213565b610dfe8161115e565b6000610e08611944565b845187519192509081148015610e1e5750855181145b610e49576000356001600160e01b0319166040516306b5667560e21b81526004016107f09190613579565b806001600160401b03811115610e6157610e6161301c565b604051908082528060200260200182016040528015610e8a578160200160208202803683370190505b50935080600003610e9c575050611143565b60008060008060005b858110156110af578a8181518110610ebf57610ebf6134ee565b60200260200101519450898181518110610edb57610edb6134ee565b602002602001015193508b8181518110610ef757610ef76134ee565b60200260200101519250610f0a8561231d565b610f138461231d565b826001600160601b0316600003610f4b576000356001600160e01b031916604051637f11b8a360e11b81526004016107f09190613579565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692610fa39290811691166135d6565b610fad91906135d6565b610fb791906135d6565b6001600160601b0316600014898281518110610fd557610fd56134ee565b602002602001019015159081151581525050888181518110610ff957610ff96134ee565b6020026020010151156110a7578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556110a49083613531565b91505b600101610ea5565b50808660040160008282546110c49190613531565b90915550506040516110ff906347c28ec560e11b906110eb908c908f908d90602001613629565b604051602081830303815290604052612352565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516111349493929190613662565b60405180910390a15050505050505b509392505050565b6000611155611944565b60040154905090565b6111678161237f565b15610a6f576000356001600160e01b031916604051630d697db160e11b81526004016107f09190613579565b60008161119f8161115e565b60006111a9611944565b905060005b8451811015611210578160020160008683815181106111cf576111cf6134ee565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611206906001600160601b031685613531565b93506001016111ae565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b606060006112498361241e565b9392505050565b600082815260036020908152604080832084845290915281206004810154600582015460609384938493909290916112888284613531565b9050806001600160401b038111156112a2576112a261301c565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509550806001600160401b038111156112e6576112e661301c565b60405190808252806020026020018201604052801561133157816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816113045790505b509450806001600160401b0381111561134c5761134c61301c565b604051908082528060200260200182016040528015611375578160200160208202803683370190505b50965060005b838110156114ca576000878281518110611397576113976134ee565b602002602001019060018111156113b0576113b0612ee5565b908160018111156113c3576113c3612ee5565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106113fc576113fc6134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061145a5761145a6134ee565b602002602001018190525084600401818154811061147a5761147a6134ee565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106114aa576114aa6134ee565b6001600160a01b039092166020928302919091019091015260010161137b565b5060005b8281101561162d576001876114e38684613531565b815181106114f3576114f36134ee565b6020026020010190600181111561150c5761150c612ee5565b9081600181111561151f5761151f612ee5565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611558576115586134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866115ad8684613531565b815181106115bd576115bd6134ee565b60200260200101819052508460050181815481106115dd576115dd6134ee565b6000918252602090912001546001600160a01b0316886115fd8684613531565b8151811061160d5761160d6134ee565b6001600160a01b03909216602092830291909101909101526001016114ce565b50505050509250925092565b6000610706836001600160a01b03841661247a565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff166105e6565b606082516001600160401b0381111561169f5761169f61301c565b6040519080825280602002602001820160405280156116c8578160200160208202803683370190505b50905060005b8351811015610a7d57600560008583815181106116ed576116ed6134ee565b6020026020010151600581111561170657611706612ee5565b600581111561171757611717612ee5565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061174b5761174b6134ee565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156117a3575060006001600160a01b0316828281518110611790576117906134ee565b60200260200101516001600160a01b0316145b156117cf576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b6001016116ce565b806117e18161115e565b60006117eb611218565b905060008060005b855181101561188a5785818151811061180e5761180e6134ee565b6020026020010151925061182183611a76565b611832836312c0151560e21b61256d565b61183c8484612700565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016117f3565b505050505050565b600054610100900460ff166118b95760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612715565b600054610100900460ff166118e95760405162461bcd60e51b81526004016107f0906136ba565b6107538282612745565b600054610100900460ff1661191a5760405162461bcd60e51b81526004016107f0906136ba565b6119248888612777565b61192d846127b8565b61193a86868585856127e8565b5050505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156119bb57848181548110611989576119896134ee565b6000918252602090912001546001600160a01b03908116908516036119b3576001925090506119c6565b60010161196e565b506000600019915091505b9250929050565b60005b8251811015610d2557306001600160a01b03168282815181106119f5576119f56134ee565b60200260200101516001600160a01b031603611a32576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b611a6e838281518110611a4757611a476134ee565b6020026020010151838381518110611a6157611a616134ee565b6020026020010151612912565b6001016119d0565b806001600160a01b03163b600003610a6f5780604051630bfc64a360e21b81526004016107f09190613332565b80611aac611e09565b600084600f811115611ac057611ac0612ee5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b0157611b01612ee5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611b50576040516305f4dee960e31b815260040160405180910390fd5b6000611b5a611944565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611bb5611bac611944565b60010186611968565b9150915081611bd957846040516326527e1760e01b81526004016107f09190613332565b611be1611944565b805482908110611bf357611bf36134ee565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611c21575060018111155b15611c4d576000356001600160e01b0319166040516387f6f09560e01b81526004016107f09190613579565b6000611c57611de5565b6001810180546002830180549287905585905582549293509184908690856000611c8083613705565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611cd0611944565b905082516001600160401b03811115611ceb57611ceb61301c565b604051908082528060200260200182016040528015611d14578160200160208202803683370190505b50915060005b8351811015611da957816002016000858381518110611d3b57611d3b6134ee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611d8957611d896134ee565b6001600160601b0390921660209283029190910190910152600101611d1a565b5050919050565b6000611dba611944565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081611e398161115e565b6000611e43611944565b8451909150806001600160401b03811115611e6057611e6061301c565b604051908082528060200260200182016040528015611e89578160200160208202803683370190505b50935080600003611e9b57505061220d565b60058201548254611ead908390613544565b1015611ecc5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561219357898181518110611eef57611eef6134ee565b60200260200101519350611f0284611b9b565b9095509150611f108561231d565b611f198461231d565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611f6d57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611f7f57611f7f6134ee565b602002602001019015159081151581525050888181518110611fa357611fa36134ee565b60200260200101511561218b576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611fe690600190613544565b9050886000018181548110611ffd57611ffd6134ee565b60009182526020909120015489546001600160a01b03909116908a9086908110612029576120296134ee565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120635761206361371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106120c3576120c36134ee565b60009182526020909120015460018a0180546001600160a01b0390921691869081106120f1576120f16134ee565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121325761213261371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b03191690556121868286613531565b945050505b600101611ed5565b50818660040160008282546121a89190613544565b90915550506040516121cd90636242a4ef60e11b906110eb908c908c90602001613734565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516121fe929190613762565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122355761223561301c565b60405190808252806020026020018201604052801561225e578160200160208202803683370190505b50925060005b828110156122b85785818151811061227e5761227e6134ee565b6020026020010151848281518110612298576122986134ee565b6001600160a01b0390921660209283029190910190910152600101612264565b60005b82811015612313578581815181106122d5576122d56134ee565b60200260200101518583815181106122ef576122ef6134ee565b6001600160a01b0390921660209283029190910190910152600191820191016122bb565b5050505092915050565b6001600160a01b038116610a6f576000356001600160e01b03191660405163104c66df60e31b81526004016107f09190613579565b61235c82826129a5565b610753573382826040516319b5fdcb60e31b81526004016107f0939291906137d7565b6000815160000361239257506000919050565b60005b600183510381101561241557600181015b835181101561240c578381815181106123c1576123c16134ee565b60200260200101516001600160a01b03168483815181106123e4576123e46134ee565b60200260200101516001600160a01b031603612404575060019392505050565b6001016123a6565b50600101612395565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561246e57602002820191906000526020600020905b81548152602001906001019080831161245a575b50505050509050919050565b6000818152600183016020526040812054801561256357600061249e600183613544565b85549091506000906124b290600190613544565b90508181146125175760008660000182815481106124d2576124d26134ee565b90600052602060002001549050808760000184815481106124f5576124f56134ee565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125285761252861371e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610709565b6000915050610709565b6000816040516024016125809190613579565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906125c990859061380b565b600060405180830381855afa9150503d8060008114612604576040519150601f19603f3d011682016040523d82523d6000602084013e612609565b606091505b5091509150816126cb57846001600160a01b03168360405160240161262e9190613827565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251612663919061380b565b600060405180830381855afa9150503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b509092509050816126cb57838560405163069d427960e11b81526004016107f092919061383a565b808060200190518101906126df919061385d565b6106b457838560405163069d427960e11b81526004016107f092919061383a565b6000610706836001600160a01b038416612ccb565b600054610100900460ff1661273c5760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612d1a565b600054610100900460ff1661276c5760405162461bcd60e51b81526004016107f0906136ba565b61098a600030612912565b600054610100900460ff1661279e5760405162461bcd60e51b81526004016107f0906136ba565b60006127a8611de5565b600181559050610d258383611c12565b600054610100900460ff166127df5760405162461bcd60e51b81526004016107f0906136ba565b610a6f816117d7565b600054610100900460ff1661280f5760405162461bcd60e51b81526004016107f0906136ba565b61281a600285611aa3565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155612907818385610de9565b506106b46003611b2e565b806005600084600581111561292957612929612ee5565b600581111561293a5761293a612ee5565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561297857612978612ee5565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b600160006129b46105fb611218565b805190915060008190036129c9575050610709565b6000816001600160401b038111156129e3576129e361301c565b604051908082528060200260200182016040528015612a0c578160200160208202803683370190505b5090506000826001600160401b03811115612a2957612a2961301c565b604051908082528060200260200182016040528015612a5c57816020015b6060815260200190600190039081612a475790505b50905060008787604051602001612a7492919061387f565b6040516020818303038152906040529050600081604051602401612a989190613827565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612c8157868181518110612ae157612ae16134ee565b60200260200101516001600160a01b031683604051612b00919061380b565b6000604051808303816000865af19150503d8060008114612b3d576040519150601f19603f3d011682016040523d82523d6000602084013e612b42565b606091505b50868381518110612b5557612b556134ee565b60200260200101868481518110612b6e57612b6e6134ee565b6020026020010182905282151515158152505050848181518110612b9457612b946134ee565b6020026020010151612c7957868181518110612bb257612bb26134ee565b60200260200101516001600160a01b031682604051612bd1919061380b565b6000604051808303816000865af19150503d8060008114612c0e576040519150601f19603f3d011682016040523d82523d6000602084013e612c13565b606091505b50868381518110612c2657612c266134ee565b60200260200101868481518110612c3f57612c3f6134ee565b6020026020010182905282151515158152505050878015612c765750848181518110612c6d57612c6d6134ee565b60200260200101515b97505b600101612ac7565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612cb794939291906138b0565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612d1257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610709565b506000610709565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b60008083601f840112612d5f57600080fd5b5081356001600160401b03811115612d7657600080fd5b6020830191508360208260051b85010111156119c657600080fd5b60008060008060008060608789031215612daa57600080fd5b86356001600160401b0380821115612dc157600080fd5b612dcd8a838b01612d4d565b90985096506020890135915080821115612de657600080fd5b612df28a838b01612d4d565b90965094506040890135915080821115612e0b57600080fd5b50612e1889828a01612d4d565b979a9699509497509295939492505050565b60008060208385031215612e3d57600080fd5b82356001600160401b03811115612e5357600080fd5b612e5f85828601612d4d565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612ea55781516001600160a01b031687529582019590820190600101612e80565b509495945050505050565b6020815260006107066020830184612e6b565b60008060408385031215612ed657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60006060808352612f0f6060840187612e6b565b83810360208581019190915286518083528782019282019060005b81811015612f5657845160028110612f4457612f44612ee5565b83529383019391830191600101612f2a565b50506040925085810360408701528087518083528383019150838901925060005b81811015612fa7578351805160ff1684528581015186850152860151868401529284019291860191600101612f77565b50909a9950505050505050505050565b80356001600160a01b0381168114610cba57600080fd5b600080600060608486031215612fe357600080fd5b8335925060208401359150612ffa60408501612fb7565b90509250925092565b60006020828403121561301557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561305a5761305a61301c565b604052919050565b60006001600160401b0382111561307b5761307b61301c565b5060051b60200190565b600082601f83011261309657600080fd5b813560206130ab6130a683613062565b613032565b8083825260208201915060208460051b8701019350868411156130cd57600080fd5b602086015b848110156130f0576130e381612fb7565b83529183019183016130d2565b509695505050505050565b600082601f83011261310c57600080fd5b8135602061311c6130a683613062565b8083825260208201915060208460051b87010193508684111561313e57600080fd5b602086015b848110156130f05780356001600160601b03811681146131635760008081fd5b8352918301918301613143565b600082601f83011261318157600080fd5b813560206131916130a683613062565b8083825260208201915060208460051b8701019350868411156131b357600080fd5b602086015b848110156130f0578035600681106131d05760008081fd5b83529183019183016131b8565b60008060008060008060008060008060006101608c8e0312156131ff57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975061322460808d01612fb7565b96506001600160401b0360a08d013581101561323f57600080fd5b61324f8e60a08f01358f01613085565b96508060c08e0135111561326257600080fd5b6132728e60c08f01358f01613085565b95508060e08e0135111561328557600080fd5b6132958e60e08f01358f01613085565b9450806101008e013511156132a957600080fd5b6132ba8e6101008f01358f016130fb565b9350806101208e013511156132ce57600080fd5b6132df8e6101208f01358f01613170565b9250806101408e013511156132f357600080fd5b506133058d6101408e01358e01613085565b90509295989b509295989b9093969950565b60006020828403121561332957600080fd5b61070682612fb7565b6001600160a01b0391909116815260200190565b6000806040838503121561335957600080fd5b82356001600160401b038082111561337057600080fd5b61337c86838701613170565b9350602085013591508082111561339257600080fd5b5061339f85828601613085565b9150509250929050565b600080604083850312156133bc57600080fd5b823591506133cc60208401612fb7565b90509250929050565b803560108110610cba57600080fd5b600080604083850312156133f757600080fd5b613400836133d5565b91506133cc60208401612fb7565b60a081016005871061342257613422612ee5565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612ea55781516001600160601b031687529582019590820190600101613458565b6060815260006134906060830186612e6b565b82810360208401526134a28186612e6b565b905082810360408401526134b68185613443565b9695505050505050565b6020815260006107066020830184613443565b6000602082840312156134e557600080fd5b610706826133d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761070957610709613504565b8082018082111561070957610709613504565b8181038181111561070957610709613504565b60008261357457634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60208101601083106135a2576135a2612ee5565b91905290565b6001600160e01b03198316815260408101600b83106135c9576135c9612ee5565b8260208301529392505050565b6001600160601b03818116838216019080821115610a7d57610a7d613504565b60008151808452602080850194506020840160005b83811015612ea557815115158752958201959082019060010161360b565b60608152600061363c6060830186612e6b565b828103602084015261364e8186613443565b905082810360408401526134b681856135f6565b60808152600061367560808301876135f6565b82810360208401526136878187613443565b9050828103604084015261369b8186612e6b565b905082810360608401526136af8185612e6b565b979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001820161371757613717613504565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006137476040830185612e6b565b828103602084015261375981856135f6565b95945050505050565b60408152600061377560408301856135f6565b82810360208401526137598185612e6b565b60005b838110156137a257818101518382015260200161378a565b50506000910152565b600081518084526137c3816020860160208601613787565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090613759908301846137ab565b6000825161381d818460208701613787565b9190910192915050565b60208152600061070660208301846137ab565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561386f57600080fd5b8151801515811461124957600080fd5b6001600160e01b03198316815281516000906138a2816004850160208701613787565b919091016004019392505050565b6080815260006138c360808301876137ab565b6020838203818501526138d68288612e6b565b915083820360408501526138ea82876135f6565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561393b57601f198784030185526139298383516137ab565b9486019492509085019060010161390d565b50909b9a505050505050505050505056fea2646970667358221220d83003b43962afe3120b34eb387ecaaf4912a01d9c682ac0fb953cf65d90b77c64736f6c63430008170033", + "nonce": "0x2f122" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "function": null, + "arguments": [ + "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x7d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000000127500000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2b7868", + "value": "0x0", + "data": "0x608060405260405162000eed38038062000eed833981016040819052620000269162000429565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200055c565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000ea6833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000ec6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000ea68339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002118162000383565b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b6060620002aa8462000383565b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b03168560405162000324919062000509565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000392565b9695505050505050565b6001600160a01b03163b151590565b60608315620003a357508162000161565b825115620003b45782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000527565b80516001600160a01b0381168114620003e857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200042057818101518382015260200162000406565b50506000910152565b6000806000606084860312156200043f57600080fd5b6200044a84620003d0565b92506200045a60208501620003d0565b60408501519092506001600160401b03808211156200047857600080fd5b818601915086601f8301126200048d57600080fd5b815181811115620004a257620004a2620003ed565b604051601f8201601f19908116603f01168101908382118183101715620004cd57620004cd620003ed565b81604052828152896020848701011115620004e757600080fd5b620004fa83602083016020880162000403565b80955050505050509250925092565b600082516200051d81846020870162000403565b9190910192915050565b60208152600082518060208401526200054881604085016020870162000403565b601f01601f19169190910160400192915050565b61093a806200056c6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b3660046106c7565b610136565b61006661009e3660046106f8565b610173565b6100666100b13660046107a8565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b506100666101023660046106c7565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610370565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610370915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b576101688161039b565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006102406103ef565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b600060008051602061089e8339815191525b546001600160a01b0316919050565b61037983610405565b6000825111806103865750805b15610212576103958383610445565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c461034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610471565b60006000805160206108be833981519152610361565b61040e81610508565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061046a83836040518060600160405280602781526020016108de60279139610588565b9392505050565b6001600160a01b0381166104d65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b8060008051602061089e8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051181610663565b6105735760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b806000805160206108be8339815191526104e7565b606061059384610663565b6105ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610609919061084e565b600060405180830381855af49150503d8060008114610644576040519150601f19603f3d011682016040523d82523d6000602084013e610649565b606091505b5091509150610659828286610672565b9695505050505050565b6001600160a01b03163b151590565b6060831561068157508161046a565b8251156106915782518084602001fd5b8160405162461bcd60e51b815260040161031d919061086a565b80356001600160a01b03811681146106c257600080fd5b919050565b6000602082840312156106d957600080fd5b61046a826106ab565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561070a57600080fd5b81356001600160401b038082111561072157600080fd5b818401915084601f83011261073557600080fd5b813581811115610747576107476106e2565b604051601f8201601f19908116603f0116810190838211818310171561076f5761076f6106e2565b8160405282815287602084870101111561078857600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107bd57600080fd5b6107c6846106ab565b925060208401356001600160401b03808211156107e257600080fd5b818601915086601f8301126107f657600080fd5b81358181111561080557600080fd5b87602082850101111561081757600080fd5b6020830194508093505050509250925092565b60005b8381101561084557818101518382015260200161082d565b50506000910152565b6000825161086081846020870161082a565b9190910192915050565b602081526000825180602084015261088981604085016020870161082a565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205d5db908d6bad5bfc298cb89bc49c38963bb1499be9336506651cff965fb333264736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000d05a72c0a593983aa8336c997736e2172e745ff1000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000004e47d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000000127500000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab9500000000000000000000000000000000000000000000000000000000", + "nonce": "0x2f123" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfcd1ca2649e9cba542fd73c3fd0856b6199140862c65eac401c3ebff94085064", + "transactionType": "CREATE", + "contractName": "RoninBridgeManager", + "contractAddress": "0x64D21e91c2Cb367D2972E0bC377CFEa4e55F3685", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0xa304fa", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615f2b80620000f46000396000f3fe608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fbc7cf0cc42a480ef3d40d76fe731fb7fad911d9e6f97db06cb768d5fde5e16d64736f6c63430008170033", + "nonce": "0x2f124" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xde41c353b4f859829031e40fc82bce8c9840397c53e4f17719d19e593e437a6b", + "transactionType": "CALL", + "contractName": "src/extensions/TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "contractAddress": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "function": "upgradeTo(address)", + "arguments": [ + "0x64D21e91c2Cb367D2972E0bC377CFEa4e55F3685" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf", + "gas": "0xfea6", + "value": "0x0", + "data": "0x3659cfe600000000000000000000000064d21e91c2cb367d2972e0bc377cfea4e55f3685", + "nonce": "0x2f125" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xf7f521794a007a3a637834e4dce3dd3787aed00a8886cb87364af4845bf321eb", + "transactionType": "CALL", + "contractName": "src/extensions/TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "contractAddress": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "function": "changeAdmin(address)", + "arguments": [ + "0xb0507f2f22697022eCb25963a00D3D076dAc5753" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf", + "gas": "0x10116", + "value": "0x0", + "data": "0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753", + "nonce": "0x2f126" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [ + "0x32330f2782488f77d3a5754841fe7628ae853c71cc9be98bc58221d40d6b7022", + "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "0xfcd1ca2649e9cba542fd73c3fd0856b6199140862c65eac401c3ebff94085064", + "0xde41c353b4f859829031e40fc82bce8c9840397c53e4f17719d19e593e437a6b", + "0xf7f521794a007a3a637834e4dce3dd3787aed00a8886cb87364af4845bf321eb" + ], + "returns": {}, + "timestamp": 1713240671, + "chain": 2021, + "multi": false, + "commit": "6964a97" +} \ No newline at end of file diff --git a/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240678.json b/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240678.json new file mode 100644 index 00000000..bc4a54f5 --- /dev/null +++ b/broadcast/20240411-p1-deploy-ronin-bridge-manager.s.sol/2021/run-1713240678.json @@ -0,0 +1,452 @@ +{ + "transactions": [ + { + "hash": "0x32330f2782488f77d3a5754841fe7628ae853c71cc9be98bc58221d40d6b7022", + "transactionType": "CREATE", + "contractName": "RoninBridgeManagerConstructor", + "contractAddress": "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x637700", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61398280620000f46000396000f3fe608060405234801561001057600080fd5b50600436106101965760003560e01c806301a5f43f1461019b57806306aba0e1146101b05780630a44fa43146101cb5780630f7c3189146101de5780631c905e39146101f35780631f425338146102155780632c5e6520146102285780632d6d7d731461024b57806334d5f37b1461025e57806335da81211461027e5780633644e515146102915780637d4c1d781461029a5780637de5dedd146102ad5780637f7fe058146102b5578063800eaab3146102d5578063828fc1a1146102e8578063865e6fd3146102fb578063901979d51461030e5780639b19dbfd14610339578063a64a838014610341578063aee1767f14610354578063b384abef14610367578063b405aaf2146103c2578063b9c36209146103d5578063bc4e068f146103e8578063c441c4a8146103fb578063cc7e6b3b14610412578063d0a50db014610432578063d78392f81461043a578063dafae4081461044d578063de981f1b14610460578063e75235b814610473578063e9c0349814610490578063f80b5352146104a3575b600080fd5b6101ae6101a9366004612d91565b6104ab565b005b6101b861055a565b6040519081526020015b60405180910390f35b6101b86101d9366004612e2a565b610569565b6101e66105ee565b6040516101c29190612eb0565b610206610201366004612ec3565b610600565b6040516101c293929190612efb565b6101ae610223366004612e2a565b61061c565b61023b610236366004612fce565b6106bb565b60405190151581526020016101c2565b6101e6610259366004612e2a565b6106c8565b6101b861026c366004613003565b60026020526000908152604090205481565b6101ae61028c366004612e2a565b61070f565b6101b860015481565b6101ae6102a83660046131dd565b610757565b6101b8610893565b6102c86102c3366004613317565b6108e9565b6040516101c29190613332565b6101ae6102e3366004613346565b61095c565b61023b6102f63660046133a9565b610994565b6101ae6103093660046133e4565b6109a2565b61032161031c366004613317565b6109bd565b6040516001600160601b0390911681526020016101c2565b6101e66109f3565b6101ae61034f366004613003565b610a5e565b6102c8610362366004613317565b610a72565b6103b1610375366004612ec3565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101c295949392919061340e565b61023b6103d0366004613317565b610a84565b6101ae6103e3366004612ec3565b610abc565b6102066103f6366004613003565b610ace565b610403610aeb565b6040516101c29392919061347d565b610425610420366004612e2a565b610bc5565b6040516101c291906134c0565b6101b8610c03565b610321610448366004613317565b610c16565b61023b61045b366004613003565b610c21565b6102c861046e3660046134d3565b610c5d565b61047b610cbf565b604080519283526020830191909152016101c2565b6101ae61049e366004612e2a565b610ce1565b6101e6610d2a565b6104b3610d8d565b61055186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610de992505050565b50505050505050565b600061056461114b565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105aa925083915061115e9050565b6105e684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061119392505050565b949350505050565b60606105646105fb611218565b61123c565b606080606061060f8585611250565b9250925092509250925092565b610624610d8d565b818180806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610663925083915061115e9050565b600061066d611218565b905060005b838110156106b4576106ab85858381811061068f5761068f6134ee565b90506020020160208101906106a49190613317565b8390611639565b50600101610672565b5050505050565b60006105e684848461164e565b606061070683838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611684915050565b90505b92915050565b610717610d8d565b6107538282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506117d792505050565b5050565b600054610100900460ff16158080156107775750600054600160ff909116105b806107915750303b158015610791575060005460ff166001145b6107f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561081c576000805461ff0019166101001790555b61082589611892565b61082f83836118c2565b61083f8c8c8c8b8b8b8b8b6118f3565b8015610885576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60008061089e611944565b90506000806108ab610cbf565b91509150806001828560040154856108c3919061351a565b6108cd9190613531565b6108d79190613544565b6108e19190613557565b935050505090565b60008060006108ff6108f9611944565b85611968565b9150915081610923578360405163141e2e1f60e11b81526004016107f09190613332565b61092b611944565b600101818154811061093f5761093f6134ee565b6000918252602090912001546001600160a01b0316949350505050565b33301461098a576000356001600160e01b0319166040516307337e1960e41b81526004016107f09190613579565b61075382826119cd565b60006107066000848461164e565b6109aa610d8d565b6109b381611a76565b6107538282611aa3565b6000806109c8611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109fd611944565b600101805480602002602001604051908101604052809291908181526020018280548015610a5457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a36575b5050505050905090565b610a66610d8d565b610a6f81611b2e565b50565b6000610a7d82611b9b565b5092915050565b600080610a8f611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610ac4610d8d565b6107538282611c12565b6060806060610ade600085611250565b9250925092509193909250565b60608060606000610afa611944565b805460408051602080840282018101909252828152929350839190830182828015610b4e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b30575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b50505050509250610bbd84611cc4565b915050909192565b6060610706838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611cc492505050565b6000610c0d611944565b60010154919050565b600061070982611db0565b600080610c2c611de5565b9050610c3661114b565b8160010154610c45919061351a565b6002820154610c54908561351a565b10159392505050565b6000610c67611e09565b600083600f811115610c7b57610c7b612ee5565b60ff1681526020810191909152604001600020546001600160a01b0316905080610cba578160405163409140df60e11b81526004016107f0919061358e565b919050565b6000806000610ccc611de5565b90508060010154816002015492509250509091565b610ce9610d8d565b610d25828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e2d92505050565b505050565b6060610d34611944565b805460408051602080840282018101909252828152929190830182828015610a54576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a36575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610de7576000356001600160e01b0319166001604051620f948f60ea1b81526004016107f09291906135a8565b565b6060610df58383612213565b610dfe8161115e565b6000610e08611944565b845187519192509081148015610e1e5750855181145b610e49576000356001600160e01b0319166040516306b5667560e21b81526004016107f09190613579565b806001600160401b03811115610e6157610e6161301c565b604051908082528060200260200182016040528015610e8a578160200160208202803683370190505b50935080600003610e9c575050611143565b60008060008060005b858110156110af578a8181518110610ebf57610ebf6134ee565b60200260200101519450898181518110610edb57610edb6134ee565b602002602001015193508b8181518110610ef757610ef76134ee565b60200260200101519250610f0a8561231d565b610f138461231d565b826001600160601b0316600003610f4b576000356001600160e01b031916604051637f11b8a360e11b81526004016107f09190613579565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692610fa39290811691166135d6565b610fad91906135d6565b610fb791906135d6565b6001600160601b0316600014898281518110610fd557610fd56134ee565b602002602001019015159081151581525050888181518110610ff957610ff96134ee565b6020026020010151156110a7578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556110a49083613531565b91505b600101610ea5565b50808660040160008282546110c49190613531565b90915550506040516110ff906347c28ec560e11b906110eb908c908f908d90602001613629565b604051602081830303815290604052612352565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516111349493929190613662565b60405180910390a15050505050505b509392505050565b6000611155611944565b60040154905090565b6111678161237f565b15610a6f576000356001600160e01b031916604051630d697db160e11b81526004016107f09190613579565b60008161119f8161115e565b60006111a9611944565b905060005b8451811015611210578160020160008683815181106111cf576111cf6134ee565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611206906001600160601b031685613531565b93506001016111ae565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b606060006112498361241e565b9392505050565b600082815260036020908152604080832084845290915281206004810154600582015460609384938493909290916112888284613531565b9050806001600160401b038111156112a2576112a261301c565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509550806001600160401b038111156112e6576112e661301c565b60405190808252806020026020018201604052801561133157816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816113045790505b509450806001600160401b0381111561134c5761134c61301c565b604051908082528060200260200182016040528015611375578160200160208202803683370190505b50965060005b838110156114ca576000878281518110611397576113976134ee565b602002602001019060018111156113b0576113b0612ee5565b908160018111156113c3576113c3612ee5565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106113fc576113fc6134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061145a5761145a6134ee565b602002602001018190525084600401818154811061147a5761147a6134ee565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106114aa576114aa6134ee565b6001600160a01b039092166020928302919091019091015260010161137b565b5060005b8281101561162d576001876114e38684613531565b815181106114f3576114f36134ee565b6020026020010190600181111561150c5761150c612ee5565b9081600181111561151f5761151f612ee5565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611558576115586134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866115ad8684613531565b815181106115bd576115bd6134ee565b60200260200101819052508460050181815481106115dd576115dd6134ee565b6000918252602090912001546001600160a01b0316886115fd8684613531565b8151811061160d5761160d6134ee565b6001600160a01b03909216602092830291909101909101526001016114ce565b50505050509250925092565b6000610706836001600160a01b03841661247a565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff166105e6565b606082516001600160401b0381111561169f5761169f61301c565b6040519080825280602002602001820160405280156116c8578160200160208202803683370190505b50905060005b8351811015610a7d57600560008583815181106116ed576116ed6134ee565b6020026020010151600581111561170657611706612ee5565b600581111561171757611717612ee5565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061174b5761174b6134ee565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156117a3575060006001600160a01b0316828281518110611790576117906134ee565b60200260200101516001600160a01b0316145b156117cf576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b6001016116ce565b806117e18161115e565b60006117eb611218565b905060008060005b855181101561188a5785818151811061180e5761180e6134ee565b6020026020010151925061182183611a76565b611832836312c0151560e21b61256d565b61183c8484612700565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016117f3565b505050505050565b600054610100900460ff166118b95760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612715565b600054610100900460ff166118e95760405162461bcd60e51b81526004016107f0906136ba565b6107538282612745565b600054610100900460ff1661191a5760405162461bcd60e51b81526004016107f0906136ba565b6119248888612777565b61192d846127b8565b61193a86868585856127e8565b5050505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156119bb57848181548110611989576119896134ee565b6000918252602090912001546001600160a01b03908116908516036119b3576001925090506119c6565b60010161196e565b506000600019915091505b9250929050565b60005b8251811015610d2557306001600160a01b03168282815181106119f5576119f56134ee565b60200260200101516001600160a01b031603611a32576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b611a6e838281518110611a4757611a476134ee565b6020026020010151838381518110611a6157611a616134ee565b6020026020010151612912565b6001016119d0565b806001600160a01b03163b600003610a6f5780604051630bfc64a360e21b81526004016107f09190613332565b80611aac611e09565b600084600f811115611ac057611ac0612ee5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b0157611b01612ee5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611b50576040516305f4dee960e31b815260040160405180910390fd5b6000611b5a611944565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611bb5611bac611944565b60010186611968565b9150915081611bd957846040516326527e1760e01b81526004016107f09190613332565b611be1611944565b805482908110611bf357611bf36134ee565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611c21575060018111155b15611c4d576000356001600160e01b0319166040516387f6f09560e01b81526004016107f09190613579565b6000611c57611de5565b6001810180546002830180549287905585905582549293509184908690856000611c8083613705565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611cd0611944565b905082516001600160401b03811115611ceb57611ceb61301c565b604051908082528060200260200182016040528015611d14578160200160208202803683370190505b50915060005b8351811015611da957816002016000858381518110611d3b57611d3b6134ee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611d8957611d896134ee565b6001600160601b0390921660209283029190910190910152600101611d1a565b5050919050565b6000611dba611944565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081611e398161115e565b6000611e43611944565b8451909150806001600160401b03811115611e6057611e6061301c565b604051908082528060200260200182016040528015611e89578160200160208202803683370190505b50935080600003611e9b57505061220d565b60058201548254611ead908390613544565b1015611ecc5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561219357898181518110611eef57611eef6134ee565b60200260200101519350611f0284611b9b565b9095509150611f108561231d565b611f198461231d565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611f6d57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611f7f57611f7f6134ee565b602002602001019015159081151581525050888181518110611fa357611fa36134ee565b60200260200101511561218b576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611fe690600190613544565b9050886000018181548110611ffd57611ffd6134ee565b60009182526020909120015489546001600160a01b03909116908a9086908110612029576120296134ee565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120635761206361371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106120c3576120c36134ee565b60009182526020909120015460018a0180546001600160a01b0390921691869081106120f1576120f16134ee565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121325761213261371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b03191690556121868286613531565b945050505b600101611ed5565b50818660040160008282546121a89190613544565b90915550506040516121cd90636242a4ef60e11b906110eb908c908c90602001613734565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516121fe929190613762565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122355761223561301c565b60405190808252806020026020018201604052801561225e578160200160208202803683370190505b50925060005b828110156122b85785818151811061227e5761227e6134ee565b6020026020010151848281518110612298576122986134ee565b6001600160a01b0390921660209283029190910190910152600101612264565b60005b82811015612313578581815181106122d5576122d56134ee565b60200260200101518583815181106122ef576122ef6134ee565b6001600160a01b0390921660209283029190910190910152600191820191016122bb565b5050505092915050565b6001600160a01b038116610a6f576000356001600160e01b03191660405163104c66df60e31b81526004016107f09190613579565b61235c82826129a5565b610753573382826040516319b5fdcb60e31b81526004016107f0939291906137d7565b6000815160000361239257506000919050565b60005b600183510381101561241557600181015b835181101561240c578381815181106123c1576123c16134ee565b60200260200101516001600160a01b03168483815181106123e4576123e46134ee565b60200260200101516001600160a01b031603612404575060019392505050565b6001016123a6565b50600101612395565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561246e57602002820191906000526020600020905b81548152602001906001019080831161245a575b50505050509050919050565b6000818152600183016020526040812054801561256357600061249e600183613544565b85549091506000906124b290600190613544565b90508181146125175760008660000182815481106124d2576124d26134ee565b90600052602060002001549050808760000184815481106124f5576124f56134ee565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125285761252861371e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610709565b6000915050610709565b6000816040516024016125809190613579565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906125c990859061380b565b600060405180830381855afa9150503d8060008114612604576040519150601f19603f3d011682016040523d82523d6000602084013e612609565b606091505b5091509150816126cb57846001600160a01b03168360405160240161262e9190613827565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251612663919061380b565b600060405180830381855afa9150503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b509092509050816126cb57838560405163069d427960e11b81526004016107f092919061383a565b808060200190518101906126df919061385d565b6106b457838560405163069d427960e11b81526004016107f092919061383a565b6000610706836001600160a01b038416612ccb565b600054610100900460ff1661273c5760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612d1a565b600054610100900460ff1661276c5760405162461bcd60e51b81526004016107f0906136ba565b61098a600030612912565b600054610100900460ff1661279e5760405162461bcd60e51b81526004016107f0906136ba565b60006127a8611de5565b600181559050610d258383611c12565b600054610100900460ff166127df5760405162461bcd60e51b81526004016107f0906136ba565b610a6f816117d7565b600054610100900460ff1661280f5760405162461bcd60e51b81526004016107f0906136ba565b61281a600285611aa3565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155612907818385610de9565b506106b46003611b2e565b806005600084600581111561292957612929612ee5565b600581111561293a5761293a612ee5565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561297857612978612ee5565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b600160006129b46105fb611218565b805190915060008190036129c9575050610709565b6000816001600160401b038111156129e3576129e361301c565b604051908082528060200260200182016040528015612a0c578160200160208202803683370190505b5090506000826001600160401b03811115612a2957612a2961301c565b604051908082528060200260200182016040528015612a5c57816020015b6060815260200190600190039081612a475790505b50905060008787604051602001612a7492919061387f565b6040516020818303038152906040529050600081604051602401612a989190613827565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612c8157868181518110612ae157612ae16134ee565b60200260200101516001600160a01b031683604051612b00919061380b565b6000604051808303816000865af19150503d8060008114612b3d576040519150601f19603f3d011682016040523d82523d6000602084013e612b42565b606091505b50868381518110612b5557612b556134ee565b60200260200101868481518110612b6e57612b6e6134ee565b6020026020010182905282151515158152505050848181518110612b9457612b946134ee565b6020026020010151612c7957868181518110612bb257612bb26134ee565b60200260200101516001600160a01b031682604051612bd1919061380b565b6000604051808303816000865af19150503d8060008114612c0e576040519150601f19603f3d011682016040523d82523d6000602084013e612c13565b606091505b50868381518110612c2657612c266134ee565b60200260200101868481518110612c3f57612c3f6134ee565b6020026020010182905282151515158152505050878015612c765750848181518110612c6d57612c6d6134ee565b60200260200101515b97505b600101612ac7565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612cb794939291906138b0565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612d1257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610709565b506000610709565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b60008083601f840112612d5f57600080fd5b5081356001600160401b03811115612d7657600080fd5b6020830191508360208260051b85010111156119c657600080fd5b60008060008060008060608789031215612daa57600080fd5b86356001600160401b0380821115612dc157600080fd5b612dcd8a838b01612d4d565b90985096506020890135915080821115612de657600080fd5b612df28a838b01612d4d565b90965094506040890135915080821115612e0b57600080fd5b50612e1889828a01612d4d565b979a9699509497509295939492505050565b60008060208385031215612e3d57600080fd5b82356001600160401b03811115612e5357600080fd5b612e5f85828601612d4d565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612ea55781516001600160a01b031687529582019590820190600101612e80565b509495945050505050565b6020815260006107066020830184612e6b565b60008060408385031215612ed657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60006060808352612f0f6060840187612e6b565b83810360208581019190915286518083528782019282019060005b81811015612f5657845160028110612f4457612f44612ee5565b83529383019391830191600101612f2a565b50506040925085810360408701528087518083528383019150838901925060005b81811015612fa7578351805160ff1684528581015186850152860151868401529284019291860191600101612f77565b50909a9950505050505050505050565b80356001600160a01b0381168114610cba57600080fd5b600080600060608486031215612fe357600080fd5b8335925060208401359150612ffa60408501612fb7565b90509250925092565b60006020828403121561301557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561305a5761305a61301c565b604052919050565b60006001600160401b0382111561307b5761307b61301c565b5060051b60200190565b600082601f83011261309657600080fd5b813560206130ab6130a683613062565b613032565b8083825260208201915060208460051b8701019350868411156130cd57600080fd5b602086015b848110156130f0576130e381612fb7565b83529183019183016130d2565b509695505050505050565b600082601f83011261310c57600080fd5b8135602061311c6130a683613062565b8083825260208201915060208460051b87010193508684111561313e57600080fd5b602086015b848110156130f05780356001600160601b03811681146131635760008081fd5b8352918301918301613143565b600082601f83011261318157600080fd5b813560206131916130a683613062565b8083825260208201915060208460051b8701019350868411156131b357600080fd5b602086015b848110156130f0578035600681106131d05760008081fd5b83529183019183016131b8565b60008060008060008060008060008060006101608c8e0312156131ff57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975061322460808d01612fb7565b96506001600160401b0360a08d013581101561323f57600080fd5b61324f8e60a08f01358f01613085565b96508060c08e0135111561326257600080fd5b6132728e60c08f01358f01613085565b95508060e08e0135111561328557600080fd5b6132958e60e08f01358f01613085565b9450806101008e013511156132a957600080fd5b6132ba8e6101008f01358f016130fb565b9350806101208e013511156132ce57600080fd5b6132df8e6101208f01358f01613170565b9250806101408e013511156132f357600080fd5b506133058d6101408e01358e01613085565b90509295989b509295989b9093969950565b60006020828403121561332957600080fd5b61070682612fb7565b6001600160a01b0391909116815260200190565b6000806040838503121561335957600080fd5b82356001600160401b038082111561337057600080fd5b61337c86838701613170565b9350602085013591508082111561339257600080fd5b5061339f85828601613085565b9150509250929050565b600080604083850312156133bc57600080fd5b823591506133cc60208401612fb7565b90509250929050565b803560108110610cba57600080fd5b600080604083850312156133f757600080fd5b613400836133d5565b91506133cc60208401612fb7565b60a081016005871061342257613422612ee5565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612ea55781516001600160601b031687529582019590820190600101613458565b6060815260006134906060830186612e6b565b82810360208401526134a28186612e6b565b905082810360408401526134b68185613443565b9695505050505050565b6020815260006107066020830184613443565b6000602082840312156134e557600080fd5b610706826133d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761070957610709613504565b8082018082111561070957610709613504565b8181038181111561070957610709613504565b60008261357457634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60208101601083106135a2576135a2612ee5565b91905290565b6001600160e01b03198316815260408101600b83106135c9576135c9612ee5565b8260208301529392505050565b6001600160601b03818116838216019080821115610a7d57610a7d613504565b60008151808452602080850194506020840160005b83811015612ea557815115158752958201959082019060010161360b565b60608152600061363c6060830186612e6b565b828103602084015261364e8186613443565b905082810360408401526134b681856135f6565b60808152600061367560808301876135f6565b82810360208401526136878187613443565b9050828103604084015261369b8186612e6b565b905082810360608401526136af8185612e6b565b979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001820161371757613717613504565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006137476040830185612e6b565b828103602084015261375981856135f6565b95945050505050565b60408152600061377560408301856135f6565b82810360208401526137598185612e6b565b60005b838110156137a257818101518382015260200161378a565b50506000910152565b600081518084526137c3816020860160208601613787565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090613759908301846137ab565b6000825161381d818460208701613787565b9190910192915050565b60208152600061070660208301846137ab565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561386f57600080fd5b8151801515811461124957600080fd5b6001600160e01b03198316815281516000906138a2816004850160208701613787565b919091016004019392505050565b6080815260006138c360808301876137ab565b6020838203818501526138d68288612e6b565b915083820360408501526138ea82876135f6565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561393b57601f198784030185526139298383516137ab565b9486019492509085019060010161390d565b50909b9a505050505050505050505056fea2646970667358221220d83003b43962afe3120b34eb387ecaaf4912a01d9c682ac0fb953cf65d90b77c64736f6c63430008170033", + "nonce": "0x2f122" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "function": null, + "arguments": [ + "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0x7d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000000127500000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2b7868", + "value": "0x0", + "data": "0x608060405260405162000eed38038062000eed833981016040819052620000269162000429565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200055c565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000ea6833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000ec6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000ea68339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002118162000383565b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b6060620002aa8462000383565b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b03168560405162000324919062000509565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000392565b9695505050505050565b6001600160a01b03163b151590565b60608315620003a357508162000161565b825115620003b45782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000527565b80516001600160a01b0381168114620003e857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200042057818101518382015260200162000406565b50506000910152565b6000806000606084860312156200043f57600080fd5b6200044a84620003d0565b92506200045a60208501620003d0565b60408501519092506001600160401b03808211156200047857600080fd5b818601915086601f8301126200048d57600080fd5b815181811115620004a257620004a2620003ed565b604051601f8201601f19908116603f01168101908382118183101715620004cd57620004cd620003ed565b81604052828152896020848701011115620004e757600080fd5b620004fa83602083016020880162000403565b80955050505050509250925092565b600082516200051d81846020870162000403565b9190910192915050565b60208152600082518060208401526200054881604085016020870162000403565b601f01601f19169190910160400192915050565b61093a806200056c6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b3660046106c7565b610136565b61006661009e3660046106f8565b610173565b6100666100b13660046107a8565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b506100666101023660046106c7565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610370565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610370915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b576101688161039b565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006102406103ef565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b600060008051602061089e8339815191525b546001600160a01b0316919050565b61037983610405565b6000825111806103865750805b15610212576103958383610445565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c461034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610471565b60006000805160206108be833981519152610361565b61040e81610508565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061046a83836040518060600160405280602781526020016108de60279139610588565b9392505050565b6001600160a01b0381166104d65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b8060008051602061089e8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051181610663565b6105735760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b806000805160206108be8339815191526104e7565b606061059384610663565b6105ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610609919061084e565b600060405180830381855af49150503d8060008114610644576040519150601f19603f3d011682016040523d82523d6000602084013e610649565b606091505b5091509150610659828286610672565b9695505050505050565b6001600160a01b03163b151590565b6060831561068157508161046a565b8251156106915782518084602001fd5b8160405162461bcd60e51b815260040161031d919061086a565b80356001600160a01b03811681146106c257600080fd5b919050565b6000602082840312156106d957600080fd5b61046a826106ab565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561070a57600080fd5b81356001600160401b038082111561072157600080fd5b818401915084601f83011261073557600080fd5b813581811115610747576107476106e2565b604051601f8201601f19908116603f0116810190838211818310171561076f5761076f6106e2565b8160405282815287602084870101111561078857600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107bd57600080fd5b6107c6846106ab565b925060208401356001600160401b03808211156107e257600080fd5b818601915086601f8301126107f657600080fd5b81358181111561080557600080fd5b87602082850101111561081757600080fd5b6020830194508093505050509250925092565b60005b8381101561084557818101518382015260200161082d565b50506000910152565b6000825161086081846020870161082a565b9190910192915050565b602081526000825180602084015261088981604085016020870161082a565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205d5db908d6bad5bfc298cb89bc49c38963bb1499be9336506651cff965fb333264736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000d05a72c0a593983aa8336c997736e2172e745ff1000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000004e47d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000000127500000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab9500000000000000000000000000000000000000000000000000000000", + "nonce": "0x2f123" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xfcd1ca2649e9cba542fd73c3fd0856b6199140862c65eac401c3ebff94085064", + "transactionType": "CREATE", + "contractName": "RoninBridgeManager", + "contractAddress": "0x64D21e91c2Cb367D2972E0bC377CFEa4e55F3685", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0xa304fa", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615f2b80620000f46000396000f3fe608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fbc7cf0cc42a480ef3d40d76fe731fb7fad911d9e6f97db06cb768d5fde5e16d64736f6c63430008170033", + "nonce": "0x2f124" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xde41c353b4f859829031e40fc82bce8c9840397c53e4f17719d19e593e437a6b", + "transactionType": "CALL", + "contractName": "src/extensions/TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "contractAddress": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "function": "upgradeTo(address)", + "arguments": [ + "0x64D21e91c2Cb367D2972E0bC377CFEa4e55F3685" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf", + "gas": "0xfea6", + "value": "0x0", + "data": "0x3659cfe600000000000000000000000064d21e91c2cb367d2972e0bc377cfea4e55f3685", + "nonce": "0x2f125" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xf7f521794a007a3a637834e4dce3dd3787aed00a8886cb87364af4845bf321eb", + "transactionType": "CALL", + "contractName": "src/extensions/TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "contractAddress": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "function": "changeAdmin(address)", + "arguments": [ + "0xb0507f2f22697022eCb25963a00D3D076dAc5753" + ], + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x8aaad4782890eb879a0fc132a6adf9e5ee708faf", + "gas": "0x10116", + "value": "0x0", + "data": "0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753", + "nonce": "0x2f126" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x32330f2782488f77d3a5754841fe7628ae853c71cc9be98bc58221d40d6b7022", + "transactionIndex": "0x0", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x31bb80", + "gasUsed": "0x31bb80", + "contractAddress": "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "logs": [ + { + "address": "0xD05A72c0A593983Aa8336C997736e2172E745fF1", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x32330f2782488f77d3a5754841fe7628ae853c71cc9be98bc58221d40d6b7022", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000002000000000000000000000000000000000000000000000001000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x4777b4", + "gasUsed": "0x15bc34", + "contractAddress": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "logs": [ + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000d05a72c0a593983aa8336c997736e2172e745ff1" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x1", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0xe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da1", + "0x0000000000000000000000000000000000000000000000000000000000127500" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d95" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000003", + "0x0000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x6", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000004", + "0x000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000005", + "0x0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x8", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000007", + "0x000000000000000000000000000000000000000000000000000000000000000a" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0x9", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0xa", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0xb", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000003", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0xc", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0xd", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0x11b14dd94c5c6b85e8581a63e247176240a6fcb8da8df2570508475c2550ec34", + "transactionIndex": "0x1", + "logIndex": "0xe", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x04020000000001000000000000000000400080000020200000100000000000000000500000000000100000000000000000001400061000010020010000240000000030000000800000000000000002000000000000040000000400000000000008000100020080000040000000000840000000800000000000000080000000001000000000000000010000000000105000000800000080000000000400800000020000000000001000010100000400002000000008800000002008000000400000004060000080000000000000040000000000808400001000000100000160000018020000002008000000000000000000000000008000000000080020001000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0xfcd1ca2649e9cba542fd73c3fd0856b6199140862c65eac401c3ebff94085064", + "transactionIndex": "0x2", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x98fa31", + "gasUsed": "0x51827d", + "contractAddress": "0x64D21e91c2Cb367D2972E0bC377CFEa4e55F3685", + "logs": [ + { + "address": "0x64D21e91c2Cb367D2972E0bC377CFEa4e55F3685", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0xfcd1ca2649e9cba542fd73c3fd0856b6199140862c65eac401c3ebff94085064", + "transactionIndex": "0x2", + "logIndex": "0xf", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000400080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0xde41c353b4f859829031e40fc82bce8c9840397c53e4f17719d19e593e437a6b", + "transactionIndex": "0x3", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "cumulativeGasUsed": "0x997207", + "gasUsed": "0x77d6", + "contractAddress": null, + "logs": [ + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000064d21e91c2cb367d2972e0bc377cfea4e55f3685" + ], + "data": "0x", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0xde41c353b4f859829031e40fc82bce8c9840397c53e4f17719d19e593e437a6b", + "transactionIndex": "0x3", + "logIndex": "0x10", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000020000000000010000000000000000000000000000000000000002000000000000000000000000000000000000000000000080000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0xf7f521794a007a3a637834e4dce3dd3787aed00a8886cb87364af4845bf321eb", + "transactionIndex": "0x4", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "cumulativeGasUsed": "0x99eb03", + "gasUsed": "0x78fc", + "contractAddress": null, + "logs": [ + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753", + "blockHash": "0xec41684d188fc85b4e84ad12639ad74925898929e6c1d019a50d5a3f0044a96e", + "blockNumber": "0x19489e8", + "transactionHash": "0xf7f521794a007a3a637834e4dce3dd3787aed00a8886cb87364af4845bf321eb", + "transactionIndex": "0x4", + "logIndex": "0x11", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000080000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1713240678, + "chain": 2021, + "multi": false, + "commit": "6964a97" +} \ No newline at end of file diff --git a/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713246801.json b/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713246801.json new file mode 100644 index 00000000..75d76e9b --- /dev/null +++ b/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713246801.json @@ -0,0 +1,235 @@ +{ + "transactions": [ + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x52ec2e6bbce45afff8955da6410bb13812f4289f", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x77916", + "value": "0x0", + "data": "0x663ac01100000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x47" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x467e6", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x59" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x06f8af58f656b507918d91b0b6f8b89bfcc556f9", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x467e6", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x0" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xe1100401454b5f850b09f3b92ce7f071c5f1cef4", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x5cd02", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x0" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeReward", + "contractAddress": "0x836D911C7de3edfc953030B9ABc4b2B18B2db8b9", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2b9610", + "value": "0x0", + "data": "0x60a060405230608052610010610015565b6100d5565b600054610100900460ff16156100815760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100d3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6080516118666100f06000396000610bc701526118666000f3fe6080604052600436106100dd5760003560e01c80638f7c34a21161007f578063ad43663e11610059578063ad43663e14610261578063b77f2a4014610276578063de981f1b14610296578063f5dbc4ee146102ce57600080fd5b80638f7c34a21461021957806395b6ef0c1461022e578063a6bd67881461024157600080fd5b80633b154455116100bb5780633b154455146101c757806359f778df146101dc5780635cd8a76b146101e4578063865e6fd3146101f957600080fd5b806306032d74146100e257806333b3ea6c1461018257806334087952146101a4575b600080fd5b3480156100ee57600080fd5b506101626100fd366004611335565b604080518082018252600080825260209182018190526001600160a01b039390931683527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a815291819020815180830190925280548252600101549181019190915290565b604080518251815260209283015192810192909252015b60405180910390f35b34801561018e57600080fd5b506101a261019d366004611352565b6102e3565b005b3480156101b057600080fd5b506101b9610399565b604051908152602001610179565b3480156101d357600080fd5b506101a26103c8565b6101a26104bb565b3480156101f057600080fd5b506101a26104c5565b34801561020557600080fd5b506101a261021436600461137a565b610593565b34801561022557600080fd5b506101b96105ae565b6101a261023c3660046113b1565b6105c6565b34801561024d57600080fd5b506101a261025c366004611352565b6106e9565b34801561026d57600080fd5b506101b96106fd565b34801561028257600080fd5b506101a2610291366004611352565b610727565b3480156102a257600080fd5b506102b66102b136600461142a565b61073d565b6040516001600160a01b039091168152602001610179565b3480156102da57600080fd5b506101b96107b8565b6102ec336107e2565b61031c57604051638f47e7e360e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b6000610328600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103899190611445565b90506103958183610860565b5050565b60006103c37f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f45490565b905090565b60046103d381610acd565b6000196103de6105ae565b146104205760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610313565b6104ac600161042f600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104909190611445565b61049a9190611474565b60008051602061181183398151915255565b6104b860046000610b19565b50565b6104c3610bbd565b565b600054600290610100900460ff161580156104e7575060005460ff8083169116105b6105035760405162461bcd60e51b815260040161031390611487565b6000805461ffff191660ff8316176101001790556105417faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c60059055565b61054e60016104906105ae565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b61059b610c9e565b6105a481610cf8565b6103958282610b19565b60006103c36000805160206118118339815191525490565b600054610100900460ff16158080156105e65750600054600160ff909116105b806106005750303b158015610600575060005460ff166001145b61061c5760405162461bcd60e51b815260040161031390611487565b6000805460ff19166001179055801561063f576000805461ff0019166101001790555b61064a600b88610b19565b610655600387610b19565b610660600c86610b19565b61066b600885610b19565b610676600484610b19565b6000196000805160206118118339815191525561069282610d2e565b61069a610bbd565b80156106e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600b6106f481610acd565b61039582610d2e565b60006103c37f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec739105490565b600361073281610acd565b610395826000610860565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610774576107746114d5565b60ff1681526020810191909152604001600020546001600160a01b03169050806107b3578160405163409140df60e11b815260040161031391906114ff565b919050565b60006103c37f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b60006107ee600b61073d565b604051635a02d57960e11b81526001600160a01b038481166004830152919091169063b405aaf290602401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a919061150d565b92915050565b600061086a6105ae565b9050816000036108cc5760008184111561089757600161088a8386611474565b6108949190611474565b90505b6108c8816108c37faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c5490565b610d87565b9250505b6108d7838383610d9f565b60006108e3600b61073d565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610920573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610948919081019061159a565b90506000610956600361073d565b905060005b84811015610ac55761096c84611639565b9350610abd83836001600160a01b031663f67e815287876040518363ffffffff1660e01b81526004016109a0929190611697565b600060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109e591908101906116b0565b60405163692f6a6360e11b8152600481018890526001600160a01b0386169063d25ed4c690602401602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190611445565b604051637153af9b60e11b8152600481018990526001600160a01b0387169063e2a75f3690602401602060405180830381865afa158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190611445565b88610e33565b60010161095b565b505050505050565b610ad68161073d565b6001600160a01b0316336001600160a01b0316146104b8576000356001600160e01b03191681336040516320e0f98d60e21b815260040161031393929190611736565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610b4f57610b4f6114d5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610b9057610b906114d5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c1457604051638f47e7e360e01b81526001600160e01b0319600035166004820152602401610313565b337f7ae161a1f0ef2537f5ff1957021a50412e72abdc6a941a77d99361e91e7f3c3d610c5e7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b604080519182523460208301520160405180910390a26104b87f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c6434610f8a565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146104c3576000356001600160e01b0319166001604051620f948f60ea1b815260040161031392919061176d565b806001600160a01b03163b6000036104b857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610313565b610d577f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910829055565b6040518181527f9b40b647582311cc8f5f7d27e7ce206d126605d1625b8299b7edaeefd869ef2590602001610588565b6000818310610d965781610d98565b825b9392505050565b81600003610dc05760405163799ffe0d60e01b815260040160405180910390fd5b610dcb81600161179b565b8311610df45760405163425a5b1f60e01b81526004810184905260248101829052604401610313565b610dfe828261179b565b8311610e2e57604051630931302b60e31b8152600481018490526024810182905260448101839052606401610313565b505050565b845184518114610e64576040516306b5667560e21b81526001600160e01b0319600035166004820152602401610313565b6000610e6e6106fd565b90506000610e7b88610fa1565b90506000610e8a87878a61101f565b90506000806000805b87811015610f3957610edc8589898f8581518110610eb357610eb36117ae565b60200260200101518f8e8c8881518110610ecf57610ecf6117ae565b6020026020010151611072565b80945081955050506000610f0b8a8f8481518110610efc57610efc6117ae565b60200260200101518787611093565b90508380610f17575080155b610f215784610f24565b60005b610f2e908461179b565b925050600101610e93565b50610f647f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f482610f8a565b50610f7c600080516020611811833981519152899055565b505050505050505050505050565b600061085a83610f9a85856111f9565b9250829055565b6060610fad600c61073d565b6001600160a01b0316635311153b836040518263ffffffff1660e01b8152600401610fd891906117c4565b6000604051808303816000875af1158015610ff7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261085a91908101906116b0565b60008061102d858585611218565b90508061105e576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a15b801580611069575084155b95945050505050565b6000828210156110858989898989611295565b915097509795505050505050565b6001600160a01b03831660009081527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a60205260408120821561113857838160010160008282546110e4919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fb3d061c3ef3991b0d4b09f4c8b551d137c3d1e014cf5326462d3d1f6a8dfb9c291015b60405180910390a260009150506111f1565b611144858560006112c0565b156111b0578381600001600082825461115d919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fbab0baccb39371d4d5206b519fe58d21cae9cdd63a1d1b5146ecdf405fd93152910160405180910390a260019150506111f1565b604080516001600160a01b03871681526020810186905287917f74b217634c5a7790ce69770c5e35019970453d4da3973769e7d6cdb7ce6816a19101611126565b949350505050565b815481018181101561085a57634e487b7160005260116020526024601cfd5b8051600190600090815b8181101561127d578585828151811061123d5761123d6117ae565b60200260200101511115611254576000935061127d565b848181518110611266576112666117ae565b602002602001015183019250806001019050611222565b5082801561128b5750858211155b9695505050505050565b6000856112b657816112a784866117d7565b6112b191906117ee565b61128b565b61128b85856117ee565b6000836001600160a01b0316838390604051600060405180830381858888f193505050503d8060008114611310576040519150601f19603f3d011682016040523d82523d6000602084013e611315565b606091505b509095945050505050565b6001600160a01b03811681146104b857600080fd5b60006020828403121561134757600080fd5b8135610d9881611320565b60006020828403121561136457600080fd5b5035919050565b8035601081106107b357600080fd5b6000806040838503121561138d57600080fd5b6113968361136b565b915060208301356113a681611320565b809150509250929050565b60008060008060008060c087890312156113ca57600080fd5b86356113d581611320565b955060208701356113e581611320565b945060408701356113f581611320565b9350606087013561140581611320565b9250608087013561141581611320565b8092505060a087013590509295509295509295565b60006020828403121561143c57600080fd5b610d988261136b565b60006020828403121561145757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561085a5761085a61145e565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b601081106114fb576114fb6114d5565b9052565b6020810161085a82846114eb565b60006020828403121561151f57600080fd5b81518015158114610d9857600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561156e5761156e61152f565b604052919050565b600067ffffffffffffffff8211156115905761159061152f565b5060051b60200190565b600060208083850312156115ad57600080fd5b825167ffffffffffffffff8111156115c457600080fd5b8301601f810185136115d557600080fd5b80516115e86115e382611576565b611545565b81815260059190911b8201830190838101908783111561160757600080fd5b928401925b8284101561162e57835161161f81611320565b8252928401929084019061160c565b979650505050505050565b60006001820161164b5761164b61145e565b5060010190565b60008151808452602080850194506020840160005b8381101561168c5781516001600160a01b031687529582019590820190600101611667565b509495945050505050565b8281526040602082015260006111f16040830184611652565b600060208083850312156116c357600080fd5b825167ffffffffffffffff8111156116da57600080fd5b8301601f810185136116eb57600080fd5b80516116f96115e382611576565b81815260059190911b8201830190838101908783111561171857600080fd5b928401925b8284101561162e5783518252928401929084019061171d565b6001600160e01b0319841681526060810161175460208301856114eb565b6001600160a01b03929092166040919091015292915050565b6001600160e01b03198316815260408101600b831061178e5761178e6114d5565b8260208301529392505050565b8082018082111561085a5761085a61145e565b634e487b7160e01b600052603260045260246000fd5b602081526000610d986020830184611652565b808202811582820484141761085a5761085a61145e565b60008261180b57634e487b7160e01b600052601260045260246000fd5b50049056fe2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619a2646970667358221220cd237faf10660b4bf88f4dcc843cf0b3d4cce585ad7f99199ed3924ea16b8dfd64736f6c63430008170033", + "nonce": "0x2f127" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeSlash", + "contractAddress": "0x7bEB0f3fC4002C4542015cFa9023dEE1A9EC9400", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x26b9de", + "value": "0x0", + "data": "0x608060405261000c610011565b6100d1565b600054610100900460ff161561007d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100cf576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611583806100e06000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639c2f445911610097578063de981f1b11610066578063de981f1b146101fd578063f8c8765e14610228578063f9f608731461023b578063fbb2f1941461024357600080fd5b80639c2f4459146101d2578063c48549de146101da578063d1e1f2f8146101ed578063ddc3f7f6146101f557600080fd5b80635311153b116100d35780635311153b1461016a5780636dda44081461017d578063865e6fd3146101935780638f851d8a146101a657600080fd5b806301ffc9a7146101055780631288810a1461012d5780633b1544551461014d5780634dca592514610157575b600080fd5b610118610113366004610eb7565b610263565b60405190151581526020015b60405180910390f35b61014061013b366004610f2d565b61029a565b6040516101249190610f6f565b610155610382565b005b6101556101653660046110a4565b610462565b610140610178366004610f2d565b6106f9565b610185600181565b604051908152602001610124565b6101556101a136600461118e565b6107d2565b6101b96101b43660046111c1565b6107f1565b6040516001600160e01b03199091168152602001610124565b610185603281565b6101b96101e83660046112ba565b610970565b610185600581565b610185601e81565b61021061020b366004611326565b61098f565b6040516001600160a01b039091168152602001610124565b610155610236366004611341565b610a0a565b610140610b49565b610256610251366004611395565b610b58565b60405161012491906113cd565b60006001600160e01b031982166312c0151560e21b148061029457506001600160e01b031982166301ffc9a760e01b145b92915050565b6060818067ffffffffffffffff8111156102b6576102b6610fb3565b6040519080825280602002602001820160405280156102df578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610311576103116113e7565b905060200201602081019061032691906113fd565b6001600160a01b031681526020810191909152604001600020548451600160801b9091046001600160801b031690859083908110610366576103666113e7565b60209081029190910101526001016102f4565b50505092915050565b600461038d81610b6b565b600019600154146103da5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b60448201526064015b60405180910390fd5b6103e4600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190611418565b610450906001611447565b60015561045f60046000610bb7565b50565b600361046d81610b6b565b8160015481106106f0578360328111156106ee5786518851146104b1576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8751156106ee576104c3868689610c5b565b6104f5576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a16106ee565b60006104ff610cd8565b6040805180820190915260008082526020820181905291925060008051602061152e833981519152918080805b8e518110156106e6578e8181518110610547576105476113e7565b6020908102919091018101516001600160a01b03811660009081528883526040908190208151808301909252546001600160801b038082168352600160801b90910416928101839052965093508b11156106de576105be8e82815181106105b0576105b06113e7565b60200260200101518d610d43565b91506105d9828c87600001516001600160801b03168a610d95565b93506105e5848c610dec565b1561062b576040516001600160801b0394506001600160a01b038416908c907fb32a150b9737190a456d8b2b81dd7d592a799ab2933ea494e44351acd41f835d90600090a35b600082600281111561063f5761063f6113b7565b146106de576001600160801b0384146106a3578a836001600160a01b031683600281111561066f5761066f6113b7565b6040518781527fa0957b65e189f06dfe2b38ff07e89a0df128ba3fcba66c68f8d2615daebc30a99060200160405180910390a45b6001600160a01b038316600090815260208790526040902080546fffffffffffffffffffffffffffffffff19166001600160801b0386161790555b60010161052c565b505050505050505b505b50505050505050565b6060818067ffffffffffffffff81111561071557610715610fb3565b60405190808252806020026020018201604052801561073e578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610770576107706113e7565b905060200201602081019061078591906113fd565b6001600160a01b0316815260208101919091526040016000205484516001600160801b03909116908590839081106107bf576107bf6113e7565b6020908102919091010152600101610753565b6107da610e0e565b6107e381610e6a565b6107ed8282610bb7565b5050565b6000600b6107fe81610b6b565b82518690811461082f576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8060000361084757506347c28ec560e11b9150610966565b60008051602061152e8339815191526000610862600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561089f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c39190611418565b905060005b83811015610957578681815181106108e2576108e26113e7565b60200260200101511561094f57818360008d8d85818110610905576109056113e7565b905060200201602081019061091a91906113fd565b6001600160a01b03168152602081019190915260400160002080546001600160801b03928316600160801b0292169190911790555b6001016108c8565b506347c28ec560e11b94505050505b5095945050505050565b6000600b61097d81610b6b565b50636242a4ef60e11b95945050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156109c6576109c66113b7565b60ff1681526020810191909152604001600020546001600160a01b0316905080610a05578160405163409140df60e11b81526004016103d1919061146e565b919050565b600054610100900460ff1615808015610a2a5750600054600160ff909116105b80610a445750303b158015610a44575060005460ff166001145b610aa75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d1565b6000805460ff191660011790558015610aca576000805461ff0019166101001790555b610ad5600886610bb7565b610ae0600b85610bb7565b610aeb600384610bb7565b610af6600483610bb7565b6000196001558015610b42576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6060610b53610cd8565b905090565b6000610b648383610d43565b9392505050565b610b748161098f565b6001600160a01b0316336001600160a01b03161461045f576000356001600160e01b03191681336040516320e0f98d60e21b81526004016103d19392919061147c565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610bed57610bed6113b7565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610c2e57610c2e6113b7565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b8051600190600090815b81811015610cc05785858281518110610c8057610c806113e7565b60200260200101511115610c975760009350610cc0565b848181518110610ca957610ca96113e7565b602002602001015183019250806001019050610c65565b50828015610cce5750858211155b9695505050505050565b604080516003808252608082019092526060916020820183803683370190505090506001818160ff1681518110610d1157610d116113e7565b6020908102919091010152600581600260ff1681518110610d3457610d346113e7565b60200260200101818152505090565b60008082612710610d5486836114b3565b610d5e91906114c6565b610d6891906114dd565b9050610bb88111610d8a576103e88111610d83576000610d8d565b6001610d8d565b60025b949350505050565b6000610dab610da56001866114b3565b84610ea0565b82866002811115610dbe57610dbe6113b7565b60ff1681518110610dd157610dd16113e7565b6020026020010151610de39190611447565b95945050505050565b6000601e610dfb6001846114b3565b610e0590856114b3565b10159392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610e68576000356001600160e01b0319166001604051620f948f60ea1b81526004016103d19291906114ff565b565b806001600160a01b03163b60000361045f57604051630bfc64a360e21b81526001600160a01b03821660048201526024016103d1565b600081831015610eb05781610b64565b5090919050565b600060208284031215610ec957600080fd5b81356001600160e01b031981168114610b6457600080fd5b60008083601f840112610ef357600080fd5b50813567ffffffffffffffff811115610f0b57600080fd5b6020830191508360208260051b8501011115610f2657600080fd5b9250929050565b60008060208385031215610f4057600080fd5b823567ffffffffffffffff811115610f5757600080fd5b610f6385828601610ee1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610fa757835183529284019291840191600101610f8b565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ff257610ff2610fb3565b604052919050565b600067ffffffffffffffff82111561101457611014610fb3565b5060051b60200190565b80356001600160a01b0381168114610a0557600080fd5b600082601f83011261104657600080fd5b8135602061105b61105683610ffa565b610fc9565b8083825260208201915060208460051b87010193508684111561107d57600080fd5b602086015b848110156110995780358352918301918301611082565b509695505050505050565b600080600080600060a086880312156110bc57600080fd5b853567ffffffffffffffff808211156110d457600080fd5b818801915088601f8301126110e857600080fd5b813560206110f861105683610ffa565b82815260059290921b8401810191818101908c84111561111757600080fd5b948201945b8386101561113c5761112d8661101e565b8252948201949082019061111c565b9950508901359250508082111561115257600080fd5b5061115f88828901611035565b959895975050505060408401359360608101359360809091013592509050565b803560108110610a0557600080fd5b600080604083850312156111a157600080fd5b6111aa8361117f565b91506111b86020840161101e565b90509250929050565b6000806000806000606086880312156111d957600080fd5b853567ffffffffffffffff808211156111f157600080fd5b6111fd89838a01610ee1565b909750955060209150878201358181111561121757600080fd5b6112238a828b01610ee1565b90965094505060408801358181111561123b57600080fd5b88019050601f8101891361124e57600080fd5b803561125c61105682610ffa565b81815260059190911b8201830190838101908b83111561127b57600080fd5b928401925b828410156112a857833580151581146112995760008081fd5b82529284019290840190611280565b80955050505050509295509295909350565b600080600080604085870312156112d057600080fd5b843567ffffffffffffffff808211156112e857600080fd5b6112f488838901610ee1565b9096509450602087013591508082111561130d57600080fd5b5061131a87828801610ee1565b95989497509550505050565b60006020828403121561133857600080fd5b610b648261117f565b6000806000806080858703121561135757600080fd5b6113608561101e565b935061136e6020860161101e565b925061137c6040860161101e565b915061138a6060860161101e565b905092959194509250565b600080604083850312156113a857600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60208101600383106113e1576113e16113b7565b91905290565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561140f57600080fd5b610b648261101e565b60006020828403121561142a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561029457610294611431565b6010811061146a5761146a6113b7565b9052565b60208101610294828461145a565b6001600160e01b0319841681526060810161149a602083018561145a565b6001600160a01b03929092166040919091015292915050565b8181038181111561029457610294611431565b808202811582820484141761029457610294611431565b6000826114fa57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b03198316815260408101600b8310611520576115206113b7565b826020830152939250505056fed08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfea2646970667358221220a88731885a136f6ffe2ef43beabc7b3a128ab2f3ee20d79c6777fe10326663bf64736f6c63430008170033", + "nonce": "0x2f128" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeTracking", + "contractAddress": "0xB03E29Be08E57b2d95Fe9F94966CB86a0DD98481", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2fb53a", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100eb565b600154600160a81b900460ff161561008c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60015460ff600160a01b909104811610156100e9576001805460ff60a01b191660ff60a01b17905560405160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611ad5806100fa6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063c7c4fea91161008c578063de981f1b11610066578063de981f1b1461017e578063e2a75f36146101a9578063f67e8152146101bc578063f84bd121146101dc57600080fd5b8063c7c4fea914610145578063ca21287e14610158578063d25ed4c61461016b57600080fd5b80631794bb3c146100d4578063229f88ea146100e95780633b154455146100fc5780634ac0bcda146101045780635cd8a76b1461012a578063865e6fd314610132575b600080fd5b6100e76100e23660046114df565b6101e4565b005b6100e76100f736600461152f565b6102e4565b6100e761048c565b610117610112366004611559565b61055c565b6040519081526020015b60405180910390f35b6100e761057a565b6100e7610140366004611598565b610673565b6100e76101533660046115c4565b610692565b6100e7610166366004611604565b610a6b565b610117610179366004611660565b610b56565b61019161018c366004611679565b610b8b565b6040516001600160a01b039091168152602001610121565b6101176101b7366004611660565b610c01565b6101cf6101ca366004611694565b610c2b565b604051610121919061174f565b600254610117565b600154600160a81b900460ff161580801561020a575060018054600160a01b900460ff16105b8061022a5750303b15801561022a575060018054600160a01b900460ff16145b61024f5760405162461bcd60e51b815260040161024690611762565b60405180910390fd5b6001805460ff60a01b1916600160a01b179055801561027c576001805460ff60a81b1916600160a81b1790555b610287600285610c72565b610292600884610c72565b600282905580156102de576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60026102ef81610d16565b6102f7610d62565b6000600a600085600281111561030f5761030f6117b0565b6002811115610320576103206117b0565b81526020019081526020016000206000848152602001908152602001600020905080600001546000036102de57610355610d70565b60006103616008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c291906117c6565b808355600480546001818101835560009290925260029081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054939450928892849260ff1990921691849081111561041f5761041f6117b0565b02179055506001808201869055830160005b81548110156104745761046c8888848481548110610451576104516117df565b6000918252602090912001546001600160a01b031687611012565b600101610431565b50610483600185016000611452565b50505050505050565b600461049781610d16565b600019600b54146104df5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610246565b6104e96008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906117c6565b600b5561055960046000610c72565b50565b6000610571838361056c86611192565b6112b8565b90505b92915050565b600154600290600160a81b900460ff161580156105a5575060015460ff808316600160a01b90920416105b6105c15760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055600054610601906002906001600160a01b0316610c72565b600154610619906008906001600160a01b0316610c72565b600080546001600160a01b031916905560018054600161ff0160a01b031916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b61067b61130e565b61068481611368565b61068e8282610c72565b5050565b600261069d81610d16565b6106a5610d62565b60006106b16008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071291906117c6565b905061071c610d70565b6000600a6000876002811115610734576107346117b0565b6002811115610745576107456117b0565b81526020019081526020016000206000868152602001908152602001600020905080600001546000036107a7576001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b038516179055506102de565b6107b386868685611012565b600b548281101561048357600b8381556000906107cf90610b8b565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561080c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108349190810190611816565b90506000610842838361139e565b9050600061084f84610c01565b9050600061085c85610b56565b9050600061086a600c610b8b565b9050600080826001600160a01b0316878786888c6040516024016108929594939291906118db565b60408051601f198184030181529181526020820180516001600160e01b0316634dca592560e01b179052516108c79190611975565b6000604051808303816000865af19150503d8060008114610904576040519150601f19603f3d011682016040523d82523d6000602084013e610909565b606091505b50915091508161096057604051634dca592560e01b906001600160a01b038516907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610957908590611991565b60405180910390a35b600061096c600d610b8b565b9050806001600160a01b03168b60405160240161098b91815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166302ddfca960e61b179052516109c09190611975565b6000604051808303816000865af19150503d80600081146109fd576040519150601f19603f3d011682016040523d82523d6000602084013e610a02565b606091505b50909350915082610a5a576040516302ddfca960e61b906001600160a01b038316907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610a51908690611991565b60405180910390a35b505050505050505050505050505050565b600154600390600160a81b900460ff16158015610a96575060015460ff808316600160a01b90920416105b610ab25760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055610ae5600b86610c72565b610af0600c85610c72565b610afb600d84610c72565b610b06600483610c72565b600019600b556001805460ff60a81b1916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b600081815260096020526040902060010154610b7182611192565b15610b8657600654610b8390826119c4565b90505b919050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bc257610bc26117b0565b60ff1681526020810191909152604001600020546001600160a01b0316905080610b86578160405163409140df60e11b815260040161024691906119f9565b600081815260096020526040902054610c1982611192565b15610b8657600454610b8390826119c4565b6060610c6a8484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061139e92505050565b949350505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610ca857610ca86117b0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610ce957610ce96117b0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610d1f81610b8b565b6001600160a01b0316336001600160a01b031614610559576000356001600160e01b03191681336040516320e0f98d60e21b815260040161024693929190611a07565b600254431015610d6e57005b565b6000610d7c6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa158015610dc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dea91906117c6565b905080600360000154101561068e576000826001600160a01b031663468c96ae6003600001546001610e1c91906119c4565b6040518263ffffffff1660e01b8152600401610e3a91815260200190565b6040805180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a9190611a3e565b60038490556000818152600960205260408120600454815493955090935091839190610ea79084906119c4565b9091555050600654600182018054600090610ec39084906119c4565b90915550600090505b600854811015610f5357600880546000919083908110610eee57610eee6117df565b60009182526020808320909101546001600160a01b0316808352600782526040808420546002880190935283208054919450919290610f2e9084906119c4565b90915550506001600160a01b0316600090815260076020526040812055600101610ecc565b5060005b600454811015610fe557600060036001018281548110610f7957610f796117df565b6000918252602082206002918202018054909350600a91839160ff1690811115610fa557610fa56117b0565b6002811115610fb657610fb66117b0565b815260208082019290925260409081016000908120600195860154825290925290206003018590555001610f57565b50610ff260046000611470565b6000600581815560068290559061100a600882611452565b505050505050565b6000600a600086600281111561102a5761102a6117b0565b600281111561103b5761103b6117b0565b81526020808201929092526040908101600090812087825283528181206001600160a01b038716825260028101909352205490915060ff161561107e57506102de565b6001600160a01b03831660009081526002820160205260408120805460ff1916600117905560038201549081900361114b576001600160a01b038416600090815260076020526040812054900361111b57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6006805460019081019091556001600160a01b03851660009081526007602052604090208054909101905561100a565b82810361100a57600090815260096020908152604080832060018082018054820190556001600160a01b039790971684526002019091529020805490930190925550505050565b60008061119f6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa1580156111e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120d91906117c6565b9050600080836001600160a01b031663468c96ae600360000154600161123391906119c4565b6040518263ffffffff1660e01b815260040161125191815260200190565b6040805180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190611a3e565b915091508180156112a157508086145b80156112ae575060035483115b9695505050505050565b60008381526009602090815260408083206001600160a01b03861684526002019091529020548115611307576001600160a01b038316600090815260076020526040902054610c6a90826119c4565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610d6e576000356001600160e01b0319166001604051620f948f60ea1b8152600401610246929190611a71565b806001600160a01b03163b60000361055957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610246565b80516060908067ffffffffffffffff8111156113bc576113bc6117f5565b6040519080825280602002602001820160405280156113e5578160200160208202803683370190505b50915060006113f385611192565b905060005b828110156114495761142486868381518110611416576114166117df565b6020026020010151846112b8565b848281518110611436576114366117df565b60209081029190910101526001016113f8565b50505092915050565b50805460008255906000526020600020908101906105599190611491565b508054600082556002029060005260206000209081019061055991906114aa565b5b808211156114a65760008155600101611492565b5090565b5b808211156114a657805460ff19168155600060018201556002016114ab565b6001600160a01b038116811461055957600080fd5b6000806000606084860312156114f457600080fd5b83356114ff816114ca565b9250602084013561150f816114ca565b929592945050506040919091013590565b803560038110610b8657600080fd5b6000806040838503121561154257600080fd5b61154b83611520565b946020939093013593505050565b6000806040838503121561156c57600080fd5b82359150602083013561157e816114ca565b809150509250929050565b803560108110610b8657600080fd5b600080604083850312156115ab57600080fd5b6115b483611589565b9150602083013561157e816114ca565b6000806000606084860312156115d957600080fd5b6115e284611520565b92506020840135915060408401356115f9816114ca565b809150509250925092565b6000806000806080858703121561161a57600080fd5b8435611625816114ca565b93506020850135611635816114ca565b92506040850135611645816114ca565b91506060850135611655816114ca565b939692955090935050565b60006020828403121561167257600080fd5b5035919050565b60006020828403121561168b57600080fd5b61057182611589565b6000806000604084860312156116a957600080fd5b83359250602084013567ffffffffffffffff808211156116c857600080fd5b818601915086601f8301126116dc57600080fd5b8135818111156116eb57600080fd5b8760208260051b850101111561170057600080fd5b6020830194508093505050509250925092565b60008151808452602080850194506020840160005b8381101561174457815187529582019590820190600101611728565b509495945050505050565b6020815260006105716020830184611713565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156117d857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8051610b86816114ca565b6000602080838503121561182957600080fd5b825167ffffffffffffffff8082111561184157600080fd5b818501915085601f83011261185557600080fd5b815181811115611867576118676117f5565b8060051b604051601f19603f8301168101818110858211171561188c5761188c6117f5565b6040529182528482019250838101850191888311156118aa57600080fd5b938501935b828510156118cf576118c08561180b565b845293850193928501926118af565b98975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b50505083810360208501526119328189611713565b6040850197909752505050606081019290925260809091015292915050565b60005b8381101561196c578181015183820152602001611954565b50506000910152565b60008251611987818460208701611951565b9190910192915050565b60208152600082518060208401526119b0816040850160208701611951565b601f01601f19169190910160400192915050565b8082018082111561057457634e487b7160e01b600052601160045260246000fd5b601081106119f5576119f56117b0565b9052565b6020810161057482846119e5565b6001600160e01b03198416815260608101611a2560208301856119e5565b6001600160a01b03929092166040919091015292915050565b60008060408385031215611a5157600080fd5b82518015158114611a6157600080fd5b6020939093015192949293505050565b6001600160e01b03198316815260408101600b8310611a9257611a926117b0565b826020830152939250505056fea2646970667358221220262d80d2feb74067f3cddee2705a4fff0aac4921a9a54ee2314b0f244bccac3e64736f6c63430008170033", + "nonce": "0x2f129" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0x3a3A92ba9d4D49aae06861136D547667c742F1aF", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x206788", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "nonce": "0x2f12a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "RoninGatewayV3", + "contractAddress": "0x4222384E84C248aa8D50FDC702a1b55E6b4efc99", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x8aad78", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b603754610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60375460ff9081161015620000ec576037805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6150b880620000fe6000396000f3fe6080604052600436106102975760003560e01c80638456cb591161015a578063ca15c873116100c1578063ecc836491161007a578063ecc836491461089f578063f0ce418e146108cc578063f23a6e6114610912578063f668214a1461093e578063fa3896591461095e578063fc6574bc1461097e576102a6565b8063ca15c873146107e7578063d547741f14610807578063dafae40814610827578063dbd2ef6c14610847578063de981f1b14610867578063e75235b814610887576102a6565b8063affed0e011610113578063affed0e0146106e5578063b9afa177146106fb578063b9c362091461071b578063bc197c811461073b578063bc7f038614610774578063c28f7894146107a1576102a6565b80638456cb591461063b578063865e6fd3146106505780639010d07c1461067057806391d14854146106905780639584a592146106b0578063a217fddf146106d0576102a6565b80633f4ba83a116101fe5780635d6a9a90116101b75780635d6a9a901461057257806364363f781461059f57806371706cbe146105bf57806375535f86146105d55780637de5dedd146105f5578063835fc6ca1461060a576102a6565b80633f4ba83a1461048f57806347b56b2c146104a45780634d92c4f0146104c45780635a7dd06a146105255780635c975abb146105455780635cd8a76b1461055d576102a6565b8063248a9ca311610250578063248a9ca3146103b15780632f2ff15d146103ef5780633101cfcb1461040f57806336568abe1461042f5780633e4574ec1461044f5780633e70838b1461046f576102a6565b806301ffc9a7146102ae578063065b3adf146102e35780630b1ff17f1461031b578063109679ef1461033b57806317892f961461035b57806317fa2ea114610384576102a6565b366102a6576102a46109d0565b005b6102a46109d0565b3480156102ba57600080fd5b506102ce6102c9366004613c2d565b6109e9565b60405190151581526020015b60405180910390f35b3480156102ef57600080fd5b50600554610303906001600160a01b031681565b6040516001600160a01b0390911681526020016102da565b34801561032757600080fd5b506102a4610336366004613c57565b610a09565b34801561034757600080fd5b506102a4610356366004613c88565b610a20565b34801561036757600080fd5b506078546079545b604080519283526020830191909152016102da565b34801561039057600080fd5b506103a461039f366004613ce5565b610a53565b6040516102da9190613d26565b3480156103bd57600080fd5b506103e16103cc366004613d60565b6000908152606b602052604090206001015490565b6040519081526020016102da565b3480156103fb57600080fd5b506102a461040a366004613d99565b610d90565b34801561041b57600080fd5b506102a461042a366004613dc9565b610dba565b34801561043b57600080fd5b506102a461044a366004613d99565b610e66565b34801561045b57600080fd5b506102ce61046a366004613d99565b610ee0565b34801561047b57600080fd5b506102a461048a366004613dc9565b610f10565b34801561049b57600080fd5b506102a4610f3a565b3480156104b057600080fd5b506102a46104bf366004613d60565b610f4c565b3480156104d057600080fd5b506105156104df366004613de6565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b6040516102da9493929190613e1e565b34801561053157600080fd5b506102a4610540366004613e4e565b611117565b34801561055157600080fd5b5060005460ff166102ce565b34801561056957600080fd5b506102a461117e565b34801561057e57600080fd5b5061059261058d366004613ec8565b611280565b6040516102da9190613f04565b3480156105ab57600080fd5b506102a46105ba366004613f30565b611324565b3480156105cb57600080fd5b506103e1606e5481565b3480156105e157600080fd5b5061036f6105f0366004613de6565b611360565b34801561060157600080fd5b506103e1611381565b34801561061657600080fd5b5061062a610625366004613d60565b611398565b6040516102da959493929190613ff8565b34801561064757600080fd5b506102a461146a565b34801561065c57600080fd5b506102a461066b36600461404e565b61147a565b34801561067c57600080fd5b5061030361068b366004613de6565b611495565b34801561069c57600080fd5b506102ce6106ab366004613d99565b6114ad565b3480156106bc57600080fd5b506102a46106cb36600461408b565b6114d8565b3480156106dc57600080fd5b506103e1600081565b3480156106f157600080fd5b506103e160045481565b34801561070757600080fd5b506103a4610716366004614184565b611625565b34801561072757600080fd5b506102a4610736366004613de6565b611743565b34801561074757600080fd5b50610767610756366004614368565b63bc197c8160e01b95945050505050565b6040516102da9190614415565b34801561078057600080fd5b506103e161078f366004613dc9565b60386020526000908152604090205481565b3480156107ad57600080fd5b506105156107bc366004613d60565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156107f357600080fd5b506103e1610802366004613d60565b611755565b34801561081357600080fd5b506102a4610822366004613d99565b61176c565b34801561083357600080fd5b506102ce610842366004613d60565b611791565b34801561085357600080fd5b506102a461086236600461442a565b6117bd565b34801561087357600080fd5b506103036108823660046144ed565b61180f565b34801561089357600080fd5b5060015460025461036f565b3480156108ab57600080fd5b506108bf6108ba366004614508565b61188a565b6040516102da91906145a3565b3480156108d857600080fd5b506105156108e7366004613d60565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561091e57600080fd5b5061076761092d366004614607565b63f23a6e6160e01b95945050505050565b34801561094a57600080fd5b506102ce610959366004613d60565b6119f1565b34801561096a57600080fd5b506102a4610979366004613f30565b611a1f565b34801561098a57600080fd5b506102ce61099936600461466f565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b60006109f482611c1a565b80610a035750610a0382611c3f565b92915050565b610a11611c64565b610a1c823383611caa565b5050565b610a28611c64565b610a30611d79565b610a50610a4236839003830183614746565b33610a4b611381565b611e1a565b50565b6060610a5d611d79565b336000610a68611381565b9050600084806001600160401b03811115610a8557610a856141f9565b604051908082528060200260200182016040528015610aae578160200160208202803683370190505b5094506000610abd600361180f565b905060005b82811015610d8457888882818110610adc57610adc6147d7565b905060200201359350816001600160a01b031663c7c4fea9600286896040518463ffffffff1660e01b8152600401610b16939291906147ed565b600060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b50505050610b51846119f1565b15610b7b576001878281518110610b6a57610b6a6147d7565b911515602092830291909101909101525b600084815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610bc257610bc2613e08565b6001811115610bd357610bd3613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff1690811115610c6b57610c6b613e08565b6002811115610c7c57610c7c613e08565b81526001820154602082015260029091015460409091015290525090506000610ca482612121565b90506000610cb4848b8b856121eb565b90506001816004811115610cca57610cca613e08565b03610d7557835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d0991908c90600401614817565b600060405180830381600087803b158015610d2357600080fd5b505af1158015610d37573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610d6c92919061482e565b60405180910390a15b50505050806001019050610ac2565b50505050505092915050565b6000828152606b6020526040902060010154610dab8161221e565b610db58383612228565b505050565b603754600390610100900460ff16158015610ddc575060375460ff8083169116105b610e015760405162461bcd60e51b8152600401610df89061488d565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e20600b8361224a565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610ed65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610df8565b610a1c82826122ee565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f18612310565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610f4261236a565b610f4a6123d9565b565b610f54611c64565b610f5d816119f1565b15610f7b576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff1690811115610fba57610fba613e08565b6001811115610fcb57610fcb613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff169081111561106357611063613e08565b600281111561107457611074613e08565b8152600182015460208201526002909101546040918201529152606083015101519192505046146110de576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61110882612121565b82604051610e5a92919061482e565b61111f611c64565b816000819003611142576040516316ee9d3b60e11b815260040160405180910390fd5b60005b818110156111775761116f858583818110611162576111626147d7565b905060a002013385611caa565b600101611145565b5050505050565b603754600290610100900460ff161580156111a0575060375460ff8083169116105b6111bc5760405162461bcd60e51b8152600401610df89061488d565b6037805461ffff191660ff8316176101001790556074546111e8906008906001600160a01b031661224a565b607554611200906003906001600160a01b031661224a565b60775461121890600a906001600160a01b031661224a565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660028111156112d4576112d4613e08565b60028111156112e5576112e5613e08565b815290546001600160a01b0361010090910481166020928301529082015191925016610a0357604051631b79f53b60e21b815260040160405180910390fd5b61132c612310565b600083900361134e576040516316ee9d3b60e11b815260040160405180910390fd5b61135a8484848461242b565b50505050565b60008061136b612310565b611375848461250e565b915091505b9250929050565b600061139361138e612598565b612605565b905090565b607160209081526000918252604091829020805460018201548451606080820187526002808601546001600160a01b03908116845260038701548116848901526004870154848a015288518084018a526005880154821681526006880154909116978101979097526007860154878901528751918201909752600885018054949760ff94851697939693959394929391928492169081111561143c5761143c613e08565b600281111561144d5761144d613e08565b815260200160018201548152602001600282015481525050905085565b61147261236a565b610f4a61263b565b611482612310565b61148b81612678565b610a1c828261224a565b6000828152606c60205260408120610f0990836126ae565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff16158080156114f85750603754600160ff909116105b806115125750303b158015611512575060375460ff166001145b61152e5760405162461bcd60e51b8152600401610df89061488d565b6037805460ff191660011790558015611551576037805461ff0019166101001790555b61155c60008d6126ba565b6115668b8b6126c4565b611570898961250e565b506000905061157f86806148db565b905011156115d1576115b261159486806148db565b6115a160208901896148db565b6115ab89806148db565b8989612754565b6115d16115bf86806148db565b6115cc60208801886148db565b61242b565b8015611617576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b606061162f611c64565b611637611d79565b81806001600160401b03811115611650576116506141f9565b604051908082528060200260200182016040528015611679578160200160208202803683370190505b5091506000611686611381565b9050611690613bc0565b60005b83811015611739578686828181106116ad576116ad6147d7565b905061016002018036038101906116c49190614746565b915060026040808401518101516000908152606f6020908152828220865183529052205460ff1660048111156116fc576116fc613e08565b03611726576001858281518110611715576117156147d7565b911515602092830291909101909101525b611731823385611e1a565b600101611693565b5050505092915050565b61174b612310565b610a1c82826126c4565b6000818152606c60205260408120610a0390612970565b6000828152606b60205260409020600101546117878161221e565b610db583836122ee565b600061179b612598565b6001546117a8919061493a565b6002546117b5908461493a565b101592915050565b6117c5612310565b60008790036117f5576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6118058888888888888888612754565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561184657611846613e08565b60ff1681526020810191909152604001600020546001600160a01b0316905080611885578160405163409140df60e11b8152600401610df89190614951565b919050565b6060816001600160401b038111156118a4576118a46141f9565b6040519080825280602002602001820160405280156118d757816020015b60608152602001906001900390816118c25790505b50905060005b828110156119e957600085815260726020526040812090858584818110611906576119066147d7565b905060200201602081019061191b9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002080546119469061496b565b80601f01602080910402602001604051908101604052809291908181526020018280546119729061496b565b80156119bf5780601f10611994576101008083540402835291602001916119bf565b820191906000526020600020905b8154815290600101906020018083116119a257829003601f168201915b50505050508282815181106119d6576119d66147d7565b60209081029190910101526001016118dd565b509392505050565b6000600260008381526070602052604090205460ff166004811115611a1857611a18613e08565b1492915050565b611a27611c64565b611a2f611d79565b33838015801590611a3f57508083145b611a6a576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6000611a74611381565b9050600080611a83600361180f565b905060005b84811015611c0e57898982818110611aa257611aa26147d7565b905060200201359250878782818110611abd57611abd6147d7565b9050602002810190611acf919061499f565b60008581526072602090815260408083206001600160a01b038c168452909152902091611afd919083614a35565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611b2f9060019087908b906004016147ed565b600060405180830381600087803b158015611b4957600080fd5b505af1158015611b5d573d6000803e3d6000fd5b50505060008481526076602052604081209150611b7c828988886121eb565b90506001816004811115611b9257611b92613e08565b03611c0457815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611bd1906001908990600401614817565b600060405180830381600087803b158015611beb57600080fd5b505af1158015611bff573d6000803e3d6000fd5b505050505b5050600101611a88565b50505050505050505050565b60006001600160e01b03198216635a05180f60e01b1480610a035750610a038261297a565b60006001600160e01b03198216630271189760e51b1480610a035750610a0382611c1a565b60005460ff1615610f4a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610df8565b611cc4611cbf36859003850160408601614af4565b6129af565b611ccd836129f3565b6000611ce8611ce26040860160208701613dc9565b83611280565b80519091506002811115611cfe57611cfe613e08565b611d0e6060860160408701614b10565b6002811115611d1f57611d1f613e08565b14611d3c5760405162035e2b60ea1b815260040160405180910390fd5b611d6983611d506040870160208801613dc9565b611d6236889003880160408901614af4565b9190612a71565b6111778483858460200151612bfc565b611d83600b61180f565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ded9190614b2b565b610f4a576000356001600160e01b0319166006604051620f948f60ea1b8152600401610df8929190614b4d565b82516080840151611e2a906129af565b600084602001516001811115611e4257611e42613e08565b14611e605760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611eae576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b6000611eca856060015160200151866040015160400151611280565b6080860151519091506002811115611ee457611ee4613e08565b81516002811115611ef757611ef7613e08565b148015611f2157508460400151602001516001600160a01b031681602001516001600160a01b0316145b611f3e5760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f6020908152828220858352905290812090611f6887612121565b90506000611f78838888856121eb565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b645985604051611fbf91815260200190565b60405180910390a46000611fd3600361180f565b90506001826004811115611fe957611fe9613e08565b036120b357835460ff191660021784556060890151805160209091015160808b01516120189290916000612d8e565b885160405163114fc47560e11b81526001600160a01b0383169163229f88ea9161204791600091600401614817565b600060405180830381600087803b15801561206157600080fd5b505af1158015612075573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524838a6040516120aa92919061482e565b60405180910390a15b885160405163c7c4fea960e01b81526001600160a01b0383169163c7c4fea9916120e4916000918d906004016147ed565b600060405180830381600087803b1580156120fe57600080fd5b505af1158015612112573d6000803e3d6000fd5b50505050505050505050505050565b6000806121318360400151612fa7565b905060006121428460600151612fa7565b905060006121968560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b60006121f8858584612fef565b600061220486846130a5565b9050612212868583866131a9565b9150505b949350505050565b610a5081336131f5565b6122328282613259565b6000828152606c60205260409020610db590826132df565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561228057612280613e08565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156122c1576122c1613e08565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6122f882826132f4565b6000828152606c60205260409020610db5908261335b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806123ac57506005546001600160a01b031633145b610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b6123e1613370565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b828114612459576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b838110156124ca57828282818110612476576124766147d7565b9050602002013560386000878785818110612493576124936147d7565b90506020020160208101906124a89190613dc9565b6001600160a01b0316815260208101919091526040016000205560010161245c565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da848484846040516125009493929190614bf6565b60405180910390a150505050565b600080828411156125325760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba910160405180910390a49250929050565b60006125a4600b61180f565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113939190614c28565b600060025460016002548460015461261d919061493a565b6126279190614c41565b6126319190614c54565b610a039190614c67565b612643611c64565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861240e3390565b806001600160a01b03163b600003610a5057604051630bfc64a360e21b81526001600160a01b0382166004820152602401610df8565b6000610f0983836133b9565b610a1c8282612228565b808211156126f3576000356001600160e01b0319166040516387f6f09560e01b8152600401610df89190614415565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b868514801561276257508683145b61278d576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b87811015612920578686828181106127aa576127aa6147d7565b90506020020160208101906127bf9190613dc9565b607360008b8b858181106127d5576127d56147d7565b90506020020160208101906127ea9190613dc9565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087878581811061281e5761281e6147d7565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555082828281811061286c5761286c6147d7565b90506020020160208101906128819190614b10565b607360008b8b85818110612897576128976147d7565b90506020020160208101906128ac9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008787858181106128e0576128e06147d7565b60209081029290920135835250810191909152604001600020805460ff1916600183600281111561291357612913613e08565b0217905550600101612790565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401888888888888888860405161295e989796959493929190614c89565b60405180910390a15050505050505050565b6000610a03825490565b60006001600160e01b03198216637965db0b60e01b1480610a0357506301ffc9a760e01b6001600160e01b0319831614610a03565b6129b8816133e3565b806129c757506129c78161341a565b806129d657506129d681613442565b610a505760405163034992a760e51b815260040160405180910390fd5b6000612a056060830160408401614b10565b6002811115612a1657612a16613e08565b148015612a53575060386000612a326040840160208501613dc9565b6001600160a01b031681526020810191909152604001600020546080820135105b15610a5057604051636eff4a8560e11b815260040160405180910390fd5b600060608185516002811115612a8957612a89613e08565b03612b645760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612af09190614d18565b6000604051808303816000865af19150503d8060008114612b2d576040519150601f19603f3d011682016040523d82523d6000602084013e612b32565b606091505b509092509050818015612b5d575080511580612b5d575080806020019051810190612b5d9190614b2b565b9150612bd6565b600185516002811115612b7957612b79613e08565b03612b8e57612b5d838530886020015161346b565b600285516002811115612ba357612ba3613e08565b03612bbd57612b5d83853088602001518960400151613519565b6040516361e411a760e11b815260040160405180910390fd5b816111775784843085604051639d2e4c6760e01b8152600401610df89493929190614d34565b606e805460009182612c0d83614d6a565b9091555090506000612c3484838588612c2b368c90038c018c614d83565b939291906135cd565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612c7357612c73613e08565b02179055506040828101518051600280850180546001600160a01b039384166001600160a01b03199182161790915560208085015160038801805491861691841691909117905593850151600487015560608701518051600588018054918616918416919091179055938401516006870180549190941691161790915591015160078301556080830151805160088401805492939092839160ff19909116906001908490811115612d2657612d26613e08565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612d6e82612121565b82604051612d7d92919061482e565b60405180910390a150949350505050565b806001600160a01b0316826001600160a01b031603612e3b5760408085015190516001600160a01b0385169180156108fc02916000818181858888f19350505050612e3657806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e1257600080fd5b505af1158015612e26573d6000803e3d6000fd5b5050505050612e36848484613639565b61135a565b600084516002811115612e5057612e50613e08565b03612f16576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015612e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec09190614c28565b90508460400151811015612f0557612ee88330838860400151612ee39190614c54565b6136b8565b612f0557604051632f739fff60e11b815260040160405180910390fd5b612f10858585613639565b5061135a565b600184516002811115612f2b57612f2b613e08565b03612f5c57612f3f8284866020015161375d565b612e365760405163c8e3a09f60e01b815260040160405180910390fd5b600284516002811115612f7157612f71613e08565b03612bbd57612f8a828486602001518760400151613784565b612e36576040516334b471a760e21b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b60008360030154118015613007575042836003015411155b1561301857825460ff191660041783555b6001600160a01b03821660009081526002840160205260409020541561305c5760405163025fd59560e41b81526001600160a01b0383166004820152602401610df8565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b60008060006130b4600b61180f565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa1580156130f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131199190810190614e3e565b81519194509250905060005b818110156117395785876002016000868481518110613146576131466147d7565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036131a157828181518110613186576131866147d7565b60200260200101516bffffffffffffffffffffffff16850194505b600101613125565b60008383101580156131d057506000855460ff1660048111156131ce576131ce613e08565b145b156131e857845460ff19166001908117865585018290555b5050915460ff1692915050565b6131ff82826114ad565b610a1c57613217816001600160a01b031660146137ad565b6132228360206137ad565b604051602001613233929190614f36565b60408051601f198184030181529082905262461bcd60e51b8252610df891600401614fab565b61326382826114ad565b610a1c576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561329b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f09836001600160a01b038416613948565b6132fe82826114ad565b15610a1c576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f09836001600160a01b038416613997565b60005460ff16610f4a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610df8565b60008260000182815481106133d0576133d06147d7565b9060005260206000200154905092915050565b600080825160028111156133f9576133f9613e08565b14801561340a575060008260400151115b8015610a03575050602001511590565b600060018251600281111561343157613431613e08565b148015610a03575050604001511590565b600060028251600281111561345957613459613e08565b148015610a0357505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928716916134cb91614d18565b6000604051808303816000865af19150503d8060008114613508576040519150601f19603f3d011682016040523d82523d6000602084013e61350d565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b0387169061354990879087908790879060448101614fbe565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b1790525161357e9190614d18565b6000604051808303816000865af19150503d80600081146135bb576040519150601f19603f3d011682016040523d82523d6000602084013e6135c0565b606091505b5090979650505050505050565b6135d5613bc0565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b6000808451600281111561364f5761364f613e08565b0361366a5761366382848660400151613a8a565b9050613694565b60018451600281111561367f5761367f613e08565b03612bbd57613663823085876020015161346b565b8061135a578383836040516341bd7d9160e11b8152600401610df893929190614ff8565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b179052915160009286169161371091614d18565b6000604051808303816000865af19150503d806000811461374d576040519150601f19603f3d011682016040523d82523d6000602084013e613752565b606091505b509095945050505050565b600061376b8430858561346b565b905080610f095761377d8484846136b8565b9050610f09565b60006137938530868686613519565b905080612216576137a685858585613b5d565b9050612216565b606060006137bc83600261493a565b6137c7906002614c41565b6001600160401b038111156137de576137de6141f9565b6040519080825280601f01601f191660200182016040528015613808576020820181803683370190505b509050600360fc1b81600081518110613823576138236147d7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613852576138526147d7565b60200101906001600160f81b031916908160001a905350600061387684600261493a565b613881906001614c41565b90505b60018111156138f9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106138b5576138b56147d7565b1a60f81b8282815181106138cb576138cb6147d7565b60200101906001600160f81b031916908160001a90535060049490941c936138f281615028565b9050613884565b508315610f095760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610df8565b600081815260018301602052604081205461398f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a03565b506000610a03565b60008181526001830160205260408120548015613a805760006139bb600183614c54565b85549091506000906139cf90600190614c54565b9050818114613a345760008660000182815481106139ef576139ef6147d7565b9060005260206000200154905080876000018481548110613a1257613a126147d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613a4557613a4561503f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a03565b6000915050610a03565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613ae79190614d18565b6000604051808303816000865af19150503d8060008114613b24576040519150601f19603f3d011682016040523d82523d6000602084013e613b29565b606091505b509092509050818015613b54575080511580613b54575080806020019051810190613b549190614b2b565b95945050505050565b604080516000808252602082019092526001600160a01b03861690613b8b9086908690869060448101615055565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b179052516134cb9190614d18565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613c3f57600080fd5b81356001600160e01b031981168114610f0957600080fd5b60008082840360c0811215613c6b57600080fd5b60a0811215613c7957600080fd5b50919360a08501359350915050565b60006101608284031215613c9b57600080fd5b50919050565b60008083601f840112613cb357600080fd5b5081356001600160401b03811115613cca57600080fd5b6020830191508360208260051b850101111561137a57600080fd5b60008060208385031215613cf857600080fd5b82356001600160401b03811115613d0e57600080fd5b613d1a85828601613ca1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561350d578351151583529284019291840191600101613d42565b600060208284031215613d7257600080fd5b5035919050565b6001600160a01b0381168114610a5057600080fd5b803561188581613d79565b60008060408385031215613dac57600080fd5b823591506020830135613dbe81613d79565b809150509250929050565b600060208284031215613ddb57600080fd5b8135610f0981613d79565b60008060408385031215613df957600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6080810160058610613e3257613e32613e08565b9481526020810193909352604083019190915260609091015290565b600080600060408486031215613e6357600080fd5b83356001600160401b0380821115613e7a57600080fd5b818601915086601f830112613e8e57600080fd5b813581811115613e9d57600080fd5b87602060a083028501011115613eb257600080fd5b6020928301989097509590910135949350505050565b60008060408385031215613edb57600080fd5b8235613ee681613d79565b946020939093013593505050565b60038110610a5057610a50613e08565b81516040820190613f1481613ef4565b82526020928301516001600160a01b0316929091019190915290565b60008060008060408587031215613f4657600080fd5b84356001600160401b0380821115613f5d57600080fd5b613f6988838901613ca1565b90965094506020870135915080821115613f8257600080fd5b50613f8f87828801613ca1565b95989497509550505050565b60028110613fab57613fab613e08565b9052565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b8051613fe181613ef4565b825260208181015190830152604090810151910152565b858152610160810161400d6020830187613f9b565b61401a6040830186613faf565b61402760a0830185613faf565b614035610100830184613fd6565b9695505050505050565b80356010811061188557600080fd5b6000806040838503121561406157600080fd5b61406a8361403f565b91506020830135613dbe81613d79565b8060408101831015610a0357600080fd5b60008060008060008060008060008060006101208c8e0312156140ad57600080fd5b6140b68c613d8e565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e013511156140ed57600080fd5b6140fd8e60a08f01358f01613ca1565b909750955060c08d013581101561411357600080fd5b6141238e60c08f01358f0161407a565b94508060e08e0135111561413657600080fd5b6141468e60e08f01358f0161407a565b9350806101008e0135111561415a57600080fd5b5061416c8d6101008e01358e01613ca1565b81935080925050509295989b509295989b9093969950565b6000806020838503121561419757600080fd5b82356001600160401b03808211156141ae57600080fd5b818501915085601f8301126141c257600080fd5b8135818111156141d157600080fd5b866020610160830285010111156141e757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614231576142316141f9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561425f5761425f6141f9565b604052919050565b60006001600160401b03821115614280576142806141f9565b5060051b60200190565b600082601f83011261429b57600080fd5b813560206142b06142ab83614267565b614237565b8083825260208201915060208460051b8701019350868411156142d257600080fd5b602086015b848110156142ee57803583529183019183016142d7565b509695505050505050565b600082601f83011261430a57600080fd5b81356001600160401b03811115614323576143236141f9565b614336601f8201601f1916602001614237565b81815284602083860101111561434b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561438057600080fd5b853561438b81613d79565b9450602086013561439b81613d79565b935060408601356001600160401b03808211156143b757600080fd5b6143c389838a0161428a565b945060608801359150808211156143d957600080fd5b6143e589838a0161428a565b935060808801359150808211156143fb57600080fd5b50614408888289016142f9565b9150509295509295909350565b6001600160e01b031991909116815260200190565b6000806000806000806000806080898b03121561444657600080fd5b88356001600160401b038082111561445d57600080fd5b6144698c838d01613ca1565b909a50985060208b013591508082111561448257600080fd5b61448e8c838d01613ca1565b909850965060408b01359150808211156144a757600080fd5b6144b38c838d01613ca1565b909650945060608b01359150808211156144cc57600080fd5b506144d98b828c01613ca1565b999c989b5096995094979396929594505050565b6000602082840312156144ff57600080fd5b610f098261403f565b60008060006040848603121561451d57600080fd5b8335925060208401356001600160401b0381111561453a57600080fd5b61454686828701613ca1565b9497909650939450505050565b60005b8381101561456e578181015183820152602001614556565b50506000910152565b6000815180845261458f816020860160208601614553565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156145fa57603f198886030184526145e8858351614577565b945092850192908501906001016145cc565b5092979650505050505050565b600080600080600060a0868803121561461f57600080fd5b853561462a81613d79565b9450602086013561463a81613d79565b9350604086013592506060860135915060808601356001600160401b0381111561466357600080fd5b614408888289016142f9565b60008060006060848603121561468457600080fd5b8335925060208401359150604084013561469d81613d79565b809150509250925092565b6000606082840312156146ba57600080fd5b6146c261420f565b905081356146cf81613d79565b815260208201356146df81613d79565b806020830152506040820135604082015292915050565b80356003811061188557600080fd5b60006060828403121561471757600080fd5b61471f61420f565b905061472a826146f6565b8152602082013560208201526040820135604082015292915050565b6000610160828403121561475957600080fd5b60405160a081018181106001600160401b038211171561477b5761477b6141f9565b6040528235815260208301356002811061479457600080fd5b60208201526147a684604085016146a8565b60408201526147b88460a085016146a8565b60608201526147cb846101008501614705565b60808201529392505050565b634e487b7160e01b600052603260045260246000fd5b606081016147fa85613ef4565b93815260208101929092526001600160a01b031660409091015290565b6040810161482484613ef4565b9281526020015290565b6000610180820190508382528251602083015260208301516148536040840182613f9b565b5060408301516148666060840182613faf565b50606083015161487960c0840182613faf565b5060808301516119e9610120840182613fd6565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e198436030181126148f257600080fd5b8301803591506001600160401b0382111561490c57600080fd5b6020019150600581901b360382131561137a57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a0357610a03614924565b602081016010831061496557614965613e08565b91905290565b600181811c9082168061497f57607f821691505b602082108103613c9b57634e487b7160e01b600052602260045260246000fd5b6000808335601e198436030181126149b657600080fd5b8301803591506001600160401b038211156149d057600080fd5b60200191503681900382131561137a57600080fd5b601f821115610db5576000816000526020600020601f850160051c81016020861015614a0e5750805b601f850160051c820191505b81811015614a2d57828155600101614a1a565b505050505050565b6001600160401b03831115614a4c57614a4c6141f9565b614a6083614a5a835461496b565b836149e5565b6000601f841160018114614a945760008515614a7c5750838201355b600019600387901b1c1916600186901b178355611177565b600083815260209020601f19861690835b82811015614ac55786850135825560209485019460019092019101614aa5565b5086821015614ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060608284031215614b0657600080fd5b610f098383614705565b600060208284031215614b2257600080fd5b610f09826146f6565b600060208284031215614b3d57600080fd5b81518015158114610f0957600080fd5b6001600160e01b03198316815260408101600b8310614b6e57614b6e613e08565b8260208301529392505050565b8183526000602080850194508260005b85811015614bb9578135614b9e81613d79565b6001600160a01b031687529582019590820190600101614b8b565b509495945050505050565b81835260006001600160fb1b03831115614bdd57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000614c0a604083018688614b7b565b8281036020840152614c1d818587614bc4565b979650505050505050565b600060208284031215614c3a57600080fd5b5051919050565b80820180821115610a0357610a03614924565b81810381811115610a0357610a03614924565b600082614c8457634e487b7160e01b600052601260045260246000fd5b500490565b608081526000614c9d608083018a8c614b7b565b60208382036020850152614cb2828a8c614b7b565b91508382036040850152614cc782888a614bc4565b848103606086015285815286925060200160005b86811015614d0757614cec846146f6565b614cf581613ef4565b82529282019290820190600101614cdb565b509c9b505050505050505050505050565b60008251614d2a818460208701614553565b9190910192915050565b60c08101614d428287613fd6565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b600060018201614d7c57614d7c614924565b5060010190565b600060a08284031215614d9557600080fd5b614d9d61420f565b8235614da881613d79565b81526020830135614db881613d79565b6020820152614dca8460408501614705565b60408201529392505050565b600082601f830112614de757600080fd5b81516020614df76142ab83614267565b8083825260208201915060208460051b870101935086841115614e1957600080fd5b602086015b848110156142ee578051614e3181613d79565b8352918301918301614e1e565b600080600060608486031215614e5357600080fd5b83516001600160401b0380821115614e6a57600080fd5b614e7687838801614dd6565b9450602091508186015181811115614e8d57600080fd5b614e9988828901614dd6565b945050604086015181811115614eae57600080fd5b86019050601f81018713614ec157600080fd5b8051614ecf6142ab82614267565b81815260059190911b82018301908381019089831115614eee57600080fd5b928401925b82841015614f275783516bffffffffffffffffffffffff81168114614f185760008081fd5b82529284019290840190614ef3565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f6e816017850160208801614553565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614f9f816028840160208801614553565b01602801949350505050565b602081526000610f096020830184614577565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614c1d90830184614577565b60a081016150068286613fd6565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161503757615037614924565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0385168152836020820152826040820152608060608201526000614035608083018461457756fea2646970667358221220f2c96cbb22626006ee11ff90975b91b23886e548ed7a61504409d1948b356f0f64736f6c63430008170033", + "nonce": "0x2f12b" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x8fcf4", + "value": "0x0", + "data": "0x663ac01100000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000010a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x262" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xb033ba62ec622dc54d0abfe0254e79692147ca26", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x4956e", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x65" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x10cf46", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x5a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1713246801, + "chain": 2021, + "multi": false, + "commit": "9c4cad4" +} \ No newline at end of file diff --git a/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713250237.json b/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713250237.json new file mode 100644 index 00000000..a356ef7b --- /dev/null +++ b/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713250237.json @@ -0,0 +1,316 @@ +{ + "transactions": [ + { + "hash": "0x1467e2ab29e7b30da58b2651b5e1385992f17526838467aced5d2eab819d5688", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x52ec2e6bbce45afff8955da6410bb13812f4289f", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x77916", + "value": "0x0", + "data": "0x663ac01100000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x47" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xa58405e67e2e6558de328d173bce7db193836183c1303351bf95c59fbcb7d78f", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x467e6", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x59" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x06f8af58f656b507918d91b0b6f8b89bfcc556f9", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x467e6", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x0" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xe1100401454b5f850b09f3b92ce7f071c5f1cef4", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x5cd02", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x0" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeReward", + "contractAddress": "0x836D911C7de3edfc953030B9ABc4b2B18B2db8b9", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2b9610", + "value": "0x0", + "data": "0x60a060405230608052610010610015565b6100d5565b600054610100900460ff16156100815760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100d3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6080516118666100f06000396000610bc701526118666000f3fe6080604052600436106100dd5760003560e01c80638f7c34a21161007f578063ad43663e11610059578063ad43663e14610261578063b77f2a4014610276578063de981f1b14610296578063f5dbc4ee146102ce57600080fd5b80638f7c34a21461021957806395b6ef0c1461022e578063a6bd67881461024157600080fd5b80633b154455116100bb5780633b154455146101c757806359f778df146101dc5780635cd8a76b146101e4578063865e6fd3146101f957600080fd5b806306032d74146100e257806333b3ea6c1461018257806334087952146101a4575b600080fd5b3480156100ee57600080fd5b506101626100fd366004611335565b604080518082018252600080825260209182018190526001600160a01b039390931683527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a815291819020815180830190925280548252600101549181019190915290565b604080518251815260209283015192810192909252015b60405180910390f35b34801561018e57600080fd5b506101a261019d366004611352565b6102e3565b005b3480156101b057600080fd5b506101b9610399565b604051908152602001610179565b3480156101d357600080fd5b506101a26103c8565b6101a26104bb565b3480156101f057600080fd5b506101a26104c5565b34801561020557600080fd5b506101a261021436600461137a565b610593565b34801561022557600080fd5b506101b96105ae565b6101a261023c3660046113b1565b6105c6565b34801561024d57600080fd5b506101a261025c366004611352565b6106e9565b34801561026d57600080fd5b506101b96106fd565b34801561028257600080fd5b506101a2610291366004611352565b610727565b3480156102a257600080fd5b506102b66102b136600461142a565b61073d565b6040516001600160a01b039091168152602001610179565b3480156102da57600080fd5b506101b96107b8565b6102ec336107e2565b61031c57604051638f47e7e360e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b6000610328600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103899190611445565b90506103958183610860565b5050565b60006103c37f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f45490565b905090565b60046103d381610acd565b6000196103de6105ae565b146104205760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610313565b6104ac600161042f600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104909190611445565b61049a9190611474565b60008051602061181183398151915255565b6104b860046000610b19565b50565b6104c3610bbd565b565b600054600290610100900460ff161580156104e7575060005460ff8083169116105b6105035760405162461bcd60e51b815260040161031390611487565b6000805461ffff191660ff8316176101001790556105417faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c60059055565b61054e60016104906105ae565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b61059b610c9e565b6105a481610cf8565b6103958282610b19565b60006103c36000805160206118118339815191525490565b600054610100900460ff16158080156105e65750600054600160ff909116105b806106005750303b158015610600575060005460ff166001145b61061c5760405162461bcd60e51b815260040161031390611487565b6000805460ff19166001179055801561063f576000805461ff0019166101001790555b61064a600b88610b19565b610655600387610b19565b610660600c86610b19565b61066b600885610b19565b610676600484610b19565b6000196000805160206118118339815191525561069282610d2e565b61069a610bbd565b80156106e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600b6106f481610acd565b61039582610d2e565b60006103c37f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec739105490565b600361073281610acd565b610395826000610860565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610774576107746114d5565b60ff1681526020810191909152604001600020546001600160a01b03169050806107b3578160405163409140df60e11b815260040161031391906114ff565b919050565b60006103c37f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b60006107ee600b61073d565b604051635a02d57960e11b81526001600160a01b038481166004830152919091169063b405aaf290602401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a919061150d565b92915050565b600061086a6105ae565b9050816000036108cc5760008184111561089757600161088a8386611474565b6108949190611474565b90505b6108c8816108c37faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c5490565b610d87565b9250505b6108d7838383610d9f565b60006108e3600b61073d565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610920573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610948919081019061159a565b90506000610956600361073d565b905060005b84811015610ac55761096c84611639565b9350610abd83836001600160a01b031663f67e815287876040518363ffffffff1660e01b81526004016109a0929190611697565b600060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109e591908101906116b0565b60405163692f6a6360e11b8152600481018890526001600160a01b0386169063d25ed4c690602401602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190611445565b604051637153af9b60e11b8152600481018990526001600160a01b0387169063e2a75f3690602401602060405180830381865afa158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190611445565b88610e33565b60010161095b565b505050505050565b610ad68161073d565b6001600160a01b0316336001600160a01b0316146104b8576000356001600160e01b03191681336040516320e0f98d60e21b815260040161031393929190611736565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610b4f57610b4f6114d5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610b9057610b906114d5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c1457604051638f47e7e360e01b81526001600160e01b0319600035166004820152602401610313565b337f7ae161a1f0ef2537f5ff1957021a50412e72abdc6a941a77d99361e91e7f3c3d610c5e7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b604080519182523460208301520160405180910390a26104b87f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c6434610f8a565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146104c3576000356001600160e01b0319166001604051620f948f60ea1b815260040161031392919061176d565b806001600160a01b03163b6000036104b857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610313565b610d577f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910829055565b6040518181527f9b40b647582311cc8f5f7d27e7ce206d126605d1625b8299b7edaeefd869ef2590602001610588565b6000818310610d965781610d98565b825b9392505050565b81600003610dc05760405163799ffe0d60e01b815260040160405180910390fd5b610dcb81600161179b565b8311610df45760405163425a5b1f60e01b81526004810184905260248101829052604401610313565b610dfe828261179b565b8311610e2e57604051630931302b60e31b8152600481018490526024810182905260448101839052606401610313565b505050565b845184518114610e64576040516306b5667560e21b81526001600160e01b0319600035166004820152602401610313565b6000610e6e6106fd565b90506000610e7b88610fa1565b90506000610e8a87878a61101f565b90506000806000805b87811015610f3957610edc8589898f8581518110610eb357610eb36117ae565b60200260200101518f8e8c8881518110610ecf57610ecf6117ae565b6020026020010151611072565b80945081955050506000610f0b8a8f8481518110610efc57610efc6117ae565b60200260200101518787611093565b90508380610f17575080155b610f215784610f24565b60005b610f2e908461179b565b925050600101610e93565b50610f647f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f482610f8a565b50610f7c600080516020611811833981519152899055565b505050505050505050505050565b600061085a83610f9a85856111f9565b9250829055565b6060610fad600c61073d565b6001600160a01b0316635311153b836040518263ffffffff1660e01b8152600401610fd891906117c4565b6000604051808303816000875af1158015610ff7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261085a91908101906116b0565b60008061102d858585611218565b90508061105e576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a15b801580611069575084155b95945050505050565b6000828210156110858989898989611295565b915097509795505050505050565b6001600160a01b03831660009081527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a60205260408120821561113857838160010160008282546110e4919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fb3d061c3ef3991b0d4b09f4c8b551d137c3d1e014cf5326462d3d1f6a8dfb9c291015b60405180910390a260009150506111f1565b611144858560006112c0565b156111b0578381600001600082825461115d919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fbab0baccb39371d4d5206b519fe58d21cae9cdd63a1d1b5146ecdf405fd93152910160405180910390a260019150506111f1565b604080516001600160a01b03871681526020810186905287917f74b217634c5a7790ce69770c5e35019970453d4da3973769e7d6cdb7ce6816a19101611126565b949350505050565b815481018181101561085a57634e487b7160005260116020526024601cfd5b8051600190600090815b8181101561127d578585828151811061123d5761123d6117ae565b60200260200101511115611254576000935061127d565b848181518110611266576112666117ae565b602002602001015183019250806001019050611222565b5082801561128b5750858211155b9695505050505050565b6000856112b657816112a784866117d7565b6112b191906117ee565b61128b565b61128b85856117ee565b6000836001600160a01b0316838390604051600060405180830381858888f193505050503d8060008114611310576040519150601f19603f3d011682016040523d82523d6000602084013e611315565b606091505b509095945050505050565b6001600160a01b03811681146104b857600080fd5b60006020828403121561134757600080fd5b8135610d9881611320565b60006020828403121561136457600080fd5b5035919050565b8035601081106107b357600080fd5b6000806040838503121561138d57600080fd5b6113968361136b565b915060208301356113a681611320565b809150509250929050565b60008060008060008060c087890312156113ca57600080fd5b86356113d581611320565b955060208701356113e581611320565b945060408701356113f581611320565b9350606087013561140581611320565b9250608087013561141581611320565b8092505060a087013590509295509295509295565b60006020828403121561143c57600080fd5b610d988261136b565b60006020828403121561145757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561085a5761085a61145e565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b601081106114fb576114fb6114d5565b9052565b6020810161085a82846114eb565b60006020828403121561151f57600080fd5b81518015158114610d9857600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561156e5761156e61152f565b604052919050565b600067ffffffffffffffff8211156115905761159061152f565b5060051b60200190565b600060208083850312156115ad57600080fd5b825167ffffffffffffffff8111156115c457600080fd5b8301601f810185136115d557600080fd5b80516115e86115e382611576565b611545565b81815260059190911b8201830190838101908783111561160757600080fd5b928401925b8284101561162e57835161161f81611320565b8252928401929084019061160c565b979650505050505050565b60006001820161164b5761164b61145e565b5060010190565b60008151808452602080850194506020840160005b8381101561168c5781516001600160a01b031687529582019590820190600101611667565b509495945050505050565b8281526040602082015260006111f16040830184611652565b600060208083850312156116c357600080fd5b825167ffffffffffffffff8111156116da57600080fd5b8301601f810185136116eb57600080fd5b80516116f96115e382611576565b81815260059190911b8201830190838101908783111561171857600080fd5b928401925b8284101561162e5783518252928401929084019061171d565b6001600160e01b0319841681526060810161175460208301856114eb565b6001600160a01b03929092166040919091015292915050565b6001600160e01b03198316815260408101600b831061178e5761178e6114d5565b8260208301529392505050565b8082018082111561085a5761085a61145e565b634e487b7160e01b600052603260045260246000fd5b602081526000610d986020830184611652565b808202811582820484141761085a5761085a61145e565b60008261180b57634e487b7160e01b600052601260045260246000fd5b50049056fe2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619a2646970667358221220cd237faf10660b4bf88f4dcc843cf0b3d4cce585ad7f99199ed3924ea16b8dfd64736f6c63430008170033", + "nonce": "0x2f127" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeSlash", + "contractAddress": "0x7bEB0f3fC4002C4542015cFa9023dEE1A9EC9400", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x26b9de", + "value": "0x0", + "data": "0x608060405261000c610011565b6100d1565b600054610100900460ff161561007d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100cf576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611583806100e06000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639c2f445911610097578063de981f1b11610066578063de981f1b146101fd578063f8c8765e14610228578063f9f608731461023b578063fbb2f1941461024357600080fd5b80639c2f4459146101d2578063c48549de146101da578063d1e1f2f8146101ed578063ddc3f7f6146101f557600080fd5b80635311153b116100d35780635311153b1461016a5780636dda44081461017d578063865e6fd3146101935780638f851d8a146101a657600080fd5b806301ffc9a7146101055780631288810a1461012d5780633b1544551461014d5780634dca592514610157575b600080fd5b610118610113366004610eb7565b610263565b60405190151581526020015b60405180910390f35b61014061013b366004610f2d565b61029a565b6040516101249190610f6f565b610155610382565b005b6101556101653660046110a4565b610462565b610140610178366004610f2d565b6106f9565b610185600181565b604051908152602001610124565b6101556101a136600461118e565b6107d2565b6101b96101b43660046111c1565b6107f1565b6040516001600160e01b03199091168152602001610124565b610185603281565b6101b96101e83660046112ba565b610970565b610185600581565b610185601e81565b61021061020b366004611326565b61098f565b6040516001600160a01b039091168152602001610124565b610155610236366004611341565b610a0a565b610140610b49565b610256610251366004611395565b610b58565b60405161012491906113cd565b60006001600160e01b031982166312c0151560e21b148061029457506001600160e01b031982166301ffc9a760e01b145b92915050565b6060818067ffffffffffffffff8111156102b6576102b6610fb3565b6040519080825280602002602001820160405280156102df578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610311576103116113e7565b905060200201602081019061032691906113fd565b6001600160a01b031681526020810191909152604001600020548451600160801b9091046001600160801b031690859083908110610366576103666113e7565b60209081029190910101526001016102f4565b50505092915050565b600461038d81610b6b565b600019600154146103da5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b60448201526064015b60405180910390fd5b6103e4600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190611418565b610450906001611447565b60015561045f60046000610bb7565b50565b600361046d81610b6b565b8160015481106106f0578360328111156106ee5786518851146104b1576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8751156106ee576104c3868689610c5b565b6104f5576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a16106ee565b60006104ff610cd8565b6040805180820190915260008082526020820181905291925060008051602061152e833981519152918080805b8e518110156106e6578e8181518110610547576105476113e7565b6020908102919091018101516001600160a01b03811660009081528883526040908190208151808301909252546001600160801b038082168352600160801b90910416928101839052965093508b11156106de576105be8e82815181106105b0576105b06113e7565b60200260200101518d610d43565b91506105d9828c87600001516001600160801b03168a610d95565b93506105e5848c610dec565b1561062b576040516001600160801b0394506001600160a01b038416908c907fb32a150b9737190a456d8b2b81dd7d592a799ab2933ea494e44351acd41f835d90600090a35b600082600281111561063f5761063f6113b7565b146106de576001600160801b0384146106a3578a836001600160a01b031683600281111561066f5761066f6113b7565b6040518781527fa0957b65e189f06dfe2b38ff07e89a0df128ba3fcba66c68f8d2615daebc30a99060200160405180910390a45b6001600160a01b038316600090815260208790526040902080546fffffffffffffffffffffffffffffffff19166001600160801b0386161790555b60010161052c565b505050505050505b505b50505050505050565b6060818067ffffffffffffffff81111561071557610715610fb3565b60405190808252806020026020018201604052801561073e578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610770576107706113e7565b905060200201602081019061078591906113fd565b6001600160a01b0316815260208101919091526040016000205484516001600160801b03909116908590839081106107bf576107bf6113e7565b6020908102919091010152600101610753565b6107da610e0e565b6107e381610e6a565b6107ed8282610bb7565b5050565b6000600b6107fe81610b6b565b82518690811461082f576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8060000361084757506347c28ec560e11b9150610966565b60008051602061152e8339815191526000610862600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561089f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c39190611418565b905060005b83811015610957578681815181106108e2576108e26113e7565b60200260200101511561094f57818360008d8d85818110610905576109056113e7565b905060200201602081019061091a91906113fd565b6001600160a01b03168152602081019190915260400160002080546001600160801b03928316600160801b0292169190911790555b6001016108c8565b506347c28ec560e11b94505050505b5095945050505050565b6000600b61097d81610b6b565b50636242a4ef60e11b95945050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156109c6576109c66113b7565b60ff1681526020810191909152604001600020546001600160a01b0316905080610a05578160405163409140df60e11b81526004016103d1919061146e565b919050565b600054610100900460ff1615808015610a2a5750600054600160ff909116105b80610a445750303b158015610a44575060005460ff166001145b610aa75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d1565b6000805460ff191660011790558015610aca576000805461ff0019166101001790555b610ad5600886610bb7565b610ae0600b85610bb7565b610aeb600384610bb7565b610af6600483610bb7565b6000196001558015610b42576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6060610b53610cd8565b905090565b6000610b648383610d43565b9392505050565b610b748161098f565b6001600160a01b0316336001600160a01b03161461045f576000356001600160e01b03191681336040516320e0f98d60e21b81526004016103d19392919061147c565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610bed57610bed6113b7565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610c2e57610c2e6113b7565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b8051600190600090815b81811015610cc05785858281518110610c8057610c806113e7565b60200260200101511115610c975760009350610cc0565b848181518110610ca957610ca96113e7565b602002602001015183019250806001019050610c65565b50828015610cce5750858211155b9695505050505050565b604080516003808252608082019092526060916020820183803683370190505090506001818160ff1681518110610d1157610d116113e7565b6020908102919091010152600581600260ff1681518110610d3457610d346113e7565b60200260200101818152505090565b60008082612710610d5486836114b3565b610d5e91906114c6565b610d6891906114dd565b9050610bb88111610d8a576103e88111610d83576000610d8d565b6001610d8d565b60025b949350505050565b6000610dab610da56001866114b3565b84610ea0565b82866002811115610dbe57610dbe6113b7565b60ff1681518110610dd157610dd16113e7565b6020026020010151610de39190611447565b95945050505050565b6000601e610dfb6001846114b3565b610e0590856114b3565b10159392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610e68576000356001600160e01b0319166001604051620f948f60ea1b81526004016103d19291906114ff565b565b806001600160a01b03163b60000361045f57604051630bfc64a360e21b81526001600160a01b03821660048201526024016103d1565b600081831015610eb05781610b64565b5090919050565b600060208284031215610ec957600080fd5b81356001600160e01b031981168114610b6457600080fd5b60008083601f840112610ef357600080fd5b50813567ffffffffffffffff811115610f0b57600080fd5b6020830191508360208260051b8501011115610f2657600080fd5b9250929050565b60008060208385031215610f4057600080fd5b823567ffffffffffffffff811115610f5757600080fd5b610f6385828601610ee1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610fa757835183529284019291840191600101610f8b565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ff257610ff2610fb3565b604052919050565b600067ffffffffffffffff82111561101457611014610fb3565b5060051b60200190565b80356001600160a01b0381168114610a0557600080fd5b600082601f83011261104657600080fd5b8135602061105b61105683610ffa565b610fc9565b8083825260208201915060208460051b87010193508684111561107d57600080fd5b602086015b848110156110995780358352918301918301611082565b509695505050505050565b600080600080600060a086880312156110bc57600080fd5b853567ffffffffffffffff808211156110d457600080fd5b818801915088601f8301126110e857600080fd5b813560206110f861105683610ffa565b82815260059290921b8401810191818101908c84111561111757600080fd5b948201945b8386101561113c5761112d8661101e565b8252948201949082019061111c565b9950508901359250508082111561115257600080fd5b5061115f88828901611035565b959895975050505060408401359360608101359360809091013592509050565b803560108110610a0557600080fd5b600080604083850312156111a157600080fd5b6111aa8361117f565b91506111b86020840161101e565b90509250929050565b6000806000806000606086880312156111d957600080fd5b853567ffffffffffffffff808211156111f157600080fd5b6111fd89838a01610ee1565b909750955060209150878201358181111561121757600080fd5b6112238a828b01610ee1565b90965094505060408801358181111561123b57600080fd5b88019050601f8101891361124e57600080fd5b803561125c61105682610ffa565b81815260059190911b8201830190838101908b83111561127b57600080fd5b928401925b828410156112a857833580151581146112995760008081fd5b82529284019290840190611280565b80955050505050509295509295909350565b600080600080604085870312156112d057600080fd5b843567ffffffffffffffff808211156112e857600080fd5b6112f488838901610ee1565b9096509450602087013591508082111561130d57600080fd5b5061131a87828801610ee1565b95989497509550505050565b60006020828403121561133857600080fd5b610b648261117f565b6000806000806080858703121561135757600080fd5b6113608561101e565b935061136e6020860161101e565b925061137c6040860161101e565b915061138a6060860161101e565b905092959194509250565b600080604083850312156113a857600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60208101600383106113e1576113e16113b7565b91905290565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561140f57600080fd5b610b648261101e565b60006020828403121561142a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561029457610294611431565b6010811061146a5761146a6113b7565b9052565b60208101610294828461145a565b6001600160e01b0319841681526060810161149a602083018561145a565b6001600160a01b03929092166040919091015292915050565b8181038181111561029457610294611431565b808202811582820484141761029457610294611431565b6000826114fa57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b03198316815260408101600b8310611520576115206113b7565b826020830152939250505056fed08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfea2646970667358221220a88731885a136f6ffe2ef43beabc7b3a128ab2f3ee20d79c6777fe10326663bf64736f6c63430008170033", + "nonce": "0x2f128" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeTracking", + "contractAddress": "0xB03E29Be08E57b2d95Fe9F94966CB86a0DD98481", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2fb53a", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100eb565b600154600160a81b900460ff161561008c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60015460ff600160a01b909104811610156100e9576001805460ff60a01b191660ff60a01b17905560405160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611ad5806100fa6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063c7c4fea91161008c578063de981f1b11610066578063de981f1b1461017e578063e2a75f36146101a9578063f67e8152146101bc578063f84bd121146101dc57600080fd5b8063c7c4fea914610145578063ca21287e14610158578063d25ed4c61461016b57600080fd5b80631794bb3c146100d4578063229f88ea146100e95780633b154455146100fc5780634ac0bcda146101045780635cd8a76b1461012a578063865e6fd314610132575b600080fd5b6100e76100e23660046114df565b6101e4565b005b6100e76100f736600461152f565b6102e4565b6100e761048c565b610117610112366004611559565b61055c565b6040519081526020015b60405180910390f35b6100e761057a565b6100e7610140366004611598565b610673565b6100e76101533660046115c4565b610692565b6100e7610166366004611604565b610a6b565b610117610179366004611660565b610b56565b61019161018c366004611679565b610b8b565b6040516001600160a01b039091168152602001610121565b6101176101b7366004611660565b610c01565b6101cf6101ca366004611694565b610c2b565b604051610121919061174f565b600254610117565b600154600160a81b900460ff161580801561020a575060018054600160a01b900460ff16105b8061022a5750303b15801561022a575060018054600160a01b900460ff16145b61024f5760405162461bcd60e51b815260040161024690611762565b60405180910390fd5b6001805460ff60a01b1916600160a01b179055801561027c576001805460ff60a81b1916600160a81b1790555b610287600285610c72565b610292600884610c72565b600282905580156102de576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60026102ef81610d16565b6102f7610d62565b6000600a600085600281111561030f5761030f6117b0565b6002811115610320576103206117b0565b81526020019081526020016000206000848152602001908152602001600020905080600001546000036102de57610355610d70565b60006103616008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c291906117c6565b808355600480546001818101835560009290925260029081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054939450928892849260ff1990921691849081111561041f5761041f6117b0565b02179055506001808201869055830160005b81548110156104745761046c8888848481548110610451576104516117df565b6000918252602090912001546001600160a01b031687611012565b600101610431565b50610483600185016000611452565b50505050505050565b600461049781610d16565b600019600b54146104df5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610246565b6104e96008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906117c6565b600b5561055960046000610c72565b50565b6000610571838361056c86611192565b6112b8565b90505b92915050565b600154600290600160a81b900460ff161580156105a5575060015460ff808316600160a01b90920416105b6105c15760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055600054610601906002906001600160a01b0316610c72565b600154610619906008906001600160a01b0316610c72565b600080546001600160a01b031916905560018054600161ff0160a01b031916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b61067b61130e565b61068481611368565b61068e8282610c72565b5050565b600261069d81610d16565b6106a5610d62565b60006106b16008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071291906117c6565b905061071c610d70565b6000600a6000876002811115610734576107346117b0565b6002811115610745576107456117b0565b81526020019081526020016000206000868152602001908152602001600020905080600001546000036107a7576001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b038516179055506102de565b6107b386868685611012565b600b548281101561048357600b8381556000906107cf90610b8b565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561080c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108349190810190611816565b90506000610842838361139e565b9050600061084f84610c01565b9050600061085c85610b56565b9050600061086a600c610b8b565b9050600080826001600160a01b0316878786888c6040516024016108929594939291906118db565b60408051601f198184030181529181526020820180516001600160e01b0316634dca592560e01b179052516108c79190611975565b6000604051808303816000865af19150503d8060008114610904576040519150601f19603f3d011682016040523d82523d6000602084013e610909565b606091505b50915091508161096057604051634dca592560e01b906001600160a01b038516907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610957908590611991565b60405180910390a35b600061096c600d610b8b565b9050806001600160a01b03168b60405160240161098b91815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166302ddfca960e61b179052516109c09190611975565b6000604051808303816000865af19150503d80600081146109fd576040519150601f19603f3d011682016040523d82523d6000602084013e610a02565b606091505b50909350915082610a5a576040516302ddfca960e61b906001600160a01b038316907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610a51908690611991565b60405180910390a35b505050505050505050505050505050565b600154600390600160a81b900460ff16158015610a96575060015460ff808316600160a01b90920416105b610ab25760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055610ae5600b86610c72565b610af0600c85610c72565b610afb600d84610c72565b610b06600483610c72565b600019600b556001805460ff60a81b1916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b600081815260096020526040902060010154610b7182611192565b15610b8657600654610b8390826119c4565b90505b919050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bc257610bc26117b0565b60ff1681526020810191909152604001600020546001600160a01b0316905080610b86578160405163409140df60e11b815260040161024691906119f9565b600081815260096020526040902054610c1982611192565b15610b8657600454610b8390826119c4565b6060610c6a8484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061139e92505050565b949350505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610ca857610ca86117b0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610ce957610ce96117b0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610d1f81610b8b565b6001600160a01b0316336001600160a01b031614610559576000356001600160e01b03191681336040516320e0f98d60e21b815260040161024693929190611a07565b600254431015610d6e57005b565b6000610d7c6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa158015610dc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dea91906117c6565b905080600360000154101561068e576000826001600160a01b031663468c96ae6003600001546001610e1c91906119c4565b6040518263ffffffff1660e01b8152600401610e3a91815260200190565b6040805180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a9190611a3e565b60038490556000818152600960205260408120600454815493955090935091839190610ea79084906119c4565b9091555050600654600182018054600090610ec39084906119c4565b90915550600090505b600854811015610f5357600880546000919083908110610eee57610eee6117df565b60009182526020808320909101546001600160a01b0316808352600782526040808420546002880190935283208054919450919290610f2e9084906119c4565b90915550506001600160a01b0316600090815260076020526040812055600101610ecc565b5060005b600454811015610fe557600060036001018281548110610f7957610f796117df565b6000918252602082206002918202018054909350600a91839160ff1690811115610fa557610fa56117b0565b6002811115610fb657610fb66117b0565b815260208082019290925260409081016000908120600195860154825290925290206003018590555001610f57565b50610ff260046000611470565b6000600581815560068290559061100a600882611452565b505050505050565b6000600a600086600281111561102a5761102a6117b0565b600281111561103b5761103b6117b0565b81526020808201929092526040908101600090812087825283528181206001600160a01b038716825260028101909352205490915060ff161561107e57506102de565b6001600160a01b03831660009081526002820160205260408120805460ff1916600117905560038201549081900361114b576001600160a01b038416600090815260076020526040812054900361111b57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6006805460019081019091556001600160a01b03851660009081526007602052604090208054909101905561100a565b82810361100a57600090815260096020908152604080832060018082018054820190556001600160a01b039790971684526002019091529020805490930190925550505050565b60008061119f6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa1580156111e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120d91906117c6565b9050600080836001600160a01b031663468c96ae600360000154600161123391906119c4565b6040518263ffffffff1660e01b815260040161125191815260200190565b6040805180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190611a3e565b915091508180156112a157508086145b80156112ae575060035483115b9695505050505050565b60008381526009602090815260408083206001600160a01b03861684526002019091529020548115611307576001600160a01b038316600090815260076020526040902054610c6a90826119c4565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610d6e576000356001600160e01b0319166001604051620f948f60ea1b8152600401610246929190611a71565b806001600160a01b03163b60000361055957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610246565b80516060908067ffffffffffffffff8111156113bc576113bc6117f5565b6040519080825280602002602001820160405280156113e5578160200160208202803683370190505b50915060006113f385611192565b905060005b828110156114495761142486868381518110611416576114166117df565b6020026020010151846112b8565b848281518110611436576114366117df565b60209081029190910101526001016113f8565b50505092915050565b50805460008255906000526020600020908101906105599190611491565b508054600082556002029060005260206000209081019061055991906114aa565b5b808211156114a65760008155600101611492565b5090565b5b808211156114a657805460ff19168155600060018201556002016114ab565b6001600160a01b038116811461055957600080fd5b6000806000606084860312156114f457600080fd5b83356114ff816114ca565b9250602084013561150f816114ca565b929592945050506040919091013590565b803560038110610b8657600080fd5b6000806040838503121561154257600080fd5b61154b83611520565b946020939093013593505050565b6000806040838503121561156c57600080fd5b82359150602083013561157e816114ca565b809150509250929050565b803560108110610b8657600080fd5b600080604083850312156115ab57600080fd5b6115b483611589565b9150602083013561157e816114ca565b6000806000606084860312156115d957600080fd5b6115e284611520565b92506020840135915060408401356115f9816114ca565b809150509250925092565b6000806000806080858703121561161a57600080fd5b8435611625816114ca565b93506020850135611635816114ca565b92506040850135611645816114ca565b91506060850135611655816114ca565b939692955090935050565b60006020828403121561167257600080fd5b5035919050565b60006020828403121561168b57600080fd5b61057182611589565b6000806000604084860312156116a957600080fd5b83359250602084013567ffffffffffffffff808211156116c857600080fd5b818601915086601f8301126116dc57600080fd5b8135818111156116eb57600080fd5b8760208260051b850101111561170057600080fd5b6020830194508093505050509250925092565b60008151808452602080850194506020840160005b8381101561174457815187529582019590820190600101611728565b509495945050505050565b6020815260006105716020830184611713565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156117d857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8051610b86816114ca565b6000602080838503121561182957600080fd5b825167ffffffffffffffff8082111561184157600080fd5b818501915085601f83011261185557600080fd5b815181811115611867576118676117f5565b8060051b604051601f19603f8301168101818110858211171561188c5761188c6117f5565b6040529182528482019250838101850191888311156118aa57600080fd5b938501935b828510156118cf576118c08561180b565b845293850193928501926118af565b98975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b50505083810360208501526119328189611713565b6040850197909752505050606081019290925260809091015292915050565b60005b8381101561196c578181015183820152602001611954565b50506000910152565b60008251611987818460208701611951565b9190910192915050565b60208152600082518060208401526119b0816040850160208701611951565b601f01601f19169190910160400192915050565b8082018082111561057457634e487b7160e01b600052601160045260246000fd5b601081106119f5576119f56117b0565b9052565b6020810161057482846119e5565b6001600160e01b03198416815260608101611a2560208301856119e5565b6001600160a01b03929092166040919091015292915050565b60008060408385031215611a5157600080fd5b82518015158114611a6157600080fd5b6020939093015192949293505050565b6001600160e01b03198316815260408101600b8310611a9257611a926117b0565b826020830152939250505056fea2646970667358221220262d80d2feb74067f3cddee2705a4fff0aac4921a9a54ee2314b0f244bccac3e64736f6c63430008170033", + "nonce": "0x2f129" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0x3a3A92ba9d4D49aae06861136D547667c742F1aF", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x206788", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "nonce": "0x2f12a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "RoninGatewayV3", + "contractAddress": "0x4222384E84C248aa8D50FDC702a1b55E6b4efc99", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x8aad78", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b603754610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60375460ff9081161015620000ec576037805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6150b880620000fe6000396000f3fe6080604052600436106102975760003560e01c80638456cb591161015a578063ca15c873116100c1578063ecc836491161007a578063ecc836491461089f578063f0ce418e146108cc578063f23a6e6114610912578063f668214a1461093e578063fa3896591461095e578063fc6574bc1461097e576102a6565b8063ca15c873146107e7578063d547741f14610807578063dafae40814610827578063dbd2ef6c14610847578063de981f1b14610867578063e75235b814610887576102a6565b8063affed0e011610113578063affed0e0146106e5578063b9afa177146106fb578063b9c362091461071b578063bc197c811461073b578063bc7f038614610774578063c28f7894146107a1576102a6565b80638456cb591461063b578063865e6fd3146106505780639010d07c1461067057806391d14854146106905780639584a592146106b0578063a217fddf146106d0576102a6565b80633f4ba83a116101fe5780635d6a9a90116101b75780635d6a9a901461057257806364363f781461059f57806371706cbe146105bf57806375535f86146105d55780637de5dedd146105f5578063835fc6ca1461060a576102a6565b80633f4ba83a1461048f57806347b56b2c146104a45780634d92c4f0146104c45780635a7dd06a146105255780635c975abb146105455780635cd8a76b1461055d576102a6565b8063248a9ca311610250578063248a9ca3146103b15780632f2ff15d146103ef5780633101cfcb1461040f57806336568abe1461042f5780633e4574ec1461044f5780633e70838b1461046f576102a6565b806301ffc9a7146102ae578063065b3adf146102e35780630b1ff17f1461031b578063109679ef1461033b57806317892f961461035b57806317fa2ea114610384576102a6565b366102a6576102a46109d0565b005b6102a46109d0565b3480156102ba57600080fd5b506102ce6102c9366004613c2d565b6109e9565b60405190151581526020015b60405180910390f35b3480156102ef57600080fd5b50600554610303906001600160a01b031681565b6040516001600160a01b0390911681526020016102da565b34801561032757600080fd5b506102a4610336366004613c57565b610a09565b34801561034757600080fd5b506102a4610356366004613c88565b610a20565b34801561036757600080fd5b506078546079545b604080519283526020830191909152016102da565b34801561039057600080fd5b506103a461039f366004613ce5565b610a53565b6040516102da9190613d26565b3480156103bd57600080fd5b506103e16103cc366004613d60565b6000908152606b602052604090206001015490565b6040519081526020016102da565b3480156103fb57600080fd5b506102a461040a366004613d99565b610d90565b34801561041b57600080fd5b506102a461042a366004613dc9565b610dba565b34801561043b57600080fd5b506102a461044a366004613d99565b610e66565b34801561045b57600080fd5b506102ce61046a366004613d99565b610ee0565b34801561047b57600080fd5b506102a461048a366004613dc9565b610f10565b34801561049b57600080fd5b506102a4610f3a565b3480156104b057600080fd5b506102a46104bf366004613d60565b610f4c565b3480156104d057600080fd5b506105156104df366004613de6565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b6040516102da9493929190613e1e565b34801561053157600080fd5b506102a4610540366004613e4e565b611117565b34801561055157600080fd5b5060005460ff166102ce565b34801561056957600080fd5b506102a461117e565b34801561057e57600080fd5b5061059261058d366004613ec8565b611280565b6040516102da9190613f04565b3480156105ab57600080fd5b506102a46105ba366004613f30565b611324565b3480156105cb57600080fd5b506103e1606e5481565b3480156105e157600080fd5b5061036f6105f0366004613de6565b611360565b34801561060157600080fd5b506103e1611381565b34801561061657600080fd5b5061062a610625366004613d60565b611398565b6040516102da959493929190613ff8565b34801561064757600080fd5b506102a461146a565b34801561065c57600080fd5b506102a461066b36600461404e565b61147a565b34801561067c57600080fd5b5061030361068b366004613de6565b611495565b34801561069c57600080fd5b506102ce6106ab366004613d99565b6114ad565b3480156106bc57600080fd5b506102a46106cb36600461408b565b6114d8565b3480156106dc57600080fd5b506103e1600081565b3480156106f157600080fd5b506103e160045481565b34801561070757600080fd5b506103a4610716366004614184565b611625565b34801561072757600080fd5b506102a4610736366004613de6565b611743565b34801561074757600080fd5b50610767610756366004614368565b63bc197c8160e01b95945050505050565b6040516102da9190614415565b34801561078057600080fd5b506103e161078f366004613dc9565b60386020526000908152604090205481565b3480156107ad57600080fd5b506105156107bc366004613d60565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156107f357600080fd5b506103e1610802366004613d60565b611755565b34801561081357600080fd5b506102a4610822366004613d99565b61176c565b34801561083357600080fd5b506102ce610842366004613d60565b611791565b34801561085357600080fd5b506102a461086236600461442a565b6117bd565b34801561087357600080fd5b506103036108823660046144ed565b61180f565b34801561089357600080fd5b5060015460025461036f565b3480156108ab57600080fd5b506108bf6108ba366004614508565b61188a565b6040516102da91906145a3565b3480156108d857600080fd5b506105156108e7366004613d60565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561091e57600080fd5b5061076761092d366004614607565b63f23a6e6160e01b95945050505050565b34801561094a57600080fd5b506102ce610959366004613d60565b6119f1565b34801561096a57600080fd5b506102a4610979366004613f30565b611a1f565b34801561098a57600080fd5b506102ce61099936600461466f565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b60006109f482611c1a565b80610a035750610a0382611c3f565b92915050565b610a11611c64565b610a1c823383611caa565b5050565b610a28611c64565b610a30611d79565b610a50610a4236839003830183614746565b33610a4b611381565b611e1a565b50565b6060610a5d611d79565b336000610a68611381565b9050600084806001600160401b03811115610a8557610a856141f9565b604051908082528060200260200182016040528015610aae578160200160208202803683370190505b5094506000610abd600361180f565b905060005b82811015610d8457888882818110610adc57610adc6147d7565b905060200201359350816001600160a01b031663c7c4fea9600286896040518463ffffffff1660e01b8152600401610b16939291906147ed565b600060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b50505050610b51846119f1565b15610b7b576001878281518110610b6a57610b6a6147d7565b911515602092830291909101909101525b600084815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610bc257610bc2613e08565b6001811115610bd357610bd3613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff1690811115610c6b57610c6b613e08565b6002811115610c7c57610c7c613e08565b81526001820154602082015260029091015460409091015290525090506000610ca482612121565b90506000610cb4848b8b856121eb565b90506001816004811115610cca57610cca613e08565b03610d7557835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d0991908c90600401614817565b600060405180830381600087803b158015610d2357600080fd5b505af1158015610d37573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610d6c92919061482e565b60405180910390a15b50505050806001019050610ac2565b50505050505092915050565b6000828152606b6020526040902060010154610dab8161221e565b610db58383612228565b505050565b603754600390610100900460ff16158015610ddc575060375460ff8083169116105b610e015760405162461bcd60e51b8152600401610df89061488d565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e20600b8361224a565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610ed65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610df8565b610a1c82826122ee565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f18612310565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610f4261236a565b610f4a6123d9565b565b610f54611c64565b610f5d816119f1565b15610f7b576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff1690811115610fba57610fba613e08565b6001811115610fcb57610fcb613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff169081111561106357611063613e08565b600281111561107457611074613e08565b8152600182015460208201526002909101546040918201529152606083015101519192505046146110de576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61110882612121565b82604051610e5a92919061482e565b61111f611c64565b816000819003611142576040516316ee9d3b60e11b815260040160405180910390fd5b60005b818110156111775761116f858583818110611162576111626147d7565b905060a002013385611caa565b600101611145565b5050505050565b603754600290610100900460ff161580156111a0575060375460ff8083169116105b6111bc5760405162461bcd60e51b8152600401610df89061488d565b6037805461ffff191660ff8316176101001790556074546111e8906008906001600160a01b031661224a565b607554611200906003906001600160a01b031661224a565b60775461121890600a906001600160a01b031661224a565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660028111156112d4576112d4613e08565b60028111156112e5576112e5613e08565b815290546001600160a01b0361010090910481166020928301529082015191925016610a0357604051631b79f53b60e21b815260040160405180910390fd5b61132c612310565b600083900361134e576040516316ee9d3b60e11b815260040160405180910390fd5b61135a8484848461242b565b50505050565b60008061136b612310565b611375848461250e565b915091505b9250929050565b600061139361138e612598565b612605565b905090565b607160209081526000918252604091829020805460018201548451606080820187526002808601546001600160a01b03908116845260038701548116848901526004870154848a015288518084018a526005880154821681526006880154909116978101979097526007860154878901528751918201909752600885018054949760ff94851697939693959394929391928492169081111561143c5761143c613e08565b600281111561144d5761144d613e08565b815260200160018201548152602001600282015481525050905085565b61147261236a565b610f4a61263b565b611482612310565b61148b81612678565b610a1c828261224a565b6000828152606c60205260408120610f0990836126ae565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff16158080156114f85750603754600160ff909116105b806115125750303b158015611512575060375460ff166001145b61152e5760405162461bcd60e51b8152600401610df89061488d565b6037805460ff191660011790558015611551576037805461ff0019166101001790555b61155c60008d6126ba565b6115668b8b6126c4565b611570898961250e565b506000905061157f86806148db565b905011156115d1576115b261159486806148db565b6115a160208901896148db565b6115ab89806148db565b8989612754565b6115d16115bf86806148db565b6115cc60208801886148db565b61242b565b8015611617576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b606061162f611c64565b611637611d79565b81806001600160401b03811115611650576116506141f9565b604051908082528060200260200182016040528015611679578160200160208202803683370190505b5091506000611686611381565b9050611690613bc0565b60005b83811015611739578686828181106116ad576116ad6147d7565b905061016002018036038101906116c49190614746565b915060026040808401518101516000908152606f6020908152828220865183529052205460ff1660048111156116fc576116fc613e08565b03611726576001858281518110611715576117156147d7565b911515602092830291909101909101525b611731823385611e1a565b600101611693565b5050505092915050565b61174b612310565b610a1c82826126c4565b6000818152606c60205260408120610a0390612970565b6000828152606b60205260409020600101546117878161221e565b610db583836122ee565b600061179b612598565b6001546117a8919061493a565b6002546117b5908461493a565b101592915050565b6117c5612310565b60008790036117f5576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6118058888888888888888612754565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561184657611846613e08565b60ff1681526020810191909152604001600020546001600160a01b0316905080611885578160405163409140df60e11b8152600401610df89190614951565b919050565b6060816001600160401b038111156118a4576118a46141f9565b6040519080825280602002602001820160405280156118d757816020015b60608152602001906001900390816118c25790505b50905060005b828110156119e957600085815260726020526040812090858584818110611906576119066147d7565b905060200201602081019061191b9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002080546119469061496b565b80601f01602080910402602001604051908101604052809291908181526020018280546119729061496b565b80156119bf5780601f10611994576101008083540402835291602001916119bf565b820191906000526020600020905b8154815290600101906020018083116119a257829003601f168201915b50505050508282815181106119d6576119d66147d7565b60209081029190910101526001016118dd565b509392505050565b6000600260008381526070602052604090205460ff166004811115611a1857611a18613e08565b1492915050565b611a27611c64565b611a2f611d79565b33838015801590611a3f57508083145b611a6a576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6000611a74611381565b9050600080611a83600361180f565b905060005b84811015611c0e57898982818110611aa257611aa26147d7565b905060200201359250878782818110611abd57611abd6147d7565b9050602002810190611acf919061499f565b60008581526072602090815260408083206001600160a01b038c168452909152902091611afd919083614a35565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611b2f9060019087908b906004016147ed565b600060405180830381600087803b158015611b4957600080fd5b505af1158015611b5d573d6000803e3d6000fd5b50505060008481526076602052604081209150611b7c828988886121eb565b90506001816004811115611b9257611b92613e08565b03611c0457815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611bd1906001908990600401614817565b600060405180830381600087803b158015611beb57600080fd5b505af1158015611bff573d6000803e3d6000fd5b505050505b5050600101611a88565b50505050505050505050565b60006001600160e01b03198216635a05180f60e01b1480610a035750610a038261297a565b60006001600160e01b03198216630271189760e51b1480610a035750610a0382611c1a565b60005460ff1615610f4a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610df8565b611cc4611cbf36859003850160408601614af4565b6129af565b611ccd836129f3565b6000611ce8611ce26040860160208701613dc9565b83611280565b80519091506002811115611cfe57611cfe613e08565b611d0e6060860160408701614b10565b6002811115611d1f57611d1f613e08565b14611d3c5760405162035e2b60ea1b815260040160405180910390fd5b611d6983611d506040870160208801613dc9565b611d6236889003880160408901614af4565b9190612a71565b6111778483858460200151612bfc565b611d83600b61180f565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ded9190614b2b565b610f4a576000356001600160e01b0319166006604051620f948f60ea1b8152600401610df8929190614b4d565b82516080840151611e2a906129af565b600084602001516001811115611e4257611e42613e08565b14611e605760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611eae576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b6000611eca856060015160200151866040015160400151611280565b6080860151519091506002811115611ee457611ee4613e08565b81516002811115611ef757611ef7613e08565b148015611f2157508460400151602001516001600160a01b031681602001516001600160a01b0316145b611f3e5760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f6020908152828220858352905290812090611f6887612121565b90506000611f78838888856121eb565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b645985604051611fbf91815260200190565b60405180910390a46000611fd3600361180f565b90506001826004811115611fe957611fe9613e08565b036120b357835460ff191660021784556060890151805160209091015160808b01516120189290916000612d8e565b885160405163114fc47560e11b81526001600160a01b0383169163229f88ea9161204791600091600401614817565b600060405180830381600087803b15801561206157600080fd5b505af1158015612075573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524838a6040516120aa92919061482e565b60405180910390a15b885160405163c7c4fea960e01b81526001600160a01b0383169163c7c4fea9916120e4916000918d906004016147ed565b600060405180830381600087803b1580156120fe57600080fd5b505af1158015612112573d6000803e3d6000fd5b50505050505050505050505050565b6000806121318360400151612fa7565b905060006121428460600151612fa7565b905060006121968560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b60006121f8858584612fef565b600061220486846130a5565b9050612212868583866131a9565b9150505b949350505050565b610a5081336131f5565b6122328282613259565b6000828152606c60205260409020610db590826132df565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561228057612280613e08565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156122c1576122c1613e08565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6122f882826132f4565b6000828152606c60205260409020610db5908261335b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806123ac57506005546001600160a01b031633145b610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b6123e1613370565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b828114612459576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b838110156124ca57828282818110612476576124766147d7565b9050602002013560386000878785818110612493576124936147d7565b90506020020160208101906124a89190613dc9565b6001600160a01b0316815260208101919091526040016000205560010161245c565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da848484846040516125009493929190614bf6565b60405180910390a150505050565b600080828411156125325760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba910160405180910390a49250929050565b60006125a4600b61180f565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113939190614c28565b600060025460016002548460015461261d919061493a565b6126279190614c41565b6126319190614c54565b610a039190614c67565b612643611c64565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861240e3390565b806001600160a01b03163b600003610a5057604051630bfc64a360e21b81526001600160a01b0382166004820152602401610df8565b6000610f0983836133b9565b610a1c8282612228565b808211156126f3576000356001600160e01b0319166040516387f6f09560e01b8152600401610df89190614415565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b868514801561276257508683145b61278d576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b87811015612920578686828181106127aa576127aa6147d7565b90506020020160208101906127bf9190613dc9565b607360008b8b858181106127d5576127d56147d7565b90506020020160208101906127ea9190613dc9565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087878581811061281e5761281e6147d7565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555082828281811061286c5761286c6147d7565b90506020020160208101906128819190614b10565b607360008b8b85818110612897576128976147d7565b90506020020160208101906128ac9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008787858181106128e0576128e06147d7565b60209081029290920135835250810191909152604001600020805460ff1916600183600281111561291357612913613e08565b0217905550600101612790565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401888888888888888860405161295e989796959493929190614c89565b60405180910390a15050505050505050565b6000610a03825490565b60006001600160e01b03198216637965db0b60e01b1480610a0357506301ffc9a760e01b6001600160e01b0319831614610a03565b6129b8816133e3565b806129c757506129c78161341a565b806129d657506129d681613442565b610a505760405163034992a760e51b815260040160405180910390fd5b6000612a056060830160408401614b10565b6002811115612a1657612a16613e08565b148015612a53575060386000612a326040840160208501613dc9565b6001600160a01b031681526020810191909152604001600020546080820135105b15610a5057604051636eff4a8560e11b815260040160405180910390fd5b600060608185516002811115612a8957612a89613e08565b03612b645760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612af09190614d18565b6000604051808303816000865af19150503d8060008114612b2d576040519150601f19603f3d011682016040523d82523d6000602084013e612b32565b606091505b509092509050818015612b5d575080511580612b5d575080806020019051810190612b5d9190614b2b565b9150612bd6565b600185516002811115612b7957612b79613e08565b03612b8e57612b5d838530886020015161346b565b600285516002811115612ba357612ba3613e08565b03612bbd57612b5d83853088602001518960400151613519565b6040516361e411a760e11b815260040160405180910390fd5b816111775784843085604051639d2e4c6760e01b8152600401610df89493929190614d34565b606e805460009182612c0d83614d6a565b9091555090506000612c3484838588612c2b368c90038c018c614d83565b939291906135cd565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612c7357612c73613e08565b02179055506040828101518051600280850180546001600160a01b039384166001600160a01b03199182161790915560208085015160038801805491861691841691909117905593850151600487015560608701518051600588018054918616918416919091179055938401516006870180549190941691161790915591015160078301556080830151805160088401805492939092839160ff19909116906001908490811115612d2657612d26613e08565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612d6e82612121565b82604051612d7d92919061482e565b60405180910390a150949350505050565b806001600160a01b0316826001600160a01b031603612e3b5760408085015190516001600160a01b0385169180156108fc02916000818181858888f19350505050612e3657806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e1257600080fd5b505af1158015612e26573d6000803e3d6000fd5b5050505050612e36848484613639565b61135a565b600084516002811115612e5057612e50613e08565b03612f16576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015612e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec09190614c28565b90508460400151811015612f0557612ee88330838860400151612ee39190614c54565b6136b8565b612f0557604051632f739fff60e11b815260040160405180910390fd5b612f10858585613639565b5061135a565b600184516002811115612f2b57612f2b613e08565b03612f5c57612f3f8284866020015161375d565b612e365760405163c8e3a09f60e01b815260040160405180910390fd5b600284516002811115612f7157612f71613e08565b03612bbd57612f8a828486602001518760400151613784565b612e36576040516334b471a760e21b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b60008360030154118015613007575042836003015411155b1561301857825460ff191660041783555b6001600160a01b03821660009081526002840160205260409020541561305c5760405163025fd59560e41b81526001600160a01b0383166004820152602401610df8565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b60008060006130b4600b61180f565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa1580156130f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131199190810190614e3e565b81519194509250905060005b818110156117395785876002016000868481518110613146576131466147d7565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036131a157828181518110613186576131866147d7565b60200260200101516bffffffffffffffffffffffff16850194505b600101613125565b60008383101580156131d057506000855460ff1660048111156131ce576131ce613e08565b145b156131e857845460ff19166001908117865585018290555b5050915460ff1692915050565b6131ff82826114ad565b610a1c57613217816001600160a01b031660146137ad565b6132228360206137ad565b604051602001613233929190614f36565b60408051601f198184030181529082905262461bcd60e51b8252610df891600401614fab565b61326382826114ad565b610a1c576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561329b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f09836001600160a01b038416613948565b6132fe82826114ad565b15610a1c576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f09836001600160a01b038416613997565b60005460ff16610f4a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610df8565b60008260000182815481106133d0576133d06147d7565b9060005260206000200154905092915050565b600080825160028111156133f9576133f9613e08565b14801561340a575060008260400151115b8015610a03575050602001511590565b600060018251600281111561343157613431613e08565b148015610a03575050604001511590565b600060028251600281111561345957613459613e08565b148015610a0357505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928716916134cb91614d18565b6000604051808303816000865af19150503d8060008114613508576040519150601f19603f3d011682016040523d82523d6000602084013e61350d565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b0387169061354990879087908790879060448101614fbe565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b1790525161357e9190614d18565b6000604051808303816000865af19150503d80600081146135bb576040519150601f19603f3d011682016040523d82523d6000602084013e6135c0565b606091505b5090979650505050505050565b6135d5613bc0565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b6000808451600281111561364f5761364f613e08565b0361366a5761366382848660400151613a8a565b9050613694565b60018451600281111561367f5761367f613e08565b03612bbd57613663823085876020015161346b565b8061135a578383836040516341bd7d9160e11b8152600401610df893929190614ff8565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b179052915160009286169161371091614d18565b6000604051808303816000865af19150503d806000811461374d576040519150601f19603f3d011682016040523d82523d6000602084013e613752565b606091505b509095945050505050565b600061376b8430858561346b565b905080610f095761377d8484846136b8565b9050610f09565b60006137938530868686613519565b905080612216576137a685858585613b5d565b9050612216565b606060006137bc83600261493a565b6137c7906002614c41565b6001600160401b038111156137de576137de6141f9565b6040519080825280601f01601f191660200182016040528015613808576020820181803683370190505b509050600360fc1b81600081518110613823576138236147d7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613852576138526147d7565b60200101906001600160f81b031916908160001a905350600061387684600261493a565b613881906001614c41565b90505b60018111156138f9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106138b5576138b56147d7565b1a60f81b8282815181106138cb576138cb6147d7565b60200101906001600160f81b031916908160001a90535060049490941c936138f281615028565b9050613884565b508315610f095760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610df8565b600081815260018301602052604081205461398f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a03565b506000610a03565b60008181526001830160205260408120548015613a805760006139bb600183614c54565b85549091506000906139cf90600190614c54565b9050818114613a345760008660000182815481106139ef576139ef6147d7565b9060005260206000200154905080876000018481548110613a1257613a126147d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613a4557613a4561503f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a03565b6000915050610a03565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613ae79190614d18565b6000604051808303816000865af19150503d8060008114613b24576040519150601f19603f3d011682016040523d82523d6000602084013e613b29565b606091505b509092509050818015613b54575080511580613b54575080806020019051810190613b549190614b2b565b95945050505050565b604080516000808252602082019092526001600160a01b03861690613b8b9086908690869060448101615055565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b179052516134cb9190614d18565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613c3f57600080fd5b81356001600160e01b031981168114610f0957600080fd5b60008082840360c0811215613c6b57600080fd5b60a0811215613c7957600080fd5b50919360a08501359350915050565b60006101608284031215613c9b57600080fd5b50919050565b60008083601f840112613cb357600080fd5b5081356001600160401b03811115613cca57600080fd5b6020830191508360208260051b850101111561137a57600080fd5b60008060208385031215613cf857600080fd5b82356001600160401b03811115613d0e57600080fd5b613d1a85828601613ca1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561350d578351151583529284019291840191600101613d42565b600060208284031215613d7257600080fd5b5035919050565b6001600160a01b0381168114610a5057600080fd5b803561188581613d79565b60008060408385031215613dac57600080fd5b823591506020830135613dbe81613d79565b809150509250929050565b600060208284031215613ddb57600080fd5b8135610f0981613d79565b60008060408385031215613df957600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6080810160058610613e3257613e32613e08565b9481526020810193909352604083019190915260609091015290565b600080600060408486031215613e6357600080fd5b83356001600160401b0380821115613e7a57600080fd5b818601915086601f830112613e8e57600080fd5b813581811115613e9d57600080fd5b87602060a083028501011115613eb257600080fd5b6020928301989097509590910135949350505050565b60008060408385031215613edb57600080fd5b8235613ee681613d79565b946020939093013593505050565b60038110610a5057610a50613e08565b81516040820190613f1481613ef4565b82526020928301516001600160a01b0316929091019190915290565b60008060008060408587031215613f4657600080fd5b84356001600160401b0380821115613f5d57600080fd5b613f6988838901613ca1565b90965094506020870135915080821115613f8257600080fd5b50613f8f87828801613ca1565b95989497509550505050565b60028110613fab57613fab613e08565b9052565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b8051613fe181613ef4565b825260208181015190830152604090810151910152565b858152610160810161400d6020830187613f9b565b61401a6040830186613faf565b61402760a0830185613faf565b614035610100830184613fd6565b9695505050505050565b80356010811061188557600080fd5b6000806040838503121561406157600080fd5b61406a8361403f565b91506020830135613dbe81613d79565b8060408101831015610a0357600080fd5b60008060008060008060008060008060006101208c8e0312156140ad57600080fd5b6140b68c613d8e565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e013511156140ed57600080fd5b6140fd8e60a08f01358f01613ca1565b909750955060c08d013581101561411357600080fd5b6141238e60c08f01358f0161407a565b94508060e08e0135111561413657600080fd5b6141468e60e08f01358f0161407a565b9350806101008e0135111561415a57600080fd5b5061416c8d6101008e01358e01613ca1565b81935080925050509295989b509295989b9093969950565b6000806020838503121561419757600080fd5b82356001600160401b03808211156141ae57600080fd5b818501915085601f8301126141c257600080fd5b8135818111156141d157600080fd5b866020610160830285010111156141e757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614231576142316141f9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561425f5761425f6141f9565b604052919050565b60006001600160401b03821115614280576142806141f9565b5060051b60200190565b600082601f83011261429b57600080fd5b813560206142b06142ab83614267565b614237565b8083825260208201915060208460051b8701019350868411156142d257600080fd5b602086015b848110156142ee57803583529183019183016142d7565b509695505050505050565b600082601f83011261430a57600080fd5b81356001600160401b03811115614323576143236141f9565b614336601f8201601f1916602001614237565b81815284602083860101111561434b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561438057600080fd5b853561438b81613d79565b9450602086013561439b81613d79565b935060408601356001600160401b03808211156143b757600080fd5b6143c389838a0161428a565b945060608801359150808211156143d957600080fd5b6143e589838a0161428a565b935060808801359150808211156143fb57600080fd5b50614408888289016142f9565b9150509295509295909350565b6001600160e01b031991909116815260200190565b6000806000806000806000806080898b03121561444657600080fd5b88356001600160401b038082111561445d57600080fd5b6144698c838d01613ca1565b909a50985060208b013591508082111561448257600080fd5b61448e8c838d01613ca1565b909850965060408b01359150808211156144a757600080fd5b6144b38c838d01613ca1565b909650945060608b01359150808211156144cc57600080fd5b506144d98b828c01613ca1565b999c989b5096995094979396929594505050565b6000602082840312156144ff57600080fd5b610f098261403f565b60008060006040848603121561451d57600080fd5b8335925060208401356001600160401b0381111561453a57600080fd5b61454686828701613ca1565b9497909650939450505050565b60005b8381101561456e578181015183820152602001614556565b50506000910152565b6000815180845261458f816020860160208601614553565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156145fa57603f198886030184526145e8858351614577565b945092850192908501906001016145cc565b5092979650505050505050565b600080600080600060a0868803121561461f57600080fd5b853561462a81613d79565b9450602086013561463a81613d79565b9350604086013592506060860135915060808601356001600160401b0381111561466357600080fd5b614408888289016142f9565b60008060006060848603121561468457600080fd5b8335925060208401359150604084013561469d81613d79565b809150509250925092565b6000606082840312156146ba57600080fd5b6146c261420f565b905081356146cf81613d79565b815260208201356146df81613d79565b806020830152506040820135604082015292915050565b80356003811061188557600080fd5b60006060828403121561471757600080fd5b61471f61420f565b905061472a826146f6565b8152602082013560208201526040820135604082015292915050565b6000610160828403121561475957600080fd5b60405160a081018181106001600160401b038211171561477b5761477b6141f9565b6040528235815260208301356002811061479457600080fd5b60208201526147a684604085016146a8565b60408201526147b88460a085016146a8565b60608201526147cb846101008501614705565b60808201529392505050565b634e487b7160e01b600052603260045260246000fd5b606081016147fa85613ef4565b93815260208101929092526001600160a01b031660409091015290565b6040810161482484613ef4565b9281526020015290565b6000610180820190508382528251602083015260208301516148536040840182613f9b565b5060408301516148666060840182613faf565b50606083015161487960c0840182613faf565b5060808301516119e9610120840182613fd6565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e198436030181126148f257600080fd5b8301803591506001600160401b0382111561490c57600080fd5b6020019150600581901b360382131561137a57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a0357610a03614924565b602081016010831061496557614965613e08565b91905290565b600181811c9082168061497f57607f821691505b602082108103613c9b57634e487b7160e01b600052602260045260246000fd5b6000808335601e198436030181126149b657600080fd5b8301803591506001600160401b038211156149d057600080fd5b60200191503681900382131561137a57600080fd5b601f821115610db5576000816000526020600020601f850160051c81016020861015614a0e5750805b601f850160051c820191505b81811015614a2d57828155600101614a1a565b505050505050565b6001600160401b03831115614a4c57614a4c6141f9565b614a6083614a5a835461496b565b836149e5565b6000601f841160018114614a945760008515614a7c5750838201355b600019600387901b1c1916600186901b178355611177565b600083815260209020601f19861690835b82811015614ac55786850135825560209485019460019092019101614aa5565b5086821015614ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060608284031215614b0657600080fd5b610f098383614705565b600060208284031215614b2257600080fd5b610f09826146f6565b600060208284031215614b3d57600080fd5b81518015158114610f0957600080fd5b6001600160e01b03198316815260408101600b8310614b6e57614b6e613e08565b8260208301529392505050565b8183526000602080850194508260005b85811015614bb9578135614b9e81613d79565b6001600160a01b031687529582019590820190600101614b8b565b509495945050505050565b81835260006001600160fb1b03831115614bdd57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000614c0a604083018688614b7b565b8281036020840152614c1d818587614bc4565b979650505050505050565b600060208284031215614c3a57600080fd5b5051919050565b80820180821115610a0357610a03614924565b81810381811115610a0357610a03614924565b600082614c8457634e487b7160e01b600052601260045260246000fd5b500490565b608081526000614c9d608083018a8c614b7b565b60208382036020850152614cb2828a8c614b7b565b91508382036040850152614cc782888a614bc4565b848103606086015285815286925060200160005b86811015614d0757614cec846146f6565b614cf581613ef4565b82529282019290820190600101614cdb565b509c9b505050505050505050505050565b60008251614d2a818460208701614553565b9190910192915050565b60c08101614d428287613fd6565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b600060018201614d7c57614d7c614924565b5060010190565b600060a08284031215614d9557600080fd5b614d9d61420f565b8235614da881613d79565b81526020830135614db881613d79565b6020820152614dca8460408501614705565b60408201529392505050565b600082601f830112614de757600080fd5b81516020614df76142ab83614267565b8083825260208201915060208460051b870101935086841115614e1957600080fd5b602086015b848110156142ee578051614e3181613d79565b8352918301918301614e1e565b600080600060608486031215614e5357600080fd5b83516001600160401b0380821115614e6a57600080fd5b614e7687838801614dd6565b9450602091508186015181811115614e8d57600080fd5b614e9988828901614dd6565b945050604086015181811115614eae57600080fd5b86019050601f81018713614ec157600080fd5b8051614ecf6142ab82614267565b81815260059190911b82018301908381019089831115614eee57600080fd5b928401925b82841015614f275783516bffffffffffffffffffffffff81168114614f185760008081fd5b82529284019290840190614ef3565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f6e816017850160208801614553565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614f9f816028840160208801614553565b01602801949350505050565b602081526000610f096020830184614577565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614c1d90830184614577565b60a081016150068286613fd6565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161503757615037614924565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0385168152836020820152826040820152608060608201526000614035608083018461457756fea2646970667358221220f2c96cbb22626006ee11ff90975b91b23886e548ed7a61504409d1948b356f0f64736f6c63430008170033", + "nonce": "0x2f12b" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x8fcf4", + "value": "0x0", + "data": "0x663ac01100000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000010a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x262" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xb033ba62ec622dc54d0abfe0254e79692147ca26", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x4956e", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x65" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x10cf46", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x5a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x1467e2ab29e7b30da58b2651b5e1385992f17526838467aced5d2eab819d5688", + "transactionIndex": "0x0", + "blockHash": "0xffec7c7da845eccb01d1004dafa29ff8bc2fd666e8240677855015b16d12e2c0", + "blockNumber": "0x1949658", + "from": "0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F", + "to": "0x53Ea388CB72081A3a397114a43741e7987815896", + "cumulativeGasUsed": "0x35243", + "gasUsed": "0x35243", + "contractAddress": null, + "logs": [ + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x00000000000000000000000000000000000000000000000000000000000007e5", + "0x000000000000000000000000000000000000000000000000000000000000002d", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xffec7c7da845eccb01d1004dafa29ff8bc2fd666e8240677855015b16d12e2c0", + "blockNumber": "0x1949658", + "transactionHash": "0x1467e2ab29e7b30da58b2651b5e1385992f17526838467aced5d2eab819d5688", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c", + "0x00000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0xffec7c7da845eccb01d1004dafa29ff8bc2fd666e8240677855015b16d12e2c0", + "blockNumber": "0x1949658", + "transactionHash": "0x1467e2ab29e7b30da58b2651b5e1385992f17526838467aced5d2eab819d5688", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000010000000000100000000000000000000000000000080000000020000000002000000004000000000000000000000000000000000400000000000000000004000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000040000000000000000000000000000000000001000000000000000000000000008000000000000000000400000000000010000002000000000000000000000000000800000000000000000000000000000000400000000000000000004000000000000000080000000000000000000004000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0xa58405e67e2e6558de328d173bce7db193836183c1303351bf95c59fbcb7d78f", + "transactionIndex": "0x1", + "blockHash": "0x6427eebf0bf5f2ad49256ce4267f797fdd1b0e0fd99f968bc484311ce6fdc0d3", + "blockNumber": "0x194965a", + "from": "0x087D08e3ba42e64E3948962dd1371F906D1278b9", + "to": "0x53Ea388CB72081A3a397114a43741e7987815896", + "cumulativeGasUsed": "0x45b13", + "gasUsed": "0x1f54a", + "contractAddress": null, + "logs": [ + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c", + "0x000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b9" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0x6427eebf0bf5f2ad49256ce4267f797fdd1b0e0fd99f968bc484311ce6fdc0d3", + "blockNumber": "0x194965a", + "transactionHash": "0xa58405e67e2e6558de328d173bce7db193836183c1303351bf95c59fbcb7d78f", + "transactionIndex": "0x1", + "logIndex": "0x4", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000020000000000000000004000000000000400000000000000000000000000000000000000004000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000800000000000400000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000080000000000000000000004000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1713250237, + "chain": 2021, + "multi": false, + "commit": "299b38b" +} \ No newline at end of file diff --git a/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713251065.json b/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713251065.json new file mode 100644 index 00000000..84a624ba --- /dev/null +++ b/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713251065.json @@ -0,0 +1,348 @@ +{ + "transactions": [ + { + "hash": "0xbefcfe4868f0c8e4482deaa0f523cff58ea8d18dca1e399e3c980039786e71d8", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x52ec2e6bbce45afff8955da6410bb13812f4289f", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x77916", + "value": "0x0", + "data": "0x663ac01100000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x47" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xbb3277760b381cd77bb80507d23472da400d1a1d75cb6b75d2a9f441964f932f", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x467e6", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x59" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x06f8af58f656b507918d91b0b6f8b89bfcc556f9", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x467e6", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x0" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xe1100401454b5f850b09f3b92ce7f071c5f1cef4", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x5cd02", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x0" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeReward", + "contractAddress": "0x836D911C7de3edfc953030B9ABc4b2B18B2db8b9", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2b9610", + "value": "0x0", + "data": "0x60a060405230608052610010610015565b6100d5565b600054610100900460ff16156100815760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100d3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6080516118666100f06000396000610bc701526118666000f3fe6080604052600436106100dd5760003560e01c80638f7c34a21161007f578063ad43663e11610059578063ad43663e14610261578063b77f2a4014610276578063de981f1b14610296578063f5dbc4ee146102ce57600080fd5b80638f7c34a21461021957806395b6ef0c1461022e578063a6bd67881461024157600080fd5b80633b154455116100bb5780633b154455146101c757806359f778df146101dc5780635cd8a76b146101e4578063865e6fd3146101f957600080fd5b806306032d74146100e257806333b3ea6c1461018257806334087952146101a4575b600080fd5b3480156100ee57600080fd5b506101626100fd366004611335565b604080518082018252600080825260209182018190526001600160a01b039390931683527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a815291819020815180830190925280548252600101549181019190915290565b604080518251815260209283015192810192909252015b60405180910390f35b34801561018e57600080fd5b506101a261019d366004611352565b6102e3565b005b3480156101b057600080fd5b506101b9610399565b604051908152602001610179565b3480156101d357600080fd5b506101a26103c8565b6101a26104bb565b3480156101f057600080fd5b506101a26104c5565b34801561020557600080fd5b506101a261021436600461137a565b610593565b34801561022557600080fd5b506101b96105ae565b6101a261023c3660046113b1565b6105c6565b34801561024d57600080fd5b506101a261025c366004611352565b6106e9565b34801561026d57600080fd5b506101b96106fd565b34801561028257600080fd5b506101a2610291366004611352565b610727565b3480156102a257600080fd5b506102b66102b136600461142a565b61073d565b6040516001600160a01b039091168152602001610179565b3480156102da57600080fd5b506101b96107b8565b6102ec336107e2565b61031c57604051638f47e7e360e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b6000610328600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103899190611445565b90506103958183610860565b5050565b60006103c37f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f45490565b905090565b60046103d381610acd565b6000196103de6105ae565b146104205760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610313565b6104ac600161042f600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104909190611445565b61049a9190611474565b60008051602061181183398151915255565b6104b860046000610b19565b50565b6104c3610bbd565b565b600054600290610100900460ff161580156104e7575060005460ff8083169116105b6105035760405162461bcd60e51b815260040161031390611487565b6000805461ffff191660ff8316176101001790556105417faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c60059055565b61054e60016104906105ae565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b61059b610c9e565b6105a481610cf8565b6103958282610b19565b60006103c36000805160206118118339815191525490565b600054610100900460ff16158080156105e65750600054600160ff909116105b806106005750303b158015610600575060005460ff166001145b61061c5760405162461bcd60e51b815260040161031390611487565b6000805460ff19166001179055801561063f576000805461ff0019166101001790555b61064a600b88610b19565b610655600387610b19565b610660600c86610b19565b61066b600885610b19565b610676600484610b19565b6000196000805160206118118339815191525561069282610d2e565b61069a610bbd565b80156106e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600b6106f481610acd565b61039582610d2e565b60006103c37f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec739105490565b600361073281610acd565b610395826000610860565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610774576107746114d5565b60ff1681526020810191909152604001600020546001600160a01b03169050806107b3578160405163409140df60e11b815260040161031391906114ff565b919050565b60006103c37f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b60006107ee600b61073d565b604051635a02d57960e11b81526001600160a01b038481166004830152919091169063b405aaf290602401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a919061150d565b92915050565b600061086a6105ae565b9050816000036108cc5760008184111561089757600161088a8386611474565b6108949190611474565b90505b6108c8816108c37faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c5490565b610d87565b9250505b6108d7838383610d9f565b60006108e3600b61073d565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610920573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610948919081019061159a565b90506000610956600361073d565b905060005b84811015610ac55761096c84611639565b9350610abd83836001600160a01b031663f67e815287876040518363ffffffff1660e01b81526004016109a0929190611697565b600060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109e591908101906116b0565b60405163692f6a6360e11b8152600481018890526001600160a01b0386169063d25ed4c690602401602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190611445565b604051637153af9b60e11b8152600481018990526001600160a01b0387169063e2a75f3690602401602060405180830381865afa158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190611445565b88610e33565b60010161095b565b505050505050565b610ad68161073d565b6001600160a01b0316336001600160a01b0316146104b8576000356001600160e01b03191681336040516320e0f98d60e21b815260040161031393929190611736565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610b4f57610b4f6114d5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610b9057610b906114d5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c1457604051638f47e7e360e01b81526001600160e01b0319600035166004820152602401610313565b337f7ae161a1f0ef2537f5ff1957021a50412e72abdc6a941a77d99361e91e7f3c3d610c5e7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b604080519182523460208301520160405180910390a26104b87f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c6434610f8a565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146104c3576000356001600160e01b0319166001604051620f948f60ea1b815260040161031392919061176d565b806001600160a01b03163b6000036104b857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610313565b610d577f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910829055565b6040518181527f9b40b647582311cc8f5f7d27e7ce206d126605d1625b8299b7edaeefd869ef2590602001610588565b6000818310610d965781610d98565b825b9392505050565b81600003610dc05760405163799ffe0d60e01b815260040160405180910390fd5b610dcb81600161179b565b8311610df45760405163425a5b1f60e01b81526004810184905260248101829052604401610313565b610dfe828261179b565b8311610e2e57604051630931302b60e31b8152600481018490526024810182905260448101839052606401610313565b505050565b845184518114610e64576040516306b5667560e21b81526001600160e01b0319600035166004820152602401610313565b6000610e6e6106fd565b90506000610e7b88610fa1565b90506000610e8a87878a61101f565b90506000806000805b87811015610f3957610edc8589898f8581518110610eb357610eb36117ae565b60200260200101518f8e8c8881518110610ecf57610ecf6117ae565b6020026020010151611072565b80945081955050506000610f0b8a8f8481518110610efc57610efc6117ae565b60200260200101518787611093565b90508380610f17575080155b610f215784610f24565b60005b610f2e908461179b565b925050600101610e93565b50610f647f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f482610f8a565b50610f7c600080516020611811833981519152899055565b505050505050505050505050565b600061085a83610f9a85856111f9565b9250829055565b6060610fad600c61073d565b6001600160a01b0316635311153b836040518263ffffffff1660e01b8152600401610fd891906117c4565b6000604051808303816000875af1158015610ff7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261085a91908101906116b0565b60008061102d858585611218565b90508061105e576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a15b801580611069575084155b95945050505050565b6000828210156110858989898989611295565b915097509795505050505050565b6001600160a01b03831660009081527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a60205260408120821561113857838160010160008282546110e4919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fb3d061c3ef3991b0d4b09f4c8b551d137c3d1e014cf5326462d3d1f6a8dfb9c291015b60405180910390a260009150506111f1565b611144858560006112c0565b156111b0578381600001600082825461115d919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fbab0baccb39371d4d5206b519fe58d21cae9cdd63a1d1b5146ecdf405fd93152910160405180910390a260019150506111f1565b604080516001600160a01b03871681526020810186905287917f74b217634c5a7790ce69770c5e35019970453d4da3973769e7d6cdb7ce6816a19101611126565b949350505050565b815481018181101561085a57634e487b7160005260116020526024601cfd5b8051600190600090815b8181101561127d578585828151811061123d5761123d6117ae565b60200260200101511115611254576000935061127d565b848181518110611266576112666117ae565b602002602001015183019250806001019050611222565b5082801561128b5750858211155b9695505050505050565b6000856112b657816112a784866117d7565b6112b191906117ee565b61128b565b61128b85856117ee565b6000836001600160a01b0316838390604051600060405180830381858888f193505050503d8060008114611310576040519150601f19603f3d011682016040523d82523d6000602084013e611315565b606091505b509095945050505050565b6001600160a01b03811681146104b857600080fd5b60006020828403121561134757600080fd5b8135610d9881611320565b60006020828403121561136457600080fd5b5035919050565b8035601081106107b357600080fd5b6000806040838503121561138d57600080fd5b6113968361136b565b915060208301356113a681611320565b809150509250929050565b60008060008060008060c087890312156113ca57600080fd5b86356113d581611320565b955060208701356113e581611320565b945060408701356113f581611320565b9350606087013561140581611320565b9250608087013561141581611320565b8092505060a087013590509295509295509295565b60006020828403121561143c57600080fd5b610d988261136b565b60006020828403121561145757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561085a5761085a61145e565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b601081106114fb576114fb6114d5565b9052565b6020810161085a82846114eb565b60006020828403121561151f57600080fd5b81518015158114610d9857600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561156e5761156e61152f565b604052919050565b600067ffffffffffffffff8211156115905761159061152f565b5060051b60200190565b600060208083850312156115ad57600080fd5b825167ffffffffffffffff8111156115c457600080fd5b8301601f810185136115d557600080fd5b80516115e86115e382611576565b611545565b81815260059190911b8201830190838101908783111561160757600080fd5b928401925b8284101561162e57835161161f81611320565b8252928401929084019061160c565b979650505050505050565b60006001820161164b5761164b61145e565b5060010190565b60008151808452602080850194506020840160005b8381101561168c5781516001600160a01b031687529582019590820190600101611667565b509495945050505050565b8281526040602082015260006111f16040830184611652565b600060208083850312156116c357600080fd5b825167ffffffffffffffff8111156116da57600080fd5b8301601f810185136116eb57600080fd5b80516116f96115e382611576565b81815260059190911b8201830190838101908783111561171857600080fd5b928401925b8284101561162e5783518252928401929084019061171d565b6001600160e01b0319841681526060810161175460208301856114eb565b6001600160a01b03929092166040919091015292915050565b6001600160e01b03198316815260408101600b831061178e5761178e6114d5565b8260208301529392505050565b8082018082111561085a5761085a61145e565b634e487b7160e01b600052603260045260246000fd5b602081526000610d986020830184611652565b808202811582820484141761085a5761085a61145e565b60008261180b57634e487b7160e01b600052601260045260246000fd5b50049056fe2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619a2646970667358221220cd237faf10660b4bf88f4dcc843cf0b3d4cce585ad7f99199ed3924ea16b8dfd64736f6c63430008170033", + "nonce": "0x2f127" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeSlash", + "contractAddress": "0x7bEB0f3fC4002C4542015cFa9023dEE1A9EC9400", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x26b9de", + "value": "0x0", + "data": "0x608060405261000c610011565b6100d1565b600054610100900460ff161561007d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100cf576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611583806100e06000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639c2f445911610097578063de981f1b11610066578063de981f1b146101fd578063f8c8765e14610228578063f9f608731461023b578063fbb2f1941461024357600080fd5b80639c2f4459146101d2578063c48549de146101da578063d1e1f2f8146101ed578063ddc3f7f6146101f557600080fd5b80635311153b116100d35780635311153b1461016a5780636dda44081461017d578063865e6fd3146101935780638f851d8a146101a657600080fd5b806301ffc9a7146101055780631288810a1461012d5780633b1544551461014d5780634dca592514610157575b600080fd5b610118610113366004610eb7565b610263565b60405190151581526020015b60405180910390f35b61014061013b366004610f2d565b61029a565b6040516101249190610f6f565b610155610382565b005b6101556101653660046110a4565b610462565b610140610178366004610f2d565b6106f9565b610185600181565b604051908152602001610124565b6101556101a136600461118e565b6107d2565b6101b96101b43660046111c1565b6107f1565b6040516001600160e01b03199091168152602001610124565b610185603281565b6101b96101e83660046112ba565b610970565b610185600581565b610185601e81565b61021061020b366004611326565b61098f565b6040516001600160a01b039091168152602001610124565b610155610236366004611341565b610a0a565b610140610b49565b610256610251366004611395565b610b58565b60405161012491906113cd565b60006001600160e01b031982166312c0151560e21b148061029457506001600160e01b031982166301ffc9a760e01b145b92915050565b6060818067ffffffffffffffff8111156102b6576102b6610fb3565b6040519080825280602002602001820160405280156102df578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610311576103116113e7565b905060200201602081019061032691906113fd565b6001600160a01b031681526020810191909152604001600020548451600160801b9091046001600160801b031690859083908110610366576103666113e7565b60209081029190910101526001016102f4565b50505092915050565b600461038d81610b6b565b600019600154146103da5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b60448201526064015b60405180910390fd5b6103e4600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190611418565b610450906001611447565b60015561045f60046000610bb7565b50565b600361046d81610b6b565b8160015481106106f0578360328111156106ee5786518851146104b1576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8751156106ee576104c3868689610c5b565b6104f5576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a16106ee565b60006104ff610cd8565b6040805180820190915260008082526020820181905291925060008051602061152e833981519152918080805b8e518110156106e6578e8181518110610547576105476113e7565b6020908102919091018101516001600160a01b03811660009081528883526040908190208151808301909252546001600160801b038082168352600160801b90910416928101839052965093508b11156106de576105be8e82815181106105b0576105b06113e7565b60200260200101518d610d43565b91506105d9828c87600001516001600160801b03168a610d95565b93506105e5848c610dec565b1561062b576040516001600160801b0394506001600160a01b038416908c907fb32a150b9737190a456d8b2b81dd7d592a799ab2933ea494e44351acd41f835d90600090a35b600082600281111561063f5761063f6113b7565b146106de576001600160801b0384146106a3578a836001600160a01b031683600281111561066f5761066f6113b7565b6040518781527fa0957b65e189f06dfe2b38ff07e89a0df128ba3fcba66c68f8d2615daebc30a99060200160405180910390a45b6001600160a01b038316600090815260208790526040902080546fffffffffffffffffffffffffffffffff19166001600160801b0386161790555b60010161052c565b505050505050505b505b50505050505050565b6060818067ffffffffffffffff81111561071557610715610fb3565b60405190808252806020026020018201604052801561073e578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610770576107706113e7565b905060200201602081019061078591906113fd565b6001600160a01b0316815260208101919091526040016000205484516001600160801b03909116908590839081106107bf576107bf6113e7565b6020908102919091010152600101610753565b6107da610e0e565b6107e381610e6a565b6107ed8282610bb7565b5050565b6000600b6107fe81610b6b565b82518690811461082f576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8060000361084757506347c28ec560e11b9150610966565b60008051602061152e8339815191526000610862600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561089f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c39190611418565b905060005b83811015610957578681815181106108e2576108e26113e7565b60200260200101511561094f57818360008d8d85818110610905576109056113e7565b905060200201602081019061091a91906113fd565b6001600160a01b03168152602081019190915260400160002080546001600160801b03928316600160801b0292169190911790555b6001016108c8565b506347c28ec560e11b94505050505b5095945050505050565b6000600b61097d81610b6b565b50636242a4ef60e11b95945050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156109c6576109c66113b7565b60ff1681526020810191909152604001600020546001600160a01b0316905080610a05578160405163409140df60e11b81526004016103d1919061146e565b919050565b600054610100900460ff1615808015610a2a5750600054600160ff909116105b80610a445750303b158015610a44575060005460ff166001145b610aa75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d1565b6000805460ff191660011790558015610aca576000805461ff0019166101001790555b610ad5600886610bb7565b610ae0600b85610bb7565b610aeb600384610bb7565b610af6600483610bb7565b6000196001558015610b42576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6060610b53610cd8565b905090565b6000610b648383610d43565b9392505050565b610b748161098f565b6001600160a01b0316336001600160a01b03161461045f576000356001600160e01b03191681336040516320e0f98d60e21b81526004016103d19392919061147c565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610bed57610bed6113b7565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610c2e57610c2e6113b7565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b8051600190600090815b81811015610cc05785858281518110610c8057610c806113e7565b60200260200101511115610c975760009350610cc0565b848181518110610ca957610ca96113e7565b602002602001015183019250806001019050610c65565b50828015610cce5750858211155b9695505050505050565b604080516003808252608082019092526060916020820183803683370190505090506001818160ff1681518110610d1157610d116113e7565b6020908102919091010152600581600260ff1681518110610d3457610d346113e7565b60200260200101818152505090565b60008082612710610d5486836114b3565b610d5e91906114c6565b610d6891906114dd565b9050610bb88111610d8a576103e88111610d83576000610d8d565b6001610d8d565b60025b949350505050565b6000610dab610da56001866114b3565b84610ea0565b82866002811115610dbe57610dbe6113b7565b60ff1681518110610dd157610dd16113e7565b6020026020010151610de39190611447565b95945050505050565b6000601e610dfb6001846114b3565b610e0590856114b3565b10159392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610e68576000356001600160e01b0319166001604051620f948f60ea1b81526004016103d19291906114ff565b565b806001600160a01b03163b60000361045f57604051630bfc64a360e21b81526001600160a01b03821660048201526024016103d1565b600081831015610eb05781610b64565b5090919050565b600060208284031215610ec957600080fd5b81356001600160e01b031981168114610b6457600080fd5b60008083601f840112610ef357600080fd5b50813567ffffffffffffffff811115610f0b57600080fd5b6020830191508360208260051b8501011115610f2657600080fd5b9250929050565b60008060208385031215610f4057600080fd5b823567ffffffffffffffff811115610f5757600080fd5b610f6385828601610ee1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610fa757835183529284019291840191600101610f8b565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ff257610ff2610fb3565b604052919050565b600067ffffffffffffffff82111561101457611014610fb3565b5060051b60200190565b80356001600160a01b0381168114610a0557600080fd5b600082601f83011261104657600080fd5b8135602061105b61105683610ffa565b610fc9565b8083825260208201915060208460051b87010193508684111561107d57600080fd5b602086015b848110156110995780358352918301918301611082565b509695505050505050565b600080600080600060a086880312156110bc57600080fd5b853567ffffffffffffffff808211156110d457600080fd5b818801915088601f8301126110e857600080fd5b813560206110f861105683610ffa565b82815260059290921b8401810191818101908c84111561111757600080fd5b948201945b8386101561113c5761112d8661101e565b8252948201949082019061111c565b9950508901359250508082111561115257600080fd5b5061115f88828901611035565b959895975050505060408401359360608101359360809091013592509050565b803560108110610a0557600080fd5b600080604083850312156111a157600080fd5b6111aa8361117f565b91506111b86020840161101e565b90509250929050565b6000806000806000606086880312156111d957600080fd5b853567ffffffffffffffff808211156111f157600080fd5b6111fd89838a01610ee1565b909750955060209150878201358181111561121757600080fd5b6112238a828b01610ee1565b90965094505060408801358181111561123b57600080fd5b88019050601f8101891361124e57600080fd5b803561125c61105682610ffa565b81815260059190911b8201830190838101908b83111561127b57600080fd5b928401925b828410156112a857833580151581146112995760008081fd5b82529284019290840190611280565b80955050505050509295509295909350565b600080600080604085870312156112d057600080fd5b843567ffffffffffffffff808211156112e857600080fd5b6112f488838901610ee1565b9096509450602087013591508082111561130d57600080fd5b5061131a87828801610ee1565b95989497509550505050565b60006020828403121561133857600080fd5b610b648261117f565b6000806000806080858703121561135757600080fd5b6113608561101e565b935061136e6020860161101e565b925061137c6040860161101e565b915061138a6060860161101e565b905092959194509250565b600080604083850312156113a857600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60208101600383106113e1576113e16113b7565b91905290565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561140f57600080fd5b610b648261101e565b60006020828403121561142a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561029457610294611431565b6010811061146a5761146a6113b7565b9052565b60208101610294828461145a565b6001600160e01b0319841681526060810161149a602083018561145a565b6001600160a01b03929092166040919091015292915050565b8181038181111561029457610294611431565b808202811582820484141761029457610294611431565b6000826114fa57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b03198316815260408101600b8310611520576115206113b7565b826020830152939250505056fed08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfea2646970667358221220a88731885a136f6ffe2ef43beabc7b3a128ab2f3ee20d79c6777fe10326663bf64736f6c63430008170033", + "nonce": "0x2f128" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "BridgeTracking", + "contractAddress": "0xB03E29Be08E57b2d95Fe9F94966CB86a0DD98481", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2fb53a", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100eb565b600154600160a81b900460ff161561008c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60015460ff600160a01b909104811610156100e9576001805460ff60a01b191660ff60a01b17905560405160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611ad5806100fa6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063c7c4fea91161008c578063de981f1b11610066578063de981f1b1461017e578063e2a75f36146101a9578063f67e8152146101bc578063f84bd121146101dc57600080fd5b8063c7c4fea914610145578063ca21287e14610158578063d25ed4c61461016b57600080fd5b80631794bb3c146100d4578063229f88ea146100e95780633b154455146100fc5780634ac0bcda146101045780635cd8a76b1461012a578063865e6fd314610132575b600080fd5b6100e76100e23660046114df565b6101e4565b005b6100e76100f736600461152f565b6102e4565b6100e761048c565b610117610112366004611559565b61055c565b6040519081526020015b60405180910390f35b6100e761057a565b6100e7610140366004611598565b610673565b6100e76101533660046115c4565b610692565b6100e7610166366004611604565b610a6b565b610117610179366004611660565b610b56565b61019161018c366004611679565b610b8b565b6040516001600160a01b039091168152602001610121565b6101176101b7366004611660565b610c01565b6101cf6101ca366004611694565b610c2b565b604051610121919061174f565b600254610117565b600154600160a81b900460ff161580801561020a575060018054600160a01b900460ff16105b8061022a5750303b15801561022a575060018054600160a01b900460ff16145b61024f5760405162461bcd60e51b815260040161024690611762565b60405180910390fd5b6001805460ff60a01b1916600160a01b179055801561027c576001805460ff60a81b1916600160a81b1790555b610287600285610c72565b610292600884610c72565b600282905580156102de576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60026102ef81610d16565b6102f7610d62565b6000600a600085600281111561030f5761030f6117b0565b6002811115610320576103206117b0565b81526020019081526020016000206000848152602001908152602001600020905080600001546000036102de57610355610d70565b60006103616008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c291906117c6565b808355600480546001818101835560009290925260029081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054939450928892849260ff1990921691849081111561041f5761041f6117b0565b02179055506001808201869055830160005b81548110156104745761046c8888848481548110610451576104516117df565b6000918252602090912001546001600160a01b031687611012565b600101610431565b50610483600185016000611452565b50505050505050565b600461049781610d16565b600019600b54146104df5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610246565b6104e96008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906117c6565b600b5561055960046000610c72565b50565b6000610571838361056c86611192565b6112b8565b90505b92915050565b600154600290600160a81b900460ff161580156105a5575060015460ff808316600160a01b90920416105b6105c15760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055600054610601906002906001600160a01b0316610c72565b600154610619906008906001600160a01b0316610c72565b600080546001600160a01b031916905560018054600161ff0160a01b031916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b61067b61130e565b61068481611368565b61068e8282610c72565b5050565b600261069d81610d16565b6106a5610d62565b60006106b16008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071291906117c6565b905061071c610d70565b6000600a6000876002811115610734576107346117b0565b6002811115610745576107456117b0565b81526020019081526020016000206000868152602001908152602001600020905080600001546000036107a7576001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b038516179055506102de565b6107b386868685611012565b600b548281101561048357600b8381556000906107cf90610b8b565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561080c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108349190810190611816565b90506000610842838361139e565b9050600061084f84610c01565b9050600061085c85610b56565b9050600061086a600c610b8b565b9050600080826001600160a01b0316878786888c6040516024016108929594939291906118db565b60408051601f198184030181529181526020820180516001600160e01b0316634dca592560e01b179052516108c79190611975565b6000604051808303816000865af19150503d8060008114610904576040519150601f19603f3d011682016040523d82523d6000602084013e610909565b606091505b50915091508161096057604051634dca592560e01b906001600160a01b038516907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610957908590611991565b60405180910390a35b600061096c600d610b8b565b9050806001600160a01b03168b60405160240161098b91815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166302ddfca960e61b179052516109c09190611975565b6000604051808303816000865af19150503d80600081146109fd576040519150601f19603f3d011682016040523d82523d6000602084013e610a02565b606091505b50909350915082610a5a576040516302ddfca960e61b906001600160a01b038316907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610a51908690611991565b60405180910390a35b505050505050505050505050505050565b600154600390600160a81b900460ff16158015610a96575060015460ff808316600160a01b90920416105b610ab25760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055610ae5600b86610c72565b610af0600c85610c72565b610afb600d84610c72565b610b06600483610c72565b600019600b556001805460ff60a81b1916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b600081815260096020526040902060010154610b7182611192565b15610b8657600654610b8390826119c4565b90505b919050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bc257610bc26117b0565b60ff1681526020810191909152604001600020546001600160a01b0316905080610b86578160405163409140df60e11b815260040161024691906119f9565b600081815260096020526040902054610c1982611192565b15610b8657600454610b8390826119c4565b6060610c6a8484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061139e92505050565b949350505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610ca857610ca86117b0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610ce957610ce96117b0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610d1f81610b8b565b6001600160a01b0316336001600160a01b031614610559576000356001600160e01b03191681336040516320e0f98d60e21b815260040161024693929190611a07565b600254431015610d6e57005b565b6000610d7c6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa158015610dc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dea91906117c6565b905080600360000154101561068e576000826001600160a01b031663468c96ae6003600001546001610e1c91906119c4565b6040518263ffffffff1660e01b8152600401610e3a91815260200190565b6040805180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a9190611a3e565b60038490556000818152600960205260408120600454815493955090935091839190610ea79084906119c4565b9091555050600654600182018054600090610ec39084906119c4565b90915550600090505b600854811015610f5357600880546000919083908110610eee57610eee6117df565b60009182526020808320909101546001600160a01b0316808352600782526040808420546002880190935283208054919450919290610f2e9084906119c4565b90915550506001600160a01b0316600090815260076020526040812055600101610ecc565b5060005b600454811015610fe557600060036001018281548110610f7957610f796117df565b6000918252602082206002918202018054909350600a91839160ff1690811115610fa557610fa56117b0565b6002811115610fb657610fb66117b0565b815260208082019290925260409081016000908120600195860154825290925290206003018590555001610f57565b50610ff260046000611470565b6000600581815560068290559061100a600882611452565b505050505050565b6000600a600086600281111561102a5761102a6117b0565b600281111561103b5761103b6117b0565b81526020808201929092526040908101600090812087825283528181206001600160a01b038716825260028101909352205490915060ff161561107e57506102de565b6001600160a01b03831660009081526002820160205260408120805460ff1916600117905560038201549081900361114b576001600160a01b038416600090815260076020526040812054900361111b57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6006805460019081019091556001600160a01b03851660009081526007602052604090208054909101905561100a565b82810361100a57600090815260096020908152604080832060018082018054820190556001600160a01b039790971684526002019091529020805490930190925550505050565b60008061119f6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa1580156111e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120d91906117c6565b9050600080836001600160a01b031663468c96ae600360000154600161123391906119c4565b6040518263ffffffff1660e01b815260040161125191815260200190565b6040805180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190611a3e565b915091508180156112a157508086145b80156112ae575060035483115b9695505050505050565b60008381526009602090815260408083206001600160a01b03861684526002019091529020548115611307576001600160a01b038316600090815260076020526040902054610c6a90826119c4565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610d6e576000356001600160e01b0319166001604051620f948f60ea1b8152600401610246929190611a71565b806001600160a01b03163b60000361055957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610246565b80516060908067ffffffffffffffff8111156113bc576113bc6117f5565b6040519080825280602002602001820160405280156113e5578160200160208202803683370190505b50915060006113f385611192565b905060005b828110156114495761142486868381518110611416576114166117df565b6020026020010151846112b8565b848281518110611436576114366117df565b60209081029190910101526001016113f8565b50505092915050565b50805460008255906000526020600020908101906105599190611491565b508054600082556002029060005260206000209081019061055991906114aa565b5b808211156114a65760008155600101611492565b5090565b5b808211156114a657805460ff19168155600060018201556002016114ab565b6001600160a01b038116811461055957600080fd5b6000806000606084860312156114f457600080fd5b83356114ff816114ca565b9250602084013561150f816114ca565b929592945050506040919091013590565b803560038110610b8657600080fd5b6000806040838503121561154257600080fd5b61154b83611520565b946020939093013593505050565b6000806040838503121561156c57600080fd5b82359150602083013561157e816114ca565b809150509250929050565b803560108110610b8657600080fd5b600080604083850312156115ab57600080fd5b6115b483611589565b9150602083013561157e816114ca565b6000806000606084860312156115d957600080fd5b6115e284611520565b92506020840135915060408401356115f9816114ca565b809150509250925092565b6000806000806080858703121561161a57600080fd5b8435611625816114ca565b93506020850135611635816114ca565b92506040850135611645816114ca565b91506060850135611655816114ca565b939692955090935050565b60006020828403121561167257600080fd5b5035919050565b60006020828403121561168b57600080fd5b61057182611589565b6000806000604084860312156116a957600080fd5b83359250602084013567ffffffffffffffff808211156116c857600080fd5b818601915086601f8301126116dc57600080fd5b8135818111156116eb57600080fd5b8760208260051b850101111561170057600080fd5b6020830194508093505050509250925092565b60008151808452602080850194506020840160005b8381101561174457815187529582019590820190600101611728565b509495945050505050565b6020815260006105716020830184611713565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156117d857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8051610b86816114ca565b6000602080838503121561182957600080fd5b825167ffffffffffffffff8082111561184157600080fd5b818501915085601f83011261185557600080fd5b815181811115611867576118676117f5565b8060051b604051601f19603f8301168101818110858211171561188c5761188c6117f5565b6040529182528482019250838101850191888311156118aa57600080fd5b938501935b828510156118cf576118c08561180b565b845293850193928501926118af565b98975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b50505083810360208501526119328189611713565b6040850197909752505050606081019290925260809091015292915050565b60005b8381101561196c578181015183820152602001611954565b50506000910152565b60008251611987818460208701611951565b9190910192915050565b60208152600082518060208401526119b0816040850160208701611951565b601f01601f19169190910160400192915050565b8082018082111561057457634e487b7160e01b600052601160045260246000fd5b601081106119f5576119f56117b0565b9052565b6020810161057482846119e5565b6001600160e01b03198416815260608101611a2560208301856119e5565b6001600160a01b03929092166040919091015292915050565b60008060408385031215611a5157600080fd5b82518015158114611a6157600080fd5b6020939093015192949293505050565b6001600160e01b03198316815260408101600b8310611a9257611a926117b0565b826020830152939250505056fea2646970667358221220262d80d2feb74067f3cddee2705a4fff0aac4921a9a54ee2314b0f244bccac3e64736f6c63430008170033", + "nonce": "0x2f129" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0x3a3A92ba9d4D49aae06861136D547667c742F1aF", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x206788", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "nonce": "0x2f12a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "RoninGatewayV3", + "contractAddress": "0x4222384E84C248aa8D50FDC702a1b55E6b4efc99", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x8aad78", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b603754610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60375460ff9081161015620000ec576037805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6150b880620000fe6000396000f3fe6080604052600436106102975760003560e01c80638456cb591161015a578063ca15c873116100c1578063ecc836491161007a578063ecc836491461089f578063f0ce418e146108cc578063f23a6e6114610912578063f668214a1461093e578063fa3896591461095e578063fc6574bc1461097e576102a6565b8063ca15c873146107e7578063d547741f14610807578063dafae40814610827578063dbd2ef6c14610847578063de981f1b14610867578063e75235b814610887576102a6565b8063affed0e011610113578063affed0e0146106e5578063b9afa177146106fb578063b9c362091461071b578063bc197c811461073b578063bc7f038614610774578063c28f7894146107a1576102a6565b80638456cb591461063b578063865e6fd3146106505780639010d07c1461067057806391d14854146106905780639584a592146106b0578063a217fddf146106d0576102a6565b80633f4ba83a116101fe5780635d6a9a90116101b75780635d6a9a901461057257806364363f781461059f57806371706cbe146105bf57806375535f86146105d55780637de5dedd146105f5578063835fc6ca1461060a576102a6565b80633f4ba83a1461048f57806347b56b2c146104a45780634d92c4f0146104c45780635a7dd06a146105255780635c975abb146105455780635cd8a76b1461055d576102a6565b8063248a9ca311610250578063248a9ca3146103b15780632f2ff15d146103ef5780633101cfcb1461040f57806336568abe1461042f5780633e4574ec1461044f5780633e70838b1461046f576102a6565b806301ffc9a7146102ae578063065b3adf146102e35780630b1ff17f1461031b578063109679ef1461033b57806317892f961461035b57806317fa2ea114610384576102a6565b366102a6576102a46109d0565b005b6102a46109d0565b3480156102ba57600080fd5b506102ce6102c9366004613c2d565b6109e9565b60405190151581526020015b60405180910390f35b3480156102ef57600080fd5b50600554610303906001600160a01b031681565b6040516001600160a01b0390911681526020016102da565b34801561032757600080fd5b506102a4610336366004613c57565b610a09565b34801561034757600080fd5b506102a4610356366004613c88565b610a20565b34801561036757600080fd5b506078546079545b604080519283526020830191909152016102da565b34801561039057600080fd5b506103a461039f366004613ce5565b610a53565b6040516102da9190613d26565b3480156103bd57600080fd5b506103e16103cc366004613d60565b6000908152606b602052604090206001015490565b6040519081526020016102da565b3480156103fb57600080fd5b506102a461040a366004613d99565b610d90565b34801561041b57600080fd5b506102a461042a366004613dc9565b610dba565b34801561043b57600080fd5b506102a461044a366004613d99565b610e66565b34801561045b57600080fd5b506102ce61046a366004613d99565b610ee0565b34801561047b57600080fd5b506102a461048a366004613dc9565b610f10565b34801561049b57600080fd5b506102a4610f3a565b3480156104b057600080fd5b506102a46104bf366004613d60565b610f4c565b3480156104d057600080fd5b506105156104df366004613de6565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b6040516102da9493929190613e1e565b34801561053157600080fd5b506102a4610540366004613e4e565b611117565b34801561055157600080fd5b5060005460ff166102ce565b34801561056957600080fd5b506102a461117e565b34801561057e57600080fd5b5061059261058d366004613ec8565b611280565b6040516102da9190613f04565b3480156105ab57600080fd5b506102a46105ba366004613f30565b611324565b3480156105cb57600080fd5b506103e1606e5481565b3480156105e157600080fd5b5061036f6105f0366004613de6565b611360565b34801561060157600080fd5b506103e1611381565b34801561061657600080fd5b5061062a610625366004613d60565b611398565b6040516102da959493929190613ff8565b34801561064757600080fd5b506102a461146a565b34801561065c57600080fd5b506102a461066b36600461404e565b61147a565b34801561067c57600080fd5b5061030361068b366004613de6565b611495565b34801561069c57600080fd5b506102ce6106ab366004613d99565b6114ad565b3480156106bc57600080fd5b506102a46106cb36600461408b565b6114d8565b3480156106dc57600080fd5b506103e1600081565b3480156106f157600080fd5b506103e160045481565b34801561070757600080fd5b506103a4610716366004614184565b611625565b34801561072757600080fd5b506102a4610736366004613de6565b611743565b34801561074757600080fd5b50610767610756366004614368565b63bc197c8160e01b95945050505050565b6040516102da9190614415565b34801561078057600080fd5b506103e161078f366004613dc9565b60386020526000908152604090205481565b3480156107ad57600080fd5b506105156107bc366004613d60565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156107f357600080fd5b506103e1610802366004613d60565b611755565b34801561081357600080fd5b506102a4610822366004613d99565b61176c565b34801561083357600080fd5b506102ce610842366004613d60565b611791565b34801561085357600080fd5b506102a461086236600461442a565b6117bd565b34801561087357600080fd5b506103036108823660046144ed565b61180f565b34801561089357600080fd5b5060015460025461036f565b3480156108ab57600080fd5b506108bf6108ba366004614508565b61188a565b6040516102da91906145a3565b3480156108d857600080fd5b506105156108e7366004613d60565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561091e57600080fd5b5061076761092d366004614607565b63f23a6e6160e01b95945050505050565b34801561094a57600080fd5b506102ce610959366004613d60565b6119f1565b34801561096a57600080fd5b506102a4610979366004613f30565b611a1f565b34801561098a57600080fd5b506102ce61099936600461466f565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b60006109f482611c1a565b80610a035750610a0382611c3f565b92915050565b610a11611c64565b610a1c823383611caa565b5050565b610a28611c64565b610a30611d79565b610a50610a4236839003830183614746565b33610a4b611381565b611e1a565b50565b6060610a5d611d79565b336000610a68611381565b9050600084806001600160401b03811115610a8557610a856141f9565b604051908082528060200260200182016040528015610aae578160200160208202803683370190505b5094506000610abd600361180f565b905060005b82811015610d8457888882818110610adc57610adc6147d7565b905060200201359350816001600160a01b031663c7c4fea9600286896040518463ffffffff1660e01b8152600401610b16939291906147ed565b600060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b50505050610b51846119f1565b15610b7b576001878281518110610b6a57610b6a6147d7565b911515602092830291909101909101525b600084815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610bc257610bc2613e08565b6001811115610bd357610bd3613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff1690811115610c6b57610c6b613e08565b6002811115610c7c57610c7c613e08565b81526001820154602082015260029091015460409091015290525090506000610ca482612121565b90506000610cb4848b8b856121eb565b90506001816004811115610cca57610cca613e08565b03610d7557835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d0991908c90600401614817565b600060405180830381600087803b158015610d2357600080fd5b505af1158015610d37573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610d6c92919061482e565b60405180910390a15b50505050806001019050610ac2565b50505050505092915050565b6000828152606b6020526040902060010154610dab8161221e565b610db58383612228565b505050565b603754600390610100900460ff16158015610ddc575060375460ff8083169116105b610e015760405162461bcd60e51b8152600401610df89061488d565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e20600b8361224a565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610ed65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610df8565b610a1c82826122ee565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f18612310565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610f4261236a565b610f4a6123d9565b565b610f54611c64565b610f5d816119f1565b15610f7b576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff1690811115610fba57610fba613e08565b6001811115610fcb57610fcb613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff169081111561106357611063613e08565b600281111561107457611074613e08565b8152600182015460208201526002909101546040918201529152606083015101519192505046146110de576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61110882612121565b82604051610e5a92919061482e565b61111f611c64565b816000819003611142576040516316ee9d3b60e11b815260040160405180910390fd5b60005b818110156111775761116f858583818110611162576111626147d7565b905060a002013385611caa565b600101611145565b5050505050565b603754600290610100900460ff161580156111a0575060375460ff8083169116105b6111bc5760405162461bcd60e51b8152600401610df89061488d565b6037805461ffff191660ff8316176101001790556074546111e8906008906001600160a01b031661224a565b607554611200906003906001600160a01b031661224a565b60775461121890600a906001600160a01b031661224a565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660028111156112d4576112d4613e08565b60028111156112e5576112e5613e08565b815290546001600160a01b0361010090910481166020928301529082015191925016610a0357604051631b79f53b60e21b815260040160405180910390fd5b61132c612310565b600083900361134e576040516316ee9d3b60e11b815260040160405180910390fd5b61135a8484848461242b565b50505050565b60008061136b612310565b611375848461250e565b915091505b9250929050565b600061139361138e612598565b612605565b905090565b607160209081526000918252604091829020805460018201548451606080820187526002808601546001600160a01b03908116845260038701548116848901526004870154848a015288518084018a526005880154821681526006880154909116978101979097526007860154878901528751918201909752600885018054949760ff94851697939693959394929391928492169081111561143c5761143c613e08565b600281111561144d5761144d613e08565b815260200160018201548152602001600282015481525050905085565b61147261236a565b610f4a61263b565b611482612310565b61148b81612678565b610a1c828261224a565b6000828152606c60205260408120610f0990836126ae565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff16158080156114f85750603754600160ff909116105b806115125750303b158015611512575060375460ff166001145b61152e5760405162461bcd60e51b8152600401610df89061488d565b6037805460ff191660011790558015611551576037805461ff0019166101001790555b61155c60008d6126ba565b6115668b8b6126c4565b611570898961250e565b506000905061157f86806148db565b905011156115d1576115b261159486806148db565b6115a160208901896148db565b6115ab89806148db565b8989612754565b6115d16115bf86806148db565b6115cc60208801886148db565b61242b565b8015611617576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b606061162f611c64565b611637611d79565b81806001600160401b03811115611650576116506141f9565b604051908082528060200260200182016040528015611679578160200160208202803683370190505b5091506000611686611381565b9050611690613bc0565b60005b83811015611739578686828181106116ad576116ad6147d7565b905061016002018036038101906116c49190614746565b915060026040808401518101516000908152606f6020908152828220865183529052205460ff1660048111156116fc576116fc613e08565b03611726576001858281518110611715576117156147d7565b911515602092830291909101909101525b611731823385611e1a565b600101611693565b5050505092915050565b61174b612310565b610a1c82826126c4565b6000818152606c60205260408120610a0390612970565b6000828152606b60205260409020600101546117878161221e565b610db583836122ee565b600061179b612598565b6001546117a8919061493a565b6002546117b5908461493a565b101592915050565b6117c5612310565b60008790036117f5576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6118058888888888888888612754565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561184657611846613e08565b60ff1681526020810191909152604001600020546001600160a01b0316905080611885578160405163409140df60e11b8152600401610df89190614951565b919050565b6060816001600160401b038111156118a4576118a46141f9565b6040519080825280602002602001820160405280156118d757816020015b60608152602001906001900390816118c25790505b50905060005b828110156119e957600085815260726020526040812090858584818110611906576119066147d7565b905060200201602081019061191b9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002080546119469061496b565b80601f01602080910402602001604051908101604052809291908181526020018280546119729061496b565b80156119bf5780601f10611994576101008083540402835291602001916119bf565b820191906000526020600020905b8154815290600101906020018083116119a257829003601f168201915b50505050508282815181106119d6576119d66147d7565b60209081029190910101526001016118dd565b509392505050565b6000600260008381526070602052604090205460ff166004811115611a1857611a18613e08565b1492915050565b611a27611c64565b611a2f611d79565b33838015801590611a3f57508083145b611a6a576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6000611a74611381565b9050600080611a83600361180f565b905060005b84811015611c0e57898982818110611aa257611aa26147d7565b905060200201359250878782818110611abd57611abd6147d7565b9050602002810190611acf919061499f565b60008581526072602090815260408083206001600160a01b038c168452909152902091611afd919083614a35565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611b2f9060019087908b906004016147ed565b600060405180830381600087803b158015611b4957600080fd5b505af1158015611b5d573d6000803e3d6000fd5b50505060008481526076602052604081209150611b7c828988886121eb565b90506001816004811115611b9257611b92613e08565b03611c0457815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611bd1906001908990600401614817565b600060405180830381600087803b158015611beb57600080fd5b505af1158015611bff573d6000803e3d6000fd5b505050505b5050600101611a88565b50505050505050505050565b60006001600160e01b03198216635a05180f60e01b1480610a035750610a038261297a565b60006001600160e01b03198216630271189760e51b1480610a035750610a0382611c1a565b60005460ff1615610f4a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610df8565b611cc4611cbf36859003850160408601614af4565b6129af565b611ccd836129f3565b6000611ce8611ce26040860160208701613dc9565b83611280565b80519091506002811115611cfe57611cfe613e08565b611d0e6060860160408701614b10565b6002811115611d1f57611d1f613e08565b14611d3c5760405162035e2b60ea1b815260040160405180910390fd5b611d6983611d506040870160208801613dc9565b611d6236889003880160408901614af4565b9190612a71565b6111778483858460200151612bfc565b611d83600b61180f565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ded9190614b2b565b610f4a576000356001600160e01b0319166006604051620f948f60ea1b8152600401610df8929190614b4d565b82516080840151611e2a906129af565b600084602001516001811115611e4257611e42613e08565b14611e605760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611eae576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b6000611eca856060015160200151866040015160400151611280565b6080860151519091506002811115611ee457611ee4613e08565b81516002811115611ef757611ef7613e08565b148015611f2157508460400151602001516001600160a01b031681602001516001600160a01b0316145b611f3e5760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f6020908152828220858352905290812090611f6887612121565b90506000611f78838888856121eb565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b645985604051611fbf91815260200190565b60405180910390a46000611fd3600361180f565b90506001826004811115611fe957611fe9613e08565b036120b357835460ff191660021784556060890151805160209091015160808b01516120189290916000612d8e565b885160405163114fc47560e11b81526001600160a01b0383169163229f88ea9161204791600091600401614817565b600060405180830381600087803b15801561206157600080fd5b505af1158015612075573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524838a6040516120aa92919061482e565b60405180910390a15b885160405163c7c4fea960e01b81526001600160a01b0383169163c7c4fea9916120e4916000918d906004016147ed565b600060405180830381600087803b1580156120fe57600080fd5b505af1158015612112573d6000803e3d6000fd5b50505050505050505050505050565b6000806121318360400151612fa7565b905060006121428460600151612fa7565b905060006121968560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b60006121f8858584612fef565b600061220486846130a5565b9050612212868583866131a9565b9150505b949350505050565b610a5081336131f5565b6122328282613259565b6000828152606c60205260409020610db590826132df565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561228057612280613e08565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156122c1576122c1613e08565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6122f882826132f4565b6000828152606c60205260409020610db5908261335b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806123ac57506005546001600160a01b031633145b610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b6123e1613370565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b828114612459576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b838110156124ca57828282818110612476576124766147d7565b9050602002013560386000878785818110612493576124936147d7565b90506020020160208101906124a89190613dc9565b6001600160a01b0316815260208101919091526040016000205560010161245c565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da848484846040516125009493929190614bf6565b60405180910390a150505050565b600080828411156125325760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba910160405180910390a49250929050565b60006125a4600b61180f565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113939190614c28565b600060025460016002548460015461261d919061493a565b6126279190614c41565b6126319190614c54565b610a039190614c67565b612643611c64565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861240e3390565b806001600160a01b03163b600003610a5057604051630bfc64a360e21b81526001600160a01b0382166004820152602401610df8565b6000610f0983836133b9565b610a1c8282612228565b808211156126f3576000356001600160e01b0319166040516387f6f09560e01b8152600401610df89190614415565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b868514801561276257508683145b61278d576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b87811015612920578686828181106127aa576127aa6147d7565b90506020020160208101906127bf9190613dc9565b607360008b8b858181106127d5576127d56147d7565b90506020020160208101906127ea9190613dc9565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087878581811061281e5761281e6147d7565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555082828281811061286c5761286c6147d7565b90506020020160208101906128819190614b10565b607360008b8b85818110612897576128976147d7565b90506020020160208101906128ac9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008787858181106128e0576128e06147d7565b60209081029290920135835250810191909152604001600020805460ff1916600183600281111561291357612913613e08565b0217905550600101612790565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401888888888888888860405161295e989796959493929190614c89565b60405180910390a15050505050505050565b6000610a03825490565b60006001600160e01b03198216637965db0b60e01b1480610a0357506301ffc9a760e01b6001600160e01b0319831614610a03565b6129b8816133e3565b806129c757506129c78161341a565b806129d657506129d681613442565b610a505760405163034992a760e51b815260040160405180910390fd5b6000612a056060830160408401614b10565b6002811115612a1657612a16613e08565b148015612a53575060386000612a326040840160208501613dc9565b6001600160a01b031681526020810191909152604001600020546080820135105b15610a5057604051636eff4a8560e11b815260040160405180910390fd5b600060608185516002811115612a8957612a89613e08565b03612b645760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612af09190614d18565b6000604051808303816000865af19150503d8060008114612b2d576040519150601f19603f3d011682016040523d82523d6000602084013e612b32565b606091505b509092509050818015612b5d575080511580612b5d575080806020019051810190612b5d9190614b2b565b9150612bd6565b600185516002811115612b7957612b79613e08565b03612b8e57612b5d838530886020015161346b565b600285516002811115612ba357612ba3613e08565b03612bbd57612b5d83853088602001518960400151613519565b6040516361e411a760e11b815260040160405180910390fd5b816111775784843085604051639d2e4c6760e01b8152600401610df89493929190614d34565b606e805460009182612c0d83614d6a565b9091555090506000612c3484838588612c2b368c90038c018c614d83565b939291906135cd565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612c7357612c73613e08565b02179055506040828101518051600280850180546001600160a01b039384166001600160a01b03199182161790915560208085015160038801805491861691841691909117905593850151600487015560608701518051600588018054918616918416919091179055938401516006870180549190941691161790915591015160078301556080830151805160088401805492939092839160ff19909116906001908490811115612d2657612d26613e08565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612d6e82612121565b82604051612d7d92919061482e565b60405180910390a150949350505050565b806001600160a01b0316826001600160a01b031603612e3b5760408085015190516001600160a01b0385169180156108fc02916000818181858888f19350505050612e3657806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e1257600080fd5b505af1158015612e26573d6000803e3d6000fd5b5050505050612e36848484613639565b61135a565b600084516002811115612e5057612e50613e08565b03612f16576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015612e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec09190614c28565b90508460400151811015612f0557612ee88330838860400151612ee39190614c54565b6136b8565b612f0557604051632f739fff60e11b815260040160405180910390fd5b612f10858585613639565b5061135a565b600184516002811115612f2b57612f2b613e08565b03612f5c57612f3f8284866020015161375d565b612e365760405163c8e3a09f60e01b815260040160405180910390fd5b600284516002811115612f7157612f71613e08565b03612bbd57612f8a828486602001518760400151613784565b612e36576040516334b471a760e21b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b60008360030154118015613007575042836003015411155b1561301857825460ff191660041783555b6001600160a01b03821660009081526002840160205260409020541561305c5760405163025fd59560e41b81526001600160a01b0383166004820152602401610df8565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b60008060006130b4600b61180f565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa1580156130f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131199190810190614e3e565b81519194509250905060005b818110156117395785876002016000868481518110613146576131466147d7565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036131a157828181518110613186576131866147d7565b60200260200101516bffffffffffffffffffffffff16850194505b600101613125565b60008383101580156131d057506000855460ff1660048111156131ce576131ce613e08565b145b156131e857845460ff19166001908117865585018290555b5050915460ff1692915050565b6131ff82826114ad565b610a1c57613217816001600160a01b031660146137ad565b6132228360206137ad565b604051602001613233929190614f36565b60408051601f198184030181529082905262461bcd60e51b8252610df891600401614fab565b61326382826114ad565b610a1c576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561329b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f09836001600160a01b038416613948565b6132fe82826114ad565b15610a1c576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f09836001600160a01b038416613997565b60005460ff16610f4a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610df8565b60008260000182815481106133d0576133d06147d7565b9060005260206000200154905092915050565b600080825160028111156133f9576133f9613e08565b14801561340a575060008260400151115b8015610a03575050602001511590565b600060018251600281111561343157613431613e08565b148015610a03575050604001511590565b600060028251600281111561345957613459613e08565b148015610a0357505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928716916134cb91614d18565b6000604051808303816000865af19150503d8060008114613508576040519150601f19603f3d011682016040523d82523d6000602084013e61350d565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b0387169061354990879087908790879060448101614fbe565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b1790525161357e9190614d18565b6000604051808303816000865af19150503d80600081146135bb576040519150601f19603f3d011682016040523d82523d6000602084013e6135c0565b606091505b5090979650505050505050565b6135d5613bc0565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b6000808451600281111561364f5761364f613e08565b0361366a5761366382848660400151613a8a565b9050613694565b60018451600281111561367f5761367f613e08565b03612bbd57613663823085876020015161346b565b8061135a578383836040516341bd7d9160e11b8152600401610df893929190614ff8565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b179052915160009286169161371091614d18565b6000604051808303816000865af19150503d806000811461374d576040519150601f19603f3d011682016040523d82523d6000602084013e613752565b606091505b509095945050505050565b600061376b8430858561346b565b905080610f095761377d8484846136b8565b9050610f09565b60006137938530868686613519565b905080612216576137a685858585613b5d565b9050612216565b606060006137bc83600261493a565b6137c7906002614c41565b6001600160401b038111156137de576137de6141f9565b6040519080825280601f01601f191660200182016040528015613808576020820181803683370190505b509050600360fc1b81600081518110613823576138236147d7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613852576138526147d7565b60200101906001600160f81b031916908160001a905350600061387684600261493a565b613881906001614c41565b90505b60018111156138f9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106138b5576138b56147d7565b1a60f81b8282815181106138cb576138cb6147d7565b60200101906001600160f81b031916908160001a90535060049490941c936138f281615028565b9050613884565b508315610f095760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610df8565b600081815260018301602052604081205461398f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a03565b506000610a03565b60008181526001830160205260408120548015613a805760006139bb600183614c54565b85549091506000906139cf90600190614c54565b9050818114613a345760008660000182815481106139ef576139ef6147d7565b9060005260206000200154905080876000018481548110613a1257613a126147d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613a4557613a4561503f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a03565b6000915050610a03565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613ae79190614d18565b6000604051808303816000865af19150503d8060008114613b24576040519150601f19603f3d011682016040523d82523d6000602084013e613b29565b606091505b509092509050818015613b54575080511580613b54575080806020019051810190613b549190614b2b565b95945050505050565b604080516000808252602082019092526001600160a01b03861690613b8b9086908690869060448101615055565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b179052516134cb9190614d18565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613c3f57600080fd5b81356001600160e01b031981168114610f0957600080fd5b60008082840360c0811215613c6b57600080fd5b60a0811215613c7957600080fd5b50919360a08501359350915050565b60006101608284031215613c9b57600080fd5b50919050565b60008083601f840112613cb357600080fd5b5081356001600160401b03811115613cca57600080fd5b6020830191508360208260051b850101111561137a57600080fd5b60008060208385031215613cf857600080fd5b82356001600160401b03811115613d0e57600080fd5b613d1a85828601613ca1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561350d578351151583529284019291840191600101613d42565b600060208284031215613d7257600080fd5b5035919050565b6001600160a01b0381168114610a5057600080fd5b803561188581613d79565b60008060408385031215613dac57600080fd5b823591506020830135613dbe81613d79565b809150509250929050565b600060208284031215613ddb57600080fd5b8135610f0981613d79565b60008060408385031215613df957600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6080810160058610613e3257613e32613e08565b9481526020810193909352604083019190915260609091015290565b600080600060408486031215613e6357600080fd5b83356001600160401b0380821115613e7a57600080fd5b818601915086601f830112613e8e57600080fd5b813581811115613e9d57600080fd5b87602060a083028501011115613eb257600080fd5b6020928301989097509590910135949350505050565b60008060408385031215613edb57600080fd5b8235613ee681613d79565b946020939093013593505050565b60038110610a5057610a50613e08565b81516040820190613f1481613ef4565b82526020928301516001600160a01b0316929091019190915290565b60008060008060408587031215613f4657600080fd5b84356001600160401b0380821115613f5d57600080fd5b613f6988838901613ca1565b90965094506020870135915080821115613f8257600080fd5b50613f8f87828801613ca1565b95989497509550505050565b60028110613fab57613fab613e08565b9052565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b8051613fe181613ef4565b825260208181015190830152604090810151910152565b858152610160810161400d6020830187613f9b565b61401a6040830186613faf565b61402760a0830185613faf565b614035610100830184613fd6565b9695505050505050565b80356010811061188557600080fd5b6000806040838503121561406157600080fd5b61406a8361403f565b91506020830135613dbe81613d79565b8060408101831015610a0357600080fd5b60008060008060008060008060008060006101208c8e0312156140ad57600080fd5b6140b68c613d8e565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e013511156140ed57600080fd5b6140fd8e60a08f01358f01613ca1565b909750955060c08d013581101561411357600080fd5b6141238e60c08f01358f0161407a565b94508060e08e0135111561413657600080fd5b6141468e60e08f01358f0161407a565b9350806101008e0135111561415a57600080fd5b5061416c8d6101008e01358e01613ca1565b81935080925050509295989b509295989b9093969950565b6000806020838503121561419757600080fd5b82356001600160401b03808211156141ae57600080fd5b818501915085601f8301126141c257600080fd5b8135818111156141d157600080fd5b866020610160830285010111156141e757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614231576142316141f9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561425f5761425f6141f9565b604052919050565b60006001600160401b03821115614280576142806141f9565b5060051b60200190565b600082601f83011261429b57600080fd5b813560206142b06142ab83614267565b614237565b8083825260208201915060208460051b8701019350868411156142d257600080fd5b602086015b848110156142ee57803583529183019183016142d7565b509695505050505050565b600082601f83011261430a57600080fd5b81356001600160401b03811115614323576143236141f9565b614336601f8201601f1916602001614237565b81815284602083860101111561434b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561438057600080fd5b853561438b81613d79565b9450602086013561439b81613d79565b935060408601356001600160401b03808211156143b757600080fd5b6143c389838a0161428a565b945060608801359150808211156143d957600080fd5b6143e589838a0161428a565b935060808801359150808211156143fb57600080fd5b50614408888289016142f9565b9150509295509295909350565b6001600160e01b031991909116815260200190565b6000806000806000806000806080898b03121561444657600080fd5b88356001600160401b038082111561445d57600080fd5b6144698c838d01613ca1565b909a50985060208b013591508082111561448257600080fd5b61448e8c838d01613ca1565b909850965060408b01359150808211156144a757600080fd5b6144b38c838d01613ca1565b909650945060608b01359150808211156144cc57600080fd5b506144d98b828c01613ca1565b999c989b5096995094979396929594505050565b6000602082840312156144ff57600080fd5b610f098261403f565b60008060006040848603121561451d57600080fd5b8335925060208401356001600160401b0381111561453a57600080fd5b61454686828701613ca1565b9497909650939450505050565b60005b8381101561456e578181015183820152602001614556565b50506000910152565b6000815180845261458f816020860160208601614553565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156145fa57603f198886030184526145e8858351614577565b945092850192908501906001016145cc565b5092979650505050505050565b600080600080600060a0868803121561461f57600080fd5b853561462a81613d79565b9450602086013561463a81613d79565b9350604086013592506060860135915060808601356001600160401b0381111561466357600080fd5b614408888289016142f9565b60008060006060848603121561468457600080fd5b8335925060208401359150604084013561469d81613d79565b809150509250925092565b6000606082840312156146ba57600080fd5b6146c261420f565b905081356146cf81613d79565b815260208201356146df81613d79565b806020830152506040820135604082015292915050565b80356003811061188557600080fd5b60006060828403121561471757600080fd5b61471f61420f565b905061472a826146f6565b8152602082013560208201526040820135604082015292915050565b6000610160828403121561475957600080fd5b60405160a081018181106001600160401b038211171561477b5761477b6141f9565b6040528235815260208301356002811061479457600080fd5b60208201526147a684604085016146a8565b60408201526147b88460a085016146a8565b60608201526147cb846101008501614705565b60808201529392505050565b634e487b7160e01b600052603260045260246000fd5b606081016147fa85613ef4565b93815260208101929092526001600160a01b031660409091015290565b6040810161482484613ef4565b9281526020015290565b6000610180820190508382528251602083015260208301516148536040840182613f9b565b5060408301516148666060840182613faf565b50606083015161487960c0840182613faf565b5060808301516119e9610120840182613fd6565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e198436030181126148f257600080fd5b8301803591506001600160401b0382111561490c57600080fd5b6020019150600581901b360382131561137a57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a0357610a03614924565b602081016010831061496557614965613e08565b91905290565b600181811c9082168061497f57607f821691505b602082108103613c9b57634e487b7160e01b600052602260045260246000fd5b6000808335601e198436030181126149b657600080fd5b8301803591506001600160401b038211156149d057600080fd5b60200191503681900382131561137a57600080fd5b601f821115610db5576000816000526020600020601f850160051c81016020861015614a0e5750805b601f850160051c820191505b81811015614a2d57828155600101614a1a565b505050505050565b6001600160401b03831115614a4c57614a4c6141f9565b614a6083614a5a835461496b565b836149e5565b6000601f841160018114614a945760008515614a7c5750838201355b600019600387901b1c1916600186901b178355611177565b600083815260209020601f19861690835b82811015614ac55786850135825560209485019460019092019101614aa5565b5086821015614ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060608284031215614b0657600080fd5b610f098383614705565b600060208284031215614b2257600080fd5b610f09826146f6565b600060208284031215614b3d57600080fd5b81518015158114610f0957600080fd5b6001600160e01b03198316815260408101600b8310614b6e57614b6e613e08565b8260208301529392505050565b8183526000602080850194508260005b85811015614bb9578135614b9e81613d79565b6001600160a01b031687529582019590820190600101614b8b565b509495945050505050565b81835260006001600160fb1b03831115614bdd57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000614c0a604083018688614b7b565b8281036020840152614c1d818587614bc4565b979650505050505050565b600060208284031215614c3a57600080fd5b5051919050565b80820180821115610a0357610a03614924565b81810381811115610a0357610a03614924565b600082614c8457634e487b7160e01b600052601260045260246000fd5b500490565b608081526000614c9d608083018a8c614b7b565b60208382036020850152614cb2828a8c614b7b565b91508382036040850152614cc782888a614bc4565b848103606086015285815286925060200160005b86811015614d0757614cec846146f6565b614cf581613ef4565b82529282019290820190600101614cdb565b509c9b505050505050505050505050565b60008251614d2a818460208701614553565b9190910192915050565b60c08101614d428287613fd6565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b600060018201614d7c57614d7c614924565b5060010190565b600060a08284031215614d9557600080fd5b614d9d61420f565b8235614da881613d79565b81526020830135614db881613d79565b6020820152614dca8460408501614705565b60408201529392505050565b600082601f830112614de757600080fd5b81516020614df76142ab83614267565b8083825260208201915060208460051b870101935086841115614e1957600080fd5b602086015b848110156142ee578051614e3181613d79565b8352918301918301614e1e565b600080600060608486031215614e5357600080fd5b83516001600160401b0380821115614e6a57600080fd5b614e7687838801614dd6565b9450602091508186015181811115614e8d57600080fd5b614e9988828901614dd6565b945050604086015181811115614eae57600080fd5b86019050601f81018713614ec157600080fd5b8051614ecf6142ab82614267565b81815260059190911b82018301908381019089831115614eee57600080fd5b928401925b82841015614f275783516bffffffffffffffffffffffff81168114614f185760008081fd5b82529284019290840190614ef3565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f6e816017850160208801614553565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614f9f816028840160208801614553565b01602801949350505050565b602081526000610f096020830184614577565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614c1d90830184614577565b60a081016150068286613fd6565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161503757615037614924565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0385168152836020820152826040820152608060608201526000614035608083018461457756fea2646970667358221220f2c96cbb22626006ee11ff90975b91b23886e548ed7a61504409d1948b356f0f64736f6c63430008170033", + "nonce": "0x2f12b" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x8fcf4", + "value": "0x0", + "data": "0x663ac01100000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000010a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x262" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xb033ba62ec622dc54d0abfe0254e79692147ca26", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x4956e", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x65" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x10cf46", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef286000000000000000000000000836d911c7de3edfc953030b9abc4b2b18b2db8b9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x5a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "transactionHash": "0x1467e2ab29e7b30da58b2651b5e1385992f17526838467aced5d2eab819d5688", + "transactionIndex": "0x0", + "blockHash": "0xffec7c7da845eccb01d1004dafa29ff8bc2fd666e8240677855015b16d12e2c0", + "blockNumber": "0x1949658", + "from": "0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F", + "to": "0x53Ea388CB72081A3a397114a43741e7987815896", + "cumulativeGasUsed": "0x35243", + "gasUsed": "0x35243", + "contractAddress": null, + "logs": [ + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x00000000000000000000000000000000000000000000000000000000000007e5", + "0x000000000000000000000000000000000000000000000000000000000000002d", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xffec7c7da845eccb01d1004dafa29ff8bc2fd666e8240677855015b16d12e2c0", + "blockNumber": "0x1949658", + "transactionHash": "0x1467e2ab29e7b30da58b2651b5e1385992f17526838467aced5d2eab819d5688", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c", + "0x00000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0xffec7c7da845eccb01d1004dafa29ff8bc2fd666e8240677855015b16d12e2c0", + "blockNumber": "0x1949658", + "transactionHash": "0x1467e2ab29e7b30da58b2651b5e1385992f17526838467aced5d2eab819d5688", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000010000000000100000000000000000000000000000080000000020000000002000000004000000000000000000000000000000000400000000000000000004000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000040000000000000000000000000000000000001000000000000000000000000008000000000000000000400000000000010000002000000000000000000000000000800000000000000000000000000000000400000000000000000004000000000000000080000000000000000000004000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0xa58405e67e2e6558de328d173bce7db193836183c1303351bf95c59fbcb7d78f", + "transactionIndex": "0x1", + "blockHash": "0x6427eebf0bf5f2ad49256ce4267f797fdd1b0e0fd99f968bc484311ce6fdc0d3", + "blockNumber": "0x194965a", + "from": "0x087D08e3ba42e64E3948962dd1371F906D1278b9", + "to": "0x53Ea388CB72081A3a397114a43741e7987815896", + "cumulativeGasUsed": "0x45b13", + "gasUsed": "0x1f54a", + "contractAddress": null, + "logs": [ + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c", + "0x000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b9" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0x6427eebf0bf5f2ad49256ce4267f797fdd1b0e0fd99f968bc484311ce6fdc0d3", + "blockNumber": "0x194965a", + "transactionHash": "0xa58405e67e2e6558de328d173bce7db193836183c1303351bf95c59fbcb7d78f", + "transactionIndex": "0x1", + "logIndex": "0x4", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000020000000000000000004000000000000400000000000000000000000000000000000000004000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000800000000000400000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000080000000000000000000004000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0xbefcfe4868f0c8e4482deaa0f523cff58ea8d18dca1e399e3c980039786e71d8", + "transactionIndex": "0x0", + "blockHash": "0x3a2de8e12ac13f0ce1594844697c72ffedced5cb9aec464d118720c2378ce590", + "blockNumber": "0x194976c", + "from": "0x06f8Af58F656B507918d91B0B6F8B89bfCC556f9", + "to": "0x53Ea388CB72081A3a397114a43741e7987815896", + "cumulativeGasUsed": "0x1f54a", + "gasUsed": "0x1f54a", + "contractAddress": null, + "logs": [ + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c", + "0x00000000000000000000000006f8af58f656b507918d91b0b6f8b89bfcc556f9" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0x3a2de8e12ac13f0ce1594844697c72ffedced5cb9aec464d118720c2378ce590", + "blockNumber": "0x194976c", + "transactionHash": "0xbefcfe4868f0c8e4482deaa0f523cff58ea8d18dca1e399e3c980039786e71d8", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000020000000000001000004000000000000000000000000000000000000000000000000000004000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000004000000000001000080000000000000000000004000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1713251065, + "chain": 2021, + "multi": false, + "commit": "299b38b" +} \ No newline at end of file diff --git a/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713252455.json b/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713252455.json new file mode 100644 index 00000000..4cec20cf --- /dev/null +++ b/broadcast/20240411-p2-upgrade-bridge-ronin-chain.s.sol/2021/run-1713252455.json @@ -0,0 +1,776 @@ +{ + "transactions": [ + { + "hash": "0x0206aa397c251997e5fef0b9533415b0e0400594367f9203456e008d05499501", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x53Ea388CB72081A3a397114a43741e7987815896", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xe1100401454b5f850b09f3b92ce7f071c5f1cef4", + "to": "0x53ea388cb72081a3a397114a43741e7987815896", + "gas": "0x989680", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000663074ca00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac575300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x1" + }, + "additionalContracts": [], + "isFixedGasLimit": true + }, + { + "hash": "0x88a3b563a8bda1da038e94a90d37b8c03d4383ec602b892ecfc2bc414d11fa93", + "transactionType": "CREATE", + "contractName": "BridgeReward", + "contractAddress": "0x7bEB0f3fC4002C4542015cFa9023dEE1A9EC9400", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2b9610", + "value": "0x0", + "data": "0x60a060405230608052610010610015565b6100d5565b600054610100900460ff16156100815760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100d3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6080516118666100f06000396000610bc701526118666000f3fe6080604052600436106100dd5760003560e01c80638f7c34a21161007f578063ad43663e11610059578063ad43663e14610261578063b77f2a4014610276578063de981f1b14610296578063f5dbc4ee146102ce57600080fd5b80638f7c34a21461021957806395b6ef0c1461022e578063a6bd67881461024157600080fd5b80633b154455116100bb5780633b154455146101c757806359f778df146101dc5780635cd8a76b146101e4578063865e6fd3146101f957600080fd5b806306032d74146100e257806333b3ea6c1461018257806334087952146101a4575b600080fd5b3480156100ee57600080fd5b506101626100fd366004611335565b604080518082018252600080825260209182018190526001600160a01b039390931683527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a815291819020815180830190925280548252600101549181019190915290565b604080518251815260209283015192810192909252015b60405180910390f35b34801561018e57600080fd5b506101a261019d366004611352565b6102e3565b005b3480156101b057600080fd5b506101b9610399565b604051908152602001610179565b3480156101d357600080fd5b506101a26103c8565b6101a26104bb565b3480156101f057600080fd5b506101a26104c5565b34801561020557600080fd5b506101a261021436600461137a565b610593565b34801561022557600080fd5b506101b96105ae565b6101a261023c3660046113b1565b6105c6565b34801561024d57600080fd5b506101a261025c366004611352565b6106e9565b34801561026d57600080fd5b506101b96106fd565b34801561028257600080fd5b506101a2610291366004611352565b610727565b3480156102a257600080fd5b506102b66102b136600461142a565b61073d565b6040516001600160a01b039091168152602001610179565b3480156102da57600080fd5b506101b96107b8565b6102ec336107e2565b61031c57604051638f47e7e360e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b6000610328600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103899190611445565b90506103958183610860565b5050565b60006103c37f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f45490565b905090565b60046103d381610acd565b6000196103de6105ae565b146104205760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610313565b6104ac600161042f600861073d565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104909190611445565b61049a9190611474565b60008051602061181183398151915255565b6104b860046000610b19565b50565b6104c3610bbd565b565b600054600290610100900460ff161580156104e7575060005460ff8083169116105b6105035760405162461bcd60e51b815260040161031390611487565b6000805461ffff191660ff8316176101001790556105417faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c60059055565b61054e60016104906105ae565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b61059b610c9e565b6105a481610cf8565b6103958282610b19565b60006103c36000805160206118118339815191525490565b600054610100900460ff16158080156105e65750600054600160ff909116105b806106005750303b158015610600575060005460ff166001145b61061c5760405162461bcd60e51b815260040161031390611487565b6000805460ff19166001179055801561063f576000805461ff0019166101001790555b61064a600b88610b19565b610655600387610b19565b610660600c86610b19565b61066b600885610b19565b610676600484610b19565b6000196000805160206118118339815191525561069282610d2e565b61069a610bbd565b80156106e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600b6106f481610acd565b61039582610d2e565b60006103c37f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec739105490565b600361073281610acd565b610395826000610860565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610774576107746114d5565b60ff1681526020810191909152604001600020546001600160a01b03169050806107b3578160405163409140df60e11b815260040161031391906114ff565b919050565b60006103c37f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b60006107ee600b61073d565b604051635a02d57960e11b81526001600160a01b038481166004830152919091169063b405aaf290602401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a919061150d565b92915050565b600061086a6105ae565b9050816000036108cc5760008184111561089757600161088a8386611474565b6108949190611474565b90505b6108c8816108c37faf260ffaff563b9407c1c5fe4aec2be8632142d158c44bb0ce4d471cb4883b8c5490565b610d87565b9250505b6108d7838383610d9f565b60006108e3600b61073d565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610920573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610948919081019061159a565b90506000610956600361073d565b905060005b84811015610ac55761096c84611639565b9350610abd83836001600160a01b031663f67e815287876040518363ffffffff1660e01b81526004016109a0929190611697565b600060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109e591908101906116b0565b60405163692f6a6360e11b8152600481018890526001600160a01b0386169063d25ed4c690602401602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190611445565b604051637153af9b60e11b8152600481018990526001600160a01b0387169063e2a75f3690602401602060405180830381865afa158015610a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190611445565b88610e33565b60010161095b565b505050505050565b610ad68161073d565b6001600160a01b0316336001600160a01b0316146104b8576000356001600160e01b03191681336040516320e0f98d60e21b815260040161031393929190611736565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610b4f57610b4f6114d5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610b9057610b906114d5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c1457604051638f47e7e360e01b81526001600160e01b0319600035166004820152602401610313565b337f7ae161a1f0ef2537f5ff1957021a50412e72abdc6a941a77d99361e91e7f3c3d610c5e7f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c645490565b604080519182523460208301520160405180910390a26104b87f9a8c9f129792436c37b7bd2d79c56132fc05bf26cc8070794648517c2a0c6c6434610f8a565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146104c3576000356001600160e01b0319166001604051620f948f60ea1b815260040161031392919061176d565b806001600160a01b03163b6000036104b857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610313565b610d577f90f7d557245e5dd9485f463e58974fa7cdc93c0abbd0a1afebb8f9640ec73910829055565b6040518181527f9b40b647582311cc8f5f7d27e7ce206d126605d1625b8299b7edaeefd869ef2590602001610588565b6000818310610d965781610d98565b825b9392505050565b81600003610dc05760405163799ffe0d60e01b815260040160405180910390fd5b610dcb81600161179b565b8311610df45760405163425a5b1f60e01b81526004810184905260248101829052604401610313565b610dfe828261179b565b8311610e2e57604051630931302b60e31b8152600481018490526024810182905260448101839052606401610313565b505050565b845184518114610e64576040516306b5667560e21b81526001600160e01b0319600035166004820152602401610313565b6000610e6e6106fd565b90506000610e7b88610fa1565b90506000610e8a87878a61101f565b90506000806000805b87811015610f3957610edc8589898f8581518110610eb357610eb36117ae565b60200260200101518f8e8c8881518110610ecf57610ecf6117ae565b6020026020010151611072565b80945081955050506000610f0b8a8f8481518110610efc57610efc6117ae565b60200260200101518787611093565b90508380610f17575080155b610f215784610f24565b60005b610f2e908461179b565b925050600101610e93565b50610f647f3663384f6436b31a97d9c9a02f64ab8b73ead575c5b6224fa0800a6bd57f62f482610f8a565b50610f7c600080516020611811833981519152899055565b505050505050505050505050565b600061085a83610f9a85856111f9565b9250829055565b6060610fad600c61073d565b6001600160a01b0316635311153b836040518263ffffffff1660e01b8152600401610fd891906117c4565b6000604051808303816000875af1158015610ff7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261085a91908101906116b0565b60008061102d858585611218565b90508061105e576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a15b801580611069575084155b95945050505050565b6000828210156110858989898989611295565b915097509795505050505050565b6001600160a01b03831660009081527f518cfd198acbffe95e740cfce1af28a3f7de51f0d784893d3d72c5cc59d7062a60205260408120821561113857838160010160008282546110e4919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fb3d061c3ef3991b0d4b09f4c8b551d137c3d1e014cf5326462d3d1f6a8dfb9c291015b60405180910390a260009150506111f1565b611144858560006112c0565b156111b0578381600001600082825461115d919061179b565b9091555050604080516001600160a01b03871681526020810186905287917fbab0baccb39371d4d5206b519fe58d21cae9cdd63a1d1b5146ecdf405fd93152910160405180910390a260019150506111f1565b604080516001600160a01b03871681526020810186905287917f74b217634c5a7790ce69770c5e35019970453d4da3973769e7d6cdb7ce6816a19101611126565b949350505050565b815481018181101561085a57634e487b7160005260116020526024601cfd5b8051600190600090815b8181101561127d578585828151811061123d5761123d6117ae565b60200260200101511115611254576000935061127d565b848181518110611266576112666117ae565b602002602001015183019250806001019050611222565b5082801561128b5750858211155b9695505050505050565b6000856112b657816112a784866117d7565b6112b191906117ee565b61128b565b61128b85856117ee565b6000836001600160a01b0316838390604051600060405180830381858888f193505050503d8060008114611310576040519150601f19603f3d011682016040523d82523d6000602084013e611315565b606091505b509095945050505050565b6001600160a01b03811681146104b857600080fd5b60006020828403121561134757600080fd5b8135610d9881611320565b60006020828403121561136457600080fd5b5035919050565b8035601081106107b357600080fd5b6000806040838503121561138d57600080fd5b6113968361136b565b915060208301356113a681611320565b809150509250929050565b60008060008060008060c087890312156113ca57600080fd5b86356113d581611320565b955060208701356113e581611320565b945060408701356113f581611320565b9350606087013561140581611320565b9250608087013561141581611320565b8092505060a087013590509295509295509295565b60006020828403121561143c57600080fd5b610d988261136b565b60006020828403121561145757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561085a5761085a61145e565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b601081106114fb576114fb6114d5565b9052565b6020810161085a82846114eb565b60006020828403121561151f57600080fd5b81518015158114610d9857600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561156e5761156e61152f565b604052919050565b600067ffffffffffffffff8211156115905761159061152f565b5060051b60200190565b600060208083850312156115ad57600080fd5b825167ffffffffffffffff8111156115c457600080fd5b8301601f810185136115d557600080fd5b80516115e86115e382611576565b611545565b81815260059190911b8201830190838101908783111561160757600080fd5b928401925b8284101561162e57835161161f81611320565b8252928401929084019061160c565b979650505050505050565b60006001820161164b5761164b61145e565b5060010190565b60008151808452602080850194506020840160005b8381101561168c5781516001600160a01b031687529582019590820190600101611667565b509495945050505050565b8281526040602082015260006111f16040830184611652565b600060208083850312156116c357600080fd5b825167ffffffffffffffff8111156116da57600080fd5b8301601f810185136116eb57600080fd5b80516116f96115e382611576565b81815260059190911b8201830190838101908783111561171857600080fd5b928401925b8284101561162e5783518252928401929084019061171d565b6001600160e01b0319841681526060810161175460208301856114eb565b6001600160a01b03929092166040919091015292915050565b6001600160e01b03198316815260408101600b831061178e5761178e6114d5565b8260208301529392505050565b8082018082111561085a5761085a61145e565b634e487b7160e01b600052603260045260246000fd5b602081526000610d986020830184611652565b808202811582820484141761085a5761085a61145e565b60008261180b57634e487b7160e01b600052601260045260246000fd5b50049056fe2417f25874c1cdc139a787dd21df976d40d767090442b3a2496917ecfc93b619a2646970667358221220cd237faf10660b4bf88f4dcc843cf0b3d4cce585ad7f99199ed3924ea16b8dfd64736f6c63430008170033", + "nonce": "0x2f128" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x9d4495274114cd427debfe5d5c13a3aa6b61ab3261ae9b7ad90a9fff9515d2f9", + "transactionType": "CREATE", + "contractName": "BridgeSlash", + "contractAddress": "0xB03E29Be08E57b2d95Fe9F94966CB86a0DD98481", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x26b9de", + "value": "0x0", + "data": "0x608060405261000c610011565b6100d1565b600054610100900460ff161561007d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100cf576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611583806100e06000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80639c2f445911610097578063de981f1b11610066578063de981f1b146101fd578063f8c8765e14610228578063f9f608731461023b578063fbb2f1941461024357600080fd5b80639c2f4459146101d2578063c48549de146101da578063d1e1f2f8146101ed578063ddc3f7f6146101f557600080fd5b80635311153b116100d35780635311153b1461016a5780636dda44081461017d578063865e6fd3146101935780638f851d8a146101a657600080fd5b806301ffc9a7146101055780631288810a1461012d5780633b1544551461014d5780634dca592514610157575b600080fd5b610118610113366004610eb7565b610263565b60405190151581526020015b60405180910390f35b61014061013b366004610f2d565b61029a565b6040516101249190610f6f565b610155610382565b005b6101556101653660046110a4565b610462565b610140610178366004610f2d565b6106f9565b610185600181565b604051908152602001610124565b6101556101a136600461118e565b6107d2565b6101b96101b43660046111c1565b6107f1565b6040516001600160e01b03199091168152602001610124565b610185603281565b6101b96101e83660046112ba565b610970565b610185600581565b610185601e81565b61021061020b366004611326565b61098f565b6040516001600160a01b039091168152602001610124565b610155610236366004611341565b610a0a565b610140610b49565b610256610251366004611395565b610b58565b60405161012491906113cd565b60006001600160e01b031982166312c0151560e21b148061029457506001600160e01b031982166301ffc9a760e01b145b92915050565b6060818067ffffffffffffffff8111156102b6576102b6610fb3565b6040519080825280602002602001820160405280156102df578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610311576103116113e7565b905060200201602081019061032691906113fd565b6001600160a01b031681526020810191909152604001600020548451600160801b9091046001600160801b031690859083908110610366576103666113e7565b60209081029190910101526001016102f4565b50505092915050565b600461038d81610b6b565b600019600154146103da5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b60448201526064015b60405180910390fd5b6103e4600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190611418565b610450906001611447565b60015561045f60046000610bb7565b50565b600361046d81610b6b565b8160015481106106f0578360328111156106ee5786518851146104b1576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8751156106ee576104c3868689610c5b565b6104f5576040517f64ba7143ea5a17abea37667aa9ae137e3afba5033c5f504770c02829c128189c90600090a16106ee565b60006104ff610cd8565b6040805180820190915260008082526020820181905291925060008051602061152e833981519152918080805b8e518110156106e6578e8181518110610547576105476113e7565b6020908102919091018101516001600160a01b03811660009081528883526040908190208151808301909252546001600160801b038082168352600160801b90910416928101839052965093508b11156106de576105be8e82815181106105b0576105b06113e7565b60200260200101518d610d43565b91506105d9828c87600001516001600160801b03168a610d95565b93506105e5848c610dec565b1561062b576040516001600160801b0394506001600160a01b038416908c907fb32a150b9737190a456d8b2b81dd7d592a799ab2933ea494e44351acd41f835d90600090a35b600082600281111561063f5761063f6113b7565b146106de576001600160801b0384146106a3578a836001600160a01b031683600281111561066f5761066f6113b7565b6040518781527fa0957b65e189f06dfe2b38ff07e89a0df128ba3fcba66c68f8d2615daebc30a99060200160405180910390a45b6001600160a01b038316600090815260208790526040902080546fffffffffffffffffffffffffffffffff19166001600160801b0386161790555b60010161052c565b505050505050505b505b50505050505050565b6060818067ffffffffffffffff81111561071557610715610fb3565b60405190808252806020026020018201604052801561073e578160200160208202803683370190505b50915060008051602061152e83398151915260005b8281101561037957816000878784818110610770576107706113e7565b905060200201602081019061078591906113fd565b6001600160a01b0316815260208101919091526040016000205484516001600160801b03909116908590839081106107bf576107bf6113e7565b6020908102919091010152600101610753565b6107da610e0e565b6107e381610e6a565b6107ed8282610bb7565b5050565b6000600b6107fe81610b6b565b82518690811461082f576040516306b5667560e21b81526001600160e01b03196000351660048201526024016103d1565b8060000361084757506347c28ec560e11b9150610966565b60008051602061152e8339815191526000610862600861098f565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561089f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c39190611418565b905060005b83811015610957578681815181106108e2576108e26113e7565b60200260200101511561094f57818360008d8d85818110610905576109056113e7565b905060200201602081019061091a91906113fd565b6001600160a01b03168152602081019190915260400160002080546001600160801b03928316600160801b0292169190911790555b6001016108c8565b506347c28ec560e11b94505050505b5095945050505050565b6000600b61097d81610b6b565b50636242a4ef60e11b95945050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156109c6576109c66113b7565b60ff1681526020810191909152604001600020546001600160a01b0316905080610a05578160405163409140df60e11b81526004016103d1919061146e565b919050565b600054610100900460ff1615808015610a2a5750600054600160ff909116105b80610a445750303b158015610a44575060005460ff166001145b610aa75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d1565b6000805460ff191660011790558015610aca576000805461ff0019166101001790555b610ad5600886610bb7565b610ae0600b85610bb7565b610aeb600384610bb7565b610af6600483610bb7565b6000196001558015610b42576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6060610b53610cd8565b905090565b6000610b648383610d43565b9392505050565b610b748161098f565b6001600160a01b0316336001600160a01b03161461045f576000356001600160e01b03191681336040516320e0f98d60e21b81526004016103d19392919061147c565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610bed57610bed6113b7565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610c2e57610c2e6113b7565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b8051600190600090815b81811015610cc05785858281518110610c8057610c806113e7565b60200260200101511115610c975760009350610cc0565b848181518110610ca957610ca96113e7565b602002602001015183019250806001019050610c65565b50828015610cce5750858211155b9695505050505050565b604080516003808252608082019092526060916020820183803683370190505090506001818160ff1681518110610d1157610d116113e7565b6020908102919091010152600581600260ff1681518110610d3457610d346113e7565b60200260200101818152505090565b60008082612710610d5486836114b3565b610d5e91906114c6565b610d6891906114dd565b9050610bb88111610d8a576103e88111610d83576000610d8d565b6001610d8d565b60025b949350505050565b6000610dab610da56001866114b3565b84610ea0565b82866002811115610dbe57610dbe6113b7565b60ff1681518110610dd157610dd16113e7565b6020026020010151610de39190611447565b95945050505050565b6000601e610dfb6001846114b3565b610e0590856114b3565b10159392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610e68576000356001600160e01b0319166001604051620f948f60ea1b81526004016103d19291906114ff565b565b806001600160a01b03163b60000361045f57604051630bfc64a360e21b81526001600160a01b03821660048201526024016103d1565b600081831015610eb05781610b64565b5090919050565b600060208284031215610ec957600080fd5b81356001600160e01b031981168114610b6457600080fd5b60008083601f840112610ef357600080fd5b50813567ffffffffffffffff811115610f0b57600080fd5b6020830191508360208260051b8501011115610f2657600080fd5b9250929050565b60008060208385031215610f4057600080fd5b823567ffffffffffffffff811115610f5757600080fd5b610f6385828601610ee1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610fa757835183529284019291840191600101610f8b565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ff257610ff2610fb3565b604052919050565b600067ffffffffffffffff82111561101457611014610fb3565b5060051b60200190565b80356001600160a01b0381168114610a0557600080fd5b600082601f83011261104657600080fd5b8135602061105b61105683610ffa565b610fc9565b8083825260208201915060208460051b87010193508684111561107d57600080fd5b602086015b848110156110995780358352918301918301611082565b509695505050505050565b600080600080600060a086880312156110bc57600080fd5b853567ffffffffffffffff808211156110d457600080fd5b818801915088601f8301126110e857600080fd5b813560206110f861105683610ffa565b82815260059290921b8401810191818101908c84111561111757600080fd5b948201945b8386101561113c5761112d8661101e565b8252948201949082019061111c565b9950508901359250508082111561115257600080fd5b5061115f88828901611035565b959895975050505060408401359360608101359360809091013592509050565b803560108110610a0557600080fd5b600080604083850312156111a157600080fd5b6111aa8361117f565b91506111b86020840161101e565b90509250929050565b6000806000806000606086880312156111d957600080fd5b853567ffffffffffffffff808211156111f157600080fd5b6111fd89838a01610ee1565b909750955060209150878201358181111561121757600080fd5b6112238a828b01610ee1565b90965094505060408801358181111561123b57600080fd5b88019050601f8101891361124e57600080fd5b803561125c61105682610ffa565b81815260059190911b8201830190838101908b83111561127b57600080fd5b928401925b828410156112a857833580151581146112995760008081fd5b82529284019290840190611280565b80955050505050509295509295909350565b600080600080604085870312156112d057600080fd5b843567ffffffffffffffff808211156112e857600080fd5b6112f488838901610ee1565b9096509450602087013591508082111561130d57600080fd5b5061131a87828801610ee1565b95989497509550505050565b60006020828403121561133857600080fd5b610b648261117f565b6000806000806080858703121561135757600080fd5b6113608561101e565b935061136e6020860161101e565b925061137c6040860161101e565b915061138a6060860161101e565b905092959194509250565b600080604083850312156113a857600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60208101600383106113e1576113e16113b7565b91905290565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561140f57600080fd5b610b648261101e565b60006020828403121561142a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561029457610294611431565b6010811061146a5761146a6113b7565b9052565b60208101610294828461145a565b6001600160e01b0319841681526060810161149a602083018561145a565b6001600160a01b03929092166040919091015292915050565b8181038181111561029457610294611431565b808202811582820484141761029457610294611431565b6000826114fa57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b03198316815260408101600b8310611520576115206113b7565b826020830152939250505056fed08d185790a07c7b9b721e2713c8580010a57f31c72c16f6e80b831d0ee45bfea2646970667358221220a88731885a136f6ffe2ef43beabc7b3a128ab2f3ee20d79c6777fe10326663bf64736f6c63430008170033", + "nonce": "0x2f129" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x654979ade55752136df9338da1f00bd477efeb2541fb0ba16c91a8157625d6cc", + "transactionType": "CREATE", + "contractName": "BridgeTracking", + "contractAddress": "0x3a3A92ba9d4D49aae06861136D547667c742F1aF", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x2fb53a", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100eb565b600154600160a81b900460ff161561008c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60015460ff600160a01b909104811610156100e9576001805460ff60a01b191660ff60a01b17905560405160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611ad5806100fa6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063c7c4fea91161008c578063de981f1b11610066578063de981f1b1461017e578063e2a75f36146101a9578063f67e8152146101bc578063f84bd121146101dc57600080fd5b8063c7c4fea914610145578063ca21287e14610158578063d25ed4c61461016b57600080fd5b80631794bb3c146100d4578063229f88ea146100e95780633b154455146100fc5780634ac0bcda146101045780635cd8a76b1461012a578063865e6fd314610132575b600080fd5b6100e76100e23660046114df565b6101e4565b005b6100e76100f736600461152f565b6102e4565b6100e761048c565b610117610112366004611559565b61055c565b6040519081526020015b60405180910390f35b6100e761057a565b6100e7610140366004611598565b610673565b6100e76101533660046115c4565b610692565b6100e7610166366004611604565b610a6b565b610117610179366004611660565b610b56565b61019161018c366004611679565b610b8b565b6040516001600160a01b039091168152602001610121565b6101176101b7366004611660565b610c01565b6101cf6101ca366004611694565b610c2b565b604051610121919061174f565b600254610117565b600154600160a81b900460ff161580801561020a575060018054600160a01b900460ff16105b8061022a5750303b15801561022a575060018054600160a01b900460ff16145b61024f5760405162461bcd60e51b815260040161024690611762565b60405180910390fd5b6001805460ff60a01b1916600160a01b179055801561027c576001805460ff60a81b1916600160a81b1790555b610287600285610c72565b610292600884610c72565b600282905580156102de576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60026102ef81610d16565b6102f7610d62565b6000600a600085600281111561030f5761030f6117b0565b6002811115610320576103206117b0565b81526020019081526020016000206000848152602001908152602001600020905080600001546000036102de57610355610d70565b60006103616008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c291906117c6565b808355600480546001818101835560009290925260029081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054939450928892849260ff1990921691849081111561041f5761041f6117b0565b02179055506001808201869055830160005b81548110156104745761046c8888848481548110610451576104516117df565b6000918252602090912001546001600160a01b031687611012565b600101610431565b50610483600185016000611452565b50505050505050565b600461049781610d16565b600019600b54146104df5760405162461bcd60e51b815260206004820152601260248201527130b63932b0b23c9034b734ba103932b8101960711b6044820152606401610246565b6104e96008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906117c6565b600b5561055960046000610c72565b50565b6000610571838361056c86611192565b6112b8565b90505b92915050565b600154600290600160a81b900460ff161580156105a5575060015460ff808316600160a01b90920416105b6105c15760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055600054610601906002906001600160a01b0316610c72565b600154610619906008906001600160a01b0316610c72565b600080546001600160a01b031916905560018054600161ff0160a01b031916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b61067b61130e565b61068481611368565b61068e8282610c72565b5050565b600261069d81610d16565b6106a5610d62565b60006106b16008610b8b565b6001600160a01b031663060406186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071291906117c6565b905061071c610d70565b6000600a6000876002811115610734576107346117b0565b6002811115610745576107456117b0565b81526020019081526020016000206000868152602001908152602001600020905080600001546000036107a7576001908101805491820181556000908152602090200180546001600160a01b0319166001600160a01b038516179055506102de565b6107b386868685611012565b600b548281101561048357600b8381556000906107cf90610b8b565b6001600160a01b0316639b19dbfd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561080c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108349190810190611816565b90506000610842838361139e565b9050600061084f84610c01565b9050600061085c85610b56565b9050600061086a600c610b8b565b9050600080826001600160a01b0316878786888c6040516024016108929594939291906118db565b60408051601f198184030181529181526020820180516001600160e01b0316634dca592560e01b179052516108c79190611975565b6000604051808303816000865af19150503d8060008114610904576040519150601f19603f3d011682016040523d82523d6000602084013e610909565b606091505b50915091508161096057604051634dca592560e01b906001600160a01b038516907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610957908590611991565b60405180910390a35b600061096c600d610b8b565b9050806001600160a01b03168b60405160240161098b91815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166302ddfca960e61b179052516109c09190611975565b6000604051808303816000865af19150503d80600081146109fd576040519150601f19603f3d011682016040523d82523d6000602084013e610a02565b606091505b50909350915082610a5a576040516302ddfca960e61b906001600160a01b038316907feaa424ccc38ebcf22402729592dedf8315790e0128cb577cdeff1a3ee627f82790610a51908690611991565b60405180910390a35b505050505050505050505050505050565b600154600390600160a81b900460ff16158015610a96575060015460ff808316600160a01b90920416105b610ab25760405162461bcd60e51b815260040161024690611762565b6001805460ff60a81b1960ff8416600160a01b021661ffff60a01b1990911617600160a81b179055610ae5600b86610c72565b610af0600c85610c72565b610afb600d84610c72565b610b06600483610c72565b600019600b556001805460ff60a81b1916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b600081815260096020526040902060010154610b7182611192565b15610b8657600654610b8390826119c4565b90505b919050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bc257610bc26117b0565b60ff1681526020810191909152604001600020546001600160a01b0316905080610b86578160405163409140df60e11b815260040161024691906119f9565b600081815260096020526040902054610c1982611192565b15610b8657600454610b8390826119c4565b6060610c6a8484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061139e92505050565b949350505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115610ca857610ca86117b0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115610ce957610ce96117b0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610d1f81610b8b565b6001600160a01b0316336001600160a01b031614610559576000356001600160e01b03191681336040516320e0f98d60e21b815260040161024693929190611a07565b600254431015610d6e57005b565b6000610d7c6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa158015610dc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dea91906117c6565b905080600360000154101561068e576000826001600160a01b031663468c96ae6003600001546001610e1c91906119c4565b6040518263ffffffff1660e01b8152600401610e3a91815260200190565b6040805180830381865afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a9190611a3e565b60038490556000818152600960205260408120600454815493955090935091839190610ea79084906119c4565b9091555050600654600182018054600090610ec39084906119c4565b90915550600090505b600854811015610f5357600880546000919083908110610eee57610eee6117df565b60009182526020808320909101546001600160a01b0316808352600782526040808420546002880190935283208054919450919290610f2e9084906119c4565b90915550506001600160a01b0316600090815260076020526040812055600101610ecc565b5060005b600454811015610fe557600060036001018281548110610f7957610f796117df565b6000918252602082206002918202018054909350600a91839160ff1690811115610fa557610fa56117b0565b6002811115610fb657610fb66117b0565b815260208082019290925260409081016000908120600195860154825290925290206003018590555001610f57565b50610ff260046000611470565b6000600581815560068290559061100a600882611452565b505050505050565b6000600a600086600281111561102a5761102a6117b0565b600281111561103b5761103b6117b0565b81526020808201929092526040908101600090812087825283528181206001600160a01b038716825260028101909352205490915060ff161561107e57506102de565b6001600160a01b03831660009081526002820160205260408120805460ff1916600117905560038201549081900361114b576001600160a01b038416600090815260076020526040812054900361111b57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6006805460019081019091556001600160a01b03851660009081526007602052604090208054909101905561100a565b82810361100a57600090815260096020908152604080832060018082018054820190556001600160a01b039790971684526002019091529020805490930190925550505050565b60008061119f6008610b8b565b60405163a3d545f560e01b81524360048201529091506000906001600160a01b0383169063a3d545f590602401602060405180830381865afa1580156111e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120d91906117c6565b9050600080836001600160a01b031663468c96ae600360000154600161123391906119c4565b6040518263ffffffff1660e01b815260040161125191815260200190565b6040805180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190611a3e565b915091508180156112a157508086145b80156112ae575060035483115b9695505050505050565b60008381526009602090815260408083206001600160a01b03861684526002019091529020548115611307576001600160a01b038316600090815260076020526040902054610c6a90826119c4565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610d6e576000356001600160e01b0319166001604051620f948f60ea1b8152600401610246929190611a71565b806001600160a01b03163b60000361055957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610246565b80516060908067ffffffffffffffff8111156113bc576113bc6117f5565b6040519080825280602002602001820160405280156113e5578160200160208202803683370190505b50915060006113f385611192565b905060005b828110156114495761142486868381518110611416576114166117df565b6020026020010151846112b8565b848281518110611436576114366117df565b60209081029190910101526001016113f8565b50505092915050565b50805460008255906000526020600020908101906105599190611491565b508054600082556002029060005260206000209081019061055991906114aa565b5b808211156114a65760008155600101611492565b5090565b5b808211156114a657805460ff19168155600060018201556002016114ab565b6001600160a01b038116811461055957600080fd5b6000806000606084860312156114f457600080fd5b83356114ff816114ca565b9250602084013561150f816114ca565b929592945050506040919091013590565b803560038110610b8657600080fd5b6000806040838503121561154257600080fd5b61154b83611520565b946020939093013593505050565b6000806040838503121561156c57600080fd5b82359150602083013561157e816114ca565b809150509250929050565b803560108110610b8657600080fd5b600080604083850312156115ab57600080fd5b6115b483611589565b9150602083013561157e816114ca565b6000806000606084860312156115d957600080fd5b6115e284611520565b92506020840135915060408401356115f9816114ca565b809150509250925092565b6000806000806080858703121561161a57600080fd5b8435611625816114ca565b93506020850135611635816114ca565b92506040850135611645816114ca565b91506060850135611655816114ca565b939692955090935050565b60006020828403121561167257600080fd5b5035919050565b60006020828403121561168b57600080fd5b61057182611589565b6000806000604084860312156116a957600080fd5b83359250602084013567ffffffffffffffff808211156116c857600080fd5b818601915086601f8301126116dc57600080fd5b8135818111156116eb57600080fd5b8760208260051b850101111561170057600080fd5b6020830194508093505050509250925092565b60008151808452602080850194506020840160005b8381101561174457815187529582019590820190600101611728565b509495945050505050565b6020815260006105716020830184611713565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156117d857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8051610b86816114ca565b6000602080838503121561182957600080fd5b825167ffffffffffffffff8082111561184157600080fd5b818501915085601f83011261185557600080fd5b815181811115611867576118676117f5565b8060051b604051601f19603f8301168101818110858211171561188c5761188c6117f5565b6040529182528482019250838101850191888311156118aa57600080fd5b938501935b828510156118cf576118c08561180b565b845293850193928501926118af565b98975050505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b50505083810360208501526119328189611713565b6040850197909752505050606081019290925260809091015292915050565b60005b8381101561196c578181015183820152602001611954565b50506000910152565b60008251611987818460208701611951565b9190910192915050565b60208152600082518060208401526119b0816040850160208701611951565b601f01601f19169190910160400192915050565b8082018082111561057457634e487b7160e01b600052601160045260246000fd5b601081106119f5576119f56117b0565b9052565b6020810161057482846119e5565b6001600160e01b03198416815260608101611a2560208301856119e5565b6001600160a01b03929092166040919091015292915050565b60008060408385031215611a5157600080fd5b82518015158114611a6157600080fd5b6020939093015192949293505050565b6001600160e01b03198316815260408101600b8310611a9257611a926117b0565b826020830152939250505056fea2646970667358221220262d80d2feb74067f3cddee2705a4fff0aac4921a9a54ee2314b0f244bccac3e64736f6c63430008170033", + "nonce": "0x2f12a" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xf141319220c49fe33883a82d7d180ad835c4c2794bbb51bc2e5870ad27a9dfab", + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0x4222384E84C248aa8D50FDC702a1b55E6b4efc99", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x206788", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "nonce": "0x2f12b" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x6fb9b0e921f8b65c67263c1a0771bc8997d12461adb0a26b4da588ca1bbf485d", + "transactionType": "CREATE", + "contractName": "RoninGatewayV3", + "contractAddress": "0xdA48f437Eb827CB997a7D09487D53bE72F2C57a8", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x8aad78", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b603754610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60375460ff9081161015620000ec576037805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6150b880620000fe6000396000f3fe6080604052600436106102975760003560e01c80638456cb591161015a578063ca15c873116100c1578063ecc836491161007a578063ecc836491461089f578063f0ce418e146108cc578063f23a6e6114610912578063f668214a1461093e578063fa3896591461095e578063fc6574bc1461097e576102a6565b8063ca15c873146107e7578063d547741f14610807578063dafae40814610827578063dbd2ef6c14610847578063de981f1b14610867578063e75235b814610887576102a6565b8063affed0e011610113578063affed0e0146106e5578063b9afa177146106fb578063b9c362091461071b578063bc197c811461073b578063bc7f038614610774578063c28f7894146107a1576102a6565b80638456cb591461063b578063865e6fd3146106505780639010d07c1461067057806391d14854146106905780639584a592146106b0578063a217fddf146106d0576102a6565b80633f4ba83a116101fe5780635d6a9a90116101b75780635d6a9a901461057257806364363f781461059f57806371706cbe146105bf57806375535f86146105d55780637de5dedd146105f5578063835fc6ca1461060a576102a6565b80633f4ba83a1461048f57806347b56b2c146104a45780634d92c4f0146104c45780635a7dd06a146105255780635c975abb146105455780635cd8a76b1461055d576102a6565b8063248a9ca311610250578063248a9ca3146103b15780632f2ff15d146103ef5780633101cfcb1461040f57806336568abe1461042f5780633e4574ec1461044f5780633e70838b1461046f576102a6565b806301ffc9a7146102ae578063065b3adf146102e35780630b1ff17f1461031b578063109679ef1461033b57806317892f961461035b57806317fa2ea114610384576102a6565b366102a6576102a46109d0565b005b6102a46109d0565b3480156102ba57600080fd5b506102ce6102c9366004613c2d565b6109e9565b60405190151581526020015b60405180910390f35b3480156102ef57600080fd5b50600554610303906001600160a01b031681565b6040516001600160a01b0390911681526020016102da565b34801561032757600080fd5b506102a4610336366004613c57565b610a09565b34801561034757600080fd5b506102a4610356366004613c88565b610a20565b34801561036757600080fd5b506078546079545b604080519283526020830191909152016102da565b34801561039057600080fd5b506103a461039f366004613ce5565b610a53565b6040516102da9190613d26565b3480156103bd57600080fd5b506103e16103cc366004613d60565b6000908152606b602052604090206001015490565b6040519081526020016102da565b3480156103fb57600080fd5b506102a461040a366004613d99565b610d90565b34801561041b57600080fd5b506102a461042a366004613dc9565b610dba565b34801561043b57600080fd5b506102a461044a366004613d99565b610e66565b34801561045b57600080fd5b506102ce61046a366004613d99565b610ee0565b34801561047b57600080fd5b506102a461048a366004613dc9565b610f10565b34801561049b57600080fd5b506102a4610f3a565b3480156104b057600080fd5b506102a46104bf366004613d60565b610f4c565b3480156104d057600080fd5b506105156104df366004613de6565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b6040516102da9493929190613e1e565b34801561053157600080fd5b506102a4610540366004613e4e565b611117565b34801561055157600080fd5b5060005460ff166102ce565b34801561056957600080fd5b506102a461117e565b34801561057e57600080fd5b5061059261058d366004613ec8565b611280565b6040516102da9190613f04565b3480156105ab57600080fd5b506102a46105ba366004613f30565b611324565b3480156105cb57600080fd5b506103e1606e5481565b3480156105e157600080fd5b5061036f6105f0366004613de6565b611360565b34801561060157600080fd5b506103e1611381565b34801561061657600080fd5b5061062a610625366004613d60565b611398565b6040516102da959493929190613ff8565b34801561064757600080fd5b506102a461146a565b34801561065c57600080fd5b506102a461066b36600461404e565b61147a565b34801561067c57600080fd5b5061030361068b366004613de6565b611495565b34801561069c57600080fd5b506102ce6106ab366004613d99565b6114ad565b3480156106bc57600080fd5b506102a46106cb36600461408b565b6114d8565b3480156106dc57600080fd5b506103e1600081565b3480156106f157600080fd5b506103e160045481565b34801561070757600080fd5b506103a4610716366004614184565b611625565b34801561072757600080fd5b506102a4610736366004613de6565b611743565b34801561074757600080fd5b50610767610756366004614368565b63bc197c8160e01b95945050505050565b6040516102da9190614415565b34801561078057600080fd5b506103e161078f366004613dc9565b60386020526000908152604090205481565b3480156107ad57600080fd5b506105156107bc366004613d60565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156107f357600080fd5b506103e1610802366004613d60565b611755565b34801561081357600080fd5b506102a4610822366004613d99565b61176c565b34801561083357600080fd5b506102ce610842366004613d60565b611791565b34801561085357600080fd5b506102a461086236600461442a565b6117bd565b34801561087357600080fd5b506103036108823660046144ed565b61180f565b34801561089357600080fd5b5060015460025461036f565b3480156108ab57600080fd5b506108bf6108ba366004614508565b61188a565b6040516102da91906145a3565b3480156108d857600080fd5b506105156108e7366004613d60565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561091e57600080fd5b5061076761092d366004614607565b63f23a6e6160e01b95945050505050565b34801561094a57600080fd5b506102ce610959366004613d60565b6119f1565b34801561096a57600080fd5b506102a4610979366004613f30565b611a1f565b34801561098a57600080fd5b506102ce61099936600461466f565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b60006109f482611c1a565b80610a035750610a0382611c3f565b92915050565b610a11611c64565b610a1c823383611caa565b5050565b610a28611c64565b610a30611d79565b610a50610a4236839003830183614746565b33610a4b611381565b611e1a565b50565b6060610a5d611d79565b336000610a68611381565b9050600084806001600160401b03811115610a8557610a856141f9565b604051908082528060200260200182016040528015610aae578160200160208202803683370190505b5094506000610abd600361180f565b905060005b82811015610d8457888882818110610adc57610adc6147d7565b905060200201359350816001600160a01b031663c7c4fea9600286896040518463ffffffff1660e01b8152600401610b16939291906147ed565b600060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b50505050610b51846119f1565b15610b7b576001878281518110610b6a57610b6a6147d7565b911515602092830291909101909101525b600084815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610bc257610bc2613e08565b6001811115610bd357610bd3613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff1690811115610c6b57610c6b613e08565b6002811115610c7c57610c7c613e08565b81526001820154602082015260029091015460409091015290525090506000610ca482612121565b90506000610cb4848b8b856121eb565b90506001816004811115610cca57610cca613e08565b03610d7557835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d0991908c90600401614817565b600060405180830381600087803b158015610d2357600080fd5b505af1158015610d37573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610d6c92919061482e565b60405180910390a15b50505050806001019050610ac2565b50505050505092915050565b6000828152606b6020526040902060010154610dab8161221e565b610db58383612228565b505050565b603754600390610100900460ff16158015610ddc575060375460ff8083169116105b610e015760405162461bcd60e51b8152600401610df89061488d565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e20600b8361224a565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610ed65760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610df8565b610a1c82826122ee565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f18612310565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610f4261236a565b610f4a6123d9565b565b610f54611c64565b610f5d816119f1565b15610f7b576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff1690811115610fba57610fba613e08565b6001811115610fcb57610fcb613e08565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff169081111561106357611063613e08565b600281111561107457611074613e08565b8152600182015460208201526002909101546040918201529152606083015101519192505046146110de576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61110882612121565b82604051610e5a92919061482e565b61111f611c64565b816000819003611142576040516316ee9d3b60e11b815260040160405180910390fd5b60005b818110156111775761116f858583818110611162576111626147d7565b905060a002013385611caa565b600101611145565b5050505050565b603754600290610100900460ff161580156111a0575060375460ff8083169116105b6111bc5760405162461bcd60e51b8152600401610df89061488d565b6037805461ffff191660ff8316176101001790556074546111e8906008906001600160a01b031661224a565b607554611200906003906001600160a01b031661224a565b60775461121890600a906001600160a01b031661224a565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660028111156112d4576112d4613e08565b60028111156112e5576112e5613e08565b815290546001600160a01b0361010090910481166020928301529082015191925016610a0357604051631b79f53b60e21b815260040160405180910390fd5b61132c612310565b600083900361134e576040516316ee9d3b60e11b815260040160405180910390fd5b61135a8484848461242b565b50505050565b60008061136b612310565b611375848461250e565b915091505b9250929050565b600061139361138e612598565b612605565b905090565b607160209081526000918252604091829020805460018201548451606080820187526002808601546001600160a01b03908116845260038701548116848901526004870154848a015288518084018a526005880154821681526006880154909116978101979097526007860154878901528751918201909752600885018054949760ff94851697939693959394929391928492169081111561143c5761143c613e08565b600281111561144d5761144d613e08565b815260200160018201548152602001600282015481525050905085565b61147261236a565b610f4a61263b565b611482612310565b61148b81612678565b610a1c828261224a565b6000828152606c60205260408120610f0990836126ae565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff16158080156114f85750603754600160ff909116105b806115125750303b158015611512575060375460ff166001145b61152e5760405162461bcd60e51b8152600401610df89061488d565b6037805460ff191660011790558015611551576037805461ff0019166101001790555b61155c60008d6126ba565b6115668b8b6126c4565b611570898961250e565b506000905061157f86806148db565b905011156115d1576115b261159486806148db565b6115a160208901896148db565b6115ab89806148db565b8989612754565b6115d16115bf86806148db565b6115cc60208801886148db565b61242b565b8015611617576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b606061162f611c64565b611637611d79565b81806001600160401b03811115611650576116506141f9565b604051908082528060200260200182016040528015611679578160200160208202803683370190505b5091506000611686611381565b9050611690613bc0565b60005b83811015611739578686828181106116ad576116ad6147d7565b905061016002018036038101906116c49190614746565b915060026040808401518101516000908152606f6020908152828220865183529052205460ff1660048111156116fc576116fc613e08565b03611726576001858281518110611715576117156147d7565b911515602092830291909101909101525b611731823385611e1a565b600101611693565b5050505092915050565b61174b612310565b610a1c82826126c4565b6000818152606c60205260408120610a0390612970565b6000828152606b60205260409020600101546117878161221e565b610db583836122ee565b600061179b612598565b6001546117a8919061493a565b6002546117b5908461493a565b101592915050565b6117c5612310565b60008790036117f5576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6118058888888888888888612754565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561184657611846613e08565b60ff1681526020810191909152604001600020546001600160a01b0316905080611885578160405163409140df60e11b8152600401610df89190614951565b919050565b6060816001600160401b038111156118a4576118a46141f9565b6040519080825280602002602001820160405280156118d757816020015b60608152602001906001900390816118c25790505b50905060005b828110156119e957600085815260726020526040812090858584818110611906576119066147d7565b905060200201602081019061191b9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002080546119469061496b565b80601f01602080910402602001604051908101604052809291908181526020018280546119729061496b565b80156119bf5780601f10611994576101008083540402835291602001916119bf565b820191906000526020600020905b8154815290600101906020018083116119a257829003601f168201915b50505050508282815181106119d6576119d66147d7565b60209081029190910101526001016118dd565b509392505050565b6000600260008381526070602052604090205460ff166004811115611a1857611a18613e08565b1492915050565b611a27611c64565b611a2f611d79565b33838015801590611a3f57508083145b611a6a576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b6000611a74611381565b9050600080611a83600361180f565b905060005b84811015611c0e57898982818110611aa257611aa26147d7565b905060200201359250878782818110611abd57611abd6147d7565b9050602002810190611acf919061499f565b60008581526072602090815260408083206001600160a01b038c168452909152902091611afd919083614a35565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611b2f9060019087908b906004016147ed565b600060405180830381600087803b158015611b4957600080fd5b505af1158015611b5d573d6000803e3d6000fd5b50505060008481526076602052604081209150611b7c828988886121eb565b90506001816004811115611b9257611b92613e08565b03611c0457815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611bd1906001908990600401614817565b600060405180830381600087803b158015611beb57600080fd5b505af1158015611bff573d6000803e3d6000fd5b505050505b5050600101611a88565b50505050505050505050565b60006001600160e01b03198216635a05180f60e01b1480610a035750610a038261297a565b60006001600160e01b03198216630271189760e51b1480610a035750610a0382611c1a565b60005460ff1615610f4a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610df8565b611cc4611cbf36859003850160408601614af4565b6129af565b611ccd836129f3565b6000611ce8611ce26040860160208701613dc9565b83611280565b80519091506002811115611cfe57611cfe613e08565b611d0e6060860160408701614b10565b6002811115611d1f57611d1f613e08565b14611d3c5760405162035e2b60ea1b815260040160405180910390fd5b611d6983611d506040870160208801613dc9565b611d6236889003880160408901614af4565b9190612a71565b6111778483858460200151612bfc565b611d83600b61180f565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611dc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ded9190614b2b565b610f4a576000356001600160e01b0319166006604051620f948f60ea1b8152600401610df8929190614b4d565b82516080840151611e2a906129af565b600084602001516001811115611e4257611e42613e08565b14611e605760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611eae576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610df8565b6000611eca856060015160200151866040015160400151611280565b6080860151519091506002811115611ee457611ee4613e08565b81516002811115611ef757611ef7613e08565b148015611f2157508460400151602001516001600160a01b031681602001516001600160a01b0316145b611f3e5760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f6020908152828220858352905290812090611f6887612121565b90506000611f78838888856121eb565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b645985604051611fbf91815260200190565b60405180910390a46000611fd3600361180f565b90506001826004811115611fe957611fe9613e08565b036120b357835460ff191660021784556060890151805160209091015160808b01516120189290916000612d8e565b885160405163114fc47560e11b81526001600160a01b0383169163229f88ea9161204791600091600401614817565b600060405180830381600087803b15801561206157600080fd5b505af1158015612075573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524838a6040516120aa92919061482e565b60405180910390a15b885160405163c7c4fea960e01b81526001600160a01b0383169163c7c4fea9916120e4916000918d906004016147ed565b600060405180830381600087803b1580156120fe57600080fd5b505af1158015612112573d6000803e3d6000fd5b50505050505050505050505050565b6000806121318360400151612fa7565b905060006121428460600151612fa7565b905060006121968560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b60006121f8858584612fef565b600061220486846130a5565b9050612212868583866131a9565b9150505b949350505050565b610a5081336131f5565b6122328282613259565b6000828152606c60205260409020610db590826132df565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561228057612280613e08565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156122c1576122c1613e08565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6122f882826132f4565b6000828152606c60205260409020610db5908261335b565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806123ac57506005546001600160a01b031633145b610f4a576000356001600160e01b0319166001604051620f948f60ea1b8152600401610df8929190614b4d565b6123e1613370565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b828114612459576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b838110156124ca57828282818110612476576124766147d7565b9050602002013560386000878785818110612493576124936147d7565b90506020020160208101906124a89190613dc9565b6001600160a01b0316815260208101919091526040016000205560010161245c565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da848484846040516125009493929190614bf6565b60405180910390a150505050565b600080828411156125325760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba910160405180910390a49250929050565b60006125a4600b61180f565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113939190614c28565b600060025460016002548460015461261d919061493a565b6126279190614c41565b6126319190614c54565b610a039190614c67565b612643611c64565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861240e3390565b806001600160a01b03163b600003610a5057604051630bfc64a360e21b81526001600160a01b0382166004820152602401610df8565b6000610f0983836133b9565b610a1c8282612228565b808211156126f3576000356001600160e01b0319166040516387f6f09560e01b8152600401610df89190614415565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b868514801561276257508683145b61278d576000356001600160e01b0319166040516306b5667560e21b8152600401610df89190614415565b60005b87811015612920578686828181106127aa576127aa6147d7565b90506020020160208101906127bf9190613dc9565b607360008b8b858181106127d5576127d56147d7565b90506020020160208101906127ea9190613dc9565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087878581811061281e5761281e6147d7565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555082828281811061286c5761286c6147d7565b90506020020160208101906128819190614b10565b607360008b8b85818110612897576128976147d7565b90506020020160208101906128ac9190613dc9565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008787858181106128e0576128e06147d7565b60209081029290920135835250810191909152604001600020805460ff1916600183600281111561291357612913613e08565b0217905550600101612790565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401888888888888888860405161295e989796959493929190614c89565b60405180910390a15050505050505050565b6000610a03825490565b60006001600160e01b03198216637965db0b60e01b1480610a0357506301ffc9a760e01b6001600160e01b0319831614610a03565b6129b8816133e3565b806129c757506129c78161341a565b806129d657506129d681613442565b610a505760405163034992a760e51b815260040160405180910390fd5b6000612a056060830160408401614b10565b6002811115612a1657612a16613e08565b148015612a53575060386000612a326040840160208501613dc9565b6001600160a01b031681526020810191909152604001600020546080820135105b15610a5057604051636eff4a8560e11b815260040160405180910390fd5b600060608185516002811115612a8957612a89613e08565b03612b645760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612af09190614d18565b6000604051808303816000865af19150503d8060008114612b2d576040519150601f19603f3d011682016040523d82523d6000602084013e612b32565b606091505b509092509050818015612b5d575080511580612b5d575080806020019051810190612b5d9190614b2b565b9150612bd6565b600185516002811115612b7957612b79613e08565b03612b8e57612b5d838530886020015161346b565b600285516002811115612ba357612ba3613e08565b03612bbd57612b5d83853088602001518960400151613519565b6040516361e411a760e11b815260040160405180910390fd5b816111775784843085604051639d2e4c6760e01b8152600401610df89493929190614d34565b606e805460009182612c0d83614d6a565b9091555090506000612c3484838588612c2b368c90038c018c614d83565b939291906135cd565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612c7357612c73613e08565b02179055506040828101518051600280850180546001600160a01b039384166001600160a01b03199182161790915560208085015160038801805491861691841691909117905593850151600487015560608701518051600588018054918616918416919091179055938401516006870180549190941691161790915591015160078301556080830151805160088401805492939092839160ff19909116906001908490811115612d2657612d26613e08565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612d6e82612121565b82604051612d7d92919061482e565b60405180910390a150949350505050565b806001600160a01b0316826001600160a01b031603612e3b5760408085015190516001600160a01b0385169180156108fc02916000818181858888f19350505050612e3657806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e1257600080fd5b505af1158015612e26573d6000803e3d6000fd5b5050505050612e36848484613639565b61135a565b600084516002811115612e5057612e50613e08565b03612f16576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015612e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ec09190614c28565b90508460400151811015612f0557612ee88330838860400151612ee39190614c54565b6136b8565b612f0557604051632f739fff60e11b815260040160405180910390fd5b612f10858585613639565b5061135a565b600184516002811115612f2b57612f2b613e08565b03612f5c57612f3f8284866020015161375d565b612e365760405163c8e3a09f60e01b815260040160405180910390fd5b600284516002811115612f7157612f71613e08565b03612bbd57612f8a828486602001518760400151613784565b612e36576040516334b471a760e21b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b60008360030154118015613007575042836003015411155b1561301857825460ff191660041783555b6001600160a01b03821660009081526002840160205260409020541561305c5760405163025fd59560e41b81526001600160a01b0383166004820152602401610df8565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b60008060006130b4600b61180f565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa1580156130f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526131199190810190614e3e565b81519194509250905060005b818110156117395785876002016000868481518110613146576131466147d7565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036131a157828181518110613186576131866147d7565b60200260200101516bffffffffffffffffffffffff16850194505b600101613125565b60008383101580156131d057506000855460ff1660048111156131ce576131ce613e08565b145b156131e857845460ff19166001908117865585018290555b5050915460ff1692915050565b6131ff82826114ad565b610a1c57613217816001600160a01b031660146137ad565b6132228360206137ad565b604051602001613233929190614f36565b60408051601f198184030181529082905262461bcd60e51b8252610df891600401614fab565b61326382826114ad565b610a1c576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561329b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f09836001600160a01b038416613948565b6132fe82826114ad565b15610a1c576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f09836001600160a01b038416613997565b60005460ff16610f4a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610df8565b60008260000182815481106133d0576133d06147d7565b9060005260206000200154905092915050565b600080825160028111156133f9576133f9613e08565b14801561340a575060008260400151115b8015610a03575050602001511590565b600060018251600281111561343157613431613e08565b148015610a03575050604001511590565b600060028251600281111561345957613459613e08565b148015610a0357505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928716916134cb91614d18565b6000604051808303816000865af19150503d8060008114613508576040519150601f19603f3d011682016040523d82523d6000602084013e61350d565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b0387169061354990879087908790879060448101614fbe565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b1790525161357e9190614d18565b6000604051808303816000865af19150503d80600081146135bb576040519150601f19603f3d011682016040523d82523d6000602084013e6135c0565b606091505b5090979650505050505050565b6135d5613bc0565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b6000808451600281111561364f5761364f613e08565b0361366a5761366382848660400151613a8a565b9050613694565b60018451600281111561367f5761367f613e08565b03612bbd57613663823085876020015161346b565b8061135a578383836040516341bd7d9160e11b8152600401610df893929190614ff8565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b179052915160009286169161371091614d18565b6000604051808303816000865af19150503d806000811461374d576040519150601f19603f3d011682016040523d82523d6000602084013e613752565b606091505b509095945050505050565b600061376b8430858561346b565b905080610f095761377d8484846136b8565b9050610f09565b60006137938530868686613519565b905080612216576137a685858585613b5d565b9050612216565b606060006137bc83600261493a565b6137c7906002614c41565b6001600160401b038111156137de576137de6141f9565b6040519080825280601f01601f191660200182016040528015613808576020820181803683370190505b509050600360fc1b81600081518110613823576138236147d7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613852576138526147d7565b60200101906001600160f81b031916908160001a905350600061387684600261493a565b613881906001614c41565b90505b60018111156138f9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106138b5576138b56147d7565b1a60f81b8282815181106138cb576138cb6147d7565b60200101906001600160f81b031916908160001a90535060049490941c936138f281615028565b9050613884565b508315610f095760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610df8565b600081815260018301602052604081205461398f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a03565b506000610a03565b60008181526001830160205260408120548015613a805760006139bb600183614c54565b85549091506000906139cf90600190614c54565b9050818114613a345760008660000182815481106139ef576139ef6147d7565b9060005260206000200154905080876000018481548110613a1257613a126147d7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613a4557613a4561503f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a03565b6000915050610a03565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613ae79190614d18565b6000604051808303816000865af19150503d8060008114613b24576040519150601f19603f3d011682016040523d82523d6000602084013e613b29565b606091505b509092509050818015613b54575080511580613b54575080806020019051810190613b549190614b2b565b95945050505050565b604080516000808252602082019092526001600160a01b03861690613b8b9086908690869060448101615055565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b179052516134cb9190614d18565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613c3f57600080fd5b81356001600160e01b031981168114610f0957600080fd5b60008082840360c0811215613c6b57600080fd5b60a0811215613c7957600080fd5b50919360a08501359350915050565b60006101608284031215613c9b57600080fd5b50919050565b60008083601f840112613cb357600080fd5b5081356001600160401b03811115613cca57600080fd5b6020830191508360208260051b850101111561137a57600080fd5b60008060208385031215613cf857600080fd5b82356001600160401b03811115613d0e57600080fd5b613d1a85828601613ca1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561350d578351151583529284019291840191600101613d42565b600060208284031215613d7257600080fd5b5035919050565b6001600160a01b0381168114610a5057600080fd5b803561188581613d79565b60008060408385031215613dac57600080fd5b823591506020830135613dbe81613d79565b809150509250929050565b600060208284031215613ddb57600080fd5b8135610f0981613d79565b60008060408385031215613df957600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6080810160058610613e3257613e32613e08565b9481526020810193909352604083019190915260609091015290565b600080600060408486031215613e6357600080fd5b83356001600160401b0380821115613e7a57600080fd5b818601915086601f830112613e8e57600080fd5b813581811115613e9d57600080fd5b87602060a083028501011115613eb257600080fd5b6020928301989097509590910135949350505050565b60008060408385031215613edb57600080fd5b8235613ee681613d79565b946020939093013593505050565b60038110610a5057610a50613e08565b81516040820190613f1481613ef4565b82526020928301516001600160a01b0316929091019190915290565b60008060008060408587031215613f4657600080fd5b84356001600160401b0380821115613f5d57600080fd5b613f6988838901613ca1565b90965094506020870135915080821115613f8257600080fd5b50613f8f87828801613ca1565b95989497509550505050565b60028110613fab57613fab613e08565b9052565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b8051613fe181613ef4565b825260208181015190830152604090810151910152565b858152610160810161400d6020830187613f9b565b61401a6040830186613faf565b61402760a0830185613faf565b614035610100830184613fd6565b9695505050505050565b80356010811061188557600080fd5b6000806040838503121561406157600080fd5b61406a8361403f565b91506020830135613dbe81613d79565b8060408101831015610a0357600080fd5b60008060008060008060008060008060006101208c8e0312156140ad57600080fd5b6140b68c613d8e565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e013511156140ed57600080fd5b6140fd8e60a08f01358f01613ca1565b909750955060c08d013581101561411357600080fd5b6141238e60c08f01358f0161407a565b94508060e08e0135111561413657600080fd5b6141468e60e08f01358f0161407a565b9350806101008e0135111561415a57600080fd5b5061416c8d6101008e01358e01613ca1565b81935080925050509295989b509295989b9093969950565b6000806020838503121561419757600080fd5b82356001600160401b03808211156141ae57600080fd5b818501915085601f8301126141c257600080fd5b8135818111156141d157600080fd5b866020610160830285010111156141e757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614231576142316141f9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561425f5761425f6141f9565b604052919050565b60006001600160401b03821115614280576142806141f9565b5060051b60200190565b600082601f83011261429b57600080fd5b813560206142b06142ab83614267565b614237565b8083825260208201915060208460051b8701019350868411156142d257600080fd5b602086015b848110156142ee57803583529183019183016142d7565b509695505050505050565b600082601f83011261430a57600080fd5b81356001600160401b03811115614323576143236141f9565b614336601f8201601f1916602001614237565b81815284602083860101111561434b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561438057600080fd5b853561438b81613d79565b9450602086013561439b81613d79565b935060408601356001600160401b03808211156143b757600080fd5b6143c389838a0161428a565b945060608801359150808211156143d957600080fd5b6143e589838a0161428a565b935060808801359150808211156143fb57600080fd5b50614408888289016142f9565b9150509295509295909350565b6001600160e01b031991909116815260200190565b6000806000806000806000806080898b03121561444657600080fd5b88356001600160401b038082111561445d57600080fd5b6144698c838d01613ca1565b909a50985060208b013591508082111561448257600080fd5b61448e8c838d01613ca1565b909850965060408b01359150808211156144a757600080fd5b6144b38c838d01613ca1565b909650945060608b01359150808211156144cc57600080fd5b506144d98b828c01613ca1565b999c989b5096995094979396929594505050565b6000602082840312156144ff57600080fd5b610f098261403f565b60008060006040848603121561451d57600080fd5b8335925060208401356001600160401b0381111561453a57600080fd5b61454686828701613ca1565b9497909650939450505050565b60005b8381101561456e578181015183820152602001614556565b50506000910152565b6000815180845261458f816020860160208601614553565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156145fa57603f198886030184526145e8858351614577565b945092850192908501906001016145cc565b5092979650505050505050565b600080600080600060a0868803121561461f57600080fd5b853561462a81613d79565b9450602086013561463a81613d79565b9350604086013592506060860135915060808601356001600160401b0381111561466357600080fd5b614408888289016142f9565b60008060006060848603121561468457600080fd5b8335925060208401359150604084013561469d81613d79565b809150509250925092565b6000606082840312156146ba57600080fd5b6146c261420f565b905081356146cf81613d79565b815260208201356146df81613d79565b806020830152506040820135604082015292915050565b80356003811061188557600080fd5b60006060828403121561471757600080fd5b61471f61420f565b905061472a826146f6565b8152602082013560208201526040820135604082015292915050565b6000610160828403121561475957600080fd5b60405160a081018181106001600160401b038211171561477b5761477b6141f9565b6040528235815260208301356002811061479457600080fd5b60208201526147a684604085016146a8565b60408201526147b88460a085016146a8565b60608201526147cb846101008501614705565b60808201529392505050565b634e487b7160e01b600052603260045260246000fd5b606081016147fa85613ef4565b93815260208101929092526001600160a01b031660409091015290565b6040810161482484613ef4565b9281526020015290565b6000610180820190508382528251602083015260208301516148536040840182613f9b565b5060408301516148666060840182613faf565b50606083015161487960c0840182613faf565b5060808301516119e9610120840182613fd6565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e198436030181126148f257600080fd5b8301803591506001600160401b0382111561490c57600080fd5b6020019150600581901b360382131561137a57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a0357610a03614924565b602081016010831061496557614965613e08565b91905290565b600181811c9082168061497f57607f821691505b602082108103613c9b57634e487b7160e01b600052602260045260246000fd5b6000808335601e198436030181126149b657600080fd5b8301803591506001600160401b038211156149d057600080fd5b60200191503681900382131561137a57600080fd5b601f821115610db5576000816000526020600020601f850160051c81016020861015614a0e5750805b601f850160051c820191505b81811015614a2d57828155600101614a1a565b505050505050565b6001600160401b03831115614a4c57614a4c6141f9565b614a6083614a5a835461496b565b836149e5565b6000601f841160018114614a945760008515614a7c5750838201355b600019600387901b1c1916600186901b178355611177565b600083815260209020601f19861690835b82811015614ac55786850135825560209485019460019092019101614aa5565b5086821015614ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060608284031215614b0657600080fd5b610f098383614705565b600060208284031215614b2257600080fd5b610f09826146f6565b600060208284031215614b3d57600080fd5b81518015158114610f0957600080fd5b6001600160e01b03198316815260408101600b8310614b6e57614b6e613e08565b8260208301529392505050565b8183526000602080850194508260005b85811015614bb9578135614b9e81613d79565b6001600160a01b031687529582019590820190600101614b8b565b509495945050505050565b81835260006001600160fb1b03831115614bdd57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000614c0a604083018688614b7b565b8281036020840152614c1d818587614bc4565b979650505050505050565b600060208284031215614c3a57600080fd5b5051919050565b80820180821115610a0357610a03614924565b81810381811115610a0357610a03614924565b600082614c8457634e487b7160e01b600052601260045260246000fd5b500490565b608081526000614c9d608083018a8c614b7b565b60208382036020850152614cb2828a8c614b7b565b91508382036040850152614cc782888a614bc4565b848103606086015285815286925060200160005b86811015614d0757614cec846146f6565b614cf581613ef4565b82529282019290820190600101614cdb565b509c9b505050505050505050505050565b60008251614d2a818460208701614553565b9190910192915050565b60c08101614d428287613fd6565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b600060018201614d7c57614d7c614924565b5060010190565b600060a08284031215614d9557600080fd5b614d9d61420f565b8235614da881613d79565b81526020830135614db881613d79565b6020820152614dca8460408501614705565b60408201529392505050565b600082601f830112614de757600080fd5b81516020614df76142ab83614267565b8083825260208201915060208460051b870101935086841115614e1957600080fd5b602086015b848110156142ee578051614e3181613d79565b8352918301918301614e1e565b600080600060608486031215614e5357600080fd5b83516001600160401b0380821115614e6a57600080fd5b614e7687838801614dd6565b9450602091508186015181811115614e8d57600080fd5b614e9988828901614dd6565b945050604086015181811115614eae57600080fd5b86019050601f81018713614ec157600080fd5b8051614ecf6142ab82614267565b81815260059190911b82018301908381019089831115614eee57600080fd5b928401925b82841015614f275783516bffffffffffffffffffffffff81168114614f185760008081fd5b82529284019290840190614ef3565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f6e816017850160208801614553565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614f9f816028840160208801614553565b01602801949350505050565b602081526000610f096020830184614577565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614c1d90830184614577565b60a081016150068286613fd6565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161503757615037614924565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b0385168152836020820152826040820152608060608201526000614035608083018461457756fea2646970667358221220f2c96cbb22626006ee11ff90975b91b23886e548ed7a61504409d1948b356f0f64736f6c63430008170033", + "nonce": "0x2f12c" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x88f864693662cd6f8b970cb5f1f0d8ef9c75a182d113c7922eeed584f677c694", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x8fcf4", + "value": "0x0", + "data": "0x663ac0110000000000000000000000000000000000000000000000000000000066309b0400000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000010a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef2860000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec9400000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000da48f437eb827cb997a7d09487d53be72f2c57a80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x262" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x1ed4ca9cd1570633ec8d8cf949a11a1eae6f7d0b057820ef078e6942e5dffa40", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0xb033ba62ec622dc54d0abfe0254e79692147ca26", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x112a880", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000066309b0400000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef2860000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec9400000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000da48f437eb827cb997a7d09487d53be72f2c57a80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x65" + }, + "additionalContracts": [], + "isFixedGasLimit": true + }, + { + "hash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "function": null, + "arguments": null, + "transaction": { + "type": "0x00", + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0xb0507f2f22697022ecb25963a00d3d076dac5753", + "gas": "0x112a880", + "value": "0x0", + "data": "0xa8a0e32c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000066309b0400000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef2860000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec9400000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000da48f437eb827cb997a7d09487d53be72f2c57a80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x5a" + }, + "additionalContracts": [], + "isFixedGasLimit": true + } + ], + "receipts": [ + { + "transactionHash": "0x0206aa397c251997e5fef0b9533415b0e0400594367f9203456e008d05499501", + "transactionIndex": "0x0", + "blockHash": "0x23a6f4ec211937ac48764496fd88302fb7adda78d3f57e829157f4dfe696f60f", + "blockNumber": "0x1949928", + "from": "0xe1100401454B5f850b09f3b92cE7f071C5F1CEF4", + "to": "0x53Ea388CB72081A3a397114a43741e7987815896", + "cumulativeGasUsed": "0x29401", + "gasUsed": "0x29401", + "contractAddress": null, + "logs": [ + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c", + "0x000000000000000000000000e1100401454b5f850b09f3b92ce7f071c5f1cef4" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0x23a6f4ec211937ac48764496fd88302fb7adda78d3f57e829157f4dfe696f60f", + "blockNumber": "0x1949928", + "transactionHash": "0x0206aa397c251997e5fef0b9533415b0e0400594367f9203456e008d05499501", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0x5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c" + ], + "data": "0x", + "blockHash": "0x23a6f4ec211937ac48764496fd88302fb7adda78d3f57e829157f4dfe696f60f", + "blockNumber": "0x1949928", + "transactionHash": "0x0206aa397c251997e5fef0b9533415b0e0400594367f9203456e008d05499501", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + }, + { + "address": "0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000053ea388cb72081a3a397114a43741e7987815896000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753", + "blockHash": "0x23a6f4ec211937ac48764496fd88302fb7adda78d3f57e829157f4dfe696f60f", + "blockNumber": "0x1949928", + "transactionHash": "0x0206aa397c251997e5fef0b9533415b0e0400594367f9203456e008d05499501", + "transactionIndex": "0x0", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x53Ea388CB72081A3a397114a43741e7987815896", + "topics": [ + "0xe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba", + "0xc3d2b68e9a7c0ec3a1a5df197f5a38348c52edd72740f605436476faa32cab1c" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x23a6f4ec211937ac48764496fd88302fb7adda78d3f57e829157f4dfe696f60f", + "blockNumber": "0x1949928", + "transactionHash": "0x0206aa397c251997e5fef0b9533415b0e0400594367f9203456e008d05499501", + "transactionIndex": "0x0", + "logIndex": "0x3", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000020000020000000000000000000000000000000000000000000000000000020000000000000000004000000000000000000000000000000000000080000000000000004000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000040000000000200010000000000000000000000800000000000000000008000000080000000000000000400000000000000000010004000000000000000000000000000000000000000000400000000002000400000010000000000004000000000000000080000000000000000000004000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x88a3b563a8bda1da038e94a90d37b8c03d4383ec602b892ecfc2bc414d11fa93", + "transactionIndex": "0x0", + "blockHash": "0xaa0e3664f810a85208493e65f362b1b60122ae54abbd5390735e52f0635a6675", + "blockNumber": "0x194992b", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x15cb08", + "gasUsed": "0x15cb08", + "contractAddress": "0x7bEB0f3fC4002C4542015cFa9023dEE1A9EC9400", + "logs": [ + { + "address": "0x7bEB0f3fC4002C4542015cFa9023dEE1A9EC9400", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0xaa0e3664f810a85208493e65f362b1b60122ae54abbd5390735e52f0635a6675", + "blockNumber": "0x194992b", + "transactionHash": "0x88a3b563a8bda1da038e94a90d37b8c03d4383ec602b892ecfc2bc414d11fa93", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x9d4495274114cd427debfe5d5c13a3aa6b61ab3261ae9b7ad90a9fff9515d2f9", + "transactionIndex": "0x0", + "blockHash": "0x0903a71b1c8dec5f1043dbce7cb378d32d8cbcc404ca0ebd9d2e89f7b573bedb", + "blockNumber": "0x194992e", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x135cef", + "gasUsed": "0x135cef", + "contractAddress": "0xB03E29Be08E57b2d95Fe9F94966CB86a0DD98481", + "logs": [ + { + "address": "0xB03E29Be08E57b2d95Fe9F94966CB86a0DD98481", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x0903a71b1c8dec5f1043dbce7cb378d32d8cbcc404ca0ebd9d2e89f7b573bedb", + "blockNumber": "0x194992e", + "transactionHash": "0x9d4495274114cd427debfe5d5c13a3aa6b61ab3261ae9b7ad90a9fff9515d2f9", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000200000000000000000000400000000000000000000000000020000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x654979ade55752136df9338da1f00bd477efeb2541fb0ba16c91a8157625d6cc", + "transactionIndex": "0x0", + "blockHash": "0x1f8e5f74f3a2a25883dea85a1692039de3060b6358f3c6415f8cea8572ed1dd0", + "blockNumber": "0x1949930", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x17da9d", + "gasUsed": "0x17da9d", + "contractAddress": "0x3a3A92ba9d4D49aae06861136D547667c742F1aF", + "logs": [ + { + "address": "0x3a3A92ba9d4D49aae06861136D547667c742F1aF", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x1f8e5f74f3a2a25883dea85a1692039de3060b6358f3c6415f8cea8572ed1dd0", + "blockNumber": "0x1949930", + "transactionHash": "0x654979ade55752136df9338da1f00bd477efeb2541fb0ba16c91a8157625d6cc", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0xf141319220c49fe33883a82d7d180ad835c4c2794bbb51bc2e5870ad27a9dfab", + "transactionIndex": "0x0", + "blockHash": "0xb7f0bc621431477d508d9ff0a19354707fa0a30b1e4b47ffba8de6213b04e559", + "blockNumber": "0x1949933", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x1033c4", + "gasUsed": "0x1033c4", + "contractAddress": "0x4222384E84C248aa8D50FDC702a1b55E6b4efc99", + "logs": [ + { + "address": "0x4222384E84C248aa8D50FDC702a1b55E6b4efc99", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0xb7f0bc621431477d508d9ff0a19354707fa0a30b1e4b47ffba8de6213b04e559", + "blockNumber": "0x1949933", + "transactionHash": "0xf141319220c49fe33883a82d7d180ad835c4c2794bbb51bc2e5870ad27a9dfab", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x6fb9b0e921f8b65c67263c1a0771bc8997d12461adb0a26b4da588ca1bbf485d", + "transactionIndex": "0x0", + "blockHash": "0x65e4be7bcc0faa02c0af4fc4ac37701930125e99d450b8b1bda30dbe6d02a0b0", + "blockNumber": "0x1949936", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x4556bc", + "gasUsed": "0x4556bc", + "contractAddress": "0xdA48f437Eb827CB997a7D09487D53bE72F2C57a8", + "logs": [ + { + "address": "0xdA48f437Eb827CB997a7D09487D53bE72F2C57a8", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x65e4be7bcc0faa02c0af4fc4ac37701930125e99d450b8b1bda30dbe6d02a0b0", + "blockNumber": "0x1949936", + "transactionHash": "0x6fb9b0e921f8b65c67263c1a0771bc8997d12461adb0a26b4da588ca1bbf485d", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x88f864693662cd6f8b970cb5f1f0d8ef9c75a182d113c7922eeed584f677c694", + "transactionIndex": "0x0", + "blockHash": "0xed0ff2415597339efaa121b459b27c729e16939f12a02232abd4990ebd27cfba", + "blockNumber": "0x1949939", + "from": "0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa", + "to": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "cumulativeGasUsed": "0x43ace", + "gasUsed": "0x43ace", + "contractAddress": null, + "logs": [ + { + "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x00000000000000000000000000000000000000000000000000000000000007e5", + "0x000000000000000000000000000000000000000000000000000000000000001c", + "0x633b2b0bafd8079174114e3dad0826c6f1b434ced40b5e9630de110e77934895" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000066309b0400000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000010c000000000000000000000000000000000000000000000000000000000000000110000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab950000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000ac00000000000000000000000000000000000000000000000000000000000000b2000000000000000000000000000000000000000000000000000000000000000844f1ef2860000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec9400000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd984810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000da48f437eb827cb997a7d09487d53be72f2c57a80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da8121000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xed0ff2415597339efaa121b459b27c729e16939f12a02232abd4990ebd27cfba", + "blockNumber": "0x1949939", + "transactionHash": "0x88f864693662cd6f8b970cb5f1f0d8ef9c75a182d113c7922eeed584f677c694", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0x633b2b0bafd8079174114e3dad0826c6f1b434ced40b5e9630de110e77934895", + "0x000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0xed0ff2415597339efaa121b459b27c729e16939f12a02232abd4990ebd27cfba", + "blockNumber": "0x1949939", + "transactionHash": "0x88f864693662cd6f8b970cb5f1f0d8ef9c75a182d113c7922eeed584f677c694", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000400010000100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000200080000000000000000000000004000000000000000000000000000000000000000004000000000000000000400000000000000000000000000000000000000000040000000000000000000000000000000000000000000200000000000000000000000001000000000000000000000000008002000000000000000400008000000000000002000000000000000000000810000800000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0x1ed4ca9cd1570633ec8d8cf949a11a1eae6f7d0b057820ef078e6942e5dffa40", + "transactionIndex": "0x0", + "blockHash": "0x55b880d0d4edecf0ef5fc6797dec195ff82cb4683cca2a7e3a150e5ea2e82be8", + "blockNumber": "0x194993b", + "from": "0xb033ba62EC622dC54D0ABFE0254e79692147CA26", + "to": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "cumulativeGasUsed": "0x22834", + "gasUsed": "0x22834", + "contractAddress": null, + "logs": [ + { + "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0x633b2b0bafd8079174114e3dad0826c6f1b434ced40b5e9630de110e77934895", + "0x000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0x55b880d0d4edecf0ef5fc6797dec195ff82cb4683cca2a7e3a150e5ea2e82be8", + "blockNumber": "0x194993b", + "transactionHash": "0x1ed4ca9cd1570633ec8d8cf949a11a1eae6f7d0b057820ef078e6942e5dffa40", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000004000000000000000000000000000000000000000004000000008000000000400000000010000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000100800000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + }, + { + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "from": "0x087D08e3ba42e64E3948962dd1371F906D1278b9", + "to": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "cumulativeGasUsed": "0x77891", + "gasUsed": "0x77891", + "contractAddress": null, + "logs": [ + { + "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0x633b2b0bafd8079174114e3dad0826c6f1b434ced40b5e9630de110e77934895", + "0x000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b9" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x0", + "removed": false + }, + { + "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "topics": [ + "0x5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b", + "0x633b2b0bafd8079174114e3dad0826c6f1b434ced40b5e9630de110e77934895" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x1", + "removed": false + }, + { + "address": "0x6E19cF519b7B83F7CE719B6d30232485d9609D95", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000007beb0f3fc4002c4542015cfa9023dee1a9ec9400" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x2", + "removed": false + }, + { + "address": "0x6E19cF519b7B83F7CE719B6d30232485d9609D95", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x7FC81d20f7D1f53D0eA094fcBdd1b531B71225EB", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000b03e29be08e57b2d95fe9f94966cb86a0dd98481" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x4", + "removed": false + }, + { + "address": "0x880c5da7bFF9740464287EBFE381Be1cCCCE4FEA", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000003a3a92ba9d4d49aae06861136d547667c742f1af" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x5", + "removed": false + }, + { + "address": "0xCee681C9108c42C710c6A8A949307D5F13C9F3ca", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000da48f437eb827cb997a7d09487d53be72f2c57a8" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x6", + "removed": false + }, + { + "address": "0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000004222384e84c248aa8d50fdc702a1b55e6b4efc99" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x7", + "removed": false + }, + { + "address": "0x6E19cF519b7B83F7CE719B6d30232485d9609D95", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x000000000000000000000000000000000000000000000000000000000000000b", + "0x0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x8", + "removed": false + }, + { + "address": "0x7FC81d20f7D1f53D0eA094fcBdd1b531B71225EB", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x000000000000000000000000000000000000000000000000000000000000000b", + "0x0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x9", + "removed": false + }, + { + "address": "0x880c5da7bFF9740464287EBFE381Be1cCCCE4FEA", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x000000000000000000000000000000000000000000000000000000000000000b", + "0x0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0xa", + "removed": false + }, + { + "address": "0xCee681C9108c42C710c6A8A949307D5F13C9F3ca", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x000000000000000000000000000000000000000000000000000000000000000b", + "0x0000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf" + ], + "data": "0x", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0xb", + "removed": false + }, + { + "address": "0x6E19cF519b7B83F7CE719B6d30232485d9609D95", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac57530000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0xc", + "removed": false + }, + { + "address": "0x7FC81d20f7D1f53D0eA094fcBdd1b531B71225EB", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac57530000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0xd", + "removed": false + }, + { + "address": "0x880c5da7bFF9740464287EBFE381Be1cCCCE4FEA", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac57530000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0xe", + "removed": false + }, + { + "address": "0xCee681C9108c42C710c6A8A949307D5F13C9F3ca", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac57530000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0xf", + "removed": false + }, + { + "address": "0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac57530000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x10", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0xb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e" + ], + "data": "0x0000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb0000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x11", + "removed": false + }, + { + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac57530000000000000000000000008aaad4782890eb879a0fc132a6adf9e5ee708faf", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x12", + "removed": false + }, + { + "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", + "topics": [ + "0xe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba", + "0x633b2b0bafd8079174114e3dad0826c6f1b434ced40b5e9630de110e77934895" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000360000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003e00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0691de3e386a9300e6acb17e73392cc3158a05f8771fe01a63276732df8ff400", + "blockNumber": "0x194993e", + "transactionHash": "0xf622879aa1f3a4de0e870483dd4231e94a67fd543b823ed6333c43ab9283c881", + "transactionIndex": "0x0", + "logIndex": "0x13", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x08000000000020000000104020000000400000800000000000000000000000000000000000000000000000020000002000420000005000010080010000000002000000000004800000040000000002000000000000000000000004000100000000000000420080200000000000000000000000800000000000040000000000000000000000000000000000000000000200010000100080800010000000800000020000000000008000000080000c0040200000040000000024000000001000400800002000000000080020000004000004200001040000100050000040000001002000040002c000000000000000000000004000000000040000080020000001", + "type": "0x0", + "effectiveGasPrice": "0x4a817c800" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1713252455, + "chain": 2021, + "multi": false, + "commit": "299b38b" +} \ No newline at end of file diff --git a/broadcast/20240411-p3-upgrade-bridge-main-chain.s.sol/11155111/run-1713254298.json b/broadcast/20240411-p3-upgrade-bridge-main-chain.s.sol/11155111/run-1713254298.json new file mode 100644 index 00000000..5d393b7d --- /dev/null +++ b/broadcast/20240411-p3-upgrade-bridge-main-chain.s.sol/11155111/run-1713254298.json @@ -0,0 +1,260 @@ +{ + "transactions": [ + { + "hash": "0x32dcfdca4661c4cd3882524622948948f7b0cf1f1d1de824c635ceed267e1def", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "function": "changeAdmin(address)", + "arguments": [ + "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x61ec0ebf966ae84c414bda715e17cef657e039df", + "gas": "0x10f58", + "value": "0x0", + "data": "0x8f2839700000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0x13", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x2faea0626466f084d03101489e4a35b7ca9b20b4703fceebcd2cb1bbe58bb7a7", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "changeAdmin(address)", + "arguments": [ + "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x10f58", + "value": "0x0", + "data": "0x8f2839700000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0x14", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "MainchainBridgeManager", + "contractAddress": "0x8A6e09c0E369086B3AC219aB66F990b0A7d3E1Da", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x8c2502", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61519e80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212200c6f63384302c679c24a323da0191d39419570db3a104ad821b83178df1126da64736f6c63430008170033", + "nonce": "0x15", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "function": null, + "arguments": [ + "0x8A6e09c0E369086B3AC219aB66F990b0A7d3E1Da", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0xf896f0700000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x29415c", + "value": "0x0", + "data": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c665d628940e317f0b6d03df17271fb51c4d35c9dbf89cce5e4d9768343c58a864736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65640000000000000000000000008a6e09c0e369086b3ac219ab66f990b0a7d3e1da000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c0700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000404f896f0700000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df00000000000000000000000000000000000000000000000000000000", + "nonce": "0x16", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": "src/extensions/TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "contractAddress": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "function": "changeAdmin(address)", + "arguments": [ + "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x603075b625cc2cf69fbb3546c6acc2451fe792af", + "gas": "0x10f58", + "value": "0x0", + "data": "0x8f2839700000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0x17", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "WethUnwrapper", + "contractAddress": "0xdbf1c9FB0cb61Ae76901e55c5C04e77d2BE131A1", + "function": null, + "arguments": [ + "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0xa55e6", + "value": "0x0", + "data": "0x60a060405234801561001057600080fd5b5060405161059138038061059183398101604081905261002f91610071565b600160009081556001600160a01b0382163b90036100605760405163155634d360e31b815260040160405180910390fd5b6001600160a01b03166080526100a1565b60006020828403121561008357600080fd5b81516001600160a01b038116811461009a57600080fd5b9392505050565b6080516104c26100cf6000396000818160610152818160ea01528181610237015261030a01526104c26000f3fe6080604052600436106100385760003560e01c80633fc8cef31461004f5780635dbd60591461009f578063de0e9a3e146100bf57610047565b36610047576100456100df565b005b6100456100df565b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ab57600080fd5b506100456100ba366004610408565b61012a565b3480156100cb57600080fd5b506100456100da366004610444565b6101a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101285760405163155634d360e31b815260040160405180910390fd5b565b6002600054036101815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005561018f82610214565b6101998183610372565b50506001600055565b6002600054036101f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610178565b600260005561020281610214565b61020c3382610372565b506001600055565b604051336024820152306044820152606481018290526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610290919061045d565b6000604051808303816000865af19150503d80600081146102cd576040519150601f19603f3d011682016040523d82523d6000602084013e6102d2565b606091505b50509050806102f4576040516302805e0360e11b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561035657600080fd5b505af115801561036a573d6000803e3d6000fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103bf576040519150601f19603f3d011682016040523d82523d6000602084013e6103c4565b606091505b50509050806104035760405163094b984760e21b81526001600160a01b03841660048201526001600160e01b0319600035166024820152604401610178565b505050565b6000806040838503121561041b57600080fd5b8235915060208301356001600160a01b038116811461043957600080fd5b809150509250929050565b60006020828403121561045657600080fd5b5035919050565b6000825160005b8181101561047e5760208186018101518583015201610464565b50600092019182525091905056fea2646970667358221220aaebf21164f6d2f08d44be8bf09fb75965583264b715eb60df75d1b1d0f7cb9e64736f6c634300081700330000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f08", + "nonce": "0x18", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0x23614572006e2D0DB35E54d4082Aec68d9686450", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x206788", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "nonce": "0x19", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "MainchainGatewayV3", + "contractAddress": "0x1050f2E63177b5eD18f3E88D000DB3a600d664e3", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x928914", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b607154610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60715460ff9081161015620000ec576071805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61556180620000fe6000396000f3fe60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a264697066735822122039bdd676fa56a806e2f91eb197d0a444b13ff0899114d328ae5983c28d58606164736f6c63430008170033", + "nonce": "0x1a", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": "MainchainBridgeManager", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa", + "to": "0x5396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "gas": "0x7a1200", + "value": "0x0", + "data": "0x5e05cf9e000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000009800000000000000000000000000000000000000000000000000000000000000a2000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000000000000000000000000000000000006630a1a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000820000000000000000000000000000000000000000000000000000000000000000700000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000000a44f1ef2860000000000000000000000001050f2e63177b5ed18f3e88d000db3a600d664e300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024110a8308000000000000000000000000dbf1c9fb0cb61ae76901e55c5c04e77d2be131a1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe600000000000000000000000023614572006e2d0db35e54d4082aec68d96864500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da81210000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001b3b6caa3d4505a1c9cf9e919a054d18fb9d535d011aa1014de547e4571caa3ddf6de4da3398eaffeabe44e76ba336b5fcccddc7d97656f8cbbb2c64ae249371be000000000000000000000000000000000000000000000000000000000000001c2edc7c3cf58e29df3decbf15c345fddb2edce83568fd8506aa2b10b259e29e58215de8c6bcc92188508cee6cd09d14a58f19dc839644d4c645b59b8d7e31d82e000000000000000000000000000000000000000000000000000000000000001b080ed428672a9a77220c4317866dc69e2ee99b5bdd08e72c0c581f4fc57a2852524263bd497a1305257b03bccbb0dad12dae0279408f2c2b2fc7a283cc2844ca000000000000000000000000000000000000000000000000000000000000001cbf30a6c1395c8d9e4e7d48206247431aaa77dc4df0e8495e4db8dadd099425d106eb70446b5ab47e64da5a45fd3755b9474003508b18e0a447937a1f50cc6590", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": true + } + ], + "receipts": [ + { + "transactionHash": "0x32dcfdca4661c4cd3882524622948948f7b0cf1f1d1de824c635ceed267e1def", + "transactionIndex": "0xc", + "blockHash": "0xa9bc997f9730f4ee6ed230f52b4ace8b73907ede3c4dc9439fdea6b17cfe4b2c", + "blockNumber": "0x571e07", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "cumulativeGasUsed": "0x8b968", + "gasUsed": "0x7001", + "contractAddress": null, + "logs": [ + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "blockHash": "0xa9bc997f9730f4ee6ed230f52b4ace8b73907ede3c4dc9439fdea6b17cfe4b2c", + "blockNumber": "0x571e07", + "transactionHash": "0x32dcfdca4661c4cd3882524622948948f7b0cf1f1d1de824c635ceed267e1def", + "transactionIndex": "0xc", + "logIndex": "0x7", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000020000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000400000000000000000000000000080000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0x194ba3d10a" + }, + { + "transactionHash": "0x2faea0626466f084d03101489e4a35b7ca9b20b4703fceebcd2cb1bbe58bb7a7", + "transactionIndex": "0xe", + "blockHash": "0xca322afa88e562ff018bd1ad101ebe1ae7ef05454f60f9a0036336c6c969fcf1", + "blockNumber": "0x571e08", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0xe1b27", + "gasUsed": "0x7001", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "blockHash": "0xca322afa88e562ff018bd1ad101ebe1ae7ef05454f60f9a0036336c6c969fcf1", + "blockNumber": "0x571e08", + "transactionHash": "0x2faea0626466f084d03101489e4a35b7ca9b20b4703fceebcd2cb1bbe58bb7a7", + "transactionIndex": "0xe", + "logIndex": "0xc", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000040000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0x1c5e0e07d7" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1713254298, + "chain": 11155111, + "multi": false, + "commit": "d84a88c" +} \ No newline at end of file diff --git a/broadcast/20240411-p3-upgrade-bridge-main-chain.s.sol/11155111/run-1713254978.json b/broadcast/20240411-p3-upgrade-bridge-main-chain.s.sol/11155111/run-1713254978.json new file mode 100644 index 00000000..fedad33c --- /dev/null +++ b/broadcast/20240411-p3-upgrade-bridge-main-chain.s.sol/11155111/run-1713254978.json @@ -0,0 +1,738 @@ +{ + "transactions": [ + { + "hash": "0xf8db3100846b70a3a0c38a27dc792cff5e4a02498aea7b04b181a889bd7eb200", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "function": "changeAdmin(address)", + "arguments": [ + "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x61ec0ebf966ae84c414bda715e17cef657e039df", + "gas": "0x10f58", + "value": "0x0", + "data": "0x8f2839700000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0x13", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "function": "changeAdmin(address)", + "arguments": [ + "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "gas": "0x10f58", + "value": "0x0", + "data": "0x8f2839700000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0x14", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xe85854178d838b3f4c5685d97201e45ab55a55033993f19beabe479db0cf20e0", + "transactionType": "CREATE", + "contractName": "MainchainBridgeManager", + "contractAddress": "0x8A6e09c0E369086B3AC219aB66F990b0A7d3E1Da", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x8c2502", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61519e80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212200c6f63384302c679c24a323da0191d39419570db3a104ad821b83178df1126da64736f6c63430008170033", + "nonce": "0x15", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x91610b4f041e04847fb9ebc85d851506bb6973a0bd477dfa209dd7e41a49b2a8", + "transactionType": "CREATE", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "function": null, + "arguments": [ + "0x8A6e09c0E369086B3AC219aB66F990b0A7d3E1Da", + "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "0xf896f0700000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x29415c", + "value": "0x0", + "data": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c665d628940e317f0b6d03df17271fb51c4d35c9dbf89cce5e4d9768343c58a864736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65640000000000000000000000008a6e09c0e369086b3ac219ab66f990b0a7d3e1da000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c0700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000404f896f0700000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df00000000000000000000000000000000000000000000000000000000", + "nonce": "0x16", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xbe7f2344e273284469e954c19134ee10471821447455bb6b67b5b3e1a2e3d1f9", + "transactionType": "CALL", + "contractName": "src/extensions/TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "contractAddress": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "function": "changeAdmin(address)", + "arguments": [ + "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": "0x603075b625cc2cf69fbb3546c6acc2451fe792af", + "gas": "0x10f58", + "value": "0x0", + "data": "0x8f2839700000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "nonce": "0x17", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x24b2d31919e5b58826110a78c5f4b56390fa6a5f9382abb905f47c03b1311863", + "transactionType": "CREATE", + "contractName": "WethUnwrapper", + "contractAddress": "0xdbf1c9FB0cb61Ae76901e55c5C04e77d2BE131A1", + "function": null, + "arguments": [ + "0x1Aa1BC6BaEFCF09D6Fd0139B828b5E764D050F08" + ], + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0xa55e6", + "value": "0x0", + "data": "0x60a060405234801561001057600080fd5b5060405161059138038061059183398101604081905261002f91610071565b600160009081556001600160a01b0382163b90036100605760405163155634d360e31b815260040160405180910390fd5b6001600160a01b03166080526100a1565b60006020828403121561008357600080fd5b81516001600160a01b038116811461009a57600080fd5b9392505050565b6080516104c26100cf6000396000818160610152818160ea01528181610237015261030a01526104c26000f3fe6080604052600436106100385760003560e01c80633fc8cef31461004f5780635dbd60591461009f578063de0e9a3e146100bf57610047565b36610047576100456100df565b005b6100456100df565b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ab57600080fd5b506100456100ba366004610408565b61012a565b3480156100cb57600080fd5b506100456100da366004610444565b6101a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101285760405163155634d360e31b815260040160405180910390fd5b565b6002600054036101815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005561018f82610214565b6101998183610372565b50506001600055565b6002600054036101f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610178565b600260005561020281610214565b61020c3382610372565b506001600055565b604051336024820152306044820152606481018290526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610290919061045d565b6000604051808303816000865af19150503d80600081146102cd576040519150601f19603f3d011682016040523d82523d6000602084013e6102d2565b606091505b50509050806102f4576040516302805e0360e11b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561035657600080fd5b505af115801561036a573d6000803e3d6000fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103bf576040519150601f19603f3d011682016040523d82523d6000602084013e6103c4565b606091505b50509050806104035760405163094b984760e21b81526001600160a01b03841660048201526001600160e01b0319600035166024820152604401610178565b505050565b6000806040838503121561041b57600080fd5b8235915060208301356001600160a01b038116811461043957600080fd5b809150509250929050565b60006020828403121561045657600080fd5b5035919050565b6000825160005b8181101561047e5760208186018101518583015201610464565b50600092019182525091905056fea2646970667358221220aaebf21164f6d2f08d44be8bf09fb75965583264b715eb60df75d1b1d0f7cb9e64736f6c634300081700330000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f08", + "nonce": "0x18", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionType": "CREATE", + "contractName": "PauseEnforcer", + "contractAddress": "0x23614572006e2D0DB35E54d4082Aec68d9686450", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x206788", + "value": "0x0", + "data": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", + "nonce": "0x19", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CREATE", + "contractName": "MainchainGatewayV3", + "contractAddress": "0x1050f2E63177b5eD18f3E88D000DB3a600d664e3", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "gas": "0x928914", + "value": "0x0", + "data": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b607154610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60715460ff9081161015620000ec576071805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61556180620000fe6000396000f3fe60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a264697066735822122039bdd676fa56a806e2f91eb197d0a444b13ff0899114d328ae5983c28d58606164736f6c63430008170033", + "nonce": "0x1a", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": "MainchainBridgeManager", + "contractAddress": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "function": null, + "arguments": null, + "transaction": { + "type": "0x02", + "from": "0xd24d87ddc1917165435b306aac68d99e0f49a3fa", + "to": "0x5396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "gas": "0x7a1200", + "value": "0x0", + "data": "0x5e05cf9e000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000009800000000000000000000000000000000000000000000000000000000000000a2000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000000000000000000000000000000000006630a1a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000820000000000000000000000000000000000000000000000000000000000000000700000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000000a44f1ef2860000000000000000000000001050f2e63177b5ed18f3e88d000db3a600d664e300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024110a8308000000000000000000000000dbf1c9fb0cb61ae76901e55c5c04e77d2be131a1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe600000000000000000000000023614572006e2d0db35e54d4082aec68d96864500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da81210000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001b3b6caa3d4505a1c9cf9e919a054d18fb9d535d011aa1014de547e4571caa3ddf6de4da3398eaffeabe44e76ba336b5fcccddc7d97656f8cbbb2c64ae249371be000000000000000000000000000000000000000000000000000000000000001c2edc7c3cf58e29df3decbf15c345fddb2edce83568fd8506aa2b10b259e29e58215de8c6bcc92188508cee6cd09d14a58f19dc839644d4c645b59b8d7e31d82e000000000000000000000000000000000000000000000000000000000000001b080ed428672a9a77220c4317866dc69e2ee99b5bdd08e72c0c581f4fc57a2852524263bd497a1305257b03bccbb0dad12dae0279408f2c2b2fc7a283cc2844ca000000000000000000000000000000000000000000000000000000000000001cbf30a6c1395c8d9e4e7d48206247431aaa77dc4df0e8495e4db8dadd099425d106eb70446b5ab47e64da5a45fd3755b9474003508b18e0a447937a1f50cc6590", + "nonce": "0x0", + "accessList": [] + }, + "additionalContracts": [], + "isFixedGasLimit": true + } + ], + "receipts": [ + { + "transactionHash": "0x32dcfdca4661c4cd3882524622948948f7b0cf1f1d1de824c635ceed267e1def", + "transactionIndex": "0xc", + "blockHash": "0xa9bc997f9730f4ee6ed230f52b4ace8b73907ede3c4dc9439fdea6b17cfe4b2c", + "blockNumber": "0x571e07", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "cumulativeGasUsed": "0x8b968", + "gasUsed": "0x7001", + "contractAddress": null, + "logs": [ + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "blockHash": "0xa9bc997f9730f4ee6ed230f52b4ace8b73907ede3c4dc9439fdea6b17cfe4b2c", + "blockNumber": "0x571e07", + "transactionHash": "0x32dcfdca4661c4cd3882524622948948f7b0cf1f1d1de824c635ceed267e1def", + "transactionIndex": "0xc", + "logIndex": "0x7", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000020000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000400000000000000000000000000080000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0x194ba3d10a" + }, + { + "transactionHash": "0x2faea0626466f084d03101489e4a35b7ca9b20b4703fceebcd2cb1bbe58bb7a7", + "transactionIndex": "0xe", + "blockHash": "0xca322afa88e562ff018bd1ad101ebe1ae7ef05454f60f9a0036336c6c969fcf1", + "blockNumber": "0x571e08", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "cumulativeGasUsed": "0xe1b27", + "gasUsed": "0x7001", + "contractAddress": null, + "logs": [ + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "blockHash": "0xca322afa88e562ff018bd1ad101ebe1ae7ef05454f60f9a0036336c6c969fcf1", + "blockNumber": "0x571e08", + "transactionHash": "0x2faea0626466f084d03101489e4a35b7ca9b20b4703fceebcd2cb1bbe58bb7a7", + "transactionIndex": "0xe", + "logIndex": "0xc", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000040000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0x1c5e0e07d7" + }, + { + "transactionHash": "0xf8db3100846b70a3a0c38a27dc792cff5e4a02498aea7b04b181a889bd7eb200", + "transactionIndex": "0xe", + "blockHash": "0x3fce148ea7bfe7bf07aa76b8a6a99d6507f9c36964517a8956a15d6b5ab7d42a", + "blockNumber": "0x571e3b", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x7612e2", + "gasUsed": "0x461747", + "contractAddress": "0x8A6e09c0E369086B3AC219aB66F990b0A7d3E1Da", + "logs": [ + { + "address": "0x8A6e09c0E369086B3AC219aB66F990b0A7d3E1Da", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x3fce148ea7bfe7bf07aa76b8a6a99d6507f9c36964517a8956a15d6b5ab7d42a", + "blockNumber": "0x571e3b", + "transactionHash": "0xf8db3100846b70a3a0c38a27dc792cff5e4a02498aea7b04b181a889bd7eb200", + "transactionIndex": "0xe", + "logIndex": "0x18", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000002000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xe451ba401" + }, + { + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0xaca308", + "gasUsed": "0x15196e", + "contractAddress": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "logs": [ + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000008a6e09c0e369086b3ac219ab66f990b0a7d3e1da" + ], + "data": "0x", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x14", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0xe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da1", + "0x8000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x15", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af" + ], + "data": "0x", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x16", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x17", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", + "0x0000000000000000000000000000000000000000000000000000000000000005", + "0x00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df" + ], + "data": "0x", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x18", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000007", + "0x000000000000000000000000000000000000000000000000000000000000000a" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x19", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e" + ], + "data": "0x", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x1a", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x1b", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000003", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x1c", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x1d", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", + "blockHash": "0xf418ec1bd432f094a0c3444d15a78616db2ade1379e0b27903859d023e387dbb", + "blockNumber": "0x571e3c", + "transactionHash": "0x5147b7112152f9d5b5ac870bfa90501324ede13008546831abd76706bc097b27", + "transactionIndex": "0xe", + "logIndex": "0x1e", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x04020000000000000000000000000000400080000000200000100000000001000000400000000000100000000000000000001000040000010220000000040000000030000000800000000000040002000002000000040005000400000000400000000000020000000040000000000808000000800000000000000000000000001000000000000100010004020000001100000800000080000000000400800000000000000800001000010100000400000000010000000000000000000000000000000020000000000000000002040100000000800400001000000100000060080000020000000000000000000000000000000100008000000000000000001000", + "type": "0x2", + "effectiveGasPrice": "0xe376fb1bc" + }, + { + "transactionHash": "0xe85854178d838b3f4c5685d97201e45ab55a55033993f19beabe479db0cf20e0", + "transactionIndex": "0xa", + "blockHash": "0xd1f2f8d0fdaed5660f48ca9975eaa3974212789749762eba868cf24b73d67599", + "blockNumber": "0x571e3d", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "cumulativeGasUsed": "0x3578f6", + "gasUsed": "0x7001", + "contractAddress": null, + "logs": [ + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d", + "blockHash": "0xd1f2f8d0fdaed5660f48ca9975eaa3974212789749762eba868cf24b73d67599", + "blockNumber": "0x571e3d", + "transactionHash": "0xe85854178d838b3f4c5685d97201e45ab55a55033993f19beabe479db0cf20e0", + "transactionIndex": "0xa", + "logIndex": "0x10", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000100000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xeee9ddcd8" + }, + { + "transactionHash": "0x91610b4f041e04847fb9ebc85d851506bb6973a0bd477dfa209dd7e41a49b2a8", + "transactionIndex": "0xd", + "blockHash": "0xfeb34621f76a36baa15bab287dd8bb6cba65249d4d58c2c978976055755fe965", + "blockNumber": "0x571e3e", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x27b745", + "gasUsed": "0x53aef", + "contractAddress": "0xdbf1c9FB0cb61Ae76901e55c5C04e77d2BE131A1", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xebcfee0e3" + }, + { + "transactionHash": "0xbe7f2344e273284469e954c19134ee10471821447455bb6b67b5b3e1a2e3d1f9", + "transactionIndex": "0x1b", + "blockHash": "0xf807eaaef29ec4cc035c754fd92ac2ee8aa752320fcf45cdb63cd103ce41805e", + "blockNumber": "0x571e3f", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x42cd18", + "gasUsed": "0x10348c", + "contractAddress": "0x23614572006e2D0DB35E54d4082Aec68d9686450", + "logs": [ + { + "address": "0x23614572006e2D0DB35E54d4082Aec68d9686450", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0xf807eaaef29ec4cc035c754fd92ac2ee8aa752320fcf45cdb63cd103ce41805e", + "blockNumber": "0x571e3f", + "transactionHash": "0xbe7f2344e273284469e954c19134ee10471821447455bb6b67b5b3e1a2e3d1f9", + "transactionIndex": "0x1b", + "logIndex": "0x2e", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xdd944432e" + }, + { + "transactionHash": "0x24b2d31919e5b58826110a78c5f4b56390fa6a5f9382abb905f47c03b1311863", + "transactionIndex": "0x15", + "blockHash": "0x0160463bfc8c8aeea1accb17aeb2130de3bfba3f709549d662d6ff5b0cf0ba43", + "blockNumber": "0x571e40", + "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "to": null, + "cumulativeGasUsed": "0x6b0311", + "gasUsed": "0x494be4", + "contractAddress": "0x1050f2E63177b5eD18f3E88D000DB3a600d664e3", + "logs": [ + { + "address": "0x1050f2E63177b5eD18f3E88D000DB3a600d664e3", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x0160463bfc8c8aeea1accb17aeb2130de3bfba3f709549d662d6ff5b0cf0ba43", + "blockNumber": "0x571e40", + "transactionHash": "0x24b2d31919e5b58826110a78c5f4b56390fa6a5f9382abb905f47c03b1311863", + "transactionIndex": "0x15", + "logIndex": "0x20", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xd8c2ecd6e" + }, + { + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "from": "0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa", + "to": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "cumulativeGasUsed": "0x1b9e85", + "gasUsed": "0x61a77", + "contractAddress": null, + "logs": [ + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x0000000000000000000000000000000000000000000000000000000000aa36a7", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x82caa412e6e22245af70cc2b1b41c0f699841e35d07507164317334bff1fc2c4" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000000000000000000000000000000000006630a1a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000820000000000000000000000000000000000000000000000000000000000000000700000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000000a44f1ef2860000000000000000000000001050f2e63177b5ed18f3e88d000db3a600d664e300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024110a8308000000000000000000000000dbf1c9fb0cb61ae76901e55c5c04e77d2be131a1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe600000000000000000000000023614572006e2d0db35e54d4082aec68d96864500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da81210000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x12", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0x5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b", + "0x82caa412e6e22245af70cc2b1b41c0f699841e35d07507164317334bff1fc2c4" + ], + "data": "0x", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x13", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001050f2e63177b5ed18f3e88d000db3a600d664e3" + ], + "data": "0x", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x14", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000004", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x15", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", + "0x000000000000000000000000000000000000000000000000000000000000000b", + "0x000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af" + ], + "data": "0x", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x16", + "removed": false + }, + { + "address": "0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x17", + "removed": false + }, + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000023614572006e2d0db35e54d4082aec68d9686450" + ], + "data": "0x", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x18", + "removed": false + }, + { + "address": "0x61eC0ebf966AE84C414BDA715E17CeF657e039DF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x19", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0xb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e" + ], + "data": "0x00000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e0000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x1a", + "removed": false + }, + { + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000005396b75c9eb8d1153d2b8a0bb9a8c4b1541f758d000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x1b", + "removed": false + }, + { + "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", + "topics": [ + "0xe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba", + "0x82caa412e6e22245af70cc2b1b41c0f699841e35d07507164317334bff1fc2c4" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbb704424bcac09e4ff284893f80c9940680941f83e3cffe649829e3191c9bb20", + "blockNumber": "0x571e41", + "transactionHash": "0x34a4f62a3a088803c6c9a3ad2721668f1ed98a02cea045af25150b1a455ed01c", + "transactionIndex": "0x14", + "logIndex": "0x1c", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x06000000008000010000004000000000400000000000000000000000000000000000000000000000000000080000040002000000000000010000000000000100000000000000800000000000000002000000000000000000000000000000500000000000000000000000000000000000000000800000000000000000000000000000000000000040000004000000000204010000000080000010000200800000000000000000028000000180000400000000000000000000000001000212000000000020000000000000200802040100102000000440001000400000400000080004080000000000000000900010000000000100008000040000000000000000", + "type": "0x2", + "effectiveGasPrice": "0xde8809ffc" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1713254978, + "chain": 11155111, + "multi": false, + "commit": "d84a88c" +} \ No newline at end of file From 2cfa11d0607ca4a5fd74469543f0baaa7ecc1f4c Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 15:13:26 +0700 Subject: [PATCH 193/305] chore: replace RoninBridgeManager artifact --- .../ronin-testnet/RoninBridgeManager.json | 2865 +---------------- 1 file changed, 129 insertions(+), 2736 deletions(-) diff --git a/deployments/ronin-testnet/RoninBridgeManager.json b/deployments/ronin-testnet/RoninBridgeManager.json index 85c0679e..6e7b6d55 100644 --- a/deployments/ronin-testnet/RoninBridgeManager.json +++ b/deployments/ronin-testnet/RoninBridgeManager.json @@ -1,2825 +1,218 @@ { - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "uint256", - "name": "num", - "type": "uint256" + "name": "_logic", + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", - "name": "denom", - "type": "uint256" + "name": "admin_", + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", - "name": "roninChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryDuration", - "type": "uint256" - }, - { - "internalType": "address", - "name": "bridgeContract", - "type": "address" - }, - { - "internalType": "address[]", - "name": "callbackRegisters", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "bridgeOperators", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "governors", - "type": "address[]" - }, - { - "internalType": "uint96[]", - "name": "voteWeights", - "type": "uint96[]" - }, - { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "codehash", - "type": "bytes32" - } - ], - "name": "ErrAddressIsNotCreatedEOA", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "voter", - "type": "address" - } - ], - "name": "ErrAlreadyVoted", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "bridgeOperator", - "type": "address" - } - ], - "name": "ErrBridgeOperatorAlreadyExisted", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "bridgeOperator", - "type": "address" - } - ], - "name": "ErrBridgeOperatorUpdateFailed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "ErrContractTypeNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "ErrCurrentProposalIsNotCompleted", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrDuplicated", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - } - ], - "name": "ErrInsufficientGas", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidArguments", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "uint256", - "name": "actual", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - } - ], - "name": "ErrInvalidChainId", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidExpiryTimestamp", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidOrder", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "actual", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "expected", - "type": "bytes32" - } - ], - "name": "ErrInvalidProposal", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidProposalNonce", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidSignatures", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidThreshold", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidVoteWeight", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrLengthMismatch", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrOnlySelfCall", - "type": "error" - }, - { - "inputs": [], - "name": "ErrQueryForEmptyVote", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "enum RoleAccess", - "name": "expectedRole", - "type": "uint8" - } - ], - "name": "ErrUnauthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - }, - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ErrUnsupportedInterface", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrUnsupportedVoteType", - "type": "error" - }, - { - "inputs": [], - "name": "ErrVoteIsFinalized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrZeroAddress", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ErrZeroCodeContract", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromBridgeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toBridgeOperator", - "type": "address" - } - ], - "name": "BridgeOperatorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool[]", - "name": "statuses", - "type": "bool[]" - }, - { - "indexed": false, - "internalType": "uint96[]", - "name": "voteWeights", - "type": "uint96[]" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "governors", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "bridgeOperators", - "type": "address[]" - } - ], - "name": "BridgeOperatorsAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool[]", - "name": "statuses", - "type": "bool[]" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "bridgeOperators", - "type": "address[]" - } - ], - "name": "BridgeOperatorsRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "indexed": false, - "internalType": "struct Proposal.ProposalDetail", - "name": "proposal", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "globalProposalHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "indexed": false, - "internalType": "struct GlobalProposal.GlobalProposalDetail", - "name": "globalProposal", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "address", - "name": "creator", - "type": "address" - } - ], - "name": "GlobalProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "registers", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "bool[]", - "name": "statuses", - "type": "bool[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "returnDatas", - "type": "bytes[]" - } - ], - "name": "Notified", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - } - ], - "name": "ProposalApproved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "indexed": false, - "internalType": "struct Proposal.ProposalDetail", - "name": "proposal", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "address", - "name": "creator", - "type": "address" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool[]", - "name": "successCalls", - "type": "bool[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "returnDatas", - "type": "bytes[]" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - } - ], - "name": "ProposalExpired", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "duration", - "type": "uint256" - } - ], - "name": "ProposalExpiryDurationChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - } - ], - "name": "ProposalRejected", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum Ballot.VoteType", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - } - ], - "name": "ProposalVoted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum GlobalProposal.TargetOption", - "name": "targetOption", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "TargetOptionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousDenominator", - "type": "uint256" - } - ], - "name": "ThresholdUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96[]", - "name": "voteWeights", - "type": "uint96[]" - }, - { - "internalType": "address[]", - "name": "governors", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "bridgeOperators", - "type": "address[]" - } - ], - "name": "addBridgeOperators", - "outputs": [ - { - "internalType": "bool[]", - "name": "addeds", - "type": "bool[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "internalType": "struct GlobalProposal.GlobalProposalDetail", - "name": "globalProposal", - "type": "tuple" - }, - { - "internalType": "enum Ballot.VoteType[]", - "name": "supports_", - "type": "uint8[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "signatures", - "type": "tuple[]" - } - ], - "name": "castGlobalProposalBySignatures", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "internalType": "struct Proposal.ProposalDetail", - "name": "proposal", - "type": "tuple" - }, - { - "internalType": "enum Ballot.VoteType[]", - "name": "supports_", - "type": "uint8[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "signatures", - "type": "tuple[]" - } - ], - "name": "castProposalBySignatures", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "internalType": "struct Proposal.ProposalDetail", - "name": "proposal", - "type": "tuple" - }, - { - "internalType": "enum Ballot.VoteType", - "name": "support", - "type": "uint8" - } - ], - "name": "castProposalVoteForCurrentNetwork", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_voteWeight", - "type": "uint256" - } - ], - "name": "checkThreshold", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "deleteExpired", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "governors", - "type": "address[]" - } - ], - "name": "getBridgeOperatorOf", - "outputs": [ - { - "internalType": "address[]", - "name": "bridgeOperators", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "bridgeOperator", - "type": "address" - } - ], - "name": "getBridgeOperatorWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBridgeOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCallbackRegisters", - "outputs": [ - { - "internalType": "address[]", - "name": "registers", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "getContract", - "outputs": [ - { - "internalType": "address", - "name": "contract_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getFullBridgeOperatorInfos", - "outputs": [ - { - "internalType": "address[]", - "name": "governors", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "bridgeOperators", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "weights", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "round_", - "type": "uint256" - } - ], - "name": "getGlobalProposalSignatures", - "outputs": [ - { - "internalType": "address[]", - "name": "voters", - "type": "address[]" - }, - { - "internalType": "enum Ballot.VoteType[]", - "name": "supports_", - "type": "uint8[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "signatures", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "governor", - "type": "address" - } - ], - "name": "getGovernorWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "governors", - "type": "address[]" - } - ], - "name": "getGovernorWeights", - "outputs": [ - { - "internalType": "uint256[]", - "name": "weights", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getGovernors", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "bridgeOperators", - "type": "address[]" - } - ], - "name": "getGovernorsOf", - "outputs": [ - { - "internalType": "address[]", - "name": "governors", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getProposalExpiryDuration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getProposalSignatures", - "outputs": [ - { - "internalType": "address[]", - "name": "_voters", - "type": "address[]" - }, - { - "internalType": "enum Ballot.VoteType[]", - "name": "_supports", - "type": "uint8[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "_signatures", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "num_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "denom_", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalWeights", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "round_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "voter", - "type": "address" - } - ], - "name": "globalProposalVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "isBridgeOperator", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minimumVoteWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_voter", - "type": "address" - } - ], - "name": "proposalVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "_targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "_calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "_gasAmounts", - "type": "uint256[]" - } - ], - "name": "propose", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "name": "proposeGlobal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "internalType": "struct GlobalProposal.GlobalProposalDetail", - "name": "globalProposal", - "type": "tuple" - }, - { - "internalType": "enum Ballot.VoteType[]", - "name": "supports_", - "type": "uint8[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "signatures", - "type": "tuple[]" - } - ], - "name": "proposeGlobalProposalStructAndCastVotes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - }, - { - "internalType": "enum Ballot.VoteType", - "name": "support", - "type": "uint8" - } - ], - "name": "proposeProposalForCurrentNetwork", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "internalType": "struct Proposal.ProposalDetail", - "name": "_proposal", - "type": "tuple" - }, - { - "internalType": "enum Ballot.VoteType[]", - "name": "_supports", - "type": "uint8[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "_signatures", - "type": "tuple[]" + "name": "_data", + "type": "bytes", + "internalType": "bytes" } ], - "name": "proposeProposalStructAndCastVotes", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "registers", - "type": "address[]" - } - ], - "name": "registerCallbacks", - "outputs": [ - { - "internalType": "bool[]", - "name": "registereds", - "type": "bool[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "payable" }, { - "inputs": [ - { - "internalType": "address[]", - "name": "bridgeOperators", - "type": "address[]" - } - ], - "name": "removeBridgeOperators", - "outputs": [ - { - "internalType": "bool[]", - "name": "removeds", - "type": "bool[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "type": "fallback", + "stateMutability": "payable" }, { - "inputs": [ - { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" - } - ], - "name": "resolveTargets", - "outputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" + "type": "receive", + "stateMutability": "payable" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "round", + "type": "function", + "name": "admin", + "inputs": [], "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "admin_", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "changeAdmin", "inputs": [ { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "addr", - "type": "address" + "name": "newAdmin", + "type": "address", + "internalType": "address" } ], - "name": "setContract", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - } - ], - "name": "setThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "functionDelegateCall", "inputs": [ { - "internalType": "address[]", - "name": "governors", - "type": "address[]" + "name": "_data", + "type": "bytes", + "internalType": "bytes" } ], - "name": "sumGovernorsWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "sum", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "payable" }, { + "type": "function", + "name": "implementation", "inputs": [], - "name": "totalBridgeOperators", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "implementation_", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "upgradeTo", "inputs": [ { - "internalType": "address[]", - "name": "registers", - "type": "address[]" - } - ], - "name": "unregisterCallbacks", - "outputs": [ - { - "internalType": "bool[]", - "name": "unregistereds", - "type": "bool[]" + "name": "newImplementation", + "type": "address", + "internalType": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "upgradeToAndCall", "inputs": [ { - "internalType": "address", - "name": "newBridgeOperator", - "type": "address" + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" } ], - "name": "updateBridgeOperator", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "payable" }, { + "type": "event", + "name": "AdminChanged", "inputs": [ { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "address[]", - "name": "targets", - "type": "address[]" + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "updateManyTargetOption", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "BeaconUpgraded", "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "name": "vote", - "outputs": [ - { - "internalType": "enum VoteStatusConsumer.VoteStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "againstVoteWeight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVoteWeight", - "type": "uint256" - }, + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false } ], - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "receipt": { - "to": null, - "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "contractAddress": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "transactionIndex": 0, - "gasUsed": "6316780", - "logsBloom": "0x04020000000001000000000000000000040080000000200000100000000000000000500000000000008000000000000000004000021000010080000000240000010000000000800000000000000000000000000000040000000000000000000000000000420000040000000000000840000000000000000000000000000000000000000000000000000000000000104000000000000000000000000400000000000000000000000000000100000000000000000008800000000008000000400000004000000000000800000000000000000100800000001000000000000060000018020000000000000000000000000000000000008000000000000000001000", - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2", - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "logs": [ - { - "transactionIndex": 0, - "blockNumber": 19062129, - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "topics": [ - "0x865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c59", - "0x0000000000000000000000000000000000000000000000000000000000000002", - "0x000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca" - ], - "data": "0x", - "logIndex": 0, - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2" - }, - { - "transactionIndex": 0, - "blockNumber": 19062129, - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "topics": [ - "0xc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b63" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000001845ebae8a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a408c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000425472616e73706172656e745570677261646561626c6550726f78793a2061646d696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2" - }, - { - "transactionIndex": 0, - "blockNumber": 19062129, - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "topics": [ - "0x897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a", - "logIndex": 2, - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2" - }, - { - "transactionIndex": 0, - "blockNumber": 19062129, - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "topics": [ - "0xe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da1", - "0x0000000000000000000000000000000000000000000000000000000000127500" - ], - "data": "0x", - "logIndex": 3, - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2" - }, - { - "transactionIndex": 0, - "blockNumber": 19062129, - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "topics": [ - "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753" - ], - "data": "0x", - "logIndex": 4, - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2" - }, - { - "transactionIndex": 0, - "blockNumber": 19062129, - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "topics": [ - "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca" - ], - "data": "0x", - "logIndex": 5, - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2" - }, - { - "transactionIndex": 0, - "blockNumber": 19062129, - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "topics": [ - "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", - "0x0000000000000000000000000000000000000000000000000000000000000002", - "0x0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d95" - ], - "data": "0x", - "logIndex": 6, - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2" - }, - { - "transactionIndex": 0, - "blockNumber": 19062129, - "transactionHash": "0xf62fde282ce6c4bb8ff81c023408201fe1ee22f8712a40ff46df694b9a6851d3", - "address": "0xb0507f2f22697022eCb25963a00D3D076dAc5753", - "topics": [ - "0x356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d", - "0x0000000000000000000000000000000000000000000000000000000000000003", - "0x0000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb" - ], - "data": "0x", - "logIndex": 7, - "blockHash": "0x8a4a4259eab93c37e92553549a3485ac1d979aff404867da891e87c764cb59d2" - } - ], - "blockNumber": 19062129, - "cumulativeGasUsed": "6316780", - "status": 1, - "byzantium": true - }, - "args": [ - 70, - 100, - 2021, - 1209600, - "0xCee681C9108c42C710c6A8A949307D5F13C9F3ca", - [ - "0x7FC81d20f7D1f53D0eA094fcBdd1b531B71225EB" - ], - [ - "0x2e82D2b56f858f79DeeF11B160bFC4631873da2B", - "0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb", - "0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c", - "0xcc5fc5b6c8595f56306da736f6cd02ed9141c84a" - ], - [ - "0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa", - "0xb033ba62EC622dC54D0ABFE0254e79692147CA26", - "0x087D08e3ba42e64E3948962dd1371F906D1278b9", - "0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F" - ], - [ - 100, - 100, - 100, - 100 - ], - [ - 1, - 2, - 3 - ], - [ - "0xCee681C9108c42C710c6A8A949307D5F13C9F3ca", - "0x6E19cF519b7B83F7CE719B6d30232485d9609D95", - "0x7FC81d20f7D1f53D0eA094fcBdd1b531B71225EB" - ] - ], - "numDeployments": 4, - "solcInputHash": "6c219cc499cc18168de5a543cc795d09", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryDuration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"callbackRegisters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"codehash\",\"type\":\"bytes32\"}],\"name\":\"ErrAddressIsNotCreatedEOA\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"ErrAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"ErrBridgeOperatorAlreadyExisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"ErrBridgeOperatorUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCurrentProposalIsNotCompleted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrDuplicated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ErrInsufficientGas\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidExpiryTimestamp\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"}],\"name\":\"ErrInvalidProposal\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidProposalNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidSignatures\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidVoteWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForEmptyVote\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrUnsupportedInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnsupportedVoteType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrVoteIsFinalized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromBridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toBridgeOperator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"Notified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"ProposalExpiryDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\",\"name\":\"targetOption\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"TargetOptionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"addBridgeOperators\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"castGlobalProposalBySignatures\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"castProposalBySignatures\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"}],\"name\":\"castProposalVoteForCurrentNetwork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"deleteExpired\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getBridgeOperatorOf\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"getBridgeOperatorWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCallbackRegisters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullBridgeOperatorInfos\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"weights\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"round_\",\"type\":\"uint256\"}],\"name\":\"getGlobalProposalSignatures\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"voters\",\"type\":\"address[]\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"weights\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"getGovernorsOf\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProposalExpiryDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getProposalSignatures\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"_voters\",\"type\":\"address[]\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"_supports\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalWeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"round_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"globalProposalVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isBridgeOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"proposalVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_gasAmounts\",\"type\":\"uint256[]\"}],\"name\":\"propose\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"name\":\"proposeGlobal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"proposeGlobalProposalStructAndCastVotes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"}],\"name\":\"proposeProposalForCurrentNetwork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"_proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"_supports\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"proposeProposalStructAndCastVotes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"registerCallbacks\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"registereds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"removeBridgeOperators\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"removeds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"}],\"name\":\"resolveTargets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"sumGovernorsWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBridgeOperators\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"unregisterCallbacks\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"unregistereds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newBridgeOperator\",\"type\":\"address\"}],\"name\":\"updateBridgeOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateManyTargetOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrAddressIsNotCreatedEOA(address,bytes32)\":[{\"details\":\"Error thrown when an address is expected to be an already created externally owned account (EOA). This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\"}],\"ErrAlreadyVoted(address)\":[{\"details\":\"Error indicating that a voter has already voted.\",\"params\":{\"voter\":\"The address of the voter who has already voted.\"}}],\"ErrBridgeOperatorAlreadyExisted(address)\":[{\"details\":\"Error thrown when attempting to add a bridge operator that already exists in the contract. This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\"}],\"ErrBridgeOperatorUpdateFailed(address)\":[{\"details\":\"Error raised when a bridge operator update operation fails.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator that failed to update.\"}}],\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrCurrentProposalIsNotCompleted()\":[{\"details\":\"Error thrown when the current proposal is not completed.\"}],\"ErrDuplicated(bytes4)\":[{\"details\":\"Error thrown when a duplicated element is detected in an array.\",\"params\":{\"msgSig\":\"The function signature that invoke the error.\"}}],\"ErrInsufficientGas(bytes32)\":[{\"details\":\"Error thrown when there is insufficient gas to execute a function.\"}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidExpiryTimestamp()\":[{\"details\":\"Error thrown when an invalid expiry timestamp is provided.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidProposal(bytes32,bytes32)\":[{\"details\":\"Error thrown when an invalid proposal is encountered.\",\"params\":{\"actual\":\"The actual value of the proposal.\",\"expected\":\"The expected value of the proposal.\"}}],\"ErrInvalidProposalNonce(bytes4)\":[{\"details\":\"Error indicating that the proposal nonce is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\"}}],\"ErrInvalidSignatures(bytes4)\":[{\"details\":\"Error indicating that a signature is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid signature.\"}}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidVoteWeight(bytes4)\":[{\"details\":\"Error indicating that a vote weight is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid vote weight.\"}}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrOnlySelfCall(bytes4)\":[{\"details\":\"Error indicating that a function can only be called by the contract itself.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that can only be called by the contract itself.\"}}],\"ErrQueryForEmptyVote()\":[{\"details\":\"Error thrown when querying for an empty vote.\"}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedInterface(bytes4,address)\":[{\"details\":\"The error indicating an unsupported interface.\",\"params\":{\"addr\":\"The address where the unsupported interface was encountered.\",\"interfaceId\":\"The bytes4 interface identifier that is not supported.\"}}],\"ErrUnsupportedVoteType(bytes4)\":[{\"details\":\"Error indicating that a vote type is not supported.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\"}}],\"ErrVoteIsFinalized()\":[{\"details\":\"Error thrown when attempting to interact with a finalized vote.\"}],\"ErrZeroAddress(bytes4)\":[{\"details\":\"Error indicating that given address is null when it should not.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"kind\":\"dev\",\"methods\":{\"addBridgeOperators(uint96[],address[],address[])\":{\"details\":\"Adds multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to add.\",\"governors\":\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\"},\"returns\":{\"addeds\":\"An array of booleans indicating whether each bridge operator was added successfully. Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators( voteWeights, governors, bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]); const filteredWeights = weights.filter((_, index) => addeds[index]); const filteredGovernors = governors.filter((_, index) => addeds[index]); // ... (Process or use the information as required) ... ```\"}},\"castGlobalProposalBySignatures((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceProposal-_castGlobalProposalBySignatures`.\"},\"castProposalBySignatures((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceProposal-_castProposalBySignatures`.\"},\"castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)\":{\"details\":\"Casts vote for a proposal on the current network. Requirements: - The method caller is governor.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"deleteExpired(uint256,uint256)\":{\"details\":\"Deletes the expired proposal by its chainId and nonce, without creating a new proposal. Requirements: - The proposal is already created.\"},\"getBridgeOperatorOf(address[])\":{\"details\":\"Returns an array of bridge operators correspoding to governor addresses.\",\"returns\":{\"bridgeOperators\":\"An array containing the addresses of all bridge operators.\"}},\"getBridgeOperatorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to get the vote weight for.\"},\"returns\":{\"weight\":\"The vote weight of the specified bridge operator.\"}},\"getBridgeOperators()\":{\"details\":\"Returns an array of all bridge operators.\",\"returns\":{\"_0\":\"An array containing the addresses of all bridge operators.\"}},\"getCallbackRegisters()\":{\"details\":\"Retrieves the addresses of registered callbacks.\",\"returns\":{\"registers\":\"An array containing the addresses of registered callbacks.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getFullBridgeOperatorInfos()\":{\"details\":\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\",\"returns\":{\"bridgeOperators\":\"An array of addresses representing the registered bridge operators.\",\"governors\":\"An array of addresses representing the governors of each bridge operator.\",\"weights\":\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\"}},\"getGlobalProposalSignatures(uint256)\":{\"details\":\"See {CommonGovernanceProposal-_getProposalSignatures}\"},\"getGovernorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific governor.\",\"params\":{\"governor\":\"The address of the governor to get the vote weight for.\"},\"returns\":{\"weight\":\"voteWeight The vote weight of the specified governor.\"}},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getGovernors()\":{\"details\":\"Returns an array of all governors.\",\"returns\":{\"_0\":\"An array containing the addresses of all governors.\"}},\"getGovernorsOf(address[])\":{\"details\":\"Retrieves the governors corresponding to a given array of bridge operators. This external function allows external callers to obtain the governors associated with a given array of bridge operators. The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.\",\"params\":{\"bridgeOperators\":\"An array of bridge operator addresses for which governors are to be retrieved.\"},\"returns\":{\"governors\":\"An array of addresses representing the governors corresponding to the provided bridge operators.\"}},\"getProposalExpiryDuration()\":{\"details\":\"Returns the expiry duration for a new proposal.\"},\"getProposalSignatures(uint256,uint256)\":{\"details\":\"See {CommonGovernanceProposal-_getProposalSignatures}\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTotalWeights()\":{\"details\":\"Returns total weights.\"},\"globalProposalVoted(uint256,address)\":{\"details\":\"See {CommonGovernanceProposal-_proposalVoted}\"},\"isBridgeOperator(address)\":{\"details\":\"Checks if the given address is a bridge operator.\",\"params\":{\"addr\":\"The address to check.\"},\"returns\":{\"_0\":\"A boolean indicating whether the address is a bridge operator.\"}},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"proposalVoted(uint256,uint256,address)\":{\"details\":\"See {CommonGovernanceProposal-_proposalVoted}\"},\"propose(uint256,uint256,address[],uint256[],bytes[],uint256[])\":{\"details\":\"See `CoreGovernance-_proposeProposal`. Requirements: - The method caller is governor.\"},\"proposeGlobal(uint256,uint8[],uint256[],bytes[],uint256[])\":{\"details\":\"See `CoreGovernance-_proposeGlobal`. Requirements: - The method caller is governor.\"},\"proposeGlobalProposalStructAndCastVotes((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. Requirements: - The method caller is governor.\"},\"proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)\":{\"details\":\"Proposes and casts vote for a proposal on the current network. Requirements: - The method caller is governor. - The proposal is for the current network.\"},\"proposeProposalStructAndCastVotes((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceProposal-_proposeProposalStructAndCastVotes`. Requirements: - The method caller is governor. - The proposal is for the current network.\"},\"registerCallbacks(address[])\":{\"details\":\"Registers multiple callbacks with the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to register.\"},\"returns\":{\"registereds\":\"An array indicating the success status of each registration.\"}},\"removeBridgeOperators(address[])\":{\"details\":\"Removes multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to remove.\"},\"returns\":{\"removeds\":\"An array of booleans indicating whether each bridge operator was removed successfully. * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators( bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]); // ... (Process or use the information as required) ... ```\"}},\"resolveTargets(uint8[])\":{\"details\":\"Returns corresponding address of target options. Return address(0) on non-existent target.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumGovernorsWeight(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalBridgeOperators()\":{\"details\":\"Returns the total number of bridge operators.\",\"returns\":{\"_0\":\"The total number of bridge operators.\"}},\"unregisterCallbacks(address[])\":{\"details\":\"Unregisters multiple callbacks from the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to unregister.\"},\"returns\":{\"unregistereds\":\"An array indicating the success status of each unregistration.\"}},\"updateBridgeOperator(address)\":{\"details\":\"Governor updates their corresponding governor and/or operator address. Requirements: - The caller must the governor of the operator that is requested changes.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to update.\"}},\"updateManyTargetOption(uint8[],address[])\":{\"details\":\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal. \"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"},\"updateBridgeOperator(address)\":{\"notice\":\"This method checks authorization by querying the corresponding operator of the msg.sender and then attempts to remove it from the `_bridgeOperatorSet` for gas optimization. In case we allow a governor can leave their operator address blank null `address(0)`, consider add authorization check.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ronin/gateway/RoninBridgeManager.sol\":\"RoninBridgeManager\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\"},\"contracts/extensions/bridge-operator-governance/BridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerCallback, EnumerableSet, BridgeManagerCallbackRegister } from \\\"./BridgeManagerCallbackRegister.sol\\\";\\nimport { IHasContracts, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { IQuorum } from \\\"../../interfaces/IQuorum.sol\\\";\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { AddressArrayUtils } from \\\"../../libraries/AddressArrayUtils.sol\\\";\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\nimport { RoleAccess } from \\\"../../utils/RoleAccess.sol\\\";\\nimport { TUint256Slot } from \\\"../../types/Types.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract BridgeManager is IQuorum, IBridgeManager, BridgeManagerCallbackRegister, HasContracts {\\n using AddressArrayUtils for address[];\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.governorToBridgeOperatorInfo.slot\\\") - 1\\n bytes32 private constant GOVERNOR_TO_BRIDGE_OPERATOR_INFO_SLOT =\\n 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3;\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.govenorOf.slot\\\") - 1\\n bytes32 private constant GOVENOR_OF_SLOT = 0x8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3;\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.governors.slot\\\") - 1\\n bytes32 private constant GOVERNOR_SET_SLOT = 0x546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c;\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.bridgeOperators.slot\\\") - 1\\n bytes32 private constant BRIDGE_OPERATOR_SET_SLOT =\\n 0xd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d;\\n\\n /**\\n * @dev The numerator value used for calculations in the contract.\\n * @notice value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.numerator.slot\\\") - 1\\n */\\n TUint256Slot internal constant NUMERATOR_SLOT =\\n TUint256Slot.wrap(0xc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f);\\n\\n /**\\n * @dev The denominator value used for calculations in the contract.\\n * @notice value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.denominator.slot\\\") - 1\\n */\\n TUint256Slot internal constant DENOMINATOR_SLOT =\\n TUint256Slot.wrap(0xac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff);\\n\\n /**\\n * @dev The nonce value used for tracking nonces in the contract.\\n * @notice value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.nonce.slot\\\") - 1\\n */\\n TUint256Slot internal constant NONCE_SLOT =\\n TUint256Slot.wrap(0x92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d);\\n\\n /**\\n * @dev The total weight value used for storing the cumulative weight in the contract.\\n * @notice value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.totalWeights.slot\\\") - 1\\n */\\n TUint256Slot internal constant TOTAL_WEIGHTS_SLOT =\\n TUint256Slot.wrap(0x6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c);\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n bytes32 public immutable DOMAIN_SEPARATOR;\\n\\n modifier onlyGovernor() virtual {\\n _requireGovernor(msg.sender);\\n _;\\n }\\n\\n constructor(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) payable BridgeManagerCallbackRegister(callbackRegisters) {\\n NONCE_SLOT.store(1);\\n NUMERATOR_SLOT.store(num);\\n DENOMINATOR_SLOT.store(denom);\\n\\n _setContract(ContractType.BRIDGE, bridgeContract);\\n\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,bytes32 salt)\\\"),\\n keccak256(\\\"BridgeAdmin\\\"), // name hash\\n keccak256(\\\"2\\\"), // version hash\\n keccak256(abi.encode(\\\"BRIDGE_ADMIN\\\", roninChainId)) // salt\\n )\\n );\\n\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function addBridgeOperators(\\n uint96[] calldata voteWeights,\\n address[] calldata governors,\\n address[] calldata bridgeOperators\\n ) external onlySelfCall returns (bool[] memory addeds) {\\n addeds = _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function removeBridgeOperators(\\n address[] calldata bridgeOperators\\n ) external onlySelfCall returns (bool[] memory removeds) {\\n removeds = _removeBridgeOperators(bridgeOperators);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n * @notice This method checks authorization by querying the corresponding operator of the msg.sender and then\\n * attempts to remove it from the `_bridgeOperatorSet` for gas optimization. In case we allow a governor can leave\\n * their operator address blank null `address(0)`, consider add authorization check.\\n */\\n function updateBridgeOperator(address newBridgeOperator) external onlyGovernor {\\n _requireCreatedEOA(newBridgeOperator);\\n\\n // Queries the previous bridge operator\\n mapping(address => BridgeOperatorInfo) storage _gorvernorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo();\\n address currentBridgeOperator = _gorvernorToBridgeOperatorInfo[msg.sender].addr;\\n if (currentBridgeOperator == newBridgeOperator) {\\n revert ErrBridgeOperatorAlreadyExisted(newBridgeOperator);\\n }\\n\\n // Tries replace the bridge operator\\n EnumerableSet.AddressSet storage _bridgeOperatorSet = _getBridgeOperatorSet();\\n bool updated = _bridgeOperatorSet.remove(currentBridgeOperator) && _bridgeOperatorSet.add(newBridgeOperator);\\n if (!updated) revert ErrBridgeOperatorUpdateFailed(newBridgeOperator);\\n\\n mapping(address => address) storage _governorOf = _getGovernorOf();\\n delete _governorOf[currentBridgeOperator];\\n _governorOf[newBridgeOperator] = msg.sender;\\n _gorvernorToBridgeOperatorInfo[msg.sender].addr = newBridgeOperator;\\n\\n _notifyRegisters(\\n IBridgeManagerCallback.onBridgeOperatorUpdated.selector,\\n abi.encode(currentBridgeOperator, newBridgeOperator)\\n );\\n\\n emit BridgeOperatorUpdated(msg.sender, currentBridgeOperator, newBridgeOperator);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external override onlySelfCall {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(\\n uint256 numerator,\\n uint256 denominator\\n ) external override onlySelfCall returns (uint256, uint256) {\\n return _setThreshold(numerator, denominator);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getTotalWeights() public view returns (uint256) {\\n return TOTAL_WEIGHTS_SLOT.load();\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint256[] memory weights) {\\n weights = _getGovernorWeights(governors);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeight(address governor) external view returns (uint256 weight) {\\n weight = _getGovernorWeight(governor);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function sumGovernorsWeight(\\n address[] calldata governors\\n ) external view nonDuplicate(governors) returns (uint256 sum) {\\n sum = _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function totalBridgeOperators() external view returns (uint256) {\\n return _getBridgeOperatorSet().length();\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function isBridgeOperator(address addr) external view returns (bool) {\\n return _getBridgeOperatorSet().contains(addr);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperators() external view returns (address[] memory) {\\n return _getBridgeOperators();\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernors() external view returns (address[] memory) {\\n return _getGovernors();\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperatorOf(address[] memory governors) public view returns (address[] memory bridgeOperators) {\\n uint256 length = governors.length;\\n bridgeOperators = new address[](length);\\n\\n mapping(address => BridgeOperatorInfo) storage _gorvernorToBridgeOperator = _getGovernorToBridgeOperatorInfo();\\n for (uint256 i; i < length; ) {\\n bridgeOperators[i] = _gorvernorToBridgeOperator[governors[i]].addr;\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors) {\\n uint256 length = bridgeOperators.length;\\n governors = new address[](length);\\n mapping(address => address) storage _governorOf = _getGovernorOf();\\n\\n for (uint256 i; i < length; ) {\\n governors[i] = _governorOf[bridgeOperators[i]];\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getFullBridgeOperatorInfos()\\n external\\n view\\n returns (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights)\\n {\\n governors = _getGovernors();\\n bridgeOperators = getBridgeOperatorOf(governors);\\n weights = _getGovernorWeights(governors);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint256 weight) {\\n mapping(address => address) storage _governorOf = _getGovernorOf();\\n mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo();\\n weight = _governorToBridgeOperatorInfo[_governorOf[bridgeOperator]].voteWeight;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return (NUMERATOR_SLOT.mul(TOTAL_WEIGHTS_SLOT.load()) + DENOMINATOR_SLOT.load() - 1) / DENOMINATOR_SLOT.load();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (NUMERATOR_SLOT.load(), DENOMINATOR_SLOT.load());\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * DENOMINATOR_SLOT.load() >= NUMERATOR_SLOT.mul(TOTAL_WEIGHTS_SLOT.load());\\n }\\n\\n /**\\n * @dev Internal function to add bridge operators.\\n *\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to add bridge operators.\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\n *\\n * @param voteWeights An array of uint256 values representing the vote weights for each bridge operator.\\n * @param governors An array of addresses representing the governors for each bridge operator.\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\n */\\n function _addBridgeOperators(\\n uint96[] memory voteWeights,\\n address[] memory governors,\\n address[] memory bridgeOperators\\n ) internal nonDuplicate(governors.extend(bridgeOperators)) returns (bool[] memory addeds) {\\n uint256 length = bridgeOperators.length;\\n if (!(length == voteWeights.length && length == governors.length)) revert ErrLengthMismatch(msg.sig);\\n addeds = new bool[](length);\\n // simply skip add operations if inputs are empty.\\n if (length == 0) return addeds;\\n\\n EnumerableSet.AddressSet storage _governorSet = _getGovernorsSet();\\n mapping(address => address) storage _governorOf = _getGovernorOf();\\n EnumerableSet.AddressSet storage _bridgeOperatorSet = _getBridgeOperatorSet();\\n mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo();\\n\\n address governor;\\n address bridgeOperator;\\n uint256 accumulatedWeight;\\n BridgeOperatorInfo memory bridgeOperatorInfo;\\n\\n for (uint256 i; i < length; ) {\\n governor = governors[i];\\n bridgeOperator = bridgeOperators[i];\\n\\n _requireCreatedEOA(governor);\\n _requireCreatedEOA(bridgeOperator);\\n if (voteWeights[i] == 0) revert ErrInvalidVoteWeight(msg.sig);\\n\\n addeds[i] = !(_governorSet.contains(governor) ||\\n _governorSet.contains(bridgeOperator) ||\\n _bridgeOperatorSet.contains(governor) ||\\n _bridgeOperatorSet.contains(bridgeOperator));\\n\\n if (addeds[i]) {\\n _governorSet.add(governor);\\n _bridgeOperatorSet.add(bridgeOperator);\\n _governorOf[bridgeOperator] = governor;\\n bridgeOperatorInfo.addr = bridgeOperator;\\n accumulatedWeight += bridgeOperatorInfo.voteWeight = voteWeights[i];\\n _governorToBridgeOperatorInfo[governor] = bridgeOperatorInfo;\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n TOTAL_WEIGHTS_SLOT.addAssign(accumulatedWeight);\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(bridgeOperators, addeds));\\n\\n emit BridgeOperatorsAdded(addeds, voteWeights, governors, bridgeOperators);\\n }\\n\\n /**\\n * @dev Internal function to remove bridge operators.\\n *\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to remove bridge operators.\\n *\\n * @param bridgeOperators An array of addresses representing the bridge operators to be removed.\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\n */\\n function _removeBridgeOperators(\\n address[] memory bridgeOperators\\n ) internal nonDuplicate(bridgeOperators) returns (bool[] memory removeds) {\\n uint256 length = bridgeOperators.length;\\n removeds = new bool[](length);\\n // simply skip remove operations if inputs are empty.\\n if (length == 0) return removeds;\\n\\n mapping(address => address) storage _governorOf = _getGovernorOf();\\n EnumerableSet.AddressSet storage _governorSet = _getGovernorsSet();\\n EnumerableSet.AddressSet storage _bridgeOperatorSet = _getBridgeOperatorSet();\\n mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo();\\n\\n address governor;\\n address bridgeOperator;\\n uint256 accumulatedWeight;\\n BridgeOperatorInfo memory bridgeOperatorInfo;\\n\\n for (uint256 i; i < length; ) {\\n bridgeOperator = bridgeOperators[i];\\n governor = _governorOf[bridgeOperator];\\n\\n _requireNonZeroAddress(governor);\\n _requireNonZeroAddress(bridgeOperator);\\n\\n bridgeOperatorInfo = _governorToBridgeOperatorInfo[governor];\\n if (bridgeOperatorInfo.addr != bridgeOperator) revert ErrInvalidArguments(msg.sig);\\n\\n removeds[i] = _bridgeOperatorSet.contains(bridgeOperator) && _governorSet.contains(governor);\\n if (removeds[i]) {\\n _governorSet.remove(governor);\\n _bridgeOperatorSet.remove(bridgeOperator);\\n\\n delete _governorOf[bridgeOperator];\\n delete _governorToBridgeOperatorInfo[governor];\\n accumulatedWeight += bridgeOperatorInfo.voteWeight;\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n TOTAL_WEIGHTS_SLOT.subAssign(accumulatedWeight);\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(bridgeOperators, removeds));\\n\\n emit BridgeOperatorsRemoved(removeds, bridgeOperators);\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(\\n uint256 numerator,\\n uint256 denominator\\n ) internal virtual returns (uint256 previousNum, uint256 previousDenom) {\\n if (numerator > denominator) revert ErrInvalidThreshold(msg.sig);\\n\\n previousNum = NUMERATOR_SLOT.load();\\n previousDenom = DENOMINATOR_SLOT.load();\\n NUMERATOR_SLOT.store(numerator);\\n DENOMINATOR_SLOT.store(denominator);\\n\\n emit ThresholdUpdated(NONCE_SLOT.postIncrement(), numerator, denominator, previousNum, previousDenom);\\n }\\n\\n /**\\n * @dev Internal function to get all bridge operators.\\n * @return bridgeOperators An array containing all the registered bridge operator addresses.\\n */\\n function _getBridgeOperators() internal view returns (address[] memory) {\\n return _getBridgeOperatorSet().values();\\n }\\n\\n /**\\n * @dev Internal function to get all governors.\\n * @return governors An array containing all the registered governor addresses.\\n */\\n function _getGovernors() internal view returns (address[] memory) {\\n return _getGovernorsSet().values();\\n }\\n\\n /**\\n * @dev Internal function to get the vote weights of a given array of governors.\\n * @param governors An array containing the addresses of governors.\\n * @return weights An array containing the vote weights of the corresponding governors.\\n */\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint256[] memory weights) {\\n uint256 length = governors.length;\\n weights = new uint256[](length);\\n mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo();\\n for (uint256 i; i < length; ) {\\n weights[i] = _governorToBridgeOperatorInfo[governors[i]].voteWeight;\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\n * @param governors An array containing the addresses of governors to calculate the sum of vote weights.\\n * @return sum The total sum of vote weights for the provided governors.\\n * @notice The input array `governors` must contain unique addresses to avoid duplicate calculations.\\n */\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\n uint256 length = _getBridgeOperatorSet().length();\\n mapping(address => BridgeOperatorInfo) storage _governorToBridgeOperatorInfo = _getGovernorToBridgeOperatorInfo();\\n\\n for (uint256 i; i < length; ) {\\n sum += _governorToBridgeOperatorInfo[governors[i]].voteWeight;\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal function to require that the caller has governor role access.\\n * @param addr The address to check for governor role access.\\n * @dev If the address does not have governor role access (vote weight is zero), a revert with the corresponding error message is triggered.\\n */\\n function _requireGovernor(address addr) internal view {\\n if (_getGovernorWeight(addr) == 0) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\n }\\n }\\n\\n /**\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function _getGovernorWeight(address governor) internal view returns (uint256) {\\n return _getGovernorToBridgeOperatorInfo()[governor].voteWeight;\\n }\\n\\n /**\\n * @dev Internal function to access the address set of bridge operators.\\n * @return bridgeOperators the storage address set.\\n */\\n function _getBridgeOperatorSet() internal pure returns (EnumerableSet.AddressSet storage bridgeOperators) {\\n assembly (\\\"memory-safe\\\") {\\n bridgeOperators.slot := BRIDGE_OPERATOR_SET_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to access the address set of bridge operators.\\n * @return governors the storage address set.\\n */\\n function _getGovernorsSet() internal pure returns (EnumerableSet.AddressSet storage governors) {\\n assembly (\\\"memory-safe\\\") {\\n governors.slot := GOVERNOR_SET_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to access the mapping from governor => BridgeOperatorInfo.\\n * @return governorToBridgeOperatorInfo the mapping from governor => BridgeOperatorInfo.\\n */\\n function _getGovernorToBridgeOperatorInfo()\\n internal\\n pure\\n returns (mapping(address => BridgeOperatorInfo) storage governorToBridgeOperatorInfo)\\n {\\n assembly (\\\"memory-safe\\\") {\\n governorToBridgeOperatorInfo.slot := GOVERNOR_TO_BRIDGE_OPERATOR_INFO_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to access the mapping from bridge operator => governor.\\n * @return governorOf the mapping from bridge operator => governor.\\n */\\n function _getGovernorOf() internal pure returns (mapping(address => address) storage governorOf) {\\n assembly (\\\"memory-safe\\\") {\\n governorOf.slot := GOVENOR_OF_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x26e2963f2b9a2a8dc304ced298444f6497bbf63d6e9bff7743c53a81558ef011\",\"license\":\"MIT\"},\"contracts/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { IBridgeManagerCallbackRegister } from \\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\n\\n/**\\n * @title BridgeManagerCallbackRegister\\n * @dev A contract that manages callback registrations and execution for a bridge.\\n */\\nabstract contract BridgeManagerCallbackRegister is IdentityGuard, IBridgeManagerCallbackRegister {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n /**\\n * @dev Storage slot for the address set of callback registers.\\n * @dev Value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\") - 1.\\n */\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\n\\n constructor(address[] memory callbackRegisters) payable {\\n _registerCallbacks(callbackRegisters);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function registerCallbacks(address[] calldata registers) external onlySelfCall returns (bool[] memory registereds) {\\n registereds = _registerCallbacks(registers);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function unregisterCallbacks(\\n address[] calldata registers\\n ) external onlySelfCall returns (bool[] memory unregistereds) {\\n unregistereds = _unregisterCallbacks(registers);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\n registers = _getCallbackRegisters().values();\\n }\\n\\n /**\\n * @dev Internal function to register multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n * @return registereds An array indicating the success status of each registration.\\n */\\n function _registerCallbacks(\\n address[] memory registers\\n ) internal nonDuplicate(registers) returns (bool[] memory registereds) {\\n uint256 length = registers.length;\\n registereds = new bool[](length);\\n if (length == 0) return registereds;\\n\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n address register;\\n bytes4 callbackInterface = type(IBridgeManagerCallback).interfaceId;\\n\\n for (uint256 i; i < length; ) {\\n register = registers[i];\\n\\n _requireHasCode(register);\\n _requireSupportsInterface(register, callbackInterface);\\n\\n registereds[i] = _callbackRegisters.add(register);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal function to unregister multiple callbacks from the bridge.\\n * @param registers The array of callback addresses to unregister.\\n * @return unregistereds An array indicating the success status of each unregistration.\\n */\\n function _unregisterCallbacks(\\n address[] memory registers\\n ) internal nonDuplicate(registers) returns (bool[] memory unregistereds) {\\n uint256 length = registers.length;\\n unregistereds = new bool[](length);\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n\\n for (uint256 i; i < length; ) {\\n unregistereds[i] = _callbackRegisters.remove(registers[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\n * @param callbackFnSig The function signature of the callback method.\\n * @param inputs The data to pass to the callback method.\\n */\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\n address[] memory registers = _getCallbackRegisters().values();\\n uint256 length = registers.length;\\n if (length == 0) return;\\n\\n bool[] memory statuses = new bool[](length);\\n bytes[] memory returnDatas = new bytes[](length);\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\n\\n for (uint256 i; i < length; ) {\\n (statuses[i], returnDatas[i]) = registers[i].call(callData);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit Notified(callData, registers, statuses, returnDatas);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the address set of callback registers.\\n * @return callbackRegisters The storage reference to the callback registers.\\n */\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\n assembly (\\\"memory-safe\\\") {\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0x604f39e11b8dc4ce6fb765c606f7b87bc0cad3540dbb291cccb809123724bdf3\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n _requireAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireAdmin() internal view {\\n if (msg.sender != _getAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0x06e5962713a77abf6d5ba646e1cc1cfb6f9c50e7d52520dd82a10bf309534187\",\"license\":\"MIT\"},\"contracts/extensions/sequential-governance/CoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"../../libraries/Ballot.sol\\\";\\nimport \\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/SignatureConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\n\\nabstract contract CoreGovernance is SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Error thrown when attempting to interact with a finalized vote.\\n */\\n error ErrVoteIsFinalized();\\n\\n /**\\n * @dev Error thrown when the current proposal is not completed.\\n */\\n error ErrCurrentProposalIsNotCompleted();\\n\\n struct ProposalVote {\\n VoteStatus status;\\n bytes32 hash;\\n uint256 againstVoteWeight; // Total weight of against votes\\n uint256 forVoteWeight; // Total weight of for votes\\n address[] forVoteds; // Array of addresses voting for\\n address[] againstVoteds; // Array of addresses voting against\\n uint256 expiryTimestamp;\\n mapping(address => Signature) sig;\\n mapping(address => bool) voted;\\n }\\n\\n /// @dev Emitted when a proposal is created\\n event ProposalCreated(\\n uint256 indexed chainId,\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n address creator\\n );\\n /// @dev Emitted when the proposal is voted\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\n /// @dev Emitted when the proposal is approved\\n event ProposalApproved(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is reject\\n event ProposalRejected(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is expired\\n event ProposalExpired(bytes32 indexed proposalHash);\\n /// @dev Emitted when the proposal is executed\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\n /// @dev Emitted when the proposal expiry duration is changed.\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\n\\n /// @dev Mapping from chain id => vote round\\n /// @notice chain id = 0 for global proposal\\n mapping(uint256 => uint256) public round;\\n /// @dev Mapping from chain id => vote round => proposal vote\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\n\\n uint256 internal _proposalExpiryDuration;\\n\\n constructor(uint256 _expiryDuration) {\\n _setProposalExpiryDuration(_expiryDuration);\\n }\\n\\n /**\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\n * if it is expired and not increase the `_round`.\\n */\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\n _round = round[_chainId];\\n // Skip checking for the first ever round\\n if (_round == 0) {\\n _round = round[_chainId] = 1;\\n } else {\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\n if (!_isExpired) {\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\n unchecked {\\n _round = ++round[_chainId];\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\n */\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\n _vote.hash = _proposalHash;\\n _vote.expiryTimestamp = _expiryTimestamp;\\n }\\n\\n /**\\n * @dev Proposes for a new proposal.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposal(\\n uint256 chainId,\\n uint256 expiryTimestamp,\\n address[] memory targets,\\n uint256[] memory values,\\n bytes[] memory calldatas,\\n uint256[] memory gasAmounts,\\n address creator\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\n uint256 round_ = _createVotingRound(chainId);\\n\\n proposal = Proposal.ProposalDetail(round_, chainId, expiryTimestamp, targets, values, calldatas, gasAmounts);\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n _saveVotingRound(vote[chainId][round_], proposalHash, expiryTimestamp);\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\n }\\n\\n /**\\n * @dev Proposes proposal struct.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposalStruct(\\n Proposal.ProposalDetail memory proposal,\\n address creator\\n ) internal virtual returns (uint256 round_) {\\n uint256 chainId = proposal.chainId;\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n round_ = _createVotingRound(chainId);\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\n }\\n\\n /**\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the round.\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\n * proposal is approved, executed or rejected.\\n *\\n */\\n function _castVote(\\n Proposal.ProposalDetail memory proposal,\\n Ballot.VoteType support,\\n uint256 minimumForVoteWeight,\\n uint256 minimumAgainstVoteWeight,\\n address voter,\\n Signature memory signature,\\n uint256 voterWeight\\n ) internal virtual returns (bool done) {\\n uint256 chainId = proposal.chainId;\\n uint256 round_ = proposal.nonce;\\n ProposalVote storage _vote = vote[chainId][round_];\\n\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\n return true;\\n }\\n\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\n\\n _vote.voted[voter] = true;\\n // Stores the signature if it is not empty\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\n _vote.sig[voter] = signature;\\n }\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\n\\n uint256 _forVoteWeight;\\n uint256 _againstVoteWeight;\\n if (support == Ballot.VoteType.For) {\\n _vote.forVoteds.push(voter);\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\n } else if (support == Ballot.VoteType.Against) {\\n _vote.againstVoteds.push(voter);\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\n } else revert ErrUnsupportedVoteType(msg.sig);\\n\\n if (_forVoteWeight >= minimumForVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n _tryExecute(_vote, proposal);\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n }\\n }\\n\\n /**\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\n *\\n * Emits the event `ProposalExpired` if the vote is expired.\\n *\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\n * before or it will emit an unexpected event of `ProposalExpired`.\\n */\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\n isExpired =\\n _getChainType() == ChainType.RoninChain &&\\n proposalVote.status == VoteStatus.Pending &&\\n proposalVote.expiryTimestamp <= block.timestamp;\\n\\n if (isExpired) {\\n emit ProposalExpired(proposalVote.hash);\\n\\n for (uint256 _i; _i < proposalVote.forVoteds.length; ) {\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < proposalVote.againstVoteds.length; ) {\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n delete proposalVote.status;\\n delete proposalVote.hash;\\n delete proposalVote.againstVoteWeight;\\n delete proposalVote.forVoteWeight;\\n delete proposalVote.forVoteds;\\n delete proposalVote.againstVoteds;\\n delete proposalVote.expiryTimestamp;\\n }\\n }\\n\\n /**\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\n */\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\n if (proposal.executable()) {\\n vote_.status = VoteStatus.Executed;\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\n }\\n }\\n\\n /**\\n * @dev Sets the expiry duration for a new proposal.\\n */\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\n _proposalExpiryDuration = expiryDuration;\\n emit ProposalExpiryDurationChanged(expiryDuration);\\n }\\n\\n /**\\n * @dev Returns the expiry duration for a new proposal.\\n */\\n function _getProposalExpiryDuration() internal view returns (uint256) {\\n return _proposalExpiryDuration;\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\n return vote_.voted[voter];\\n }\\n\\n /**\\n * @dev Returns total weight from validators.\\n */\\n function _getTotalWeights() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns minimum vote to pass a proposal.\\n */\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\n */\\n function _getChainType() internal view virtual returns (ChainType);\\n}\\n\",\"keccak256\":\"0x141791e1ab3c89cac0af0240a497cf9562ddbb050561798b9c4565d86254b736\",\"license\":\"MIT\"},\"contracts/extensions/sequential-governance/GlobalCoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"./CoreGovernance.sol\\\";\\n\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\n\\n /// @dev Emitted when a proposal is created\\n event GlobalProposalCreated(\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n bytes32 globalProposalHash,\\n GlobalProposal.GlobalProposalDetail globalProposal,\\n address creator\\n );\\n\\n /// @dev Emitted when the target options are updated\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\n\\n constructor(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) {\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\n _updateManyTargetOption(targetOptions, addrs);\\n }\\n\\n /**\\n * @dev Proposes for a global proposal.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobal(\\n uint256 expiryTimestamp,\\n GlobalProposal.TargetOption[] calldata targetOptions,\\n uint256[] memory values,\\n bytes[] memory calldatas,\\n uint256[] memory gasAmounts,\\n address creator\\n ) internal virtual {\\n uint256 round_ = _createVotingRound(0);\\n GlobalProposal.GlobalProposalDetail memory globalProposal = GlobalProposal.GlobalProposalDetail(\\n round_,\\n expiryTimestamp,\\n targetOptions,\\n values,\\n calldatas,\\n gasAmounts\\n );\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(\\n _resolveTargets({ targetOptions: targetOptions, strict: true })\\n );\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Proposes global proposal struct.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobalStruct(\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\n address creator\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\n proposal = globalProposal.intoProposalDetail(\\n _resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })\\n );\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n uint256 round_ = _createVotingRound(0);\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\n\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\n */\\n function resolveTargets(\\n GlobalProposal.TargetOption[] calldata targetOptions\\n ) external view returns (address[] memory targets) {\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\n }\\n\\n /**\\n * @dev Internal helper of {resolveTargets}.\\n *\\n * @param strict When the param is set to `true`, revert on non-existent target.\\n */\\n function _resolveTargets(\\n GlobalProposal.TargetOption[] memory targetOptions,\\n bool strict\\n ) internal view returns (address[] memory targets) {\\n targets = new address[](targetOptions.length);\\n\\n for (uint256 i; i < targetOptions.length; ) {\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n *\\n * Requirement:\\n * - Only allow self-call through proposal.\\n * */\\n function updateManyTargetOption(\\n GlobalProposal.TargetOption[] memory targetOptions,\\n address[] memory targets\\n ) external {\\n // HACK: Cannot reuse the existing library due to too deep stack\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n _updateManyTargetOption(targetOptions, targets);\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n */\\n function _updateManyTargetOption(\\n GlobalProposal.TargetOption[] memory targetOptions,\\n address[] memory targets\\n ) internal {\\n for (uint256 i; i < targetOptions.length; ) {\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\n _updateTargetOption(targetOptions[i], targets[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Updates `targetOption` to `target`.\\n *\\n * Requirement:\\n * - Emit a `TargetOptionUpdated` event.\\n */\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\n _targetOptionsMap[targetOption] = target;\\n emit TargetOptionUpdated(targetOption, target);\\n }\\n}\\n\",\"keccak256\":\"0x986444cade6313dd1ce4137f3338e4fc296769f5cf669f057cd2838e5ae0e54f\",\"license\":\"MIT\"},\"contracts/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\n\\nabstract contract CommonGovernanceProposal is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\n error ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n /**\\n * @dev Casts votes by signatures.\\n *\\n * Note: This method does not verify the proposal hash with the vote hash. Please consider checking it before.\\n *\\n */\\n function _castVotesBySignatures(\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 _forDigest,\\n bytes32 _againstDigest\\n ) internal {\\n if (!(_supports.length != 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\n\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _minimumAgainstVoteWeight = _getTotalWeights() - _minimumForVoteWeight + 1;\\n\\n address _lastSigner;\\n address _signer;\\n Signature calldata _sig;\\n bool _hasValidVotes;\\n for (uint256 _i; _i < _signatures.length; ) {\\n _sig = _signatures[_i];\\n\\n if (_supports[_i] == Ballot.VoteType.For) {\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\n } else if (_supports[_i] == Ballot.VoteType.Against) {\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\n } else revert ErrUnsupportedVoteType(msg.sig);\\n\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\n _lastSigner = _signer;\\n\\n uint256 _weight = _getWeight(_signer);\\n if (_weight > 0) {\\n _hasValidVotes = true;\\n if (\\n _castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)\\n ) {\\n return;\\n }\\n }\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n\\n if (!_hasValidVotes) revert ErrInvalidSignatures(msg.sig);\\n }\\n\\n /**\\n * @dev Returns the voted signatures for the proposals.\\n *\\n * Note: The signatures can be empty in case the proposal is voted on the current network.\\n *\\n */\\n function _getProposalSignatures(\\n uint256 _chainId,\\n uint256 _round\\n )\\n internal\\n view\\n returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures)\\n {\\n ProposalVote storage _vote = vote[_chainId][_round];\\n\\n uint256 _forLength = _vote.forVoteds.length;\\n uint256 _againstLength = _vote.againstVoteds.length;\\n uint256 _voterLength = _forLength + _againstLength;\\n\\n _supports = new Ballot.VoteType[](_voterLength);\\n _signatures = new Signature[](_voterLength);\\n _voters = new address[](_voterLength);\\n for (uint256 _i; _i < _forLength; ) {\\n _supports[_i] = Ballot.VoteType.For;\\n _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]];\\n _voters[_i] = _vote.forVoteds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < _againstLength; ) {\\n _supports[_i + _forLength] = Ballot.VoteType.Against;\\n _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]];\\n _voters[_i + _forLength] = _vote.againstVoteds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\n */\\n function _proposalVoted(uint256 _chainId, uint256 _round, address _voter) internal view returns (bool) {\\n return _voted(vote[_chainId][_round], _voter);\\n }\\n\\n /**\\n * @dev Returns the weight of a governor.\\n */\\n function _getWeight(address _governor) internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x63f6dc95ae1797ce7eb097ce186a671722ace1024f0dc1d9085cffe1f714a316\",\"license\":\"MIT\"},\"contracts/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../libraries/Proposal.sol\\\";\\nimport \\\"../GlobalCoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceProposal.sol\\\";\\n\\nabstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovernanceProposal {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Proposes and votes by signature.\\n */\\n function _proposeGlobalProposalStructAndCastVotes(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures,\\n bytes32 domainSeparator,\\n address creator\\n ) internal returns (Proposal.ProposalDetail memory proposal) {\\n proposal = _proposeGlobalStruct(globalProposal, creator);\\n bytes32 _globalProposalHash = globalProposal.hash();\\n _castVotesBySignatures(\\n proposal,\\n supports_,\\n signatures,\\n ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.For)),\\n ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.Against))\\n );\\n }\\n\\n /**\\n * @dev Proposes a global proposal struct and casts votes by signature.\\n */\\n function _castGlobalProposalBySignatures(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures,\\n bytes32 domainSeparator\\n ) internal {\\n Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(\\n _resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })\\n );\\n\\n bytes32 proposalHash = _proposal.hash();\\n if (vote[0][_proposal.nonce].hash != proposalHash)\\n revert ErrInvalidProposal(proposalHash, vote[0][_proposal.nonce].hash);\\n\\n bytes32 globalProposalHash = globalProposal.hash();\\n _castVotesBySignatures(\\n _proposal,\\n supports_,\\n signatures,\\n ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(globalProposalHash, Ballot.VoteType.For)),\\n ECDSA.toTypedDataHash(domainSeparator, Ballot.hash(globalProposalHash, Ballot.VoteType.Against))\\n );\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\n */\\n function getGlobalProposalSignatures(\\n uint256 round_\\n ) external view returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures) {\\n return _getProposalSignatures(0, round_);\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\n */\\n function globalProposalVoted(uint256 round_, address voter) external view returns (bool) {\\n return _proposalVoted(0, round_, voter);\\n }\\n}\\n\",\"keccak256\":\"0xf51a22e3494d132120453a9818cadf548b2dc779fd0ca004945ae8909bd94fbb\",\"license\":\"MIT\"},\"contracts/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceProposal.sol\\\";\\n\\nabstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Proposes a proposal struct and casts votes by signature.\\n */\\n function _proposeProposalStructAndCastVotes(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 _domainSeparator,\\n address _creator\\n ) internal {\\n _proposeProposalStruct(_proposal, _creator);\\n bytes32 _proposalHash = _proposal.hash();\\n _castVotesBySignatures(\\n _proposal,\\n _supports,\\n _signatures,\\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)),\\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against))\\n );\\n }\\n\\n /**\\n * @dev Proposes a proposal struct and casts votes by signature.\\n */\\n function _castProposalBySignatures(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 _domainSeparator\\n ) internal {\\n bytes32 _proposalHash = _proposal.hash();\\n\\n if (vote[_proposal.chainId][_proposal.nonce].hash != _proposalHash) {\\n revert ErrInvalidProposal(_proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\n }\\n\\n _castVotesBySignatures(\\n _proposal,\\n _supports,\\n _signatures,\\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)),\\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against))\\n );\\n }\\n\\n /**\\n * @dev See `castProposalVoteForCurrentNetwork`.\\n */\\n function _castProposalVoteForCurrentNetwork(\\n address _voter,\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType _support\\n ) internal {\\n if (_proposal.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid);\\n\\n bytes32 proposalHash = _proposal.hash();\\n if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash)\\n revert ErrInvalidProposal(proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\n\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _minimumAgainstVoteWeight = _getTotalWeights() - _minimumForVoteWeight + 1;\\n Signature memory _emptySignature;\\n _castVote(\\n _proposal,\\n _support,\\n _minimumForVoteWeight,\\n _minimumAgainstVoteWeight,\\n _voter,\\n _emptySignature,\\n _getWeight(_voter)\\n );\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\n */\\n function getProposalSignatures(\\n uint256 _chainId,\\n uint256 _round\\n )\\n external\\n view\\n returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures)\\n {\\n return _getProposalSignatures(_chainId, _round);\\n }\\n\\n /**\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\n */\\n function proposalVoted(uint256 _chainId, uint256 _round, address _voter) external view returns (bool) {\\n return _proposalVoted(_chainId, _round, _voter);\\n }\\n}\\n\",\"keccak256\":\"0xc5a693d61c5d0e24f8d23022ded81e734742a7948c7e59831e1f4bb3e1928416\",\"license\":\"MIT\"},\"contracts/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external returns (uint256 _previousNum, uint256 _previousDenom);\\n}\\n\",\"keccak256\":\"0x6b7920b04a73a0e1ff7404aa1a3b5fc738fc0b6154839480f666fd69b55123f0\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperators() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos()\\n external\\n view\\n returns (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeights() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns an array of bridge operators correspoding to governor addresses.\\n * @return bridgeOperators_ An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_);\\n\\n /**\\n * @dev Retrieves the governors corresponding to a given array of bridge operators.\\n * This external function allows external callers to obtain the governors associated with a given array of bridge operators.\\n * The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.\\n * @param bridgeOperators An array of bridge operator addresses for which governors are to be retrieved.\\n * @return governors An array of addresses representing the governors corresponding to the provided bridge operators.\\n */\\n function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint256);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint256 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint256[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n * @return addeds An array of booleans indicating whether each bridge operator was added successfully.\\n *\\n * Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators(\\n * voteWeights,\\n * governors,\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]);\\n * const filteredWeights = weights.filter((_, index) => addeds[index]);\\n * const filteredGovernors = governors.filter((_, index) => addeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function addBridgeOperators(\\n uint96[] calldata voteWeights,\\n address[] calldata governors,\\n address[] calldata bridgeOperators\\n ) external returns (bool[] memory addeds);\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n * @return removeds An array of booleans indicating whether each bridge operator was removed successfully.\\n *\\n * * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators(\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds);\\n\\n /**\\n * @dev Governor updates their corresponding governor and/or operator address.\\n * Requirements:\\n * - The caller must the governor of the operator that is requested changes.\\n * @param bridgeOperator The address of the bridge operator to update.\\n */\\n function updateBridgeOperator(address bridgeOperator) external;\\n}\\n\",\"keccak256\":\"0x0ae26d2b1ed9b67b4eed4f1957ef3c399be7a944b6fa36ff9a0b476de5c3eb7a\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(\\n address[] memory bridgeOperators,\\n bool[] memory addeds\\n ) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(\\n address[] memory bridgeOperators,\\n bool[] memory removeds\\n ) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when a bridge operator is updated.\\n * @param currentBridgeOperator The address of the current bridge operator.\\n * @param newbridgeOperator The new address of the bridge operator.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorUpdated(\\n address currentBridgeOperator,\\n address newbridgeOperator\\n ) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0xfd6868a1041577a463b6c96713edcb18063dc817154d09710abfd5783e4629ee\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerCallbackRegister {\\n /**\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\n */\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\n\\n /**\\n * @dev Retrieves the addresses of registered callbacks.\\n * @return registers An array containing the addresses of registered callbacks.\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers);\\n\\n /**\\n * @dev Registers multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n * @return registereds An array indicating the success status of each registration.\\n */\\n function registerCallbacks(address[] calldata registers) external returns (bool[] memory registereds);\\n\\n /**\\n * @dev Unregisters multiple callbacks from the bridge.\\n * @param registers The array of callback addresses to unregister.\\n * @return unregistereds An array indicating the success status of each unregistration.\\n */\\n function unregisterCallbacks(address[] calldata registers) external returns (bool[] memory unregistereds);\\n}\\n\",\"keccak256\":\"0xadbcf65ee9d55f4aa037216d71a279fe41855fe572a4a8734e6f69954aea98f4\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev The structure representing information about a bridge operator.\\n * @param addr The address of the bridge operator.\\n * @param voteWeight The vote weight assigned to the bridge operator.\\n */\\n struct BridgeOperatorInfo {\\n address addr;\\n uint96 voteWeight;\\n }\\n\\n /**\\n * @dev Emitted when new bridge operators are added.\\n * @param statuses The array of boolean values represents whether the corresponding bridge operator is added successfully.\\n * @param voteWeights The array of vote weights assigned to the added bridge operators.\\n * @param governors The array of addresses representing the governors associated with the added bridge operators.\\n * @param bridgeOperators The array of addresses representing the added bridge operators.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n * @param statuses The array of boolean values representing the statuses of the removed bridge operators.\\n * @param bridgeOperators The array of addresses representing the removed bridge operators.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n * @param governor The address of the governor initiating the update.\\n * @param fromBridgeOperator The address of the bridge operator being updated.\\n * @param toBridgeOperator The updated address of the bridge operator.\\n */\\n event BridgeOperatorUpdated(\\n address indexed governor,\\n address indexed fromBridgeOperator,\\n address indexed toBridgeOperator\\n );\\n}\\n\",\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/ChainTypeConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface ChainTypeConsumer {\\n enum ChainType {\\n RoninChain,\\n Mainchain\\n }\\n}\\n\",\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"contracts/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA; ) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB; ) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\"},\"contracts/libraries/Ballot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\n\\nlibrary Ballot {\\n using ECDSA for bytes32;\\n\\n enum VoteType {\\n For,\\n Against\\n }\\n\\n // keccak256(\\\"Ballot(bytes32 proposalHash,uint8 support)\\\");\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\n\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, BALLOT_TYPEHASH)\\n mstore(add(ptr, 0x20), _proposalHash)\\n mstore(add(ptr, 0x40), _support)\\n digest := keccak256(ptr, 0x60)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\",\"license\":\"MIT\"},\"contracts/libraries/BridgeOperatorsBallot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary BridgeOperatorsBallot {\\n /**\\n * @dev Error thrown when an invalid order of the bridge operator is detected.\\n */\\n error ErrInvalidOrderOfBridgeOperator();\\n\\n struct BridgeOperatorSet {\\n uint256 period;\\n uint256 epoch;\\n address[] operators;\\n }\\n\\n // keccak256(\\\"BridgeOperatorsBallot(uint256 period,uint256 epoch,address[] operators)\\\");\\n bytes32 public constant BRIDGE_OPERATORS_BALLOT_TYPEHASH =\\n 0xd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a;\\n\\n /**\\n * @dev Verifies whether the ballot is valid or not.\\n *\\n * Requirements:\\n * - The ballot is not for an empty operator set.\\n * - The operator address list is in order.\\n *\\n */\\n function verifyBallot(BridgeOperatorSet calldata _ballot) internal pure {\\n if (_ballot.operators.length == 0) revert ErrEmptyArray();\\n\\n address _addr = _ballot.operators[0];\\n for (uint _i = 1; _i < _ballot.operators.length; ) {\\n if (_addr >= _ballot.operators[_i]) revert ErrInvalidOrderOfBridgeOperator();\\n _addr = _ballot.operators[_i];\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns hash of the ballot.\\n */\\n function hash(BridgeOperatorSet memory self) internal pure returns (bytes32 digest_) {\\n bytes32 operatorsHash;\\n address[] memory operators = self.operators;\\n\\n // return keccak256(abi.encode(BRIDGE_OPERATORS_BALLOT_TYPEHASH, _ballot.period, _ballot.epoch, _operatorsHash));\\n assembly {\\n operatorsHash := keccak256(add(operators, 32), mul(mload(operators), 32))\\n let ptr := mload(0x40)\\n mstore(ptr, BRIDGE_OPERATORS_BALLOT_TYPEHASH)\\n mstore(add(ptr, 0x20), mload(self)) // _ballot.period\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // _ballot.epoch\\n mstore(add(ptr, 0x60), operatorsHash)\\n digest_ := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7671f6e599d5a33fa1e97538b1c8e04159337da5701eb6fa07b29d0566f57f81\",\"license\":\"MIT\"},\"contracts/libraries/GlobalProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proposal.sol\\\";\\n\\nlibrary GlobalProposal {\\n /**\\n * @dev Error thrown when attempting to interact with an unsupported target.\\n */\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\n\\n enum TargetOption {\\n /* 0 */ BridgeManager,\\n /* 1 */ GatewayContract,\\n /* 2 */ BridgeReward,\\n /* 3 */ BridgeSlash\\n }\\n\\n struct GlobalProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n uint256 expiryTimestamp;\\n TargetOption[] targetOptions;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 public constant TYPE_HASH = 0x1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee91141350;\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = self.values;\\n TargetOption[] memory targets = self.targetOptions;\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\n uint256[] memory gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length; ) {\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _proposal.nonce,\\n * _proposal.expiryTimestamp,\\n * _targetsHash,\\n * _valuesHash,\\n * _calldatasHash,\\n * _gasAmountsHash\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(self)) // _proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // _proposal.expiryTimestamp\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0x60), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // _valuesHash\\n mstore(add(ptr, 0x80), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // _calldatasHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // _gasAmountsHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n digest_ := keccak256(ptr, 0xe0)\\n }\\n }\\n\\n /**\\n * @dev Converts into the normal proposal.\\n */\\n function intoProposalDetail(\\n GlobalProposalDetail memory self,\\n address[] memory targets\\n ) internal pure returns (Proposal.ProposalDetail memory detail_) {\\n detail_.nonce = self.nonce;\\n detail_.expiryTimestamp = self.expiryTimestamp;\\n detail_.chainId = 0;\\n detail_.targets = new address[](self.targetOptions.length);\\n detail_.values = self.values;\\n detail_.calldatas = self.calldatas;\\n detail_.gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < self.targetOptions.length; ) {\\n detail_.targets[i] = targets[i];\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c5479df6c49da6ce1addc4779b4e5a1a203148062594f9f70a416dea20b83e1\",\"license\":\"MIT\"},\"contracts/libraries/IsolatedGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../interfaces/consumers/VoteStatusConsumer.sol\\\";\\nimport \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary IsolatedGovernance {\\n struct Vote {\\n VoteStatusConsumer.VoteStatus status;\\n bytes32 finalHash;\\n /// @dev Mapping from voter => receipt hash\\n mapping(address => bytes32) voteHashOf;\\n /// @dev The timestamp that voting is expired (no expiration=0)\\n uint256 expiredAt;\\n /// @dev The timestamp that voting is created\\n uint256 createdAt;\\n /// @dev The list of voters\\n address[] voters;\\n }\\n\\n /**\\n * @dev Casts vote for the receipt with the receipt hash `_hash`.\\n *\\n * Requirements:\\n * - The voter has not voted for the round.\\n *\\n */\\n function castVote(Vote storage _v, address _voter, bytes32 _hash) internal {\\n if (_v.expiredAt > 0 && _v.expiredAt <= block.timestamp) {\\n _v.status = VoteStatusConsumer.VoteStatus.Expired;\\n }\\n\\n if (voted(_v, _voter)) revert ErrAlreadyVoted(_voter);\\n\\n _v.voteHashOf[_voter] = _hash;\\n _v.voters.push(_voter);\\n }\\n\\n /**\\n * @dev Updates vote with the requirement of minimum vote weight.\\n */\\n function syncVoteStatus(\\n Vote storage _v,\\n uint256 _minimumVoteWeight,\\n uint256 _votedWeightForHash,\\n bytes32 _hash\\n ) internal returns (VoteStatusConsumer.VoteStatus _status) {\\n if (_votedWeightForHash >= _minimumVoteWeight && _v.status == VoteStatusConsumer.VoteStatus.Pending) {\\n _v.status = VoteStatusConsumer.VoteStatus.Approved;\\n _v.finalHash = _hash;\\n }\\n\\n return _v.status;\\n }\\n\\n /**\\n * @dev Returns the list of vote's addresses that voted for the hash `_hash`.\\n */\\n function filterByHash(Vote storage _v, bytes32 _hash) internal view returns (address[] memory _voters) {\\n uint256 _count;\\n _voters = new address[](_v.voters.length);\\n\\n unchecked {\\n for (uint _i; _i < _voters.length; ++_i) {\\n address _voter = _v.voters[_i];\\n if (_v.voteHashOf[_voter] == _hash) {\\n _voters[_count++] = _voter;\\n }\\n }\\n }\\n\\n assembly {\\n mstore(_voters, _count)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function voted(Vote storage _v, address _voter) internal view returns (bool) {\\n return _v.voteHashOf[_voter] != bytes32(0);\\n }\\n}\\n\",\"keccak256\":\"0xa6a1e04b914580c099ac87f65ec24c35445eee34809e3decf1c57b6c52942d36\",\"license\":\"MIT\"},\"contracts/libraries/Proposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary Proposal {\\n /**\\n * @dev Error thrown when there is insufficient gas to execute a function.\\n */\\n error ErrInsufficientGas(bytes32 proposalHash);\\n\\n /**\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\n */\\n error ErrInvalidExpiryTimestamp();\\n\\n struct ProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n // Value 0: all chain should run this proposal\\n // Other values: only specifc chain has to execute\\n uint256 chainId;\\n uint256 expiryTimestamp;\\n address[] targets;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 public constant TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a;\\n\\n /**\\n * @dev Validates the proposal.\\n */\\n function validate(ProposalDetail memory _proposal, uint256 _maxExpiryDuration) internal view {\\n if (\\n !(_proposal.targets.length > 0 &&\\n _proposal.targets.length == _proposal.values.length &&\\n _proposal.targets.length == _proposal.calldatas.length &&\\n _proposal.targets.length == _proposal.gasAmounts.length)\\n ) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n if (_proposal.expiryTimestamp > block.timestamp + _maxExpiryDuration) {\\n revert ErrInvalidExpiryTimestamp();\\n }\\n }\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(ProposalDetail memory _proposal) internal pure returns (bytes32 digest_) {\\n uint256[] memory _values = _proposal.values;\\n address[] memory _targets = _proposal.targets;\\n bytes32[] memory _calldataHashList = new bytes32[](_proposal.calldatas.length);\\n uint256[] memory _gasAmounts = _proposal.gasAmounts;\\n\\n for (uint256 _i; _i < _calldataHashList.length; ) {\\n _calldataHashList[_i] = keccak256(_proposal.calldatas[_i]);\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n\\n // return\\n // keccak256(\\n // abi.encode(\\n // TYPE_HASH,\\n // _proposal.nonce,\\n // _proposal.chainId,\\n // _targetsHash,\\n // _valuesHash,\\n // _calldatasHash,\\n // _gasAmountsHash\\n // )\\n // );\\n // /\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_proposal)) // _proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(_proposal, 0x20))) // _proposal.chainId\\n mstore(add(ptr, 0x60), mload(add(_proposal, 0x40))) // expiry timestamp\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(_targets, 32), mul(mload(_targets), 32)) // targetsHash\\n mstore(add(ptr, 0x80), arrayHashed)\\n arrayHashed := keccak256(add(_values, 32), mul(mload(_values), 32)) // _valuesHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(_calldataHashList, 32), mul(mload(_calldataHashList), 32)) // _calldatasHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(_gasAmounts, 32), mul(mload(_gasAmounts), 32)) // _gasAmountsHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n digest_ := keccak256(ptr, 0x100)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the proposal is executable for the current chain.\\n *\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\n *\\n */\\n function executable(ProposalDetail memory _proposal) internal view returns (bool _result) {\\n return _proposal.chainId == 0 || _proposal.chainId == block.chainid;\\n }\\n\\n /**\\n * @dev Executes the proposal.\\n */\\n function execute(\\n ProposalDetail memory _proposal\\n ) internal returns (bool[] memory _successCalls, bytes[] memory _returnDatas) {\\n if (!executable(_proposal)) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid);\\n\\n _successCalls = new bool[](_proposal.targets.length);\\n _returnDatas = new bytes[](_proposal.targets.length);\\n for (uint256 _i = 0; _i < _proposal.targets.length; ) {\\n if (gasleft() <= _proposal.gasAmounts[_i]) revert ErrInsufficientGas(hash(_proposal));\\n\\n (_successCalls[_i], _returnDatas[_i]) = _proposal.targets[_i].call{\\n value: _proposal.values[_i],\\n gas: _proposal.gasAmounts[_i]\\n }(_proposal.calldatas[_i]);\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xbc29aa4e69db7eef0034fdb795181124f86bcf2bc07b5e4a202100dbdce7f7a1\",\"license\":\"MIT\"},\"contracts/ronin/gateway/RoninBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from \\\"../../extensions/bridge-operator-governance/BridgeManager.sol\\\";\\nimport { Ballot, GlobalProposal, Proposal, GovernanceProposal } from \\\"../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\";\\nimport { CoreGovernance, GlobalCoreGovernance, GlobalGovernanceProposal } from \\\"../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\";\\nimport { IsolatedGovernance } from \\\"../../libraries/IsolatedGovernance.sol\\\";\\nimport { BridgeOperatorsBallot } from \\\"../../libraries/BridgeOperatorsBallot.sol\\\";\\nimport { VoteStatusConsumer } from \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\nimport { ErrQueryForEmptyVote } from \\\"../../utils/CommonErrors.sol\\\";\\n\\ncontract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal {\\n using IsolatedGovernance for IsolatedGovernance.Vote;\\n\\n constructor(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n uint256 expiryDuration,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights,\\n GlobalProposal.TargetOption[] memory targetOptions,\\n address[] memory targets\\n )\\n payable\\n CoreGovernance(expiryDuration)\\n GlobalCoreGovernance(targetOptions, targets)\\n BridgeManager(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights)\\n {}\\n\\n /**\\n * CURRENT NETWORK\\n */\\n\\n /**\\n * @dev See `CoreGovernance-_proposeProposal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n *\\n */\\n function propose(\\n uint256 _chainId,\\n uint256 _expiryTimestamp,\\n address[] calldata _targets,\\n uint256[] calldata _values,\\n bytes[] calldata _calldatas,\\n uint256[] calldata _gasAmounts\\n ) external onlyGovernor {\\n _proposeProposal(_chainId, _expiryTimestamp, _targets, _values, _calldatas, _gasAmounts, msg.sender);\\n }\\n\\n /**\\n * @dev See `GovernanceProposal-_proposeProposalStructAndCastVotes`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n * - The proposal is for the current network.\\n *\\n */\\n function proposeProposalStructAndCastVotes(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures\\n ) external onlyGovernor {\\n _proposeProposalStructAndCastVotes(_proposal, _supports, _signatures, DOMAIN_SEPARATOR, msg.sender);\\n }\\n\\n /**\\n * @dev Proposes and casts vote for a proposal on the current network.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n * - The proposal is for the current network.\\n *\\n */\\n function proposeProposalForCurrentNetwork(\\n uint256 expiryTimestamp,\\n address[] calldata targets,\\n uint256[] calldata values,\\n bytes[] calldata calldatas,\\n uint256[] calldata gasAmounts,\\n Ballot.VoteType support\\n ) external onlyGovernor {\\n address _voter = msg.sender;\\n Proposal.ProposalDetail memory _proposal = _proposeProposal({\\n chainId: block.chainid,\\n expiryTimestamp: expiryTimestamp,\\n targets: targets,\\n values: values,\\n calldatas: calldatas,\\n gasAmounts: gasAmounts,\\n creator: _voter\\n });\\n _castProposalVoteForCurrentNetwork(_voter, _proposal, support);\\n }\\n\\n /**\\n * @dev Casts vote for a proposal on the current network.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n *\\n */\\n function castProposalVoteForCurrentNetwork(\\n Proposal.ProposalDetail calldata proposal,\\n Ballot.VoteType support\\n ) external onlyGovernor {\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\n }\\n\\n /**\\n * @dev See `GovernanceProposal-_castProposalBySignatures`.\\n */\\n function castProposalBySignatures(\\n Proposal.ProposalDetail calldata proposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external {\\n _castProposalBySignatures(proposal, supports_, signatures, DOMAIN_SEPARATOR);\\n }\\n\\n /**\\n * GLOBAL NETWORK\\n */\\n\\n /**\\n * @dev See `CoreGovernance-_proposeGlobal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n *\\n */\\n function proposeGlobal(\\n uint256 expiryTimestamp,\\n GlobalProposal.TargetOption[] calldata targetOptions,\\n uint256[] calldata values,\\n bytes[] calldata calldatas,\\n uint256[] calldata gasAmounts\\n ) external onlyGovernor {\\n _proposeGlobal({\\n expiryTimestamp: expiryTimestamp,\\n targetOptions: targetOptions,\\n values: values,\\n calldatas: calldatas,\\n gasAmounts: gasAmounts,\\n creator: msg.sender\\n });\\n }\\n\\n /**\\n * @dev See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n *\\n */\\n function proposeGlobalProposalStructAndCastVotes(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external onlyGovernor {\\n _proposeGlobalProposalStructAndCastVotes({\\n globalProposal: globalProposal,\\n supports_: supports_,\\n signatures: signatures,\\n domainSeparator: DOMAIN_SEPARATOR,\\n creator: msg.sender\\n });\\n }\\n\\n /**\\n * @dev See `GovernanceProposal-_castGlobalProposalBySignatures`.\\n */\\n function castGlobalProposalBySignatures(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external {\\n _castGlobalProposalBySignatures({\\n globalProposal: globalProposal,\\n supports_: supports_,\\n signatures: signatures,\\n domainSeparator: DOMAIN_SEPARATOR\\n });\\n }\\n\\n /**\\n * COMMON METHODS\\n */\\n\\n /**\\n * @dev Deletes the expired proposal by its chainId and nonce, without creating a new proposal.\\n *\\n * Requirements:\\n * - The proposal is already created.\\n *\\n */\\n function deleteExpired(uint256 _chainId, uint256 _round) external {\\n ProposalVote storage _vote = vote[_chainId][_round];\\n if (_vote.hash == 0) revert ErrQueryForEmptyVote();\\n\\n _tryDeleteExpiredVotingRound(_vote);\\n }\\n\\n /**\\n * @dev Returns the expiry duration for a new proposal.\\n */\\n function getProposalExpiryDuration() external view returns (uint256) {\\n return _getProposalExpiryDuration();\\n }\\n\\n /**\\n * @dev Internal function to get the chain type of the contract.\\n * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain).\\n */\\n function _getChainType() internal pure override returns (ChainType) {\\n return ChainType.RoninChain;\\n }\\n\\n /**\\n * @dev Internal function to get the total weights of all governors.\\n * @return The total weights of all governors combined.\\n */\\n function _getTotalWeights() internal view virtual override returns (uint256) {\\n return getTotalWeights();\\n }\\n\\n /**\\n * @dev Internal function to get the minimum vote weight required for governance actions.\\n * @return The minimum vote weight required for governance actions.\\n */\\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\\n return minimumVoteWeight();\\n }\\n\\n /**\\n * @dev Internal function to get the vote weight of a specific governor.\\n * @param _governor The address of the governor to get the vote weight for.\\n * @return The vote weight of the specified governor.\\n */\\n function _getWeight(address _governor) internal view virtual override returns (uint256) {\\n return _getGovernorWeight(_governor);\\n }\\n}\\n\",\"keccak256\":\"0x22cdabc7ef2bd060c4634f37e37905ceb4b6eda5ba4fa9bf04ffe2575128ab12\",\"license\":\"MIT\"},\"contracts/types/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { LibTUint256Slot } from \\\"./operations/LibTUint256Slot.sol\\\";\\n\\ntype TUint256Slot is bytes32;\\n\\nusing {\\n LibTUint256Slot.add,\\n LibTUint256Slot.sub,\\n LibTUint256Slot.mul,\\n LibTUint256Slot.div,\\n LibTUint256Slot.load,\\n LibTUint256Slot.store,\\n LibTUint256Slot.addAssign,\\n LibTUint256Slot.subAssign,\\n LibTUint256Slot.preDecrement,\\n LibTUint256Slot.postDecrement,\\n LibTUint256Slot.preIncrement,\\n LibTUint256Slot.postIncrement\\n} for TUint256Slot global;\\n\",\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\"},\"contracts/types/operations/LibTUint256Slot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { TUint256Slot } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title LibTUint256Slot\\n * @dev Library for handling unsigned 256-bit integers.\\n */\\nlibrary LibTUint256Slot {\\n /// @dev value is equal to bytes4(keccak256(\\\"Panic(uint256)\\\"))\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\n /// @dev error code for {Arithmetic over/underflow} error\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\n /// @dev error code for {Division or modulo by 0} error\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\n\\n /**\\n * @dev Loads the value of the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @return val The loaded value.\\n */\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\n assembly {\\n val := sload(self)\\n }\\n }\\n\\n /**\\n * @dev Stores a value into the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to be stored.\\n */\\n function store(TUint256Slot self, uint256 other) internal {\\n assembly {\\n sstore(self, other)\\n }\\n }\\n\\n /**\\n * @dev Multiplies the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to multiply by.\\n * @return res The resulting value after multiplication.\\n */\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n if iszero(iszero(storedVal)) {\\n res := mul(storedVal, other)\\n\\n // Overflow check\\n if iszero(eq(other, div(res, storedVal))) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Divides the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to divide by.\\n * @return res The resulting value after division.\\n */\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n // revert if divide by zero\\n if iszero(other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, DIVISION_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n res := div(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction.\\n */\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n\\n // Underflow check\\n if lt(storedVal, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n\\n res := sub(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition.\\n */\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n res := add(storedVal, other)\\n\\n // Overflow check\\n if lt(res, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after incrementing.\\n */\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = addAssign(self, 1);\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\n * @param self The TUint256Slot variable.\\n * @return res The original value before incrementing.\\n */\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res + 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after decrementing.\\n */\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = subAssign(self, 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value before decrementing.\\n */\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res - 1);\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition and storage.\\n */\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = add(self, other));\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction and storage.\\n */\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = sub(self, other));\\n }\\n}\\n\",\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\"},\"contracts/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\",\"keccak256\":\"0x3914292a405307cba9e93085edcaf5f1203ca2d55abf998bf1d2af1e86f5a4c6\",\"license\":\"MIT\"},\"contracts/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n /* 0 */ UNKNOWN,\\n /* 1 */ PAUSE_ENFORCER,\\n /* 2 */ BRIDGE,\\n /* 3 */ BRIDGE_TRACKING,\\n /* 4 */ GOVERNANCE_ADMIN,\\n /* 5 */ MAINTENANCE,\\n /* 6 */ SLASH_INDICATOR,\\n /* 7 */ STAKING_VESTING,\\n /* 8 */ VALIDATOR,\\n /* 9 */ STAKING,\\n /* 10 */ RONIN_TRUSTED_ORGANIZATION,\\n /* 11 */ BRIDGE_MANAGER,\\n /* 12 */ BRIDGE_SLASH,\\n /* 13 */ BRIDGE_REWARD\\n}\\n\",\"keccak256\":\"0xf72feff9afafcb5cadc1b05c6e0b998ea5d66c7ece57c3e482e560d0a1bb4079\",\"license\":\"MIT\"},\"contracts/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(\\n abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams))\\n );\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x2d0dfcef3636945bc1785c1fa5a05f5203c79cbb81b2eee92a3ac6a2378c2ce5\",\"license\":\"MIT\"},\"contracts/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n /* 0 */ UNKNOWN,\\n /* 1 */ ADMIN,\\n /* 2 */ COINBASE,\\n /* 3 */ GOVERNOR,\\n /* 4 */ CANDIDATE_ADMIN,\\n /* 5 */ WITHDRAWAL_MIGRATOR,\\n /* 6 */ __DEPRECATED_BRIDGE_OPERATOR,\\n /* 7 */ BLOCK_PRODUCER,\\n /* 8 */ VALIDATOR_CANDIDATE\\n}\\n\",\"keccak256\":\"0xa98cec38c640c4e37f475debbcd366226f1188c3f5ea6e29de768bd33e021873\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052604051620078183803806200781883398101604081905262000026916200144b565b8181898d8d8d8c8c8c8c8c836200003d8162000236565b50506200007d60017f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d60001b6200035360201b620013141790919060201c565b620000ba887fc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f60001b6200035360201b620013141790919060201c565b620000f7877fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff60001b6200035360201b620013141790919060201c565b6200010460028662000357565b604080516020808201839052600c60608301526b212924a223a2afa0a226a4a760a11b6080808401919091528284018a905283518084038201815260a0840185528051908301207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08501527f9d3fa1662ea89365eb7af36506f0ad5413bd7e078960d8481ff4718763aaa8e960e08501527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5610100850152610120808501919091528451808503909101815261014090930190935281519101209052620001ef81838562000401565b50505050505050505062000209816200089860201b60201c565b5062000217600030620008cb565b62000223828262000967565b50505050505050505050505050620018c5565b606081620002448162000a2a565b8251806001600160401b0381111562000261576200026162001276565b6040519080825280602002602001820160405280156200028b578160200160208202803683370190505b509250806000036200029e57506200034d565b600080516020620077f883398151915260006314d72edb60e21b815b848110156200034757878181518110620002d857620002d8620015b7565b60200260200101519250620002f38362000a7160201b60201c565b620002ff838362000aa9565b62000319838562000c8860201b620013181790919060201c565b8782815181106200032e576200032e620015b7565b91151560209283029190910190910152600101620002ba565b50505050505b50919050565b9055565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d811115620003905762000390620015cd565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d811115620003d457620003d4620015cd565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60606200041d828462000ca860201b6200132d1790919060201c565b620004288162000a2a565b82518551811480156200043b5750845181145b6200046c576040516306b5667560e21b81526001600160e01b03196000351660048201526024015b60405180910390fd5b806001600160401b0381111562000487576200048762001276565b604051908082528060200260200182016040528015620004b1578160200160208202803683370190505b50925080600003620004c4575062000890565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c917f8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3917fd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d917f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3919081908190815b89811015620007d1578d8181518110620005875762000587620015b7565b602002602001015194508c8181518110620005a657620005a6620015b7565b60200260200101519350620005c18562000dc660201b60201c565b620005cc8462000dc6565b8e8181518110620005e157620005e1620015b7565b60200260200101516001600160601b03166000036200062257604051637f11b8a360e11b81526001600160e01b031960003516600482015260240162000463565b6200063c858a62000e3460201b620014371790919060201c565b806200065d57506200065d848a62000e3460201b620014371790919060201c565b806200067e57506200067e858862000e3460201b620014371790919060201c565b806200069f57506200069f848862000e3460201b620014371790919060201c565b158c8281518110620006b557620006b5620015b7565b6020026020010190151590811515815250508b8181518110620006dc57620006dc620015b7565b602002602001015115620007c85762000704858a62000c8860201b620013181790919060201c565b506200071f848862000c8860201b620013181790919060201c565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f9082908110620007685762000768620015b7565b6020908102919091018101516001600160601b03169083018190526200078f9084620015e3565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b60010162000569565b506200080f827f6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c60001b62000e5760201b620014591790919060201c565b5062000847635ebae8a060e01b8d8d604051602001620008319291906200167f565b60408051601f1981840301815291905262000e71565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f6040516200087e9493929190620016b1565b60405180910390a15050505050505050505b509392505050565b600281905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b8060036000846003811115620008e557620008e5620015cd565b6003811115620008f957620008f9620015cd565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260038111156200093a576200093a620015cd565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60005b825181101562000a2557306001600160a01b0316828281518110620009935762000993620015b7565b60200260200101516001600160a01b031603620009d25760405163053265f160e01b81526001600160e01b031960003516600482015260240162000463565b62000a1c838281518110620009eb57620009eb620015b7565b602002602001015183838151811062000a085762000a08620015b7565b6020026020010151620008cb60201b60201c565b6001016200096a565b505050565b62000a40816200109160201b620014701760201c565b1562000a6e57604051630d697db160e11b81526001600160e01b031960003516600482015260240162000463565b50565b806001600160a01b03163b60000362000a6e57604051630bfc64a360e21b81526001600160a01b038216600482015260240162000463565b6040516001600160e01b03198216602482015260009060440160408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169062000b0d90859062001767565b600060405180830381855afa9150503d806000811462000b4a576040519150601f19603f3d011682016040523d82523d6000602084013e62000b4f565b606091505b50915091508162000c3157846001600160a01b03168360405160240162000b779190620017b3565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525162000bae919062001767565b600060405180830381855afa9150503d806000811462000beb576040519150601f19603f3d011682016040523d82523d6000602084013e62000bf0565b606091505b5090925090508162000c315760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b038616602482015260440162000463565b8080602001905181019062000c479190620017c8565b62000c815760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b038616602482015260440162000463565b5050505050565b600062000c9f836001600160a01b0384166200113c565b90505b92915050565b81518151606091908082016001600160401b0381111562000ccd5762000ccd62001276565b60405190808252806020026020018201604052801562000cf7578160200160208202803683370190505b50925060005b8281101562000d595785818151811062000d1b5762000d1b620015b7565b602002602001015184828151811062000d385762000d38620015b7565b6001600160a01b039092166020928302919091019091015260010162000cfd565b60005b8281101562000dbc5785818151811062000d7a5762000d7a620015b7565b602002602001015185838151811062000d975762000d97620015b7565b6001600160a01b03909216602092830291909101909101526001918201910162000d5c565b5050505092915050565b62000dd1816200118e565b6001600160a01b0381163f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811462000e3057604051633c88494760e01b81526001600160a01b03831660048201526024810182905260440162000463565b5050565b6001600160a01b0381166000908152600183016020526040812054151562000c9f565b600062000ca28362000e6a8185620011c5565b9250829055565b600062000e98600080516020620077f8833981519152620011e560201b6200150f1760201c565b8051909150600081900362000ead5750505050565b6000816001600160401b0381111562000eca5762000eca62001276565b60405190808252806020026020018201604052801562000ef4578160200160208202803683370190505b5090506000826001600160401b0381111562000f145762000f1462001276565b60405190808252806020026020018201604052801562000f4957816020015b606081526020019060019003908162000f335790505b5090506000868660405160200162000f63929190620017ec565b604051602081830303815290604052905060005b84811015620010485785818151811062000f955762000f95620015b7565b60200260200101516001600160a01b03168260405162000fb6919062001767565b6000604051808303816000865af19150503d806000811462000ff5576040519150601f19603f3d011682016040523d82523d6000602084013e62000ffa565b606091505b50858381518110620010105762001010620015b7565b602002602001018584815181106200102c576200102c620015b7565b6020908102919091010191909152901515905260010162000f77565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b63818685856040516200108094939291906200181f565b60405180910390a150505050505050565b60008151600003620010a557506000919050565b60005b60018351038110156200113357600181015b83518110156200112957838181518110620010d957620010d9620015b7565b60200260200101516001600160a01b0316848381518110620010ff57620010ff620015b7565b60200260200101516001600160a01b03160362001120575060019392505050565b600101620010ba565b50600101620010a8565b50600092915050565b6000818152600183016020526040812054620011855750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000ca2565b50600062000ca2565b6001600160a01b03811662000a6e5760405163104c66df60e31b81526001600160e01b031960003516600482015260240162000463565b815481018181101562000ca257634e487b7160005260116020526024601cfd5b60606000620011f483620011fb565b9392505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156200124d57602002820191906000526020600020905b81548152602001906001019080831162001238575b50505050509050919050565b80516001600160a01b03811681146200127157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620012b757620012b762001276565b604052919050565b60006001600160401b03821115620012db57620012db62001276565b5060051b60200190565b600082601f830112620012f757600080fd5b81516020620013106200130a83620012bf565b6200128c565b82815260059290921b840181019181810190868411156200133057600080fd5b8286015b848110156200135657620013488162001259565b835291830191830162001334565b509695505050505050565b600082601f8301126200137357600080fd5b81516020620013866200130a83620012bf565b82815260059290921b84018101918181019086841115620013a657600080fd5b8286015b84811015620013565780516001600160601b0381168114620013cc5760008081fd5b8352918301918301620013aa565b600082601f830112620013ec57600080fd5b81516020620013ff6200130a83620012bf565b82815260059290921b840181019181810190868411156200141f57600080fd5b8286015b8481101562001356578051600481106200143d5760008081fd5b835291830191830162001423565b60008060008060008060008060008060006101608c8e0312156200146e57600080fd5b8b519a5060208c0151995060408c0151985060608c015197506200149560808d0162001259565b60a08d01519097506001600160401b03811115620014b257600080fd5b620014c08e828f01620012e5565b60c08e015190975090506001600160401b03811115620014df57600080fd5b620014ed8e828f01620012e5565b60e08e015190965090506001600160401b038111156200150c57600080fd5b6200151a8e828f01620012e5565b6101008e015190955090506001600160401b038111156200153a57600080fd5b620015488e828f0162001361565b6101208e015190945090506001600160401b038111156200156857600080fd5b620015768e828f01620013da565b6101408e015190935090506001600160401b038111156200159657600080fd5b620015a48e828f01620012e5565b9150509295989b509295989b9093969950565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b8082018082111562000ca257634e487b7160e01b600052601160045260246000fd5b600081518084526020808501945080840160005b83811015620016405781516001600160a01b03168752958201959082019060010162001619565b509495945050505050565b600081518084526020808501945080840160005b83811015620016405781511515875295820195908201906001016200165f565b60408152600062001694604083018562001605565b8281036020840152620016a881856200164b565b95945050505050565b608081526000620016c660808301876200164b565b82810360208481019190915286518083528782019282019060005b81811015620017085784516001600160601b031683529383019391830191600101620016e1565b505084810360408601526200171e818862001605565b92505050828103606084015262001736818562001605565b979650505050505050565b60005b838110156200175e57818101518382015260200162001744565b50506000910152565b600082516200177b81846020870162001741565b9190910192915050565b600081518084526200179f81602086016020860162001741565b601f01601f19169290920160200192915050565b60208152600062000c9f602083018462001785565b600060208284031215620017db57600080fd5b81518015158114620011f457600080fd5b6001600160e01b03198316815281516000906200181181600485016020870162001741565b919091016004019392505050565b60808152600062001834608083018762001785565b60208382038185015262001849828862001605565b915083820360408501526200185f82876200164b565b915083820360608501528185518084528284019150828160051b85010183880160005b83811015620018b457601f19878403018552620018a183835162001785565b9486019492509085019060010162001882565b50909b9a5050505050505050505050565b608051615efb620018fd600039600081816103bd015281816106a2015281816108a5015281816109ab01526112000152615efb6000f3fe608060405234801561001057600080fd5b50600436106102685760003560e01c80639a7d338211610151578063bc96180b116100c3578063de981f1b11610087578063de981f1b1461061b578063e75235b814610646578063e9c034981461064e578063f80b535214610661578063fb4f637114610669578063fdc4fa471461067c57600080fd5b8063bc96180b146105b6578063c441c4a8146105be578063cc7e6b3b146105d5578063d78392f8146105f5578063dafae4081461060857600080fd5b8063ada86b2411610115578063ada86b24146104f2578063b384abef146104fa578063b405aaf214610555578063b9c3620914610568578063bc4e068f14610590578063bc9182fd146105a357600080fd5b80639a7d33821461049e5780639b19dbfd146104b15780639b2ee437146104b9578063a1819f9a146104cc578063a8a0e32c146104df57600080fd5b80632faf925d116101ea578063663ac011116101ae578063663ac011146103e75780637de5dedd146103fa578063800eaab314610402578063828fc1a114610415578063865e6fd314610428578063901979d51461043b57600080fd5b80632faf925d1461037257806334d5f37b1461038557806335da8121146103a55780633644e515146103b8578063562d5304146103df57600080fd5b80630f7c3189116102315780630f7c3189146102f25780631c905e39146103075780631f425338146103295780632c5e65201461033c5780632d6d7d731461035f57600080fd5b80624054b81461026d57806301a5f43f1461028257806309fcd8c7146102ab5780630a44fa43146102be5780630b881830146102df575b600080fd5b61028061027b366004614aa3565b61068f565b005b610295610290366004614b37565b6106ce565b6040516102a29190614c0d565b60405180910390f35b6102806102b9366004614c20565b610781565b6102d16102cc366004614cef565b610816565b6040519081526020016102a2565b6102806102ed366004614aa3565b61089b565b6102fa6108c9565b6040516102a29190614d69565b61031a610315366004614d7c565b6108e7565b6040516102a293929190614dc8565b610295610337366004614cef565b610903565b61034f61034a366004614e90565b610950565b60405190151581526020016102a2565b6102fa61036d366004614cef565b61095d565b610280610380366004614ec5565b6109a1565b6102d1610393366004614f1e565b60006020819052908152604090205481565b6102956103b3366004614cef565b6109cf565b6102d17f000000000000000000000000000000000000000000000000000000000000000081565b6102d1610a15565b6102806103f5366004614f46565b610a2e565b6102d1610b1b565b6102806104103660046151b1565b610b97565b61034f610423366004615214565b610bdc565b61028061043636600461524f565b610bea565b6102d1610449366004615279565b6001600160a01b039081166000908152600080516020615e8f83398151915260209081526040808320549093168252600080516020615e6f83398151915290522054600160a01b90046001600160601b031690565b6102806104ac366004614d7c565b610c05565b6102fa610c51565b6102806104c7366004615279565b610c5b565b6102806104da366004615294565b610df2565b6102806104ed36600461536d565b610eb9565b6102d1610ed5565b610544610508366004614d7c565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102a29594939291906153b1565b61034f610563366004615279565b610eed565b61057b610576366004614d7c565b610f07565b604080519283526020830191909152016102a2565b61031a61059e366004614f1e565b610f28565b6102fa6105b13660046153e6565b610f45565b6102d1611036565b6105c6611041565b6040516102a29392919061544a565b6105e86105e3366004614cef565b61106b565b6040516102a2919061548d565b6102d1610603366004615279565b6110a9565b61034f610616366004614f1e565b6110b4565b61062e6106293660046154a0565b6110f1565b6040516001600160a01b0390911681526020016102a2565b61057b61116c565b61029561065c366004614cef565b61119d565b6102fa6111e3565b610280610677366004614ec5565b6111ed565b6102fa61068a366004614cef565b61122d565b6106983361151c565b6106c785858585857f000000000000000000000000000000000000000000000000000000000000000033611558565b5050505050565b60606106d86115fd565b61077687878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061162d92505050565b979650505050505050565b61078a3361151c565b61080b8989898989808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506107d092508a91508b9050615586565b8787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506119a9915050565b505050505050505050565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108579250839150611b069050565b610893848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b3b92505050565b949350505050565b6106c785858585857f0000000000000000000000000000000000000000000000000000000000000000611be2565b60606108e2600080516020615e0f83398151915261150f565b905090565b60608060606108f68585611c96565b9250925092509250925092565b606061090d6115fd565b61094983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061207f92505050565b9392505050565b6000610893848484612141565b606061094983838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250612177915050565b92915050565b6106c785858585857f00000000000000000000000000000000000000000000000000000000000000006122d1565b60606109d96115fd565b6109498383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506123f492505050565b60006108e2600080516020615eaf8339815191526124e6565b610a373361151c565b60003390506000610b00468d8d8d80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508c8c80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610ac592508d91508e9050615586565b8a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508b92506124f0915050565b9050610b0d8282856125ff565b505050505050505050505050565b6000610b33600080516020615e2f8339815191525490565b6001610b4b600080516020615e2f8339815191525490565b610b79610b64600080516020615ecf8339815191525490565b600080516020615e4f83398151915290612715565b610b8391906155a9565b610b8d91906155bc565b6108e291906155cf565b333014610bce576000356001600160e01b0319166040516307337e1960e41b8152600401610bc591906155f1565b60405180910390fd5b610bd88282612740565b5050565b600061094960008484612141565b610bf26115fd565b610bfb816127ee565b610bd88282612824565b6000828152600160208181526040808420858552909152822090810154909103610c425760405163713b099760e11b815260040160405180910390fd5b610c4b816128c8565b50505050565b60606108e2612add565b610c643361151c565b610c6d81612af6565b336000908152600080516020615e6f83398151915260208190526040909120546001600160a01b039081169083168103610cc557604051630669b93360e31b81526001600160a01b0384166004820152602401610bc5565b600080516020615eaf8339815191526000610ce08284612b5c565b8015610cf15750610cf18286611318565b905080610d1c5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610bc5565b6001600160a01b038381166000818152600080516020615e8f8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610daf906364b18d0960e11b906060015b604051602081830303815290604052612b71565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b610dfb3361151c565b610eac8a8a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600092019190915250610e7192508a91508b9050615586565b8787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506124f0915050565b5050505050505050505050565b610ec23361151c565b610bd833610ecf84615681565b836125ff565b60006108e2600080516020615ecf8339815191525490565b600061099b600080516020615eaf83398151915283611437565b600080610f126115fd565b610f1c8484612d66565b915091505b9250929050565b6060806060610f38600085611c96565b9250925092509193909250565b8051606090806001600160401b03811115610f6257610f62615023565b604051908082528060200260200182016040528015610f8b578160200160208202803683370190505b509150600080516020615e6f83398151915260005b8281101561102e57816000868381518110610fbd57610fbd615755565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b031684828151811061100e5761100e615755565b6001600160a01b0390921660209283029190910190910152600101610fa0565b505050919050565b60006108e260025490565b606080606061104e612e5b565b925061105983610f45565b915061106483612e86565b9050909192565b6060610949838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612e8692505050565b600061099b82612f6b565b60006110cf610b64600080516020615ecf8339815191525490565b600080516020615e2f833981519152546110e9908461576b565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600d81111561112857611128614d9e565b60ff1681526020810191909152604001600020546001600160a01b0316905080611167578160405163409140df60e11b8152600401610bc59190615782565b919050565b600080611185600080516020615e4f8339815191525490565b600080516020615e2f83398151915254915091509091565b60606111a76115fd565b610949838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612fa392505050565b60606108e2612e5b565b6111f63361151c565b61122585858585857f000000000000000000000000000000000000000000000000000000000000000033613288565b505050505050565b606081806001600160401b0381111561124857611248615023565b604051908082528060200260200182016040528015611271578160200160208202803683370190505b509150600080516020615e8f83398151915260005b8281101561130b578160008787848181106112a3576112a3615755565b90506020020160208101906112b89190615279565b6001600160a01b03908116825260208201929092526040016000205485519116908590839081106112eb576112eb615755565b6001600160a01b0390921660209283029190910190910152600101611286565b50505092915050565b9055565b6000610949836001600160a01b0384166132d7565b81518151606091908082016001600160401b0381111561134f5761134f615023565b604051908082528060200260200182016040528015611378578160200160208202803683370190505b50925060005b828110156113d25785818151811061139857611398615755565b60200260200101518482815181106113b2576113b2615755565b6001600160a01b039092166020928302919091019091015260010161137e565b60005b8281101561142d578581815181106113ef576113ef615755565b602002602001015185838151811061140957611409615755565b6001600160a01b0390921660209283029190910190910152600191820191016113d5565b5050505092915050565b6001600160a01b03811660009081526001830160205260408120541515610949565b600061099b836114698585613326565b9250829055565b6000815160000361148357506000919050565b60005b600183510381101561150657600181015b83518110156114fd578381815181106114b2576114b2615755565b60200260200101516001600160a01b03168483815181106114d5576114d5615755565b60200260200101516001600160a01b0316036114f5575060019392505050565b600101611497565b50600101611486565b50600092915050565b6060600061094983613345565b61152581612f6b565b600003611555576000356001600160e01b0319166003604051620f948f60ea1b8152600401610bc592919061579c565b50565b61156a61156488615681565b826133a1565b50600061157e61157989615681565b6134a0565b90506115f361158c89615681565b888888886115df8961159f8960006135df565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6115ee8a61159f8a60016135df565b613618565b5050505050505050565b33301461162b576000356001600160e01b0319166040516307337e1960e41b8152600401610bc591906155f1565b565b6060611639838361132d565b61164281611b06565b82518551811480156116545750845181145b61167f576000356001600160e01b0319166040516306b5667560e21b8152600401610bc591906155f1565b806001600160401b0381111561169757611697615023565b6040519080825280602002602001820160405280156116c0578160200160208202803683370190505b509250806000036116d157506119a1565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020615e8f83398151915291600080516020615eaf83398151915291600080516020615e6f833981519152919081908190815b89811015611922578d818151811061175a5761175a615755565b602002602001015194508c818151811061177657611776615755565b6020026020010151935061178985612af6565b61179284612af6565b8e81815181106117a4576117a4615755565b60200260200101516001600160601b03166000036117e3576000356001600160e01b031916604051637f11b8a360e11b8152600401610bc591906155f1565b6117ed8986611437565b806117fd57506117fd8985611437565b8061180d575061180d8786611437565b8061181d575061181d8785611437565b158c828151811061183057611830615755565b6020026020010190151590811515815250508b818151811061185457611854615755565b60200260200101511561191a5761186b8986611318565b506118768785611318565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f90829081106118bc576118bc615755565b6020908102919091018101516001600160601b03169083018190526118e190846155a9565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611740565b5061193b600080516020615ecf83398151915283611459565b5061195a635ebae8a060e01b8d8d604051602001610d9b9291906157ca565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161198f94939291906157f8565b60405180910390a15050505050505050505b509392505050565b60006119b5600061387d565b905060006040518060c001604052808381526020018a8152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518b820281810183019094528b81529394509092611a6692611a5f928d918d9182919085019084908082843760009201919091525060019250612177915050565b839061392d565b9050611a7d60025482613a1f90919063ffffffff16565b6000611a88826134a0565b6000858152600080516020615def83398151915260205260409020600181018290556006018c9055905080847f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca84611adf87613ac0565b878a604051611af1949392919061599a565b60405180910390a35050505050505050505050565b611b0f81611470565b15611555576000356001600160e01b031916604051630d697db160e11b8152600401610bc591906155f1565b600081611b4781611b06565b6000611b60600080516020615eaf8339815191526124e6565b9050600080516020615e6f83398151915260005b82811015611bd957816000878381518110611b9157611b91615755565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611bcf90600160a01b90046001600160601b0316866155a9565b9450600101611b74565b50505050919050565b6000611bf061157988615681565b6020808901356000908152600180835260408083208c35845290935291902001549091508114611c5f576020808801356000908152600180835260408083208b3584529093529082902001549051632bee7fdb60e21b8152610bc5918391600401918252602082015260400190565b611c8d611c6b88615681565b87878787611c7e8861159f8960006135df565b6115ee8961159f8a60016135df565b50505050505050565b60008281526001602090815260408083208484529091528120600481015460058201546060938493849390929091611cce82846155a9565b9050806001600160401b03811115611ce857611ce8615023565b604051908082528060200260200182016040528015611d11578160200160208202803683370190505b509550806001600160401b03811115611d2c57611d2c615023565b604051908082528060200260200182016040528015611d7757816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611d4a5790505b509450806001600160401b03811115611d9257611d92615023565b604051908082528060200260200182016040528015611dbb578160200160208202803683370190505b50965060005b83811015611f10576000878281518110611ddd57611ddd615755565b60200260200101906001811115611df657611df6614d9e565b90816001811115611e0957611e09614d9e565b90525060008a81526001602090815260408083208c845290915281206004870180546007909201929184908110611e4257611e42615755565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611ea057611ea0615755565b6020026020010181905250846004018181548110611ec057611ec0615755565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611ef057611ef0615755565b6001600160a01b0390921660209283029190910190910152600101611dc1565b5060005b8281101561207357600187611f2986846155a9565b81518110611f3957611f39615755565b60200260200101906001811115611f5257611f52614d9e565b90816001811115611f6557611f65614d9e565b90525060008a81526001602090815260408083208c845290915281206005870180546007909201929184908110611f9e57611f9e615755565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611ff386846155a9565b8151811061200357612003615755565b602002602001018190525084600501818154811061202357612023615755565b6000918252602090912001546001600160a01b03168861204386846155a9565b8151811061205357612053615755565b6001600160a01b0390921660209283029190910190910152600101611f14565b50505050509250925092565b60608161208b81611b06565b8251806001600160401b038111156120a5576120a5615023565b6040519080825280602002602001820160405280156120ce578160200160208202803683370190505b509250600080516020615e0f83398151915260005b82811015611bd95761211786828151811061210057612100615755565b602002602001015183612b5c90919063ffffffff16565b85828151811061212957612129615755565b911515602092830291909101909101526001016120e3565b600083815260016020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff16610893565b606082516001600160401b0381111561219257612192615023565b6040519080825280602002602001820160405280156121bb578160200160208202803683370190505b50905060005b83518110156122ca57600360008583815181106121e0576121e0615755565b602002602001015160038111156121f9576121f9614d9e565b600381111561220a5761220a614d9e565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061223e5761223e615755565b60200260200101906001600160a01b031690816001600160a01b031681525050828015612296575060006001600160a01b031682828151811061228357612283615755565b60200260200101516001600160a01b0316145b156122c2576000356001600160e01b03191660405163053265f160e01b8152600401610bc591906155f1565b6001016121c1565b5092915050565b600061232f6123206122e660408a018a615a88565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250612177915050565b61232989615ad1565b9061392d565b9050600061233c826134a0565b60008080526001602081815285518352600080516020615def83398151915290526040909120015490915081146123b95760008080526001602081815284518352600080516020615def833981519152905260409182902001549051632bee7fdb60e21b8152610bc5918391600401918252602082015260400190565b60006123cc6123c78a615ad1565b613ac0565b905061080b83898989896123e58a61159f8960006135df565b6115ee8b61159f8a60016135df565b60608161240081611b06565b8251806001600160401b0381111561241a5761241a615023565b604051908082528060200260200182016040528015612443578160200160208202803683370190505b5092508060000361245457506124e0565b600080516020615e0f83398151915260006314d72edb60e21b815b848110156124da5787818151811061248957612489615755565b6020026020010151925061249c836127ee565b6124a68383613bf7565b6124b08484611318565b8782815181106124c2576124c2615755565b9115156020928302919091019091015260010161246f565b50505050505b50919050565b600061099b825490565b6124f861499a565b8760000361252c576000356001600160e01b03191660004660405163092048d160e11b8152600401610bc593929190615b9b565b60006125378961387d565b90506040518060e001604052808281526020018a815260200189815260200188815260200187815260200186815260200185815250915061258360025483613a1f90919063ffffffff16565b600061258e836134a0565b60008b81526001602081815260408084208785529091529091209081018290556006018a9055905080828b7fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd986886040516125ea929190615bbd565b60405180910390a45050979650505050505050565b4682602001511461263857602082015160405163092048d160e11b8152610bc5916001600160e01b031960003516914690600401615b9b565b6000612643836134a0565b60208085015160009081526001808352604080832088518452909352919020015490915081146126b257602080840151600090815260018083526040808320875184529093529082902001549051632bee7fdb60e21b8152610bc5918391600401918252602082015260400190565b60006126bc613d8a565b90506000816126c9613d94565b6126d391906155bc565b6126de9060016155a9565b60408051606081018252600080825260208201819052918101919091529091506115f3868685858b866127108e6110a9565b613d9e565b6000825480156122ca57828102915080820483146122ca57634e487b7160005260116020526024601cfd5b60005b82518110156127e957306001600160a01b031682828151811061276857612768615755565b60200260200101516001600160a01b0316036127a5576000356001600160e01b03191660405163053265f160e01b8152600401610bc591906155f1565b6127e18382815181106127ba576127ba615755565b60200260200101518383815181106127d4576127d4615755565b60200260200101516140e7565b600101612743565b505050565b806001600160a01b03163b60000361155557604051630bfc64a360e21b81526001600160a01b0382166004820152602401610bc5565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d81111561285a5761285a614d9e565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d81111561289b5761289b614d9e565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b600080825460ff1660048111156128e1576128e1614d9e565b1480156128f2575042826006015411155b905080156111675760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b60048301548110156129de5782600801600084600401838154811061295257612952615755565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061299b5761299b615755565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161292b565b5060005b6005830154811015612a9557826008016000846005018381548110612a0957612a09615755565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191690556005840180546007860192919084908110612a5257612a52615755565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016129e2565b50815460ff191682556000600183018190556002830181905560038301819055612ac39060048401906149d7565b612ad16005830160006149d7565b60006006830155919050565b60606108e2600080516020615eaf83398151915261150f565b612aff8161417a565b6001600160a01b0381163f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114610bd857604051633c88494760e01b81526001600160a01b038316600482015260248101829052604401610bc5565b6000610949836001600160a01b0384166141af565b6000612b8a600080516020615e0f83398151915261150f565b80519091506000819003612b9e5750505050565b6000816001600160401b03811115612bb857612bb8615023565b604051908082528060200260200182016040528015612be1578160200160208202803683370190505b5090506000826001600160401b03811115612bfe57612bfe615023565b604051908082528060200260200182016040528015612c3157816020015b6060815260200190600190039081612c1c5790505b50905060008686604051602001612c49929190615be7565b604051602081830303815290604052905060005b84811015612d1f57858181518110612c7757612c77615755565b60200260200101516001600160a01b031682604051612c969190615c18565b6000604051808303816000865af19150503d8060008114612cd3576040519150601f19603f3d011682016040523d82523d6000602084013e612cd8565b606091505b50858381518110612ceb57612ceb615755565b60200260200101858481518110612d0457612d04615755565b60209081029190910101919091529015159052600101612c5d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6381868585604051612d559493929190615c34565b60405180910390a150505050505050565b60008082841115612d98576000356001600160e01b0319166040516387f6f09560e01b8152600401610bc591906155f1565b600080516020615e4f833981519152549150612dc0600080516020615e2f8339815191525490565b9050612dd9600080516020615e4f833981519152859055565b612df0600080516020615e2f833981519152849055565b8284612e1b7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6142a2565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606108e27f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61150f565b8051606090806001600160401b03811115612ea357612ea3615023565b604051908082528060200260200182016040528015612ecc578160200160208202803683370190505b509150600080516020615e6f83398151915260005b8281101561102e57816000868381518110612efe57612efe615755565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b03166001600160601b0316848281518110612f5857612f58615755565b6020908102919091010152600101612ee1565b6001600160a01b03166000908152600080516020615e6f8339815191526020526040902054600160a01b90046001600160601b031690565b606081612faf81611b06565b8251806001600160401b03811115612fc957612fc9615023565b604051908082528060200260200182016040528015612ff2578160200160208202803683370190505b5092508060000361300357506124e0565b60408051808201909152600080825260208201819052600080516020615e8f833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020615eaf83398151915291600080516020615e6f833981519152919081908190815b89811015613208578c818151811061308c5761308c615755565b6020908102919091018101516001600160a01b038082166000908152928c9052604090922054909116955093506130c28561417a565b6130cb8461417a565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b0316918301919091529093509085161461313f576000356001600160e01b03191660405163053265f160e01b8152600401610bc591906155f1565b6131498785611437565b801561315a575061315a8886611437565b8c828151811061316c5761316c615755565b6020026020010190151590811515815250508b818151811061319057613190615755565b602002602001015115613200576131a78886612b5c565b506131b28785612b5c565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b03191690559288168252888152918120558201516131fd906001600160601b0316846155a9565b92505b600101613072565b50613221600080516020615ecf833981519152836142bd565b5061324063c48549de60e01b8d8d604051602001610d9b9291906157ca565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d604051613271929190615c81565b60405180910390a150505050505050505050919050565b61329061499a565b6132a261329c89615ad1565b836142cd565b905060006132b26123c78a615ad1565b90506132cb82898989896123e58a61159f8960006135df565b50979650505050505050565b600081815260018301602052604081205461331e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561099b565b50600061099b565b815481018181101561099b57634e487b7160005260116020526024601cfd5b60608160000180548060200260200160405190810160405280929190818152602001828054801561339557602002820191906000526020600020905b815481526020019060010190808311613381575b50505050509050919050565b60208201516000908082036133dc576000356001600160e01b03191660004660405163092048d160e11b8152600401610bc593929190615b9b565b6002546133ea908590613a1f565b60006133f5856134a0565b90506134008261387d565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461345c576000356001600160e01b03191660405163d4cec26960e01b8152600401610bc591906155f1565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd98888604051613490929190615bbd565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b038111156134ce576134ce615023565b6040519080825280602002602001820160405280156134f7578160200160208202803683370190505b5060c086015190915060005b8251811015613556578660a00151818151811061352257613522615755565b60200260200101518051906020012083828151811061354357613543615755565b6020908102919091010152600101613503565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061362657508483145b613651576000356001600160e01b0319166040516306b5667560e21b8152600401610bc591906155f1565b600061365b613d8a565b9050600081613668613d94565b61367291906155bc565b61367d9060016155a9565b9050600080366000805b89811015613841578a8a828181106136a1576136a1615755565b606002919091019350600090508d8d838181106136c0576136c0615755565b90506020020160208101906136d59190615ca6565b60018111156136e6576136e6614d9e565b036137125761370b896136fc6020860186615cd2565b856020013586604001356143cd565b9350613789565b60018d8d8381811061372657613726615755565b905060200201602081019061373b9190615ca6565b600181111561374c5761374c614d9e565b036137625761370b886136fc6020860186615cd2565b6000356001600160e01b031916604051630612418f60e11b8152600401610bc591906155f1565b836001600160a01b0316856001600160a01b0316106137c9576000356001600160e01b031916604051635d3dcd3160e01b8152600401610bc591906155f1565b83945060006137d7856110a9565b9050801561383857600192506138268f8f8f858181106137f9576137f9615755565b905060200201602081019061380e9190615ca6565b8a8a89613820368b90038b018b615ced565b87613d9e565b15613838575050505050505050611c8d565b50600101613687565b508061386e576000356001600160e01b03191660405163726b3acb60e01b8152600401610bc591906155f1565b50505050505050505050505050565b600081815260208190526040812054908190036138ac5750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906138cf826128c8565b905080613926576000825460ff1660048111156138ee576138ee614d9e565b0361390c5760405163757a436360e01b815260040160405180910390fd5b600084815260208190526040902080546001019081905592505b5050919050565b61393561499a565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561396c5761396c615023565b604051908082528060200260200182016040528015613995578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b8360400151518110156122ca578281815181106139e1576139e1615755565b6020026020010151826060015182815181106139ff576139ff615755565b6001600160a01b03909216602092830291909101909101526001016139c2565b6000826060015151118015613a3d5750816080015151826060015151145b8015613a5257508160a0015151826060015151145b8015613a6757508160c0015151826060015151145b613a92576000356001600160e01b0319166040516306b5667560e21b8152600401610bc591906155f1565b613a9c81426155a9565b82604001511115610bd85760405163ad89be9d60e01b815260040160405180910390fd5b60608101516040820151608083015151600092919083906001600160401b03811115613aee57613aee615023565b604051908082528060200260200182016040528015613b17578160200160208202803683370190505b5060a086015190915060005b8251811015613b765786608001518181518110613b4257613b42615755565b602002602001015180519060200120838281518110613b6357613b63615755565b6020908102919091010152600101613b23565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b600081604051602401613c0a91906155f1565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b03861690613c53908590615c18565b600060405180830381855afa9150503d8060008114613c8e576040519150601f19603f3d011682016040523d82523d6000602084013e613c93565b606091505b509150915081613d5557846001600160a01b031683604051602401613cb89190615d4d565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251613ced9190615c18565b600060405180830381855afa9150503d8060008114613d28576040519150601f19603f3d011682016040523d82523d6000602084013e613d2d565b606091505b50909250905081613d5557838560405163069d427960e11b8152600401610bc5929190615d60565b80806020019051810190613d699190615d83565b6106c757838560405163069d427960e11b8152600401610bc5929190615d60565b60006108e2610b1b565b60006108e2610ed5565b60208088015188516000828152600184526040808220838352909452928320613dc6816128c8565b15613dd75760019350505050610776565b6020808c015160009081529081905260409020548214613e18576000356001600160e01b03191660405163d4cec26960e01b8152600401610bc591906155f1565b6000815460ff166004811115613e3057613e30614d9e565b14613e4e576040516322de95ff60e21b815260040160405180910390fd5b6001600160a01b038716600090815260088201602052604090205460ff1615613e955760405163025fd59560e41b81526001600160a01b0388166004820152602401610bc5565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613ed05750604086015115155b80613ede5750855160ff1615155b15613f25576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613f65929190615da5565b60405180910390a3600080808c6001811115613f8357613f83614d9e565b03613fd8576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613fcb9084906155a9565b925050819055915061403d565b60018c6001811115613fec57613fec614d9e565b03613762576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c161790556002840180548992906140349084906155a9565b92505081905590505b8a821061409157825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a261408c838e6143f5565b6140d7565b8981106140d757825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b5050505050979650505050505050565b80600360008460038111156140fe576140fe614d9e565b600381111561410f5761410f614d9e565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600381111561414d5761414d614d9e565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6001600160a01b038116611555576000356001600160e01b03191660405163104c66df60e31b8152600401610bc591906155f1565b600081815260018301602052604081205480156142985760006141d36001836155bc565b85549091506000906141e7906001906155bc565b905081811461424c57600086600001828154811061420757614207615755565b906000526020600020015490508087600001848154811061422a5761422a615755565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061425d5761425d615db3565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061099b565b600091505061099b565b60006142ac825490565b9050611167826113148360016155a9565b600061099b836114698585614462565b6142d561499a565b6142ee6142e784604001516001612177565b849061392d565b905061430560025482613a1f90919063ffffffff16565b6000614310826134a0565b9050600061431e600061387d565b6000818152600080516020615def83398151915260209081526040909120908701516001820185905560069091015590508251811461437e576000356001600160e01b03191660405163d4cec26960e01b8152600401610bc591906155f1565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca856143ab89613ac0565b89896040516143bd949392919061599a565b60405180910390a3505092915050565b60008060006143de8787878761448b565b915091506143eb81614578565b5095945050505050565b6143fe8161472e565b15610bd857815460ff1916600217825560008061441a83614748565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051614454929190615dc9565b60405180910390a250505050565b600082548281101561448157634e487b7160005260116020526024601cfd5b9190910392915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156144c2575060009050600361456f565b8460ff16601b141580156144da57508460ff16601c14155b156144eb575060009050600461456f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561453f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166145685760006001925092505061456f565b9150600090505b94509492505050565b600081600481111561458c5761458c614d9e565b036145945750565b60018160048111156145a8576145a8614d9e565b036145f55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610bc5565b600281600481111561460957614609614d9e565b036146565760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610bc5565b600381600481111561466a5761466a614d9e565b036146c25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610bc5565b60048160048111156146d6576146d6614d9e565b036115555760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610bc5565b600081602001516000148061099b57505060200151461490565b6060806147548361472e565b61478657602083015160405163092048d160e11b8152610bc5916001600160e01b031960003516914690600401615b9b565b8260600151516001600160401b038111156147a3576147a3615023565b6040519080825280602002602001820160405280156147cc578160200160208202803683370190505b5091508260600151516001600160401b038111156147ec576147ec615023565b60405190808252806020026020018201604052801561481f57816020015b606081526020019060019003908161480a5790505b50905060005b836060015151811015614994578360c00151818151811061484857614848615755565b60200260200101515a1161487b5761485f846134a0565b6040516307aec4ab60e21b8152600401610bc591815260200190565b8360600151818151811061489157614891615755565b60200260200101516001600160a01b0316846080015182815181106148b8576148b8615755565b60200260200101518560c0015183815181106148d6576148d6615755565b6020026020010151908660a0015184815181106148f5576148f5615755565b602002602001015160405161490a9190615c18565b600060405180830381858888f193505050503d8060008114614948576040519150601f19603f3d011682016040523d82523d6000602084013e61494d565b606091505b5084838151811061496057614960615755565b6020026020010184848151811061497957614979615755565b60209081029190910101919091529015159052600101614825565b50915091565b6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b508054600082559060005260206000209081019061155591905b80821115614a0557600081556001016149f1565b5090565b600060e082840312156124e057600080fd5b60008083601f840112614a2d57600080fd5b5081356001600160401b03811115614a4457600080fd5b6020830191508360208260051b8501011115610f2157600080fd5b60008083601f840112614a7157600080fd5b5081356001600160401b03811115614a8857600080fd5b602083019150836020606083028501011115610f2157600080fd5b600080600080600060608688031215614abb57600080fd5b85356001600160401b0380821115614ad257600080fd5b614ade89838a01614a09565b96506020880135915080821115614af457600080fd5b614b0089838a01614a1b565b90965094506040880135915080821115614b1957600080fd5b50614b2688828901614a5f565b969995985093965092949392505050565b60008060008060008060608789031215614b5057600080fd5b86356001600160401b0380821115614b6757600080fd5b614b738a838b01614a1b565b90985096506020890135915080821115614b8c57600080fd5b614b988a838b01614a1b565b90965094506040890135915080821115614bb157600080fd5b50614bbe89828a01614a1b565b979a9699509497509295939492505050565b600081518084526020808501945080840160005b83811015614c02578151151587529582019590820190600101614be4565b509495945050505050565b6020815260006109496020830184614bd0565b600080600080600080600080600060a08a8c031215614c3e57600080fd5b8935985060208a01356001600160401b0380821115614c5c57600080fd5b614c688d838e01614a1b565b909a50985060408c0135915080821115614c8157600080fd5b614c8d8d838e01614a1b565b909850965060608c0135915080821115614ca657600080fd5b614cb28d838e01614a1b565b909650945060808c0135915080821115614ccb57600080fd5b50614cd88c828d01614a1b565b915080935050809150509295985092959850929598565b60008060208385031215614d0257600080fd5b82356001600160401b03811115614d1857600080fd5b614d2485828601614a1b565b90969095509350505050565b600081518084526020808501945080840160005b83811015614c025781516001600160a01b031687529582019590820190600101614d44565b6020815260006109496020830184614d30565b60008060408385031215614d8f57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614dc457614dc4614d9e565b9052565b60006060808352614ddb81840187614d30565b83810360208581019190915286518083528782019282019060005b81811015614e1957614e09838651614db4565b9383019391830191600101614df6565b505060409250858103838701528087518083528383019150838901925060005b81811015614e69578351805160ff1684528581015186850152860151868401529284019291860191600101614e39565b50909a9950505050505050505050565b80356001600160a01b038116811461116757600080fd5b600080600060608486031215614ea557600080fd5b8335925060208401359150614ebc60408501614e79565b90509250925092565b600080600080600060608688031215614edd57600080fd5b85356001600160401b0380821115614ef457600080fd5b9087019060c0828a031215614f0857600080fd5b90955060208701359080821115614af457600080fd5b600060208284031215614f3057600080fd5b5035919050565b80356002811061116757600080fd5b60008060008060008060008060008060c08b8d031215614f6557600080fd5b8a35995060208b01356001600160401b0380821115614f8357600080fd5b614f8f8e838f01614a1b565b909b50995060408d0135915080821115614fa857600080fd5b614fb48e838f01614a1b565b909950975060608d0135915080821115614fcd57600080fd5b614fd98e838f01614a1b565b909750955060808d0135915080821115614ff257600080fd5b50614fff8d828e01614a1b565b9094509250615012905060a08c01614f37565b90509295989b9194979a5092959850565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b038111828210171561505b5761505b615023565b60405290565b60405160c081016001600160401b038111828210171561505b5761505b615023565b604051601f8201601f191681016001600160401b03811182821017156150ab576150ab615023565b604052919050565b60006001600160401b038211156150cc576150cc615023565b5060051b60200190565b600082601f8301126150e757600080fd5b813560206150fc6150f7836150b3565b615083565b82815260059290921b8401810191818101908684111561511b57600080fd5b8286015b84811015615144578035600481106151375760008081fd5b835291830191830161511f565b509695505050505050565b600082601f83011261516057600080fd5b813560206151706150f7836150b3565b82815260059290921b8401810191818101908684111561518f57600080fd5b8286015b84811015615144576151a481614e79565b8352918301918301615193565b600080604083850312156151c457600080fd5b82356001600160401b03808211156151db57600080fd5b6151e7868387016150d6565b935060208501359150808211156151fd57600080fd5b5061520a8582860161514f565b9150509250929050565b6000806040838503121561522757600080fd5b8235915061523760208401614e79565b90509250929050565b8035600e811061116757600080fd5b6000806040838503121561526257600080fd5b61526b83615240565b915061523760208401614e79565b60006020828403121561528b57600080fd5b61094982614e79565b60008060008060008060008060008060c08b8d0312156152b357600080fd5b8a35995060208b0135985060408b01356001600160401b03808211156152d857600080fd5b6152e48e838f01614a1b565b909a50985060608d01359150808211156152fd57600080fd5b6153098e838f01614a1b565b909850965060808d013591508082111561532257600080fd5b61532e8e838f01614a1b565b909650945060a08d013591508082111561534757600080fd5b506153548d828e01614a1b565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561538057600080fd5b82356001600160401b0381111561539657600080fd5b6153a285828601614a09565b92505061523760208401614f37565b60a08101600587106153c5576153c5614d9e565b95815260208101949094526040840192909252606083015260809091015290565b6000602082840312156153f857600080fd5b81356001600160401b0381111561540e57600080fd5b6108938482850161514f565b600081518084526020808501945080840160005b83811015614c025781518752958201959082019060010161542e565b60608152600061545d6060830186614d30565b828103602084015261546f8186614d30565b90508281036040840152615483818561541a565b9695505050505050565b602081526000610949602083018461541a565b6000602082840312156154b257600080fd5b61094982615240565b60006154c96150f7846150b3565b8381529050602080820190600585901b8401868111156154e857600080fd5b845b8181101561557b5780356001600160401b038082111561550a5760008081fd5b8188019150601f8a818401126155205760008081fd5b82358281111561553257615532615023565b615543818301601f19168801615083565b92508083528b8782860101111561555c57600091508182fd5b80878501888501376000908301870152508552509282019282016154ea565b505050509392505050565b60006109493684846154bb565b634e487b7160e01b600052601160045260246000fd5b8082018082111561099b5761099b615593565b8181038181111561099b5761099b615593565b6000826155ec57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b600082601f83011261561757600080fd5b813560206156276150f7836150b3565b82815260059290921b8401810191818101908684111561564657600080fd5b8286015b84811015615144578035835291830191830161564a565b600082601f83011261567257600080fd5b610949838335602085016154bb565b600060e0823603121561569357600080fd5b61569b615039565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156156cd57600080fd5b6156d93683870161514f565b606084015260808501359150808211156156f257600080fd5b6156fe36838701615606565b608084015260a085013591508082111561571757600080fd5b61572336838701615661565b60a084015260c085013591508082111561573c57600080fd5b5061574936828601615606565b60c08301525092915050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761099b5761099b615593565b60208101600e831061579657615796614d9e565b91905290565b6001600160e01b03198316815260408101600983106157bd576157bd614d9e565b8260208301529392505050565b6040815260006157dd6040830185614d30565b82810360208401526157ef8185614bd0565b95945050505050565b60808152600061580b6080830187614bd0565b82810360208481019190915286518083528782019282019060005b8181101561584b5784516001600160601b031683529383019391830191600101615826565b5050848103604086015261585f8188614d30565b9250505082810360608401526107768185614d30565b60005b83811015615890578181015183820152602001615878565b50506000910152565b600081518084526158b1816020860160208601615875565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b8581101561590d5782840389526158fb848351615899565b988501989350908401906001016158e3565b5091979650505050505050565b8051825260208101516020830152604081015160408301526000606082015160e0606085015261594d60e0850182614d30565b905060808301518482036080860152615966828261541a565b91505060a083015184820360a086015261598082826158c5565b91505060c083015184820360c08601526157ef828261541a565b6080815260006159ad608083018761591a565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b80831015615a1e57835160048110615a0857615a08614d9e565b82529284019260019290920191908401906159ee565b50606089015193508481036060860152615a38818561541a565b935050505060808601518282036080840152615a5482826158c5565b91505060a086015182820360a0840152615a6e828261541a565b93505050506157ef60608301846001600160a01b03169052565b6000808335601e19843603018112615a9f57600080fd5b8301803591506001600160401b03821115615ab957600080fd5b6020019150600581901b3603821315610f2157600080fd5b600060c08236031215615ae357600080fd5b615aeb615061565b823581526020830135602082015260408301356001600160401b0380821115615b1357600080fd5b615b1f368387016150d6565b60408401526060850135915080821115615b3857600080fd5b615b4436838701615606565b60608401526080850135915080821115615b5d57600080fd5b615b6936838701615661565b608084015260a0850135915080821115615b8257600080fd5b50615b8f36828601615606565b60a08301525092915050565b6001600160e01b03199390931683526020830191909152604082015260600190565b604081526000615bd0604083018561591a565b905060018060a01b03831660208301529392505050565b6001600160e01b0319831681528151600090615c0a816004850160208701615875565b919091016004019392505050565b60008251615c2a818460208701615875565b9190910192915050565b608081526000615c476080830187615899565b8281036020840152615c598187614d30565b90508281036040840152615c6d8186614bd0565b9050828103606084015261077681856158c5565b604081526000615c946040830185614bd0565b82810360208401526157ef8185614d30565b600060208284031215615cb857600080fd5b61094982614f37565b803560ff8116811461116757600080fd5b600060208284031215615ce457600080fd5b61094982615cc1565b600060608284031215615cff57600080fd5b604051606081018181106001600160401b0382111715615d2157615d21615023565b604052615d2d83615cc1565b815260208301356020820152604083013560408201528091505092915050565b6020815260006109496020830184615899565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d9557600080fd5b8151801515811461094957600080fd5b604081016157bd8285614db4565b634e487b7160e01b600052603160045260246000fd5b604081526000615ddc6040830185614bd0565b82810360208401526157ef81856158c556fea6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb495da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca164736f6c6343000811000a5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102685760003560e01c80639a7d338211610151578063bc96180b116100c3578063de981f1b11610087578063de981f1b1461061b578063e75235b814610646578063e9c034981461064e578063f80b535214610661578063fb4f637114610669578063fdc4fa471461067c57600080fd5b8063bc96180b146105b6578063c441c4a8146105be578063cc7e6b3b146105d5578063d78392f8146105f5578063dafae4081461060857600080fd5b8063ada86b2411610115578063ada86b24146104f2578063b384abef146104fa578063b405aaf214610555578063b9c3620914610568578063bc4e068f14610590578063bc9182fd146105a357600080fd5b80639a7d33821461049e5780639b19dbfd146104b15780639b2ee437146104b9578063a1819f9a146104cc578063a8a0e32c146104df57600080fd5b80632faf925d116101ea578063663ac011116101ae578063663ac011146103e75780637de5dedd146103fa578063800eaab314610402578063828fc1a114610415578063865e6fd314610428578063901979d51461043b57600080fd5b80632faf925d1461037257806334d5f37b1461038557806335da8121146103a55780633644e515146103b8578063562d5304146103df57600080fd5b80630f7c3189116102315780630f7c3189146102f25780631c905e39146103075780631f425338146103295780632c5e65201461033c5780632d6d7d731461035f57600080fd5b80624054b81461026d57806301a5f43f1461028257806309fcd8c7146102ab5780630a44fa43146102be5780630b881830146102df575b600080fd5b61028061027b366004614aa3565b61068f565b005b610295610290366004614b37565b6106ce565b6040516102a29190614c0d565b60405180910390f35b6102806102b9366004614c20565b610781565b6102d16102cc366004614cef565b610816565b6040519081526020016102a2565b6102806102ed366004614aa3565b61089b565b6102fa6108c9565b6040516102a29190614d69565b61031a610315366004614d7c565b6108e7565b6040516102a293929190614dc8565b610295610337366004614cef565b610903565b61034f61034a366004614e90565b610950565b60405190151581526020016102a2565b6102fa61036d366004614cef565b61095d565b610280610380366004614ec5565b6109a1565b6102d1610393366004614f1e565b60006020819052908152604090205481565b6102956103b3366004614cef565b6109cf565b6102d17f000000000000000000000000000000000000000000000000000000000000000081565b6102d1610a15565b6102806103f5366004614f46565b610a2e565b6102d1610b1b565b6102806104103660046151b1565b610b97565b61034f610423366004615214565b610bdc565b61028061043636600461524f565b610bea565b6102d1610449366004615279565b6001600160a01b039081166000908152600080516020615e8f83398151915260209081526040808320549093168252600080516020615e6f83398151915290522054600160a01b90046001600160601b031690565b6102806104ac366004614d7c565b610c05565b6102fa610c51565b6102806104c7366004615279565b610c5b565b6102806104da366004615294565b610df2565b6102806104ed36600461536d565b610eb9565b6102d1610ed5565b610544610508366004614d7c565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102a29594939291906153b1565b61034f610563366004615279565b610eed565b61057b610576366004614d7c565b610f07565b604080519283526020830191909152016102a2565b61031a61059e366004614f1e565b610f28565b6102fa6105b13660046153e6565b610f45565b6102d1611036565b6105c6611041565b6040516102a29392919061544a565b6105e86105e3366004614cef565b61106b565b6040516102a2919061548d565b6102d1610603366004615279565b6110a9565b61034f610616366004614f1e565b6110b4565b61062e6106293660046154a0565b6110f1565b6040516001600160a01b0390911681526020016102a2565b61057b61116c565b61029561065c366004614cef565b61119d565b6102fa6111e3565b610280610677366004614ec5565b6111ed565b6102fa61068a366004614cef565b61122d565b6106983361151c565b6106c785858585857f000000000000000000000000000000000000000000000000000000000000000033611558565b5050505050565b60606106d86115fd565b61077687878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061162d92505050565b979650505050505050565b61078a3361151c565b61080b8989898989808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506107d092508a91508b9050615586565b8787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506119a9915050565b505050505050505050565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108579250839150611b069050565b610893848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b3b92505050565b949350505050565b6106c785858585857f0000000000000000000000000000000000000000000000000000000000000000611be2565b60606108e2600080516020615e0f83398151915261150f565b905090565b60608060606108f68585611c96565b9250925092509250925092565b606061090d6115fd565b61094983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061207f92505050565b9392505050565b6000610893848484612141565b606061094983838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250612177915050565b92915050565b6106c785858585857f00000000000000000000000000000000000000000000000000000000000000006122d1565b60606109d96115fd565b6109498383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506123f492505050565b60006108e2600080516020615eaf8339815191526124e6565b610a373361151c565b60003390506000610b00468d8d8d80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508c8c80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610ac592508d91508e9050615586565b8a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508b92506124f0915050565b9050610b0d8282856125ff565b505050505050505050505050565b6000610b33600080516020615e2f8339815191525490565b6001610b4b600080516020615e2f8339815191525490565b610b79610b64600080516020615ecf8339815191525490565b600080516020615e4f83398151915290612715565b610b8391906155a9565b610b8d91906155bc565b6108e291906155cf565b333014610bce576000356001600160e01b0319166040516307337e1960e41b8152600401610bc591906155f1565b60405180910390fd5b610bd88282612740565b5050565b600061094960008484612141565b610bf26115fd565b610bfb816127ee565b610bd88282612824565b6000828152600160208181526040808420858552909152822090810154909103610c425760405163713b099760e11b815260040160405180910390fd5b610c4b816128c8565b50505050565b60606108e2612add565b610c643361151c565b610c6d81612af6565b336000908152600080516020615e6f83398151915260208190526040909120546001600160a01b039081169083168103610cc557604051630669b93360e31b81526001600160a01b0384166004820152602401610bc5565b600080516020615eaf8339815191526000610ce08284612b5c565b8015610cf15750610cf18286611318565b905080610d1c5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610bc5565b6001600160a01b038381166000818152600080516020615e8f8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610daf906364b18d0960e11b906060015b604051602081830303815290604052612b71565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b610dfb3361151c565b610eac8a8a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600092019190915250610e7192508a91508b9050615586565b8787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506124f0915050565b5050505050505050505050565b610ec23361151c565b610bd833610ecf84615681565b836125ff565b60006108e2600080516020615ecf8339815191525490565b600061099b600080516020615eaf83398151915283611437565b600080610f126115fd565b610f1c8484612d66565b915091505b9250929050565b6060806060610f38600085611c96565b9250925092509193909250565b8051606090806001600160401b03811115610f6257610f62615023565b604051908082528060200260200182016040528015610f8b578160200160208202803683370190505b509150600080516020615e6f83398151915260005b8281101561102e57816000868381518110610fbd57610fbd615755565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b031684828151811061100e5761100e615755565b6001600160a01b0390921660209283029190910190910152600101610fa0565b505050919050565b60006108e260025490565b606080606061104e612e5b565b925061105983610f45565b915061106483612e86565b9050909192565b6060610949838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612e8692505050565b600061099b82612f6b565b60006110cf610b64600080516020615ecf8339815191525490565b600080516020615e2f833981519152546110e9908461576b565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600d81111561112857611128614d9e565b60ff1681526020810191909152604001600020546001600160a01b0316905080611167578160405163409140df60e11b8152600401610bc59190615782565b919050565b600080611185600080516020615e4f8339815191525490565b600080516020615e2f83398151915254915091509091565b60606111a76115fd565b610949838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612fa392505050565b60606108e2612e5b565b6111f63361151c565b61122585858585857f000000000000000000000000000000000000000000000000000000000000000033613288565b505050505050565b606081806001600160401b0381111561124857611248615023565b604051908082528060200260200182016040528015611271578160200160208202803683370190505b509150600080516020615e8f83398151915260005b8281101561130b578160008787848181106112a3576112a3615755565b90506020020160208101906112b89190615279565b6001600160a01b03908116825260208201929092526040016000205485519116908590839081106112eb576112eb615755565b6001600160a01b0390921660209283029190910190910152600101611286565b50505092915050565b9055565b6000610949836001600160a01b0384166132d7565b81518151606091908082016001600160401b0381111561134f5761134f615023565b604051908082528060200260200182016040528015611378578160200160208202803683370190505b50925060005b828110156113d25785818151811061139857611398615755565b60200260200101518482815181106113b2576113b2615755565b6001600160a01b039092166020928302919091019091015260010161137e565b60005b8281101561142d578581815181106113ef576113ef615755565b602002602001015185838151811061140957611409615755565b6001600160a01b0390921660209283029190910190910152600191820191016113d5565b5050505092915050565b6001600160a01b03811660009081526001830160205260408120541515610949565b600061099b836114698585613326565b9250829055565b6000815160000361148357506000919050565b60005b600183510381101561150657600181015b83518110156114fd578381815181106114b2576114b2615755565b60200260200101516001600160a01b03168483815181106114d5576114d5615755565b60200260200101516001600160a01b0316036114f5575060019392505050565b600101611497565b50600101611486565b50600092915050565b6060600061094983613345565b61152581612f6b565b600003611555576000356001600160e01b0319166003604051620f948f60ea1b8152600401610bc592919061579c565b50565b61156a61156488615681565b826133a1565b50600061157e61157989615681565b6134a0565b90506115f361158c89615681565b888888886115df8961159f8960006135df565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6115ee8a61159f8a60016135df565b613618565b5050505050505050565b33301461162b576000356001600160e01b0319166040516307337e1960e41b8152600401610bc591906155f1565b565b6060611639838361132d565b61164281611b06565b82518551811480156116545750845181145b61167f576000356001600160e01b0319166040516306b5667560e21b8152600401610bc591906155f1565b806001600160401b0381111561169757611697615023565b6040519080825280602002602001820160405280156116c0578160200160208202803683370190505b509250806000036116d157506119a1565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020615e8f83398151915291600080516020615eaf83398151915291600080516020615e6f833981519152919081908190815b89811015611922578d818151811061175a5761175a615755565b602002602001015194508c818151811061177657611776615755565b6020026020010151935061178985612af6565b61179284612af6565b8e81815181106117a4576117a4615755565b60200260200101516001600160601b03166000036117e3576000356001600160e01b031916604051637f11b8a360e11b8152600401610bc591906155f1565b6117ed8986611437565b806117fd57506117fd8985611437565b8061180d575061180d8786611437565b8061181d575061181d8785611437565b158c828151811061183057611830615755565b6020026020010190151590811515815250508b818151811061185457611854615755565b60200260200101511561191a5761186b8986611318565b506118768785611318565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f90829081106118bc576118bc615755565b6020908102919091018101516001600160601b03169083018190526118e190846155a9565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611740565b5061193b600080516020615ecf83398151915283611459565b5061195a635ebae8a060e01b8d8d604051602001610d9b9291906157ca565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161198f94939291906157f8565b60405180910390a15050505050505050505b509392505050565b60006119b5600061387d565b905060006040518060c001604052808381526020018a8152602001898980806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518b820281810183019094528b81529394509092611a6692611a5f928d918d9182919085019084908082843760009201919091525060019250612177915050565b839061392d565b9050611a7d60025482613a1f90919063ffffffff16565b6000611a88826134a0565b6000858152600080516020615def83398151915260205260409020600181018290556006018c9055905080847f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca84611adf87613ac0565b878a604051611af1949392919061599a565b60405180910390a35050505050505050505050565b611b0f81611470565b15611555576000356001600160e01b031916604051630d697db160e11b8152600401610bc591906155f1565b600081611b4781611b06565b6000611b60600080516020615eaf8339815191526124e6565b9050600080516020615e6f83398151915260005b82811015611bd957816000878381518110611b9157611b91615755565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611bcf90600160a01b90046001600160601b0316866155a9565b9450600101611b74565b50505050919050565b6000611bf061157988615681565b6020808901356000908152600180835260408083208c35845290935291902001549091508114611c5f576020808801356000908152600180835260408083208b3584529093529082902001549051632bee7fdb60e21b8152610bc5918391600401918252602082015260400190565b611c8d611c6b88615681565b87878787611c7e8861159f8960006135df565b6115ee8961159f8a60016135df565b50505050505050565b60008281526001602090815260408083208484529091528120600481015460058201546060938493849390929091611cce82846155a9565b9050806001600160401b03811115611ce857611ce8615023565b604051908082528060200260200182016040528015611d11578160200160208202803683370190505b509550806001600160401b03811115611d2c57611d2c615023565b604051908082528060200260200182016040528015611d7757816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611d4a5790505b509450806001600160401b03811115611d9257611d92615023565b604051908082528060200260200182016040528015611dbb578160200160208202803683370190505b50965060005b83811015611f10576000878281518110611ddd57611ddd615755565b60200260200101906001811115611df657611df6614d9e565b90816001811115611e0957611e09614d9e565b90525060008a81526001602090815260408083208c845290915281206004870180546007909201929184908110611e4257611e42615755565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611ea057611ea0615755565b6020026020010181905250846004018181548110611ec057611ec0615755565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611ef057611ef0615755565b6001600160a01b0390921660209283029190910190910152600101611dc1565b5060005b8281101561207357600187611f2986846155a9565b81518110611f3957611f39615755565b60200260200101906001811115611f5257611f52614d9e565b90816001811115611f6557611f65614d9e565b90525060008a81526001602090815260408083208c845290915281206005870180546007909201929184908110611f9e57611f9e615755565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611ff386846155a9565b8151811061200357612003615755565b602002602001018190525084600501818154811061202357612023615755565b6000918252602090912001546001600160a01b03168861204386846155a9565b8151811061205357612053615755565b6001600160a01b0390921660209283029190910190910152600101611f14565b50505050509250925092565b60608161208b81611b06565b8251806001600160401b038111156120a5576120a5615023565b6040519080825280602002602001820160405280156120ce578160200160208202803683370190505b509250600080516020615e0f83398151915260005b82811015611bd95761211786828151811061210057612100615755565b602002602001015183612b5c90919063ffffffff16565b85828151811061212957612129615755565b911515602092830291909101909101526001016120e3565b600083815260016020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff16610893565b606082516001600160401b0381111561219257612192615023565b6040519080825280602002602001820160405280156121bb578160200160208202803683370190505b50905060005b83518110156122ca57600360008583815181106121e0576121e0615755565b602002602001015160038111156121f9576121f9614d9e565b600381111561220a5761220a614d9e565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061223e5761223e615755565b60200260200101906001600160a01b031690816001600160a01b031681525050828015612296575060006001600160a01b031682828151811061228357612283615755565b60200260200101516001600160a01b0316145b156122c2576000356001600160e01b03191660405163053265f160e01b8152600401610bc591906155f1565b6001016121c1565b5092915050565b600061232f6123206122e660408a018a615a88565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250612177915050565b61232989615ad1565b9061392d565b9050600061233c826134a0565b60008080526001602081815285518352600080516020615def83398151915290526040909120015490915081146123b95760008080526001602081815284518352600080516020615def833981519152905260409182902001549051632bee7fdb60e21b8152610bc5918391600401918252602082015260400190565b60006123cc6123c78a615ad1565b613ac0565b905061080b83898989896123e58a61159f8960006135df565b6115ee8b61159f8a60016135df565b60608161240081611b06565b8251806001600160401b0381111561241a5761241a615023565b604051908082528060200260200182016040528015612443578160200160208202803683370190505b5092508060000361245457506124e0565b600080516020615e0f83398151915260006314d72edb60e21b815b848110156124da5787818151811061248957612489615755565b6020026020010151925061249c836127ee565b6124a68383613bf7565b6124b08484611318565b8782815181106124c2576124c2615755565b9115156020928302919091019091015260010161246f565b50505050505b50919050565b600061099b825490565b6124f861499a565b8760000361252c576000356001600160e01b03191660004660405163092048d160e11b8152600401610bc593929190615b9b565b60006125378961387d565b90506040518060e001604052808281526020018a815260200189815260200188815260200187815260200186815260200185815250915061258360025483613a1f90919063ffffffff16565b600061258e836134a0565b60008b81526001602081815260408084208785529091529091209081018290556006018a9055905080828b7fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd986886040516125ea929190615bbd565b60405180910390a45050979650505050505050565b4682602001511461263857602082015160405163092048d160e11b8152610bc5916001600160e01b031960003516914690600401615b9b565b6000612643836134a0565b60208085015160009081526001808352604080832088518452909352919020015490915081146126b257602080840151600090815260018083526040808320875184529093529082902001549051632bee7fdb60e21b8152610bc5918391600401918252602082015260400190565b60006126bc613d8a565b90506000816126c9613d94565b6126d391906155bc565b6126de9060016155a9565b60408051606081018252600080825260208201819052918101919091529091506115f3868685858b866127108e6110a9565b613d9e565b6000825480156122ca57828102915080820483146122ca57634e487b7160005260116020526024601cfd5b60005b82518110156127e957306001600160a01b031682828151811061276857612768615755565b60200260200101516001600160a01b0316036127a5576000356001600160e01b03191660405163053265f160e01b8152600401610bc591906155f1565b6127e18382815181106127ba576127ba615755565b60200260200101518383815181106127d4576127d4615755565b60200260200101516140e7565b600101612743565b505050565b806001600160a01b03163b60000361155557604051630bfc64a360e21b81526001600160a01b0382166004820152602401610bc5565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600d81111561285a5761285a614d9e565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600d81111561289b5761289b614d9e565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b600080825460ff1660048111156128e1576128e1614d9e565b1480156128f2575042826006015411155b905080156111675760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b60048301548110156129de5782600801600084600401838154811061295257612952615755565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061299b5761299b615755565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161292b565b5060005b6005830154811015612a9557826008016000846005018381548110612a0957612a09615755565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191690556005840180546007860192919084908110612a5257612a52615755565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016129e2565b50815460ff191682556000600183018190556002830181905560038301819055612ac39060048401906149d7565b612ad16005830160006149d7565b60006006830155919050565b60606108e2600080516020615eaf83398151915261150f565b612aff8161417a565b6001600160a01b0381163f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114610bd857604051633c88494760e01b81526001600160a01b038316600482015260248101829052604401610bc5565b6000610949836001600160a01b0384166141af565b6000612b8a600080516020615e0f83398151915261150f565b80519091506000819003612b9e5750505050565b6000816001600160401b03811115612bb857612bb8615023565b604051908082528060200260200182016040528015612be1578160200160208202803683370190505b5090506000826001600160401b03811115612bfe57612bfe615023565b604051908082528060200260200182016040528015612c3157816020015b6060815260200190600190039081612c1c5790505b50905060008686604051602001612c49929190615be7565b604051602081830303815290604052905060005b84811015612d1f57858181518110612c7757612c77615755565b60200260200101516001600160a01b031682604051612c969190615c18565b6000604051808303816000865af19150503d8060008114612cd3576040519150601f19603f3d011682016040523d82523d6000602084013e612cd8565b606091505b50858381518110612ceb57612ceb615755565b60200260200101858481518110612d0457612d04615755565b60209081029190910101919091529015159052600101612c5d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6381868585604051612d559493929190615c34565b60405180910390a150505050505050565b60008082841115612d98576000356001600160e01b0319166040516387f6f09560e01b8152600401610bc591906155f1565b600080516020615e4f833981519152549150612dc0600080516020615e2f8339815191525490565b9050612dd9600080516020615e4f833981519152859055565b612df0600080516020615e2f833981519152849055565b8284612e1b7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6142a2565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606108e27f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61150f565b8051606090806001600160401b03811115612ea357612ea3615023565b604051908082528060200260200182016040528015612ecc578160200160208202803683370190505b509150600080516020615e6f83398151915260005b8281101561102e57816000868381518110612efe57612efe615755565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b03166001600160601b0316848281518110612f5857612f58615755565b6020908102919091010152600101612ee1565b6001600160a01b03166000908152600080516020615e6f8339815191526020526040902054600160a01b90046001600160601b031690565b606081612faf81611b06565b8251806001600160401b03811115612fc957612fc9615023565b604051908082528060200260200182016040528015612ff2578160200160208202803683370190505b5092508060000361300357506124e0565b60408051808201909152600080825260208201819052600080516020615e8f833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020615eaf83398151915291600080516020615e6f833981519152919081908190815b89811015613208578c818151811061308c5761308c615755565b6020908102919091018101516001600160a01b038082166000908152928c9052604090922054909116955093506130c28561417a565b6130cb8461417a565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b0316918301919091529093509085161461313f576000356001600160e01b03191660405163053265f160e01b8152600401610bc591906155f1565b6131498785611437565b801561315a575061315a8886611437565b8c828151811061316c5761316c615755565b6020026020010190151590811515815250508b818151811061319057613190615755565b602002602001015115613200576131a78886612b5c565b506131b28785612b5c565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b03191690559288168252888152918120558201516131fd906001600160601b0316846155a9565b92505b600101613072565b50613221600080516020615ecf833981519152836142bd565b5061324063c48549de60e01b8d8d604051602001610d9b9291906157ca565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d604051613271929190615c81565b60405180910390a150505050505050505050919050565b61329061499a565b6132a261329c89615ad1565b836142cd565b905060006132b26123c78a615ad1565b90506132cb82898989896123e58a61159f8960006135df565b50979650505050505050565b600081815260018301602052604081205461331e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561099b565b50600061099b565b815481018181101561099b57634e487b7160005260116020526024601cfd5b60608160000180548060200260200160405190810160405280929190818152602001828054801561339557602002820191906000526020600020905b815481526020019060010190808311613381575b50505050509050919050565b60208201516000908082036133dc576000356001600160e01b03191660004660405163092048d160e11b8152600401610bc593929190615b9b565b6002546133ea908590613a1f565b60006133f5856134a0565b90506134008261387d565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461345c576000356001600160e01b03191660405163d4cec26960e01b8152600401610bc591906155f1565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd98888604051613490929190615bbd565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b038111156134ce576134ce615023565b6040519080825280602002602001820160405280156134f7578160200160208202803683370190505b5060c086015190915060005b8251811015613556578660a00151818151811061352257613522615755565b60200260200101518051906020012083828151811061354357613543615755565b6020908102919091010152600101613503565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061362657508483145b613651576000356001600160e01b0319166040516306b5667560e21b8152600401610bc591906155f1565b600061365b613d8a565b9050600081613668613d94565b61367291906155bc565b61367d9060016155a9565b9050600080366000805b89811015613841578a8a828181106136a1576136a1615755565b606002919091019350600090508d8d838181106136c0576136c0615755565b90506020020160208101906136d59190615ca6565b60018111156136e6576136e6614d9e565b036137125761370b896136fc6020860186615cd2565b856020013586604001356143cd565b9350613789565b60018d8d8381811061372657613726615755565b905060200201602081019061373b9190615ca6565b600181111561374c5761374c614d9e565b036137625761370b886136fc6020860186615cd2565b6000356001600160e01b031916604051630612418f60e11b8152600401610bc591906155f1565b836001600160a01b0316856001600160a01b0316106137c9576000356001600160e01b031916604051635d3dcd3160e01b8152600401610bc591906155f1565b83945060006137d7856110a9565b9050801561383857600192506138268f8f8f858181106137f9576137f9615755565b905060200201602081019061380e9190615ca6565b8a8a89613820368b90038b018b615ced565b87613d9e565b15613838575050505050505050611c8d565b50600101613687565b508061386e576000356001600160e01b03191660405163726b3acb60e01b8152600401610bc591906155f1565b50505050505050505050505050565b600081815260208190526040812054908190036138ac5750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906138cf826128c8565b905080613926576000825460ff1660048111156138ee576138ee614d9e565b0361390c5760405163757a436360e01b815260040160405180910390fd5b600084815260208190526040902080546001019081905592505b5050919050565b61393561499a565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561396c5761396c615023565b604051908082528060200260200182016040528015613995578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b8360400151518110156122ca578281815181106139e1576139e1615755565b6020026020010151826060015182815181106139ff576139ff615755565b6001600160a01b03909216602092830291909101909101526001016139c2565b6000826060015151118015613a3d5750816080015151826060015151145b8015613a5257508160a0015151826060015151145b8015613a6757508160c0015151826060015151145b613a92576000356001600160e01b0319166040516306b5667560e21b8152600401610bc591906155f1565b613a9c81426155a9565b82604001511115610bd85760405163ad89be9d60e01b815260040160405180910390fd5b60608101516040820151608083015151600092919083906001600160401b03811115613aee57613aee615023565b604051908082528060200260200182016040528015613b17578160200160208202803683370190505b5060a086015190915060005b8251811015613b765786608001518181518110613b4257613b42615755565b602002602001015180519060200120838281518110613b6357613b63615755565b6020908102919091010152600101613b23565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b600081604051602401613c0a91906155f1565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b03861690613c53908590615c18565b600060405180830381855afa9150503d8060008114613c8e576040519150601f19603f3d011682016040523d82523d6000602084013e613c93565b606091505b509150915081613d5557846001600160a01b031683604051602401613cb89190615d4d565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251613ced9190615c18565b600060405180830381855afa9150503d8060008114613d28576040519150601f19603f3d011682016040523d82523d6000602084013e613d2d565b606091505b50909250905081613d5557838560405163069d427960e11b8152600401610bc5929190615d60565b80806020019051810190613d699190615d83565b6106c757838560405163069d427960e11b8152600401610bc5929190615d60565b60006108e2610b1b565b60006108e2610ed5565b60208088015188516000828152600184526040808220838352909452928320613dc6816128c8565b15613dd75760019350505050610776565b6020808c015160009081529081905260409020548214613e18576000356001600160e01b03191660405163d4cec26960e01b8152600401610bc591906155f1565b6000815460ff166004811115613e3057613e30614d9e565b14613e4e576040516322de95ff60e21b815260040160405180910390fd5b6001600160a01b038716600090815260088201602052604090205460ff1615613e955760405163025fd59560e41b81526001600160a01b0388166004820152602401610bc5565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613ed05750604086015115155b80613ede5750855160ff1615155b15613f25576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613f65929190615da5565b60405180910390a3600080808c6001811115613f8357613f83614d9e565b03613fd8576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613fcb9084906155a9565b925050819055915061403d565b60018c6001811115613fec57613fec614d9e565b03613762576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c161790556002840180548992906140349084906155a9565b92505081905590505b8a821061409157825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a261408c838e6143f5565b6140d7565b8981106140d757825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b5050505050979650505050505050565b80600360008460038111156140fe576140fe614d9e565b600381111561410f5761410f614d9e565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600381111561414d5761414d614d9e565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6001600160a01b038116611555576000356001600160e01b03191660405163104c66df60e31b8152600401610bc591906155f1565b600081815260018301602052604081205480156142985760006141d36001836155bc565b85549091506000906141e7906001906155bc565b905081811461424c57600086600001828154811061420757614207615755565b906000526020600020015490508087600001848154811061422a5761422a615755565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061425d5761425d615db3565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061099b565b600091505061099b565b60006142ac825490565b9050611167826113148360016155a9565b600061099b836114698585614462565b6142d561499a565b6142ee6142e784604001516001612177565b849061392d565b905061430560025482613a1f90919063ffffffff16565b6000614310826134a0565b9050600061431e600061387d565b6000818152600080516020615def83398151915260209081526040909120908701516001820185905560069091015590508251811461437e576000356001600160e01b03191660405163d4cec26960e01b8152600401610bc591906155f1565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca856143ab89613ac0565b89896040516143bd949392919061599a565b60405180910390a3505092915050565b60008060006143de8787878761448b565b915091506143eb81614578565b5095945050505050565b6143fe8161472e565b15610bd857815460ff1916600217825560008061441a83614748565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051614454929190615dc9565b60405180910390a250505050565b600082548281101561448157634e487b7160005260116020526024601cfd5b9190910392915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156144c2575060009050600361456f565b8460ff16601b141580156144da57508460ff16601c14155b156144eb575060009050600461456f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561453f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166145685760006001925092505061456f565b9150600090505b94509492505050565b600081600481111561458c5761458c614d9e565b036145945750565b60018160048111156145a8576145a8614d9e565b036145f55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610bc5565b600281600481111561460957614609614d9e565b036146565760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610bc5565b600381600481111561466a5761466a614d9e565b036146c25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610bc5565b60048160048111156146d6576146d6614d9e565b036115555760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610bc5565b600081602001516000148061099b57505060200151461490565b6060806147548361472e565b61478657602083015160405163092048d160e11b8152610bc5916001600160e01b031960003516914690600401615b9b565b8260600151516001600160401b038111156147a3576147a3615023565b6040519080825280602002602001820160405280156147cc578160200160208202803683370190505b5091508260600151516001600160401b038111156147ec576147ec615023565b60405190808252806020026020018201604052801561481f57816020015b606081526020019060019003908161480a5790505b50905060005b836060015151811015614994578360c00151818151811061484857614848615755565b60200260200101515a1161487b5761485f846134a0565b6040516307aec4ab60e21b8152600401610bc591815260200190565b8360600151818151811061489157614891615755565b60200260200101516001600160a01b0316846080015182815181106148b8576148b8615755565b60200260200101518560c0015183815181106148d6576148d6615755565b6020026020010151908660a0015184815181106148f5576148f5615755565b602002602001015160405161490a9190615c18565b600060405180830381858888f193505050503d8060008114614948576040519150601f19603f3d011682016040523d82523d6000602084013e61494d565b606091505b5084838151811061496057614960615755565b6020026020010184848151811061497957614979615755565b60209081029190910101919091529015159052600101614825565b50915091565b6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b508054600082559060005260206000209081019061155591905b80821115614a0557600081556001016149f1565b5090565b600060e082840312156124e057600080fd5b60008083601f840112614a2d57600080fd5b5081356001600160401b03811115614a4457600080fd5b6020830191508360208260051b8501011115610f2157600080fd5b60008083601f840112614a7157600080fd5b5081356001600160401b03811115614a8857600080fd5b602083019150836020606083028501011115610f2157600080fd5b600080600080600060608688031215614abb57600080fd5b85356001600160401b0380821115614ad257600080fd5b614ade89838a01614a09565b96506020880135915080821115614af457600080fd5b614b0089838a01614a1b565b90965094506040880135915080821115614b1957600080fd5b50614b2688828901614a5f565b969995985093965092949392505050565b60008060008060008060608789031215614b5057600080fd5b86356001600160401b0380821115614b6757600080fd5b614b738a838b01614a1b565b90985096506020890135915080821115614b8c57600080fd5b614b988a838b01614a1b565b90965094506040890135915080821115614bb157600080fd5b50614bbe89828a01614a1b565b979a9699509497509295939492505050565b600081518084526020808501945080840160005b83811015614c02578151151587529582019590820190600101614be4565b509495945050505050565b6020815260006109496020830184614bd0565b600080600080600080600080600060a08a8c031215614c3e57600080fd5b8935985060208a01356001600160401b0380821115614c5c57600080fd5b614c688d838e01614a1b565b909a50985060408c0135915080821115614c8157600080fd5b614c8d8d838e01614a1b565b909850965060608c0135915080821115614ca657600080fd5b614cb28d838e01614a1b565b909650945060808c0135915080821115614ccb57600080fd5b50614cd88c828d01614a1b565b915080935050809150509295985092959850929598565b60008060208385031215614d0257600080fd5b82356001600160401b03811115614d1857600080fd5b614d2485828601614a1b565b90969095509350505050565b600081518084526020808501945080840160005b83811015614c025781516001600160a01b031687529582019590820190600101614d44565b6020815260006109496020830184614d30565b60008060408385031215614d8f57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614dc457614dc4614d9e565b9052565b60006060808352614ddb81840187614d30565b83810360208581019190915286518083528782019282019060005b81811015614e1957614e09838651614db4565b9383019391830191600101614df6565b505060409250858103838701528087518083528383019150838901925060005b81811015614e69578351805160ff1684528581015186850152860151868401529284019291860191600101614e39565b50909a9950505050505050505050565b80356001600160a01b038116811461116757600080fd5b600080600060608486031215614ea557600080fd5b8335925060208401359150614ebc60408501614e79565b90509250925092565b600080600080600060608688031215614edd57600080fd5b85356001600160401b0380821115614ef457600080fd5b9087019060c0828a031215614f0857600080fd5b90955060208701359080821115614af457600080fd5b600060208284031215614f3057600080fd5b5035919050565b80356002811061116757600080fd5b60008060008060008060008060008060c08b8d031215614f6557600080fd5b8a35995060208b01356001600160401b0380821115614f8357600080fd5b614f8f8e838f01614a1b565b909b50995060408d0135915080821115614fa857600080fd5b614fb48e838f01614a1b565b909950975060608d0135915080821115614fcd57600080fd5b614fd98e838f01614a1b565b909750955060808d0135915080821115614ff257600080fd5b50614fff8d828e01614a1b565b9094509250615012905060a08c01614f37565b90509295989b9194979a5092959850565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b038111828210171561505b5761505b615023565b60405290565b60405160c081016001600160401b038111828210171561505b5761505b615023565b604051601f8201601f191681016001600160401b03811182821017156150ab576150ab615023565b604052919050565b60006001600160401b038211156150cc576150cc615023565b5060051b60200190565b600082601f8301126150e757600080fd5b813560206150fc6150f7836150b3565b615083565b82815260059290921b8401810191818101908684111561511b57600080fd5b8286015b84811015615144578035600481106151375760008081fd5b835291830191830161511f565b509695505050505050565b600082601f83011261516057600080fd5b813560206151706150f7836150b3565b82815260059290921b8401810191818101908684111561518f57600080fd5b8286015b84811015615144576151a481614e79565b8352918301918301615193565b600080604083850312156151c457600080fd5b82356001600160401b03808211156151db57600080fd5b6151e7868387016150d6565b935060208501359150808211156151fd57600080fd5b5061520a8582860161514f565b9150509250929050565b6000806040838503121561522757600080fd5b8235915061523760208401614e79565b90509250929050565b8035600e811061116757600080fd5b6000806040838503121561526257600080fd5b61526b83615240565b915061523760208401614e79565b60006020828403121561528b57600080fd5b61094982614e79565b60008060008060008060008060008060c08b8d0312156152b357600080fd5b8a35995060208b0135985060408b01356001600160401b03808211156152d857600080fd5b6152e48e838f01614a1b565b909a50985060608d01359150808211156152fd57600080fd5b6153098e838f01614a1b565b909850965060808d013591508082111561532257600080fd5b61532e8e838f01614a1b565b909650945060a08d013591508082111561534757600080fd5b506153548d828e01614a1b565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561538057600080fd5b82356001600160401b0381111561539657600080fd5b6153a285828601614a09565b92505061523760208401614f37565b60a08101600587106153c5576153c5614d9e565b95815260208101949094526040840192909252606083015260809091015290565b6000602082840312156153f857600080fd5b81356001600160401b0381111561540e57600080fd5b6108938482850161514f565b600081518084526020808501945080840160005b83811015614c025781518752958201959082019060010161542e565b60608152600061545d6060830186614d30565b828103602084015261546f8186614d30565b90508281036040840152615483818561541a565b9695505050505050565b602081526000610949602083018461541a565b6000602082840312156154b257600080fd5b61094982615240565b60006154c96150f7846150b3565b8381529050602080820190600585901b8401868111156154e857600080fd5b845b8181101561557b5780356001600160401b038082111561550a5760008081fd5b8188019150601f8a818401126155205760008081fd5b82358281111561553257615532615023565b615543818301601f19168801615083565b92508083528b8782860101111561555c57600091508182fd5b80878501888501376000908301870152508552509282019282016154ea565b505050509392505050565b60006109493684846154bb565b634e487b7160e01b600052601160045260246000fd5b8082018082111561099b5761099b615593565b8181038181111561099b5761099b615593565b6000826155ec57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b600082601f83011261561757600080fd5b813560206156276150f7836150b3565b82815260059290921b8401810191818101908684111561564657600080fd5b8286015b84811015615144578035835291830191830161564a565b600082601f83011261567257600080fd5b610949838335602085016154bb565b600060e0823603121561569357600080fd5b61569b615039565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156156cd57600080fd5b6156d93683870161514f565b606084015260808501359150808211156156f257600080fd5b6156fe36838701615606565b608084015260a085013591508082111561571757600080fd5b61572336838701615661565b60a084015260c085013591508082111561573c57600080fd5b5061574936828601615606565b60c08301525092915050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761099b5761099b615593565b60208101600e831061579657615796614d9e565b91905290565b6001600160e01b03198316815260408101600983106157bd576157bd614d9e565b8260208301529392505050565b6040815260006157dd6040830185614d30565b82810360208401526157ef8185614bd0565b95945050505050565b60808152600061580b6080830187614bd0565b82810360208481019190915286518083528782019282019060005b8181101561584b5784516001600160601b031683529383019391830191600101615826565b5050848103604086015261585f8188614d30565b9250505082810360608401526107768185614d30565b60005b83811015615890578181015183820152602001615878565b50506000910152565b600081518084526158b1816020860160208601615875565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b8581101561590d5782840389526158fb848351615899565b988501989350908401906001016158e3565b5091979650505050505050565b8051825260208101516020830152604081015160408301526000606082015160e0606085015261594d60e0850182614d30565b905060808301518482036080860152615966828261541a565b91505060a083015184820360a086015261598082826158c5565b91505060c083015184820360c08601526157ef828261541a565b6080815260006159ad608083018761591a565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b80831015615a1e57835160048110615a0857615a08614d9e565b82529284019260019290920191908401906159ee565b50606089015193508481036060860152615a38818561541a565b935050505060808601518282036080840152615a5482826158c5565b91505060a086015182820360a0840152615a6e828261541a565b93505050506157ef60608301846001600160a01b03169052565b6000808335601e19843603018112615a9f57600080fd5b8301803591506001600160401b03821115615ab957600080fd5b6020019150600581901b3603821315610f2157600080fd5b600060c08236031215615ae357600080fd5b615aeb615061565b823581526020830135602082015260408301356001600160401b0380821115615b1357600080fd5b615b1f368387016150d6565b60408401526060850135915080821115615b3857600080fd5b615b4436838701615606565b60608401526080850135915080821115615b5d57600080fd5b615b6936838701615661565b608084015260a0850135915080821115615b8257600080fd5b50615b8f36828601615606565b60a08301525092915050565b6001600160e01b03199390931683526020830191909152604082015260600190565b604081526000615bd0604083018561591a565b905060018060a01b03831660208301529392505050565b6001600160e01b0319831681528151600090615c0a816004850160208701615875565b919091016004019392505050565b60008251615c2a818460208701615875565b9190910192915050565b608081526000615c476080830187615899565b8281036020840152615c598187614d30565b90508281036040840152615c6d8186614bd0565b9050828103606084015261077681856158c5565b604081526000615c946040830185614bd0565b82810360208401526157ef8185614d30565b600060208284031215615cb857600080fd5b61094982614f37565b803560ff8116811461116757600080fd5b600060208284031215615ce457600080fd5b61094982615cc1565b600060608284031215615cff57600080fd5b604051606081018181106001600160401b0382111715615d2157615d21615023565b604052615d2d83615cc1565b815260208301356020820152604083013560408201528091505092915050565b6020815260006109496020830184615899565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d9557600080fd5b8151801515811461094957600080fd5b604081016157bd8285614db4565b634e487b7160e01b600052603160045260246000fd5b604081526000615ddc6040830185614bd0565b82810360208401526157ef81856158c556fea6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb495da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca164736f6c6343000811000a", + "address": "0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF", + "args": "0x7d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e50000000000000000000000000000000000000000000000000000000000127500000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005000000000000000000000000cee681c9108c42c710c6a8a949307d5f13c9f3ca0000000000000000000000006e19cf519b7b83f7ce719b6d30232485d9609d950000000000000000000000007fc81d20f7d1f53d0ea094fcbdd1b531b71225eb000000000000000000000000880c5da7bff9740464287ebfe381be1cccce4fea0000000000000000000000001ad54d61f47acbcba99fb6540a1694eb2f47ab95", + "ast": "", + "blockNumber": 26511796, + "bytecode": "0x608060405260405162000eed38038062000eed833981016040819052620000269162000429565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200055c565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000ea6833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000ec6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000ea68339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002118162000383565b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b6060620002aa8462000383565b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b03168560405162000324919062000509565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000392565b9695505050505050565b6001600160a01b03163b151590565b60608315620003a357508162000161565b825115620003b45782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000527565b80516001600160a01b0381168114620003e857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200042057818101518382015260200162000406565b50506000910152565b6000806000606084860312156200043f57600080fd5b6200044a84620003d0565b92506200045a60208501620003d0565b60408501519092506001600160401b03808211156200047857600080fd5b818601915086601f8301126200048d57600080fd5b815181811115620004a257620004a2620003ed565b604051601f8201601f19908116603f01168101908382118183101715620004cd57620004cd620003ed565b81604052828152896020848701011115620004e757600080fd5b620004fa83602083016020880162000403565b80955050505050509250925092565b600082516200051d81846020870162000403565b9190910192915050565b60208152600082518060208401526200054881604085016020870162000403565b601f01601f19169190910160400192915050565b61093a806200056c6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b3660046106c7565b610136565b61006661009e3660046106f8565b610173565b6100666100b13660046107a8565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b506100666101023660046106c7565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610370565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610370915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b576101688161039b565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006102406103ef565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b600060008051602061089e8339815191525b546001600160a01b0316919050565b61037983610405565b6000825111806103865750805b15610212576103958383610445565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c461034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610471565b60006000805160206108be833981519152610361565b61040e81610508565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061046a83836040518060600160405280602781526020016108de60279139610588565b9392505050565b6001600160a01b0381166104d65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b8060008051602061089e8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051181610663565b6105735760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b806000805160206108be8339815191526104e7565b606061059384610663565b6105ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610609919061084e565b600060405180830381855af49150503d8060008114610644576040519150601f19603f3d011682016040523d82523d6000602084013e610649565b606091505b5091509150610659828286610672565b9695505050505050565b6001600160a01b03163b151590565b6060831561068157508161046a565b8251156106915782518084602001fd5b8160405162461bcd60e51b815260040161031d919061086a565b80356001600160a01b03811681146106c257600080fd5b919050565b6000602082840312156106d957600080fd5b61046a826106ab565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561070a57600080fd5b81356001600160401b038082111561072157600080fd5b818401915084601f83011261073557600080fd5b813581811115610747576107476106e2565b604051601f8201601f19908116603f0116810190838211818310171561076f5761076f6106e2565b8160405282815287602084870101111561078857600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107bd57600080fd5b6107c6846106ab565b925060208401356001600160401b03808211156107e257600080fd5b818601915086601f8301126107f657600080fd5b81358181111561080557600080fd5b87602082850101111561081757600080fd5b6020830194508093505050509250925092565b60005b8381101561084557818101518382015260200161082d565b50506000910152565b6000825161086081846020870161082a565b9190910192915050565b602081526000825180602084015261088981604085016020870161082a565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205d5db908d6bad5bfc298cb89bc49c38963bb1499be9336506651cff965fb333264736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "chainId": 2021, + "contractAbsolutePath": "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "deployedBytecode": "0x6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b3660046106c7565b610136565b61006661009e3660046106f8565b610173565b6100666100b13660046107a8565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b506100666101023660046106c7565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610370565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610370915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b576101688161039b565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006102406103ef565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b600060008051602061089e8339815191525b546001600160a01b0316919050565b61037983610405565b6000825111806103865750805b15610212576103958383610445565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c461034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610471565b60006000805160206108be833981519152610361565b61040e81610508565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061046a83836040518060600160405280602781526020016108de60279139610588565b9392505050565b6001600160a01b0381166104d65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b8060008051602061089e8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051181610663565b6105735760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b806000805160206108be8339815191526104e7565b606061059384610663565b6105ee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610609919061084e565b600060405180830381855af49150503d8060008114610644576040519150601f19603f3d011682016040523d82523d6000602084013e610649565b606091505b5091509150610659828286610672565b9695505050505050565b6001600160a01b03163b151590565b6060831561068157508161046a565b8251156106915782518084602001fd5b8160405162461bcd60e51b815260040161031d919061086a565b80356001600160a01b03811681146106c257600080fd5b919050565b6000602082840312156106d957600080fd5b61046a826106ab565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561070a57600080fd5b81356001600160401b038082111561072157600080fd5b818401915084601f83011261073557600080fd5b813581811115610747576107476106e2565b604051601f8201601f19908116603f0116810190838211818310171561076f5761076f6106e2565b8160405282815287602084870101111561078857600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107bd57600080fd5b6107c6846106ab565b925060208401356001600160401b03808211156107e257600080fd5b818601915086601f8301126107f657600080fd5b81358181111561080557600080fd5b87602082850101111561081757600080fd5b6020830194508093505050509250925092565b60005b8381101561084557818101518382015260200161082d565b50506000910152565b6000825161086081846020870161082a565b9190910192915050565b602081526000825180602084015261088981604085016020870161082a565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205d5db908d6bad5bfc298cb89bc49c38963bb1499be9336506651cff965fb333264736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { - "errors": { - "ErrAddressIsNotCreatedEOA(address,bytes32)": [ - { - "details": "Error thrown when an address is expected to be an already created externally owned account (EOA). This error indicates that the provided address is invalid for certain contract operations that require already created EOA." - } - ], - "ErrAlreadyVoted(address)": [ - { - "details": "Error indicating that a voter has already voted.", - "params": { - "voter": "The address of the voter who has already voted." - } - } - ], - "ErrBridgeOperatorAlreadyExisted(address)": [ - { - "details": "Error thrown when attempting to add a bridge operator that already exists in the contract. This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract." - } - ], - "ErrBridgeOperatorUpdateFailed(address)": [ - { - "details": "Error raised when a bridge operator update operation fails.", - "params": { - "bridgeOperator": "The address of the bridge operator that failed to update." - } - } - ], - "ErrContractTypeNotFound(uint8)": [ - { - "details": "Error of invalid role." - } - ], - "ErrCurrentProposalIsNotCompleted()": [ - { - "details": "Error thrown when the current proposal is not completed." - } - ], - "ErrDuplicated(bytes4)": [ - { - "details": "Error thrown when a duplicated element is detected in an array.", - "params": { - "msgSig": "The function signature that invoke the error." - } - } - ], - "ErrInsufficientGas(bytes32)": [ - { - "details": "Error thrown when there is insufficient gas to execute a function." - } - ], - "ErrInvalidArguments(bytes4)": [ - { - "details": "Error indicating that arguments are invalid." - } - ], - "ErrInvalidChainId(bytes4,uint256,uint256)": [ - { - "details": "Error indicating that the chain ID is invalid.", - "params": { - "actual": "Current chain ID that executing function.", - "expected": "Expected chain ID required for the tx to success.", - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." - } - } - ], - "ErrInvalidExpiryTimestamp()": [ - { - "details": "Error thrown when an invalid expiry timestamp is provided." - } - ], - "ErrInvalidOrder(bytes4)": [ - { - "details": "Error indicating that an order is invalid.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." - } - } - ], - "ErrInvalidProposal(bytes32,bytes32)": [ - { - "details": "Error thrown when an invalid proposal is encountered.", - "params": { - "actual": "The actual value of the proposal.", - "expected": "The expected value of the proposal." - } - } - ], - "ErrInvalidProposalNonce(bytes4)": [ - { - "details": "Error indicating that the proposal nonce is invalid.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid proposal nonce." - } - } - ], - "ErrInvalidSignatures(bytes4)": [ - { - "details": "Error indicating that a signature is invalid for a specific function signature.", - "params": { - "msgSig": "The function signature (bytes4) that encountered an invalid signature." - } - } - ], - "ErrInvalidThreshold(bytes4)": [ - { - "details": "Error indicating that the provided threshold is invalid for a specific function signature.", - "params": { - "msgSig": "The function signature (bytes4) that the invalid threshold applies to." - } - } - ], - "ErrInvalidVoteWeight(bytes4)": [ - { - "details": "Error indicating that a vote weight is invalid for a specific function signature.", - "params": { - "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." - } - } - ], - "ErrLengthMismatch(bytes4)": [ - { - "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", - "params": { - "msgSig": "The function signature (bytes4) that has a length mismatch." - } - } - ], - "ErrOnlySelfCall(bytes4)": [ - { - "details": "Error indicating that a function can only be called by the contract itself.", - "params": { - "msgSig": "The function signature (bytes4) that can only be called by the contract itself." - } - } - ], - "ErrQueryForEmptyVote()": [ - { - "details": "Error thrown when querying for an empty vote." - } - ], - "ErrUnauthorized(bytes4,uint8)": [ - { - "details": "Error indicating that the caller is unauthorized to perform a specific function.", - "params": { - "expectedRole": "The role required to perform the function.", - "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." - } - } - ], - "ErrUnsupportedInterface(bytes4,address)": [ - { - "details": "The error indicating an unsupported interface.", - "params": { - "addr": "The address where the unsupported interface was encountered.", - "interfaceId": "The bytes4 interface identifier that is not supported." - } - } - ], - "ErrUnsupportedVoteType(bytes4)": [ - { - "details": "Error indicating that a vote type is not supported.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an unsupported vote type." - } - } - ], - "ErrVoteIsFinalized()": [ - { - "details": "Error thrown when attempting to interact with a finalized vote." - } - ], - "ErrZeroAddress(bytes4)": [ - { - "details": "Error indicating that given address is null when it should not." - } - ], - "ErrZeroCodeContract(address)": [ - { - "details": "Error of set to non-contract." - } - ] - }, + "version": 1, "kind": "dev", "methods": { - "addBridgeOperators(uint96[],address[],address[])": { - "details": "Adds multiple bridge operators.", - "params": { - "bridgeOperators": "An array of addresses representing the bridge operators to add.", - "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." - }, - "returns": { - "addeds": "An array of booleans indicating whether each bridge operator was added successfully. Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators( voteWeights, governors, bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]); const filteredWeights = weights.filter((_, index) => addeds[index]); const filteredGovernors = governors.filter((_, index) => addeds[index]); // ... (Process or use the information as required) ... ```" - } - }, - "castGlobalProposalBySignatures((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { - "details": "See `GovernanceProposal-_castGlobalProposalBySignatures`." - }, - "castProposalBySignatures((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { - "details": "See `GovernanceProposal-_castProposalBySignatures`." - }, - "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)": { - "details": "Casts vote for a proposal on the current network. Requirements: - The method caller is governor." - }, - "checkThreshold(uint256)": { - "details": "Checks whether the `_voteWeight` passes the threshold." - }, - "deleteExpired(uint256,uint256)": { - "details": "Deletes the expired proposal by its chainId and nonce, without creating a new proposal. Requirements: - The proposal is already created." - }, - "getBridgeOperatorOf(address[])": { - "details": "Returns an array of bridge operators correspoding to governor addresses.", - "returns": { - "bridgeOperators": "An array containing the addresses of all bridge operators." - } - }, - "getBridgeOperatorWeight(address)": { - "details": "External function to retrieve the vote weight of a specific bridge operator.", - "params": { - "bridgeOperator": "The address of the bridge operator to get the vote weight for." - }, - "returns": { - "weight": "The vote weight of the specified bridge operator." - } - }, - "getBridgeOperators()": { - "details": "Returns an array of all bridge operators.", - "returns": { - "_0": "An array containing the addresses of all bridge operators." - } - }, - "getCallbackRegisters()": { - "details": "Retrieves the addresses of registered callbacks.", - "returns": { - "registers": "An array containing the addresses of registered callbacks." - } - }, - "getContract(uint8)": { - "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", - "params": { - "contractType": "The role of the contract to retrieve." - }, - "returns": { - "contract_": "The address of the contract with the specified role." - } - }, - "getFullBridgeOperatorInfos()": { - "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", - "returns": { - "bridgeOperators": "An array of addresses representing the registered bridge operators.", - "governors": "An array of addresses representing the governors of each bridge operator.", - "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" - } - }, - "getGlobalProposalSignatures(uint256)": { - "details": "See {CommonGovernanceProposal-_getProposalSignatures}" - }, - "getGovernorWeight(address)": { - "details": "External function to retrieve the vote weight of a specific governor.", - "params": { - "governor": "The address of the governor to get the vote weight for." - }, - "returns": { - "weight": "voteWeight The vote weight of the specified governor." - } + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" }, - "getGovernorWeights(address[])": { - "details": "Returns the weights of a list of governor addresses." + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." }, - "getGovernors()": { - "details": "Returns an array of all governors.", - "returns": { - "_0": "An array containing the addresses of all governors." - } - }, - "getGovernorsOf(address[])": { - "details": "Retrieves the governors corresponding to a given array of bridge operators. This external function allows external callers to obtain the governors associated with a given array of bridge operators. The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.", - "params": { - "bridgeOperators": "An array of bridge operator addresses for which governors are to be retrieved." - }, - "returns": { - "governors": "An array of addresses representing the governors corresponding to the provided bridge operators." - } - }, - "getProposalExpiryDuration()": { - "details": "Returns the expiry duration for a new proposal." - }, - "getProposalSignatures(uint256,uint256)": { - "details": "See {CommonGovernanceProposal-_getProposalSignatures}" - }, - "getThreshold()": { - "details": "Returns the threshold." - }, - "getTotalWeights()": { - "details": "Returns total weights." - }, - "globalProposalVoted(uint256,address)": { - "details": "See {CommonGovernanceProposal-_proposalVoted}" - }, - "isBridgeOperator(address)": { - "details": "Checks if the given address is a bridge operator.", - "params": { - "addr": "The address to check." - }, - "returns": { - "_0": "A boolean indicating whether the address is a bridge operator." - } - }, - "minimumVoteWeight()": { - "details": "Returns the minimum vote weight to pass the threshold." - }, - "proposalVoted(uint256,uint256,address)": { - "details": "See {CommonGovernanceProposal-_proposalVoted}" - }, - "propose(uint256,uint256,address[],uint256[],bytes[],uint256[])": { - "details": "See `CoreGovernance-_proposeProposal`. Requirements: - The method caller is governor." - }, - "proposeGlobal(uint256,uint8[],uint256[],bytes[],uint256[])": { - "details": "See `CoreGovernance-_proposeGlobal`. Requirements: - The method caller is governor." - }, - "proposeGlobalProposalStructAndCastVotes((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { - "details": "See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. Requirements: - The method caller is governor." - }, - "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)": { - "details": "Proposes and casts vote for a proposal on the current network. Requirements: - The method caller is governor. - The proposal is for the current network." - }, - "proposeProposalStructAndCastVotes((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { - "details": "See `GovernanceProposal-_proposeProposalStructAndCastVotes`. Requirements: - The method caller is governor. - The proposal is for the current network." - }, - "registerCallbacks(address[])": { - "details": "Registers multiple callbacks with the bridge.", - "params": { - "registers": "The array of callback addresses to register." - }, - "returns": { - "registereds": "An array indicating the success status of each registration." - } - }, - "removeBridgeOperators(address[])": { - "details": "Removes multiple bridge operators.", - "params": { - "bridgeOperators": "An array of addresses representing the bridge operators to remove." - }, - "returns": { - "removeds": "An array of booleans indicating whether each bridge operator was removed successfully. * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators( bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]); // ... (Process or use the information as required) ... ```" - } - }, - "resolveTargets(uint8[])": { - "details": "Returns corresponding address of target options. Return address(0) on non-existent target." - }, - "setContract(uint8,address)": { - "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", - "params": { - "addr": "The address of the contract to set.", - "contractType": "The role of the contract to set." - } - }, - "setThreshold(uint256,uint256)": { - "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." - }, - "sumGovernorsWeight(address[])": { - "details": "Returns total weights of the governor list." - }, - "totalBridgeOperators()": { - "details": "Returns the total number of bridge operators.", - "returns": { - "_0": "The total number of bridge operators." - } + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." }, - "unregisterCallbacks(address[])": { - "details": "Unregisters multiple callbacks from the bridge.", - "params": { - "registers": "The array of callback addresses to unregister." - }, - "returns": { - "unregistereds": "An array indicating the success status of each unregistration." - } - }, - "updateBridgeOperator(address)": { - "details": "Governor updates their corresponding governor and/or operator address. Requirements: - The caller must the governor of the operator that is requested changes.", - "params": { - "bridgeOperator": "The address of the bridge operator to update." - } + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" }, - "updateManyTargetOption(uint8[],address[])": { - "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal. " - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "round(uint256)": { - "notice": "chain id = 0 for global proposal" + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." }, - "updateBridgeOperator(address)": { - "notice": "This method checks authorization by querying the corresponding operator of the msg.sender and then attempts to remove it from the `_bridgeOperatorSet` for gas optimization. In case we allow a governor can leave their operator address blank null `address(0)`, consider add authorization check." + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." } }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 8162, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "round", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 8170, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "vote", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)8100_storage))" - }, - { - "astId": 8172, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "_proposalExpiryDuration", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 8909, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "_targetOptionsMap", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_enum(TargetOption)15064,t_address)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_enum(TargetOption)15064": { - "encoding": "inplace", - "label": "enum GlobalProposal.TargetOption", - "numberOfBytes": "1" - }, - "t_enum(VoteStatus)12751": { - "encoding": "inplace", - "label": "enum VoteStatusConsumer.VoteStatus", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_struct(Signature)12742_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct SignatureConsumer.Signature)", - "numberOfBytes": "32", - "value": "t_struct(Signature)12742_storage" - }, - "t_mapping(t_enum(TargetOption)15064,t_address)": { - "encoding": "mapping", - "key": "t_enum(TargetOption)15064", - "label": "mapping(enum GlobalProposal.TargetOption => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)8100_storage))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(ProposalVote)8100_storage)" - }, - "t_mapping(t_uint256,t_struct(ProposalVote)8100_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", - "numberOfBytes": "32", - "value": "t_struct(ProposalVote)8100_storage" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(ProposalVote)8100_storage": { - "encoding": "inplace", - "label": "struct CoreGovernance.ProposalVote", - "members": [ - { - "astId": 8076, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "status", - "offset": 0, - "slot": "0", - "type": "t_enum(VoteStatus)12751" - }, - { - "astId": 8078, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "hash", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 8080, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "againstVoteWeight", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 8082, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "forVoteWeight", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 8085, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "forVoteds", - "offset": 0, - "slot": "4", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 8088, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "againstVoteds", - "offset": 0, - "slot": "5", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 8090, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "expiryTimestamp", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 8095, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "sig", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_struct(Signature)12742_storage)" - }, - { - "astId": 8099, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "voted", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_bool)" - } - ], - "numberOfBytes": "288" - }, - "t_struct(Signature)12742_storage": { - "encoding": "inplace", - "label": "struct SignatureConsumer.Signature", - "members": [ - { - "astId": 12737, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "v", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 12739, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "r", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 12741, - "contract": "contracts/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", - "label": "s", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." } } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 192803, + "numDeployments": 1, + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1713240519, + "userdoc": { + "version": 1, + "kind": "user" } } \ No newline at end of file From 0c61572069ad0b6b07aab4d8af82ae77e59da797 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 15:16:56 +0700 Subject: [PATCH 194/305] chore: remove old bridge manager --- ...ager.json => RoninBridgeManagerProxy.json} | 0 .../sepolia/MainchainBridgeManager.json | 2161 ----------------- 2 files changed, 2161 deletions(-) rename deployments/ronin-testnet/{RoninBridgeManager.json => RoninBridgeManagerProxy.json} (100%) delete mode 100644 deployments/sepolia/MainchainBridgeManager.json diff --git a/deployments/ronin-testnet/RoninBridgeManager.json b/deployments/ronin-testnet/RoninBridgeManagerProxy.json similarity index 100% rename from deployments/ronin-testnet/RoninBridgeManager.json rename to deployments/ronin-testnet/RoninBridgeManagerProxy.json diff --git a/deployments/sepolia/MainchainBridgeManager.json b/deployments/sepolia/MainchainBridgeManager.json deleted file mode 100644 index 07911706..00000000 --- a/deployments/sepolia/MainchainBridgeManager.json +++ /dev/null @@ -1,2161 +0,0 @@ -{ - "abi": [ - { - "type": "constructor", - "inputs": [ - { - "name": "num", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "denom", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "roninChainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "bridgeContract", - "type": "address", - "internalType": "address" - }, - { - "name": "callbackRegisters", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "bridgeOperators", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "governors", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "voteWeights", - "type": "uint96[]", - "internalType": "uint96[]" - }, - { - "name": "targetOptions", - "type": "uint8[]", - "internalType": "enum GlobalProposal.TargetOption[]" - }, - { - "name": "targets", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addBridgeOperators", - "inputs": [ - { - "name": "voteWeights", - "type": "uint96[]", - "internalType": "uint96[]" - }, - { - "name": "governors", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "bridgeOperators", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "addeds", - "type": "bool[]", - "internalType": "bool[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "checkThreshold", - "inputs": [ - { - "name": "_voteWeight", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBridgeOperatorOf", - "inputs": [ - { - "name": "governors", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "bridgeOperators", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBridgeOperatorWeight", - "inputs": [ - { - "name": "bridgeOperator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "weight", - "type": "uint96", - "internalType": "uint96" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBridgeOperators", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getCallbackRegisters", - "inputs": [], - "outputs": [ - { - "name": "registers", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getContract", - "inputs": [ - { - "name": "contractType", - "type": "uint8", - "internalType": "enum ContractType" - } - ], - "outputs": [ - { - "name": "contract_", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getFullBridgeOperatorInfos", - "inputs": [], - "outputs": [ - { - "name": "governors", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "bridgeOperators", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "weights", - "type": "uint96[]", - "internalType": "uint96[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGovernorWeight", - "inputs": [ - { - "name": "governor", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "weight", - "type": "uint96", - "internalType": "uint96" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGovernorWeights", - "inputs": [ - { - "name": "governors", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "weights", - "type": "uint96[]", - "internalType": "uint96[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGovernors", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGovernorsOf", - "inputs": [ - { - "name": "bridgeOperators", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "governors", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getProposalExpiryDuration", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getThreshold", - "inputs": [], - "outputs": [ - { - "name": "num_", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "denom_", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTotalWeight", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "globalProposalRelayed", - "inputs": [ - { - "name": "_round", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isBridgeOperator", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "minimumVoteWeight", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "registerCallbacks", - "inputs": [ - { - "name": "registers", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "registereds", - "type": "bool[]", - "internalType": "bool[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "relayGlobalProposal", - "inputs": [ - { - "name": "globalProposal", - "type": "tuple", - "internalType": "struct GlobalProposal.GlobalProposalDetail", - "components": [ - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "expiryTimestamp", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "targetOptions", - "type": "uint8[]", - "internalType": "enum GlobalProposal.TargetOption[]" - }, - { - "name": "values", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "calldatas", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "gasAmounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "supports_", - "type": "uint8[]", - "internalType": "enum Ballot.VoteType[]" - }, - { - "name": "signatures", - "type": "tuple[]", - "internalType": "struct SignatureConsumer.Signature[]", - "components": [ - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "relayProposal", - "inputs": [ - { - "name": "proposal", - "type": "tuple", - "internalType": "struct Proposal.ProposalDetail", - "components": [ - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "expiryTimestamp", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "targets", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "values", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "calldatas", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "gasAmounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "supports_", - "type": "uint8[]", - "internalType": "enum Ballot.VoteType[]" - }, - { - "name": "signatures", - "type": "tuple[]", - "internalType": "struct SignatureConsumer.Signature[]", - "components": [ - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "removeBridgeOperators", - "inputs": [ - { - "name": "bridgeOperators", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "removeds", - "type": "bool[]", - "internalType": "bool[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "resolveTargets", - "inputs": [ - { - "name": "targetOptions", - "type": "uint8[]", - "internalType": "enum GlobalProposal.TargetOption[]" - } - ], - "outputs": [ - { - "name": "targets", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "round", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setContract", - "inputs": [ - { - "name": "contractType", - "type": "uint8", - "internalType": "enum ContractType" - }, - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setThreshold", - "inputs": [ - { - "name": "numerator", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "denominator", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "sumGovernorsWeight", - "inputs": [ - { - "name": "governors", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "sum", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalBridgeOperator", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "unregisterCallbacks", - "inputs": [ - { - "name": "registers", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "unregistereds", - "type": "bool[]", - "internalType": "bool[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateBridgeOperator", - "inputs": [ - { - "name": "newBridgeOperator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateManyTargetOption", - "inputs": [ - { - "name": "targetOptions", - "type": "uint8[]", - "internalType": "enum GlobalProposal.TargetOption[]" - }, - { - "name": "targets", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "vote", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "status", - "type": "uint8", - "internalType": "enum VoteStatusConsumer.VoteStatus" - }, - { - "name": "hash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "againstVoteWeight", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "forVoteWeight", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "expiryTimestamp", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "BridgeOperatorUpdated", - "inputs": [ - { - "name": "governor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "fromBridgeOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "toBridgeOperator", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeOperatorsAdded", - "inputs": [ - { - "name": "statuses", - "type": "bool[]", - "indexed": false, - "internalType": "bool[]" - }, - { - "name": "voteWeights", - "type": "uint96[]", - "indexed": false, - "internalType": "uint96[]" - }, - { - "name": "governors", - "type": "address[]", - "indexed": false, - "internalType": "address[]" - }, - { - "name": "bridgeOperators", - "type": "address[]", - "indexed": false, - "internalType": "address[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeOperatorsRemoved", - "inputs": [ - { - "name": "statuses", - "type": "bool[]", - "indexed": false, - "internalType": "bool[]" - }, - { - "name": "bridgeOperators", - "type": "address[]", - "indexed": false, - "internalType": "address[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ContractUpdated", - "inputs": [ - { - "name": "contractType", - "type": "uint8", - "indexed": true, - "internalType": "enum ContractType" - }, - { - "name": "addr", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GlobalProposalCreated", - "inputs": [ - { - "name": "round", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "proposalHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "proposal", - "type": "tuple", - "indexed": false, - "internalType": "struct Proposal.ProposalDetail", - "components": [ - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "expiryTimestamp", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "targets", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "values", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "calldatas", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "gasAmounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "globalProposalHash", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "globalProposal", - "type": "tuple", - "indexed": false, - "internalType": "struct GlobalProposal.GlobalProposalDetail", - "components": [ - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "expiryTimestamp", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "targetOptions", - "type": "uint8[]", - "internalType": "enum GlobalProposal.TargetOption[]" - }, - { - "name": "values", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "calldatas", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "gasAmounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "creator", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Notified", - "inputs": [ - { - "name": "callData", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "registers", - "type": "address[]", - "indexed": false, - "internalType": "address[]" - }, - { - "name": "statuses", - "type": "bool[]", - "indexed": false, - "internalType": "bool[]" - }, - { - "name": "returnDatas", - "type": "bytes[]", - "indexed": false, - "internalType": "bytes[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProposalApproved", - "inputs": [ - { - "name": "proposalHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProposalCreated", - "inputs": [ - { - "name": "chainId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "round", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "proposalHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "proposal", - "type": "tuple", - "indexed": false, - "internalType": "struct Proposal.ProposalDetail", - "components": [ - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "expiryTimestamp", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "targets", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "values", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "calldatas", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "gasAmounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "creator", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProposalExecuted", - "inputs": [ - { - "name": "proposalHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "successCalls", - "type": "bool[]", - "indexed": false, - "internalType": "bool[]" - }, - { - "name": "returnDatas", - "type": "bytes[]", - "indexed": false, - "internalType": "bytes[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProposalExpired", - "inputs": [ - { - "name": "proposalHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProposalExpiryDurationChanged", - "inputs": [ - { - "name": "duration", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProposalRejected", - "inputs": [ - { - "name": "proposalHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProposalVoted", - "inputs": [ - { - "name": "proposalHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "voter", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "support", - "type": "uint8", - "indexed": false, - "internalType": "enum Ballot.VoteType" - }, - { - "name": "weight", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TargetOptionUpdated", - "inputs": [ - { - "name": "targetOption", - "type": "uint8", - "indexed": true, - "internalType": "enum GlobalProposal.TargetOption" - }, - { - "name": "addr", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThresholdUpdated", - "inputs": [ - { - "name": "nonce", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "numerator", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "denominator", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "previousNumerator", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "previousDenominator", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "ErrBridgeOperatorAlreadyExisted", - "inputs": [ - { - "name": "bridgeOperator", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ErrBridgeOperatorUpdateFailed", - "inputs": [ - { - "name": "bridgeOperator", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ErrContractTypeNotFound", - "inputs": [ - { - "name": "contractType", - "type": "uint8", - "internalType": "enum ContractType" - } - ] - }, - { - "type": "error", - "name": "ErrCurrentProposalIsNotCompleted", - "inputs": [] - }, - { - "type": "error", - "name": "ErrDuplicated", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrInsufficientGas", - "inputs": [ - { - "name": "proposalHash", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ErrInvalidArguments", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrInvalidChainId", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - }, - { - "name": "actual", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "expected", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ErrInvalidExpiryTimestamp", - "inputs": [] - }, - { - "type": "error", - "name": "ErrInvalidOrder", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrInvalidProposalNonce", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrInvalidThreshold", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrInvalidVoteWeight", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrLengthMismatch", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrOnlySelfCall", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrRelayFailed", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrUnauthorized", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - }, - { - "name": "expectedRole", - "type": "uint8", - "internalType": "enum RoleAccess" - } - ] - }, - { - "type": "error", - "name": "ErrUnsupportedInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - }, - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ErrUnsupportedVoteType", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrVoteIsFinalized", - "inputs": [] - }, - { - "type": "error", - "name": "ErrZeroAddress", - "inputs": [ - { - "name": "msgSig", - "type": "bytes4", - "internalType": "bytes4" - } - ] - }, - { - "type": "error", - "name": "ErrZeroCodeContract", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ] - } - ], - "address": "0x5396b75c9eb8D1153D2B8a0Bb9a8c4B1541f758d", - "args": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000007e500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba8e32d874948df4cbe72284de91cc4968293bce000000000000000000000000000000000000000000000000000000000000000100000000000000000000000045e8f1acfc89f45720cf11e807ed85b730c67c7e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "ast": "", - "blockNumber": 5632711, - "bytecode": "0x60a06040526040516200659938038062006599833981016040819052620000269162001523565b8181600160ff1b8c8c8c8c8c8c8c8c836200004181620001a3565b505060016000805160206200657983398151915255620000628888620002b2565b50620000729050600286620003c7565b604080516020808201839052600c60608301526b212924a223a2afa0a226a4a760a11b6080808401919091528284018a905283518084038201815260a0840185528051908301207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08501527f9d3fa1662ea89365eb7af36506f0ad5413bd7e078960d8481ff4718763aaa8e960e08501527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a56101008501526101208085019190915284518085039091018152610140909301909352815191012090526200015d81838562000471565b50505050505050505062000177816200089160201b60201c565b5062000185600030620008c4565b62000191828262000960565b5050505050505050505050506200196e565b606081620001b18162000a23565b8251806001600160401b03811115620001ce57620001ce62001334565b604051908082528060200260200182016040528015620001f8578160200160208202803683370190505b509250806000036200020b5750620002ac565b6000805160206200653983398151915260006314d72edb60e21b815b84811015620002a6578781815181106200024557620002456200165e565b60200260200101519250620002608362000a5f60201b60201c565b6200026c838362000a97565b62000278848462000c76565b8782815181106200028d576200028d6200165e565b9115156020928302919091019091015260010162000227565b50505050505b50919050565b60008082841115620002ea576040516387f6f09560e01b81526001600160e01b03196000351660048201526024015b60405180910390fd5b60008051602062006559833981519152549150620003267fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff5490565b90506200034160008051602062006559833981519152859055565b6200036b7fac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ff849055565b8284620003876000805160206200657983398151915262000c96565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111562000400576200040062001674565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111562000444576200044462001674565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60606200047f838362000cbe565b6200048a8162000a23565b82518551811480156200049d5750845181145b620004ca576040516306b5667560e21b81526001600160e01b0319600035166004820152602401620002e1565b806001600160401b03811115620004e557620004e562001334565b6040519080825280602002602001820160405280156200050f578160200160208202803683370190505b5092508060000362000522575062000889565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c917f8400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3917fd38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d917f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3919081908190815b89811015620007db578d8181518110620005e557620005e56200165e565b602002602001015194508c81815181106200060457620006046200165e565b602002602001015193506200061f8562000ddc60201b60201c565b6200062a8462000ddc565b8e81815181106200063f576200063f6200165e565b60200260200101516001600160601b03166000036200068057604051637f11b8a360e11b81526001600160e01b0319600035166004820152602401620002e1565b6200068c898662000e13565b806200069f57506200069f898562000e13565b80620006b25750620006b2878662000e13565b80620006c55750620006c5878562000e13565b158c8281518110620006db57620006db6200165e565b6020026020010190151590811515815250508b81815181106200070257620007026200165e565b602002602001015115620007d2576200071c898662000c76565b5062000729878562000c76565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f90829081106200077257620007726200165e565b6020908102919091018101516001600160601b03169083018190526200079990846200168a565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101620005c7565b50620008087f6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644c8362000e36565b5062000840635ebae8a060e01b8d8d6040516020016200082a92919062001728565b60408051601f1981840301815291905262000e50565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f6040516200087794939291906200175a565b60405180910390a15050505050505050505b509392505050565b600281905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b8060036000846004811115620008de57620008de62001674565b6004811115620008f257620008f262001674565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600481111562000933576200093362001674565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60005b825181101562000a1e57306001600160a01b03168282815181106200098c576200098c6200165e565b60200260200101516001600160a01b031603620009cb5760405163053265f160e01b81526001600160e01b0319600035166004820152602401620002e1565b62000a15838281518110620009e457620009e46200165e565b602002602001015183838151811062000a015762000a016200165e565b6020026020010151620008c460201b60201c565b60010162000963565b505050565b62000a2e816200118b565b1562000a5c57604051630d697db160e11b81526001600160e01b0319600035166004820152602401620002e1565b50565b806001600160a01b03163b60000362000a5c57604051630bfc64a360e21b81526001600160a01b0382166004820152602401620002e1565b6040516001600160e01b03198216602482015260009060440160408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169062000afb90859062001810565b600060405180830381855afa9150503d806000811462000b38576040519150601f19603f3d011682016040523d82523d6000602084013e62000b3d565b606091505b50915091508162000c1f57846001600160a01b03168360405160240162000b6591906200185c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525162000b9c919062001810565b600060405180830381855afa9150503d806000811462000bd9576040519150601f19603f3d011682016040523d82523d6000602084013e62000bde565b606091505b5090925090508162000c1f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b8080602001905181019062000c35919062001871565b62000c6f5760405163069d427960e11b81526001600160e01b0319851660048201526001600160a01b0386166024820152604401620002e1565b5050505050565b600062000c8d836001600160a01b03841662001236565b90505b92915050565b600062000ca1825490565b905062000cb98262000cb58360016200168a565b9055565b919050565b81518151606091908082016001600160401b0381111562000ce35762000ce362001334565b60405190808252806020026020018201604052801562000d0d578160200160208202803683370190505b50925060005b8281101562000d6f5785818151811062000d315762000d316200165e565b602002602001015184828151811062000d4e5762000d4e6200165e565b6001600160a01b039092166020928302919091019091015260010162000d13565b60005b8281101562000dd25785818151811062000d905762000d906200165e565b602002602001015185838151811062000dad5762000dad6200165e565b6001600160a01b03909216602092830291909101909101526001918201910162000d72565b5050505092915050565b6001600160a01b03811662000a5c5760405163104c66df60e31b81526001600160e01b0319600035166004820152602401620002e1565b6001600160a01b0381166000908152600183016020526040812054151562000c8d565b600062000c908362000e49818562001288565b9250829055565b600062000e6c60008051602062006539833981519152620012a8565b8051909150600081900362000e815750505050565b6000816001600160401b0381111562000e9e5762000e9e62001334565b60405190808252806020026020018201604052801562000ec8578160200160208202803683370190505b5090506000826001600160401b0381111562000ee85762000ee862001334565b60405190808252806020026020018201604052801562000f1d57816020015b606081526020019060019003908162000f075790505b5090506000868660405160200162000f3792919062001895565b604051602081830303815290604052905060008160405160240162000f5d91906200185c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015620011415786818151811062000faa5762000faa6200165e565b60200260200101516001600160a01b03168360405162000fcb919062001810565b6000604051808303816000865af19150503d80600081146200100a576040519150601f19603f3d011682016040523d82523d6000602084013e6200100f565b606091505b508683815181106200102557620010256200165e565b602002602001018684815181106200104157620010416200165e565b60200260200101829052821515151581525050508481815181106200106a576200106a6200165e565b602002602001015162001138578681815181106200108c576200108c6200165e565b60200260200101516001600160a01b031682604051620010ad919062001810565b6000604051808303816000865af19150503d8060008114620010ec576040519150601f19603f3d011682016040523d82523d6000602084013e620010f1565b606091505b508683815181106200110757620011076200165e565b602002602001018684815181106200112357620011236200165e565b60200260200101829052821515151581525050505b60010162000f8c565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051620011799493929190620018c8565b60405180910390a15050505050505050565b600081516000036200119f57506000919050565b60005b60018351038110156200122d57600181015b83518110156200122357838181518110620011d357620011d36200165e565b60200260200101516001600160a01b0316848381518110620011f957620011f96200165e565b60200260200101516001600160a01b0316036200121a575060019392505050565b600101620011b4565b50600101620011a2565b50600092915050565b60008181526001830160205260408120546200127f5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000c90565b50600062000c90565b815481018181101562000c9057634e487b7160005260116020526024601cfd5b60606000620012b783620012be565b9392505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156200131057602002820191906000526020600020905b815481526020019060010190808311620012fb575b50505050509050919050565b80516001600160a01b038116811462000cb957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562001375576200137562001334565b604052919050565b60006001600160401b0382111562001399576200139962001334565b5060051b60200190565b600082601f830112620013b557600080fd5b81516020620013ce620013c8836200137d565b6200134a565b8083825260208201915060208460051b870101935086841115620013f157600080fd5b602086015b8481101562001418576200140a816200131c565b8352918301918301620013f6565b509695505050505050565b600082601f8301126200143557600080fd5b8151602062001448620013c8836200137d565b8083825260208201915060208460051b8701019350868411156200146b57600080fd5b602086015b84811015620014185780516001600160601b0381168114620014925760008081fd5b835291830191830162001470565b600082601f830112620014b257600080fd5b81516020620014c5620013c8836200137d565b80838252602082019150600560208560051b880101945087851115620014ea57600080fd5b602087015b8581101562001516578051828110620015085760008081fd5b8452928401928401620014ef565b5090979650505050505050565b6000806000806000806000806000806101408b8d0312156200154457600080fd5b8a51995060208b0151985060408b015197506200156460608c016200131c565b60808c01519097506001600160401b03808211156200158257600080fd5b620015908e838f01620013a3565b975060a08d0151915080821115620015a757600080fd5b620015b58e838f01620013a3565b965060c08d0151915080821115620015cc57600080fd5b620015da8e838f01620013a3565b955060e08d0151915080821115620015f157600080fd5b620015ff8e838f0162001423565b94506101008d01519150808211156200161757600080fd5b620016258e838f01620014a0565b93506101208d01519150808211156200163d57600080fd5b506200164c8d828e01620013a3565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b8082018082111562000c9057634e487b7160e01b600052601160045260246000fd5b60008151808452602080850194506020840160005b83811015620016e85781516001600160a01b031687529582019590820190600101620016c1565b509495945050505050565b60008151808452602080850194506020840160005b83811015620016e857815115158752958201959082019060010162001708565b6040815260006200173d6040830185620016ac565b8281036020840152620017518185620016f3565b95945050505050565b6080815260006200176f6080830187620016f3565b82810360208481019190915286518083528782019282019060005b81811015620017b15784516001600160601b0316835293830193918301916001016200178a565b50508481036040860152620017c78188620016ac565b925050508281036060840152620017df8185620016ac565b979650505050505050565b60005b8381101562001807578181015183820152602001620017ed565b50506000910152565b6000825162001824818460208701620017ea565b9190910192915050565b6000815180845262001848816020860160208601620017ea565b601f01601f19169290920160200192915050565b60208152600062000c8d60208301846200182e565b6000602082840312156200188457600080fd5b81518015158114620012b757600080fd5b6001600160e01b0319831681528151600090620018ba816004850160208701620017ea565b919091016004019392505050565b608081526000620018dd60808301876200182e565b602083820381850152620018f28288620016ac565b91508382036040850152620019088287620016f3565b915083820360608501528185518084528284019150828160051b85010183880160005b838110156200195d57601f198784030185526200194a8383516200182e565b948601949250908501906001016200192b565b50909b9a5050505050505050505050565b608051614ba162001998600039600081816102c5015281816107c501526108510152614ba16000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b1461050c578063e75235b814610537578063e9c034981461053f578063f80b535214610552578063fdc4fa471461055a57600080fd5b8063cc7e6b3b146104be578063d0a50db0146104de578063d78392f8146104e6578063dafae408146104f957600080fd5b8063b9c36209116100e9578063b9c3620914610464578063bc9182fd1461048c578063bc96180b1461049f578063c441c4a8146104a757600080fd5b80639b19dbfd146103db5780639b2ee437146103e3578063b384abef146103f6578063b405aaf21461045157600080fd5b80633644e515116101925780637de5dedd116101615780637de5dedd14610332578063800eaab31461033a578063865e6fd31461034d578063901979d51461036057600080fd5b80633644e515146102c05780635e05cf9e146102e7578063776fb1ec146102fc5780637d465f791461031f57600080fd5b80631f425338116101ce5780631f425338146102675780632d6d7d731461027a57806334d5f37b1461028d57806335da8121146102ad57600080fd5b806301a5f43f1461020057806306aba0e1146102295780630a44fa431461023f5780630f7c318914610252575b600080fd5b61021361020e366004613b79565b61056d565b6040516102209190613c50565b60405180910390f35b610231610620565b604051908152602001610220565b61023161024d366004613c63565b61063d565b61025a6106c2565b6040516102209190613cde565b610213610275366004613c63565b6106db565b61025a610288366004613c63565b610728565b61023161029b366004613cf1565b60006020819052908152604090205481565b6102136102bb366004613c63565b61076c565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6102f5366004613d4e565b6107b2565b005b61030f61030a366004613cf1565b6107f1565b6040519015158152602001610220565b6102fa61032d366004613dea565b61083e565b610231610876565b6102fa610348366004613fe8565b6108f2565b6102fa61035b36600461405a565b610937565b6103c361036e36600461408d565b6001600160a01b039081166000908152600080516020614b0c83398151915260209081526040808320549093168252600080516020614aec83398151915290522054600160a01b90046001600160601b031690565b6040516001600160601b039091168152602001610220565b61025a610952565b6102fa6103f136600461408d565b61095c565b6104406104043660046140a8565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102209594939291906140f0565b61030f61045f36600461408d565b610af3565b6104776104723660046140a8565b610b0d565b60408051928352602083019190915201610220565b61025a61049a36600461411e565b610b2e565b610231610c1f565b6104af610c2a565b6040516102209392919061418c565b6104d16104cc366004613c63565b610c54565b60405161022091906141cf565b610231610c92565b6103c36104f436600461408d565b610cab565b61030f610507366004613cf1565b610cb6565b61051f61051a3660046141e2565b610cf3565b6040516001600160a01b039091168152602001610220565b610477610d6e565b61021361054d366004613c63565b610d9f565b61025a610de5565b61025a610568366004613c63565b610def565b6060610577610ed6565b61061587878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250610f0692505050565b979650505050505050565b6000610638600080516020614b4c8339815191525490565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061067e92508391506112829050565b6106ba8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112ba92505050565b949350505050565b6060610638600080516020614a8c83398151915261133e565b60606106e5610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061134b92505050565b9392505050565b606061072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611416915050565b92915050565b6060610776610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b6107bb33611662565b6107ea85858585857f0000000000000000000000000000000000000000000000000000000000000000336116a4565b5050505050565b60008060008381527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff166004811115610836576108366140ca565b141592915050565b61084733611662565b6107ea85858585857f000000000000000000000000000000000000000000000000000000000000000033611749565b600061088e600080516020614aac8339815191525490565b60016108a6600080516020614aac8339815191525490565b6108d46108bf600080516020614b4c8339815191525490565b600080516020614acc833981519152906117a5565b6108de9190614213565b6108e89190614226565b6106389190614239565b333014610929576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b60405180910390fd5b61093382826117d0565b5050565b61093f610ed6565b6109488161187e565b61093382826118b4565b6060610638611958565b61096533611662565b61096e81611971565b336000908152600080516020614aec83398151915260208190526040909120546001600160a01b0390811690831681036109c657604051630669b93360e31b81526001600160a01b0384166004820152602401610920565b600080516020614b2c83398151915260006109e182846119a6565b80156109f257506109f282866119bb565b905080610a1d5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610920565b6001600160a01b038381166000818152600080516020614b0c8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610ab0906364b18d0960e11b906060015b6040516020818303038152906040526119d0565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b6000610766600080516020614b2c83398151915283611cd8565b600080610b18610ed6565b610b228484611cfa565b915091505b9250929050565b8051606090806001600160401b03811115610b4b57610b4b613e2d565b604051908082528060200260200182016040528015610b74578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110610ba657610ba6614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b0316848281518110610bf757610bf7614270565b6001600160a01b0390921660209283029190910190910152600101610b89565b505050919050565b600061063860025490565b6060806060610c37611def565b9250610c4283610b2e565b9150610c4d83611e1a565b9050909192565b6060610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e1a92505050565b6000610638600080516020614b2c833981519152611f03565b600061076682611f0d565b6000610cd16108bf600080516020614b4c8339815191525490565b600080516020614aac83398151915254610ceb9084614286565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610d2a57610d2a6140ca565b60ff1681526020810191909152604001600020546001600160a01b0316905080610d69578160405163409140df60e11b8152600401610920919061429d565b919050565b600080610d87600080516020614acc8339815191525490565b600080516020614aac83398151915254915091509091565b6060610da9610ed6565b610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611f4592505050565b6060610638611def565b606081806001600160401b03811115610e0a57610e0a613e2d565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b509150600080516020614b0c83398151915260005b82811015610ecd57816000878784818110610e6557610e65614270565b9050602002016020810190610e7a919061408d565b6001600160a01b0390811682526020820192909252604001600020548551911690859083908110610ead57610ead614270565b6001600160a01b0390921660209283029190910190910152600101610e48565b50505092915050565b333014610f04576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b565b6060610f12838361222a565b610f1b81611282565b8251855181148015610f2d5750845181145b610f58576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b806001600160401b03811115610f7057610f70613e2d565b604051908082528060200260200182016040528015610f99578160200160208202803683370190505b50925080600003610faa575061127a565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b0c83398151915291600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156111fb578d818151811061103357611033614270565b602002602001015194508c818151811061104f5761104f614270565b6020026020010151935061106285611971565b61106b84611971565b8e818151811061107d5761107d614270565b60200260200101516001600160601b03166000036110bc576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b6110c68986611cd8565b806110d657506110d68985611cd8565b806110e657506110e68786611cd8565b806110f657506110f68785611cd8565b158c828151811061110957611109614270565b6020026020010190151590811515815250508b818151811061112d5761112d614270565b6020026020010151156111f35761114489866119bb565b5061114f87856119bb565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f908290811061119557611195614270565b6020908102919091018101516001600160601b03169083018190526111ba9084614213565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611019565b50611214600080516020614b4c83398151915283612334565b50611233635ebae8a060e01b8d8d604051602001610a9c9291906142b7565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161126894939291906142e5565b60405180910390a15050505050505050505b509392505050565b61128b8161234b565b156112b7576000356001600160e01b031916604051630d697db160e11b8152600401610920919061425b565b50565b6000816112c681611282565b600080516020614aec83398151915260005b8451811015610c17578160008683815181106112f6576112f6614270565b6020908102919091018101516001600160a01b031682528101919091526040016000205461133490600160a01b90046001600160601b031685614213565b93506001016112d8565b60606000610721836123ea565b60608161135781611282565b8251806001600160401b0381111561137157611371613e2d565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b509250600080516020614a8c83398151915260005b8281101561140d576113e38682815181106113cc576113cc614270565b6020026020010151836119a690919063ffffffff16565b8582815181106113f5576113f5614270565b911515602092830291909101909101526001016113af565b50505050919050565b606082516001600160401b0381111561143157611431613e2d565b60405190808252806020026020018201604052801561145a578160200160208202803683370190505b50905060005b8351811015611569576003600085838151811061147f5761147f614270565b60200260200101516004811115611498576114986140ca565b60048111156114a9576114a96140ca565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114dd576114dd614270565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611535575060006001600160a01b031682828151811061152257611522614270565b60200260200101516001600160a01b0316145b15611561576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b600101611460565b5092915050565b60608161157c81611282565b8251806001600160401b0381111561159657611596613e2d565b6040519080825280602002602001820160405280156115bf578160200160208202803683370190505b509250806000036115d0575061165c565b600080516020614a8c83398151915260006314d72edb60e21b815b848110156116565787818151811061160557611605614270565b602002602001015192506116188361187e565b6116228383612446565b61162c84846119bb565b87828151811061163e5761163e614270565b911515602092830291909101909101526001016115eb565b50505050505b50919050565b61166b81611f0d565b6001600160601b03166000036112b7576000356001600160e01b0319166003604051620f948f60ea1b8152600401610920929190614332565b6116b66116b0886144a3565b826125d9565b5060006116ca6116c5896144a3565b6126df565b905061173f6116d8896144a3565b8888888861172b896116eb89600061281e565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b61173a8a6116eb8a600161281e565b612857565b5050505050505050565b600061175d61175789614577565b83612c4e565b9050600061177261176d8a614577565b612d98565b905061179a828989898961178b8a6116eb89600061281e565b61173a8b6116eb8a600161281e565b505050505050505050565b600082548015611569578281029150808204831461156957634e487b7160005260116020526024601cfd5b60005b825181101561187957306001600160a01b03168282815181106117f8576117f8614270565b60200260200101516001600160a01b031603611835576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b61187183828151811061184a5761184a614270565b602002602001015183838151811061186457611864614270565b6020026020010151612ecf565b6001016117d3565b505050565b806001600160a01b03163b6000036112b757604051630bfc64a360e21b81526001600160a01b0382166004820152602401610920565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156118ea576118ea6140ca565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561192b5761192b6140ca565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6060610638600080516020614b2c83398151915261133e565b6001600160a01b0381166112b7576000356001600160e01b03191660405163104c66df60e31b8152600401610920919061425b565b6000610721836001600160a01b038416612f62565b6000610721836001600160a01b038416613055565b60006119e9600080516020614a8c83398151915261133e565b805190915060008190036119fd5750505050565b6000816001600160401b03811115611a1757611a17613e2d565b604051908082528060200260200182016040528015611a40578160200160208202803683370190505b5090506000826001600160401b03811115611a5d57611a5d613e2d565b604051908082528060200260200182016040528015611a9057816020015b6060815260200190600190039081611a7b5790505b50905060008686604051602001611aa8929190614665565b6040516020818303038152906040529050600081604051602401611acc91906146c2565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015611c9057868181518110611b1557611b15614270565b60200260200101516001600160a01b031683604051611b3491906146d5565b6000604051808303816000865af19150503d8060008114611b71576040519150601f19603f3d011682016040523d82523d6000602084013e611b76565b606091505b50868381518110611b8957611b89614270565b60200260200101868481518110611ba257611ba2614270565b6020026020010182905282151515158152505050848181518110611bc857611bc8614270565b6020026020010151611c8857868181518110611be657611be6614270565b60200260200101516001600160a01b031682604051611c0591906146d5565b6000604051808303816000865af19150503d8060008114611c42576040519150601f19603f3d011682016040523d82523d6000602084013e611c47565b606091505b50868381518110611c5a57611c5a614270565b60200260200101868481518110611c7357611c73614270565b60200260200101829052821515151581525050505b600101611afb565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051611cc6949392919061473e565b60405180910390a15050505050505050565b6001600160a01b03811660009081526001830160205260408120541515610721565b60008082841115611d2c576000356001600160e01b0319166040516387f6f09560e01b8152600401610920919061425b565b600080516020614acc833981519152549150611d54600080516020614aac8339815191525490565b9050611d6d600080516020614acc833981519152859055565b611d84600080516020614aac833981519152849055565b8284611daf7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6130a8565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606106387f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61133e565b8051606090806001600160401b03811115611e3757611e37613e2d565b604051908082528060200260200182016040528015611e60578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110611e9257611e92614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b0316848281518110611ee357611ee3614270565b6001600160601b0390921660209283029190910190910152600101611e75565b6000610766825490565b6001600160a01b03166000908152600080516020614aec8339815191526020526040902054600160a01b90046001600160601b031690565b606081611f5181611282565b8251806001600160401b03811115611f6b57611f6b613e2d565b604051908082528060200260200182016040528015611f94578160200160208202803683370190505b50925080600003611fa5575061165c565b60408051808201909152600080825260208201819052600080516020614b0c833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156121aa578c818151811061202e5761202e614270565b6020908102919091018101516001600160a01b038082166000908152928c90526040909220549091169550935061206485611971565b61206d84611971565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b031691830191909152909350908516146120e1576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b6120eb8785611cd8565b80156120fc57506120fc8886611cd8565b8c828151811061210e5761210e614270565b6020026020010190151590811515815250508b818151811061213257612132614270565b6020026020010151156121a25761214988866119a6565b5061215487856119a6565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b031916905592881682528881529181205582015161219f906001600160601b031684614213565b92505b600101612014565b506121c3600080516020614b4c833981519152836130c3565b506121e263c48549de60e01b8d8d604051602001610a9c9291906142b7565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d60405161221392919061478b565b60405180910390a150505050505050505050919050565b81518151606091908082016001600160401b0381111561224c5761224c613e2d565b604051908082528060200260200182016040528015612275578160200160208202803683370190505b50925060005b828110156122cf5785818151811061229557612295614270565b60200260200101518482815181106122af576122af614270565b6001600160a01b039092166020928302919091019091015260010161227b565b60005b8281101561232a578581815181106122ec576122ec614270565b602002602001015185838151811061230657612306614270565b6001600160a01b0390921660209283029190910190910152600191820191016122d2565b5050505092915050565b60006107668361234485856130d3565b9250829055565b6000815160000361235e57506000919050565b60005b60018351038110156123e157600181015b83518110156123d85783818151811061238d5761238d614270565b60200260200101516001600160a01b03168483815181106123b0576123b0614270565b60200260200101516001600160a01b0316036123d0575060019392505050565b600101612372565b50600101612361565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561243a57602002820191906000526020600020905b815481526020019060010190808311612426575b50505050509050919050565b600081604051602401612459919061425b565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906124a29085906146d5565b600060405180830381855afa9150503d80600081146124dd576040519150601f19603f3d011682016040523d82523d6000602084013e6124e2565b606091505b5091509150816125a457846001600160a01b03168360405160240161250791906146c2565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161253c91906146d5565b600060405180830381855afa9150503d8060008114612577576040519150601f19603f3d011682016040523d82523d6000602084013e61257c565b606091505b509092509050816125a457838560405163069d427960e11b81526004016109209291906147b0565b808060200190518101906125b891906147d3565b6107ea57838560405163069d427960e11b81526004016109209291906147b0565b602082015160009080820361261b5760405163092048d160e11b8152600080356001600160e01b03191660048301526024820152466044820152606401610920565b6002546126299085906130f2565b6000612634856126df565b905061263f82613193565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461269b576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516126cf9291906148e2565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561270d5761270d613e2d565b604051908082528060200260200182016040528015612736578160200160208202803683370190505b5060c086015190915060005b8251811015612795578660a00151818151811061276157612761614270565b60200260200101518051906020012083828151811061278257612782614270565b6020908102919091010152600101612742565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061286557508483145b612890576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b60008080856001600160401b038111156128ac576128ac613e2d565b6040519080825280602002602001820160405280156128d5578160200160208202803683370190505b5090506000866001600160401b038111156128f2576128f2613e2d565b60405190808252806020026020018201604052801561291b578160200160208202803683370190505b50905060008060003660005b8b811015612aac578c8c8281811061294157612941614270565b90506060020191508e8e8281811061295b5761295b614270565b9050602002016020810190612970919061490c565b92506000836001811115612986576129866140ca565b036129f0576129ab8b61299c602085018561492d565b8460200135856040013561322f565b945084878a6129b981614950565b9b50815181106129cb576129cb614270565b60200260200101906001600160a01b031690816001600160a01b031681525050612a61565b6001836001811115612a0457612a046140ca565b03612a3a57612a1a8a61299c602085018561492d565b9450848689612a2881614950565b9a50815181106129cb576129cb614270565b6000356001600160e01b031916604051630612418f60e11b8152600401610920919061425b565b846001600160a01b0316846001600160a01b031610612aa1576000356001600160e01b031916604051635d3dcd3160e01b8152600401610920919061425b565b849350600101612927565b50505085845250508281526020808c015160009081526001825260408082208e51835290925290812090612ade613257565b90506000612aeb85613261565b9050818110612b725780600003612b23576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b66838f61326c565b50505050505050612c45565b600082612b7d6132d9565b612b879190614226565b612b92906001614213565b90506000612b9f86613261565b9050818110612c1e5780600003612bd7576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050612c45565b6000356001600160e01b031916604051634ccfe64360e11b8152600401610920919061425b565b50505050505050565b612c8e6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b612ca7612ca084604001516001611416565b84906132e3565b9050612cbe600254826130f290919063ffffffff16565b6000612cc9826126df565b90506000612cd76000613193565b60008181527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602090815260409091209087015160018201859055600690910155905082518114612d49576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85612d7689612d98565b8989604051612d889493929190614969565b60405180910390a3505092915050565b60608101516040820151608083015151600092919083906001600160401b03811115612dc657612dc6613e2d565b604051908082528060200260200182016040528015612def578160200160208202803683370190505b5060a086015190915060005b8251811015612e4e5786608001518181518110612e1a57612e1a614270565b602002602001015180519060200120838281518110612e3b57612e3b614270565b6020908102919091010152600101612dfb565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b8060036000846004811115612ee657612ee66140ca565b6004811115612ef757612ef76140ca565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826004811115612f3557612f356140ca565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6000818152600183016020526040812054801561304b576000612f86600183614226565b8554909150600090612f9a90600190614226565b9050818114612fff576000866000018281548110612fba57612fba614270565b9060005260206000200154905080876000018481548110612fdd57612fdd614270565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061301057613010614a50565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610766565b6000915050610766565b600081815260018301602052604081205461309c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610766565b506000610766565b9055565b60006130b2825490565b9050610d69826130a4836001614213565b600061076683612344858561340d565b815481018181101561076657634e487b7160005260116020526024601cfd5b60008260600151511180156131105750816080015151826060015151145b801561312557508160a0015151826060015151145b801561313a57508160c0015151826060015151145b613165576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b61316f8142614213565b826040015111156109335760405163ad89be9d60e01b815260040160405180910390fd5b600081815260208190526040812054908190036131c25750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906000825460ff1660048111156131f4576131f46140ca565b036132125760405163757a436360e01b815260040160405180910390fd5b505050600090815260208190526040902080546001019081905590565b6000806000613240878787876135e8565b9150915061324d816136d5565b5095945050505050565b6000610638610876565b6000610766826112ba565b6132758161388b565b1561093357815460ff19166002178255600080613291836138a5565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba83836040516132cb929190614a66565b60405180910390a250505050565b6000610638610620565b6133236040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561335a5761335a613e2d565b604051908082528060200260200182016040528015613383578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b836040015151811015611569578281815181106133cf576133cf614270565b6020026020010151826060015182815181106133ed576133ed614270565b6001600160a01b03909216602092830291909101909101526001016133b0565b600082548281101561342c57634e487b7160005260116020526024601cfd5b9190910392915050565b60048301548110156134e95782600801600084600401838154811061345d5761345d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106134a6576134a6614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613436565b5060005b60058301548110156135a05782600801600084600501838154811061351457613514614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600584018054600786019291908490811061355d5761355d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016134ed565b50815460ff1916825560006001830181905560028301819055600383018190556135ce906004840190613b03565b6135dc600583016000613b03565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136cc565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136cc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561369c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136c5576000600192509250506136cc565b9150600090505b94509492505050565b60008160048111156136e9576136e96140ca565b036136f15750565b6001816004811115613705576137056140ca565b036137525760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610920565b6002816004811115613766576137666140ca565b036137b35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610920565b60038160048111156137c7576137c76140ca565b0361381f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610920565b6004816004811115613833576138336140ca565b036112b75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610920565b600081602001516000148061076657505060200151461490565b6060806138b18361388b565b6138ef57602083015160405163092048d160e11b81526000356001600160e01b03191660048201526024810191909152466044820152606401610920565b8260600151516001600160401b0381111561390c5761390c613e2d565b604051908082528060200260200182016040528015613935578160200160208202803683370190505b5091508260600151516001600160401b0381111561395557613955613e2d565b60405190808252806020026020018201604052801561398857816020015b60608152602001906001900390816139735790505b50905060005b836060015151811015613afd578360c0015181815181106139b1576139b1614270565b60200260200101515a116139e4576139c8846126df565b6040516307aec4ab60e21b815260040161092091815260200190565b836060015181815181106139fa576139fa614270565b60200260200101516001600160a01b031684608001518281518110613a2157613a21614270565b60200260200101518560c001518381518110613a3f57613a3f614270565b6020026020010151908660a001518481518110613a5e57613a5e614270565b6020026020010151604051613a7391906146d5565b600060405180830381858888f193505050503d8060008114613ab1576040519150601f19603f3d011682016040523d82523d6000602084013e613ab6565b606091505b50848381518110613ac957613ac9614270565b60200260200101848481518110613ae257613ae2614270565b6020908102919091010191909152901515905260010161398e565b50915091565b50805460008255906000526020600020908101906112b791905b80821115613b315760008155600101613b1d565b5090565b60008083601f840112613b4757600080fd5b5081356001600160401b03811115613b5e57600080fd5b6020830191508360208260051b8501011115610b2757600080fd5b60008060008060008060608789031215613b9257600080fd5b86356001600160401b0380821115613ba957600080fd5b613bb58a838b01613b35565b90985096506020890135915080821115613bce57600080fd5b613bda8a838b01613b35565b90965094506040890135915080821115613bf357600080fd5b50613c0089828a01613b35565b979a9699509497509295939492505050565b60008151808452602080850194506020840160005b83811015613c45578151151587529582019590820190600101613c27565b509495945050505050565b6020815260006107216020830184613c12565b60008060208385031215613c7657600080fd5b82356001600160401b03811115613c8c57600080fd5b613c9885828601613b35565b90969095509350505050565b60008151808452602080850194506020840160005b83811015613c455781516001600160a01b031687529582019590820190600101613cb9565b6020815260006107216020830184613ca4565b600060208284031215613d0357600080fd5b5035919050565b60008083601f840112613d1c57600080fd5b5081356001600160401b03811115613d3357600080fd5b602083019150836020606083028501011115610b2757600080fd5b600080600080600060608688031215613d6657600080fd5b85356001600160401b0380821115613d7d57600080fd5b9087019060e0828a031215613d9157600080fd5b90955060208701359080821115613da757600080fd5b613db389838a01613b35565b90965094506040880135915080821115613dcc57600080fd5b50613dd988828901613d0a565b969995985093965092949392505050565b600080600080600060608688031215613e0257600080fd5b85356001600160401b0380821115613e1957600080fd5b9087019060c0828a031215613d9157600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613e6557613e65613e2d565b60405290565b60405160c081016001600160401b0381118282101715613e6557613e65613e2d565b604051601f8201601f191681016001600160401b0381118282101715613eb557613eb5613e2d565b604052919050565b60006001600160401b03821115613ed657613ed6613e2d565b5060051b60200190565b600082601f830112613ef157600080fd5b81356020613f06613f0183613ebd565b613e8d565b80838252602082019150600560208560051b880101945087851115613f2a57600080fd5b602087015b85811015613f53578035828110613f465760008081fd5b8452928401928401613f2f565b5090979650505050505050565b80356001600160a01b0381168114610d6957600080fd5b600082601f830112613f8857600080fd5b81356020613f98613f0183613ebd565b8083825260208201915060208460051b870101935086841115613fba57600080fd5b602086015b84811015613fdd57613fd081613f60565b8352918301918301613fbf565b509695505050505050565b60008060408385031215613ffb57600080fd5b82356001600160401b038082111561401257600080fd5b61401e86838701613ee0565b9350602085013591508082111561403457600080fd5b5061404185828601613f77565b9150509250929050565b803560108110610d6957600080fd5b6000806040838503121561406d57600080fd5b6140768361404b565b915061408460208401613f60565b90509250929050565b60006020828403121561409f57600080fd5b61072182613f60565b600080604083850312156140bb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600581106112b7576112b76140ca565b60a081016140fd876140e0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561413057600080fd5b81356001600160401b0381111561414657600080fd5b6106ba84828501613f77565b60008151808452602080850194506020840160005b83811015613c455781516001600160601b031687529582019590820190600101614167565b60608152600061419f6060830186613ca4565b82810360208401526141b18186613ca4565b905082810360408401526141c58185614152565b9695505050505050565b6020815260006107216020830184614152565b6000602082840312156141f457600080fd5b6107218261404b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610766576107666141fd565b81810381811115610766576107666141fd565b60008261425657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610766576107666141fd565b60208101601083106142b1576142b16140ca565b91905290565b6040815260006142ca6040830185613ca4565b82810360208401526142dc8185613c12565b95945050505050565b6080815260006142f86080830187613c12565b828103602084015261430a8187614152565b9050828103604084015261431e8186613ca4565b905082810360608401526106158185613ca4565b6001600160e01b03198316815260408101600b8310614353576143536140ca565b8260208301529392505050565b600082601f83011261437157600080fd5b81356020614381613f0183613ebd565b8083825260208201915060208460051b8701019350868411156143a357600080fd5b602086015b84811015613fdd57803583529183019183016143a8565b6000601f83601f8401126143d257600080fd5b823560206143e2613f0183613ebd565b82815260059290921b8501810191818101908784111561440157600080fd5b8287015b848110156144975780356001600160401b03808211156144255760008081fd5b818a0191508a603f83011261443a5760008081fd5b8582013560408282111561445057614450613e2d565b614461828b01601f19168901613e8d565b92508183528c818386010111156144785760008081fd5b8181850189850137506000908201870152845250918301918301614405565b50979650505050505050565b600060e082360312156144b557600080fd5b6144bd613e43565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156144ef57600080fd5b6144fb36838701613f77565b6060840152608085013591508082111561451457600080fd5b61452036838701614360565b608084015260a085013591508082111561453957600080fd5b614545368387016143bf565b60a084015260c085013591508082111561455e57600080fd5b5061456b36828601614360565b60c08301525092915050565b600060c0823603121561458957600080fd5b614591613e6b565b823581526020830135602082015260408301356001600160401b03808211156145b957600080fd5b6145c536838701613ee0565b604084015260608501359150808211156145de57600080fd5b6145ea36838701614360565b6060840152608085013591508082111561460357600080fd5b61460f368387016143bf565b608084015260a085013591508082111561462857600080fd5b5061463536828601614360565b60a08301525092915050565b60005b8381101561465c578181015183820152602001614644565b50506000910152565b6001600160e01b0319831681528151600090614688816004850160208701614641565b919091016004019392505050565b600081518084526146ae816020860160208601614641565b601f01601f19169290920160200192915050565b6020815260006107216020830184614696565b600082516146e7818460208701614641565b9190910192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015613f5357601f1986840301895261472c838351614696565b98840198925090830190600101614710565b6080815260006147516080830187614696565b82810360208401526147638187613ca4565b905082810360408401526147778186613c12565b9050828103606084015261061581856146f1565b60408152600061479e6040830185613c12565b82810360208401526142dc8185613ca4565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082840312156147e557600080fd5b8151801515811461072157600080fd5b60008151808452602080850194506020840160005b83811015613c455781518752958201959082019060010161480a565b600060e0830182518452602080840151602086015260408401516040860152606084015160e0606087015282815180855261010088019150602083019450600092505b808310156148925784516001600160a01b03168252938301936001929092019190830190614869565b506080860151935086810360808801526148ac81856147f5565b935050505060a083015184820360a08601526148c882826146f1565b91505060c083015184820360c08601526142dc82826147f5565b6040815260006148f56040830185614826565b905060018060a01b03831660208301529392505050565b60006020828403121561491e57600080fd5b81356002811061072157600080fd5b60006020828403121561493f57600080fd5b813560ff8116811461072157600080fd5b600060018201614962576149626141fd565b5060010190565b60808152600061497c6080830187614826565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156149e65783516149d0816140e0565b82529284019260019290920191908401906149bd565b50606089015193508481036060860152614a0081856147f5565b935050505060808601518282036080840152614a1c82826146f1565b91505060a086015182820360a0840152614a3682826147f5565b93505050506142dc60608301846001600160a01b03169052565b634e487b7160e01b600052603160045260246000fd5b604081526000614a796040830185613c12565b82810360208401526142dc81856146f156fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca2646970667358221220cb0e92b2033c9131bafd8c90a491e8241ace110667169406b1c1a69bc857723964736f6c634300081700335da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240c55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d", - "chainId": 11155111, - "contractAbsolutePath": "MainchainBridgeManager.sol", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b1461050c578063e75235b814610537578063e9c034981461053f578063f80b535214610552578063fdc4fa471461055a57600080fd5b8063cc7e6b3b146104be578063d0a50db0146104de578063d78392f8146104e6578063dafae408146104f957600080fd5b8063b9c36209116100e9578063b9c3620914610464578063bc9182fd1461048c578063bc96180b1461049f578063c441c4a8146104a757600080fd5b80639b19dbfd146103db5780639b2ee437146103e3578063b384abef146103f6578063b405aaf21461045157600080fd5b80633644e515116101925780637de5dedd116101615780637de5dedd14610332578063800eaab31461033a578063865e6fd31461034d578063901979d51461036057600080fd5b80633644e515146102c05780635e05cf9e146102e7578063776fb1ec146102fc5780637d465f791461031f57600080fd5b80631f425338116101ce5780631f425338146102675780632d6d7d731461027a57806334d5f37b1461028d57806335da8121146102ad57600080fd5b806301a5f43f1461020057806306aba0e1146102295780630a44fa431461023f5780630f7c318914610252575b600080fd5b61021361020e366004613b79565b61056d565b6040516102209190613c50565b60405180910390f35b610231610620565b604051908152602001610220565b61023161024d366004613c63565b61063d565b61025a6106c2565b6040516102209190613cde565b610213610275366004613c63565b6106db565b61025a610288366004613c63565b610728565b61023161029b366004613cf1565b60006020819052908152604090205481565b6102136102bb366004613c63565b61076c565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6102f5366004613d4e565b6107b2565b005b61030f61030a366004613cf1565b6107f1565b6040519015158152602001610220565b6102fa61032d366004613dea565b61083e565b610231610876565b6102fa610348366004613fe8565b6108f2565b6102fa61035b36600461405a565b610937565b6103c361036e36600461408d565b6001600160a01b039081166000908152600080516020614b0c83398151915260209081526040808320549093168252600080516020614aec83398151915290522054600160a01b90046001600160601b031690565b6040516001600160601b039091168152602001610220565b61025a610952565b6102fa6103f136600461408d565b61095c565b6104406104043660046140a8565b600160208181526000938452604080852090915291835291208054918101546002820154600383015460069093015460ff909416939192909185565b6040516102209594939291906140f0565b61030f61045f36600461408d565b610af3565b6104776104723660046140a8565b610b0d565b60408051928352602083019190915201610220565b61025a61049a36600461411e565b610b2e565b610231610c1f565b6104af610c2a565b6040516102209392919061418c565b6104d16104cc366004613c63565b610c54565b60405161022091906141cf565b610231610c92565b6103c36104f436600461408d565b610cab565b61030f610507366004613cf1565b610cb6565b61051f61051a3660046141e2565b610cf3565b6040516001600160a01b039091168152602001610220565b610477610d6e565b61021361054d366004613c63565b610d9f565b61025a610de5565b61025a610568366004613c63565b610def565b6060610577610ed6565b61061587878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250610f0692505050565b979650505050505050565b6000610638600080516020614b4c8339815191525490565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061067e92508391506112829050565b6106ba8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112ba92505050565b949350505050565b6060610638600080516020614a8c83398151915261133e565b60606106e5610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061134b92505050565b9392505050565b606061072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611416915050565b92915050565b6060610776610ed6565b61072183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b6107bb33611662565b6107ea85858585857f0000000000000000000000000000000000000000000000000000000000000000336116a4565b5050505050565b60008060008381527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff166004811115610836576108366140ca565b141592915050565b61084733611662565b6107ea85858585857f000000000000000000000000000000000000000000000000000000000000000033611749565b600061088e600080516020614aac8339815191525490565b60016108a6600080516020614aac8339815191525490565b6108d46108bf600080516020614b4c8339815191525490565b600080516020614acc833981519152906117a5565b6108de9190614213565b6108e89190614226565b6106389190614239565b333014610929576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b60405180910390fd5b61093382826117d0565b5050565b61093f610ed6565b6109488161187e565b61093382826118b4565b6060610638611958565b61096533611662565b61096e81611971565b336000908152600080516020614aec83398151915260208190526040909120546001600160a01b0390811690831681036109c657604051630669b93360e31b81526001600160a01b0384166004820152602401610920565b600080516020614b2c83398151915260006109e182846119a6565b80156109f257506109f282866119bb565b905080610a1d5760405163080fab4b60e31b81526001600160a01b0386166004820152602401610920565b6001600160a01b038381166000818152600080516020614b0c8339815191526020818152604080842080546001600160a01b0319908116909155958b16808552818520805488163390811790915585528a8352938190208054909616841790955584519081019390935292820152610ab0906364b18d0960e11b906060015b6040516020818303038152906040526119d0565b6040516001600160a01b03808816919086169033907fcef34cd748f30a1b7a2f214fd1651779f79bc6c1be02785cad5c1f0ee877213d90600090a4505050505050565b6000610766600080516020614b2c83398151915283611cd8565b600080610b18610ed6565b610b228484611cfa565b915091505b9250929050565b8051606090806001600160401b03811115610b4b57610b4b613e2d565b604051908082528060200260200182016040528015610b74578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110610ba657610ba6614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b0316848281518110610bf757610bf7614270565b6001600160a01b0390921660209283029190910190910152600101610b89565b505050919050565b600061063860025490565b6060806060610c37611def565b9250610c4283610b2e565b9150610c4d83611e1a565b9050909192565b6060610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e1a92505050565b6000610638600080516020614b2c833981519152611f03565b600061076682611f0d565b6000610cd16108bf600080516020614b4c8339815191525490565b600080516020614aac83398151915254610ceb9084614286565b101592915050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610d2a57610d2a6140ca565b60ff1681526020810191909152604001600020546001600160a01b0316905080610d69578160405163409140df60e11b8152600401610920919061429d565b919050565b600080610d87600080516020614acc8339815191525490565b600080516020614aac83398151915254915091509091565b6060610da9610ed6565b610721838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611f4592505050565b6060610638611def565b606081806001600160401b03811115610e0a57610e0a613e2d565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b509150600080516020614b0c83398151915260005b82811015610ecd57816000878784818110610e6557610e65614270565b9050602002016020810190610e7a919061408d565b6001600160a01b0390811682526020820192909252604001600020548551911690859083908110610ead57610ead614270565b6001600160a01b0390921660209283029190910190910152600101610e48565b50505092915050565b333014610f04576000356001600160e01b0319166040516307337e1960e41b8152600401610920919061425b565b565b6060610f12838361222a565b610f1b81611282565b8251855181148015610f2d5750845181145b610f58576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b806001600160401b03811115610f7057610f70613e2d565b604051908082528060200260200182016040528015610f99578160200160208202803683370190505b50925080600003610faa575061127a565b604080518082019091526000808252602082018190527f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b0c83398151915291600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156111fb578d818151811061103357611033614270565b602002602001015194508c818151811061104f5761104f614270565b6020026020010151935061106285611971565b61106b84611971565b8e818151811061107d5761107d614270565b60200260200101516001600160601b03166000036110bc576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b6110c68986611cd8565b806110d657506110d68985611cd8565b806110e657506110e68786611cd8565b806110f657506110f68785611cd8565b158c828151811061110957611109614270565b6020026020010190151590811515815250508b818151811061112d5761112d614270565b6020026020010151156111f35761114489866119bb565b5061114f87856119bb565b506001600160a01b03848116600081815260208b90526040902080546001600160a01b0319169288169290921790915582528e518f908290811061119557611195614270565b6020908102919091018101516001600160601b03169083018190526111ba9084614213565b6001600160a01b038087166000908152602089815260409091208551918601516001600160601b0316600160a01b029190921617905592505b600101611019565b50611214600080516020614b4c83398151915283612334565b50611233635ebae8a060e01b8d8d604051602001610a9c9291906142b7565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b788b8f8f8f60405161126894939291906142e5565b60405180910390a15050505050505050505b509392505050565b61128b8161234b565b156112b7576000356001600160e01b031916604051630d697db160e11b8152600401610920919061425b565b50565b6000816112c681611282565b600080516020614aec83398151915260005b8451811015610c17578160008683815181106112f6576112f6614270565b6020908102919091018101516001600160a01b031682528101919091526040016000205461133490600160a01b90046001600160601b031685614213565b93506001016112d8565b60606000610721836123ea565b60608161135781611282565b8251806001600160401b0381111561137157611371613e2d565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b509250600080516020614a8c83398151915260005b8281101561140d576113e38682815181106113cc576113cc614270565b6020026020010151836119a690919063ffffffff16565b8582815181106113f5576113f5614270565b911515602092830291909101909101526001016113af565b50505050919050565b606082516001600160401b0381111561143157611431613e2d565b60405190808252806020026020018201604052801561145a578160200160208202803683370190505b50905060005b8351811015611569576003600085838151811061147f5761147f614270565b60200260200101516004811115611498576114986140ca565b60048111156114a9576114a96140ca565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114dd576114dd614270565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611535575060006001600160a01b031682828151811061152257611522614270565b60200260200101516001600160a01b0316145b15611561576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b600101611460565b5092915050565b60608161157c81611282565b8251806001600160401b0381111561159657611596613e2d565b6040519080825280602002602001820160405280156115bf578160200160208202803683370190505b509250806000036115d0575061165c565b600080516020614a8c83398151915260006314d72edb60e21b815b848110156116565787818151811061160557611605614270565b602002602001015192506116188361187e565b6116228383612446565b61162c84846119bb565b87828151811061163e5761163e614270565b911515602092830291909101909101526001016115eb565b50505050505b50919050565b61166b81611f0d565b6001600160601b03166000036112b7576000356001600160e01b0319166003604051620f948f60ea1b8152600401610920929190614332565b6116b66116b0886144a3565b826125d9565b5060006116ca6116c5896144a3565b6126df565b905061173f6116d8896144a3565b8888888861172b896116eb89600061281e565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b61173a8a6116eb8a600161281e565b612857565b5050505050505050565b600061175d61175789614577565b83612c4e565b9050600061177261176d8a614577565b612d98565b905061179a828989898961178b8a6116eb89600061281e565b61173a8b6116eb8a600161281e565b505050505050505050565b600082548015611569578281029150808204831461156957634e487b7160005260116020526024601cfd5b60005b825181101561187957306001600160a01b03168282815181106117f8576117f8614270565b60200260200101516001600160a01b031603611835576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b61187183828151811061184a5761184a614270565b602002602001015183838151811061186457611864614270565b6020026020010151612ecf565b6001016117d3565b505050565b806001600160a01b03163b6000036112b757604051630bfc64a360e21b81526001600160a01b0382166004820152602401610920565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156118ea576118ea6140ca565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561192b5761192b6140ca565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6060610638600080516020614b2c83398151915261133e565b6001600160a01b0381166112b7576000356001600160e01b03191660405163104c66df60e31b8152600401610920919061425b565b6000610721836001600160a01b038416612f62565b6000610721836001600160a01b038416613055565b60006119e9600080516020614a8c83398151915261133e565b805190915060008190036119fd5750505050565b6000816001600160401b03811115611a1757611a17613e2d565b604051908082528060200260200182016040528015611a40578160200160208202803683370190505b5090506000826001600160401b03811115611a5d57611a5d613e2d565b604051908082528060200260200182016040528015611a9057816020015b6060815260200190600190039081611a7b5790505b50905060008686604051602001611aa8929190614665565b6040516020818303038152906040529050600081604051602401611acc91906146c2565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015611c9057868181518110611b1557611b15614270565b60200260200101516001600160a01b031683604051611b3491906146d5565b6000604051808303816000865af19150503d8060008114611b71576040519150601f19603f3d011682016040523d82523d6000602084013e611b76565b606091505b50868381518110611b8957611b89614270565b60200260200101868481518110611ba257611ba2614270565b6020026020010182905282151515158152505050848181518110611bc857611bc8614270565b6020026020010151611c8857868181518110611be657611be6614270565b60200260200101516001600160a01b031682604051611c0591906146d5565b6000604051808303816000865af19150503d8060008114611c42576040519150601f19603f3d011682016040523d82523d6000602084013e611c47565b606091505b50868381518110611c5a57611c5a614270565b60200260200101868481518110611c7357611c73614270565b60200260200101829052821515151581525050505b600101611afb565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051611cc6949392919061473e565b60405180910390a15050505050505050565b6001600160a01b03811660009081526001830160205260408120541515610721565b60008082841115611d2c576000356001600160e01b0319166040516387f6f09560e01b8152600401610920919061425b565b600080516020614acc833981519152549150611d54600080516020614aac8339815191525490565b9050611d6d600080516020614acc833981519152859055565b611d84600080516020614aac833981519152849055565b8284611daf7f92872d32822c9d44b36a2537d3e0d4c46fc4de1ce154ccfaed560a8a58445f1d6130a8565b60408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b60606106387f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c61133e565b8051606090806001600160401b03811115611e3757611e37613e2d565b604051908082528060200260200182016040528015611e60578160200160208202803683370190505b509150600080516020614aec83398151915260005b82811015610c1757816000868381518110611e9257611e92614270565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160149054906101000a90046001600160601b0316848281518110611ee357611ee3614270565b6001600160601b0390921660209283029190910190910152600101611e75565b6000610766825490565b6001600160a01b03166000908152600080516020614aec8339815191526020526040902054600160a01b90046001600160601b031690565b606081611f5181611282565b8251806001600160401b03811115611f6b57611f6b613e2d565b604051908082528060200260200182016040528015611f94578160200160208202803683370190505b50925080600003611fa5575061165c565b60408051808201909152600080825260208201819052600080516020614b0c833981519152917f546f6b46ab35b030b6816596b352aef78857377176c8b24baa2046a62cf1998c91600080516020614b2c83398151915291600080516020614aec833981519152919081908190815b898110156121aa578c818151811061202e5761202e614270565b6020908102919091018101516001600160a01b038082166000908152928c90526040909220549091169550935061206485611971565b61206d84611971565b6001600160a01b0385811660009081526020888152604091829020825180840190935254808416808452600160a01b9091046001600160601b031691830191909152909350908516146120e1576000356001600160e01b03191660405163053265f160e01b8152600401610920919061425b565b6120eb8785611cd8565b80156120fc57506120fc8886611cd8565b8c828151811061210e5761210e614270565b6020026020010190151590811515815250508b818151811061213257612132614270565b6020026020010151156121a25761214988866119a6565b5061215487856119a6565b506001600160a01b03808516600090815260208b8152604080832080546001600160a01b031916905592881682528881529181205582015161219f906001600160601b031684614213565b92505b600101612014565b506121c3600080516020614b4c833981519152836130c3565b506121e263c48549de60e01b8d8d604051602001610a9c9291906142b7565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb863698b8d60405161221392919061478b565b60405180910390a150505050505050505050919050565b81518151606091908082016001600160401b0381111561224c5761224c613e2d565b604051908082528060200260200182016040528015612275578160200160208202803683370190505b50925060005b828110156122cf5785818151811061229557612295614270565b60200260200101518482815181106122af576122af614270565b6001600160a01b039092166020928302919091019091015260010161227b565b60005b8281101561232a578581815181106122ec576122ec614270565b602002602001015185838151811061230657612306614270565b6001600160a01b0390921660209283029190910190910152600191820191016122d2565b5050505092915050565b60006107668361234485856130d3565b9250829055565b6000815160000361235e57506000919050565b60005b60018351038110156123e157600181015b83518110156123d85783818151811061238d5761238d614270565b60200260200101516001600160a01b03168483815181106123b0576123b0614270565b60200260200101516001600160a01b0316036123d0575060019392505050565b600101612372565b50600101612361565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561243a57602002820191906000526020600020905b815481526020019060010190808311612426575b50505050509050919050565b600081604051602401612459919061425b565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906124a29085906146d5565b600060405180830381855afa9150503d80600081146124dd576040519150601f19603f3d011682016040523d82523d6000602084013e6124e2565b606091505b5091509150816125a457846001600160a01b03168360405160240161250791906146c2565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161253c91906146d5565b600060405180830381855afa9150503d8060008114612577576040519150601f19603f3d011682016040523d82523d6000602084013e61257c565b606091505b509092509050816125a457838560405163069d427960e11b81526004016109209291906147b0565b808060200190518101906125b891906147d3565b6107ea57838560405163069d427960e11b81526004016109209291906147b0565b602082015160009080820361261b5760405163092048d160e11b8152600080356001600160e01b03191660048301526024820152466044820152606401610920565b6002546126299085906130f2565b6000612634856126df565b905061263f82613193565b6000838152600160208181526040808420858552909152918290209188015190820184905560069091015592508451831461269b576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516126cf9291906148e2565b60405180910390a4505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561270d5761270d613e2d565b604051908082528060200260200182016040528015612736578160200160208202803683370190505b5060c086015190915060005b8251811015612795578660a00151818151811061276157612761614270565b60200260200101518051906020012083828151811061278257612782614270565b6020908102919091010152600101612742565b50604080517fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b841580159061286557508483145b612890576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b60008080856001600160401b038111156128ac576128ac613e2d565b6040519080825280602002602001820160405280156128d5578160200160208202803683370190505b5090506000866001600160401b038111156128f2576128f2613e2d565b60405190808252806020026020018201604052801561291b578160200160208202803683370190505b50905060008060003660005b8b811015612aac578c8c8281811061294157612941614270565b90506060020191508e8e8281811061295b5761295b614270565b9050602002016020810190612970919061490c565b92506000836001811115612986576129866140ca565b036129f0576129ab8b61299c602085018561492d565b8460200135856040013561322f565b945084878a6129b981614950565b9b50815181106129cb576129cb614270565b60200260200101906001600160a01b031690816001600160a01b031681525050612a61565b6001836001811115612a0457612a046140ca565b03612a3a57612a1a8a61299c602085018561492d565b9450848689612a2881614950565b9a50815181106129cb576129cb614270565b6000356001600160e01b031916604051630612418f60e11b8152600401610920919061425b565b846001600160a01b0316846001600160a01b031610612aa1576000356001600160e01b031916604051635d3dcd3160e01b8152600401610920919061425b565b849350600101612927565b50505085845250508281526020808c015160009081526001825260408082208e51835290925290812090612ade613257565b90506000612aeb85613261565b9050818110612b725780600003612b23576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b66838f61326c565b50505050505050612c45565b600082612b7d6132d9565b612b879190614226565b612b92906001614213565b90506000612b9f86613261565b9050818110612c1e5780600003612bd7576000356001600160e01b031916604051637f11b8a360e11b8152600401610920919061425b565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050612c45565b6000356001600160e01b031916604051634ccfe64360e11b8152600401610920919061425b565b50505050505050565b612c8e6040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b612ca7612ca084604001516001611416565b84906132e3565b9050612cbe600254826130f290919063ffffffff16565b6000612cc9826126df565b90506000612cd76000613193565b60008181527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602090815260409091209087015160018201859055600690910155905082518114612d49576000356001600160e01b03191660405163d4cec26960e01b8152600401610920919061425b565b81817f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85612d7689612d98565b8989604051612d889493929190614969565b60405180910390a3505092915050565b60608101516040820151608083015151600092919083906001600160401b03811115612dc657612dc6613e2d565b604051908082528060200260200182016040528015612def578160200160208202803683370190505b5060a086015190915060005b8251811015612e4e5786608001518181518110612e1a57612e1a614270565b602002602001015180519060200120838281518110612e3b57612e3b614270565b6020908102919091010152600101612dfb565b50604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413508152875160208083019190915297880151918101919091528351870293870193909320606084015283518602938601939093206080830152805185029085012060a082015281518402919093012060c08301525060e0902090565b8060036000846004811115612ee657612ee66140ca565b6004811115612ef757612ef76140ca565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826004811115612f3557612f356140ca565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6000818152600183016020526040812054801561304b576000612f86600183614226565b8554909150600090612f9a90600190614226565b9050818114612fff576000866000018281548110612fba57612fba614270565b9060005260206000200154905080876000018481548110612fdd57612fdd614270565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061301057613010614a50565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610766565b6000915050610766565b600081815260018301602052604081205461309c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610766565b506000610766565b9055565b60006130b2825490565b9050610d69826130a4836001614213565b600061076683612344858561340d565b815481018181101561076657634e487b7160005260116020526024601cfd5b60008260600151511180156131105750816080015151826060015151145b801561312557508160a0015151826060015151145b801561313a57508160c0015151826060015151145b613165576000356001600160e01b0319166040516306b5667560e21b8152600401610920919061425b565b61316f8142614213565b826040015111156109335760405163ad89be9d60e01b815260040160405180910390fd5b600081815260208190526040812054908190036131c25750600090815260208190526040902060019081905590565b60008281526001602090815260408083208484529091528120906000825460ff1660048111156131f4576131f46140ca565b036132125760405163757a436360e01b815260040160405180910390fd5b505050600090815260208190526040902080546001019081905590565b6000806000613240878787876135e8565b9150915061324d816136d5565b5095945050505050565b6000610638610876565b6000610766826112ba565b6132758161388b565b1561093357815460ff19166002178255600080613291836138a5565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba83836040516132cb929190614a66565b60405180910390a250505050565b6000610638610620565b6133236040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b82518152602080840151604080840191909152600091830191909152830151516001600160401b0381111561335a5761335a613e2d565b604051908082528060200260200182016040528015613383578160200160208202803683370190505b5060608083019190915283015160808083019190915283015160a08083019190915283015160c082015260005b836040015151811015611569578281815181106133cf576133cf614270565b6020026020010151826060015182815181106133ed576133ed614270565b6001600160a01b03909216602092830291909101909101526001016133b0565b600082548281101561342c57634e487b7160005260116020526024601cfd5b9190910392915050565b60048301548110156134e95782600801600084600401838154811061345d5761345d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106134a6576134a6614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613436565b5060005b60058301548110156135a05782600801600084600501838154811061351457613514614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600584018054600786019291908490811061355d5761355d614270565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016134ed565b50815460ff1916825560006001830181905560028301819055600383018190556135ce906004840190613b03565b6135dc600583016000613b03565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561361f57506000905060036136cc565b8460ff16601b1415801561363757508460ff16601c14155b1561364857506000905060046136cc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561369c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136c5576000600192509250506136cc565b9150600090505b94509492505050565b60008160048111156136e9576136e96140ca565b036136f15750565b6001816004811115613705576137056140ca565b036137525760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610920565b6002816004811115613766576137666140ca565b036137b35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610920565b60038160048111156137c7576137c76140ca565b0361381f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610920565b6004816004811115613833576138336140ca565b036112b75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610920565b600081602001516000148061076657505060200151461490565b6060806138b18361388b565b6138ef57602083015160405163092048d160e11b81526000356001600160e01b03191660048201526024810191909152466044820152606401610920565b8260600151516001600160401b0381111561390c5761390c613e2d565b604051908082528060200260200182016040528015613935578160200160208202803683370190505b5091508260600151516001600160401b0381111561395557613955613e2d565b60405190808252806020026020018201604052801561398857816020015b60608152602001906001900390816139735790505b50905060005b836060015151811015613afd578360c0015181815181106139b1576139b1614270565b60200260200101515a116139e4576139c8846126df565b6040516307aec4ab60e21b815260040161092091815260200190565b836060015181815181106139fa576139fa614270565b60200260200101516001600160a01b031684608001518281518110613a2157613a21614270565b60200260200101518560c001518381518110613a3f57613a3f614270565b6020026020010151908660a001518481518110613a5e57613a5e614270565b6020026020010151604051613a7391906146d5565b600060405180830381858888f193505050503d8060008114613ab1576040519150601f19603f3d011682016040523d82523d6000602084013e613ab6565b606091505b50848381518110613ac957613ac9614270565b60200260200101848481518110613ae257613ae2614270565b6020908102919091010191909152901515905260010161398e565b50915091565b50805460008255906000526020600020908101906112b791905b80821115613b315760008155600101613b1d565b5090565b60008083601f840112613b4757600080fd5b5081356001600160401b03811115613b5e57600080fd5b6020830191508360208260051b8501011115610b2757600080fd5b60008060008060008060608789031215613b9257600080fd5b86356001600160401b0380821115613ba957600080fd5b613bb58a838b01613b35565b90985096506020890135915080821115613bce57600080fd5b613bda8a838b01613b35565b90965094506040890135915080821115613bf357600080fd5b50613c0089828a01613b35565b979a9699509497509295939492505050565b60008151808452602080850194506020840160005b83811015613c45578151151587529582019590820190600101613c27565b509495945050505050565b6020815260006107216020830184613c12565b60008060208385031215613c7657600080fd5b82356001600160401b03811115613c8c57600080fd5b613c9885828601613b35565b90969095509350505050565b60008151808452602080850194506020840160005b83811015613c455781516001600160a01b031687529582019590820190600101613cb9565b6020815260006107216020830184613ca4565b600060208284031215613d0357600080fd5b5035919050565b60008083601f840112613d1c57600080fd5b5081356001600160401b03811115613d3357600080fd5b602083019150836020606083028501011115610b2757600080fd5b600080600080600060608688031215613d6657600080fd5b85356001600160401b0380821115613d7d57600080fd5b9087019060e0828a031215613d9157600080fd5b90955060208701359080821115613da757600080fd5b613db389838a01613b35565b90965094506040880135915080821115613dcc57600080fd5b50613dd988828901613d0a565b969995985093965092949392505050565b600080600080600060608688031215613e0257600080fd5b85356001600160401b0380821115613e1957600080fd5b9087019060c0828a031215613d9157600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613e6557613e65613e2d565b60405290565b60405160c081016001600160401b0381118282101715613e6557613e65613e2d565b604051601f8201601f191681016001600160401b0381118282101715613eb557613eb5613e2d565b604052919050565b60006001600160401b03821115613ed657613ed6613e2d565b5060051b60200190565b600082601f830112613ef157600080fd5b81356020613f06613f0183613ebd565b613e8d565b80838252602082019150600560208560051b880101945087851115613f2a57600080fd5b602087015b85811015613f53578035828110613f465760008081fd5b8452928401928401613f2f565b5090979650505050505050565b80356001600160a01b0381168114610d6957600080fd5b600082601f830112613f8857600080fd5b81356020613f98613f0183613ebd565b8083825260208201915060208460051b870101935086841115613fba57600080fd5b602086015b84811015613fdd57613fd081613f60565b8352918301918301613fbf565b509695505050505050565b60008060408385031215613ffb57600080fd5b82356001600160401b038082111561401257600080fd5b61401e86838701613ee0565b9350602085013591508082111561403457600080fd5b5061404185828601613f77565b9150509250929050565b803560108110610d6957600080fd5b6000806040838503121561406d57600080fd5b6140768361404b565b915061408460208401613f60565b90509250929050565b60006020828403121561409f57600080fd5b61072182613f60565b600080604083850312156140bb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b600581106112b7576112b76140ca565b60a081016140fd876140e0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561413057600080fd5b81356001600160401b0381111561414657600080fd5b6106ba84828501613f77565b60008151808452602080850194506020840160005b83811015613c455781516001600160601b031687529582019590820190600101614167565b60608152600061419f6060830186613ca4565b82810360208401526141b18186613ca4565b905082810360408401526141c58185614152565b9695505050505050565b6020815260006107216020830184614152565b6000602082840312156141f457600080fd5b6107218261404b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610766576107666141fd565b81810381811115610766576107666141fd565b60008261425657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610766576107666141fd565b60208101601083106142b1576142b16140ca565b91905290565b6040815260006142ca6040830185613ca4565b82810360208401526142dc8185613c12565b95945050505050565b6080815260006142f86080830187613c12565b828103602084015261430a8187614152565b9050828103604084015261431e8186613ca4565b905082810360608401526106158185613ca4565b6001600160e01b03198316815260408101600b8310614353576143536140ca565b8260208301529392505050565b600082601f83011261437157600080fd5b81356020614381613f0183613ebd565b8083825260208201915060208460051b8701019350868411156143a357600080fd5b602086015b84811015613fdd57803583529183019183016143a8565b6000601f83601f8401126143d257600080fd5b823560206143e2613f0183613ebd565b82815260059290921b8501810191818101908784111561440157600080fd5b8287015b848110156144975780356001600160401b03808211156144255760008081fd5b818a0191508a603f83011261443a5760008081fd5b8582013560408282111561445057614450613e2d565b614461828b01601f19168901613e8d565b92508183528c818386010111156144785760008081fd5b8181850189850137506000908201870152845250918301918301614405565b50979650505050505050565b600060e082360312156144b557600080fd5b6144bd613e43565b82358152602083013560208201526040830135604082015260608301356001600160401b03808211156144ef57600080fd5b6144fb36838701613f77565b6060840152608085013591508082111561451457600080fd5b61452036838701614360565b608084015260a085013591508082111561453957600080fd5b614545368387016143bf565b60a084015260c085013591508082111561455e57600080fd5b5061456b36828601614360565b60c08301525092915050565b600060c0823603121561458957600080fd5b614591613e6b565b823581526020830135602082015260408301356001600160401b03808211156145b957600080fd5b6145c536838701613ee0565b604084015260608501359150808211156145de57600080fd5b6145ea36838701614360565b6060840152608085013591508082111561460357600080fd5b61460f368387016143bf565b608084015260a085013591508082111561462857600080fd5b5061463536828601614360565b60a08301525092915050565b60005b8381101561465c578181015183820152602001614644565b50506000910152565b6001600160e01b0319831681528151600090614688816004850160208701614641565b919091016004019392505050565b600081518084526146ae816020860160208601614641565b601f01601f19169290920160200192915050565b6020815260006107216020830184614696565b600082516146e7818460208701614641565b9190910192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015613f5357601f1986840301895261472c838351614696565b98840198925090830190600101614710565b6080815260006147516080830187614696565b82810360208401526147638187613ca4565b905082810360408401526147778186613c12565b9050828103606084015261061581856146f1565b60408152600061479e6040830185613c12565b82810360208401526142dc8185613ca4565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b6000602082840312156147e557600080fd5b8151801515811461072157600080fd5b60008151808452602080850194506020840160005b83811015613c455781518752958201959082019060010161480a565b600060e0830182518452602080840151602086015260408401516040860152606084015160e0606087015282815180855261010088019150602083019450600092505b808310156148925784516001600160a01b03168252938301936001929092019190830190614869565b506080860151935086810360808801526148ac81856147f5565b935050505060a083015184820360a08601526148c882826146f1565b91505060c083015184820360c08601526142dc82826147f5565b6040815260006148f56040830185614826565b905060018060a01b03831660208301529392505050565b60006020828403121561491e57600080fd5b81356002811061072157600080fd5b60006020828403121561493f57600080fd5b813560ff8116811461072157600080fd5b600060018201614962576149626141fd565b5060010190565b60808152600061497c6080830187614826565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156149e65783516149d0816140e0565b82529284019260019290920191908401906149bd565b50606089015193508481036060860152614a0081856147f5565b935050505060808601518282036080840152614a1c82826146f1565b91505060a086015182820360a0840152614a3682826147f5565b93505050506142dc60608301846001600160a01b03169052565b634e487b7160e01b600052603160045260246000fd5b604081526000614a796040830185613c12565b82810360208401526142dc81856146f156fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240ac1ff16a4f04f2a37a9ba5252a69baa100b460e517d1f8019c054a5ad698f9ffc55405a488814eaa0e2a685a0131142785b8d033d311c8c8244e34a7c12ca40f88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e38400683eb2cb350596d73644c0c89fe45f108600003457374f4ab3e87b4f3aa3d38c234075fde25875da8a6b7e36b58b86681d483271a99eeeee1d78e258a24d6924fe71b0c8b61aea02ca498b5f53b29bd95726278b1fe4eb791bb24a42644ca2646970667358221220cb0e92b2033c9131bafd8c90a491e8241ace110667169406b1c1a69bc857723964736f6c63430008170033", - "deployer": "0x31762cdd4Aa65CD6f5F09D7a05a56211720A1168", - "devdoc": { - "version": 1, - "kind": "dev", - "methods": { - "addBridgeOperators(uint96[],address[],address[])": { - "details": "Adds multiple bridge operators.", - "params": { - "bridgeOperators": "An array of addresses representing the bridge operators to add.", - "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." - }, - "returns": { - "addeds": "An array of booleans indicating whether each bridge operator was added successfully. Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators( voteWeights, governors, bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]); const filteredWeights = weights.filter((_, index) => addeds[index]); const filteredGovernors = governors.filter((_, index) => addeds[index]); // ... (Process or use the information as required) ... ```" - } - }, - "checkThreshold(uint256)": { - "details": "Checks whether the `_voteWeight` passes the threshold." - }, - "getBridgeOperatorOf(address[])": { - "details": "Returns an array of bridge operators correspoding to governor addresses.", - "returns": { - "bridgeOperators": "An array containing the addresses of all bridge operators." - } - }, - "getBridgeOperatorWeight(address)": { - "details": "External function to retrieve the vote weight of a specific bridge operator.", - "params": { - "bridgeOperator": "The address of the bridge operator to get the vote weight for." - }, - "returns": { - "weight": "The vote weight of the specified bridge operator." - } - }, - "getBridgeOperators()": { - "details": "Returns an array of all bridge operators.", - "returns": { - "_0": "An array containing the addresses of all bridge operators." - } - }, - "getCallbackRegisters()": { - "details": "Retrieves the addresses of registered callbacks.", - "returns": { - "registers": "An array containing the addresses of registered callbacks." - } - }, - "getContract(uint8)": { - "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", - "params": { - "contractType": "The role of the contract to retrieve." - }, - "returns": { - "contract_": "The address of the contract with the specified role." - } - }, - "getFullBridgeOperatorInfos()": { - "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", - "returns": { - "bridgeOperators": "An array of addresses representing the registered bridge operators.", - "governors": "An array of addresses representing the governors of each bridge operator.", - "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" - } - }, - "getGovernorWeight(address)": { - "details": "External function to retrieve the vote weight of a specific governor.", - "params": { - "governor": "The address of the governor to get the vote weight for." - }, - "returns": { - "weight": "voteWeight The vote weight of the specified governor." - } - }, - "getGovernorWeights(address[])": { - "details": "Returns the weights of a list of governor addresses." - }, - "getGovernors()": { - "details": "Returns an array of all governors.", - "returns": { - "_0": "An array containing the addresses of all governors." - } - }, - "getGovernorsOf(address[])": { - "details": "Retrieves the governors corresponding to a given array of bridge operators. This external function allows external callers to obtain the governors associated with a given array of bridge operators. The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.", - "params": { - "bridgeOperators": "An array of bridge operator addresses for which governors are to be retrieved." - }, - "returns": { - "governors": "An array of addresses representing the governors corresponding to the provided bridge operators." - } - }, - "getProposalExpiryDuration()": { - "details": "Returns the expiry duration for a new proposal." - }, - "getThreshold()": { - "details": "Returns the threshold." - }, - "getTotalWeight()": { - "details": "Returns total weights." - }, - "globalProposalRelayed(uint256)": { - "details": "Returns whether the voter `_voter` casted vote for the proposal." - }, - "isBridgeOperator(address)": { - "details": "Checks if the given address is a bridge operator.", - "params": { - "addr": "The address to check." - }, - "returns": { - "_0": "A boolean indicating whether the address is a bridge operator." - } - }, - "minimumVoteWeight()": { - "details": "Returns the minimum vote weight to pass the threshold." - }, - "registerCallbacks(address[])": { - "details": "Registers multiple callbacks with the bridge.", - "params": { - "registers": "The array of callback addresses to register." - }, - "returns": { - "registereds": "An array indicating the success status of each registration." - } - }, - "relayGlobalProposal((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { - "details": "See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor." - }, - "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { - "details": "See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor." - }, - "removeBridgeOperators(address[])": { - "details": "Removes multiple bridge operators.", - "params": { - "bridgeOperators": "An array of addresses representing the bridge operators to remove." - }, - "returns": { - "removeds": "An array of booleans indicating whether each bridge operator was removed successfully. * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators( bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]); // ... (Process or use the information as required) ... ```" - } - }, - "resolveTargets(uint8[])": { - "details": "Returns corresponding address of target options. Return address(0) on non-existent target." - }, - "setContract(uint8,address)": { - "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", - "params": { - "addr": "The address of the contract to set.", - "contractType": "The role of the contract to set." - } - }, - "setThreshold(uint256,uint256)": { - "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." - }, - "sumGovernorsWeight(address[])": { - "details": "Returns total weights of the governor list." - }, - "totalBridgeOperator()": { - "details": "Returns the total number of bridge operators.", - "returns": { - "_0": "The total number of bridge operators." - } - }, - "unregisterCallbacks(address[])": { - "details": "Unregisters multiple callbacks from the bridge.", - "params": { - "registers": "The array of callback addresses to unregister." - }, - "returns": { - "unregistereds": "An array indicating the success status of each unregistration." - } - }, - "updateBridgeOperator(address)": { - "details": "Governor updates their corresponding governor and/or operator address. Requirements: - The caller must the governor of the operator that is requested changes.", - "params": { - "bridgeOperator": "The address of the bridge operator to update." - } - }, - "updateManyTargetOption(uint8[],address[])": { - "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal. " - } - }, - "events": { - "BridgeOperatorUpdated(address,address,address)": { - "details": "Emitted when a bridge operator is updated.", - "params": { - "fromBridgeOperator": "The address of the bridge operator being updated.", - "governor": "The address of the governor initiating the update.", - "toBridgeOperator": "The updated address of the bridge operator." - } - }, - "BridgeOperatorsAdded(bool[],uint96[],address[],address[])": { - "details": "Emitted when new bridge operators are added.", - "params": { - "bridgeOperators": "The array of addresses representing the added bridge operators.", - "governors": "The array of addresses representing the governors associated with the added bridge operators.", - "statuses": "The array of boolean values represents whether the corresponding bridge operator is added successfully.", - "voteWeights": "The array of vote weights assigned to the added bridge operators." - } - }, - "BridgeOperatorsRemoved(bool[],address[])": { - "details": "Emitted when bridge operators are removed.", - "params": { - "bridgeOperators": "The array of addresses representing the removed bridge operators.", - "statuses": "The array of boolean values representing the statuses of the removed bridge operators." - } - }, - "ContractUpdated(uint8,address)": { - "details": "Emitted when a contract is updated." - }, - "GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,uint8[],uint256[],bytes[],uint256[]),address)": { - "details": "Emitted when a proposal is created" - }, - "Notified(bytes,address[],bool[],bytes[])": { - "details": "Emitted when the contract notifies multiple registers with statuses and return data." - }, - "ProposalApproved(bytes32)": { - "details": "Emitted when the proposal is approved" - }, - "ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),address)": { - "details": "Emitted when a proposal is created" - }, - "ProposalExecuted(bytes32,bool[],bytes[])": { - "details": "Emitted when the proposal is executed" - }, - "ProposalExpired(bytes32)": { - "details": "Emitted when the vote is expired" - }, - "ProposalExpiryDurationChanged(uint256)": { - "details": "Emitted when the proposal expiry duration is changed." - }, - "ProposalRejected(bytes32)": { - "details": "Emitted when the vote is reject" - }, - "ProposalVoted(bytes32,address,uint8,uint256)": { - "details": "Emitted when the proposal is voted" - }, - "TargetOptionUpdated(uint8,address)": { - "details": "Emitted when the target options are updated" - }, - "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { - "details": "Emitted when the threshold is updated" - } - }, - "errors": { - "ErrBridgeOperatorAlreadyExisted(address)": [ - { - "details": "Error thrown when attempting to add a bridge operator that already exists in the contract. This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract." - } - ], - "ErrBridgeOperatorUpdateFailed(address)": [ - { - "details": "Error raised when a bridge operator update operation fails.", - "params": { - "bridgeOperator": "The address of the bridge operator that failed to update." - } - } - ], - "ErrContractTypeNotFound(uint8)": [ - { - "details": "Error of invalid role." - } - ], - "ErrCurrentProposalIsNotCompleted()": [ - { - "details": "Error thrown when the current proposal is not completed." - } - ], - "ErrDuplicated(bytes4)": [ - { - "details": "Error thrown when a duplicated element is detected in an array.", - "params": { - "msgSig": "The function signature that invoke the error." - } - } - ], - "ErrInsufficientGas(bytes32)": [ - { - "details": "Error thrown when there is insufficient gas to execute a function." - } - ], - "ErrInvalidArguments(bytes4)": [ - { - "details": "Error indicating that arguments are invalid." - } - ], - "ErrInvalidChainId(bytes4,uint256,uint256)": [ - { - "details": "Error indicating that the chain ID is invalid.", - "params": { - "actual": "Current chain ID that executing function.", - "expected": "Expected chain ID required for the tx to success.", - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." - } - } - ], - "ErrInvalidExpiryTimestamp()": [ - { - "details": "Error thrown when an invalid expiry timestamp is provided." - } - ], - "ErrInvalidOrder(bytes4)": [ - { - "details": "Error indicating that an order is invalid.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." - } - } - ], - "ErrInvalidProposalNonce(bytes4)": [ - { - "details": "Error indicating that the proposal nonce is invalid.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid proposal nonce." - } - } - ], - "ErrInvalidThreshold(bytes4)": [ - { - "details": "Error indicating that the provided threshold is invalid for a specific function signature.", - "params": { - "msgSig": "The function signature (bytes4) that the invalid threshold applies to." - } - } - ], - "ErrInvalidVoteWeight(bytes4)": [ - { - "details": "Error indicating that a vote weight is invalid for a specific function signature.", - "params": { - "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." - } - } - ], - "ErrLengthMismatch(bytes4)": [ - { - "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", - "params": { - "msgSig": "The function signature (bytes4) that has a length mismatch." - } - } - ], - "ErrOnlySelfCall(bytes4)": [ - { - "details": "Error indicating that a function can only be called by the contract itself.", - "params": { - "msgSig": "The function signature (bytes4) that can only be called by the contract itself." - } - } - ], - "ErrRelayFailed(bytes4)": [ - { - "details": "Error indicating that a relay call has failed.", - "params": { - "msgSig": "The function signature (bytes4) of the relay call that failed." - } - } - ], - "ErrUnauthorized(bytes4,uint8)": [ - { - "details": "Error indicating that the caller is unauthorized to perform a specific function.", - "params": { - "expectedRole": "The role required to perform the function.", - "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." - } - } - ], - "ErrUnsupportedInterface(bytes4,address)": [ - { - "details": "The error indicating an unsupported interface.", - "params": { - "addr": "The address where the unsupported interface was encountered.", - "interfaceId": "The bytes4 interface identifier that is not supported." - } - } - ], - "ErrUnsupportedVoteType(bytes4)": [ - { - "details": "Error indicating that a vote type is not supported.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an unsupported vote type." - } - } - ], - "ErrVoteIsFinalized()": [ - { - "details": "Error thrown when attempting to interact with a finalized vote." - } - ], - "ErrZeroAddress(bytes4)": [ - { - "details": "Error indicating that given address is null when it should not." - } - ], - "ErrZeroCodeContract(address)": [ - { - "details": "Error of set to non-contract." - } - ] - } - }, - "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"callbackRegisters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"ErrBridgeOperatorAlreadyExisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"ErrBridgeOperatorUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCurrentProposalIsNotCompleted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrDuplicated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ErrInsufficientGas\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidExpiryTimestamp\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidProposalNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidVoteWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrRelayFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrUnsupportedInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnsupportedVoteType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrVoteIsFinalized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromBridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toBridgeOperator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"Notified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"ProposalExpiryDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\",\"name\":\"targetOption\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"TargetOptionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"addBridgeOperators\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getBridgeOperatorOf\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"getBridgeOperatorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCallbackRegisters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullBridgeOperatorInfos\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"getGovernorsOf\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProposalExpiryDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"globalProposalRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isBridgeOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"registerCallbacks\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"registereds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayGlobalProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"removeBridgeOperators\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"removeds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"}],\"name\":\"resolveTargets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"sumGovernorsWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBridgeOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"unregisterCallbacks\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"unregistereds\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newBridgeOperator\",\"type\":\"address\"}],\"name\":\"updateBridgeOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateManyTargetOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrBridgeOperatorAlreadyExisted(address)\":[{\"details\":\"Error thrown when attempting to add a bridge operator that already exists in the contract. This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\"}],\"ErrBridgeOperatorUpdateFailed(address)\":[{\"details\":\"Error raised when a bridge operator update operation fails.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator that failed to update.\"}}],\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrCurrentProposalIsNotCompleted()\":[{\"details\":\"Error thrown when the current proposal is not completed.\"}],\"ErrDuplicated(bytes4)\":[{\"details\":\"Error thrown when a duplicated element is detected in an array.\",\"params\":{\"msgSig\":\"The function signature that invoke the error.\"}}],\"ErrInsufficientGas(bytes32)\":[{\"details\":\"Error thrown when there is insufficient gas to execute a function.\"}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidExpiryTimestamp()\":[{\"details\":\"Error thrown when an invalid expiry timestamp is provided.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidProposalNonce(bytes4)\":[{\"details\":\"Error indicating that the proposal nonce is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\"}}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidVoteWeight(bytes4)\":[{\"details\":\"Error indicating that a vote weight is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid vote weight.\"}}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrOnlySelfCall(bytes4)\":[{\"details\":\"Error indicating that a function can only be called by the contract itself.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that can only be called by the contract itself.\"}}],\"ErrRelayFailed(bytes4)\":[{\"details\":\"Error indicating that a relay call has failed.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the relay call that failed.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedInterface(bytes4,address)\":[{\"details\":\"The error indicating an unsupported interface.\",\"params\":{\"addr\":\"The address where the unsupported interface was encountered.\",\"interfaceId\":\"The bytes4 interface identifier that is not supported.\"}}],\"ErrUnsupportedVoteType(bytes4)\":[{\"details\":\"Error indicating that a vote type is not supported.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\"}}],\"ErrVoteIsFinalized()\":[{\"details\":\"Error thrown when attempting to interact with a finalized vote.\"}],\"ErrZeroAddress(bytes4)\":[{\"details\":\"Error indicating that given address is null when it should not.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeOperatorUpdated(address,address,address)\":{\"details\":\"Emitted when a bridge operator is updated.\",\"params\":{\"fromBridgeOperator\":\"The address of the bridge operator being updated.\",\"governor\":\"The address of the governor initiating the update.\",\"toBridgeOperator\":\"The updated address of the bridge operator.\"}},\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\":{\"details\":\"Emitted when new bridge operators are added.\",\"params\":{\"bridgeOperators\":\"The array of addresses representing the added bridge operators.\",\"governors\":\"The array of addresses representing the governors associated with the added bridge operators.\",\"statuses\":\"The array of boolean values represents whether the corresponding bridge operator is added successfully.\",\"voteWeights\":\"The array of vote weights assigned to the added bridge operators.\"}},\"BridgeOperatorsRemoved(bool[],address[])\":{\"details\":\"Emitted when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The array of addresses representing the removed bridge operators.\",\"statuses\":\"The array of boolean values representing the statuses of the removed bridge operators.\"}},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,uint8[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"Notified(bytes,address[],bool[],bytes[])\":{\"details\":\"Emitted when the contract notifies multiple registers with statuses and return data.\"},\"ProposalApproved(bytes32)\":{\"details\":\"Emitted when the proposal is approved\"},\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"ProposalExecuted(bytes32,bool[],bytes[])\":{\"details\":\"Emitted when the proposal is executed\"},\"ProposalExpired(bytes32)\":{\"details\":\"Emitted when the vote is expired\"},\"ProposalExpiryDurationChanged(uint256)\":{\"details\":\"Emitted when the proposal expiry duration is changed.\"},\"ProposalRejected(bytes32)\":{\"details\":\"Emitted when the vote is reject\"},\"ProposalVoted(bytes32,address,uint8,uint256)\":{\"details\":\"Emitted when the proposal is voted\"},\"TargetOptionUpdated(uint8,address)\":{\"details\":\"Emitted when the target options are updated\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"}},\"kind\":\"dev\",\"methods\":{\"addBridgeOperators(uint96[],address[],address[])\":{\"details\":\"Adds multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to add.\",\"governors\":\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\"},\"returns\":{\"addeds\":\"An array of booleans indicating whether each bridge operator was added successfully. Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators( voteWeights, governors, bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]); const filteredWeights = weights.filter((_, index) => addeds[index]); const filteredGovernors = governors.filter((_, index) => addeds[index]); // ... (Process or use the information as required) ... ```\"}},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getBridgeOperatorOf(address[])\":{\"details\":\"Returns an array of bridge operators correspoding to governor addresses.\",\"returns\":{\"bridgeOperators\":\"An array containing the addresses of all bridge operators.\"}},\"getBridgeOperatorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to get the vote weight for.\"},\"returns\":{\"weight\":\"The vote weight of the specified bridge operator.\"}},\"getBridgeOperators()\":{\"details\":\"Returns an array of all bridge operators.\",\"returns\":{\"_0\":\"An array containing the addresses of all bridge operators.\"}},\"getCallbackRegisters()\":{\"details\":\"Retrieves the addresses of registered callbacks.\",\"returns\":{\"registers\":\"An array containing the addresses of registered callbacks.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getFullBridgeOperatorInfos()\":{\"details\":\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\",\"returns\":{\"bridgeOperators\":\"An array of addresses representing the registered bridge operators.\",\"governors\":\"An array of addresses representing the governors of each bridge operator.\",\"weights\":\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\"}},\"getGovernorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific governor.\",\"params\":{\"governor\":\"The address of the governor to get the vote weight for.\"},\"returns\":{\"weight\":\"voteWeight The vote weight of the specified governor.\"}},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getGovernors()\":{\"details\":\"Returns an array of all governors.\",\"returns\":{\"_0\":\"An array containing the addresses of all governors.\"}},\"getGovernorsOf(address[])\":{\"details\":\"Retrieves the governors corresponding to a given array of bridge operators. This external function allows external callers to obtain the governors associated with a given array of bridge operators. The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.\",\"params\":{\"bridgeOperators\":\"An array of bridge operator addresses for which governors are to be retrieved.\"},\"returns\":{\"governors\":\"An array of addresses representing the governors corresponding to the provided bridge operators.\"}},\"getProposalExpiryDuration()\":{\"details\":\"Returns the expiry duration for a new proposal.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTotalWeight()\":{\"details\":\"Returns total weights.\"},\"globalProposalRelayed(uint256)\":{\"details\":\"Returns whether the voter `_voter` casted vote for the proposal.\"},\"isBridgeOperator(address)\":{\"details\":\"Checks if the given address is a bridge operator.\",\"params\":{\"addr\":\"The address to check.\"},\"returns\":{\"_0\":\"A boolean indicating whether the address is a bridge operator.\"}},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"registerCallbacks(address[])\":{\"details\":\"Registers multiple callbacks with the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to register.\"},\"returns\":{\"registereds\":\"An array indicating the success status of each registration.\"}},\"relayGlobalProposal((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor.\"},\"relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor.\"},\"removeBridgeOperators(address[])\":{\"details\":\"Removes multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to remove.\"},\"returns\":{\"removeds\":\"An array of booleans indicating whether each bridge operator was removed successfully. * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded. It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly. Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not. Example Usage: Making an `eth_call` in ethers.js ``` const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators( bridgeOperators, // overriding the caller to the contract itself since we use `onlySelfCall` guard {from: bridgeManagerContract.address} ) const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]); // ... (Process or use the information as required) ... ```\"}},\"resolveTargets(uint8[])\":{\"details\":\"Returns corresponding address of target options. Return address(0) on non-existent target.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumGovernorsWeight(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalBridgeOperator()\":{\"details\":\"Returns the total number of bridge operators.\",\"returns\":{\"_0\":\"The total number of bridge operators.\"}},\"unregisterCallbacks(address[])\":{\"details\":\"Unregisters multiple callbacks from the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to unregister.\"},\"returns\":{\"unregistereds\":\"An array indicating the success status of each unregistration.\"}},\"updateBridgeOperator(address)\":{\"details\":\"Governor updates their corresponding governor and/or operator address. Requirements: - The caller must the governor of the operator that is requested changes.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to update.\"}},\"updateManyTargetOption(uint8[],address[])\":{\"details\":\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal. \"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"},\"updateBridgeOperator(address)\":{\"notice\":\"This method checks authorization by querying the corresponding operator of the msg.sender and then attempts to remove it from the `_bridgeOperatorSet` for gas optimization. In case we allow a governor can leave their operator address blank null `address(0)`, consider add authorization check.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainBridgeManager.sol\":\"MainchainBridgeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://383fb7b8181016ac5ccf07bc9cdb7c1b5045ea36e2cc4df52bcbf20396fc7688\",\"dweb:/ipfs/QmYJ7Cg4WmE3rR8KGQxjUCXFfTH6TcwZ2Z1f6tPrq7jHFr\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://96b6d77a20bebd4eb06b801d3d020c7e82be13bd535cb0d0a6b7181c51dab5d5\",\"dweb:/ipfs/QmPUR9Cv9jNFdQX6PtBfaBW1ZCnKwiu65R2VD5kbdanDyn\"]},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://89c2a0f70157c13845be5cb49b078a6374fee3a78fa950052a3af26190255da8\",\"dweb:/ipfs/QmUcvMEQH1oMM2pUyMuDiBUKdvvnTz1NRB8bmPHrVq8725\"]},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8831721b6f4cc26534d190f9f1631c3f59c9ff38efdd911f85e0882b8e360472\",\"dweb:/ipfs/QmQZnLErZNStirSQ13ZNWQgvEYUtGE5tXYwn4QUPaVUfPN\"]},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a6c4477d480bac20d681ade0e712b77ad828acf530a1d5c0abc5fb78068a05a1\",\"dweb:/ipfs/QmdBqsK8CcUceTeWzhHwFDEvKMoHimwtV96Lbim7ZBtCb8\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://39e096c60a6eb1c6a257122d515496bd92d0c6a693a8f07acb6aa4b1263e95d4\",\"dweb:/ipfs/QmPs5trJBacCiSkezP6tpevapuRYWNY6mqSFzsMCJj7e6B\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bf52bdf22a33263f5ca6227a35faeac3b81e7d2c692fbcc6a079d488710c5900\",\"dweb:/ipfs/QmcmsjkP4yq3UhiJbvyzwufaY2EKh1zhHaRK8ATag2cpD2\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d4831d777a29ebdf9f2caecd70e74b97bff1b70e53622fd0a02aed01e21c8271\",\"dweb:/ipfs/QmUqurVVnCc7XkMxb2k23TVQUtuhHZduJ3hTZarTJrqU24\"]},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://370c93bc1e962fcf8eab41d217d901716769f05c51a2cb25aae12abc84e871da\",\"dweb:/ipfs/QmQYL5QrJmXCdi5UN9K7imt1iPm9ydZQm6ifShpt451afd\"]},\"src/extensions/bridge-operator-governance/BridgeManager.sol\":{\"keccak256\":\"0xed4094d87c13f38dc4b76b52b8b238447d99cdc2ad452f322ddc891b1217d572\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c8a37c078764f764094af3e4aba17aeb529e4985a316f7a9902001bb3b0c5872\",\"dweb:/ipfs/QmdSgZNaxS2RfQQ49AZWwo2ZmAt1ViQGShd1zFUTzum7sp\"]},\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\":{\"keccak256\":\"0x0fd58e2e9955d95cfde1ccd8b120fbb3d5bbf7b41143c09217833bd1d01590ce\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a470ffde7a16e1d32cf2ef09fac248bdd012eabd166d3a42e35891d23aa4027d\",\"dweb:/ipfs/QmWjL7fG82GCvg8UFJVb5PMskwqRDKfggk1WwVKQ1heG8e\"]},\"src/extensions/collections/HasContracts.sol\":{\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b8903232a7a609b250a1ff2e9522a2366979652145af74637f9c0089916e3da3\",\"dweb:/ipfs/QmVoxZamJEhjYhr9RKVSAKGzakgqmFLfZXhZcDGor7DZe5\"]},\"src/extensions/collections/HasProxyAdmin.sol\":{\"keccak256\":\"0x0916021d04ea0c93c54978dc2fd46575fd2bd867369fbf9ce49f316939ddaf25\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e220c59eb50b4e206d0a126f8cd2f7f2aa6865f56a0b4b091149e6928bf97b8\",\"dweb:/ipfs/QmRBk5hhn1w2MghZ8pRfaU1CvgRAZN7nZvxySSPDvkVuGp\"]},\"src/extensions/sequential-governance/CoreGovernance.sol\":{\"keccak256\":\"0xc6056209e8f6a0d9edced67388a4037c6fafffb68a3c7b2fe5759c487bb1d81c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://97bcdb2a935279c899a9cc27e4b3f372b255b6851723be8c80b2e9f3865647e9\",\"dweb:/ipfs/QmQdFFXdC2vmwbPyAetmZYNvVbshXGwaWq4waiQRhsmpsT\"]},\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\":{\"keccak256\":\"0x986444cade6313dd1ce4137f3338e4fc296769f5cf669f057cd2838e5ae0e54f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2b742e41b4155f872f00e387f971139713f8d5bc8a4d351b026041b8766af6dc\",\"dweb:/ipfs/QmSz3QV64W8MKvuWmdy6rCQXMBX3bz8vcfV8UKYHsQbuvf\"]},\"src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol\":{\"keccak256\":\"0x80c58038f403fd189647669c2f5f913c9c5dd16be3d1b60b296903ce70c9634b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6fd2c38ba6888b6c6f32365c3d3501e038f727176fcc3329fefdd909996ab247\",\"dweb:/ipfs/QmYZ31EScGv4Moonfahgi8o6TXVLSWUiAKJLZZtrQobUhZ\"]},\"src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\":{\"keccak256\":\"0xe2c192ec663e10953b2754fa154fef64e26b8c470d25272883a9c149623746c8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://41908a736c62c8145e0d5dd74d8495a06e0132e8d9b60618c97df40da7ae39c7\",\"dweb:/ipfs/QmY4qMLFfngaBTCXoE6fcGSYBrs3q8bKVTgEpkFfL43F8Y\"]},\"src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol\":{\"keccak256\":\"0xb21d764010845c562d1554168cf103b332755764107f6510eeddc1f03c82bc33\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cbd0a15ebd973a1ad8122f78b6b5dc14f980e803773b6541220ce43a3cf8b4f8\",\"dweb:/ipfs/QmXNyjv68auW56WDchsyPMMekFr3nLsDvWWRXCTKxSoFkb\"]},\"src/interfaces/IQuorum.sol\":{\"keccak256\":\"0x6b7920b04a73a0e1ff7404aa1a3b5fc738fc0b6154839480f666fd69b55123f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a8c81134e4632e1240aead39fd5393b376a4be53668caf2a390f511f3c6d422d\",\"dweb:/ipfs/QmWPaQPP1WkpdPjLhK7wFXsih8HWs6kRQqjX5zGLu6McGH\"]},\"src/interfaces/bridge/IBridgeManager.sol\":{\"keccak256\":\"0x9339ce2f14bc1e4d0e368a351506ff5735bcbc0a2e41aa633149198bbed76a60\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c234bc4f4faa82434fcfeab5b50af61b7027a75f3f773b70b542860d10607574\",\"dweb:/ipfs/QmYPcxU5UMEEoxQphF8KA6P7jCRuGAXRjvoiu3McYfuxER\"]},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"keccak256\":\"0xfd6868a1041577a463b6c96713edcb18063dc817154d09710abfd5783e4629ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://acaccf9b0280ec924dfdd641d122da9c0d6944c6bcf55019682ab5f7a925ab32\",\"dweb:/ipfs/QmR4ta1PNirxkJEiSqJVfEo9CRxQjvdfKZMGzf84nekZos\"]},\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\":{\"keccak256\":\"0xadbcf65ee9d55f4aa037216d71a279fe41855fe572a4a8734e6f69954aea98f4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db7b04d27323d7c0de57def768f65c448022c500f475985b555a53ae5b0c8249\",\"dweb:/ipfs/QmNq4UJripZ7rWJqrccBU7Yq3raJvuNTqqMQkn73DrQSYp\"]},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c34d339fa8e240c62ea8da11b4fe8745fbe5b6091dbcd40505160ae952f33e16\",\"dweb:/ipfs/QmR6CBz9VAvCSTR7uS3R4yocptsHPz3aodqdDEwSc2xZaE\"]},\"src/interfaces/collections/IHasContracts.sol\":{\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://03390ff29b496e244faf4eab55565712f0aea5fecdcb915e3c5866ef29d5686d\",\"dweb:/ipfs/QmdGpXn3VSxfNvjFBxfho7rc41JTq5m6bonrfmpzShhRVs\"]},\"src/interfaces/consumers/ChainTypeConsumer.sol\":{\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://178ba522d7a09f458f3d6f9b9f3acf2c588304c72b1b0ede593990903a750967\",\"dweb:/ipfs/QmTXgtbHY3s8NH1VZZNnojgRJ8YEa1kVYTQUxVPb9dqNBD\"]},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba168a64188bbbecbac288295bd9d5ce6dc215f876b144271428a6f91cba792a\",\"dweb:/ipfs/QmX3bM7QUo2xHxsXetU9RtXG11sKktvrdGovSJfxPEy5QN\"]},\"src/interfaces/consumers/VoteStatusConsumer.sol\":{\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f183bc758fb7940f123cb2ea15053d1da707cbeb2e3938542673aab624411e5\",\"dweb:/ipfs/QmfCDeKmeMnTX75odzbKTvY7GekebXwNEbXr7beSNYYKrT\"]},\"src/libraries/AddressArrayUtils.sol\":{\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://3a413f290b8e81540bc6feb739bcfbacf56419b2e657bbce5be43826569b4406\",\"dweb:/ipfs/QmWRjGLBXs7WK92oPm51QpjxMYGuMTBx85Pv7QcGbUZE72\"]},\"src/libraries/Ballot.sol\":{\"keccak256\":\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://63338c46e5de170c10778edc9027c803a9e1a351dc90b675aad399136352c31a\",\"dweb:/ipfs/QmbnADhMhgWtVTpcTiBHYwxxym3NqQi6sEcvDyfbopNwyb\"]},\"src/libraries/GlobalProposal.sol\":{\"keccak256\":\"0x2716e1baf467abab71d89efa01ce0dc9164531ab4221d2758233a81b6d906474\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8178e89a15d5afd8abee8cc8d33321dad28f3a28d1684c15e861b8a6294d9ca1\",\"dweb:/ipfs/QmfHoZtWeU4mVw4k7wKVPsKp3Gx5YAUx6yj3oNHRpZEeDt\"]},\"src/libraries/Proposal.sol\":{\"keccak256\":\"0xbc29aa4e69db7eef0034fdb795181124f86bcf2bc07b5e4a202100dbdce7f7a1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://18f09131ea8d57d43a8fdb470c74ccaec1204c7120f15229b616c1e3acba1770\",\"dweb:/ipfs/Qmc3qJgPhoJeKVUEtHwjofnX3r3ndceDsxm82r1hcgzfyd\"]},\"src/mainchain/MainchainBridgeManager.sol\":{\"keccak256\":\"0xb365eb9fefd1c284a86aa97f0bd0d7eb5406d09c87832d1048b2c18d6c08d48a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3a10046c0d4ed56a61f9e4139c7de2b697f67eb51155945508e33a4255dcee33\",\"dweb:/ipfs/Qmen2Wwj8pM6XYdKGAAiJKQ8JZ5JiWRnbHdUmnSBoXSBJY\"]},\"src/types/Types.sol\":{\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://edd3ba3207e3891e18a7287453e2f260c13eb0f0f1998aad8f37479041e9872a\",\"dweb:/ipfs/QmS2AHHdKzp9Z2Y1tgA4v9DFBDF9i4M8oyBVGryYA9ftJQ\"]},\"src/types/operations/LibTUint256Slot.sol\":{\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2fc230e404242474f7433259c92641b34a387b5cfed7690ec495fa87271734c6\",\"dweb:/ipfs/Qme3tC8svJqFBeWHdXgsvbp1DtPycighFXVT4yUBmEcjJg\"]},\"src/utils/CommonErrors.sol\":{\"keccak256\":\"0x22942c8fea2d1ca863ac1f9c1662d714b8ac0856684e36f8aaf19508648c1053\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d7e47ff198edb68a65d65938c67f860c041a4b7f64cff5b101a333869096044b\",\"dweb:/ipfs/QmTFwEY7jPiUSKc3GvYDY7qHqXJzUYCmSjoVrcgFhi8gZz\"]},\"src/utils/ContractType.sol\":{\"keccak256\":\"0x7f547a44265f4c4b03d8971f7fc5eaa2e6064ea8cd509c1b761108f9800dab68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://130e3f8353d9f34098fbf2867c3bf812a5184904d0113d55c5c820eb64f2547b\",\"dweb:/ipfs/QmeFSUbPi8fyG1W7kKegFRtCqALjQBXQyVvQ4sjpi6SWH3\"]},\"src/utils/IdentityGuard.sol\":{\"keccak256\":\"0x2d0dfcef3636945bc1785c1fa5a05f5203c79cbb81b2eee92a3ac6a2378c2ce5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5e4cedc10e50bfaacdc732eab78768b5e0abbc8336eeaffa15de2a7be90de504\",\"dweb:/ipfs/QmR17AgM71NkH5ZeLpmaRMzPyXAKyhafoK2TZUnLw2z3Mv\"]},\"src/utils/RoleAccess.sol\":{\"keccak256\":\"0x7da4631824b53be17e246102ad59458f91f2395710561ac9bface18d35fb2502\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://070d8254ea4d6fde54ae02e121bb84bdb63a3c5a8513d2d364ad5038f6a95493\",\"dweb:/ipfs/QmfXpp3t8XcGFXewoVRmoQMKJb9vPo95Kj4vsGfNBf7gSH\"]}},\"version\":1}", - "nonce": 4, - "numDeployments": 1, - "storageLayout": { - "storage": [ - { - "astId": 135934, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "round", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 135942, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "vote", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)135872_storage))" - }, - { - "astId": 135944, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "_proposalExpiryDuration", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 136681, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "_targetOptionsMap", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_enum(TargetOption)140705,t_address)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32", - "base": "t_address" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_enum(TargetOption)140705": { - "encoding": "inplace", - "label": "enum GlobalProposal.TargetOption", - "numberOfBytes": "1" - }, - "t_enum(VoteStatus)139658": { - "encoding": "inplace", - "label": "enum VoteStatusConsumer.VoteStatus", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_struct(Signature)139649_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct SignatureConsumer.Signature)", - "numberOfBytes": "32", - "value": "t_struct(Signature)139649_storage" - }, - "t_mapping(t_enum(TargetOption)140705,t_address)": { - "encoding": "mapping", - "key": "t_enum(TargetOption)140705", - "label": "mapping(enum GlobalProposal.TargetOption => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)135872_storage))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(ProposalVote)135872_storage)" - }, - "t_mapping(t_uint256,t_struct(ProposalVote)135872_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", - "numberOfBytes": "32", - "value": "t_struct(ProposalVote)135872_storage" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(ProposalVote)135872_storage": { - "encoding": "inplace", - "label": "struct CoreGovernance.ProposalVote", - "numberOfBytes": "288", - "members": [ - { - "astId": 135848, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "status", - "offset": 0, - "slot": "0", - "type": "t_enum(VoteStatus)139658" - }, - { - "astId": 135850, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "hash", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 135852, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "againstVoteWeight", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 135854, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "forVoteWeight", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 135857, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "forVoteds", - "offset": 0, - "slot": "4", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 135860, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "againstVoteds", - "offset": 0, - "slot": "5", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 135862, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "expiryTimestamp", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 135867, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "sig", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_struct(Signature)139649_storage)" - }, - { - "astId": 135871, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "voted", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_bool)" - } - ] - }, - "t_struct(Signature)139649_storage": { - "encoding": "inplace", - "label": "struct SignatureConsumer.Signature", - "numberOfBytes": "96", - "members": [ - { - "astId": 139644, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "v", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 139646, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "r", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 139648, - "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", - "label": "s", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ] - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - }, - "timestamp": 1712300364, - "userdoc": { - "version": 1, - "kind": "user", - "methods": { - "round(uint256)": { - "notice": "chain id = 0 for global proposal" - }, - "updateBridgeOperator(address)": { - "notice": "This method checks authorization by querying the corresponding operator of the msg.sender and then attempts to remove it from the `_bridgeOperatorSet` for gas optimization. In case we allow a governor can leave their operator address blank null `address(0)`, consider add authorization check." - } - } - } -} \ No newline at end of file From 73ad9e61caf00450f20e951aa09f12fb9fef7131 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 16:10:43 +0700 Subject: [PATCH 195/305] chore: fmt --- .../20240411-helper.s.sol | 2 +- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 34 +++++++++---------- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 2 +- .../verify-script.s.sol | 2 +- .../PostCheck_BridgeManager_Proposal.s.sol | 2 +- src/mainchain/MainchainGatewayV3.sol | 3 +- 6 files changed, 23 insertions(+), 22 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol index 4003c57e..2497d517 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -38,7 +38,7 @@ contract Migration__20240409_Helper is Migration { function _helperVoteForCurrentNetwork(LegacyProposalDetail memory proposal) internal { for (uint i; i < _voters.length - 1; ++i) { vm.broadcast(_voters[i]); - address(_currRoninBridgeManager).call{gas: (proposal.targets.length + 1) * 1_000_000 }( + address(_currRoninBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( abi.encodeWithSignature( "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For ) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index d9f34280..d3a7a726 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -100,23 +100,23 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H // ); // } - // ((45, 2021, 1714451658 [1.714e9], [0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95], [0], [0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753], [1000000 [1e6]]), 0) - - LegacyProposalDetail memory proposal; - proposal.nonce = 45; - proposal.chainId = 2021; - proposal.expiryTimestamp = 1714451658; - proposal.targets = targets; - proposal.values = values; - proposal.calldatas = calldatas; - proposal.gasAmounts = gasAmounts; - - vm.broadcast(gaVoters[2]); - address(roninGA).call{gas: 10_000_000}( - abi.encodeWithSignature( - "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For - ) - ); + // ((45, 2021, 1714451658 [1.714e9], [0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95], [0], [0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753], [1000000 [1e6]]), 0) + + LegacyProposalDetail memory proposal; + proposal.nonce = 45; + proposal.chainId = 2021; + proposal.expiryTimestamp = 1714451658; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + vm.broadcast(gaVoters[2]); + address(roninGA).call{ gas: 10_000_000 }( + abi.encodeWithSignature( + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For + ) + ); } function _upgradeBridgeRoninchain() private { diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index 9af25467..e8014b9a 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -189,7 +189,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); vm.broadcast(_governor); - address(_currMainchainBridgeManager).call{gas: (proposal.targets.length + 1) * 1_000_000}( + address(_currMainchainBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( abi.encodeWithSignature( "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures ) diff --git a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol index a40ff287..09c47032 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol @@ -12,7 +12,7 @@ contract Verify_Script_20240411 is Migration__20240409_P2_UpgradeBridgeRoninchai function run() public override(Migration__20240409_P2_UpgradeBridgeRoninchain, Migration__20240409_P3_UpgradeBridgeMainchain) { TNetwork currentNetwork = network(); TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); - Migration__20240409_P2_UpgradeBridgeRoninchain.run(); + // Migration__20240409_P2_UpgradeBridgeRoninchain.run(); CONFIG.createFork(companionNetwork); CONFIG.switchTo(companionNetwork); diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 0bff45bb..f9082dfb 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -194,7 +194,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { calldatas: abi.encodeCall( TransparentUpgradeableProxyV2.functionDelegateCall, (abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))) - ).toSingletonArray(), + ).toSingletonArray(), gasAmounts: uint256(1_000_000).toSingletonArray(), nonce: manager.round(0) + 1 }); diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 042d79cd..22cb4d9e 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -518,6 +518,7 @@ contract MainchainGatewayV3 is } function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) { - return interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId); + return + interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId); } } From 600f81d2bc4e5fb7d6dfabd2eea1400b7440c92b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 16 Apr 2024 16:11:21 +0700 Subject: [PATCH 196/305] chore: chmod --- verify.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 verify.sh diff --git a/verify.sh b/verify.sh old mode 100644 new mode 100755 From 97b0ac33cf60cffa28f801a275cf5c4b83f6c305 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 17 Apr 2024 13:14:03 +0700 Subject: [PATCH 197/305] chore: correct sepolia artifact --- .../sepolia/MainchainBridgeManagerLogic.json | 16 ++++++++-------- .../sepolia/MainchainBridgeManagerProxy.json | 10 +++++----- .../MainchainGatewayPauseEnforcerLogic.json | 10 +++++----- deployments/sepolia/MainchainGatewayV3Logic.json | 16 ++++++++-------- deployments/sepolia/WethUnwrapper.json | 10 +++++----- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/deployments/sepolia/MainchainBridgeManagerLogic.json b/deployments/sepolia/MainchainBridgeManagerLogic.json index 5aa46af1..9b154417 100644 --- a/deployments/sepolia/MainchainBridgeManagerLogic.json +++ b/deployments/sepolia/MainchainBridgeManagerLogic.json @@ -1648,14 +1648,14 @@ ] } ], - "address": "0x31b070817dbF268Bfe1484bD1b4D902c8c4f62df", + "address": "0x8A6e09c0E369086B3AC219aB66F990b0A7d3E1Da", "args": "0x", "ast": "", - "blockNumber": 5709352, - "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61519e80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212200c6f63384302c679c24a323da0191d39419570db3a104ad821b83178df1126da64736f6c63430008170033", + "blockNumber": 5709370, + "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61519e80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212200bc26b64e43b490eeae165d45d8ba67887875e399107a0c8239224bc05fd68d764736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "MainchainBridgeManager.sol", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212200c6f63384302c679c24a323da0191d39419570db3a104ad821b83178df1126da64736f6c63430008170033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212200bc26b64e43b490eeae165d45d8ba67887875e399107a0c8239224bc05fd68d764736f6c63430008170033", "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, @@ -2026,9 +2026,9 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ErrBelowMinRequiredGovernors\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCurrentProposalIsNotCompleted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrDuplicated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"name\":\"ErrExistOneInternalCallFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"required\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ErrInsufficientGas\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidExpiryTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidProposalNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidVoteWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"callIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"revertMsg\",\"type\":\"bytes\"}],\"name\":\"ErrLooseProposalInternallyRevert\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"ErrNonExecutorCannotRelay\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ErrOperatorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrRelayFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrUnsupportedInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnsupportedVoteType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrVoteIsFinalized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorAddingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorRemovingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromBridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toBridgeOperator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"CallbackRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"MinRequiredGovernorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"Notified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"ProposalExpiryDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\",\"name\":\"targetOption\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"TargetOptionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"addBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"getBridgeOperatorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCallbackRegisters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullBridgeOperatorInfos\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getGovernorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getOperatorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProposalExpiryDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"globalProposalRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"callbackRegisters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isBridgeOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"registerCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayGlobalProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"removeBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"}],\"name\":\"resolveTargets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"setMinRequiredGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"sumGovernorsWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBridgeOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"unregisterCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateManyTargetOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrCurrentProposalIsNotCompleted()\":[{\"details\":\"Error thrown when the current proposal is not completed.\"}],\"ErrDuplicated(bytes4)\":[{\"details\":\"Error thrown when a duplicated element is detected in an array.\",\"params\":{\"msgSig\":\"The function signature that invoke the error.\"}}],\"ErrInsufficientGas(bytes32)\":[{\"details\":\"Error thrown when there is insufficient gas to execute a function.\"}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidExpiryTimestamp()\":[{\"details\":\"Error thrown when an invalid expiry timestamp is provided.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidProposalNonce(bytes4)\":[{\"details\":\"Error indicating that the proposal nonce is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\"}}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidVoteWeight(bytes4)\":[{\"details\":\"Error indicating that a vote weight is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid vote weight.\"}}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrLooseProposalInternallyRevert(uint256,bytes)\":[{\"details\":\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\"}],\"ErrNonExecutorCannotRelay(address,address)\":[{\"details\":\"Error of the `caller` to relay is not the specified `executor`.\"}],\"ErrOnlySelfCall(bytes4)\":[{\"details\":\"Error indicating that a function can only be called by the contract itself.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that can only be called by the contract itself.\"}}],\"ErrRelayFailed(bytes4)\":[{\"details\":\"Error indicating that a relay call has failed.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the relay call that failed.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedInterface(bytes4,address)\":[{\"details\":\"The error indicating an unsupported interface.\",\"params\":{\"addr\":\"The address where the unsupported interface was encountered.\",\"interfaceId\":\"The bytes4 interface identifier that is not supported.\"}}],\"ErrUnsupportedVoteType(bytes4)\":[{\"details\":\"Error indicating that a vote type is not supported.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\"}}],\"ErrVoteIsFinalized()\":[{\"details\":\"Error thrown when attempting to interact with a finalized vote.\"}],\"ErrZeroAddress(bytes4)\":[{\"details\":\"Error indicating that given address is null when it should not.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeOperatorAddingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to add.\"},\"BridgeOperatorRemovingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to remove.\"},\"BridgeOperatorUpdated(address,address,address)\":{\"details\":\"Emitted when a bridge operator is updated.\"},\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\":{\"details\":\"Emitted when new bridge operators are added.\"},\"BridgeOperatorsRemoved(bool[],address[])\":{\"details\":\"Emitted when bridge operators are removed.\"},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MinRequiredGovernorUpdated(uint256)\":{\"details\":\"Emitted when the minimum number of required governors is updated.\"},\"Notified(bytes,address[],bool[],bytes[])\":{\"details\":\"Emitted when the contract notifies multiple registers with statuses and return data.\"},\"ProposalApproved(bytes32)\":{\"details\":\"Emitted when the proposal is approved\"},\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"ProposalExecuted(bytes32,bool[],bytes[])\":{\"details\":\"Emitted when the proposal is executed\"},\"ProposalExpired(bytes32)\":{\"details\":\"Emitted when the vote is expired\"},\"ProposalExpiryDurationChanged(uint256)\":{\"details\":\"Emitted when the proposal expiry duration is changed.\"},\"ProposalRejected(bytes32)\":{\"details\":\"Emitted when the vote is reject\"},\"ProposalVoted(bytes32,address,uint8,uint256)\":{\"details\":\"Emitted when the proposal is voted\"},\"TargetOptionUpdated(uint8,address)\":{\"details\":\"Emitted when the target options are updated\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"}},\"kind\":\"dev\",\"methods\":{\"addBridgeOperators(uint96[],address[],address[])\":{\"details\":\"Adds multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to add.\",\"governors\":\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\"}},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getBridgeOperatorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to get the vote weight for.\"},\"returns\":{\"weight\":\"The vote weight of the specified bridge operator.\"}},\"getBridgeOperators()\":{\"details\":\"Returns an array of all bridge operators.\",\"returns\":{\"_0\":\"An array containing the addresses of all bridge operators.\"}},\"getCallbackRegisters()\":{\"details\":\"Retrieves the addresses of registered callbacks.\",\"returns\":{\"registers\":\"An array containing the addresses of registered callbacks.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getFullBridgeOperatorInfos()\":{\"details\":\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\",\"returns\":{\"bridgeOperators\":\"An array of addresses representing the registered bridge operators.\",\"governors\":\"An array of addresses representing the governors of each bridge operator.\",\"weights\":\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\"}},\"getGovernorOf(address)\":{\"details\":\"Returns the corresponding `governor` of a `operator`.\"},\"getGovernorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific governor.\",\"params\":{\"governor\":\"The address of the governor to get the vote weight for.\"},\"returns\":{\"weight\":\"voteWeight The vote weight of the specified governor.\"}},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getGovernors()\":{\"details\":\"Returns an array of all governors.\",\"returns\":{\"_0\":\"An array containing the addresses of all governors.\"}},\"getOperatorOf(address)\":{\"details\":\"Returns the corresponding `operator` of a `governor`.\"},\"getProposalExpiryDuration()\":{\"details\":\"Returns the expiry duration for a new proposal.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTotalWeight()\":{\"details\":\"Returns total weights.\"},\"globalProposalRelayed(uint256)\":{\"details\":\"Returns whether the voter `_voter` casted vote for the proposal.\"},\"isBridgeOperator(address)\":{\"details\":\"Checks if the given address is a bridge operator.\",\"params\":{\"addr\":\"The address to check.\"},\"returns\":{\"_0\":\"A boolean indicating whether the address is a bridge operator.\"}},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"registerCallbacks(address[])\":{\"details\":\"Registers multiple callbacks with the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to register.\"}},\"relayGlobalProposal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor.\"},\"relayProposal((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor.\"},\"removeBridgeOperators(address[])\":{\"details\":\"Removes multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to remove.\"}},\"resolveTargets(uint8[])\":{\"details\":\"Returns corresponding address of target options. Return address(0) on non-existent target.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setMinRequiredGovernor(uint256)\":{\"details\":\"Self-call to update the minimum required governor.\",\"params\":{\"min\":\"The minimum number, this must not less than 3.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumGovernorsWeight(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalBridgeOperator()\":{\"details\":\"Returns the total number of bridge operators.\",\"returns\":{\"_0\":\"The total number of bridge operators.\"}},\"unregisterCallbacks(address[])\":{\"details\":\"Unregisters multiple callbacks from the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to unregister.\"}},\"updateManyTargetOption(uint8[],address[])\":{\"details\":\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\"}},\"version\":1},\"userdoc\":{\"errors\":{\"ErrBelowMinRequiredGovernors()\":[{\"notice\":\"Error indicating that the governors list will go below minimum number of required governor.\"}],\"ErrGovernorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying governor\"}],\"ErrGovernorNotMatch(address,address)\":[{\"notice\":\"Error indicating that the msg.sender is not match the required governor\"}],\"ErrInvalidInput()\":[{\"notice\":\"Common invalid input error\"}],\"ErrOperatorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying operator\"}]},\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainBridgeManager.sol\":\"MainchainBridgeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\"./BridgeManagerCallbackRegister.sol\\\";\\nimport { IHasContracts, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\n\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { AddressArrayUtils } from \\\"../../libraries/AddressArrayUtils.sol\\\";\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\nimport { RoleAccess } from \\\"../../utils/RoleAccess.sol\\\";\\nimport { TUint256Slot } from \\\"../../types/Types.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"./BridgeManagerQuorum.sol\\\";\\n\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\n using AddressArrayUtils for address[];\\n\\n struct BridgeManagerStorage {\\n /// @notice List of the governors.\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\n address[] _governors;\\n address[] _operators;\\n /// @dev Mapping from address to the governor weight\\n mapping(address governor => uint96 weight) _governorWeight;\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\n mapping(address operator => uint96 weight) _operatorWeight;\\n /// @dev Total weight of all governors / operators.\\n uint256 _totalWeight;\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\n uint256 _minRequiredGovernor;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerStorageLocation\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n bytes32 public DOMAIN_SEPARATOR;\\n\\n modifier onlyGovernor() virtual {\\n _requireGovernor(msg.sender);\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function __BridgeManager_init(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n __BridgeManagerQuorum_init_unchained(num, denom);\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\n }\\n\\n function __BridgeManager_init_unchained(\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n _setContract(ContractType.BRIDGE, bridgeContract);\\n\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,bytes32 salt)\\\"),\\n keccak256(\\\"BridgeManager\\\"), // name hash\\n keccak256(\\\"3\\\"), // version hash\\n keccak256(abi.encode(\\\"BRIDGE_MANAGER\\\", roninChainId)) // salt\\n )\\n );\\n\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n _setMinRequiredGovernor(3);\\n }\\n\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerStorageLocation\\n }\\n }\\n\\n // ===================== CONFIG ========================\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\n _setMinRequiredGovernor(min);\\n }\\n\\n function _setMinRequiredGovernor(uint min) internal {\\n if (min < 3) revert ErrInvalidInput();\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n $._minRequiredGovernor = min;\\n emit MinRequiredGovernorUpdated(min);\\n }\\n\\n /**\\n * @dev Internal function to require that the caller has governor role access.\\n */\\n function _requireGovernor(address addr) internal view {\\n if (_getGovernorWeight(addr) == 0) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\n }\\n }\\n\\n // ===================== WEIGHTS METHOD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getTotalWeight() public view returns (uint256) {\\n return _totalWeight();\\n }\\n\\n function _totalWeight() internal view override returns (uint256) {\\n return _getBridgeManagerStorage()._totalWeight;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\n weights = _getGovernorWeights(governors);\\n }\\n\\n /**\\n * @dev Internal function to get the vote weights of a given array of governors.\\n */\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n weights = new uint96[](governors.length);\\n\\n for (uint256 i; i < governors.length; i++) {\\n weights[i] = $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\n weight = _getGovernorWeight(governor);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\n */\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\n return _getBridgeManagerStorage()._governorWeight[governor];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\n sum = _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\n * @param governors The non-duplicated input.\\n */\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n for (uint256 i; i < governors.length; i++) {\\n sum += $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n return $._operatorWeight[bridgeOperator];\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n (uint256 numerator, uint256 denominator) = getThreshold();\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\n }\\n\\n // ===================== MANAGER CRUD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _removeBridgeOperators(bridgeOperators);\\n }\\n\\n /**\\n * @dev Internal function to add bridge operators.\\n *\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to add bridge operators.\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\n *\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\n */\\n function _addBridgeOperators(\\n uint96[] memory voteWeights,\\n address[] memory newGovernors,\\n address[] memory newOperators\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = newOperators.length;\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\n addeds = new bool[](length);\\n\\n // simply skip add operations if inputs are empty.\\n if (length == 0) return addeds;\\n\\n address iGovernor;\\n address iOperator;\\n uint96 iVoteWeight;\\n uint256 accumulatedWeight;\\n\\n for (uint256 i; i < length; i++) {\\n iGovernor = newGovernors[i];\\n iOperator = newOperators[i];\\n iVoteWeight = voteWeights[i];\\n\\n // Check non-zero inputs\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n\\n // Check not yet added operators\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\n\\n // Only add the valid operator\\n if (addeds[i]) {\\n // Add governor to list, update governor weight\\n $._governors.push(iGovernor);\\n $._governorWeight[iGovernor] = iVoteWeight;\\n\\n // Add operator to list, update governor weight\\n $._operators.push(iOperator);\\n $._operatorWeight[iOperator] = iVoteWeight;\\n\\n accumulatedWeight += iVoteWeight;\\n }\\n }\\n\\n $._totalWeight += accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\n\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\n }\\n\\n /**\\n * @dev Internal function to remove bridge operators.\\n *\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to remove bridge operators.\\n *\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\n */\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = removingOperators.length;\\n removeds = new bool[](length);\\n\\n // simply skip remove operations if inputs are empty.\\n if (length == 0) return removeds;\\n if ($._governors.length - length < $._minRequiredGovernor) {\\n revert ErrBelowMinRequiredGovernors();\\n }\\n\\n address iGovernor;\\n address iOperator;\\n uint256 accumulatedWeight;\\n uint idx;\\n\\n for (uint256 i; i < length; i++) {\\n iOperator = removingOperators[i];\\n\\n // Check non-zero inputs\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n\\n // Check existing operators\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\n\\n // Only remove the valid operator\\n if (removeds[i]) {\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\n\\n // Remove governor from list, update governor weight\\n uint lastIdx = $._governors.length - 1;\\n $._governors[idx] = $._governors[lastIdx];\\n $._governors.pop();\\n delete $._governorWeight[iGovernor];\\n\\n // Remove operator from list, update operator weight\\n $._operators[idx] = $._operators[lastIdx];\\n $._operators.pop();\\n delete $._operatorWeight[iOperator];\\n\\n accumulatedWeight += removingVoteWeight;\\n }\\n }\\n\\n $._totalWeight -= accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\n\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\n }\\n\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\n for (uint i; i < $_array.length; i++) {\\n if (addr == $_array[i]) {\\n return (true, i);\\n }\\n }\\n\\n return (false, type(uint256).max);\\n }\\n\\n // ================= MANAGER VIEW METHODS =============\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function totalBridgeOperator() external view returns (uint256) {\\n return _getBridgeManagerStorage()._operators.length;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function isBridgeOperator(address addr) external view returns (bool) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n return $._operatorWeight[addr] > 0;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperators() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._operators;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernors() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._governors;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getOperatorOf(address governor) external view returns (address operator) {\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\n if (!found) revert ErrGovernorNotFound(governor);\\n\\n return _getBridgeManagerStorage()._operators[idx];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorOf(address operator) external view returns (address governor) {\\n (governor,) = _getGovernorOf(operator);\\n }\\n\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\n if (!found) revert ErrOperatorNotFound(operator);\\n\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n governors = $._governors;\\n bridgeOperators = $._operators;\\n weights = _getGovernorWeights(governors);\\n }\\n}\\n\",\"keccak256\":\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { IBridgeManagerCallbackRegister } from \\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\n\\n/**\\n * @title BridgeManagerCallbackRegister\\n * @dev A contract that manages callback registrations and execution for a bridge.\\n */\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n /**\\n * @dev Storage slot for the address set of callback registers.\\n * @dev Value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\") - 1.\\n */\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\n\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\n _registerCallbacks(callbackRegisters);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\n _registerCallbacks(registers);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n\\n for (uint256 i; i < registers.length; i++) {\\n _callbackRegisters.remove(registers[i]);\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\n registers = _getCallbackRegisters().values();\\n }\\n\\n /**\\n * @dev Internal function to register multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n address register;\\n bool regSuccess;\\n\\n for (uint256 i; i < registers.length; i++) {\\n register = registers[i];\\n\\n _requireHasCode(register);\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\n\\n regSuccess = _callbackRegisters.add(register);\\n\\n emit CallbackRegistered(register, regSuccess);\\n }\\n }\\n\\n /**\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\n */\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\n }\\n }\\n\\n /**\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\n * @param callbackFnSig The function signature of the callback method.\\n * @param inputs The data to pass to the callback method.\\n * @return allSuccess Return true if all internal calls are success\\n */\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\n allSuccess = true;\\n\\n address[] memory registers = _getCallbackRegisters().values();\\n uint256 length = registers.length;\\n if (length == 0) return allSuccess;\\n\\n bool[] memory successes = new bool[](length);\\n bytes[] memory returnDatas = new bytes[](length);\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\n\\n for (uint256 i; i < length; i++) {\\n // First, attempt to call normally\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\n\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\n if (!successes[i]) {\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\n allSuccess = allSuccess && successes[i];\\n }\\n }\\n\\n emit Notified(callData, registers, successes, returnDatas);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the address set of callback registers.\\n * @return callbackRegisters The storage reference to the callback registers.\\n */\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\n assembly (\\\"memory-safe\\\") {\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IQuorum } from \\\"../../interfaces/IQuorum.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\n struct BridgeManagerQuorumStorage {\\n uint256 _nonce;\\n uint256 _numerator;\\n uint256 _denominator;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerQuorumStorage\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\n\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n $._nonce = 1;\\n\\n _setThreshold(num, denom);\\n }\\n\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerQuorumStorage\\n }\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n return ($._numerator, $._denominator);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\n\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n uint256 prevNum = $._numerator;\\n uint256 prevDenom = $._denominator;\\n\\n $._numerator = num;\\n $._denominator = denom;\\n\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\n }\\n\\n function _totalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/CoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"../../libraries/Ballot.sol\\\";\\nimport \\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/SignatureConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\n\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Error thrown when attempting to interact with a finalized vote.\\n */\\n error ErrVoteIsFinalized();\\n\\n /**\\n * @dev Error thrown when the current proposal is not completed.\\n */\\n error ErrCurrentProposalIsNotCompleted();\\n\\n struct ProposalVote {\\n VoteStatus status;\\n bytes32 hash;\\n uint256 againstVoteWeight; // Total weight of against votes\\n uint256 forVoteWeight; // Total weight of for votes\\n address[] forVoteds; // Array of addresses voting for\\n address[] againstVoteds; // Array of addresses voting against\\n uint256 expiryTimestamp;\\n mapping(address => Signature) sig;\\n mapping(address => bool) voted;\\n }\\n\\n /// @dev Emitted when a proposal is created\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\n /// @dev Emitted when the proposal is voted\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\n /// @dev Emitted when the proposal is approved\\n event ProposalApproved(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is reject\\n event ProposalRejected(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is expired\\n event ProposalExpired(bytes32 indexed proposalHash);\\n /// @dev Emitted when the proposal is executed\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\n /// @dev Emitted when the proposal expiry duration is changed.\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\n\\n /// @dev Mapping from chain id => vote round\\n /// @notice chain id = 0 for global proposal\\n mapping(uint256 => uint256) public round;\\n /// @dev Mapping from chain id => vote round => proposal vote\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\n\\n uint256 internal _proposalExpiryDuration;\\n\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\n __CoreGovernance_init_unchained(expiryDuration);\\n }\\n\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\n _setProposalExpiryDuration(expiryDuration);\\n }\\n\\n /**\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\n * if it is expired and not increase the `_round`.\\n */\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\n _round = round[_chainId];\\n // Skip checking for the first ever round\\n if (_round == 0) {\\n _round = round[_chainId] = 1;\\n } else {\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\n if (!_isExpired) {\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\n unchecked {\\n _round = ++round[_chainId];\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\n */\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\n _vote.hash = _proposalHash;\\n _vote.expiryTimestamp = _expiryTimestamp;\\n }\\n\\n /**\\n * @dev Proposes proposal struct.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\n uint256 chainId = proposal.chainId;\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n round_ = _createVotingRound(chainId);\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\n }\\n\\n /**\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the round.\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\n * proposal is approved, executed or rejected.\\n *\\n */\\n function _castVote(\\n Proposal.ProposalDetail memory proposal,\\n Ballot.VoteType support,\\n uint256 minimumForVoteWeight,\\n uint256 minimumAgainstVoteWeight,\\n address voter,\\n Signature memory signature,\\n uint256 voterWeight\\n ) internal virtual returns (bool done) {\\n uint256 chainId = proposal.chainId;\\n uint256 round_ = proposal.nonce;\\n ProposalVote storage _vote = vote[chainId][round_];\\n\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\n return true;\\n }\\n\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\n\\n _vote.voted[voter] = true;\\n // Stores the signature if it is not empty\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\n _vote.sig[voter] = signature;\\n }\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\n\\n uint256 _forVoteWeight;\\n uint256 _againstVoteWeight;\\n if (support == Ballot.VoteType.For) {\\n _vote.forVoteds.push(voter);\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\n } else if (support == Ballot.VoteType.Against) {\\n _vote.againstVoteds.push(voter);\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_forVoteWeight >= minimumForVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n if (proposal.isAutoExecute()) {\\n _tryExecute(_vote, proposal);\\n }\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n }\\n }\\n\\n /**\\n * @dev The specified executor executes the proposal on an approved proposal.\\n */\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\n bytes32 proposalHash = proposal.hash();\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\n\\n if (_vote.hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\n }\\n\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\n\\n _tryExecute(_vote, proposal);\\n }\\n\\n /**\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\n *\\n * Emits the event `ProposalExpired` if the vote is expired.\\n *\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\n * before or it will emit an unexpected event of `ProposalExpired`.\\n */\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\n\\n if (isExpired) {\\n emit ProposalExpired(proposalVote.hash);\\n\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n delete proposalVote.status;\\n delete proposalVote.hash;\\n delete proposalVote.againstVoteWeight;\\n delete proposalVote.forVoteWeight;\\n delete proposalVote.forVoteds;\\n delete proposalVote.againstVoteds;\\n delete proposalVote.expiryTimestamp;\\n }\\n }\\n\\n /**\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\n */\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\n if (proposal.executable()) {\\n vote_.status = VoteStatus.Executed;\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\n }\\n }\\n\\n /**\\n * @dev Sets the expiry duration for a new proposal.\\n */\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\n _proposalExpiryDuration = expiryDuration;\\n emit ProposalExpiryDurationChanged(expiryDuration);\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\n return vote_.voted[voter];\\n }\\n\\n /**\\n * @dev Returns total weight from validators.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns minimum vote to pass a proposal.\\n */\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\n */\\n function _getChainType() internal view virtual returns (ChainType);\\n}\\n\",\"keccak256\":\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"./CoreGovernance.sol\\\";\\n\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\n\\n /// @dev Emitted when a proposal is created\\n event GlobalProposalCreated(\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n bytes32 globalProposalHash,\\n GlobalProposal.GlobalProposalDetail globalProposal,\\n address creator\\n );\\n\\n /// @dev Emitted when the target options are updated\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\n\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\n }\\n\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\n _updateManyTargetOption(targetOptions, addrs);\\n }\\n\\n /**\\n * @dev Proposes for a global proposal.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobal(\\n uint256 expiryTimestamp,\\n GlobalProposal.TargetOption[] calldata targetOptions,\\n address executor,\\n uint256[] memory values,\\n bytes[] memory calldatas,\\n uint256[] memory gasAmounts,\\n address creator\\n ) internal virtual {\\n uint256 round_ = _createVotingRound(0);\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Proposes global proposal struct.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobalStruct(\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\n address creator\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n uint256 round_ = _createVotingRound(0);\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\n\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\n */\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\n }\\n\\n /**\\n * @dev Internal helper of {resolveTargets}.\\n *\\n * @param strict When the param is set to `true`, revert on non-existent target.\\n */\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\n targets = new address[](targetOptions.length);\\n\\n for (uint256 i; i < targetOptions.length; ++i) {\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\n }\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n *\\n * Requirement:\\n * - Only allow self-call through proposal.\\n *\\n */\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\n // HACK: Cannot reuse the existing library due to too deep stack\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n _updateManyTargetOption(targetOptions, targets);\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n */\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\n for (uint256 i; i < targetOptions.length; ++i) {\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\n _updateTargetOption(targetOptions[i], targets[i]);\\n }\\n }\\n\\n /**\\n * @dev Updates `targetOption` to `target`.\\n *\\n * Requirement:\\n * - Emit a `TargetOptionUpdated` event.\\n */\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\n _targetOptionsMap[targetOption] = target;\\n emit TargetOptionUpdated(targetOption, target);\\n }\\n}\\n\",\"keccak256\":\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\n\\nabstract contract CommonGovernanceRelay is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Relays votes by signatures.\\n *\\n * @notice Does not store the voter signature into storage.\\n *\\n */\\n function _relayVotesBySignatures(\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 proposalHash\\n ) internal {\\n if (!(_supports.length > 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\n\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\n\\n address[] memory _forVoteSigners = new address[](_signatures.length);\\n address[] memory _againstVoteSigners = new address[](_signatures.length);\\n\\n {\\n uint256 _forVoteCount;\\n uint256 _againstVoteCount;\\n\\n {\\n address _signer;\\n address _lastSigner;\\n Ballot.VoteType _support;\\n Signature calldata _sig;\\n\\n for (uint256 _i; _i < _signatures.length;) {\\n _sig = _signatures[_i];\\n _support = _supports[_i];\\n\\n if (_support == Ballot.VoteType.For) {\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\n _forVoteSigners[_forVoteCount++] = _signer;\\n } else if (_support == Ballot.VoteType.Against) {\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\n _againstVoteSigners[_againstVoteCount++] = _signer;\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\n _lastSigner = _signer;\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n assembly {\\n mstore(_forVoteSigners, _forVoteCount)\\n mstore(_againstVoteSigners, _againstVoteCount)\\n }\\n }\\n\\n ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce];\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _totalForVoteWeight = _sumWeight(_forVoteSigners);\\n if (_totalForVoteWeight >= _minimumForVoteWeight) {\\n if (_totalForVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n _tryExecute(_vote, _proposal);\\n return;\\n }\\n\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\n uint256 _totalAgainstVoteWeight = _sumWeight(_againstVoteSigners);\\n if (_totalAgainstVoteWeight >= _minimumAgainstVoteWeight) {\\n if (_totalAgainstVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n return;\\n }\\n\\n revert ErrRelayFailed(msg.sig);\\n }\\n\\n /**\\n * @dev Returns the weight of the governor list.\\n */\\n function _sumWeight(address[] memory _governors) internal view virtual returns (uint256);\\n\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\n}\\n\",\"keccak256\":\"0x48b03ea86a3e312de4242115554d2188891719bcd3a20d8e4504b03319ba6993\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../GlobalCoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceRelay.sol\\\";\\n\\nabstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGovernance {\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\n */\\n function globalProposalRelayed(uint256 _round) external view returns (bool) {\\n return vote[0][_round].status != VoteStatus.Pending;\\n }\\n\\n /**\\n * @dev Relays voted global proposal.\\n *\\n * Requirements:\\n * - The relay proposal is finalized.\\n *\\n */\\n function _relayGlobalProposal(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures,\\n address creator\\n ) internal {\\n Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator);\\n _relayVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\n }\\n}\\n\",\"keccak256\":\"0x1d168ae3300e07f3b6312c61ea3d6021a12722c7122d9f2f3f782909d47e05d4\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceRelay.sol\\\";\\n\\nabstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Relays voted proposal.\\n *\\n * Requirements:\\n * - The relay proposal is finalized.\\n *\\n */\\n function _relayProposal(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n address _creator\\n ) internal {\\n _proposeProposalStruct(_proposal, _creator);\\n _relayVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\n }\\n}\\n\",\"keccak256\":\"0x050da96d4079cfb515a09ee8a61d5b6c782adf4559b2c66b618bd51f41ca1cd4\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerCallbackRegister {\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\n\\n event CallbackRegistered(address, bool);\\n /**\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\n */\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\n\\n /**\\n * @dev Retrieves the addresses of registered callbacks.\\n * @return registers An array containing the addresses of registered callbacks.\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers);\\n\\n /**\\n * @dev Registers multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function registerCallbacks(address[] calldata registers) external;\\n\\n /**\\n * @dev Unregisters multiple callbacks from the bridge.\\n * @param registers The array of callback addresses to unregister.\\n */\\n function unregisterCallbacks(address[] calldata registers) external;\\n}\\n\",\"keccak256\":\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/ChainTypeConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface ChainTypeConsumer {\\n enum ChainType {\\n RoninChain,\\n Mainchain\\n }\\n}\\n\",\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/Ballot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\n\\nlibrary Ballot {\\n using ECDSA for bytes32;\\n\\n enum VoteType {\\n For,\\n Against\\n }\\n\\n // keccak256(\\\"Ballot(bytes32 proposalHash,uint8 support)\\\");\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\n\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, BALLOT_TYPEHASH)\\n mstore(add(ptr, 0x20), _proposalHash)\\n mstore(add(ptr, 0x40), _support)\\n digest := keccak256(ptr, 0x60)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\",\"license\":\"MIT\"},\"src/libraries/GlobalProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proposal.sol\\\";\\n\\nlibrary GlobalProposal {\\n /**\\n * @dev Error thrown when attempting to interact with an unsupported target.\\n */\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\n\\n enum TargetOption {\\n BridgeManager, // 0\\n GatewayContract, // 1\\n BridgeReward, // 2\\n BridgeSlash, // 3\\n BridgeTracking, // 4\\n PauseEnforcer // 5\\n\\n }\\n\\n struct GlobalProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n uint256 expiryTimestamp;\\n address executor;\\n TargetOption[] targetOptions;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = self.values;\\n TargetOption[] memory targets = self.targetOptions;\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\n uint256[] memory gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length;) {\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * proposal.nonce,\\n * proposal.expiryTimestamp,\\n * proposal.executor,\\n * targetsHash,\\n * valuesHash,\\n * calldatasHash,\\n * gasAmountsHash\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0x80), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n digest_ := keccak256(ptr, 0x100)\\n }\\n }\\n\\n /**\\n * @dev Converts into the normal proposal.\\n */\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\n detail_.nonce = self.nonce;\\n detail_.chainId = 0;\\n detail_.expiryTimestamp = self.expiryTimestamp;\\n detail_.executor = self.executor;\\n\\n detail_.targets = new address[](self.targetOptions.length);\\n detail_.values = self.values;\\n detail_.calldatas = self.calldatas;\\n detail_.gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\n detail_.targets[i] = targets[i];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\",\"license\":\"MIT\"},\"src/libraries/Proposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary Proposal {\\n /**\\n * @dev Error thrown when there is insufficient gas to execute a function.\\n */\\n error ErrInsufficientGas(bytes32 proposalHash);\\n\\n /**\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\n */\\n error ErrInvalidExpiryTimestamp();\\n\\n /**\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\n */\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\n\\n struct ProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n // Value 0: all chain should run this proposal\\n // Other values: only specific chain has to execute\\n uint256 chainId;\\n uint256 expiryTimestamp;\\n // The address that execute the proposal after the proposal passes.\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\n address executor;\\n address[] targets;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\n\\n /**\\n * @dev Validates the proposal.\\n */\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\n if (\\n !(\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\n && proposal.targets.length == proposal.gasAmounts.length\\n )\\n ) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\n revert ErrInvalidExpiryTimestamp();\\n }\\n }\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = proposal.values;\\n address[] memory targets = proposal.targets;\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length; ++i) {\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\n }\\n\\n // return\\n // keccak256(\\n // abi.encode(\\n // TYPE_HASH,\\n // proposal.nonce,\\n // proposal.chainId,\\n // proposal.expiryTimestamp\\n // proposal.executor\\n // targetsHash,\\n // valuesHash,\\n // calldatasHash,\\n // gasAmountsHash\\n // )\\n // );\\n // /\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0x100), arrayHashed)\\n digest_ := keccak256(ptr, 0x120)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\n */\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\n return proposal.executor == address(0);\\n }\\n\\n /**\\n * @dev Returns whether the proposal is executable for the current chain.\\n *\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\n *\\n */\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\n }\\n\\n /**\\n * @dev Executes the proposal.\\n */\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\n\\n successCalls = new bool[](proposal.targets.length);\\n returnDatas = new bytes[](proposal.targets.length);\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\n\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\n\\n if (!successCalls[i]) {\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\",\"license\":\"MIT\"},\"src/mainchain/MainchainBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { CoreGovernance } from \\\"../extensions/sequential-governance/CoreGovernance.sol\\\";\\nimport { GlobalCoreGovernance, GlobalGovernanceRelay } from \\\"../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\";\\nimport { GovernanceRelay } from \\\"../extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\";\\nimport { ContractType, BridgeManager } from \\\"../extensions/bridge-operator-governance/BridgeManager.sol\\\";\\nimport { Ballot } from \\\"../libraries/Ballot.sol\\\";\\nimport { Proposal } from \\\"../libraries/Proposal.sol\\\";\\nimport { GlobalProposal } from \\\"../libraries/GlobalProposal.sol\\\";\\nimport \\\"../utils/CommonErrors.sol\\\";\\n\\ncontract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGovernanceRelay {\\n uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255;\\n\\n function initialize(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights,\\n GlobalProposal.TargetOption[] memory targetOptions,\\n address[] memory targets\\n ) external initializer {\\n __CoreGovernance_init(DEFAULT_EXPIRY_DURATION);\\n __GlobalCoreGovernance_init(targetOptions, targets);\\n __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights);\\n }\\n\\n /**\\n * @dev See `GovernanceRelay-_relayProposal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n */\\n function relayProposal(\\n Proposal.ProposalDetail calldata proposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external onlyGovernor {\\n _requireExecutor(proposal.executor, msg.sender);\\n _relayProposal(proposal, supports_, signatures, msg.sender);\\n }\\n\\n /**\\n * @dev See `GovernanceRelay-_relayGlobalProposal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n */\\n function relayGlobalProposal(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external onlyGovernor {\\n _requireExecutor(globalProposal.executor, msg.sender);\\n _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender });\\n }\\n\\n function _requireExecutor(address executor, address caller) internal pure {\\n if (executor != address(0) && caller != executor) {\\n revert ErrNonExecutorCannotRelay(executor, caller);\\n }\\n }\\n\\n /**\\n * @dev Internal function to retrieve the minimum vote weight required for governance actions.\\n * @return minimumVoteWeight The minimum vote weight required for governance actions.\\n */\\n function _getMinimumVoteWeight() internal view override returns (uint256) {\\n return minimumVoteWeight();\\n }\\n\\n /**\\n * @dev Returns the expiry duration for a new proposal.\\n */\\n function getProposalExpiryDuration() external view returns (uint256) {\\n return _proposalExpiryDuration;\\n }\\n\\n /**\\n * @dev Internal function to retrieve the total weights of all governors.\\n * @return totalWeights The total weights of all governors combined.\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return getTotalWeight();\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of weights for a given array of governors.\\n * @param governors An array containing the addresses of governors to calculate the sum of weights.\\n * @return sumWeights The sum of weights for the provided governors.\\n */\\n function _sumWeight(address[] memory governors) internal view override returns (uint256) {\\n return _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the chain type of the contract.\\n * @return chainType The chain type, indicating the type of the chain the contract operates on (e.g., Mainchain).\\n */\\n function _getChainType() internal pure override returns (ChainType) {\\n return ChainType.Mainchain;\\n }\\n\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\n return DOMAIN_SEPARATOR;\\n }\\n}\\n\",\"keccak256\":\"0xea177997b7100f310369b8fd530ea48ab823b06a53424c14f150cef723584c02\",\"license\":\"MIT\"},\"src/types/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { LibTUint256Slot } from \\\"./operations/LibTUint256Slot.sol\\\";\\n\\ntype TUint256Slot is bytes32;\\n\\nusing {\\n LibTUint256Slot.add,\\n LibTUint256Slot.sub,\\n LibTUint256Slot.mul,\\n LibTUint256Slot.div,\\n LibTUint256Slot.load,\\n LibTUint256Slot.store,\\n LibTUint256Slot.addAssign,\\n LibTUint256Slot.subAssign,\\n LibTUint256Slot.preDecrement,\\n LibTUint256Slot.postDecrement,\\n LibTUint256Slot.preIncrement,\\n LibTUint256Slot.postIncrement\\n} for TUint256Slot global;\\n\",\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\"},\"src/types/operations/LibTUint256Slot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { TUint256Slot } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title LibTUint256Slot\\n * @dev Library for handling unsigned 256-bit integers.\\n */\\nlibrary LibTUint256Slot {\\n /// @dev value is equal to bytes4(keccak256(\\\"Panic(uint256)\\\"))\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\n /// @dev error code for {Arithmetic over/underflow} error\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\n /// @dev error code for {Division or modulo by 0} error\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\n\\n /**\\n * @dev Loads the value of the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @return val The loaded value.\\n */\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\n assembly {\\n val := sload(self)\\n }\\n }\\n\\n /**\\n * @dev Stores a value into the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to be stored.\\n */\\n function store(TUint256Slot self, uint256 other) internal {\\n assembly {\\n sstore(self, other)\\n }\\n }\\n\\n /**\\n * @dev Multiplies the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to multiply by.\\n * @return res The resulting value after multiplication.\\n */\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n if iszero(iszero(storedVal)) {\\n res := mul(storedVal, other)\\n\\n // Overflow check\\n if iszero(eq(other, div(res, storedVal))) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Divides the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to divide by.\\n * @return res The resulting value after division.\\n */\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n // revert if divide by zero\\n if iszero(other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, DIVISION_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n res := div(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction.\\n */\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n\\n // Underflow check\\n if lt(storedVal, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n\\n res := sub(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition.\\n */\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n res := add(storedVal, other)\\n\\n // Overflow check\\n if lt(res, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after incrementing.\\n */\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = addAssign(self, 1);\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\n * @param self The TUint256Slot variable.\\n * @return res The original value before incrementing.\\n */\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res + 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after decrementing.\\n */\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = subAssign(self, 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value before decrementing.\\n */\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res - 1);\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition and storage.\\n */\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = add(self, other));\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction and storage.\\n */\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = sub(self, other));\\n }\\n}\\n\",\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 23, - "numDeployments": 1, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ErrBelowMinRequiredGovernors\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCurrentProposalIsNotCompleted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrDuplicated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"name\":\"ErrExistOneInternalCallFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"required\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ErrGovernorNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ErrInsufficientGas\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidArguments\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidExpiryTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidProposalNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidVoteWeight\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"callIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"revertMsg\",\"type\":\"bytes\"}],\"name\":\"ErrLooseProposalInternallyRevert\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"ErrNonExecutorCannotRelay\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrOnlySelfCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ErrOperatorNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrRelayFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrUnsupportedInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrUnsupportedVoteType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrVoteIsFinalized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorAddingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorRemovingFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromBridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toBridgeOperator\",\"type\":\"address\"}],\"name\":\"BridgeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"CallbackRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"MinRequiredGovernorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"Notified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"ProposalExpiryDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\",\"name\":\"targetOption\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"TargetOptionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"addBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"}],\"name\":\"getBridgeOperatorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCallbackRegisters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullBridgeOperatorInfos\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getGovernorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"weight\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGovernors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"}],\"name\":\"getOperatorOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProposalExpiryDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"globalProposalRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"callbackRegisters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"voteWeights\",\"type\":\"uint96[]\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isBridgeOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"registerCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayGlobalProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"supports_\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"bridgeOperators\",\"type\":\"address[]\"}],\"name\":\"removeBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"}],\"name\":\"resolveTargets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"}],\"name\":\"setMinRequiredGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"governors\",\"type\":\"address[]\"}],\"name\":\"sumGovernorsWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBridgeOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"registers\",\"type\":\"address[]\"}],\"name\":\"unregisterCallbacks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateManyTargetOption\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrCurrentProposalIsNotCompleted()\":[{\"details\":\"Error thrown when the current proposal is not completed.\"}],\"ErrDuplicated(bytes4)\":[{\"details\":\"Error thrown when a duplicated element is detected in an array.\",\"params\":{\"msgSig\":\"The function signature that invoke the error.\"}}],\"ErrInsufficientGas(bytes32)\":[{\"details\":\"Error thrown when there is insufficient gas to execute a function.\"}],\"ErrInvalidArguments(bytes4)\":[{\"details\":\"Error indicating that arguments are invalid.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidExpiryTimestamp()\":[{\"details\":\"Error thrown when an invalid expiry timestamp is provided.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidProposalNonce(bytes4)\":[{\"details\":\"Error indicating that the proposal nonce is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\"}}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidVoteWeight(bytes4)\":[{\"details\":\"Error indicating that a vote weight is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that encountered an invalid vote weight.\"}}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrLooseProposalInternallyRevert(uint256,bytes)\":[{\"details\":\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\"}],\"ErrNonExecutorCannotRelay(address,address)\":[{\"details\":\"Error of the `caller` to relay is not the specified `executor`.\"}],\"ErrOnlySelfCall(bytes4)\":[{\"details\":\"Error indicating that a function can only be called by the contract itself.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that can only be called by the contract itself.\"}}],\"ErrRelayFailed(bytes4)\":[{\"details\":\"Error indicating that a relay call has failed.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the relay call that failed.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedInterface(bytes4,address)\":[{\"details\":\"The error indicating an unsupported interface.\",\"params\":{\"addr\":\"The address where the unsupported interface was encountered.\",\"interfaceId\":\"The bytes4 interface identifier that is not supported.\"}}],\"ErrUnsupportedVoteType(bytes4)\":[{\"details\":\"Error indicating that a vote type is not supported.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\"}}],\"ErrVoteIsFinalized()\":[{\"details\":\"Error thrown when attempting to interact with a finalized vote.\"}],\"ErrZeroAddress(bytes4)\":[{\"details\":\"Error indicating that given address is null when it should not.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"BridgeOperatorAddingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to add.\"},\"BridgeOperatorRemovingFailed(address)\":{\"details\":\"Emitted when a bridge operator is failed to remove.\"},\"BridgeOperatorUpdated(address,address,address)\":{\"details\":\"Emitted when a bridge operator is updated.\"},\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\":{\"details\":\"Emitted when new bridge operators are added.\"},\"BridgeOperatorsRemoved(bool[],address[])\":{\"details\":\"Emitted when bridge operators are removed.\"},\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MinRequiredGovernorUpdated(uint256)\":{\"details\":\"Emitted when the minimum number of required governors is updated.\"},\"Notified(bytes,address[],bool[],bytes[])\":{\"details\":\"Emitted when the contract notifies multiple registers with statuses and return data.\"},\"ProposalApproved(bytes32)\":{\"details\":\"Emitted when the proposal is approved\"},\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\":{\"details\":\"Emitted when a proposal is created\"},\"ProposalExecuted(bytes32,bool[],bytes[])\":{\"details\":\"Emitted when the proposal is executed\"},\"ProposalExpired(bytes32)\":{\"details\":\"Emitted when the vote is expired\"},\"ProposalExpiryDurationChanged(uint256)\":{\"details\":\"Emitted when the proposal expiry duration is changed.\"},\"ProposalRejected(bytes32)\":{\"details\":\"Emitted when the vote is reject\"},\"ProposalVoted(bytes32,address,uint8,uint256)\":{\"details\":\"Emitted when the proposal is voted\"},\"TargetOptionUpdated(uint8,address)\":{\"details\":\"Emitted when the target options are updated\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"}},\"kind\":\"dev\",\"methods\":{\"addBridgeOperators(uint96[],address[],address[])\":{\"details\":\"Adds multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to add.\",\"governors\":\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\"}},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getBridgeOperatorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific bridge operator.\",\"params\":{\"bridgeOperator\":\"The address of the bridge operator to get the vote weight for.\"},\"returns\":{\"weight\":\"The vote weight of the specified bridge operator.\"}},\"getBridgeOperators()\":{\"details\":\"Returns an array of all bridge operators.\",\"returns\":{\"_0\":\"An array containing the addresses of all bridge operators.\"}},\"getCallbackRegisters()\":{\"details\":\"Retrieves the addresses of registered callbacks.\",\"returns\":{\"registers\":\"An array containing the addresses of registered callbacks.\"}},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getFullBridgeOperatorInfos()\":{\"details\":\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\",\"returns\":{\"bridgeOperators\":\"An array of addresses representing the registered bridge operators.\",\"governors\":\"An array of addresses representing the governors of each bridge operator.\",\"weights\":\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\"}},\"getGovernorOf(address)\":{\"details\":\"Returns the corresponding `governor` of a `operator`.\"},\"getGovernorWeight(address)\":{\"details\":\"External function to retrieve the vote weight of a specific governor.\",\"params\":{\"governor\":\"The address of the governor to get the vote weight for.\"},\"returns\":{\"weight\":\"voteWeight The vote weight of the specified governor.\"}},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getGovernors()\":{\"details\":\"Returns an array of all governors.\",\"returns\":{\"_0\":\"An array containing the addresses of all governors.\"}},\"getOperatorOf(address)\":{\"details\":\"Returns the corresponding `operator` of a `governor`.\"},\"getProposalExpiryDuration()\":{\"details\":\"Returns the expiry duration for a new proposal.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTotalWeight()\":{\"details\":\"Returns total weights.\"},\"globalProposalRelayed(uint256)\":{\"details\":\"Returns whether the voter `_voter` casted vote for the proposal.\"},\"isBridgeOperator(address)\":{\"details\":\"Checks if the given address is a bridge operator.\",\"params\":{\"addr\":\"The address to check.\"},\"returns\":{\"_0\":\"A boolean indicating whether the address is a bridge operator.\"}},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"registerCallbacks(address[])\":{\"details\":\"Registers multiple callbacks with the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to register.\"}},\"relayGlobalProposal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor.\"},\"relayProposal((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor.\"},\"removeBridgeOperators(address[])\":{\"details\":\"Removes multiple bridge operators.\",\"params\":{\"bridgeOperators\":\"An array of addresses representing the bridge operators to remove.\"}},\"resolveTargets(uint8[])\":{\"details\":\"Returns corresponding address of target options. Return address(0) on non-existent target.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setMinRequiredGovernor(uint256)\":{\"details\":\"Self-call to update the minimum required governor.\",\"params\":{\"min\":\"The minimum number, this must not less than 3.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumGovernorsWeight(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalBridgeOperator()\":{\"details\":\"Returns the total number of bridge operators.\",\"returns\":{\"_0\":\"The total number of bridge operators.\"}},\"unregisterCallbacks(address[])\":{\"details\":\"Unregisters multiple callbacks from the bridge.\",\"params\":{\"registers\":\"The array of callback addresses to unregister.\"}},\"updateManyTargetOption(uint8[],address[])\":{\"details\":\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\"}},\"version\":1},\"userdoc\":{\"errors\":{\"ErrBelowMinRequiredGovernors()\":[{\"notice\":\"Error indicating that the governors list will go below minimum number of required governor.\"}],\"ErrGovernorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying governor\"}],\"ErrGovernorNotMatch(address,address)\":[{\"notice\":\"Error indicating that the msg.sender is not match the required governor\"}],\"ErrInvalidInput()\":[{\"notice\":\"Common invalid input error\"}],\"ErrOperatorNotFound(address)\":[{\"notice\":\"Error indicating that cannot find the querying operator\"}]},\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainBridgeManager.sol\":\"MainchainBridgeManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\"./BridgeManagerCallbackRegister.sol\\\";\\nimport { IHasContracts, HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\n\\nimport { IBridgeManager } from \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { AddressArrayUtils } from \\\"../../libraries/AddressArrayUtils.sol\\\";\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\nimport { RoleAccess } from \\\"../../utils/RoleAccess.sol\\\";\\nimport { TUint256Slot } from \\\"../../types/Types.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"./BridgeManagerQuorum.sol\\\";\\n\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\n using AddressArrayUtils for address[];\\n\\n struct BridgeManagerStorage {\\n /// @notice List of the governors.\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\n address[] _governors;\\n address[] _operators;\\n /// @dev Mapping from address to the governor weight\\n mapping(address governor => uint96 weight) _governorWeight;\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\n mapping(address operator => uint96 weight) _operatorWeight;\\n /// @dev Total weight of all governors / operators.\\n uint256 _totalWeight;\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\n uint256 _minRequiredGovernor;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerStorageLocation\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n bytes32 public DOMAIN_SEPARATOR;\\n\\n modifier onlyGovernor() virtual {\\n _requireGovernor(msg.sender);\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function __BridgeManager_init(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n __BridgeManagerQuorum_init_unchained(num, denom);\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\n }\\n\\n function __BridgeManager_init_unchained(\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights\\n ) internal onlyInitializing {\\n _setContract(ContractType.BRIDGE, bridgeContract);\\n\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,bytes32 salt)\\\"),\\n keccak256(\\\"BridgeManager\\\"), // name hash\\n keccak256(\\\"3\\\"), // version hash\\n keccak256(abi.encode(\\\"BRIDGE_MANAGER\\\", roninChainId)) // salt\\n )\\n );\\n\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n _setMinRequiredGovernor(3);\\n }\\n\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerStorageLocation\\n }\\n }\\n\\n // ===================== CONFIG ========================\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\n _setMinRequiredGovernor(min);\\n }\\n\\n function _setMinRequiredGovernor(uint min) internal {\\n if (min < 3) revert ErrInvalidInput();\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n $._minRequiredGovernor = min;\\n emit MinRequiredGovernorUpdated(min);\\n }\\n\\n /**\\n * @dev Internal function to require that the caller has governor role access.\\n */\\n function _requireGovernor(address addr) internal view {\\n if (_getGovernorWeight(addr) == 0) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\n }\\n }\\n\\n // ===================== WEIGHTS METHOD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getTotalWeight() public view returns (uint256) {\\n return _totalWeight();\\n }\\n\\n function _totalWeight() internal view override returns (uint256) {\\n return _getBridgeManagerStorage()._totalWeight;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\n weights = _getGovernorWeights(governors);\\n }\\n\\n /**\\n * @dev Internal function to get the vote weights of a given array of governors.\\n */\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n weights = new uint96[](governors.length);\\n\\n for (uint256 i; i < governors.length; i++) {\\n weights[i] = $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\n weight = _getGovernorWeight(governor);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\n */\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\n return _getBridgeManagerStorage()._governorWeight[governor];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\n sum = _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\n * @param governors The non-duplicated input.\\n */\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n for (uint256 i; i < governors.length; i++) {\\n sum += $._governorWeight[governors[i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n return $._operatorWeight[bridgeOperator];\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n (uint256 numerator, uint256 denominator) = getThreshold();\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\n }\\n\\n // ===================== MANAGER CRUD ========================\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\n _removeBridgeOperators(bridgeOperators);\\n }\\n\\n /**\\n * @dev Internal function to add bridge operators.\\n *\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to add bridge operators.\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\n *\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\n */\\n function _addBridgeOperators(\\n uint96[] memory voteWeights,\\n address[] memory newGovernors,\\n address[] memory newOperators\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = newOperators.length;\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\n addeds = new bool[](length);\\n\\n // simply skip add operations if inputs are empty.\\n if (length == 0) return addeds;\\n\\n address iGovernor;\\n address iOperator;\\n uint96 iVoteWeight;\\n uint256 accumulatedWeight;\\n\\n for (uint256 i; i < length; i++) {\\n iGovernor = newGovernors[i];\\n iOperator = newOperators[i];\\n iVoteWeight = voteWeights[i];\\n\\n // Check non-zero inputs\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n\\n // Check not yet added operators\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\n\\n // Only add the valid operator\\n if (addeds[i]) {\\n // Add governor to list, update governor weight\\n $._governors.push(iGovernor);\\n $._governorWeight[iGovernor] = iVoteWeight;\\n\\n // Add operator to list, update governor weight\\n $._operators.push(iOperator);\\n $._operatorWeight[iOperator] = iVoteWeight;\\n\\n accumulatedWeight += iVoteWeight;\\n }\\n }\\n\\n $._totalWeight += accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\n\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\n }\\n\\n /**\\n * @dev Internal function to remove bridge operators.\\n *\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\n *\\n * Requirements:\\n * - The caller must have the necessary permission to remove bridge operators.\\n *\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\n */\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n uint256 length = removingOperators.length;\\n removeds = new bool[](length);\\n\\n // simply skip remove operations if inputs are empty.\\n if (length == 0) return removeds;\\n if ($._governors.length - length < $._minRequiredGovernor) {\\n revert ErrBelowMinRequiredGovernors();\\n }\\n\\n address iGovernor;\\n address iOperator;\\n uint256 accumulatedWeight;\\n uint idx;\\n\\n for (uint256 i; i < length; i++) {\\n iOperator = removingOperators[i];\\n\\n // Check non-zero inputs\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\n _requireNonZeroAddress(iGovernor);\\n _requireNonZeroAddress(iOperator);\\n\\n // Check existing operators\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\n\\n // Only remove the valid operator\\n if (removeds[i]) {\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\n\\n // Remove governor from list, update governor weight\\n uint lastIdx = $._governors.length - 1;\\n $._governors[idx] = $._governors[lastIdx];\\n $._governors.pop();\\n delete $._governorWeight[iGovernor];\\n\\n // Remove operator from list, update operator weight\\n $._operators[idx] = $._operators[lastIdx];\\n $._operators.pop();\\n delete $._operatorWeight[iOperator];\\n\\n accumulatedWeight += removingVoteWeight;\\n }\\n }\\n\\n $._totalWeight -= accumulatedWeight;\\n\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\n\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\n }\\n\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\n for (uint i; i < $_array.length; i++) {\\n if (addr == $_array[i]) {\\n return (true, i);\\n }\\n }\\n\\n return (false, type(uint256).max);\\n }\\n\\n // ================= MANAGER VIEW METHODS =============\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function totalBridgeOperator() external view returns (uint256) {\\n return _getBridgeManagerStorage()._operators.length;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function isBridgeOperator(address addr) external view returns (bool) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n return $._operatorWeight[addr] > 0;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getBridgeOperators() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._operators;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernors() external view returns (address[] memory) {\\n return _getBridgeManagerStorage()._governors;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getOperatorOf(address governor) external view returns (address operator) {\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\n if (!found) revert ErrGovernorNotFound(governor);\\n\\n return _getBridgeManagerStorage()._operators[idx];\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getGovernorOf(address operator) external view returns (address governor) {\\n (governor,) = _getGovernorOf(operator);\\n }\\n\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\n if (!found) revert ErrOperatorNotFound(operator);\\n\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManager\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\n\\n governors = $._governors;\\n bridgeOperators = $._operators;\\n weights = _getGovernorWeights(governors);\\n }\\n}\\n\",\"keccak256\":\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { EnumerableSet } from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport { IBridgeManagerCallbackRegister } from \\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\n\\n/**\\n * @title BridgeManagerCallbackRegister\\n * @dev A contract that manages callback registrations and execution for a bridge.\\n */\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n /**\\n * @dev Storage slot for the address set of callback registers.\\n * @dev Value is equal to keccak256(\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\") - 1.\\n */\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\n\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\n _registerCallbacks(callbackRegisters);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\n _registerCallbacks(registers);\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n\\n for (uint256 i; i < registers.length; i++) {\\n _callbackRegisters.remove(registers[i]);\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallbackRegister\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\n registers = _getCallbackRegisters().values();\\n }\\n\\n /**\\n * @dev Internal function to register multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\n address register;\\n bool regSuccess;\\n\\n for (uint256 i; i < registers.length; i++) {\\n register = registers[i];\\n\\n _requireHasCode(register);\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\n\\n regSuccess = _callbackRegisters.add(register);\\n\\n emit CallbackRegistered(register, regSuccess);\\n }\\n }\\n\\n /**\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\n */\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\n }\\n }\\n\\n /**\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\n * @param callbackFnSig The function signature of the callback method.\\n * @param inputs The data to pass to the callback method.\\n * @return allSuccess Return true if all internal calls are success\\n */\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\n allSuccess = true;\\n\\n address[] memory registers = _getCallbackRegisters().values();\\n uint256 length = registers.length;\\n if (length == 0) return allSuccess;\\n\\n bool[] memory successes = new bool[](length);\\n bytes[] memory returnDatas = new bytes[](length);\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\n\\n for (uint256 i; i < length; i++) {\\n // First, attempt to call normally\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\n\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\n if (!successes[i]) {\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\n allSuccess = allSuccess && successes[i];\\n }\\n }\\n\\n emit Notified(callData, registers, successes, returnDatas);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the address set of callback registers.\\n * @return callbackRegisters The storage reference to the callback registers.\\n */\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\n assembly (\\\"memory-safe\\\") {\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\n }\\n }\\n}\\n\",\"keccak256\":\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\",\"license\":\"MIT\"},\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport { Initializable } from \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IQuorum } from \\\"../../interfaces/IQuorum.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { HasContracts } from \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\n struct BridgeManagerQuorumStorage {\\n uint256 _nonce;\\n uint256 _numerator;\\n uint256 _denominator;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"ronin.storage.BridgeManagerQuorumStorage\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\n\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n $._nonce = 1;\\n\\n _setThreshold(num, denom);\\n }\\n\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\n assembly {\\n $.slot := $$_BridgeManagerQuorumStorage\\n }\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n return ($._numerator, $._denominator);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\n\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\n\\n uint256 prevNum = $._numerator;\\n uint256 prevDenom = $._denominator;\\n\\n $._numerator = num;\\n $._denominator = denom;\\n\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\n }\\n\\n function _totalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/CoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\nimport \\\"../../libraries/Ballot.sol\\\";\\nimport \\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/SignatureConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\n\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\n using Proposal for Proposal.ProposalDetail;\\n\\n /**\\n * @dev Error thrown when attempting to interact with a finalized vote.\\n */\\n error ErrVoteIsFinalized();\\n\\n /**\\n * @dev Error thrown when the current proposal is not completed.\\n */\\n error ErrCurrentProposalIsNotCompleted();\\n\\n struct ProposalVote {\\n VoteStatus status;\\n bytes32 hash;\\n uint256 againstVoteWeight; // Total weight of against votes\\n uint256 forVoteWeight; // Total weight of for votes\\n address[] forVoteds; // Array of addresses voting for\\n address[] againstVoteds; // Array of addresses voting against\\n uint256 expiryTimestamp;\\n mapping(address => Signature) sig;\\n mapping(address => bool) voted;\\n }\\n\\n /// @dev Emitted when a proposal is created\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\n /// @dev Emitted when the proposal is voted\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\n /// @dev Emitted when the proposal is approved\\n event ProposalApproved(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is reject\\n event ProposalRejected(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is expired\\n event ProposalExpired(bytes32 indexed proposalHash);\\n /// @dev Emitted when the proposal is executed\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\n /// @dev Emitted when the proposal expiry duration is changed.\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\n\\n /// @dev Mapping from chain id => vote round\\n /// @notice chain id = 0 for global proposal\\n mapping(uint256 => uint256) public round;\\n /// @dev Mapping from chain id => vote round => proposal vote\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\n\\n uint256 internal _proposalExpiryDuration;\\n\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\n __CoreGovernance_init_unchained(expiryDuration);\\n }\\n\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\n _setProposalExpiryDuration(expiryDuration);\\n }\\n\\n /**\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\n * if it is expired and not increase the `_round`.\\n */\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\n _round = round[_chainId];\\n // Skip checking for the first ever round\\n if (_round == 0) {\\n _round = round[_chainId] = 1;\\n } else {\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\n if (!_isExpired) {\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\n unchecked {\\n _round = ++round[_chainId];\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\n */\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\n _vote.hash = _proposalHash;\\n _vote.expiryTimestamp = _expiryTimestamp;\\n }\\n\\n /**\\n * @dev Proposes proposal struct.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\n uint256 chainId = proposal.chainId;\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n round_ = _createVotingRound(chainId);\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\n }\\n\\n /**\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the round.\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\n * proposal is approved, executed or rejected.\\n *\\n */\\n function _castVote(\\n Proposal.ProposalDetail memory proposal,\\n Ballot.VoteType support,\\n uint256 minimumForVoteWeight,\\n uint256 minimumAgainstVoteWeight,\\n address voter,\\n Signature memory signature,\\n uint256 voterWeight\\n ) internal virtual returns (bool done) {\\n uint256 chainId = proposal.chainId;\\n uint256 round_ = proposal.nonce;\\n ProposalVote storage _vote = vote[chainId][round_];\\n\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\n return true;\\n }\\n\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\n\\n _vote.voted[voter] = true;\\n // Stores the signature if it is not empty\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\n _vote.sig[voter] = signature;\\n }\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\n\\n uint256 _forVoteWeight;\\n uint256 _againstVoteWeight;\\n if (support == Ballot.VoteType.For) {\\n _vote.forVoteds.push(voter);\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\n } else if (support == Ballot.VoteType.Against) {\\n _vote.againstVoteds.push(voter);\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_forVoteWeight >= minimumForVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n if (proposal.isAutoExecute()) {\\n _tryExecute(_vote, proposal);\\n }\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\n done = true;\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n }\\n }\\n\\n /**\\n * @dev The specified executor executes the proposal on an approved proposal.\\n */\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\n bytes32 proposalHash = proposal.hash();\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\n\\n if (_vote.hash != proposalHash) {\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\n }\\n\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\n\\n _tryExecute(_vote, proposal);\\n }\\n\\n /**\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\n *\\n * Emits the event `ProposalExpired` if the vote is expired.\\n *\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\n * before or it will emit an unexpected event of `ProposalExpired`.\\n */\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\n\\n if (isExpired) {\\n emit ProposalExpired(proposalVote.hash);\\n\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n delete proposalVote.status;\\n delete proposalVote.hash;\\n delete proposalVote.againstVoteWeight;\\n delete proposalVote.forVoteWeight;\\n delete proposalVote.forVoteds;\\n delete proposalVote.againstVoteds;\\n delete proposalVote.expiryTimestamp;\\n }\\n }\\n\\n /**\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\n */\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\n if (proposal.executable()) {\\n vote_.status = VoteStatus.Executed;\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\n }\\n }\\n\\n /**\\n * @dev Sets the expiry duration for a new proposal.\\n */\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\n _proposalExpiryDuration = expiryDuration;\\n emit ProposalExpiryDurationChanged(expiryDuration);\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\n return vote_.voted[voter];\\n }\\n\\n /**\\n * @dev Returns total weight from validators.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns minimum vote to pass a proposal.\\n */\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\n */\\n function _getChainType() internal view virtual returns (ChainType);\\n}\\n\",\"keccak256\":\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"./CoreGovernance.sol\\\";\\n\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\n\\n /// @dev Emitted when a proposal is created\\n event GlobalProposalCreated(\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n bytes32 globalProposalHash,\\n GlobalProposal.GlobalProposalDetail globalProposal,\\n address creator\\n );\\n\\n /// @dev Emitted when the target options are updated\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\n\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\n }\\n\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\n _updateManyTargetOption(targetOptions, addrs);\\n }\\n\\n /**\\n * @dev Proposes for a global proposal.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobal(\\n uint256 expiryTimestamp,\\n GlobalProposal.TargetOption[] calldata targetOptions,\\n address executor,\\n uint256[] memory values,\\n bytes[] memory calldatas,\\n uint256[] memory gasAmounts,\\n address creator\\n ) internal virtual {\\n uint256 round_ = _createVotingRound(0);\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Proposes global proposal struct.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobalStruct(\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\n address creator\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\n proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 proposalHash = proposal.hash();\\n uint256 round_ = _createVotingRound(0);\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\n\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\n }\\n\\n /**\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\n */\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\n }\\n\\n /**\\n * @dev Internal helper of {resolveTargets}.\\n *\\n * @param strict When the param is set to `true`, revert on non-existent target.\\n */\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\n targets = new address[](targetOptions.length);\\n\\n for (uint256 i; i < targetOptions.length; ++i) {\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\n }\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n *\\n * Requirement:\\n * - Only allow self-call through proposal.\\n *\\n */\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\n // HACK: Cannot reuse the existing library due to too deep stack\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n _updateManyTargetOption(targetOptions, targets);\\n }\\n\\n /**\\n * @dev Updates list of `targetOptions` to `targets`.\\n */\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\n for (uint256 i; i < targetOptions.length; ++i) {\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\n _updateTargetOption(targetOptions[i], targets[i]);\\n }\\n }\\n\\n /**\\n * @dev Updates `targetOption` to `target`.\\n *\\n * Requirement:\\n * - Emit a `TargetOptionUpdated` event.\\n */\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\n _targetOptionsMap[targetOption] = target;\\n emit TargetOptionUpdated(targetOption, target);\\n }\\n}\\n\",\"keccak256\":\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\n\\nabstract contract CommonGovernanceRelay is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Relays votes by signatures.\\n *\\n * @notice Does not store the voter signature into storage.\\n *\\n */\\n function _relayVotesBySignatures(\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 proposalHash\\n ) internal {\\n if (!(_supports.length > 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\n\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\n\\n address[] memory _forVoteSigners = new address[](_signatures.length);\\n address[] memory _againstVoteSigners = new address[](_signatures.length);\\n\\n {\\n uint256 _forVoteCount;\\n uint256 _againstVoteCount;\\n\\n {\\n address _signer;\\n address _lastSigner;\\n Ballot.VoteType _support;\\n Signature calldata _sig;\\n\\n for (uint256 _i; _i < _signatures.length;) {\\n _sig = _signatures[_i];\\n _support = _supports[_i];\\n\\n if (_support == Ballot.VoteType.For) {\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\n _forVoteSigners[_forVoteCount++] = _signer;\\n } else if (_support == Ballot.VoteType.Against) {\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\n _againstVoteSigners[_againstVoteCount++] = _signer;\\n } else {\\n revert ErrUnsupportedVoteType(msg.sig);\\n }\\n\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\n _lastSigner = _signer;\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n assembly {\\n mstore(_forVoteSigners, _forVoteCount)\\n mstore(_againstVoteSigners, _againstVoteCount)\\n }\\n }\\n\\n ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce];\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _totalForVoteWeight = _sumWeight(_forVoteSigners);\\n if (_totalForVoteWeight >= _minimumForVoteWeight) {\\n if (_totalForVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n _tryExecute(_vote, _proposal);\\n return;\\n }\\n\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\n uint256 _totalAgainstVoteWeight = _sumWeight(_againstVoteSigners);\\n if (_totalAgainstVoteWeight >= _minimumAgainstVoteWeight) {\\n if (_totalAgainstVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n return;\\n }\\n\\n revert ErrRelayFailed(msg.sig);\\n }\\n\\n /**\\n * @dev Returns the weight of the governor list.\\n */\\n function _sumWeight(address[] memory _governors) internal view virtual returns (uint256);\\n\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\n}\\n\",\"keccak256\":\"0x48b03ea86a3e312de4242115554d2188891719bcd3a20d8e4504b03319ba6993\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../GlobalCoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceRelay.sol\\\";\\n\\nabstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGovernance {\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\n */\\n function globalProposalRelayed(uint256 _round) external view returns (bool) {\\n return vote[0][_round].status != VoteStatus.Pending;\\n }\\n\\n /**\\n * @dev Relays voted global proposal.\\n *\\n * Requirements:\\n * - The relay proposal is finalized.\\n *\\n */\\n function _relayGlobalProposal(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures,\\n address creator\\n ) internal {\\n Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator);\\n _relayVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\n }\\n}\\n\",\"keccak256\":\"0x1d168ae3300e07f3b6312c61ea3d6021a12722c7122d9f2f3f782909d47e05d4\",\"license\":\"MIT\"},\"src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../CoreGovernance.sol\\\";\\nimport \\\"./CommonGovernanceRelay.sol\\\";\\n\\nabstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Relays voted proposal.\\n *\\n * Requirements:\\n * - The relay proposal is finalized.\\n *\\n */\\n function _relayProposal(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n address _creator\\n ) internal {\\n _proposeProposalStruct(_proposal, _creator);\\n _relayVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\n }\\n}\\n\",\"keccak256\":\"0x050da96d4079cfb515a09ee8a61d5b6c782adf4559b2c66b618bd51f41ca1cd4\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerCallbackRegister {\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\n\\n event CallbackRegistered(address, bool);\\n /**\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\n */\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\n\\n /**\\n * @dev Retrieves the addresses of registered callbacks.\\n * @return registers An array containing the addresses of registered callbacks.\\n */\\n function getCallbackRegisters() external view returns (address[] memory registers);\\n\\n /**\\n * @dev Registers multiple callbacks with the bridge.\\n * @param registers The array of callback addresses to register.\\n */\\n function registerCallbacks(address[] calldata registers) external;\\n\\n /**\\n * @dev Unregisters multiple callbacks from the bridge.\\n * @param registers The array of callback addresses to unregister.\\n */\\n function unregisterCallbacks(address[] calldata registers) external;\\n}\\n\",\"keccak256\":\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/ChainTypeConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface ChainTypeConsumer {\\n enum ChainType {\\n RoninChain,\\n Mainchain\\n }\\n}\\n\",\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/Ballot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\n\\nlibrary Ballot {\\n using ECDSA for bytes32;\\n\\n enum VoteType {\\n For,\\n Against\\n }\\n\\n // keccak256(\\\"Ballot(bytes32 proposalHash,uint8 support)\\\");\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\n\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, BALLOT_TYPEHASH)\\n mstore(add(ptr, 0x20), _proposalHash)\\n mstore(add(ptr, 0x40), _support)\\n digest := keccak256(ptr, 0x60)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\",\"license\":\"MIT\"},\"src/libraries/GlobalProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proposal.sol\\\";\\n\\nlibrary GlobalProposal {\\n /**\\n * @dev Error thrown when attempting to interact with an unsupported target.\\n */\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\n\\n enum TargetOption {\\n BridgeManager, // 0\\n GatewayContract, // 1\\n BridgeReward, // 2\\n BridgeSlash, // 3\\n BridgeTracking, // 4\\n PauseEnforcer // 5\\n\\n }\\n\\n struct GlobalProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n uint256 expiryTimestamp;\\n address executor;\\n TargetOption[] targetOptions;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = self.values;\\n TargetOption[] memory targets = self.targetOptions;\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\n uint256[] memory gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length;) {\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * proposal.nonce,\\n * proposal.expiryTimestamp,\\n * proposal.executor,\\n * targetsHash,\\n * valuesHash,\\n * calldatasHash,\\n * gasAmountsHash\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0x80), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n digest_ := keccak256(ptr, 0x100)\\n }\\n }\\n\\n /**\\n * @dev Converts into the normal proposal.\\n */\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\n detail_.nonce = self.nonce;\\n detail_.chainId = 0;\\n detail_.expiryTimestamp = self.expiryTimestamp;\\n detail_.executor = self.executor;\\n\\n detail_.targets = new address[](self.targetOptions.length);\\n detail_.values = self.values;\\n detail_.calldatas = self.calldatas;\\n detail_.gasAmounts = self.gasAmounts;\\n\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\n detail_.targets[i] = targets[i];\\n }\\n }\\n}\\n\",\"keccak256\":\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\",\"license\":\"MIT\"},\"src/libraries/Proposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary Proposal {\\n /**\\n * @dev Error thrown when there is insufficient gas to execute a function.\\n */\\n error ErrInsufficientGas(bytes32 proposalHash);\\n\\n /**\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\n */\\n error ErrInvalidExpiryTimestamp();\\n\\n /**\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\n */\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\n\\n struct ProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n // Value 0: all chain should run this proposal\\n // Other values: only specific chain has to execute\\n uint256 chainId;\\n uint256 expiryTimestamp;\\n // The address that execute the proposal after the proposal passes.\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\n address executor;\\n address[] targets;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\n\\n /**\\n * @dev Validates the proposal.\\n */\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\n if (\\n !(\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\n && proposal.targets.length == proposal.gasAmounts.length\\n )\\n ) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\n revert ErrInvalidExpiryTimestamp();\\n }\\n }\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\n uint256[] memory values = proposal.values;\\n address[] memory targets = proposal.targets;\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\n\\n for (uint256 i; i < calldataHashList.length; ++i) {\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\n }\\n\\n // return\\n // keccak256(\\n // abi.encode(\\n // TYPE_HASH,\\n // proposal.nonce,\\n // proposal.chainId,\\n // proposal.expiryTimestamp\\n // proposal.executor\\n // targetsHash,\\n // valuesHash,\\n // calldatasHash,\\n // gasAmountsHash\\n // )\\n // );\\n // /\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\n\\n let arrayHashed\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\n mstore(add(ptr, 0xa0), arrayHashed)\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\n mstore(add(ptr, 0xc0), arrayHashed)\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\n mstore(add(ptr, 0xe0), arrayHashed)\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\n mstore(add(ptr, 0x100), arrayHashed)\\n digest_ := keccak256(ptr, 0x120)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\n */\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\n return proposal.executor == address(0);\\n }\\n\\n /**\\n * @dev Returns whether the proposal is executable for the current chain.\\n *\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\n *\\n */\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\n }\\n\\n /**\\n * @dev Executes the proposal.\\n */\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\n\\n successCalls = new bool[](proposal.targets.length);\\n returnDatas = new bytes[](proposal.targets.length);\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\n\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\n\\n if (!successCalls[i]) {\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\",\"license\":\"MIT\"},\"src/mainchain/MainchainBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { CoreGovernance } from \\\"../extensions/sequential-governance/CoreGovernance.sol\\\";\\nimport { GlobalCoreGovernance, GlobalGovernanceRelay } from \\\"../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\";\\nimport { GovernanceRelay } from \\\"../extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\";\\nimport { ContractType, BridgeManager } from \\\"../extensions/bridge-operator-governance/BridgeManager.sol\\\";\\nimport { Ballot } from \\\"../libraries/Ballot.sol\\\";\\nimport { Proposal } from \\\"../libraries/Proposal.sol\\\";\\nimport { GlobalProposal } from \\\"../libraries/GlobalProposal.sol\\\";\\nimport \\\"../utils/CommonErrors.sol\\\";\\n\\ncontract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGovernanceRelay {\\n uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255;\\n\\n function initialize(\\n uint256 num,\\n uint256 denom,\\n uint256 roninChainId,\\n address bridgeContract,\\n address[] memory callbackRegisters,\\n address[] memory bridgeOperators,\\n address[] memory governors,\\n uint96[] memory voteWeights,\\n GlobalProposal.TargetOption[] memory targetOptions,\\n address[] memory targets\\n ) external initializer {\\n __CoreGovernance_init(DEFAULT_EXPIRY_DURATION);\\n __GlobalCoreGovernance_init(targetOptions, targets);\\n __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights);\\n }\\n\\n /**\\n * @dev See `GovernanceRelay-_relayProposal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n */\\n function relayProposal(\\n Proposal.ProposalDetail calldata proposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external onlyGovernor {\\n _requireExecutor(proposal.executor, msg.sender);\\n _relayProposal(proposal, supports_, signatures, msg.sender);\\n }\\n\\n /**\\n * @dev See `GovernanceRelay-_relayGlobalProposal`.\\n *\\n * Requirements:\\n * - The method caller is governor.\\n */\\n function relayGlobalProposal(\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\n Ballot.VoteType[] calldata supports_,\\n Signature[] calldata signatures\\n ) external onlyGovernor {\\n _requireExecutor(globalProposal.executor, msg.sender);\\n _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender });\\n }\\n\\n function _requireExecutor(address executor, address caller) internal pure {\\n if (executor != address(0) && caller != executor) {\\n revert ErrNonExecutorCannotRelay(executor, caller);\\n }\\n }\\n\\n /**\\n * @dev Internal function to retrieve the minimum vote weight required for governance actions.\\n * @return minimumVoteWeight The minimum vote weight required for governance actions.\\n */\\n function _getMinimumVoteWeight() internal view override returns (uint256) {\\n return minimumVoteWeight();\\n }\\n\\n /**\\n * @dev Returns the expiry duration for a new proposal.\\n */\\n function getProposalExpiryDuration() external view returns (uint256) {\\n return _proposalExpiryDuration;\\n }\\n\\n /**\\n * @dev Internal function to retrieve the total weights of all governors.\\n * @return totalWeights The total weights of all governors combined.\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return getTotalWeight();\\n }\\n\\n /**\\n * @dev Internal function to calculate the sum of weights for a given array of governors.\\n * @param governors An array containing the addresses of governors to calculate the sum of weights.\\n * @return sumWeights The sum of weights for the provided governors.\\n */\\n function _sumWeight(address[] memory governors) internal view override returns (uint256) {\\n return _sumGovernorsWeight(governors);\\n }\\n\\n /**\\n * @dev Internal function to retrieve the chain type of the contract.\\n * @return chainType The chain type, indicating the type of the chain the contract operates on (e.g., Mainchain).\\n */\\n function _getChainType() internal pure override returns (ChainType) {\\n return ChainType.Mainchain;\\n }\\n\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\n return DOMAIN_SEPARATOR;\\n }\\n}\\n\",\"keccak256\":\"0xea177997b7100f310369b8fd530ea48ab823b06a53424c14f150cef723584c02\",\"license\":\"MIT\"},\"src/types/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { LibTUint256Slot } from \\\"./operations/LibTUint256Slot.sol\\\";\\n\\ntype TUint256Slot is bytes32;\\n\\nusing {\\n LibTUint256Slot.add,\\n LibTUint256Slot.sub,\\n LibTUint256Slot.mul,\\n LibTUint256Slot.div,\\n LibTUint256Slot.load,\\n LibTUint256Slot.store,\\n LibTUint256Slot.addAssign,\\n LibTUint256Slot.subAssign,\\n LibTUint256Slot.preDecrement,\\n LibTUint256Slot.postDecrement,\\n LibTUint256Slot.preIncrement,\\n LibTUint256Slot.postIncrement\\n} for TUint256Slot global;\\n\",\"keccak256\":\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\",\"license\":\"MIT\"},\"src/types/operations/LibTUint256Slot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { TUint256Slot } from \\\"../Types.sol\\\";\\n\\n/**\\n * @title LibTUint256Slot\\n * @dev Library for handling unsigned 256-bit integers.\\n */\\nlibrary LibTUint256Slot {\\n /// @dev value is equal to bytes4(keccak256(\\\"Panic(uint256)\\\"))\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\n /// @dev error code for {Arithmetic over/underflow} error\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\n /// @dev error code for {Division or modulo by 0} error\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\n\\n /**\\n * @dev Loads the value of the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @return val The loaded value.\\n */\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\n assembly {\\n val := sload(self)\\n }\\n }\\n\\n /**\\n * @dev Stores a value into the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to be stored.\\n */\\n function store(TUint256Slot self, uint256 other) internal {\\n assembly {\\n sstore(self, other)\\n }\\n }\\n\\n /**\\n * @dev Multiplies the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to multiply by.\\n * @return res The resulting value after multiplication.\\n */\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n if iszero(iszero(storedVal)) {\\n res := mul(storedVal, other)\\n\\n // Overflow check\\n if iszero(eq(other, div(res, storedVal))) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Divides the TUint256Slot variable by a given value.\\n * @param self The TUint256Slot variable.\\n * @param other The value to divide by.\\n * @return res The resulting value after division.\\n */\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n // revert if divide by zero\\n if iszero(other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, DIVISION_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n res := div(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction.\\n */\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n\\n // Underflow check\\n if lt(storedVal, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n\\n res := sub(storedVal, other)\\n }\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition.\\n */\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\n assembly {\\n let storedVal := sload(self)\\n res := add(storedVal, other)\\n\\n // Overflow check\\n if lt(res, other) {\\n // Store 4 bytes the function selector of Panic(uint256)\\n // Equivalent to revert Panic(uint256)\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\n // Store 4 bytes of division error code in the next slot\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\n // Revert 36 bytes of error starting from 0x1c\\n revert(0x1c, 0x24)\\n }\\n }\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after incrementing.\\n */\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = addAssign(self, 1);\\n }\\n\\n /**\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\n * @param self The TUint256Slot variable.\\n * @return res The original value before incrementing.\\n */\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res + 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value after decrementing.\\n */\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = subAssign(self, 1);\\n }\\n\\n /**\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\n * @param self The TUint256Slot variable.\\n * @return res The resulting value before decrementing.\\n */\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\n res = load(self);\\n store(self, res - 1);\\n }\\n\\n /**\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to add.\\n * @return res The resulting value after addition and storage.\\n */\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = add(self, other));\\n }\\n\\n /**\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\n * @param self The TUint256Slot variable.\\n * @param other The value to subtract.\\n * @return res The resulting value after subtraction and storage.\\n */\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\n store(self, res = sub(self, other));\\n }\\n}\\n\",\"keccak256\":\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 21, + "numDeployments": 2, "storageLayout": { "storage": [ { @@ -2284,7 +2284,7 @@ } } }, - "timestamp": 1713254676, + "timestamp": 1713254892, "userdoc": { "version": 1, "kind": "user", diff --git a/deployments/sepolia/MainchainBridgeManagerProxy.json b/deployments/sepolia/MainchainBridgeManagerProxy.json index 51a6890f..fc87503b 100644 --- a/deployments/sepolia/MainchainBridgeManagerProxy.json +++ b/deployments/sepolia/MainchainBridgeManagerProxy.json @@ -158,10 +158,10 @@ "anonymous": false } ], - "address": "0xdbf1c9FB0cb61Ae76901e55c5C04e77d2BE131A1", + "address": "0x603075B625cc2cf69FbB3546C6acC2451FE792AF", "args": "0xf896f0700000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e500000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002e82d2b56f858f79deef11b160bfc4631873da2b000000000000000000000000bcb61783dd2403fe8cc9b89b27b1a9bb03d040cb000000000000000000000000b266bf53cf7eac4e2065a404598dcb0e15e9462c000000000000000000000000cc5fc5b6c8595f56306da736f6cd02ed9141c84a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d24d87ddc1917165435b306aac68d99e0f49a3fa000000000000000000000000b033ba62ec622dc54d0abfe0254e79692147ca26000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000052ec2e6bbce45afff8955da6410bb13812f4289f00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000061ec0ebf966ae84c414bda715e17cef657e039df", "ast": "", - "blockNumber": 5709352, + "blockNumber": 5709370, "bytecode": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c665d628940e317f0b6d03df17271fb51c4d35c9dbf89cce5e4d9768343c58a864736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", "chainId": 11155111, "contractAbsolutePath": "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", @@ -204,13 +204,13 @@ }, "isFoundry": true, "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 24, - "numDeployments": 1, + "nonce": 22, + "numDeployments": 2, "storageLayout": { "storage": [], "types": {} }, - "timestamp": 1713254676, + "timestamp": 1713254892, "userdoc": { "version": 1, "kind": "user" diff --git a/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json b/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json index 6a29ede2..ffe656b5 100644 --- a/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json +++ b/deployments/sepolia/MainchainGatewayPauseEnforcerLogic.json @@ -435,10 +435,10 @@ "inputs": [] } ], - "address": "0x3C4e17b9056272Ce1b49F6900d8cFD6171a1869d", + "address": "0x23614572006e2D0DB35E54d4082Aec68d9686450", "args": "0x", "ast": "", - "blockNumber": 5709352, + "blockNumber": 5709370, "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600254610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60025460ff90811610156100dc576002805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6111c4806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806391d14854116100a2578063caa6fea411610071578063caa6fea414610240578063d4b8399214610254578063d547741f1461026d578063dcf7bb5c14610280578063f82ec70b1461029357600080fd5b806391d148541461020a578063a217fddf1461021d578063b9f3163b14610225578063ca15c8731461022d57600080fd5b80636833f60d116100e95780636833f60d1461019c57806377a24f36146101a45780637a9ad019146101b75780637d4f7fc9146101cc5780639010d07c146101df57600080fd5b806301ffc9a71461011b578063248a9ca3146101435780632f2ff15d1461017457806336568abe14610189575b600080fd5b61012e610129366004610e11565b6102a6565b60405190151581526020015b60405180910390f35b610166610151366004610e3b565b60009081526020819052604090206001015490565b60405190815260200161013a565b610187610182366004610e79565b6102d1565b005b610187610197366004610e79565b6102fb565b61018761037e565b6101876101b2366004610ebf565b6104da565b61016660008051602061116f83398151915281565b6101876101da366004610fab565b610640565b6101f26101ed366004610fc8565b610663565b6040516001600160a01b03909116815260200161013a565b61012e610218366004610e79565b610682565b610166600081565b6101876106ab565b61016661023b366004610e3b565b610821565b60025461012e90600160b01b900460ff1681565b6002546101f2906201000090046001600160a01b031681565b61018761027b366004610e79565b610838565b61018761028e366004610fab565b61085d565b6101876102a1366004610fab565b610871565b60006001600160e01b03198216635a05180f60e01b14806102cb57506102cb82610894565b92915050565b6000828152602081905260409020600101546102ec816108c9565b6102f683836108d6565b505050565b6001600160a01b03811633146103705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61037a82826108f8565b5050565b60008051602061116f833981519152610396816108c9565b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af11580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610fea565b1561042b576040516310067f7560e11b815260040160405180910390fd5b60028054600160b01b60ff60b01b19909116179081905560408051638456cb5960e01b81529051620100009092046001600160a01b031691638456cb599160048082019260009290919082900301818387803b15801561048a57600080fd5b505af115801561049e573d6000803e3d6000fd5b50506040513381527fb8fad2fa0ed7a383e747c309ef2c4391d7b65592a48893e57ccc1fab70791456925060200190505b60405180910390a150565b600254610100900460ff16158080156104fa5750600254600160ff909116105b806105145750303b158015610514575060025460ff166001145b6105775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610367565b6002805460ff19166001179055801561059a576002805461ff0019166101001790555b6105a38461091a565b6105ae600084610972565b60005b82518110156105f3576105eb60008051602061116f8339815191528483815181106105de576105de61100c565b60200260200101516108d6565b6001016105b1565b50801561063a576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061064b816108c9565b61037a60008051602061116f833981519152836108d6565b600082815260016020526040812061067b908361097c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061116f8339815191526106c3816108c9565b600254600160b01b900460ff166106ed57604051631b2fd53f60e31b815260040160405180910390fd5b60028054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610fea565b61078157604051631e87b57b60e31b815260040160405180910390fd5b6002805460ff60b01b19169081905560408051631fa5d41d60e11b81529051620100009092046001600160a01b031691633f4ba83a9160048082019260009290919082900301818387803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b50506040513381527ff5cbf596165cc457b2cd92e8d8450827ee314968160a5696402d75766fc52caf925060200190506104cf565b60008181526001602052604081206102cb90610988565b600082815260208190526040902060010154610853816108c9565b6102f683836108f8565b6000610868816108c9565b61037a8261091a565b600061087c816108c9565b61037a60008051602061116f833981519152836108f8565b60006001600160e01b03198216637965db0b60e01b14806102cb57506301ffc9a760e01b6001600160e01b03198316146102cb565b6108d38133610992565b50565b6108e082826109f6565b60008281526001602052604090206102f69082610a7a565b6109028282610a8f565b60008281526001602052604090206102f69082610af4565b6002805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f7f8cffd58ac96898bdd25ab64868bd933141d15ad1cd4a0df228fd3fcba2a26d906020016104cf565b61037a82826108d6565b600061067b8383610b09565b60006102cb825490565b61099c8282610682565b61037a576109b4816001600160a01b03166014610b33565b6109bf836020610b33565b6040516020016109d0929190611046565b60408051601f198184030181529082905262461bcd60e51b8252610367916004016110bb565b610a008282610682565b61037a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a363390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061067b836001600160a01b038416610ccf565b610a998282610682565b1561037a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061067b836001600160a01b038416610d1e565b6000826000018281548110610b2057610b2061100c565b9060005260206000200154905092915050565b60606000610b42836002611104565b610b4d90600261111b565b67ffffffffffffffff811115610b6557610b65610ea9565b6040519080825280601f01601f191660200182016040528015610b8f576020820181803683370190505b509050600360fc1b81600081518110610baa57610baa61100c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610bd957610bd961100c565b60200101906001600160f81b031916908160001a9053506000610bfd846002611104565b610c0890600161111b565b90505b6001811115610c80576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610c3c57610c3c61100c565b1a60f81b828281518110610c5257610c5261100c565b60200101906001600160f81b031916908160001a90535060049490941c93610c798161112e565b9050610c0b565b50831561067b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610367565b6000818152600183016020526040812054610d16575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556102cb565b5060006102cb565b60008181526001830160205260408120548015610e07576000610d42600183611145565b8554909150600090610d5690600190611145565b9050818114610dbb576000866000018281548110610d7657610d7661100c565b9060005260206000200154905080876000018481548110610d9957610d9961100c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dcc57610dcc611158565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506102cb565b60009150506102cb565b600060208284031215610e2357600080fd5b81356001600160e01b03198116811461067b57600080fd5b600060208284031215610e4d57600080fd5b5035919050565b6001600160a01b03811681146108d357600080fd5b8035610e7481610e54565b919050565b60008060408385031215610e8c57600080fd5b823591506020830135610e9e81610e54565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610ed457600080fd5b8335610edf81610e54565b9250602084810135610ef081610e54565b9250604085013567ffffffffffffffff80821115610f0d57600080fd5b818701915087601f830112610f2157600080fd5b813581811115610f3357610f33610ea9565b8060051b604051601f19603f83011681018181108582111715610f5857610f58610ea9565b60405291825284820192508381018501918a831115610f7657600080fd5b938501935b82851015610f9b57610f8c85610e69565b84529385019392850192610f7b565b8096505050505050509250925092565b600060208284031215610fbd57600080fd5b813561067b81610e54565b60008060408385031215610fdb57600080fd5b50508035926020909101359150565b600060208284031215610ffc57600080fd5b8151801515811461067b57600080fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561103d578181015183820152602001611025565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161107e816017850160208801611022565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516110af816028840160208801611022565b01602801949350505050565b60208152600082518060208401526110da816040850160208701611022565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102cb576102cb6110ee565b808201808211156102cb576102cb6110ee565b60008161113d5761113d6110ee565b506000190190565b818103818111156102cb576102cb6110ee565b634e487b7160e01b600052603160045260246000fdfe5bea60102f2a7acc9e82b1af0e3bd4069661102bb5dd143a6051cd1980dded1ca26469706673582212205cd579cff7903082498e437ed3eb21f8623bfa7f518ca2799b5e3497b22a08a864736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "PauseEnforcer.sol", @@ -534,8 +534,8 @@ }, "isFoundry": true, "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrNotOnEmergencyPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsNotOnPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTargetIsOnPaused\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"EmergencyUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"contract IPauseTarget\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SENTRY_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"changeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergency\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"grantSentry\",\"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\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_sentries\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"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\":\"address\",\"name\":\"_sentry\",\"type\":\"address\"}],\"name\":\"revokeSentry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"contract IPauseTarget\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerUnpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrNotOnEmergencyPause()\":[{\"details\":\"Error thrown when the contract is not on emergency pause.\"}],\"ErrTargetIsNotOnPaused()\":[{\"details\":\"Error thrown when the target is not on paused state.\"}],\"ErrTargetIsOnPaused()\":[{\"details\":\"Error thrown when the target is already on paused state.\"}]},\"events\":{\"EmergencyPaused(address)\":{\"details\":\"Emitted when the emergency ppause is triggered by `account`.\"},\"EmergencyUnpaused(address)\":{\"details\":\"Emitted when the emergency unpause is triggered by `account`.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"TargetChanged(address)\":{\"details\":\"Emitted when the target is changed.\"}},\"kind\":\"dev\",\"methods\":{\"changeTarget(address)\":{\"details\":\"Setter for `target`. Requirements: - Only admin can call this method.\"},\"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. May emit a {RoleGranted} event.\"},\"grantSentry(address)\":{\"details\":\"Grants the SENTRY_ROLE to the specified address.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,address[])\":{\"details\":\"Initializes the contract storage.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"revokeSentry(address)\":{\"details\":\"Revokes the SENTRY_ROLE from the specified address.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"triggerPause()\":{\"details\":\"Triggers a pause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is not already paused.\"},\"triggerUnpause()\":{\"details\":\"Triggers an unpause on the target contract. Requirements: - Only be called by accounts with the SENTRY_ROLE, - The target contract is already paused. - The target contract is paused in emergency mode.\"}},\"stateVariables\":{\"emergency\":{\"details\":\"Indicating whether or not the target contract is paused in emergency mode.\"},\"target\":{\"details\":\"The contract that can be paused or unpaused by the SENTRY_ROLE.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ronin/gateway/PauseEnforcer.sol\":\"PauseEnforcer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/interfaces/IPauseTarget.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IPauseTarget {\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external returns (bool);\\n}\\n\",\"keccak256\":\"0xc91073e61da572de0087b41018fd30b03661d58e0c5061e7b9d1c9235cd7c1c3\",\"license\":\"MIT\"},\"src/ronin/gateway/PauseEnforcer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../interfaces/IPauseTarget.sol\\\";\\n\\ncontract PauseEnforcer is AccessControlEnumerable, Initializable {\\n /**\\n * @dev Error thrown when the target is already on paused state.\\n */\\n error ErrTargetIsOnPaused();\\n\\n /**\\n * @dev Error thrown when the target is not on paused state.\\n */\\n error ErrTargetIsNotOnPaused();\\n\\n /**\\n * @dev Error thrown when the contract is not on emergency pause.\\n */\\n error ErrNotOnEmergencyPause();\\n\\n bytes32 public constant SENTRY_ROLE = keccak256(\\\"SENTRY_ROLE\\\");\\n\\n /// @dev The contract that can be paused or unpaused by the SENTRY_ROLE.\\n IPauseTarget public target;\\n /// @dev Indicating whether or not the target contract is paused in emergency mode.\\n bool public emergency;\\n\\n /// @dev Emitted when the emergency ppause is triggered by `account`.\\n event EmergencyPaused(address account);\\n /// @dev Emitted when the emergency unpause is triggered by `account`.\\n event EmergencyUnpaused(address account);\\n /// @dev Emitted when the target is changed.\\n event TargetChanged(IPauseTarget target);\\n\\n modifier onEmergency() {\\n if (!emergency) revert ErrNotOnEmergencyPause();\\n\\n _;\\n }\\n\\n modifier targetPaused() {\\n if (!target.paused()) revert ErrTargetIsOnPaused();\\n\\n _;\\n }\\n\\n modifier targetNotPaused() {\\n if (target.paused()) revert ErrTargetIsNotOnPaused();\\n\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /**\\n * @dev Initializes the contract storage.\\n */\\n function initialize(IPauseTarget _target, address _admin, address[] memory _sentries) external initializer {\\n _changeTarget(_target);\\n _setupRole(DEFAULT_ADMIN_ROLE, _admin);\\n for (uint _i; _i < _sentries.length;) {\\n _grantRole(SENTRY_ROLE, _sentries[_i]);\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @dev Grants the SENTRY_ROLE to the specified address.\\n */\\n function grantSentry(address _sentry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _grantRole(SENTRY_ROLE, _sentry);\\n }\\n\\n /**\\n * @dev Revokes the SENTRY_ROLE from the specified address.\\n */\\n function revokeSentry(address _sentry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _revokeRole(SENTRY_ROLE, _sentry);\\n }\\n\\n /**\\n * @dev Triggers a pause on the target contract.\\n *\\n * Requirements:\\n * - Only be called by accounts with the SENTRY_ROLE,\\n * - The target contract is not already paused.\\n */\\n function triggerPause() external onlyRole(SENTRY_ROLE) targetNotPaused {\\n emergency = true;\\n target.pause();\\n emit EmergencyPaused(msg.sender);\\n }\\n\\n /**\\n * @dev Triggers an unpause on the target contract.\\n *\\n * Requirements:\\n * - Only be called by accounts with the SENTRY_ROLE,\\n * - The target contract is already paused.\\n * - The target contract is paused in emergency mode.\\n */\\n function triggerUnpause() external onlyRole(SENTRY_ROLE) onEmergency targetPaused {\\n emergency = false;\\n target.unpause();\\n emit EmergencyUnpaused(msg.sender);\\n }\\n\\n /**\\n * @dev Setter for `target`.\\n *\\n * Requirements:\\n * - Only admin can call this method.\\n */\\n function changeTarget(IPauseTarget _target) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _changeTarget(_target);\\n }\\n\\n /**\\n * @dev Internal helper for setting value to `target`.\\n */\\n function _changeTarget(IPauseTarget _target) internal {\\n target = _target;\\n emit TargetChanged(_target);\\n }\\n}\\n\",\"keccak256\":\"0x4a758f6cc62826d0f513903df7cf9e63a5bbd7420d3f8349595fabea346beb37\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 27, - "numDeployments": 2, + "nonce": 25, + "numDeployments": 3, "storageLayout": { "storage": [ { @@ -715,7 +715,7 @@ } } }, - "timestamp": 1713254676, + "timestamp": 1713254892, "userdoc": { "version": 1, "kind": "user" diff --git a/deployments/sepolia/MainchainGatewayV3Logic.json b/deployments/sepolia/MainchainGatewayV3Logic.json index 984952fa..66f77e76 100644 --- a/deployments/sepolia/MainchainGatewayV3Logic.json +++ b/deployments/sepolia/MainchainGatewayV3Logic.json @@ -2321,14 +2321,14 @@ ] } ], - "address": "0x82f5483623D636BC3deBA8Ae67E1751b6CF2Bad2", + "address": "0x1050f2E63177b5eD18f3E88D000DB3a600d664e3", "args": "0x", "ast": "", - "blockNumber": 5709352, - "bytecode": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b607154610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60715460ff9081161015620000ec576071805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61556180620000fe6000396000f3fe60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a264697066735822122039bdd676fa56a806e2f91eb197d0a444b13ff0899114d328ae5983c28d58606164736f6c63430008170033", + "blockNumber": 5709370, + "bytecode": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b607154610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60715460ff9081161015620000ec576071805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61556180620000fe6000396000f3fe60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a2646970667358221220a2f9831a0e3d85059cd7b361f6be20ecc705006971478a7cb6c6bfef562802c064736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "MainchainGatewayV3.sol", - "deployedBytecode": "0x60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a264697066735822122039bdd676fa56a806e2f91eb197d0a444b13ff0899114d328ae5983c28d58606164736f6c63430008170033", + "deployedBytecode": "0x60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a2646970667358221220a2f9831a0e3d85059cd7b361f6be20ecc705006971478a7cb6c6bfef562802c064736f6c63430008170033", "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, @@ -2697,9 +2697,9 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC1155MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForApprovedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForInsufficientVoteWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForProcessedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrReachedDailyWithdrawalLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum TokenStandard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"wethUnwrapper_\",\"type\":\"address\"}],\"name\":\"initializeV4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"},{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsAdded\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"removeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsRemoved\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wethUnwrapper\",\"outputs\":[{\"internalType\":\"contract WethUnwrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC1155MintingFailed()\":[{\"details\":\"Error indicating that the mint of ERC1155 tokens has failed.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidPercentage()\":[{\"details\":\"Error of invalid percentage.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForApprovedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for an approved withdrawal.\"}],\"ErrQueryForInsufficientVoteWeight()\":[{\"details\":\"Error indicating that a query was made for insufficient vote weight.\"}],\"ErrQueryForProcessedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for a processed withdrawal.\"}],\"ErrReachedDailyWithdrawalLimit()\":[{\"details\":\"Error indicating that the daily withdrawal limit has been reached.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `handleAssetIn` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"DailyWithdrawalLimitsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the daily limit thresholds are updated\"},\"DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the deposit is requested\"},\"HighTierThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\"},\"HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the high-tier vote weight threshold is updated\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LockedThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for locked withdrawals are updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"TokenMapped(address[],address[],uint8[])\":{\"details\":\"Emitted when the tokens are mapped\"},\"UnlockFeePercentagesUpdated(address[],uint256[])\":{\"details\":\"Emitted when the fee percentages to unlock withdraw are updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is locked\"},\"WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is unlocked\"},\"Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are withdrawn\"},\"WrappedNativeTokenContractUpdated(address)\":{\"details\":\"Emitted when the wrapped native token contract is updated\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"onBridgeOperatorsAdded(address[],uint96[],bool[])\":{\"details\":\"Handles the event when bridge operators are added.\",\"params\":{\"addeds\":\"The corresponding boolean values indicating whether the operators were added or not.\",\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"onBridgeOperatorsRemoved(address[],bool[])\":{\"details\":\"Handles the event when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\",\"removeds\":\"The corresponding boolean values indicating whether the operators were removed or not.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"______deprecatedBridgeOperatorAddedBlock\":{\"custom:deprecated\":\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\"},\"______deprecatedBridgeOperators\":{\"custom:deprecated\":\"Previously `_bridgeOperators` (uint256[])\"},\"_domainSeparator\":{\"details\":\"Domain separator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainGatewayV3.sol\":\"MainchainGatewayV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\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 ReentrancyGuard {\\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 constructor() {\\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 making 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}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(\\n address account,\\n uint256 id,\\n uint256 value\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(\\n address account,\\n uint256[] memory ids,\\n uint256[] memory values\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../extensions/ERC1155Burnable.sol\\\";\\nimport \\\"../extensions/ERC1155Pausable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerable.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev {ERC1155} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n *\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\n */\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\n * deploys the contract.\\n */\\n constructor(string memory uri) ERC1155(uri) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\n *\\n * See {ERC1155-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mint(to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\n */\\n function mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControlEnumerable, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\n uint256 prevNum = _num;\\n uint256 prevDenom = _denom;\\n _num = num;\\n _denom = denom;\\n unchecked {\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/WethUnwrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\ncontract WethUnwrapper is ReentrancyGuard {\\n IWETH public immutable weth;\\n\\n error ErrCannotTransferFrom();\\n error ErrNotWrappedContract();\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\n\\n constructor(address weth_) {\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\n weth = IWETH(weth_);\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n function unwrap(uint256 amount) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(msg.sender), amount);\\n }\\n\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(to), amount);\\n }\\n\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\n if (!success) revert ErrCannotTransferFrom();\\n\\n weth.withdraw(amount);\\n }\\n\\n function _sendNativeTo(address payable to, uint256 val) internal {\\n (bool success,) = to.call{ value: val }(\\\"\\\");\\n if (!success) {\\n revert ErrExternalCallFailed(to, msg.sig);\\n }\\n }\\n\\n function _fallback() internal view {\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\n }\\n}\\n\",\"keccak256\":\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\",\"license\":\"MIT\"},\"src/extensions/WithdrawalLimitation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./GatewayV3.sol\\\";\\n\\nabstract contract WithdrawalLimitation is GatewayV3 {\\n /// @dev Error of invalid percentage.\\n error ErrInvalidPercentage();\\n\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\n event HighTierVoteWeightThresholdUpdated(\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\n );\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\n /// @dev Emitted when the daily limit thresholds are updated\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\n\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\n\\n uint256 internal _highTierVWNum;\\n uint256 internal _highTierVWDenom;\\n\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\n mapping(address => uint256) public highTierThreshold;\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\n mapping(address => uint256) public lockedThreshold;\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\n /// @notice Values 0-1,000,000 map to 0%-100%\\n mapping(address => uint256) public unlockFeePercentages;\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\n mapping(address => uint256) public dailyWithdrawalLimit;\\n /// @dev Mapping from token address => today withdrawal amount\\n mapping(address => uint256) public lastSyncedWithdrawal;\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\n mapping(address => uint256) public lastDateSynced;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `GatewayV3-setThreshold`.\\n *\\n * Requirements:\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n */\\n function setThreshold(uint256 num, uint256 denom) external virtual override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Returns the high-tier vote weight threshold.\\n */\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\n return (_highTierVWNum, _highTierVWDenom);\\n }\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\n */\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function setHighTierVoteWeightThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyProxyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setHighTierThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setLockedThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setUnlockFeePercentages(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setDailyWithdrawalLimits(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the limitation.\\n */\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\n return _reachedWithdrawalLimit(_token, _quantity);\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n\\n _previousNum = _highTierVWNum;\\n _previousDenom = _highTierVWDenom;\\n _highTierVWNum = _numerator;\\n _highTierVWDenom = _denominator;\\n\\n unchecked {\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n * - The percentage is equal to or less than 100_000.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\n if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage();\\n\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\n if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\n *\\n * Requirements:\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\n *\\n */\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\n return false;\\n }\\n\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n return dailyWithdrawalLimit[_token] <= _quantity;\\n } else {\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\n }\\n }\\n\\n /**\\n * @dev Record withdrawal token.\\n */\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n lastDateSynced[_token] = _currentDate;\\n lastSyncedWithdrawal[_token] = _quantity;\\n } else {\\n lastSyncedWithdrawal[_token] += _quantity;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the withdrawal request is locked or not.\\n */\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n return lockedThreshold[_token] <= _quantity;\\n }\\n\\n /**\\n * @dev Computes fee percentage.\\n */\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\n }\\n\\n /**\\n * @dev Returns high-tier vote weight.\\n */\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\n }\\n\\n /**\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\n */\\n function _verifyThresholds() internal view {\\n if (_num * _highTierVWDenom > _highTierVWNum * _denom) revert ErrInvalidThreshold(msg.sig);\\n }\\n}\\n\",\"keccak256\":\"0x4b7d559d4b1f53239b8690776318db8d63f578f72fb269d8024570aa70c2c2a6\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/IMainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./consumers/SignatureConsumer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\n /**\\n * @dev Error indicating that a query was made for an approved withdrawal.\\n */\\n error ErrQueryForApprovedWithdrawal();\\n\\n /**\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\n */\\n error ErrReachedDailyWithdrawalLimit();\\n\\n /**\\n * @dev Error indicating that a query was made for a processed withdrawal.\\n */\\n error ErrQueryForProcessedWithdrawal();\\n\\n /**\\n * @dev Error indicating that a query was made for insufficient vote weight.\\n */\\n error ErrQueryForInsufficientVoteWeight();\\n\\n /// @dev Emitted when the deposit is requested\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the assets are withdrawn\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards);\\n /// @dev Emitted when the wrapped native token contract is updated\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\n /// @dev Emitted when the withdrawal is locked\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is unlocked\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n\\n /**\\n * @dev Returns the domain seperator.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns deposit count.\\n */\\n function depositCount() external view returns (uint256);\\n\\n /**\\n * @dev Sets the wrapped native token contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\n\\n /**\\n * @dev Returns whether the withdrawal is locked.\\n */\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns the withdrawal hash.\\n */\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\n\\n /**\\n * @dev Locks the assets and request deposit.\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\n\\n /**\\n * @dev Withdraws based on the receipt and the validator signatures.\\n * Returns whether the withdrawal is locked.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked);\\n\\n /**\\n * @dev Approves a specific withdrawal.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n uint256[][4] calldata _thresholds\\n ) external;\\n\\n /**\\n * @dev Returns token address on Ronin network.\\n * Note: Reverts for unsupported token.\\n */\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x2d4f53a65e76e903040f5f4dbe5aea53367d61243c60efdc8402ff184bd50a87\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/LibTokenInfo.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n TokenStandard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/LibTokenInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nenum TokenStandard {\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\\nstruct TokenInfo {\\n TokenStandard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n}\\n\\n/**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\n\\n/**\\n * @dev Error indicating that the `handleAssetIn` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\n\\n/// @dev Error indicating that the provided information is invalid.\\nerror ErrInvalidInfo();\\n\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\nerror ErrERC20MintingFailed();\\n\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\nerror ErrERC721MintingFailed();\\n\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\nerror ErrERC1155TransferFailed();\\n\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\nerror ErrERC1155MintingFailed();\\n\\n/// @dev Error indicating that an unsupported standard is encountered.\\nerror ErrUnsupportedStandard();\\n\\nlibrary LibTokenInfo {\\n /**\\n *\\n * HASH\\n *\\n */\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n *\\n * VALIDATE\\n *\\n */\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(TokenInfo memory self) internal pure {\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\n revert ErrInvalidInfo();\\n }\\n }\\n\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\n }\\n\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\n }\\n\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\n }\\n\\n /**\\n *\\n * TRANSFER IN/OUT METHOD\\n *\\n */\\n\\n /**\\n * @dev Transfer asset in.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\n bool success;\\n bytes memory data;\\n if (self.erc == TokenStandard.ERC20) {\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\n } else if (self.erc == TokenStandard.ERC1155) {\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\n }\\n\\n /**\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\n if (token == address(wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!to.send(self.quantity)) {\\n wrappedNativeToken.deposit{ value: self.quantity }();\\n _transferTokenOut(self, to, token);\\n }\\n\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC20) {\\n uint256 balance = IERC20(token).balanceOf(address(this));\\n if (balance < self.quantity) {\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\n }\\n\\n _transferTokenOut(self, to, token);\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC721) {\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\n revert ErrERC721MintingFailed();\\n }\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC1155) {\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\n revert ErrERC1155MintingFailed();\\n }\\n return;\\n }\\n\\n revert ErrUnsupportedStandard();\\n }\\n\\n /**\\n *\\n * TRANSFER HELPERS\\n *\\n */\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\n bool success;\\n if (self.erc == TokenStandard.ERC20) {\\n success = _tryTransferERC20(token, to, self.quantity);\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\n }\\n\\n /**\\n * TRANSFER ERC-20\\n */\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n bytes memory data;\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n }\\n\\n /**\\n * @dev Mints ERC20 token and returns the result.\\n */\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\n }\\n\\n /**\\n * TRANSFER ERC-721\\n */\\n\\n /**\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n success = _tryTransferFromERC721(token, address(this), to, id);\\n if (!success) {\\n return _tryMintERC721(token, to, id);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\n }\\n\\n /**\\n * @dev Mints ERC721 token and returns the result.\\n */\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\n }\\n\\n /**\\n * TRANSFER ERC-1155\\n */\\n\\n /**\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\n if (!success) {\\n return _tryMintERC1155(token, to, id, amount);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC1155 token and returns the result.\\n */\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\n }\\n\\n /**\\n * @dev Mints ERC1155 token and returns the result.\\n */\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\n }\\n}\\n\",\"keccak256\":\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\",\"license\":\"MIT\"},\"src/libraries/LibTokenOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TokenOwner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n}\\n\\nlibrary LibTokenOwner {\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\",\"license\":\"MIT\"},\"src/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./LibTokenInfo.sol\\\";\\nimport \\\"./LibTokenOwner.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n using LibTokenOwner for TokenOwner;\\n using LibTokenInfo for TokenInfo;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n TokenInfo info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n TokenOwner mainchain;\\n TokenOwner ronin;\\n TokenInfo info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\",\"license\":\"MIT\"},\"src/mainchain/MainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport { IBridgeManager } from \\\"../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts, ContractType } from \\\"../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../extensions/WethUnwrapper.sol\\\";\\nimport \\\"../extensions/WithdrawalLimitation.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"../interfaces/IMainchainGatewayV3.sol\\\";\\n\\ncontract MainchainGatewayV3 is\\n WithdrawalLimitation,\\n Initializable,\\n AccessControlEnumerable,\\n ERC1155Holder,\\n IMainchainGatewayV3,\\n HasContracts,\\n IBridgeManagerCallback\\n{\\n using LibTokenInfo for TokenInfo;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n\\n /// @dev Withdrawal unlocker role hash\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\"WITHDRAWAL_UNLOCKER_ROLE\\\");\\n\\n /// @dev Wrapped native token address\\n IWETH public wrappedNativeToken;\\n /// @dev Ronin network id\\n uint256 public roninChainId;\\n /// @dev Total deposit\\n uint256 public depositCount;\\n /// @dev Domain separator\\n bytes32 internal _domainSeparator;\\n /// @dev Mapping from mainchain token => token address on Ronin network\\n mapping(address => MappedToken) internal _roninToken;\\n /// @dev Mapping from withdrawal id => withdrawal hash\\n mapping(uint256 => bytes32) public withdrawalHash;\\n /// @dev Mapping from withdrawal id => locked\\n mapping(uint256 => bool) public withdrawalLocked;\\n\\n /// @custom:deprecated Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\n uint256 private ______deprecatedBridgeOperatorAddedBlock;\\n /// @custom:deprecated Previously `_bridgeOperators` (uint256[])\\n uint256 private ______deprecatedBridgeOperators;\\n\\n uint96 private _totalOperatorWeight;\\n mapping(address operator => uint96 weight) private _operatorWeight;\\n WethUnwrapper public wethUnwrapper;\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n IWETH _wrappedToken,\\n uint256 _roninChainId,\\n uint256 _numerator,\\n uint256 _highTierVWNumerator,\\n uint256 _denominator,\\n // _addresses[0]: mainchainTokens\\n // _addresses[1]: roninTokens\\n // _addresses[2]: withdrawalUnlockers\\n address[][3] calldata _addresses,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds,\\n TokenStandard[] calldata _standards\\n ) external payable virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n roninChainId = _roninChainId;\\n\\n _setWrappedNativeTokenContract(_wrappedToken);\\n _updateDomainSeparator();\\n _setThreshold(_numerator, _denominator);\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\n _verifyThresholds();\\n\\n if (_addresses[0].length > 0) {\\n // Map mainchain tokens to ronin tokens\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\n // Sets thresholds based on the mainchain tokens\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\n }\\n\\n // Grant role for withdrawal unlocker\\n for (uint256 i; i < _addresses[2].length; i++) {\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][i]);\\n }\\n }\\n\\n function initializeV2(address bridgeManagerContract) external reinitializer(2) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n }\\n\\n function initializeV3() external reinitializer(3) {\\n IBridgeManager mainchainBridgeManager = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER));\\n (, address[] memory operators, uint96[] memory weights) = mainchainBridgeManager.getFullBridgeOperatorInfos();\\n\\n uint96 totalWeight;\\n for (uint i; i < operators.length; i++) {\\n _operatorWeight[operators[i]] = weights[i];\\n totalWeight += weights[i];\\n }\\n _totalOperatorWeight = totalWeight;\\n }\\n\\n function initializeV4(address payable wethUnwrapper_) external reinitializer(4) {\\n wethUnwrapper = WethUnwrapper(wethUnwrapper_);\\n }\\n\\n /**\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\n */\\n function receiveEther() external payable { }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparator;\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyProxyAdmin {\\n _setWrappedNativeTokenContract(_wrappedToken);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\n _requestDepositFor(_request, msg.sender);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) {\\n return _submitWithdrawal(_receipt, _signatures);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\n bytes32 _receiptHash = receipt.hash();\\n if (withdrawalHash[receipt.id] != receipt.hash()) {\\n revert ErrInvalidReceipt();\\n }\\n if (!withdrawalLocked[receipt.id]) {\\n revert ErrQueryForApprovedWithdrawal();\\n }\\n delete withdrawalLocked[receipt.id];\\n emit WithdrawalUnlocked(_receiptHash, receipt);\\n\\n address token = receipt.mainchain.tokenAddr;\\n if (receipt.info.erc == TokenStandard.ERC20) {\\n TokenInfo memory feeInfo = receipt.info;\\n feeInfo.quantity = _computeFeePercentage(receipt.info.quantity, unlockFeePercentages[token]);\\n TokenInfo memory withdrawInfo = receipt.info;\\n withdrawInfo.quantity = receipt.info.quantity - feeInfo.quantity;\\n\\n feeInfo.handleAssetOut(payable(msg.sender), token, wrappedNativeToken);\\n withdrawInfo.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n } else {\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n }\\n\\n emit Withdrew(_receiptHash, receipt);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds\\n ) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function getRoninToken(address mainchainToken) public view returns (MappedToken memory token) {\\n token = _roninToken[mainchainToken];\\n if (token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(address[] calldata mainchainTokens, address[] calldata roninTokens, TokenStandard[] calldata standards) internal virtual {\\n if (!(mainchainTokens.length == roninTokens.length && mainchainTokens.length == standards.length)) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 i; i < mainchainTokens.length; ++i) {\\n _roninToken[mainchainTokens[i]].tokenAddr = roninTokens[i];\\n _roninToken[mainchainTokens[i]].erc = standards[i];\\n }\\n\\n emit TokenMapped(mainchainTokens, roninTokens, standards);\\n }\\n\\n /**\\n * @dev Submits withdrawal receipt.\\n *\\n * Requirements:\\n * - The receipt kind is withdrawal.\\n * - The receipt is to withdraw on this chain.\\n * - The receipt is not used to withdraw before.\\n * - The withdrawal is not reached the limit threshold.\\n * - The signer weight total is larger than or equal to the minimum threshold.\\n * - The signature signers are in order.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function _submitWithdrawal(Transfer.Receipt calldata receipt, Signature[] memory signatures) internal virtual returns (bool locked) {\\n uint256 id = receipt.id;\\n uint256 quantity = receipt.info.quantity;\\n address tokenAddr = receipt.mainchain.tokenAddr;\\n\\n receipt.info.validate();\\n if (receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind();\\n\\n if (receipt.mainchain.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, receipt.mainchain.chainId, block.chainid);\\n }\\n\\n MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr);\\n\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr && receipt.ronin.chainId == roninChainId)) {\\n revert ErrInvalidReceipt();\\n }\\n\\n if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal();\\n\\n if (!(receipt.info.erc == TokenStandard.ERC721 || !_reachedWithdrawalLimit(tokenAddr, quantity))) {\\n revert ErrReachedDailyWithdrawalLimit();\\n }\\n\\n bytes32 receiptHash = receipt.hash();\\n bytes32 receiptDigest = Transfer.receiptDigest(_domainSeparator, receiptHash);\\n\\n uint256 minimumWeight;\\n (minimumWeight, locked) = _computeMinVoteWeight(receipt.info.erc, tokenAddr, quantity);\\n\\n {\\n bool passed;\\n address signer;\\n address lastSigner;\\n Signature memory sig;\\n uint256 weight;\\n for (uint256 i; i < signatures.length; i++) {\\n sig = signatures[i];\\n signer = ecrecover(receiptDigest, sig.v, sig.r, sig.s);\\n if (lastSigner >= signer) revert ErrInvalidOrder(msg.sig);\\n\\n lastSigner = signer;\\n\\n weight += _getWeight(signer);\\n if (weight >= minimumWeight) {\\n passed = true;\\n break;\\n }\\n }\\n\\n if (!passed) revert ErrQueryForInsufficientVoteWeight();\\n withdrawalHash[id] = receiptHash;\\n }\\n\\n if (locked) {\\n withdrawalLocked[id] = true;\\n emit WithdrawalLocked(receiptHash, receipt);\\n return locked;\\n }\\n\\n _recordWithdrawal(tokenAddr, quantity);\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), tokenAddr, wrappedNativeToken);\\n emit Withdrew(receiptHash, receipt);\\n }\\n\\n /**\\n * @dev Requests deposit made by `_requester` address.\\n *\\n * Requirements:\\n * - The token info is valid.\\n * - The `msg.value` is 0 while depositing ERC20 token.\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\n *\\n * Emits the `DepositRequested` event.\\n *\\n */\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\n MappedToken memory _token;\\n address _roninWeth = address(wrappedNativeToken);\\n\\n _request.info.validate();\\n if (_request.tokenAddr == address(0)) {\\n if (_request.info.quantity != msg.value) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_roninWeth);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.tokenAddr = _roninWeth;\\n } else {\\n if (msg.value != 0) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_request.tokenAddr);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\n // Withdraw if token is WETH\\n // The withdraw of WETH must go via `WethUnwrapper`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy.\\n if (_roninWeth == _request.tokenAddr) {\\n wrappedNativeToken.approve(address(wethUnwrapper), _request.info.quantity);\\n wethUnwrapper.unwrap(_request.info.quantity);\\n }\\n }\\n\\n uint256 _depositId = depositCount++;\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId);\\n\\n emit DepositRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Returns the minimum vote weight for the token.\\n */\\n function _computeMinVoteWeight(TokenStandard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) {\\n uint256 _totalWeight = _getTotalWeight();\\n _weight = _minimumVoteWeight(_totalWeight);\\n if (_erc == TokenStandard.ERC20) {\\n if (highTierThreshold[_token] <= _quantity) {\\n _weight = _highTierVoteWeight(_totalWeight);\\n }\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\n }\\n }\\n\\n /**\\n * @dev Update domain seperator.\\n */\\n function _updateDomainSeparator() internal {\\n /*\\n * _domainSeparator = keccak256(\\n * abi.encode(\\n * keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n * keccak256(\\\"MainchainGatewayV2\\\"),\\n * keccak256(\\\"2\\\"),\\n * block.chainid,\\n * address(this)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n // keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")\\n mstore(ptr, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)\\n // keccak256(\\\"MainchainGatewayV2\\\")\\n mstore(add(ptr, 0x20), 0x159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b)\\n // keccak256(\\\"2\\\")\\n mstore(add(ptr, 0x40), 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5)\\n mstore(add(ptr, 0x60), chainid())\\n mstore(add(ptr, 0x80), address())\\n sstore(_domainSeparator.slot, keccak256(ptr, 0xa0))\\n }\\n }\\n\\n /**\\n * @dev Sets the WETH contract.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\n wrappedNativeToken = _wrapedToken;\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\n }\\n\\n /**\\n * @dev Receives ETH from WETH or creates deposit request if sender is not WETH or WETHUnwrapper.\\n */\\n function _fallback() internal virtual {\\n if (msg.sender == address(wrappedNativeToken) || msg.sender == address(wethUnwrapper)) {\\n return;\\n }\\n\\n _createDepositOnFallback();\\n }\\n\\n /**\\n * @dev Creates deposit request.\\n */\\n function _createDepositOnFallback() internal virtual whenNotPaused {\\n Transfer.Request memory _request;\\n _request.recipientAddr = msg.sender;\\n _request.info.quantity = msg.value;\\n _requestDepositFor(_request, _request.recipientAddr);\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return _totalOperatorWeight;\\n }\\n\\n /**\\n * @dev Returns the weight of an address.\\n */\\n function _getWeight(address addr) internal view returns (uint256) {\\n return _operatorWeight[addr];\\n }\\n\\n ///////////////////////////////////////////////\\n // CALLBACKS\\n ///////////////////////////////////////////////\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsAdded(\\n address[] calldata operators,\\n uint96[] calldata weights,\\n bool[] memory addeds\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint256 length = operators.length;\\n if (length != addeds.length || length != weights.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n for (uint256 i; i < length; ++i) {\\n unchecked {\\n if (addeds[i]) {\\n _totalOperatorWeight += weights[i];\\n _operatorWeight[operators[i]] = weights[i];\\n }\\n }\\n }\\n\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint length = operators.length;\\n if (length != removeds.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n uint96 totalRemovingWeight;\\n for (uint i; i < length; ++i) {\\n unchecked {\\n if (removeds[i]) {\\n totalRemovingWeight += _operatorWeight[operators[i]];\\n delete _operatorWeight[operators[i]];\\n }\\n }\\n }\\n\\n _totalOperatorWeight -= totalRemovingWeight;\\n\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) {\\n return interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xec96f442086b449ebfd100c3bee1c866e816fea34a443a4b43a0dd7b85751595\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 28, - "numDeployments": 2, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC1155MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForApprovedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForInsufficientVoteWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForProcessedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrReachedDailyWithdrawalLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum TokenStandard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"wethUnwrapper_\",\"type\":\"address\"}],\"name\":\"initializeV4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"},{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsAdded\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"removeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsRemoved\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wethUnwrapper\",\"outputs\":[{\"internalType\":\"contract WethUnwrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC1155MintingFailed()\":[{\"details\":\"Error indicating that the mint of ERC1155 tokens has failed.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidPercentage()\":[{\"details\":\"Error of invalid percentage.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForApprovedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for an approved withdrawal.\"}],\"ErrQueryForInsufficientVoteWeight()\":[{\"details\":\"Error indicating that a query was made for insufficient vote weight.\"}],\"ErrQueryForProcessedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for a processed withdrawal.\"}],\"ErrReachedDailyWithdrawalLimit()\":[{\"details\":\"Error indicating that the daily withdrawal limit has been reached.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `handleAssetIn` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"DailyWithdrawalLimitsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the daily limit thresholds are updated\"},\"DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the deposit is requested\"},\"HighTierThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\"},\"HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the high-tier vote weight threshold is updated\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LockedThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for locked withdrawals are updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"TokenMapped(address[],address[],uint8[])\":{\"details\":\"Emitted when the tokens are mapped\"},\"UnlockFeePercentagesUpdated(address[],uint256[])\":{\"details\":\"Emitted when the fee percentages to unlock withdraw are updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is locked\"},\"WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is unlocked\"},\"Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are withdrawn\"},\"WrappedNativeTokenContractUpdated(address)\":{\"details\":\"Emitted when the wrapped native token contract is updated\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"onBridgeOperatorsAdded(address[],uint96[],bool[])\":{\"details\":\"Handles the event when bridge operators are added.\",\"params\":{\"addeds\":\"The corresponding boolean values indicating whether the operators were added or not.\",\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"onBridgeOperatorsRemoved(address[],bool[])\":{\"details\":\"Handles the event when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\",\"removeds\":\"The corresponding boolean values indicating whether the operators were removed or not.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"______deprecatedBridgeOperatorAddedBlock\":{\"custom:deprecated\":\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\"},\"______deprecatedBridgeOperators\":{\"custom:deprecated\":\"Previously `_bridgeOperators` (uint256[])\"},\"_domainSeparator\":{\"details\":\"Domain separator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainGatewayV3.sol\":\"MainchainGatewayV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\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 ReentrancyGuard {\\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 constructor() {\\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 making 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}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(\\n address account,\\n uint256 id,\\n uint256 value\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(\\n address account,\\n uint256[] memory ids,\\n uint256[] memory values\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../extensions/ERC1155Burnable.sol\\\";\\nimport \\\"../extensions/ERC1155Pausable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerable.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev {ERC1155} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n *\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\n */\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\n * deploys the contract.\\n */\\n constructor(string memory uri) ERC1155(uri) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\n *\\n * See {ERC1155-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mint(to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\n */\\n function mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControlEnumerable, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\n uint256 prevNum = _num;\\n uint256 prevDenom = _denom;\\n _num = num;\\n _denom = denom;\\n unchecked {\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/WethUnwrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\ncontract WethUnwrapper is ReentrancyGuard {\\n IWETH public immutable weth;\\n\\n error ErrCannotTransferFrom();\\n error ErrNotWrappedContract();\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\n\\n constructor(address weth_) {\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\n weth = IWETH(weth_);\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n function unwrap(uint256 amount) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(msg.sender), amount);\\n }\\n\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(to), amount);\\n }\\n\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\n if (!success) revert ErrCannotTransferFrom();\\n\\n weth.withdraw(amount);\\n }\\n\\n function _sendNativeTo(address payable to, uint256 val) internal {\\n (bool success,) = to.call{ value: val }(\\\"\\\");\\n if (!success) {\\n revert ErrExternalCallFailed(to, msg.sig);\\n }\\n }\\n\\n function _fallback() internal view {\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\n }\\n}\\n\",\"keccak256\":\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\",\"license\":\"MIT\"},\"src/extensions/WithdrawalLimitation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./GatewayV3.sol\\\";\\n\\nabstract contract WithdrawalLimitation is GatewayV3 {\\n /// @dev Error of invalid percentage.\\n error ErrInvalidPercentage();\\n\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\n event HighTierVoteWeightThresholdUpdated(\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\n );\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\n /// @dev Emitted when the daily limit thresholds are updated\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\n\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\n\\n uint256 internal _highTierVWNum;\\n uint256 internal _highTierVWDenom;\\n\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\n mapping(address => uint256) public highTierThreshold;\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\n mapping(address => uint256) public lockedThreshold;\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\n /// @notice Values 0-1,000,000 map to 0%-100%\\n mapping(address => uint256) public unlockFeePercentages;\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\n mapping(address => uint256) public dailyWithdrawalLimit;\\n /// @dev Mapping from token address => today withdrawal amount\\n mapping(address => uint256) public lastSyncedWithdrawal;\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\n mapping(address => uint256) public lastDateSynced;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `GatewayV3-setThreshold`.\\n *\\n * Requirements:\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n */\\n function setThreshold(uint256 num, uint256 denom) external virtual override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Returns the high-tier vote weight threshold.\\n */\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\n return (_highTierVWNum, _highTierVWDenom);\\n }\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\n */\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function setHighTierVoteWeightThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyProxyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setHighTierThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setLockedThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setUnlockFeePercentages(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setDailyWithdrawalLimits(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the limitation.\\n */\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\n return _reachedWithdrawalLimit(_token, _quantity);\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n\\n _previousNum = _highTierVWNum;\\n _previousDenom = _highTierVWDenom;\\n _highTierVWNum = _numerator;\\n _highTierVWDenom = _denominator;\\n\\n unchecked {\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n * - The percentage is equal to or less than 100_000.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\n if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage();\\n\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\n if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\n *\\n * Requirements:\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\n *\\n */\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\n return false;\\n }\\n\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n return dailyWithdrawalLimit[_token] <= _quantity;\\n } else {\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\n }\\n }\\n\\n /**\\n * @dev Record withdrawal token.\\n */\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n lastDateSynced[_token] = _currentDate;\\n lastSyncedWithdrawal[_token] = _quantity;\\n } else {\\n lastSyncedWithdrawal[_token] += _quantity;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the withdrawal request is locked or not.\\n */\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n return lockedThreshold[_token] <= _quantity;\\n }\\n\\n /**\\n * @dev Computes fee percentage.\\n */\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\n }\\n\\n /**\\n * @dev Returns high-tier vote weight.\\n */\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\n }\\n\\n /**\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\n */\\n function _verifyThresholds() internal view {\\n if (_num * _highTierVWDenom > _highTierVWNum * _denom) revert ErrInvalidThreshold(msg.sig);\\n }\\n}\\n\",\"keccak256\":\"0x4b7d559d4b1f53239b8690776318db8d63f578f72fb269d8024570aa70c2c2a6\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/IMainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./consumers/SignatureConsumer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\n /**\\n * @dev Error indicating that a query was made for an approved withdrawal.\\n */\\n error ErrQueryForApprovedWithdrawal();\\n\\n /**\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\n */\\n error ErrReachedDailyWithdrawalLimit();\\n\\n /**\\n * @dev Error indicating that a query was made for a processed withdrawal.\\n */\\n error ErrQueryForProcessedWithdrawal();\\n\\n /**\\n * @dev Error indicating that a query was made for insufficient vote weight.\\n */\\n error ErrQueryForInsufficientVoteWeight();\\n\\n /// @dev Emitted when the deposit is requested\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the assets are withdrawn\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards);\\n /// @dev Emitted when the wrapped native token contract is updated\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\n /// @dev Emitted when the withdrawal is locked\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is unlocked\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n\\n /**\\n * @dev Returns the domain seperator.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns deposit count.\\n */\\n function depositCount() external view returns (uint256);\\n\\n /**\\n * @dev Sets the wrapped native token contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\n\\n /**\\n * @dev Returns whether the withdrawal is locked.\\n */\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns the withdrawal hash.\\n */\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\n\\n /**\\n * @dev Locks the assets and request deposit.\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\n\\n /**\\n * @dev Withdraws based on the receipt and the validator signatures.\\n * Returns whether the withdrawal is locked.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked);\\n\\n /**\\n * @dev Approves a specific withdrawal.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n uint256[][4] calldata _thresholds\\n ) external;\\n\\n /**\\n * @dev Returns token address on Ronin network.\\n * Note: Reverts for unsupported token.\\n */\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x2d4f53a65e76e903040f5f4dbe5aea53367d61243c60efdc8402ff184bd50a87\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/LibTokenInfo.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n TokenStandard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/LibTokenInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nenum TokenStandard {\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\\nstruct TokenInfo {\\n TokenStandard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n}\\n\\n/**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\n\\n/**\\n * @dev Error indicating that the `handleAssetIn` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\n\\n/// @dev Error indicating that the provided information is invalid.\\nerror ErrInvalidInfo();\\n\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\nerror ErrERC20MintingFailed();\\n\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\nerror ErrERC721MintingFailed();\\n\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\nerror ErrERC1155TransferFailed();\\n\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\nerror ErrERC1155MintingFailed();\\n\\n/// @dev Error indicating that an unsupported standard is encountered.\\nerror ErrUnsupportedStandard();\\n\\nlibrary LibTokenInfo {\\n /**\\n *\\n * HASH\\n *\\n */\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n *\\n * VALIDATE\\n *\\n */\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(TokenInfo memory self) internal pure {\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\n revert ErrInvalidInfo();\\n }\\n }\\n\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\n }\\n\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\n }\\n\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\n }\\n\\n /**\\n *\\n * TRANSFER IN/OUT METHOD\\n *\\n */\\n\\n /**\\n * @dev Transfer asset in.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\n bool success;\\n bytes memory data;\\n if (self.erc == TokenStandard.ERC20) {\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\n } else if (self.erc == TokenStandard.ERC1155) {\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\n }\\n\\n /**\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\n if (token == address(wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!to.send(self.quantity)) {\\n wrappedNativeToken.deposit{ value: self.quantity }();\\n _transferTokenOut(self, to, token);\\n }\\n\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC20) {\\n uint256 balance = IERC20(token).balanceOf(address(this));\\n if (balance < self.quantity) {\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\n }\\n\\n _transferTokenOut(self, to, token);\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC721) {\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\n revert ErrERC721MintingFailed();\\n }\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC1155) {\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\n revert ErrERC1155MintingFailed();\\n }\\n return;\\n }\\n\\n revert ErrUnsupportedStandard();\\n }\\n\\n /**\\n *\\n * TRANSFER HELPERS\\n *\\n */\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\n bool success;\\n if (self.erc == TokenStandard.ERC20) {\\n success = _tryTransferERC20(token, to, self.quantity);\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\n }\\n\\n /**\\n * TRANSFER ERC-20\\n */\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n bytes memory data;\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n }\\n\\n /**\\n * @dev Mints ERC20 token and returns the result.\\n */\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\n }\\n\\n /**\\n * TRANSFER ERC-721\\n */\\n\\n /**\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n success = _tryTransferFromERC721(token, address(this), to, id);\\n if (!success) {\\n return _tryMintERC721(token, to, id);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\n }\\n\\n /**\\n * @dev Mints ERC721 token and returns the result.\\n */\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\n }\\n\\n /**\\n * TRANSFER ERC-1155\\n */\\n\\n /**\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\n if (!success) {\\n return _tryMintERC1155(token, to, id, amount);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC1155 token and returns the result.\\n */\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\n }\\n\\n /**\\n * @dev Mints ERC1155 token and returns the result.\\n */\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\n }\\n}\\n\",\"keccak256\":\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\",\"license\":\"MIT\"},\"src/libraries/LibTokenOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TokenOwner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n}\\n\\nlibrary LibTokenOwner {\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\",\"license\":\"MIT\"},\"src/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./LibTokenInfo.sol\\\";\\nimport \\\"./LibTokenOwner.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n using LibTokenOwner for TokenOwner;\\n using LibTokenInfo for TokenInfo;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n TokenInfo info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n TokenOwner mainchain;\\n TokenOwner ronin;\\n TokenInfo info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\",\"license\":\"MIT\"},\"src/mainchain/MainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport { IBridgeManager } from \\\"../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts, ContractType } from \\\"../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../extensions/WethUnwrapper.sol\\\";\\nimport \\\"../extensions/WithdrawalLimitation.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"../interfaces/IMainchainGatewayV3.sol\\\";\\n\\ncontract MainchainGatewayV3 is\\n WithdrawalLimitation,\\n Initializable,\\n AccessControlEnumerable,\\n ERC1155Holder,\\n IMainchainGatewayV3,\\n HasContracts,\\n IBridgeManagerCallback\\n{\\n using LibTokenInfo for TokenInfo;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n\\n /// @dev Withdrawal unlocker role hash\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\"WITHDRAWAL_UNLOCKER_ROLE\\\");\\n\\n /// @dev Wrapped native token address\\n IWETH public wrappedNativeToken;\\n /// @dev Ronin network id\\n uint256 public roninChainId;\\n /// @dev Total deposit\\n uint256 public depositCount;\\n /// @dev Domain separator\\n bytes32 internal _domainSeparator;\\n /// @dev Mapping from mainchain token => token address on Ronin network\\n mapping(address => MappedToken) internal _roninToken;\\n /// @dev Mapping from withdrawal id => withdrawal hash\\n mapping(uint256 => bytes32) public withdrawalHash;\\n /// @dev Mapping from withdrawal id => locked\\n mapping(uint256 => bool) public withdrawalLocked;\\n\\n /// @custom:deprecated Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\n uint256 private ______deprecatedBridgeOperatorAddedBlock;\\n /// @custom:deprecated Previously `_bridgeOperators` (uint256[])\\n uint256 private ______deprecatedBridgeOperators;\\n\\n uint96 private _totalOperatorWeight;\\n mapping(address operator => uint96 weight) private _operatorWeight;\\n WethUnwrapper public wethUnwrapper;\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n IWETH _wrappedToken,\\n uint256 _roninChainId,\\n uint256 _numerator,\\n uint256 _highTierVWNumerator,\\n uint256 _denominator,\\n // _addresses[0]: mainchainTokens\\n // _addresses[1]: roninTokens\\n // _addresses[2]: withdrawalUnlockers\\n address[][3] calldata _addresses,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds,\\n TokenStandard[] calldata _standards\\n ) external payable virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n roninChainId = _roninChainId;\\n\\n _setWrappedNativeTokenContract(_wrappedToken);\\n _updateDomainSeparator();\\n _setThreshold(_numerator, _denominator);\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\n _verifyThresholds();\\n\\n if (_addresses[0].length > 0) {\\n // Map mainchain tokens to ronin tokens\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\n // Sets thresholds based on the mainchain tokens\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\n }\\n\\n // Grant role for withdrawal unlocker\\n for (uint256 i; i < _addresses[2].length; i++) {\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][i]);\\n }\\n }\\n\\n function initializeV2(address bridgeManagerContract) external reinitializer(2) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n }\\n\\n function initializeV3() external reinitializer(3) {\\n IBridgeManager mainchainBridgeManager = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER));\\n (, address[] memory operators, uint96[] memory weights) = mainchainBridgeManager.getFullBridgeOperatorInfos();\\n\\n uint96 totalWeight;\\n for (uint i; i < operators.length; i++) {\\n _operatorWeight[operators[i]] = weights[i];\\n totalWeight += weights[i];\\n }\\n _totalOperatorWeight = totalWeight;\\n }\\n\\n function initializeV4(address payable wethUnwrapper_) external reinitializer(4) {\\n wethUnwrapper = WethUnwrapper(wethUnwrapper_);\\n }\\n\\n /**\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\n */\\n function receiveEther() external payable { }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparator;\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyProxyAdmin {\\n _setWrappedNativeTokenContract(_wrappedToken);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\n _requestDepositFor(_request, msg.sender);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) {\\n return _submitWithdrawal(_receipt, _signatures);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\n bytes32 _receiptHash = receipt.hash();\\n if (withdrawalHash[receipt.id] != receipt.hash()) {\\n revert ErrInvalidReceipt();\\n }\\n if (!withdrawalLocked[receipt.id]) {\\n revert ErrQueryForApprovedWithdrawal();\\n }\\n delete withdrawalLocked[receipt.id];\\n emit WithdrawalUnlocked(_receiptHash, receipt);\\n\\n address token = receipt.mainchain.tokenAddr;\\n if (receipt.info.erc == TokenStandard.ERC20) {\\n TokenInfo memory feeInfo = receipt.info;\\n feeInfo.quantity = _computeFeePercentage(receipt.info.quantity, unlockFeePercentages[token]);\\n TokenInfo memory withdrawInfo = receipt.info;\\n withdrawInfo.quantity = receipt.info.quantity - feeInfo.quantity;\\n\\n feeInfo.handleAssetOut(payable(msg.sender), token, wrappedNativeToken);\\n withdrawInfo.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n } else {\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n }\\n\\n emit Withdrew(_receiptHash, receipt);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds\\n ) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function getRoninToken(address mainchainToken) public view returns (MappedToken memory token) {\\n token = _roninToken[mainchainToken];\\n if (token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(address[] calldata mainchainTokens, address[] calldata roninTokens, TokenStandard[] calldata standards) internal virtual {\\n if (!(mainchainTokens.length == roninTokens.length && mainchainTokens.length == standards.length)) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 i; i < mainchainTokens.length; ++i) {\\n _roninToken[mainchainTokens[i]].tokenAddr = roninTokens[i];\\n _roninToken[mainchainTokens[i]].erc = standards[i];\\n }\\n\\n emit TokenMapped(mainchainTokens, roninTokens, standards);\\n }\\n\\n /**\\n * @dev Submits withdrawal receipt.\\n *\\n * Requirements:\\n * - The receipt kind is withdrawal.\\n * - The receipt is to withdraw on this chain.\\n * - The receipt is not used to withdraw before.\\n * - The withdrawal is not reached the limit threshold.\\n * - The signer weight total is larger than or equal to the minimum threshold.\\n * - The signature signers are in order.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function _submitWithdrawal(Transfer.Receipt calldata receipt, Signature[] memory signatures) internal virtual returns (bool locked) {\\n uint256 id = receipt.id;\\n uint256 quantity = receipt.info.quantity;\\n address tokenAddr = receipt.mainchain.tokenAddr;\\n\\n receipt.info.validate();\\n if (receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind();\\n\\n if (receipt.mainchain.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, receipt.mainchain.chainId, block.chainid);\\n }\\n\\n MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr);\\n\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr && receipt.ronin.chainId == roninChainId)) {\\n revert ErrInvalidReceipt();\\n }\\n\\n if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal();\\n\\n if (!(receipt.info.erc == TokenStandard.ERC721 || !_reachedWithdrawalLimit(tokenAddr, quantity))) {\\n revert ErrReachedDailyWithdrawalLimit();\\n }\\n\\n bytes32 receiptHash = receipt.hash();\\n bytes32 receiptDigest = Transfer.receiptDigest(_domainSeparator, receiptHash);\\n\\n uint256 minimumWeight;\\n (minimumWeight, locked) = _computeMinVoteWeight(receipt.info.erc, tokenAddr, quantity);\\n\\n {\\n bool passed;\\n address signer;\\n address lastSigner;\\n Signature memory sig;\\n uint256 weight;\\n for (uint256 i; i < signatures.length; i++) {\\n sig = signatures[i];\\n signer = ecrecover(receiptDigest, sig.v, sig.r, sig.s);\\n if (lastSigner >= signer) revert ErrInvalidOrder(msg.sig);\\n\\n lastSigner = signer;\\n\\n weight += _getWeight(signer);\\n if (weight >= minimumWeight) {\\n passed = true;\\n break;\\n }\\n }\\n\\n if (!passed) revert ErrQueryForInsufficientVoteWeight();\\n withdrawalHash[id] = receiptHash;\\n }\\n\\n if (locked) {\\n withdrawalLocked[id] = true;\\n emit WithdrawalLocked(receiptHash, receipt);\\n return locked;\\n }\\n\\n _recordWithdrawal(tokenAddr, quantity);\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), tokenAddr, wrappedNativeToken);\\n emit Withdrew(receiptHash, receipt);\\n }\\n\\n /**\\n * @dev Requests deposit made by `_requester` address.\\n *\\n * Requirements:\\n * - The token info is valid.\\n * - The `msg.value` is 0 while depositing ERC20 token.\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\n *\\n * Emits the `DepositRequested` event.\\n *\\n */\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\n MappedToken memory _token;\\n address _roninWeth = address(wrappedNativeToken);\\n\\n _request.info.validate();\\n if (_request.tokenAddr == address(0)) {\\n if (_request.info.quantity != msg.value) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_roninWeth);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.tokenAddr = _roninWeth;\\n } else {\\n if (msg.value != 0) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_request.tokenAddr);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\n // Withdraw if token is WETH\\n // The withdraw of WETH must go via `WethUnwrapper`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy.\\n if (_roninWeth == _request.tokenAddr) {\\n wrappedNativeToken.approve(address(wethUnwrapper), _request.info.quantity);\\n wethUnwrapper.unwrap(_request.info.quantity);\\n }\\n }\\n\\n uint256 _depositId = depositCount++;\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId);\\n\\n emit DepositRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Returns the minimum vote weight for the token.\\n */\\n function _computeMinVoteWeight(TokenStandard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) {\\n uint256 _totalWeight = _getTotalWeight();\\n _weight = _minimumVoteWeight(_totalWeight);\\n if (_erc == TokenStandard.ERC20) {\\n if (highTierThreshold[_token] <= _quantity) {\\n _weight = _highTierVoteWeight(_totalWeight);\\n }\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\n }\\n }\\n\\n /**\\n * @dev Update domain seperator.\\n */\\n function _updateDomainSeparator() internal {\\n /*\\n * _domainSeparator = keccak256(\\n * abi.encode(\\n * keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n * keccak256(\\\"MainchainGatewayV2\\\"),\\n * keccak256(\\\"2\\\"),\\n * block.chainid,\\n * address(this)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n // keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")\\n mstore(ptr, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)\\n // keccak256(\\\"MainchainGatewayV2\\\")\\n mstore(add(ptr, 0x20), 0x159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b)\\n // keccak256(\\\"2\\\")\\n mstore(add(ptr, 0x40), 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5)\\n mstore(add(ptr, 0x60), chainid())\\n mstore(add(ptr, 0x80), address())\\n sstore(_domainSeparator.slot, keccak256(ptr, 0xa0))\\n }\\n }\\n\\n /**\\n * @dev Sets the WETH contract.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\n wrappedNativeToken = _wrapedToken;\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\n }\\n\\n /**\\n * @dev Receives ETH from WETH or creates deposit request if sender is not WETH or WETHUnwrapper.\\n */\\n function _fallback() internal virtual {\\n if (msg.sender == address(wrappedNativeToken) || msg.sender == address(wethUnwrapper)) {\\n return;\\n }\\n\\n _createDepositOnFallback();\\n }\\n\\n /**\\n * @dev Creates deposit request.\\n */\\n function _createDepositOnFallback() internal virtual whenNotPaused {\\n Transfer.Request memory _request;\\n _request.recipientAddr = msg.sender;\\n _request.info.quantity = msg.value;\\n _requestDepositFor(_request, _request.recipientAddr);\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return _totalOperatorWeight;\\n }\\n\\n /**\\n * @dev Returns the weight of an address.\\n */\\n function _getWeight(address addr) internal view returns (uint256) {\\n return _operatorWeight[addr];\\n }\\n\\n ///////////////////////////////////////////////\\n // CALLBACKS\\n ///////////////////////////////////////////////\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsAdded(\\n address[] calldata operators,\\n uint96[] calldata weights,\\n bool[] memory addeds\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint256 length = operators.length;\\n if (length != addeds.length || length != weights.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n for (uint256 i; i < length; ++i) {\\n unchecked {\\n if (addeds[i]) {\\n _totalOperatorWeight += weights[i];\\n _operatorWeight[operators[i]] = weights[i];\\n }\\n }\\n }\\n\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint length = operators.length;\\n if (length != removeds.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n uint96 totalRemovingWeight;\\n for (uint i; i < length; ++i) {\\n unchecked {\\n if (removeds[i]) {\\n totalRemovingWeight += _operatorWeight[operators[i]];\\n delete _operatorWeight[operators[i]];\\n }\\n }\\n }\\n\\n _totalOperatorWeight -= totalRemovingWeight;\\n\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) {\\n return\\n interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x6fc5c51508dd63916c19d07f93fa37e265fd7c347b9e5e0ad50a14f9ff85ab14\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 26, + "numDeployments": 3, "storageLayout": { "storage": [ { @@ -3172,7 +3172,7 @@ } } }, - "timestamp": 1713254676, + "timestamp": 1713254892, "userdoc": { "version": 1, "kind": "user", diff --git a/deployments/sepolia/WethUnwrapper.json b/deployments/sepolia/WethUnwrapper.json index e4f5d0ed..6bdcf94e 100644 --- a/deployments/sepolia/WethUnwrapper.json +++ b/deployments/sepolia/WethUnwrapper.json @@ -90,10 +90,10 @@ "inputs": [] } ], - "address": "0x1050f2E63177b5eD18f3E88D000DB3a600d664e3", + "address": "0xdbf1c9FB0cb61Ae76901e55c5C04e77d2BE131A1", "args": "0x0000000000000000000000001aa1bc6baefcf09d6fd0139b828b5e764d050f08", "ast": "", - "blockNumber": 5709352, + "blockNumber": 5709370, "bytecode": "0x60a060405234801561001057600080fd5b5060405161059138038061059183398101604081905261002f91610071565b600160009081556001600160a01b0382163b90036100605760405163155634d360e31b815260040160405180910390fd5b6001600160a01b03166080526100a1565b60006020828403121561008357600080fd5b81516001600160a01b038116811461009a57600080fd5b9392505050565b6080516104c26100cf6000396000818160610152818160ea01528181610237015261030a01526104c26000f3fe6080604052600436106100385760003560e01c80633fc8cef31461004f5780635dbd60591461009f578063de0e9a3e146100bf57610047565b36610047576100456100df565b005b6100456100df565b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ab57600080fd5b506100456100ba366004610408565b61012a565b3480156100cb57600080fd5b506100456100da366004610444565b6101a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101285760405163155634d360e31b815260040160405180910390fd5b565b6002600054036101815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005561018f82610214565b6101998183610372565b50506001600055565b6002600054036101f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610178565b600260005561020281610214565b61020c3382610372565b506001600055565b604051336024820152306044820152606481018290526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610290919061045d565b6000604051808303816000865af19150503d80600081146102cd576040519150601f19603f3d011682016040523d82523d6000602084013e6102d2565b606091505b50509050806102f4576040516302805e0360e11b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561035657600080fd5b505af115801561036a573d6000803e3d6000fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103bf576040519150601f19603f3d011682016040523d82523d6000602084013e6103c4565b606091505b50509050806104035760405163094b984760e21b81526001600160a01b03841660048201526001600160e01b0319600035166024820152604401610178565b505050565b6000806040838503121561041b57600080fd5b8235915060208301356001600160a01b038116811461043957600080fd5b809150509250929050565b60006020828403121561045657600080fd5b5035919050565b6000825160005b8181101561047e5760208186018101518583015201610464565b50600092019182525091905056fea2646970667358221220aaebf21164f6d2f08d44be8bf09fb75965583264b715eb60df75d1b1d0f7cb9e64736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "WethUnwrapper.sol", @@ -105,8 +105,8 @@ }, "isFoundry": true, "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"weth_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrCannotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"sig\",\"type\":\"bytes4\"}],\"name\":\"ErrExternalCallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrNotWrappedContract\",\"type\":\"error\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unwrap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"unwrapTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/WethUnwrapper.sol\":\"WethUnwrapper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\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 ReentrancyGuard {\\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 constructor() {\\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 making 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}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"src/extensions/WethUnwrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\ncontract WethUnwrapper is ReentrancyGuard {\\n IWETH public immutable weth;\\n\\n error ErrCannotTransferFrom();\\n error ErrNotWrappedContract();\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\n\\n constructor(address weth_) {\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\n weth = IWETH(weth_);\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n function unwrap(uint256 amount) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(msg.sender), amount);\\n }\\n\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(to), amount);\\n }\\n\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\n if (!success) revert ErrCannotTransferFrom();\\n\\n weth.withdraw(amount);\\n }\\n\\n function _sendNativeTo(address payable to, uint256 val) internal {\\n (bool success,) = to.call{ value: val }(\\\"\\\");\\n if (!success) {\\n revert ErrExternalCallFailed(to, msg.sig);\\n }\\n }\\n\\n function _fallback() internal view {\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\n }\\n}\\n\",\"keccak256\":\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 26, - "numDeployments": 1, + "nonce": 24, + "numDeployments": 2, "storageLayout": { "storage": [ { @@ -126,7 +126,7 @@ } } }, - "timestamp": 1713254676, + "timestamp": 1713254892, "userdoc": { "version": 1, "kind": "user" From 8824fc9c435e3d4a84ae6443aad1357a7ade6152 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 12 Jun 2024 12:52:28 +0700 Subject: [PATCH 198/305] chore: add script and artifact of batcher --- .../11155111/run-1717660107.json | 53 +++ .../sepolia/MainchainGatewayBatcherLogic.json | 354 ++++++++++++++++++ .../sepolia/MainchainGatewayBatcherProxy.json | 218 +++++++++++ .../20240606-deploy-batcher-sepolia.s.sol | 81 ++++ 4 files changed, 706 insertions(+) create mode 100644 broadcast/20240606-deploy-batcher-sepolia.s.sol/11155111/run-1717660107.json create mode 100644 deployments/sepolia/MainchainGatewayBatcherLogic.json create mode 100644 deployments/sepolia/MainchainGatewayBatcherProxy.json create mode 100644 script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol diff --git a/broadcast/20240606-deploy-batcher-sepolia.s.sol/11155111/run-1717660107.json b/broadcast/20240606-deploy-batcher-sepolia.s.sol/11155111/run-1717660107.json new file mode 100644 index 00000000..0a0238dc --- /dev/null +++ b/broadcast/20240606-deploy-batcher-sepolia.s.sol/11155111/run-1717660107.json @@ -0,0 +1,53 @@ +{ + "transactions": [ + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": null, + "function": null, + "arguments": null, + "transaction": { + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": null, + "gas": null, + "value": "0x0", + "input": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61103e806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780634d7a06d614610084578063bc197c8114610099578063c4d66de8146100d1578063f23a6e61146100e4575b600080fd5b61006f61006a366004610997565b610103565b60405190151581526020015b60405180910390f35b6100976100923660046109c8565b61013a565b005b6100b86100a7366004610b7b565b63bc197c8160e01b95945050505050565b6040516001600160e01b0319909116815260200161007b565b6100976100df366004610c29565b610290565b6100b86100f2366004610c46565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b148061013457506301ffc9a760e01b6001600160e01b03198316145b92915050565b61098d808061016261014f6040860186610caf565b61015d906020810190610ce3565b6103c1565b919450925090506101898361017a6040870187610caf565b61018390610d7e565b9061043e565b6101bc3361019d6040870160208801610c29565b846101ab6040890189610caf565b6101b490610d7e565b92919061046b565b6101cc6040850160208601610c29565b60005460405163a22cb46560e01b81526001600160a01b0362010000909204821660048201526001602482015291169063a22cb46590604401600060405180830381600087803b15801561021f57600080fd5b505af1158015610233573d6000803e3d6000fd5b5050505061025f8461024490610d8a565b6000546201000090046001600160a01b031663ffffffff8416565b60405133907f16046601be35ef10e1935f09b294d0542fcdcadc83acd3d60b4f9ae6d742025d90600090a250505050565b600054610100900460ff16158080156102b05750600054600160ff909116105b806102ca5750303b1580156102ca575060005460ff166001145b6103325760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff191660011790558015610355576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b0385160217905580156103bd576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61098d808060018460028111156103da576103da610dea565b036103f257506104a591506104de90506104f8610437565b600284600281111561040657610406610dea565b0361041e5750610600915061069890506106af610437565b6040516361e411a760e11b815260040160405180910390fd5b9193909250565b61044b828263ffffffff16565b6103bd5781516040516360ebe40360e11b81526103299190600401610e22565b61047a8484848463ffffffff16565b61049f578383308460405163e4e50f8960e01b81526004016103299493929190610e6c565b50505050565b60006001825160028111156104bc576104bc610dea565b1480156104cd575060208201515115155b801561013457505060400151511590565b60006104f082843087602001516107d7565b949350505050565b6040820151602001515160005b8181101561049f57826001600160a01b0316634b14557e604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b031681526020016040518060600160405280896040015160000151600281111561057257610572610dea565b8152602001896040015160200151878151811061059157610591610ee1565b6020026020010151815260200160008152508152506040518263ffffffff1660e01b81526004016105c29190610ef7565b600060405180830381600087803b1580156105dc57600080fd5b505af11580156105f0573d6000803e3d6000fd5b5050600190920191506105059050565b60208101515160009060028351600281111561061e5761061e610dea565b14801561062f575060208301515115155b801561063f575082604001515181145b61064c5750600092915050565b60005b8181101561068e578360400151818151811061066d5761066d610ee1565b6020026020010151600003610686575060009392505050565b60010161064f565b5060019392505050565b60006104f08284308760200151886040015161082b565b6040820151602001515160005b8181101561049f57826001600160a01b0316634b14557e604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b031681526020016040518060600160405280896040015160000151600281111561072957610729610dea565b8152602001896040015160200151878151811061074857610748610ee1565b60200260200101518152602001896040015160400151878151811061076f5761076f610ee1565b60200260200101518152508152506040518263ffffffff1660e01b81526004016107999190610ef7565b600060405180830381600087803b1580156107b357600080fd5b505af11580156107c7573d6000803e3d6000fd5b5050600190920191506106bc9050565b6000805b825181101561081f576108098686868685815181106107fc576107fc610ee1565b60200260200101516108df565b6108175760009150506104f0565b6001016107db565b50600195945050505050565b604080516000808252602082019092526001600160a01b0387169061085b90879087908790879060448101610f6c565b60408051601f198184030181529181526020820180516001600160e01b0316631759616b60e11b179052516108909190610fe0565b6000604051808303816000865af19150503d80600081146108cd576040519150601f19603f3d011682016040523d82523d6000602084013e6108d2565b606091505b5090979650505050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009287169161093f91610fe0565b6000604051808303816000865af19150503d806000811461097c576040519150601f19603f3d011682016040523d82523d6000602084013e610981565b606091505b50909695505050505050565b610995610ff2565b565b6000602082840312156109a957600080fd5b81356001600160e01b0319811681146109c157600080fd5b9392505050565b6000602082840312156109da57600080fd5b813567ffffffffffffffff8111156109f157600080fd5b8201606081850312156109c157600080fd5b6001600160a01b0381168114610a1857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610a5457610a54610a1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610a8357610a83610a1b565b604052919050565b600082601f830112610a9c57600080fd5b8135602067ffffffffffffffff821115610ab857610ab8610a1b565b8160051b610ac7828201610a5a565b9283528481018201928281019087851115610ae157600080fd5b83870192505b84831015610b0057823582529183019190830190610ae7565b979650505050505050565b600082601f830112610b1c57600080fd5b813567ffffffffffffffff811115610b3657610b36610a1b565b610b49601f8201601f1916602001610a5a565b818152846020838601011115610b5e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610b9357600080fd5b8535610b9e81610a03565b94506020860135610bae81610a03565b9350604086013567ffffffffffffffff80821115610bcb57600080fd5b610bd789838a01610a8b565b94506060880135915080821115610bed57600080fd5b610bf989838a01610a8b565b93506080880135915080821115610c0f57600080fd5b50610c1c88828901610b0b565b9150509295509295909350565b600060208284031215610c3b57600080fd5b81356109c181610a03565b600080600080600060a08688031215610c5e57600080fd5b8535610c6981610a03565b94506020860135610c7981610a03565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ca357600080fd5b610c1c88828901610b0b565b60008235605e19833603018112610cc557600080fd5b9190910192915050565b803560038110610cde57600080fd5b919050565b600060208284031215610cf557600080fd5b6109c182610ccf565b600060608284031215610d1057600080fd5b610d18610a31565b9050610d2382610ccf565b8152602082013567ffffffffffffffff80821115610d4057600080fd5b610d4c85838601610a8b565b60208401526040840135915080821115610d6557600080fd5b50610d7284828501610a8b565b60408301525092915050565b60006101343683610cfe565b600060608236031215610d9c57600080fd5b610da4610a31565b8235610daf81610a03565b81526020830135610dbf81610a03565b6020820152604083013567ffffffffffffffff811115610dde57600080fd5b610d7236828601610cfe565b634e487b7160e01b600052602160045260246000fd5b60038110610e1e57634e487b7160e01b600052602160045260246000fd5b9052565b602081016101348284610e00565b60008151808452602080850194506020840160005b83811015610e6157815187529582019590820190600101610e45565b509495945050505050565b60808152610e7e608082018651610e00565b60006020860151606060a0840152610e9960e0840182610e30565b90506040870151607f198483030160c0850152610eb68282610e30565b6001600160a01b03978816602086015295871660408501525050509216606090920191909152919050565b634e487b7160e01b600052603260045260246000fd5b81516001600160a01b03908116825260208084015190911690820152604080830151805160a0840192610f2d9190850190610e00565b60208101516060840152604081015160808401525092915050565b60005b83811015610f63578181015183820152602001610f4b565b50506000910152565b6001600160a01b0386811682528516602082015260a060408201819052600090610f9890830186610e30565b8281036060840152610faa8186610e30565b905082810360808401528351808252610fca816020840160208801610f48565b601f01601f191601602001979650505050505050565b60008251610cc5818460208701610f48565b634e487b7160e01b600052605160045260246000fdfea26469706673582212200ea1fe4a27c6d631e36cdb5363ee42b4f64c93de46b14c7b937b05ac32a7740864736f6c63430008170033", + "nonce": "0x1c", + "chainId": "0xaa36a7", + "accessList": null, + "type": null + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": null, + "transactionType": "CALL", + "contractName": null, + "contractAddress": null, + "function": null, + "arguments": null, + "transaction": { + "from": "0x968d0cd7343f711216817e617d3f92a23dc91c07", + "to": null, + "gas": null, + "value": "0x0", + "input": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e146d2194c79bf6472743d2c61089af56e4c77a8bcaec4a2bf03a696eb28a31d64736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c656400000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad2000000000000000000000000603075b625cc2cf69fbb3546c6acc2451fe792af00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c4d66de800000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e00000000000000000000000000000000000000000000000000000000", + "nonce": "0x1d", + "chainId": "0xaa36a7", + "accessList": null, + "type": null + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1717660107, + "chain": 11155111, + "commit": "e2e0b14" +} \ No newline at end of file diff --git a/deployments/sepolia/MainchainGatewayBatcherLogic.json b/deployments/sepolia/MainchainGatewayBatcherLogic.json new file mode 100644 index 00000000..88ddd8c8 --- /dev/null +++ b/deployments/sepolia/MainchainGatewayBatcherLogic.json @@ -0,0 +1,354 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "gateway", + "type": "address", + "internalType": "contract MainchainGatewayV3" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onERC1155BatchReceived", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onERC1155Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "requestDepositForBatch", + "inputs": [ + { + "name": "request", + "type": "tuple", + "internalType": "struct RequestBatch", + "components": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfoBatch", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "quantities", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "BatchDepositRequested", + "inputs": [ + { + "name": "requested", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "ErrInvalidInfoWithStandard", + "inputs": [ + { + "name": "", + "type": "uint8", + "internalType": "enum TokenStandard" + } + ] + }, + { + "type": "error", + "name": "ErrTokenBatchCouldNotTransferFrom", + "inputs": [ + { + "name": "tokenInfo", + "type": "tuple", + "internalType": "struct TokenInfoBatch", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "quantities", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ErrUnsupportedStandard", + "inputs": [] + } + ], + "address": "0xc53CA32a20AC80A0E126F259a35B22d52B33EBe2", + "args": "0x", + "ast": "", + "blockNumber": 6049806, + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61103e806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780634d7a06d614610084578063bc197c8114610099578063c4d66de8146100d1578063f23a6e61146100e4575b600080fd5b61006f61006a366004610997565b610103565b60405190151581526020015b60405180910390f35b6100976100923660046109c8565b61013a565b005b6100b86100a7366004610b7b565b63bc197c8160e01b95945050505050565b6040516001600160e01b0319909116815260200161007b565b6100976100df366004610c29565b610290565b6100b86100f2366004610c46565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b148061013457506301ffc9a760e01b6001600160e01b03198316145b92915050565b61098d808061016261014f6040860186610caf565b61015d906020810190610ce3565b6103c1565b919450925090506101898361017a6040870187610caf565b61018390610d7e565b9061043e565b6101bc3361019d6040870160208801610c29565b846101ab6040890189610caf565b6101b490610d7e565b92919061046b565b6101cc6040850160208601610c29565b60005460405163a22cb46560e01b81526001600160a01b0362010000909204821660048201526001602482015291169063a22cb46590604401600060405180830381600087803b15801561021f57600080fd5b505af1158015610233573d6000803e3d6000fd5b5050505061025f8461024490610d8a565b6000546201000090046001600160a01b031663ffffffff8416565b60405133907f16046601be35ef10e1935f09b294d0542fcdcadc83acd3d60b4f9ae6d742025d90600090a250505050565b600054610100900460ff16158080156102b05750600054600160ff909116105b806102ca5750303b1580156102ca575060005460ff166001145b6103325760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff191660011790558015610355576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b0385160217905580156103bd576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61098d808060018460028111156103da576103da610dea565b036103f257506104a591506104de90506104f8610437565b600284600281111561040657610406610dea565b0361041e5750610600915061069890506106af610437565b6040516361e411a760e11b815260040160405180910390fd5b9193909250565b61044b828263ffffffff16565b6103bd5781516040516360ebe40360e11b81526103299190600401610e22565b61047a8484848463ffffffff16565b61049f578383308460405163e4e50f8960e01b81526004016103299493929190610e6c565b50505050565b60006001825160028111156104bc576104bc610dea565b1480156104cd575060208201515115155b801561013457505060400151511590565b60006104f082843087602001516107d7565b949350505050565b6040820151602001515160005b8181101561049f57826001600160a01b0316634b14557e604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b031681526020016040518060600160405280896040015160000151600281111561057257610572610dea565b8152602001896040015160200151878151811061059157610591610ee1565b6020026020010151815260200160008152508152506040518263ffffffff1660e01b81526004016105c29190610ef7565b600060405180830381600087803b1580156105dc57600080fd5b505af11580156105f0573d6000803e3d6000fd5b5050600190920191506105059050565b60208101515160009060028351600281111561061e5761061e610dea565b14801561062f575060208301515115155b801561063f575082604001515181145b61064c5750600092915050565b60005b8181101561068e578360400151818151811061066d5761066d610ee1565b6020026020010151600003610686575060009392505050565b60010161064f565b5060019392505050565b60006104f08284308760200151886040015161082b565b6040820151602001515160005b8181101561049f57826001600160a01b0316634b14557e604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b031681526020016040518060600160405280896040015160000151600281111561072957610729610dea565b8152602001896040015160200151878151811061074857610748610ee1565b60200260200101518152602001896040015160400151878151811061076f5761076f610ee1565b60200260200101518152508152506040518263ffffffff1660e01b81526004016107999190610ef7565b600060405180830381600087803b1580156107b357600080fd5b505af11580156107c7573d6000803e3d6000fd5b5050600190920191506106bc9050565b6000805b825181101561081f576108098686868685815181106107fc576107fc610ee1565b60200260200101516108df565b6108175760009150506104f0565b6001016107db565b50600195945050505050565b604080516000808252602082019092526001600160a01b0387169061085b90879087908790879060448101610f6c565b60408051601f198184030181529181526020820180516001600160e01b0316631759616b60e11b179052516108909190610fe0565b6000604051808303816000865af19150503d80600081146108cd576040519150601f19603f3d011682016040523d82523d6000602084013e6108d2565b606091505b5090979650505050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009287169161093f91610fe0565b6000604051808303816000865af19150503d806000811461097c576040519150601f19603f3d011682016040523d82523d6000602084013e610981565b606091505b50909695505050505050565b610995610ff2565b565b6000602082840312156109a957600080fd5b81356001600160e01b0319811681146109c157600080fd5b9392505050565b6000602082840312156109da57600080fd5b813567ffffffffffffffff8111156109f157600080fd5b8201606081850312156109c157600080fd5b6001600160a01b0381168114610a1857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610a5457610a54610a1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610a8357610a83610a1b565b604052919050565b600082601f830112610a9c57600080fd5b8135602067ffffffffffffffff821115610ab857610ab8610a1b565b8160051b610ac7828201610a5a565b9283528481018201928281019087851115610ae157600080fd5b83870192505b84831015610b0057823582529183019190830190610ae7565b979650505050505050565b600082601f830112610b1c57600080fd5b813567ffffffffffffffff811115610b3657610b36610a1b565b610b49601f8201601f1916602001610a5a565b818152846020838601011115610b5e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610b9357600080fd5b8535610b9e81610a03565b94506020860135610bae81610a03565b9350604086013567ffffffffffffffff80821115610bcb57600080fd5b610bd789838a01610a8b565b94506060880135915080821115610bed57600080fd5b610bf989838a01610a8b565b93506080880135915080821115610c0f57600080fd5b50610c1c88828901610b0b565b9150509295509295909350565b600060208284031215610c3b57600080fd5b81356109c181610a03565b600080600080600060a08688031215610c5e57600080fd5b8535610c6981610a03565b94506020860135610c7981610a03565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ca357600080fd5b610c1c88828901610b0b565b60008235605e19833603018112610cc557600080fd5b9190910192915050565b803560038110610cde57600080fd5b919050565b600060208284031215610cf557600080fd5b6109c182610ccf565b600060608284031215610d1057600080fd5b610d18610a31565b9050610d2382610ccf565b8152602082013567ffffffffffffffff80821115610d4057600080fd5b610d4c85838601610a8b565b60208401526040840135915080821115610d6557600080fd5b50610d7284828501610a8b565b60408301525092915050565b60006101343683610cfe565b600060608236031215610d9c57600080fd5b610da4610a31565b8235610daf81610a03565b81526020830135610dbf81610a03565b6020820152604083013567ffffffffffffffff811115610dde57600080fd5b610d7236828601610cfe565b634e487b7160e01b600052602160045260246000fd5b60038110610e1e57634e487b7160e01b600052602160045260246000fd5b9052565b602081016101348284610e00565b60008151808452602080850194506020840160005b83811015610e6157815187529582019590820190600101610e45565b509495945050505050565b60808152610e7e608082018651610e00565b60006020860151606060a0840152610e9960e0840182610e30565b90506040870151607f198483030160c0850152610eb68282610e30565b6001600160a01b03978816602086015295871660408501525050509216606090920191909152919050565b634e487b7160e01b600052603260045260246000fd5b81516001600160a01b03908116825260208084015190911690820152604080830151805160a0840192610f2d9190850190610e00565b60208101516060840152604081015160808401525092915050565b60005b83811015610f63578181015183820152602001610f4b565b50506000910152565b6001600160a01b0386811682528516602082015260a060408201819052600090610f9890830186610e30565b8281036060840152610faa8186610e30565b905082810360808401528351808252610fca816020840160208801610f48565b601f01601f191601602001979650505050505050565b60008251610cc5818460208701610f48565b634e487b7160e01b600052605160045260246000fdfea26469706673582212200ea1fe4a27c6d631e36cdb5363ee42b4f64c93de46b14c7b937b05ac32a7740864736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MainchainGatewayBatcher.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780634d7a06d614610084578063bc197c8114610099578063c4d66de8146100d1578063f23a6e61146100e4575b600080fd5b61006f61006a366004610997565b610103565b60405190151581526020015b60405180910390f35b6100976100923660046109c8565b61013a565b005b6100b86100a7366004610b7b565b63bc197c8160e01b95945050505050565b6040516001600160e01b0319909116815260200161007b565b6100976100df366004610c29565b610290565b6100b86100f2366004610c46565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b148061013457506301ffc9a760e01b6001600160e01b03198316145b92915050565b61098d808061016261014f6040860186610caf565b61015d906020810190610ce3565b6103c1565b919450925090506101898361017a6040870187610caf565b61018390610d7e565b9061043e565b6101bc3361019d6040870160208801610c29565b846101ab6040890189610caf565b6101b490610d7e565b92919061046b565b6101cc6040850160208601610c29565b60005460405163a22cb46560e01b81526001600160a01b0362010000909204821660048201526001602482015291169063a22cb46590604401600060405180830381600087803b15801561021f57600080fd5b505af1158015610233573d6000803e3d6000fd5b5050505061025f8461024490610d8a565b6000546201000090046001600160a01b031663ffffffff8416565b60405133907f16046601be35ef10e1935f09b294d0542fcdcadc83acd3d60b4f9ae6d742025d90600090a250505050565b600054610100900460ff16158080156102b05750600054600160ff909116105b806102ca5750303b1580156102ca575060005460ff166001145b6103325760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff191660011790558015610355576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b0385160217905580156103bd576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61098d808060018460028111156103da576103da610dea565b036103f257506104a591506104de90506104f8610437565b600284600281111561040657610406610dea565b0361041e5750610600915061069890506106af610437565b6040516361e411a760e11b815260040160405180910390fd5b9193909250565b61044b828263ffffffff16565b6103bd5781516040516360ebe40360e11b81526103299190600401610e22565b61047a8484848463ffffffff16565b61049f578383308460405163e4e50f8960e01b81526004016103299493929190610e6c565b50505050565b60006001825160028111156104bc576104bc610dea565b1480156104cd575060208201515115155b801561013457505060400151511590565b60006104f082843087602001516107d7565b949350505050565b6040820151602001515160005b8181101561049f57826001600160a01b0316634b14557e604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b031681526020016040518060600160405280896040015160000151600281111561057257610572610dea565b8152602001896040015160200151878151811061059157610591610ee1565b6020026020010151815260200160008152508152506040518263ffffffff1660e01b81526004016105c29190610ef7565b600060405180830381600087803b1580156105dc57600080fd5b505af11580156105f0573d6000803e3d6000fd5b5050600190920191506105059050565b60208101515160009060028351600281111561061e5761061e610dea565b14801561062f575060208301515115155b801561063f575082604001515181145b61064c5750600092915050565b60005b8181101561068e578360400151818151811061066d5761066d610ee1565b6020026020010151600003610686575060009392505050565b60010161064f565b5060019392505050565b60006104f08284308760200151886040015161082b565b6040820151602001515160005b8181101561049f57826001600160a01b0316634b14557e604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b031681526020016040518060600160405280896040015160000151600281111561072957610729610dea565b8152602001896040015160200151878151811061074857610748610ee1565b60200260200101518152602001896040015160400151878151811061076f5761076f610ee1565b60200260200101518152508152506040518263ffffffff1660e01b81526004016107999190610ef7565b600060405180830381600087803b1580156107b357600080fd5b505af11580156107c7573d6000803e3d6000fd5b5050600190920191506106bc9050565b6000805b825181101561081f576108098686868685815181106107fc576107fc610ee1565b60200260200101516108df565b6108175760009150506104f0565b6001016107db565b50600195945050505050565b604080516000808252602082019092526001600160a01b0387169061085b90879087908790879060448101610f6c565b60408051601f198184030181529181526020820180516001600160e01b0316631759616b60e11b179052516108909190610fe0565b6000604051808303816000865af19150503d80600081146108cd576040519150601f19603f3d011682016040523d82523d6000602084013e6108d2565b606091505b5090979650505050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009287169161093f91610fe0565b6000604051808303816000865af19150503d806000811461097c576040519150601f19603f3d011682016040523d82523d6000602084013e610981565b606091505b50909695505050505050565b610995610ff2565b565b6000602082840312156109a957600080fd5b81356001600160e01b0319811681146109c157600080fd5b9392505050565b6000602082840312156109da57600080fd5b813567ffffffffffffffff8111156109f157600080fd5b8201606081850312156109c157600080fd5b6001600160a01b0381168114610a1857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610a5457610a54610a1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610a8357610a83610a1b565b604052919050565b600082601f830112610a9c57600080fd5b8135602067ffffffffffffffff821115610ab857610ab8610a1b565b8160051b610ac7828201610a5a565b9283528481018201928281019087851115610ae157600080fd5b83870192505b84831015610b0057823582529183019190830190610ae7565b979650505050505050565b600082601f830112610b1c57600080fd5b813567ffffffffffffffff811115610b3657610b36610a1b565b610b49601f8201601f1916602001610a5a565b818152846020838601011115610b5e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610b9357600080fd5b8535610b9e81610a03565b94506020860135610bae81610a03565b9350604086013567ffffffffffffffff80821115610bcb57600080fd5b610bd789838a01610a8b565b94506060880135915080821115610bed57600080fd5b610bf989838a01610a8b565b93506080880135915080821115610c0f57600080fd5b50610c1c88828901610b0b565b9150509295509295909350565b600060208284031215610c3b57600080fd5b81356109c181610a03565b600080600080600060a08688031215610c5e57600080fd5b8535610c6981610a03565b94506020860135610c7981610a03565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ca357600080fd5b610c1c88828901610b0b565b60008235605e19833603018112610cc557600080fd5b9190910192915050565b803560038110610cde57600080fd5b919050565b600060208284031215610cf557600080fd5b6109c182610ccf565b600060608284031215610d1057600080fd5b610d18610a31565b9050610d2382610ccf565b8152602082013567ffffffffffffffff80821115610d4057600080fd5b610d4c85838601610a8b565b60208401526040840135915080821115610d6557600080fd5b50610d7284828501610a8b565b60408301525092915050565b60006101343683610cfe565b600060608236031215610d9c57600080fd5b610da4610a31565b8235610daf81610a03565b81526020830135610dbf81610a03565b6020820152604083013567ffffffffffffffff811115610dde57600080fd5b610d7236828601610cfe565b634e487b7160e01b600052602160045260246000fd5b60038110610e1e57634e487b7160e01b600052602160045260246000fd5b9052565b602081016101348284610e00565b60008151808452602080850194506020840160005b83811015610e6157815187529582019590820190600101610e45565b509495945050505050565b60808152610e7e608082018651610e00565b60006020860151606060a0840152610e9960e0840182610e30565b90506040870151607f198483030160c0850152610eb68282610e30565b6001600160a01b03978816602086015295871660408501525050509216606090920191909152919050565b634e487b7160e01b600052603260045260246000fd5b81516001600160a01b03908116825260208084015190911690820152604080830151805160a0840192610f2d9190850190610e00565b60208101516060840152604081015160808401525092915050565b60005b83811015610f63578181015183820152602001610f4b565b50506000910152565b6001600160a01b0386811682528516602082015260a060408201819052600090610f9890830186610e30565b8281036060840152610faa8186610e30565b905082810360808401528351808252610fca816020840160208801610f48565b601f01601f191601602001979650505050505050565b60008251610cc5818460208701610f48565b634e487b7160e01b600052605160045260246000fdfea26469706673582212200ea1fe4a27c6d631e36cdb5363ee42b4f64c93de46b14c7b937b05ac32a7740864736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "requestDepositForBatch((address,address,(uint8,uint256[],uint256[])))": { + "details": "This method is a workaround that mostly reduce UX for user when deposit token in batch, meanwhile require zero change on the current Gateway code. Logic: - Validate the RequestBatch - `transferFrom` all tokens to this Batcher from user - `requestDepositFor` in the loop for each token, in which: - each token will be `transferFrom` this Batcher to the Gateway - `requester` field in the `Request` struct is this Batcher Requirement: - User must `approveAll` tokens for this Batcher - Emit an event that include information of the {RequestBatch}" + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "errors": { + "ErrTokenBatchCouldNotTransferFrom((uint8,uint256[],uint256[]),address,address,address)": [ + { + "details": "Error indicating that the `handleAssetIn` has failed.", + "params": { + "from": "Owner of the token value.", + "to": "Receiver of the token value.", + "token": "Address of the token.", + "tokenInfo": "Info of the token including ERC standard, id or quantity." + } + } + ], + "ErrUnsupportedStandard()": [ + { + "details": "Error indicating that an unsupported standard is encountered." + } + ] + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"ErrInvalidInfoWithStandard\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"quantities\",\"type\":\"uint256[]\"}],\"internalType\":\"struct TokenInfoBatch\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenBatchCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requested\",\"type\":\"address\"}],\"name\":\"BatchDepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract MainchainGatewayV3\",\"name\":\"gateway\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"quantities\",\"type\":\"uint256[]\"}],\"internalType\":\"struct TokenInfoBatch\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct RequestBatch\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"requestDepositForBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrTokenBatchCouldNotTransferFrom((uint8,uint256[],uint256[]),address,address,address)\":[{\"details\":\"Error indicating that the `handleAssetIn` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}]},\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"requestDepositForBatch((address,address,(uint8,uint256[],uint256[])))\":{\"details\":\"This method is a workaround that mostly reduce UX for user when deposit token in batch, meanwhile require zero change on the current Gateway code. Logic: - Validate the RequestBatch - `transferFrom` all tokens to this Batcher from user - `requestDepositFor` in the loop for each token, in which: - each token will be `transferFrom` this Batcher to the Gateway - `requester` field in the `Request` struct is this Batcher Requirement: - User must `approveAll` tokens for this Batcher - Emit an event that include information of the {RequestBatch}\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"requestDepositForBatch((address,address,(uint8,uint256[],uint256[])))\":{\"notice\":\"Batch transfer token from user to this Batcher, then sequentially request deposit for to gateway on behalf of user.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainGatewayBatcher.sol\":\"MainchainGatewayBatcher\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\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 ReentrancyGuard {\\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 constructor() {\\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 making 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}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(\\n address account,\\n uint256 id,\\n uint256 value\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(\\n address account,\\n uint256[] memory ids,\\n uint256[] memory values\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../extensions/ERC1155Burnable.sol\\\";\\nimport \\\"../extensions/ERC1155Pausable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerable.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev {ERC1155} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n *\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\n */\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\n * deploys the contract.\\n */\\n constructor(string memory uri) ERC1155(uri) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\n *\\n * See {ERC1155-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mint(to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\n */\\n function mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControlEnumerable, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\n uint256 prevNum = _num;\\n uint256 prevDenom = _denom;\\n _num = num;\\n _denom = denom;\\n unchecked {\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/WethUnwrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\ncontract WethUnwrapper is ReentrancyGuard {\\n IWETH public immutable weth;\\n\\n error ErrCannotTransferFrom();\\n error ErrNotWrappedContract();\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\n\\n constructor(address weth_) {\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\n weth = IWETH(weth_);\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n function unwrap(uint256 amount) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(msg.sender), amount);\\n }\\n\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(to), amount);\\n }\\n\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\n if (!success) revert ErrCannotTransferFrom();\\n\\n weth.withdraw(amount);\\n }\\n\\n function _sendNativeTo(address payable to, uint256 val) internal {\\n (bool success,) = to.call{ value: val }(\\\"\\\");\\n if (!success) {\\n revert ErrExternalCallFailed(to, msg.sig);\\n }\\n }\\n\\n function _fallback() internal view {\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\n }\\n}\\n\",\"keccak256\":\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\",\"license\":\"MIT\"},\"src/extensions/WithdrawalLimitation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./GatewayV3.sol\\\";\\n\\nabstract contract WithdrawalLimitation is GatewayV3 {\\n /// @dev Error of invalid percentage.\\n error ErrInvalidPercentage();\\n\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\n event HighTierVoteWeightThresholdUpdated(\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\n );\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\n /// @dev Emitted when the daily limit thresholds are updated\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\n\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\n\\n uint256 internal _highTierVWNum;\\n uint256 internal _highTierVWDenom;\\n\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\n mapping(address => uint256) public highTierThreshold;\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\n mapping(address => uint256) public lockedThreshold;\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\n /// @notice Values 0-1,000,000 map to 0%-100%\\n mapping(address => uint256) public unlockFeePercentages;\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\n mapping(address => uint256) public dailyWithdrawalLimit;\\n /// @dev Mapping from token address => today withdrawal amount\\n mapping(address => uint256) public lastSyncedWithdrawal;\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\n mapping(address => uint256) public lastDateSynced;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `GatewayV3-setThreshold`.\\n *\\n * Requirements:\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n */\\n function setThreshold(uint256 num, uint256 denom) external virtual override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Returns the high-tier vote weight threshold.\\n */\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\n return (_highTierVWNum, _highTierVWDenom);\\n }\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\n */\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function setHighTierVoteWeightThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyProxyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setHighTierThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setLockedThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setUnlockFeePercentages(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setDailyWithdrawalLimits(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the limitation.\\n */\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\n return _reachedWithdrawalLimit(_token, _quantity);\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n\\n _previousNum = _highTierVWNum;\\n _previousDenom = _highTierVWDenom;\\n _highTierVWNum = _numerator;\\n _highTierVWDenom = _denominator;\\n\\n unchecked {\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n * - The percentage is equal to or less than 100_000.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\n if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage();\\n\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\n if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\n *\\n * Requirements:\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\n *\\n */\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\n return false;\\n }\\n\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n return dailyWithdrawalLimit[_token] <= _quantity;\\n } else {\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\n }\\n }\\n\\n /**\\n * @dev Record withdrawal token.\\n */\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n lastDateSynced[_token] = _currentDate;\\n lastSyncedWithdrawal[_token] = _quantity;\\n } else {\\n lastSyncedWithdrawal[_token] += _quantity;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the withdrawal request is locked or not.\\n */\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n return lockedThreshold[_token] <= _quantity;\\n }\\n\\n /**\\n * @dev Computes fee percentage.\\n */\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\n }\\n\\n /**\\n * @dev Returns high-tier vote weight.\\n */\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\n }\\n\\n /**\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\n */\\n function _verifyThresholds() internal view {\\n if (_num * _highTierVWDenom > _highTierVWNum * _denom) revert ErrInvalidThreshold(msg.sig);\\n }\\n}\\n\",\"keccak256\":\"0x4b7d559d4b1f53239b8690776318db8d63f578f72fb269d8024570aa70c2c2a6\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/IMainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./consumers/SignatureConsumer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\n /**\\n * @dev Error indicating that a query was made for an approved withdrawal.\\n */\\n error ErrQueryForApprovedWithdrawal();\\n\\n /**\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\n */\\n error ErrReachedDailyWithdrawalLimit();\\n\\n /**\\n * @dev Error indicating that a query was made for a processed withdrawal.\\n */\\n error ErrQueryForProcessedWithdrawal();\\n\\n /**\\n * @dev Error indicating that a query was made for insufficient vote weight.\\n */\\n error ErrQueryForInsufficientVoteWeight();\\n\\n /// @dev Emitted when the deposit is requested\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the assets are withdrawn\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards);\\n /// @dev Emitted when the wrapped native token contract is updated\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\n /// @dev Emitted when the withdrawal is locked\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is unlocked\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n\\n /**\\n * @dev Returns the domain seperator.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns deposit count.\\n */\\n function depositCount() external view returns (uint256);\\n\\n /**\\n * @dev Sets the wrapped native token contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\n\\n /**\\n * @dev Returns whether the withdrawal is locked.\\n */\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns the withdrawal hash.\\n */\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\n\\n /**\\n * @dev Locks the assets and request deposit.\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\n\\n /**\\n * @dev Withdraws based on the receipt and the validator signatures.\\n * Returns whether the withdrawal is locked.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked);\\n\\n /**\\n * @dev Approves a specific withdrawal.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n uint256[][4] calldata _thresholds\\n ) external;\\n\\n /**\\n * @dev Returns token address on Ronin network.\\n * Note: Reverts for unsupported token.\\n */\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x2d4f53a65e76e903040f5f4dbe5aea53367d61243c60efdc8402ff184bd50a87\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/LibTokenInfo.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n TokenStandard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/LibRequestBatch.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../interfaces/IMainchainGatewayV3.sol\\\";\\nimport { TokenInfoBatch } from \\\"./LibTokenInfoBatch.sol\\\";\\n\\nstruct RequestBatch {\\n address recipient;\\n address tokenAddr;\\n TokenInfoBatch info;\\n}\\n\\nlibrary LibRequestBatch {\\n function forwardRequestToGatewayERC721(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal {\\n uint256 length = req.info.ids.length;\\n for (uint256 i; i < length; i++) {\\n mainchainGateway.requestDepositFor(\\n Transfer.Request({ recipientAddr: req.recipient, tokenAddr: req.tokenAddr, info: TokenInfo({ erc: req.info.erc, id: req.info.ids[i], quantity: 0 }) })\\n );\\n }\\n }\\n\\n function forwardRequestToGatewayERC1155(RequestBatch memory req, IMainchainGatewayV3 mainchainGateway) internal {\\n uint256 length = req.info.ids.length;\\n for (uint256 i; i < length; i++) {\\n mainchainGateway.requestDepositFor(\\n Transfer.Request({\\n recipientAddr: req.recipient,\\n tokenAddr: req.tokenAddr,\\n info: TokenInfo({ erc: req.info.erc, id: req.info.ids[i], quantity: req.info.quantities[i] })\\n })\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3d55a073ad26808128f2503650c45165f8e92507a898ab374dcaf6a2092d62f3\",\"license\":\"MIT\"},\"src/libraries/LibTokenInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nenum TokenStandard {\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\\nstruct TokenInfo {\\n TokenStandard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n}\\n\\n/**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\n\\n/**\\n * @dev Error indicating that the `handleAssetIn` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\n\\n/// @dev Error indicating that the provided information is invalid.\\nerror ErrInvalidInfo();\\n\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\nerror ErrERC20MintingFailed();\\n\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\nerror ErrERC721MintingFailed();\\n\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\nerror ErrERC1155TransferFailed();\\n\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\nerror ErrERC1155MintingFailed();\\n\\n/// @dev Error indicating that an unsupported standard is encountered.\\nerror ErrUnsupportedStandard();\\n\\nlibrary LibTokenInfo {\\n /**\\n *\\n * HASH\\n *\\n */\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n *\\n * VALIDATE\\n *\\n */\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(TokenInfo memory self) internal pure {\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\n revert ErrInvalidInfo();\\n }\\n }\\n\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\n }\\n\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\n }\\n\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\n }\\n\\n /**\\n *\\n * TRANSFER IN/OUT METHOD\\n *\\n */\\n\\n /**\\n * @dev Transfer asset in.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\n bool success;\\n bytes memory data;\\n if (self.erc == TokenStandard.ERC20) {\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\n } else if (self.erc == TokenStandard.ERC1155) {\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\n }\\n\\n /**\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\n if (token == address(wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!to.send(self.quantity)) {\\n wrappedNativeToken.deposit{ value: self.quantity }();\\n _transferTokenOut(self, to, token);\\n }\\n\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC20) {\\n uint256 balance = IERC20(token).balanceOf(address(this));\\n if (balance < self.quantity) {\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\n }\\n\\n _transferTokenOut(self, to, token);\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC721) {\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\n revert ErrERC721MintingFailed();\\n }\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC1155) {\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\n revert ErrERC1155MintingFailed();\\n }\\n return;\\n }\\n\\n revert ErrUnsupportedStandard();\\n }\\n\\n /**\\n *\\n * TRANSFER HELPERS\\n *\\n */\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\n bool success;\\n if (self.erc == TokenStandard.ERC20) {\\n success = _tryTransferERC20(token, to, self.quantity);\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\n }\\n\\n /**\\n * TRANSFER ERC-20\\n */\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n bytes memory data;\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n }\\n\\n /**\\n * @dev Mints ERC20 token and returns the result.\\n */\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\n }\\n\\n /**\\n * TRANSFER ERC-721\\n */\\n\\n /**\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n success = _tryTransferFromERC721(token, address(this), to, id);\\n if (!success) {\\n return _tryMintERC721(token, to, id);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\n }\\n\\n /**\\n * @dev Mints ERC721 token and returns the result.\\n */\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\n }\\n\\n /**\\n * TRANSFER ERC-1155\\n */\\n\\n /**\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\n if (!success) {\\n return _tryMintERC1155(token, to, id, amount);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC1155 token and returns the result.\\n */\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\n }\\n\\n /**\\n * @dev Mints ERC1155 token and returns the result.\\n */\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\n }\\n}\\n\",\"keccak256\":\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\",\"license\":\"MIT\"},\"src/libraries/LibTokenInfoBatch.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\n\\nimport \\\"./LibTokenInfo.sol\\\";\\n\\nstruct TokenInfoBatch {\\n TokenStandard erc;\\n uint256[] ids;\\n uint256[] quantities;\\n}\\n\\n/**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenBatchCouldNotTransfer(TokenInfoBatch tokenInfo, address to, address token);\\n\\n/**\\n * @dev Error indicating that the `handleAssetIn` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenBatchCouldNotTransferFrom(TokenInfoBatch tokenInfo, address from, address to, address token);\\n\\nerror ErrInvalidInfoWithStandard(TokenStandard);\\n\\nlibrary LibTokenInfoBatch {\\n /**\\n *\\n * VALIDATE\\n *\\n */\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(TokenInfoBatch memory self, function (TokenInfoBatch memory) pure returns (bool) fCheck) internal pure {\\n if (!fCheck(self)) {\\n revert ErrInvalidInfoWithStandard(self.erc);\\n }\\n }\\n\\n function checkERC721Batch(TokenInfoBatch memory self) internal pure returns (bool res) {\\n return self.erc == TokenStandard.ERC721 // Check ERC721\\n && self.ids.length != 0 // Info must contain at least one id in the array\\n && self.quantities.length == 0; // No requires quantity to save gas, because ERC-721 qty is always 1.\\n }\\n\\n function checkERC1155Batch(TokenInfoBatch memory self) internal pure returns (bool res) {\\n uint256 length = self.ids.length;\\n\\n if (\\n // Check ERC1155\\n // Info must contain at least one id in the array\\n !(self.erc == TokenStandard.ERC1155 && self.ids.length != 0 && length == self.quantities.length) // Info must have same length for each pair id and quantity\\n ) {\\n return false;\\n }\\n\\n // Each token id must have quantity\\n for (uint256 i; i < length; ++i) {\\n if (self.quantities[i] == 0) {\\n return false;\\n }\\n }\\n\\n return true;\\n }\\n\\n /**\\n *\\n * TRANSFER IN/OUT METHOD\\n *\\n */\\n\\n /**\\n * @dev Transfer asset in.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function handleAssetIn(\\n TokenInfoBatch memory self,\\n address from,\\n address token,\\n function (TokenInfoBatch memory, address, address) returns (bool) fHandleAssetIn\\n ) internal {\\n if (!fHandleAssetIn(self, from, token)) revert ErrTokenBatchCouldNotTransferFrom(self, from, address(this), token);\\n }\\n\\n function tryHandleAssetInERC721(TokenInfoBatch memory self, address from, address token) internal returns (bool) {\\n return _tryTransferFromERC721Loop(token, from, address(this), self.ids);\\n }\\n\\n function tryHandleAssetInERC1155(TokenInfoBatch memory self, address from, address token) internal returns (bool) {\\n return _tryTransferERC1155Batch(token, from, address(this), self.ids, self.quantities);\\n }\\n\\n /**\\n *\\n * TRANSFER HELPERS\\n *\\n */\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\n }\\n\\n /**\\n * @dev Transfers ERC721 token in a loop and returns the result.\\n *\\n * If there is fail when transfer one `id`, the loop will break early to save gas.\\n * Consumer of this method should revert the transaction if receive `false` success status.\\n */\\n function _tryTransferFromERC721Loop(address token, address from, address to, uint256[] memory ids) private returns (bool success) {\\n for (uint256 i; i < ids.length; ++i) {\\n if (!_tryTransferFromERC721(token, from, to, ids[i])) {\\n return false; // Break early if send fails\\n }\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Mints ERC721 token and returns the result.\\n */\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\n }\\n\\n /**\\n * @dev Transfers ERC1155 token in and returns the result.\\n */\\n function _tryTransferERC1155Batch(address token, address from, address to, uint256[] memory ids, uint256[] memory amounts) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(IERC1155.safeBatchTransferFrom, (from, to, ids, amounts, new bytes(0))));\\n }\\n}\\n\",\"keccak256\":\"0x97c0ee6e049c86ee73bc4a320a88ea9ad2662646c1c398add9014d18a1b687eb\",\"license\":\"MIT\"},\"src/libraries/LibTokenOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TokenOwner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n}\\n\\nlibrary LibTokenOwner {\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\",\"license\":\"MIT\"},\"src/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./LibTokenInfo.sol\\\";\\nimport \\\"./LibTokenOwner.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n using LibTokenOwner for TokenOwner;\\n using LibTokenInfo for TokenInfo;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n TokenInfo info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n TokenOwner mainchain;\\n TokenOwner ronin;\\n TokenInfo info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\",\"license\":\"MIT\"},\"src/mainchain/MainchainGatewayBatcher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\n\\nimport \\\"../libraries/LibRequestBatch.sol\\\";\\nimport \\\"../libraries/LibTokenInfoBatch.sol\\\";\\nimport \\\"./MainchainGatewayV3.sol\\\";\\n\\ncontract MainchainGatewayBatcher is Initializable, ERC1155Holder {\\n using LibRequestBatch for RequestBatch;\\n using LibTokenInfoBatch for TokenInfoBatch;\\n\\n MainchainGatewayV3 internal _mainchainGateway;\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function initialize(MainchainGatewayV3 gateway) external initializer {\\n _mainchainGateway = gateway;\\n }\\n\\n event BatchDepositRequested(address indexed requested);\\n\\n /**\\n * @notice Batch transfer token from user to this Batcher, then sequentially request deposit for to gateway on behalf of user.\\n *\\n * @dev This method is a workaround that mostly reduce UX for user when deposit token in batch, meanwhile require zero change on the current Gateway code.\\n *\\n * Logic:\\n * - Validate the RequestBatch\\n * - `transferFrom` all tokens to this Batcher from user\\n * - `requestDepositFor` in the loop for each token, in which:\\n * - each token will be `transferFrom` this Batcher to the Gateway\\n * - `requester` field in the `Request` struct is this Batcher\\n *\\n * Requirement:\\n * - User must `approveAll` tokens for this Batcher\\n * - Emit an event that include information of the {RequestBatch}\\n */\\n function requestDepositForBatch(RequestBatch calldata request) external {\\n // Dispatch the corresponding internal methods for each type of ERC\\n (\\n function (TokenInfoBatch memory) pure returns (bool) fCheck,\\n function (TokenInfoBatch memory, address, address) returns (bool) fHandleAssetIn,\\n function (RequestBatch memory, IMainchainGatewayV3) fForwardRequestToGateway\\n ) = _dispatcher(request.info.erc);\\n\\n // Revert if validate fails\\n request.info.validate(fCheck);\\n\\n // Revert if cannot transfer all tokens to this Batcher\\n request.info.handleAssetIn(msg.sender, request.tokenAddr, fHandleAssetIn);\\n\\n // Approve all tokens from this Batcher to the actual Gateway\\n IERC721(request.tokenAddr).setApprovalForAll(address(_mainchainGateway), true);\\n\\n // Loop over all token ids and make a deposit request for each\\n fForwardRequestToGateway(request, _mainchainGateway);\\n\\n emit BatchDepositRequested(msg.sender);\\n }\\n\\n function _dispatcher(TokenStandard erc)\\n private\\n pure\\n returns (\\n function (TokenInfoBatch memory) pure returns (bool) fValidate,\\n function (TokenInfoBatch memory, address, address) returns (bool) fHandleAsset,\\n function (RequestBatch memory, IMainchainGatewayV3) fForwardRequestToGateway\\n )\\n {\\n if (erc == TokenStandard.ERC721) {\\n return (LibTokenInfoBatch.checkERC721Batch, LibTokenInfoBatch.tryHandleAssetInERC721, LibRequestBatch.forwardRequestToGatewayERC721);\\n }\\n\\n if (erc == TokenStandard.ERC1155) {\\n return (LibTokenInfoBatch.checkERC1155Batch, LibTokenInfoBatch.tryHandleAssetInERC1155, LibRequestBatch.forwardRequestToGatewayERC1155);\\n }\\n\\n revert ErrUnsupportedStandard();\\n }\\n}\\n\",\"keccak256\":\"0x463a72cb870c8897806b848ce7f351c333aae7382a72cb2d947b302e13c2af37\",\"license\":\"MIT\"},\"src/mainchain/MainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport { IBridgeManager } from \\\"../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts, ContractType } from \\\"../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../extensions/WethUnwrapper.sol\\\";\\nimport \\\"../extensions/WithdrawalLimitation.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"../interfaces/IMainchainGatewayV3.sol\\\";\\n\\ncontract MainchainGatewayV3 is\\n WithdrawalLimitation,\\n Initializable,\\n AccessControlEnumerable,\\n ERC1155Holder,\\n IMainchainGatewayV3,\\n HasContracts,\\n IBridgeManagerCallback\\n{\\n using LibTokenInfo for TokenInfo;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n\\n /// @dev Withdrawal unlocker role hash\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\"WITHDRAWAL_UNLOCKER_ROLE\\\");\\n\\n /// @dev Wrapped native token address\\n IWETH public wrappedNativeToken;\\n /// @dev Ronin network id\\n uint256 public roninChainId;\\n /// @dev Total deposit\\n uint256 public depositCount;\\n /// @dev Domain separator\\n bytes32 internal _domainSeparator;\\n /// @dev Mapping from mainchain token => token address on Ronin network\\n mapping(address => MappedToken) internal _roninToken;\\n /// @dev Mapping from withdrawal id => withdrawal hash\\n mapping(uint256 => bytes32) public withdrawalHash;\\n /// @dev Mapping from withdrawal id => locked\\n mapping(uint256 => bool) public withdrawalLocked;\\n\\n /// @custom:deprecated Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\n uint256 private ______deprecatedBridgeOperatorAddedBlock;\\n /// @custom:deprecated Previously `_bridgeOperators` (uint256[])\\n uint256 private ______deprecatedBridgeOperators;\\n\\n uint96 private _totalOperatorWeight;\\n mapping(address operator => uint96 weight) private _operatorWeight;\\n WethUnwrapper public wethUnwrapper;\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n IWETH _wrappedToken,\\n uint256 _roninChainId,\\n uint256 _numerator,\\n uint256 _highTierVWNumerator,\\n uint256 _denominator,\\n // _addresses[0]: mainchainTokens\\n // _addresses[1]: roninTokens\\n // _addresses[2]: withdrawalUnlockers\\n address[][3] calldata _addresses,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds,\\n TokenStandard[] calldata _standards\\n ) external payable virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n roninChainId = _roninChainId;\\n\\n _setWrappedNativeTokenContract(_wrappedToken);\\n _updateDomainSeparator();\\n _setThreshold(_numerator, _denominator);\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\n _verifyThresholds();\\n\\n if (_addresses[0].length > 0) {\\n // Map mainchain tokens to ronin tokens\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\n // Sets thresholds based on the mainchain tokens\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\n }\\n\\n // Grant role for withdrawal unlocker\\n for (uint256 i; i < _addresses[2].length; i++) {\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][i]);\\n }\\n }\\n\\n function initializeV2(address bridgeManagerContract) external reinitializer(2) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n }\\n\\n function initializeV3() external reinitializer(3) {\\n IBridgeManager mainchainBridgeManager = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER));\\n (, address[] memory operators, uint96[] memory weights) = mainchainBridgeManager.getFullBridgeOperatorInfos();\\n\\n uint96 totalWeight;\\n for (uint i; i < operators.length; i++) {\\n _operatorWeight[operators[i]] = weights[i];\\n totalWeight += weights[i];\\n }\\n _totalOperatorWeight = totalWeight;\\n }\\n\\n function initializeV4(address payable wethUnwrapper_) external reinitializer(4) {\\n wethUnwrapper = WethUnwrapper(wethUnwrapper_);\\n }\\n\\n /**\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\n */\\n function receiveEther() external payable { }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparator;\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyProxyAdmin {\\n _setWrappedNativeTokenContract(_wrappedToken);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\n _requestDepositFor(_request, msg.sender);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) {\\n return _submitWithdrawal(_receipt, _signatures);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\n bytes32 _receiptHash = receipt.hash();\\n if (withdrawalHash[receipt.id] != receipt.hash()) {\\n revert ErrInvalidReceipt();\\n }\\n if (!withdrawalLocked[receipt.id]) {\\n revert ErrQueryForApprovedWithdrawal();\\n }\\n delete withdrawalLocked[receipt.id];\\n emit WithdrawalUnlocked(_receiptHash, receipt);\\n\\n address token = receipt.mainchain.tokenAddr;\\n if (receipt.info.erc == TokenStandard.ERC20) {\\n TokenInfo memory feeInfo = receipt.info;\\n feeInfo.quantity = _computeFeePercentage(receipt.info.quantity, unlockFeePercentages[token]);\\n TokenInfo memory withdrawInfo = receipt.info;\\n withdrawInfo.quantity = receipt.info.quantity - feeInfo.quantity;\\n\\n feeInfo.handleAssetOut(payable(msg.sender), token, wrappedNativeToken);\\n withdrawInfo.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n } else {\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n }\\n\\n emit Withdrew(_receiptHash, receipt);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds\\n ) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function getRoninToken(address mainchainToken) public view returns (MappedToken memory token) {\\n token = _roninToken[mainchainToken];\\n if (token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(address[] calldata mainchainTokens, address[] calldata roninTokens, TokenStandard[] calldata standards) internal virtual {\\n if (!(mainchainTokens.length == roninTokens.length && mainchainTokens.length == standards.length)) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 i; i < mainchainTokens.length; ++i) {\\n _roninToken[mainchainTokens[i]].tokenAddr = roninTokens[i];\\n _roninToken[mainchainTokens[i]].erc = standards[i];\\n }\\n\\n emit TokenMapped(mainchainTokens, roninTokens, standards);\\n }\\n\\n /**\\n * @dev Submits withdrawal receipt.\\n *\\n * Requirements:\\n * - The receipt kind is withdrawal.\\n * - The receipt is to withdraw on this chain.\\n * - The receipt is not used to withdraw before.\\n * - The withdrawal is not reached the limit threshold.\\n * - The signer weight total is larger than or equal to the minimum threshold.\\n * - The signature signers are in order.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function _submitWithdrawal(Transfer.Receipt calldata receipt, Signature[] memory signatures) internal virtual returns (bool locked) {\\n uint256 id = receipt.id;\\n uint256 quantity = receipt.info.quantity;\\n address tokenAddr = receipt.mainchain.tokenAddr;\\n\\n receipt.info.validate();\\n if (receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind();\\n\\n if (receipt.mainchain.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, receipt.mainchain.chainId, block.chainid);\\n }\\n\\n MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr);\\n\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr && receipt.ronin.chainId == roninChainId)) {\\n revert ErrInvalidReceipt();\\n }\\n\\n if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal();\\n\\n if (!(receipt.info.erc == TokenStandard.ERC721 || !_reachedWithdrawalLimit(tokenAddr, quantity))) {\\n revert ErrReachedDailyWithdrawalLimit();\\n }\\n\\n bytes32 receiptHash = receipt.hash();\\n bytes32 receiptDigest = Transfer.receiptDigest(_domainSeparator, receiptHash);\\n\\n uint256 minimumWeight;\\n (minimumWeight, locked) = _computeMinVoteWeight(receipt.info.erc, tokenAddr, quantity);\\n\\n {\\n bool passed;\\n address signer;\\n address lastSigner;\\n Signature memory sig;\\n uint256 weight;\\n for (uint256 i; i < signatures.length; i++) {\\n sig = signatures[i];\\n signer = ecrecover(receiptDigest, sig.v, sig.r, sig.s);\\n if (lastSigner >= signer) revert ErrInvalidOrder(msg.sig);\\n\\n lastSigner = signer;\\n\\n weight += _getWeight(signer);\\n if (weight >= minimumWeight) {\\n passed = true;\\n break;\\n }\\n }\\n\\n if (!passed) revert ErrQueryForInsufficientVoteWeight();\\n withdrawalHash[id] = receiptHash;\\n }\\n\\n if (locked) {\\n withdrawalLocked[id] = true;\\n emit WithdrawalLocked(receiptHash, receipt);\\n return locked;\\n }\\n\\n _recordWithdrawal(tokenAddr, quantity);\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), tokenAddr, wrappedNativeToken);\\n emit Withdrew(receiptHash, receipt);\\n }\\n\\n /**\\n * @dev Requests deposit made by `_requester` address.\\n *\\n * Requirements:\\n * - The token info is valid.\\n * - The `msg.value` is 0 while depositing ERC20 token.\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\n *\\n * Emits the `DepositRequested` event.\\n *\\n */\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\n MappedToken memory _token;\\n address _roninWeth = address(wrappedNativeToken);\\n\\n _request.info.validate();\\n if (_request.tokenAddr == address(0)) {\\n if (_request.info.quantity != msg.value) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_roninWeth);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.tokenAddr = _roninWeth;\\n } else {\\n if (msg.value != 0) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_request.tokenAddr);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\n // Withdraw if token is WETH\\n // The withdraw of WETH must go via `WethUnwrapper`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy.\\n if (_roninWeth == _request.tokenAddr) {\\n wrappedNativeToken.approve(address(wethUnwrapper), _request.info.quantity);\\n wethUnwrapper.unwrap(_request.info.quantity);\\n }\\n }\\n\\n uint256 _depositId = depositCount++;\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId);\\n\\n emit DepositRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Returns the minimum vote weight for the token.\\n */\\n function _computeMinVoteWeight(TokenStandard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) {\\n uint256 _totalWeight = _getTotalWeight();\\n _weight = _minimumVoteWeight(_totalWeight);\\n if (_erc == TokenStandard.ERC20) {\\n if (highTierThreshold[_token] <= _quantity) {\\n _weight = _highTierVoteWeight(_totalWeight);\\n }\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\n }\\n }\\n\\n /**\\n * @dev Update domain seperator.\\n */\\n function _updateDomainSeparator() internal {\\n /*\\n * _domainSeparator = keccak256(\\n * abi.encode(\\n * keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n * keccak256(\\\"MainchainGatewayV2\\\"),\\n * keccak256(\\\"2\\\"),\\n * block.chainid,\\n * address(this)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n // keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")\\n mstore(ptr, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)\\n // keccak256(\\\"MainchainGatewayV2\\\")\\n mstore(add(ptr, 0x20), 0x159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b)\\n // keccak256(\\\"2\\\")\\n mstore(add(ptr, 0x40), 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5)\\n mstore(add(ptr, 0x60), chainid())\\n mstore(add(ptr, 0x80), address())\\n sstore(_domainSeparator.slot, keccak256(ptr, 0xa0))\\n }\\n }\\n\\n /**\\n * @dev Sets the WETH contract.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\n wrappedNativeToken = _wrapedToken;\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\n }\\n\\n /**\\n * @dev Receives ETH from WETH or creates deposit request if sender is not WETH or WETHUnwrapper.\\n */\\n function _fallback() internal virtual {\\n if (msg.sender == address(wrappedNativeToken) || msg.sender == address(wethUnwrapper)) {\\n return;\\n }\\n\\n _createDepositOnFallback();\\n }\\n\\n /**\\n * @dev Creates deposit request.\\n */\\n function _createDepositOnFallback() internal virtual whenNotPaused {\\n Transfer.Request memory _request;\\n _request.recipientAddr = msg.sender;\\n _request.info.quantity = msg.value;\\n _requestDepositFor(_request, _request.recipientAddr);\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return _totalOperatorWeight;\\n }\\n\\n /**\\n * @dev Returns the weight of an address.\\n */\\n function _getWeight(address addr) internal view returns (uint256) {\\n return _operatorWeight[addr];\\n }\\n\\n ///////////////////////////////////////////////\\n // CALLBACKS\\n ///////////////////////////////////////////////\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsAdded(\\n address[] calldata operators,\\n uint96[] calldata weights,\\n bool[] memory addeds\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint256 length = operators.length;\\n if (length != addeds.length || length != weights.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n for (uint256 i; i < length; ++i) {\\n unchecked {\\n if (addeds[i]) {\\n _totalOperatorWeight += weights[i];\\n _operatorWeight[operators[i]] = weights[i];\\n }\\n }\\n }\\n\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint length = operators.length;\\n if (length != removeds.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n uint96 totalRemovingWeight;\\n for (uint i; i < length; ++i) {\\n unchecked {\\n if (removeds[i]) {\\n totalRemovingWeight += _operatorWeight[operators[i]];\\n delete _operatorWeight[operators[i]];\\n }\\n }\\n }\\n\\n _totalOperatorWeight -= totalRemovingWeight;\\n\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) {\\n return\\n interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x6fc5c51508dd63916c19d07f93fa37e265fd7c347b9e5e0ad50a14f9ff85ab14\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 30, + "numDeployments": 2, + "storageLayout": { + "storage": [ + { + "astId": 58190, + "contract": "src/mainchain/MainchainGatewayBatcher.sol:MainchainGatewayBatcher", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 58193, + "contract": "src/mainchain/MainchainGatewayBatcher.sol:MainchainGatewayBatcher", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 116066, + "contract": "src/mainchain/MainchainGatewayBatcher.sol:MainchainGatewayBatcher", + "label": "_mainchainGateway", + "offset": 2, + "slot": "0", + "type": "t_contract(MainchainGatewayV3)117809" + } + ], + "types": { + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(MainchainGatewayV3)117809": { + "encoding": "inplace", + "label": "contract MainchainGatewayV3", + "numberOfBytes": "20" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1717659816, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "requestDepositForBatch((address,address,(uint8,uint256[],uint256[])))": { + "notice": "Batch transfer token from user to this Batcher, then sequentially request deposit for to gateway on behalf of user." + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/MainchainGatewayBatcherProxy.json b/deployments/sepolia/MainchainGatewayBatcherProxy.json new file mode 100644 index 00000000..256ca27f --- /dev/null +++ b/deployments/sepolia/MainchainGatewayBatcherProxy.json @@ -0,0 +1,218 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "admin", + "inputs": [], + "outputs": [ + { + "name": "admin_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "changeAdmin", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "functionDelegateCall", + "inputs": [ + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "implementation", + "inputs": [], + "outputs": [ + { + "name": "implementation_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeTo", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ], + "address": "0x96a806bAeE4634B5c9C9F6333CF164b7eaEF5402", + "args": "0xc4d66de800000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e", + "ast": "", + "blockNumber": 6049806, + "bytecode": "0x608060405260405162000edd38038062000edd83398101604081905262000026916200041a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200054d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000e96833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000eb6602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000e968339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b60606001600160a01b0384163b620003075760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001ca565b600080856001600160a01b031685604051620003249190620004fa565b600060405180830381855af49150503d806000811462000361576040519150601f19603f3d011682016040523d82523d6000602084013e62000366565b606091505b5090925090506200037982828662000383565b9695505050505050565b606083156200039457508162000161565b825115620003a55782518084602001fd5b8160405162461bcd60e51b8152600401620001ca919062000518565b80516001600160a01b0381168114620003d957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000411578181015183820152602001620003f7565b50506000910152565b6000806000606084860312156200043057600080fd5b6200043b84620003c1565b92506200044b60208501620003c1565b60408501519092506001600160401b03808211156200046957600080fd5b818601915086601f8301126200047e57600080fd5b815181811115620004935762000493620003de565b604051601f8201601f19908116603f01168101908382118183101715620004be57620004be620003de565b81604052828152896020848701011115620004d857600080fd5b620004eb836020830160208801620003f4565b80955050505050509250925092565b600082516200050e818460208701620003f4565b9190910192915050565b602081526000825180602084015262000539816040850160208701620003f4565b601f01601f19169190910160400192915050565b610939806200055d6000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e146d2194c79bf6472743d2c61089af56e4c77a8bcaec4a2bf03a696eb28a31d64736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "chainId": 11155111, + "contractAbsolutePath": "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2", + "deployedBytecode": "0x6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610704565b610136565b61006661009e366004610735565b610173565b6100666100b13660046107e6565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610704565b610250565b34801561011357600080fd5b506100cb610270565b610124610291565b61013461012f610326565b610330565b565b61013e61034f565b6001600160a01b0316330361016b5761016881604051806020016040528060008152506000610382565b50565b61016861011c565b61017b61034f565b6001600160a01b0316330361016b576000610194610326565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061034f565b6001600160a01b03163303610217576102128383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610382915050565b505050565b61021261011c565b600061022961034f565b6001600160a01b0316330361024557610240610326565b905090565b61024d61011c565b90565b61025861034f565b6001600160a01b0316330361016b57610168816103ad565b600061027a61034f565b6001600160a01b031633036102455761024061034f565b61029961034f565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610401565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61038b83610429565b6000825111806103985750805b15610212576103a78383610469565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103d661034f565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610495565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610373565b6104328161053e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061048e83836040518060600160405280602781526020016108dd602791396105d2565b9392505050565b6001600160a01b0381166104fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161031d565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105ab5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161031d565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61051d565b60606001600160a01b0384163b61063a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161031d565b600080856001600160a01b031685604051610655919061088d565b600060405180830381855af49150503d8060008114610690576040519150601f19603f3d011682016040523d82523d6000602084013e610695565b606091505b50915091506106a58282866106af565b9695505050505050565b606083156106be57508161048e565b8251156106ce5782518084602001fd5b8160405162461bcd60e51b815260040161031d91906108a9565b80356001600160a01b03811681146106ff57600080fd5b919050565b60006020828403121561071657600080fd5b61048e826106e8565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561074757600080fd5b813567ffffffffffffffff8082111561075f57600080fd5b818401915084601f83011261077357600080fd5b8135818111156107855761078561071f565b604051601f8201601f19908116603f011681019083821181831017156107ad576107ad61071f565b816040528281528760208487010111156107c657600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000604084860312156107fb57600080fd5b610804846106e8565b9250602084013567ffffffffffffffff8082111561082157600080fd5b818601915086601f83011261083557600080fd5b81358181111561084457600080fd5b87602082850101111561085657600080fd5b6020830194508093505050509250925092565b60005b8381101561088457818101518382015260200161086c565b50506000910152565b6000825161089f818460208701610869565b9190910192915050565b60208152600082518060208401526108c8816040850160208701610869565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e146d2194c79bf6472743d2c61089af56e4c77a8bcaec4a2bf03a696eb28a31d64736f6c63430008170033", + "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 31, + "numDeployments": 2, + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1717659816, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol new file mode 100644 index 00000000..49820e71 --- /dev/null +++ b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; +import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; +import "@ronin/script/contracts/MainchainGatewayBatcherDeploy.s.sol"; + +import "../Migration.s.sol"; + +contract Migration__20240606_DeployBatcherSepolia is Migration { + MainchainBridgeManager _currMainchainBridgeManager; + MainchainBridgeManager _newMainchainBridgeManager; + MainchainGatewayV3 _currMainchainBridge; + MainchainGatewayBatcher _mainchainGatewayBatcher; + + address private _governor; + address[] private _voters; + + address TESTNET_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; + + function setUp() public virtual override { + super.setUp(); + } + + function run() public virtual onlyOn(Network.Sepolia.key()) { + CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); + + // _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + + // _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + // _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); + // _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); + // _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); + + // _changeTempAdmin(); + // _deployMainchainBridgeManager(); + // _upgradeBridgeMainchain(); + + _currMainchainBridge = MainchainGatewayV3(config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key())); + // vm.stopBroadcast(); + // vm.startBroadcast(TESTNET_ADMIN); + _mainchainGatewayBatcher = new MainchainGatewayBatcherDeploy().runWithArgs( + abi.encodeWithSelector(MainchainGatewayBatcher.initialize.selector, address(_currMainchainBridge)) + ); + // vm.stopBroadcast(); + } + + function _changeTempAdmin() internal { + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); + address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + address(mainchainGatewayV3Proxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + vm.stopBroadcast(); + } + + function _postCheck() internal override { + console.log(StdStyle.green("Migration skipped")); + } +} From ca0e8031bd442044cab1c39dee32a972b4f9b4cd Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 12 Jun 2024 17:38:15 +0700 Subject: [PATCH 199/305] chore: script map erc721 on mainchain --- .../11155111/run-1718182591.json | 159 ++++++++++++++++++ .../20240612-maptoken-nft-sepolia.s.sol | 118 +++++++++++++ 2 files changed, 277 insertions(+) create mode 100644 broadcast/20240405-maptoken-usdc-mainchain.s.sol/11155111/run-1718182591.json create mode 100644 script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol diff --git a/broadcast/20240405-maptoken-usdc-mainchain.s.sol/11155111/run-1718182591.json b/broadcast/20240405-maptoken-usdc-mainchain.s.sol/11155111/run-1718182591.json new file mode 100644 index 00000000..f5ac824f --- /dev/null +++ b/broadcast/20240405-maptoken-usdc-mainchain.s.sol/11155111/run-1718182591.json @@ -0,0 +1,159 @@ +{ + "transactions": [ + { + "hash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionType": "CALL", + "contractName": "TransparentUpgradeableProxyV2", + "contractAddress": "0x603075b625cc2cf69fbb3546c6acc2451fe792af", + "function": null, + "arguments": null, + "transaction": { + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0x603075b625cc2cf69fbb3546c6acc2451fe792af", + "gas": "0x1e8480", + "value": "0x0", + "input": "0x8dc0dbc6000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000066768fc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000520000000000000000000000000000000000000000000000000000000000000000100000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000003244bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc4210750700000000000000000000000000000000000000000000000000000000000000010000000000000000000000004226e7da1b0cb821dd499d020a85ec528fb7f72200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001b581f833171118be63b73be5b780d96922e8bc4e981d8d3c8a702026a8754e7b700221be39391f07f533b1c5929440acf40ddad3ed6f07cc99d14e3a06003853e000000000000000000000000000000000000000000000000000000000000001b0a24ee775a3238b0f6b74433d0d9b2950f22d7ad0a609339c485f4502a5411bd00d2351b1a3f70c9e685a3f5b15f33ffb98cfc1a41c75b9079af713c48a38ab9000000000000000000000000000000000000000000000000000000000000001c02617bc5ff7dab3fff38010d56a236ae0226e51e2a59e4f8b4fc07ffe390b7a43b38c15065c3140fcd2a123c97244005158642485a517b20b0a8120863a5ad0c000000000000000000000000000000000000000000000000000000000000001c2d0ceb74c9ccf6566dc3936954111c6b885e51bed4113687f9cff31f3434e2204fc1c55515e25c83968337f3ea67caaf994f6d9bef8137526e9827440b263121", + "nonce": "0x1", + "chainId": "0xaa36a7", + "accessList": null, + "type": null + }, + "additionalContracts": [], + "isFixedGasLimit": true + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x9bf934", + "logs": [ + { + "address": "0x603075b625cc2cf69fbb3546c6acc2451fe792af", + "topics": [ + "0xd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4", + "0x0000000000000000000000000000000000000000000000000000000000aa36a7", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x490aa72b4469330edf1668edd2a7fb96e90c4c545a049b62c6980a3d4777f03a" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000087d08e3ba42e64e3948962dd1371f906d1278b900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000066768fc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000520000000000000000000000000000000000000000000000000000000000000000100000000000000000000000006855f31df1d3d25ce486cf09db49bda535d2a9e000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000003244bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc4210750700000000000000000000000000000000000000000000000000000000000000010000000000000000000000004226e7da1b0cb821dd499d020a85ec528fb7f72200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "logIndex": "0x6f", + "removed": false + }, + { + "address": "0x603075b625cc2cf69fbb3546c6acc2451fe792af", + "topics": [ + "0x5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b", + "0x490aa72b4469330edf1668edd2a7fb96e90c4c545a049b62c6980a3d4777f03a" + ], + "data": "0x", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "logIndex": "0x70", + "removed": false + }, + { + "address": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "topics": [ + "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc4210750700000000000000000000000000000000000000000000000000000000000000010000000000000000000000004226e7da1b0cb821dd499d020a85ec528fb7f72200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "logIndex": "0x71", + "removed": false + }, + { + "address": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "topics": [ + "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc4210750700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "logIndex": "0x72", + "removed": false + }, + { + "address": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "topics": [ + "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc4210750700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "logIndex": "0x73", + "removed": false + }, + { + "address": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "topics": [ + "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc4210750700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "logIndex": "0x74", + "removed": false + }, + { + "address": "0x06855f31df1d3d25ce486cf09db49bda535d2a9e", + "topics": [ + "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000aad5541eb4e5de1f353bcc8eabd124fc4210750700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "logIndex": "0x75", + "removed": false + }, + { + "address": "0x603075b625cc2cf69fbb3546c6acc2451fe792af", + "topics": [ + "0xe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba", + "0x490aa72b4469330edf1668edd2a7fb96e90c4c545a049b62c6980a3d4777f03a" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "logIndex": "0x76", + "removed": false + } + ], + "logsBloom": "0x00000000008200000000000000000000000040008000000002000000000000000000000000000000000000000200000002000000000000000000000000040000800000000000000000000000000000000000000000040000000000000000400000000000000000000000000000400000000001000000000000000000000000000000000000000040002000000000000220010000000000000000000004000001000000000000008000000080000000000400000000000008000000000210000000000000000020000000000002000100100000000060000002000000400040008000100000000008000000000000000000000000040000000000000000000000", + "type": "0x0", + "transactionHash": "0xbd10ea6ba3a77cbc37a677a07ab06dbd2814c2bfa3a83d3f542eda6f7fb98fb4", + "transactionIndex": "0x3a", + "blockHash": "0xf0eb3aa31878f20de1d2fc1cc521e340beff25acceabfe4d4c0957e126f702ea", + "blockNumber": "0x5cf24a", + "gasUsed": "0x3e9cc", + "effectiveGasPrice": "0x3938cfcd8", + "from": "0x087d08e3ba42e64e3948962dd1371f906d1278b9", + "to": "0x603075b625cc2cf69fbb3546c6acc2451fe792af", + "contractAddress": null + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1718182591, + "chain": 11155111, + "commit": "8824fc9" +} \ No newline at end of file diff --git a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol new file mode 100644 index 00000000..520a48dc --- /dev/null +++ b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; +import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; + +import "../Migration.s.sol"; + +contract Migration__20240612_MapNTFSepoliaMainchain is Migration { + address internal _mainchainPauseEnforcer; + address internal _mainchainGatewayV3; + address internal _mainchainBridgeManager; + + MainchainBridgeAdminUtils _mainchainProposalUtils; + + function setUp() public override { + super.setUp(); + + _mainchainPauseEnforcer = 0x61eC0ebf966AE84C414BDA715E17CeF657e039DF; + _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; + } + + function run() public { + address[] memory mainchainTokens = new address[](1); + address[] memory roninTokens = new address[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + uint256[][4] memory thresholds; + thresholds[0] = new uint256[](1); + thresholds[1] = new uint256[](1); + thresholds[2] = new uint256[](1); + thresholds[3] = new uint256[](1); + + uint256 expiredTime = block.timestamp + 10 days; + address[] memory targets = new address[](1); + uint256[] memory values = new uint256[](1); + bytes[] memory calldatas = new bytes[](1); + uint256[] memory gasAmounts = new uint256[](1); + + // ================ USDC ERC-20 ====================== + + mainchainTokens[0] = address(0xAad5541Eb4e5DE1f353BCc8EaBD124fc42107507); + roninTokens[0] = address(0x4226E7Da1B0CB821dd499d020A85ec528FB7f722); + standards[0] = TokenStandard.ERC721; + thresholds[0][0] = 0; + thresholds[1][0] = 0; + thresholds[2][0] = 0; + thresholds[3][0] = 0; + + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); + + vm.prank(_mainchainBridgeManager); + address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)", innerData)); + + // return; + + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[0] = _mainchainGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + // ================ VERIFY AND EXECUTE PROPOSAL =============== + + uint256[] memory governorPKs = new uint256[](4); + governorPKs[3] = 0x00; + governorPKs[2] = 0x00; + governorPKs[0] = 0x00; + governorPKs[1] = 0x00; + + address[] memory governors = new address[](4); + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0]); + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); + supports_[0] = Ballot.VoteType.For; + supports_[1] = Ballot.VoteType.For; + supports_[2] = Ballot.VoteType.For; + supports_[3] = Ballot.VoteType.For; + + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, governorPKs); + + vm.broadcast(governors[0]); + // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{gas: 2_000_000}(proposal, supports_, signatures); + } +} From f8e571b295ea17cbe910b18a2ccf298a85600a27 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Wed, 12 Jun 2024 17:53:09 +0700 Subject: [PATCH 200/305] feat: MockERC1155 contract and deploy script --- .../20240612_GrantRoleAndMintMockERC1155.sol | 58 +++++++++++++++++++ script/contracts/MockERC1155Deploy.s.sol | 19 ++++++ 2 files changed, 77 insertions(+) create mode 100644 script/20240612-grantRoleAndMint-mockErc1155/20240612_GrantRoleAndMintMockERC1155.sol create mode 100644 script/contracts/MockERC1155Deploy.s.sol diff --git a/script/20240612-grantRoleAndMint-mockErc1155/20240612_GrantRoleAndMintMockERC1155.sol b/script/20240612-grantRoleAndMint-mockErc1155/20240612_GrantRoleAndMintMockERC1155.sol new file mode 100644 index 00000000..299dc5c5 --- /dev/null +++ b/script/20240612-grantRoleAndMint-mockErc1155/20240612_GrantRoleAndMintMockERC1155.sol @@ -0,0 +1,58 @@ +pragma solidity ^0.8.19; + +import { MockERC1155 } from "@ronin/contracts/mocks/token/MockERC1155.sol"; + +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; + +contract MockERC1155_GrantRoleAndMint is Migration { + bytes32 public MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public BURNER_ROLE = keccak256("BURNER_ROLE"); + + address public MainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + address public RoninGatewayV3 = 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca; + + address public mockErc1155SepoliaAddress = 0xb40979a3FB2f76F640dcad2a6DF1264f62b7A6da; + address public mockErc1155RoninAddress = 0x2B13110C6e3e2Cb1EFbA47897b65cFbf71f806d2; + address public testnetAdmin = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; + + MockERC1155 private _mockErc1155; + + function run() public virtual returns (MockERC1155) { + _grantRoleAndMintSepolia(); + _grantRoleAndMintRonin(); + } + + function _grantRoleAndMintSepolia() internal { + _mockErc1155 = MockERC1155(mockErc1155SepoliaAddress); + + vm.startBroadcast(testnetAdmin); + + _mockErc1155.grantRole(MINTER_ROLE, MainchainGatewayV3); + _mockErc1155.grantRole(MINTER_ROLE, testnetAdmin); + + _mockErc1155.grantRole(BURNER_ROLE, MainchainGatewayV3); + _mockErc1155.grantRole(BURNER_ROLE, testnetAdmin); + + _mockErc1155.mint(testnetAdmin, 0, 100, ""); + + vm.stopBroadcast(); + } + + function _grantRoleAndMintRonin() internal { + _mockErc1155 = MockERC1155(mockErc1155RoninAddress); + + vm.startBroadcast(testnetAdmin); + + _mockErc1155.grantRole(MINTER_ROLE, RoninGatewayV3); + _mockErc1155.grantRole(MINTER_ROLE, testnetAdmin); + + _mockErc1155.grantRole(BURNER_ROLE, RoninGatewayV3); + _mockErc1155.grantRole(BURNER_ROLE, testnetAdmin); + + _mockErc1155.mint(testnetAdmin, 0, 100, ""); + + vm.stopBroadcast(); + } +} diff --git a/script/contracts/MockERC1155Deploy.s.sol b/script/contracts/MockERC1155Deploy.s.sol new file mode 100644 index 00000000..84824f5f --- /dev/null +++ b/script/contracts/MockERC1155Deploy.s.sol @@ -0,0 +1,19 @@ +pragma solidity ^0.8.19; + +import { MockERC1155 } from "@ronin/contracts/mocks/token/MockERC1155.sol"; + +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; + +contract MockERC1155Deploy is Migration { + function _defaultArguments() internal virtual override returns (bytes memory args) { + ISharedArgument.MockERC1155Param memory param = config.sharedArguments().mockErc1155; + + args = abi.encode(param.defaultAdmin, param.uri, param.name, param.symbol); + } + + function run() public virtual returns (MockERC1155) { + return MockERC1155(_deployImmutable(Contract.MockERC1155.key())); + } +} From c06c670de7ce7f19df6c8aed8bc80b7b11ca4857 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Thu, 13 Jun 2024 09:16:28 +0700 Subject: [PATCH 201/305] script(MockERC1155): Deploy script --- script/contracts/token/MockERC1155Deploy.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/contracts/token/MockERC1155Deploy.s.sol b/script/contracts/token/MockERC1155Deploy.s.sol index ec82026f..bcbe4bf7 100644 --- a/script/contracts/token/MockERC1155Deploy.s.sol +++ b/script/contracts/token/MockERC1155Deploy.s.sol @@ -10,7 +10,7 @@ contract MockERC1155Deploy is Migration { function _defaultArguments() internal virtual override returns (bytes memory args) { ISharedArgument.MockERC1155Param memory param = config.sharedArguments().mockErc1155; - args = abi.encode(param.uri); + args = abi.encode(param.defaultAdmin, param.uri, param.name, param.symbol); } function run() public virtual returns (MockERC1155) { From dd81acb27820ff5275bb9f43bebdf568e8faab07 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Thu, 13 Jun 2024 11:29:13 +0700 Subject: [PATCH 202/305] feat: MockERC1155 contract + deploy script --- deployments/ronin-testnet/MockERC1155.json | 901 ++++++++++++++++++ deployments/sepolia/MockERC1155.json | 901 ++++++++++++++++++ .../20240612-deploy-MockERC1155-testnet.sol | 45 + src/mocks/MockERC721.sol | 1 + 4 files changed, 1848 insertions(+) create mode 100644 deployments/ronin-testnet/MockERC1155.json create mode 100644 deployments/sepolia/MockERC1155.json create mode 100644 script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol create mode 100644 src/mocks/MockERC721.sol diff --git a/deployments/ronin-testnet/MockERC1155.json b/deployments/ronin-testnet/MockERC1155.json new file mode 100644 index 00000000..b5a8e00a --- /dev/null +++ b/deployments/ronin-testnet/MockERC1155.json @@ -0,0 +1,901 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "defaultAdmin", + "type": "address", + "internalType": "address" + }, + { + "name": "uri", + "type": "string", + "internalType": "string" + }, + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "BURNER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "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": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "balanceOfBatch", + "inputs": [ + { + "name": "accounts", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnBatch", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "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": "isApprovedForAll", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintBatch", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "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": "safeBatchTransferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setApprovalForAll", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "uri", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "ApprovalForAll", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "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": "TransferBatch", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "ids", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "values", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TransferSingle", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "URI", + "inputs": [ + { + "name": "value", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } + ], + "address": "0xdbb04b4bdbb385eb14cb3ea3c7b1fcca55ea9160", + "args": "0x000000000000000000000000ef46169cd1e954ab10d5e4c280737d9b92d0a936000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010526f6e696e4d6f636b45524331313535000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007524d453131353500000000000000000000000000000000000000000000000000", + "ast": "", + "blockNumber": 28154649, + "bytecode": "0x60806040523480156200001157600080fd5b50604051620026ba380380620026ba8339810160408190526200003491620001f4565b82620000408162000076565b5060046200004f838262000337565b5060056200005e828262000337565b506200006c60008562000088565b5050505062000403565b600262000084828262000337565b5050565b60008281526003602090815260408083206001600160a01b038516845290915290205460ff16620000845760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620000e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200015457600080fd5b81516001600160401b03808211156200017157620001716200012c565b604051601f8301601f19908116603f011681019082821181831017156200019c576200019c6200012c565b8160405283815260209250866020858801011115620001ba57600080fd5b600091505b83821015620001de5785820183015181830184015290820190620001bf565b6000602085830101528094505050505092915050565b600080600080608085870312156200020b57600080fd5b84516001600160a01b03811681146200022357600080fd5b60208601519094506001600160401b03808211156200024157600080fd5b6200024f8883890162000142565b945060408701519150808211156200026657600080fd5b620002748883890162000142565b935060608701519150808211156200028b57600080fd5b506200029a8782880162000142565b91505092959194509250565b600181811c90821680620002bb57607f821691505b602082108103620002dc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000332576000816000526020600020601f850160051c810160208610156200030d5750805b601f850160051c820191505b818110156200032e5782815560010162000319565b5050505b505050565b81516001600160401b038111156200035357620003536200012c565b6200036b81620003648454620002a6565b84620002e2565b602080601f831160018114620003a357600084156200038a5750858301515b600019600386901b1c1916600185901b1785556200032e565b600085815260208120601f198616915b82811015620003d457888601518255948401946001909101908401620003b3565b5085821015620003f35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6122a780620004136000396000f3fe608060405234801561001057600080fd5b50600436106101415760003560e01c80636b20c454116100b8578063a22cb4651161007c578063a22cb465146102b8578063d5391393146102cb578063d547741f146102f2578063e985e9c514610305578063f242432a14610341578063f5298aca1461035457600080fd5b80636b20c4541461026f578063731133e91461028257806391d148541461029557806395d89b41146102a8578063a217fddf146102b057600080fd5b8063248a9ca31161010a578063248a9ca3146101cc578063282c51f3146101ef5780632eb2c2d6146102165780632f2ff15d1461022957806336568abe1461023c5780634e1273f41461024f57600080fd5b8062fdd58e1461014657806301ffc9a71461016c57806306fdde031461018f5780630e89341c146101a45780631f7fdffa146101b7575b600080fd5b610159610154366004611711565b610367565b6040519081526020015b60405180910390f35b61017f61017a366004611751565b610400565b6040519015158152602001610163565b61019761041a565b60405161016391906117be565b6101976101b23660046117d1565b6104ac565b6101ca6101c536600461193b565b610540565b005b6101596101da3660046117d1565b60009081526003602052604090206001015490565b6101597f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6101ca6102243660046119d4565b61057d565b6101ca610237366004611a7e565b6105c2565b6101ca61024a366004611a7e565b6105ec565b61026261025d366004611aaa565b61066a565b6040516101639190611bb1565b6101ca61027d366004611bc4565b61078c565b6101ca610290366004611c38565b6107c7565b61017f6102a3366004611a7e565b6107fd565b610197610828565b610159600081565b6101ca6102c6366004611c8d565b610837565b6101597f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101ca610300366004611a7e565b610842565b61017f610313366004611cc9565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6101ca61034f366004611cf3565b610867565b6101ca610362366004611d58565b6108ac565b60006001600160a01b0383166103d75760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061040b826108e1565b806103fa57506103fa82610931565b60606004805461042990611d8b565b80601f016020809104026020016040519081016040528092919081815260200182805461045590611d8b565b80156104a25780601f10610477576101008083540402835291602001916104a2565b820191906000526020600020905b81548152906001019060200180831161048557829003601f168201915b5050505050905090565b6060600280546104bb90611d8b565b80601f01602080910402602001604051908101604052809291908181526020018280546104e790611d8b565b80156105345780601f1061050957610100808354040283529160200191610534565b820191906000526020600020905b81548152906001019060200180831161051757829003601f168201915b50505050509050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661056a81610956565b61057685858585610963565b5050505050565b6001600160a01b03851633148061059957506105998533610313565b6105b55760405162461bcd60e51b81526004016103ce90611dc5565b6105768585858585610aa3565b6000828152600360205260409020600101546105dd81610956565b6105e78383610c38565b505050565b6001600160a01b038116331461065c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016103ce565b6106668282610cbe565b5050565b606081518351146106cf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016103ce565b6000835167ffffffffffffffff8111156106eb576106eb6117ea565b604051908082528060200260200182016040528015610714578160200160208202803683370190505b50905060005b84518110156107845761075f85828151811061073857610738611e14565b602002602001015185838151811061075257610752611e14565b6020026020010151610367565b82828151811061077157610771611e14565b602090810291909101015260010161071a565b509392505050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486107b681610956565b6107c1848484610d25565b50505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107f181610956565b61057685858585610ea5565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461042990611d8b565b610666338383610f7f565b60008281526003602052604090206001015461085d81610956565b6105e78383610cbe565b6001600160a01b03851633148061088357506108838533610313565b61089f5760405162461bcd60e51b81526004016103ce90611dc5565b610576858585858561105f565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486108d681610956565b6107c1848484611189565b60006001600160e01b03198216636cdb3d1360e11b148061091257506001600160e01b031982166303a24d0760e21b145b806103fa57506301ffc9a760e01b6001600160e01b03198316146103fa565b60006001600160e01b03198216637965db0b60e01b14806103fa57506103fa826108e1565b610960813361128d565b50565b6001600160a01b0384166109895760405162461bcd60e51b81526004016103ce90611e2a565b81518351146109aa5760405162461bcd60e51b81526004016103ce90611e6b565b3360005b8451811015610a3b578381815181106109c9576109c9611e14565b60200260200101516000808784815181106109e6576109e6611e14565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610a2e9190611ec9565b90915550506001016109ae565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610a8c929190611edc565b60405180910390a4610576816000878787876112f1565b8151835114610ac45760405162461bcd60e51b81526004016103ce90611e6b565b6001600160a01b038416610aea5760405162461bcd60e51b81526004016103ce90611f0a565b3360005b8451811015610bca576000858281518110610b0b57610b0b611e14565b602002602001015190506000858381518110610b2957610b29611e14565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610b795760405162461bcd60e51b81526004016103ce90611f4f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610bb6908490611ec9565b909155505060019093019250610aee915050565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c1a929190611edc565b60405180910390a4610c308187878787876112f1565b505050505050565b610c4282826107fd565b6106665760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610c7a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610cc882826107fd565b156106665760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b038316610d4b5760405162461bcd60e51b81526004016103ce90611f99565b8051825114610d6c5760405162461bcd60e51b81526004016103ce90611e6b565b604080516020810190915260009081905233905b8351811015610e38576000848281518110610d9d57610d9d611e14565b602002602001015190506000848381518110610dbb57610dbb611e14565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015610e0b5760405162461bcd60e51b81526004016103ce90611fdc565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055600101610d80565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051610e89929190611edc565b60405180910390a46040805160208101909152600090526107c1565b6001600160a01b038416610ecb5760405162461bcd60e51b81526004016103ce90611e2a565b336000610ed78561144c565b90506000610ee48561144c565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290610f16908490611ec9565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610f7683600089898989611497565b50505050505050565b816001600160a01b0316836001600160a01b031603610ff25760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016103ce565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166110855760405162461bcd60e51b81526004016103ce90611f0a565b3360006110918561144c565b9050600061109e8561144c565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156110e15760405162461bcd60e51b81526004016103ce90611f4f565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061111e908490611ec9565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461117e848a8a8a8a8a611497565b505050505050505050565b6001600160a01b0383166111af5760405162461bcd60e51b81526004016103ce90611f99565b3360006111bb8461144c565b905060006111c88461144c565b60408051602080820183526000918290528882528181528282206001600160a01b038b16835290522054909150848110156112155760405162461bcd60e51b81526004016103ce90611fdc565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052610f76565b61129782826107fd565b610666576112af816001600160a01b03166014611552565b6112ba836020611552565b6040516020016112cb929190612020565b60408051601f198184030181529082905262461bcd60e51b82526103ce916004016117be565b6001600160a01b0384163b15610c305760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906113359089908990889088908890600401612095565b6020604051808303816000875af1925050508015611370575060408051601f3d908101601f1916820190925261136d918101906120f3565b60015b61141c5761137c612110565b806308c379a0036113b5575061139061212c565b8061139b57506113b7565b8060405162461bcd60e51b81526004016103ce91906117be565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016103ce565b6001600160e01b0319811663bc197c8160e01b14610f765760405162461bcd60e51b81526004016103ce906121b6565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061148657611486611e14565b602090810291909101015292915050565b6001600160a01b0384163b15610c305760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906114db90899089908890889088906004016121fe565b6020604051808303816000875af1925050508015611516575060408051601f3d908101601f19168201909252611513918101906120f3565b60015b6115225761137c612110565b6001600160e01b0319811663f23a6e6160e01b14610f765760405162461bcd60e51b81526004016103ce906121b6565b60606000611561836002612243565b61156c906002611ec9565b67ffffffffffffffff811115611584576115846117ea565b6040519080825280601f01601f1916602001820160405280156115ae576020820181803683370190505b509050600360fc1b816000815181106115c9576115c9611e14565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106115f8576115f8611e14565b60200101906001600160f81b031916908160001a905350600061161c846002612243565b611627906001611ec9565b90505b600181111561169f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061165b5761165b611e14565b1a60f81b82828151811061167157611671611e14565b60200101906001600160f81b031916908160001a90535060049490941c936116988161225a565b905061162a565b5083156116ee5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016103ce565b9392505050565b80356001600160a01b038116811461170c57600080fd5b919050565b6000806040838503121561172457600080fd5b61172d836116f5565b946020939093013593505050565b6001600160e01b03198116811461096057600080fd5b60006020828403121561176357600080fd5b81356116ee8161173b565b60005b83811015611789578181015183820152602001611771565b50506000910152565b600081518084526117aa81602086016020860161176e565b601f01601f19169290920160200192915050565b6020815260006116ee6020830184611792565b6000602082840312156117e357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611826576118266117ea565b6040525050565b600067ffffffffffffffff821115611847576118476117ea565b5060051b60200190565b600082601f83011261186257600080fd5b8135602061186f8261182d565b60405161187c8282611800565b80915083815260208101915060208460051b8701019350868411156118a057600080fd5b602086015b848110156118bc57803583529183019183016118a5565b509695505050505050565b600082601f8301126118d857600080fd5b813567ffffffffffffffff8111156118f2576118f26117ea565b604051611909601f8301601f191660200182611800565b81815284602083860101111561191e57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561195157600080fd5b61195a856116f5565b9350602085013567ffffffffffffffff8082111561197757600080fd5b61198388838901611851565b9450604087013591508082111561199957600080fd5b6119a588838901611851565b935060608701359150808211156119bb57600080fd5b506119c8878288016118c7565b91505092959194509250565b600080600080600060a086880312156119ec57600080fd5b6119f5866116f5565b9450611a03602087016116f5565b9350604086013567ffffffffffffffff80821115611a2057600080fd5b611a2c89838a01611851565b94506060880135915080821115611a4257600080fd5b611a4e89838a01611851565b93506080880135915080821115611a6457600080fd5b50611a71888289016118c7565b9150509295509295909350565b60008060408385031215611a9157600080fd5b82359150611aa1602084016116f5565b90509250929050565b60008060408385031215611abd57600080fd5b823567ffffffffffffffff80821115611ad557600080fd5b818501915085601f830112611ae957600080fd5b81356020611af68261182d565b604051611b038282611800565b83815260059390931b8501820192828101915089841115611b2357600080fd5b948201945b83861015611b4857611b39866116f5565b82529482019490820190611b28565b96505086013592505080821115611b5e57600080fd5b50611b6b85828601611851565b9150509250929050565b60008151808452602080850194506020840160005b83811015611ba657815187529582019590820190600101611b8a565b509495945050505050565b6020815260006116ee6020830184611b75565b600080600060608486031215611bd957600080fd5b611be2846116f5565b9250602084013567ffffffffffffffff80821115611bff57600080fd5b611c0b87838801611851565b93506040860135915080821115611c2157600080fd5b50611c2e86828701611851565b9150509250925092565b60008060008060808587031215611c4e57600080fd5b611c57856116f5565b93506020850135925060408501359150606085013567ffffffffffffffff811115611c8157600080fd5b6119c8878288016118c7565b60008060408385031215611ca057600080fd5b611ca9836116f5565b915060208301358015158114611cbe57600080fd5b809150509250929050565b60008060408385031215611cdc57600080fd5b611ce5836116f5565b9150611aa1602084016116f5565b600080600080600060a08688031215611d0b57600080fd5b611d14866116f5565b9450611d22602087016116f5565b93506040860135925060608601359150608086013567ffffffffffffffff811115611d4c57600080fd5b611a71888289016118c7565b600080600060608486031215611d6d57600080fd5b611d76846116f5565b95602085013595506040909401359392505050565b600181811c90821680611d9f57607f821691505b602082108103611dbf57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156103fa576103fa611eb3565b604081526000611eef6040830185611b75565b8281036020840152611f018185611b75565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161205881601785016020880161176e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161208981602884016020880161176e565b01602801949350505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906120c190830186611b75565b82810360608401526120d38186611b75565b905082810360808401526120e78185611792565b98975050505050505050565b60006020828403121561210557600080fd5b81516116ee8161173b565b600060033d11156121295760046000803e5060005160e01c5b90565b600060443d101561213a5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561216a57505050505090565b82850191508151818111156121825750505050505090565b843d870101602082850101111561219c5750505050505090565b6121ab60208286010187611800565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061223890830184611792565b979650505050505050565b80820281158282048414176103fa576103fa611eb3565b60008161226957612269611eb3565b50600019019056fea2646970667358221220c1922d923eac97be683dc6ff45b50a0f7dbad3c951fc4b097bedbbdfa7c1ac5164736f6c63430008170033", + "chainId": 2021, + "contractAbsolutePath": "MockERC1155.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101415760003560e01c80636b20c454116100b8578063a22cb4651161007c578063a22cb465146102b8578063d5391393146102cb578063d547741f146102f2578063e985e9c514610305578063f242432a14610341578063f5298aca1461035457600080fd5b80636b20c4541461026f578063731133e91461028257806391d148541461029557806395d89b41146102a8578063a217fddf146102b057600080fd5b8063248a9ca31161010a578063248a9ca3146101cc578063282c51f3146101ef5780632eb2c2d6146102165780632f2ff15d1461022957806336568abe1461023c5780634e1273f41461024f57600080fd5b8062fdd58e1461014657806301ffc9a71461016c57806306fdde031461018f5780630e89341c146101a45780631f7fdffa146101b7575b600080fd5b610159610154366004611711565b610367565b6040519081526020015b60405180910390f35b61017f61017a366004611751565b610400565b6040519015158152602001610163565b61019761041a565b60405161016391906117be565b6101976101b23660046117d1565b6104ac565b6101ca6101c536600461193b565b610540565b005b6101596101da3660046117d1565b60009081526003602052604090206001015490565b6101597f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6101ca6102243660046119d4565b61057d565b6101ca610237366004611a7e565b6105c2565b6101ca61024a366004611a7e565b6105ec565b61026261025d366004611aaa565b61066a565b6040516101639190611bb1565b6101ca61027d366004611bc4565b61078c565b6101ca610290366004611c38565b6107c7565b61017f6102a3366004611a7e565b6107fd565b610197610828565b610159600081565b6101ca6102c6366004611c8d565b610837565b6101597f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101ca610300366004611a7e565b610842565b61017f610313366004611cc9565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6101ca61034f366004611cf3565b610867565b6101ca610362366004611d58565b6108ac565b60006001600160a01b0383166103d75760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061040b826108e1565b806103fa57506103fa82610931565b60606004805461042990611d8b565b80601f016020809104026020016040519081016040528092919081815260200182805461045590611d8b565b80156104a25780601f10610477576101008083540402835291602001916104a2565b820191906000526020600020905b81548152906001019060200180831161048557829003601f168201915b5050505050905090565b6060600280546104bb90611d8b565b80601f01602080910402602001604051908101604052809291908181526020018280546104e790611d8b565b80156105345780601f1061050957610100808354040283529160200191610534565b820191906000526020600020905b81548152906001019060200180831161051757829003601f168201915b50505050509050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661056a81610956565b61057685858585610963565b5050505050565b6001600160a01b03851633148061059957506105998533610313565b6105b55760405162461bcd60e51b81526004016103ce90611dc5565b6105768585858585610aa3565b6000828152600360205260409020600101546105dd81610956565b6105e78383610c38565b505050565b6001600160a01b038116331461065c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016103ce565b6106668282610cbe565b5050565b606081518351146106cf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016103ce565b6000835167ffffffffffffffff8111156106eb576106eb6117ea565b604051908082528060200260200182016040528015610714578160200160208202803683370190505b50905060005b84518110156107845761075f85828151811061073857610738611e14565b602002602001015185838151811061075257610752611e14565b6020026020010151610367565b82828151811061077157610771611e14565b602090810291909101015260010161071a565b509392505050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486107b681610956565b6107c1848484610d25565b50505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107f181610956565b61057685858585610ea5565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461042990611d8b565b610666338383610f7f565b60008281526003602052604090206001015461085d81610956565b6105e78383610cbe565b6001600160a01b03851633148061088357506108838533610313565b61089f5760405162461bcd60e51b81526004016103ce90611dc5565b610576858585858561105f565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486108d681610956565b6107c1848484611189565b60006001600160e01b03198216636cdb3d1360e11b148061091257506001600160e01b031982166303a24d0760e21b145b806103fa57506301ffc9a760e01b6001600160e01b03198316146103fa565b60006001600160e01b03198216637965db0b60e01b14806103fa57506103fa826108e1565b610960813361128d565b50565b6001600160a01b0384166109895760405162461bcd60e51b81526004016103ce90611e2a565b81518351146109aa5760405162461bcd60e51b81526004016103ce90611e6b565b3360005b8451811015610a3b578381815181106109c9576109c9611e14565b60200260200101516000808784815181106109e6576109e6611e14565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610a2e9190611ec9565b90915550506001016109ae565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610a8c929190611edc565b60405180910390a4610576816000878787876112f1565b8151835114610ac45760405162461bcd60e51b81526004016103ce90611e6b565b6001600160a01b038416610aea5760405162461bcd60e51b81526004016103ce90611f0a565b3360005b8451811015610bca576000858281518110610b0b57610b0b611e14565b602002602001015190506000858381518110610b2957610b29611e14565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610b795760405162461bcd60e51b81526004016103ce90611f4f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610bb6908490611ec9565b909155505060019093019250610aee915050565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c1a929190611edc565b60405180910390a4610c308187878787876112f1565b505050505050565b610c4282826107fd565b6106665760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610c7a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610cc882826107fd565b156106665760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b038316610d4b5760405162461bcd60e51b81526004016103ce90611f99565b8051825114610d6c5760405162461bcd60e51b81526004016103ce90611e6b565b604080516020810190915260009081905233905b8351811015610e38576000848281518110610d9d57610d9d611e14565b602002602001015190506000848381518110610dbb57610dbb611e14565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015610e0b5760405162461bcd60e51b81526004016103ce90611fdc565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055600101610d80565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051610e89929190611edc565b60405180910390a46040805160208101909152600090526107c1565b6001600160a01b038416610ecb5760405162461bcd60e51b81526004016103ce90611e2a565b336000610ed78561144c565b90506000610ee48561144c565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290610f16908490611ec9565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610f7683600089898989611497565b50505050505050565b816001600160a01b0316836001600160a01b031603610ff25760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016103ce565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166110855760405162461bcd60e51b81526004016103ce90611f0a565b3360006110918561144c565b9050600061109e8561144c565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156110e15760405162461bcd60e51b81526004016103ce90611f4f565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061111e908490611ec9565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461117e848a8a8a8a8a611497565b505050505050505050565b6001600160a01b0383166111af5760405162461bcd60e51b81526004016103ce90611f99565b3360006111bb8461144c565b905060006111c88461144c565b60408051602080820183526000918290528882528181528282206001600160a01b038b16835290522054909150848110156112155760405162461bcd60e51b81526004016103ce90611fdc565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052610f76565b61129782826107fd565b610666576112af816001600160a01b03166014611552565b6112ba836020611552565b6040516020016112cb929190612020565b60408051601f198184030181529082905262461bcd60e51b82526103ce916004016117be565b6001600160a01b0384163b15610c305760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906113359089908990889088908890600401612095565b6020604051808303816000875af1925050508015611370575060408051601f3d908101601f1916820190925261136d918101906120f3565b60015b61141c5761137c612110565b806308c379a0036113b5575061139061212c565b8061139b57506113b7565b8060405162461bcd60e51b81526004016103ce91906117be565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016103ce565b6001600160e01b0319811663bc197c8160e01b14610f765760405162461bcd60e51b81526004016103ce906121b6565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061148657611486611e14565b602090810291909101015292915050565b6001600160a01b0384163b15610c305760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906114db90899089908890889088906004016121fe565b6020604051808303816000875af1925050508015611516575060408051601f3d908101601f19168201909252611513918101906120f3565b60015b6115225761137c612110565b6001600160e01b0319811663f23a6e6160e01b14610f765760405162461bcd60e51b81526004016103ce906121b6565b60606000611561836002612243565b61156c906002611ec9565b67ffffffffffffffff811115611584576115846117ea565b6040519080825280601f01601f1916602001820160405280156115ae576020820181803683370190505b509050600360fc1b816000815181106115c9576115c9611e14565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106115f8576115f8611e14565b60200101906001600160f81b031916908160001a905350600061161c846002612243565b611627906001611ec9565b90505b600181111561169f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061165b5761165b611e14565b1a60f81b82828151811061167157611671611e14565b60200101906001600160f81b031916908160001a90535060049490941c936116988161225a565b905061162a565b5083156116ee5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016103ce565b9392505050565b80356001600160a01b038116811461170c57600080fd5b919050565b6000806040838503121561172457600080fd5b61172d836116f5565b946020939093013593505050565b6001600160e01b03198116811461096057600080fd5b60006020828403121561176357600080fd5b81356116ee8161173b565b60005b83811015611789578181015183820152602001611771565b50506000910152565b600081518084526117aa81602086016020860161176e565b601f01601f19169290920160200192915050565b6020815260006116ee6020830184611792565b6000602082840312156117e357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611826576118266117ea565b6040525050565b600067ffffffffffffffff821115611847576118476117ea565b5060051b60200190565b600082601f83011261186257600080fd5b8135602061186f8261182d565b60405161187c8282611800565b80915083815260208101915060208460051b8701019350868411156118a057600080fd5b602086015b848110156118bc57803583529183019183016118a5565b509695505050505050565b600082601f8301126118d857600080fd5b813567ffffffffffffffff8111156118f2576118f26117ea565b604051611909601f8301601f191660200182611800565b81815284602083860101111561191e57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561195157600080fd5b61195a856116f5565b9350602085013567ffffffffffffffff8082111561197757600080fd5b61198388838901611851565b9450604087013591508082111561199957600080fd5b6119a588838901611851565b935060608701359150808211156119bb57600080fd5b506119c8878288016118c7565b91505092959194509250565b600080600080600060a086880312156119ec57600080fd5b6119f5866116f5565b9450611a03602087016116f5565b9350604086013567ffffffffffffffff80821115611a2057600080fd5b611a2c89838a01611851565b94506060880135915080821115611a4257600080fd5b611a4e89838a01611851565b93506080880135915080821115611a6457600080fd5b50611a71888289016118c7565b9150509295509295909350565b60008060408385031215611a9157600080fd5b82359150611aa1602084016116f5565b90509250929050565b60008060408385031215611abd57600080fd5b823567ffffffffffffffff80821115611ad557600080fd5b818501915085601f830112611ae957600080fd5b81356020611af68261182d565b604051611b038282611800565b83815260059390931b8501820192828101915089841115611b2357600080fd5b948201945b83861015611b4857611b39866116f5565b82529482019490820190611b28565b96505086013592505080821115611b5e57600080fd5b50611b6b85828601611851565b9150509250929050565b60008151808452602080850194506020840160005b83811015611ba657815187529582019590820190600101611b8a565b509495945050505050565b6020815260006116ee6020830184611b75565b600080600060608486031215611bd957600080fd5b611be2846116f5565b9250602084013567ffffffffffffffff80821115611bff57600080fd5b611c0b87838801611851565b93506040860135915080821115611c2157600080fd5b50611c2e86828701611851565b9150509250925092565b60008060008060808587031215611c4e57600080fd5b611c57856116f5565b93506020850135925060408501359150606085013567ffffffffffffffff811115611c8157600080fd5b6119c8878288016118c7565b60008060408385031215611ca057600080fd5b611ca9836116f5565b915060208301358015158114611cbe57600080fd5b809150509250929050565b60008060408385031215611cdc57600080fd5b611ce5836116f5565b9150611aa1602084016116f5565b600080600080600060a08688031215611d0b57600080fd5b611d14866116f5565b9450611d22602087016116f5565b93506040860135925060608601359150608086013567ffffffffffffffff811115611d4c57600080fd5b611a71888289016118c7565b600080600060608486031215611d6d57600080fd5b611d76846116f5565b95602085013595506040909401359392505050565b600181811c90821680611d9f57607f821691505b602082108103611dbf57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156103fa576103fa611eb3565b604081526000611eef6040830185611b75565b8281036020840152611f018185611b75565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161205881601785016020880161176e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161208981602884016020880161176e565b01602801949350505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906120c190830186611b75565b82810360608401526120d38186611b75565b905082810360808401526120e78185611792565b98975050505050505050565b60006020828403121561210557600080fd5b81516116ee8161173b565b600060033d11156121295760046000803e5060005160e01c5b90565b600060443d101561213a5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561216a57505050505090565b82850191508151818111156121825750505050505090565b843d870101602082850101111561219c5750505050505090565b6121ab60208286010187611800565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061223890830184611792565b979650505050505050565b80820281158282048414176103fa576103fa611eb3565b60008161226957612269611eb3565b50600019019056fea2646970667358221220c1922d923eac97be683dc6ff45b50a0f7dbad3c951fc4b097bedbbdfa7c1ac5164736f6c63430008170033", + "deployer": "0xEf46169CD1e954aB10D5e4C280737D9b92d0a936", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "balanceOf(address,uint256)": { + "details": "See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address." + }, + "balanceOfBatch(address[],uint256[])": { + "details": "See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length." + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "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. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC1155-isApprovedForAll}." + }, + "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "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. May emit a {RoleRevoked} event." + }, + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { + "details": "See {IERC1155-safeBatchTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,uint256,bytes)": { + "details": "See {IERC1155-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC1155-setApprovalForAll}." + }, + "uri(uint256)": { + "details": "See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\{id\\}` substring with the actual token type ID." + } + }, + "events": { + "ApprovalForAll(address,address,bool)": { + "details": "Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "TransferBatch(address,address,address,uint256[],uint256[])": { + "details": "Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all transfers." + }, + "TransferSingle(address,address,address,uint256,uint256)": { + "details": "Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`." + }, + "URI(string,uint256)": { + "details": "Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. If an {URI} event was emitted for `id`, the standard https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value returned by {IERC1155MetadataURI-uri}." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"defaultAdmin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"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\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"burnBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"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\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mintBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"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\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"TransferBatch(address,address,address,uint256[],uint256[])\":{\"details\":\"Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all transfers.\"},\"TransferSingle(address,address,address,uint256,uint256)\":{\"details\":\"Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\"},\"URI(string,uint256)\":{\"details\":\"Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. If an {URI} event was emitted for `id`, the standard https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value returned by {IERC1155MetadataURI-uri}.\"}},\"kind\":\"dev\",\"methods\":{\"balanceOf(address,uint256)\":{\"details\":\"See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address.\"},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"uri(uint256)\":{\"details\":\"See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\\\{id\\\\}` substring with the actual token type ID.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC1155.sol\":\"MockERC1155\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba8eb2d22f9321bd4660f6617c181d9611ff30a9b089408b8c6e2216d6d5cdc5\",\"dweb:/ipfs/QmTSJvhjHfnUV1j4hsqDv8PmLvGBLRs9gHLjTUXrUJ5Y9q\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://67d35750fb5ced798b82b8ab085eb5f71529b0d4f72152d182b5bebdc770b20d\",\"dweb:/ipfs/QmUqmyzRZxaLvSXig87HFZgiUxv9ivc2VqfAbxEw7rx32d\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd9c47a375639888e726a99da718890ba16d17d7ad9eacb0ccc892d46d1b3ee0\",\"dweb:/ipfs/Qmb41W5RUjy2sWg49A2rMnxekSeEk6SvGyJL5tyCCSr7un\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0e28648f994abf1d6bc345644a361cc0b7efa544f8bc0c8ec26011fed85a91ec\",\"dweb:/ipfs/QmVVE7AiRjKaQYYji7TkjmTeVzGpNmms5eoxqTCfvvpj6D\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0a5fc67f024fd2d261543c52a33a2a90b96d2ea1867829e8e12fe6b89b53aee1\",\"dweb:/ipfs/QmPc3ryH7Yv4FoY14CGbaXuQVQ7iu2yrxVAtmbGrN7bscf\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e46c80ea068989111d6103e5521223f9ef337e93de76deed8b03f75c6f7b2797\",\"dweb:/ipfs/QmNoSE6knNfFncdDDLTb3fGR6oSQty1srG96Vsx3E9wQdw\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"src/mocks/token/MockERC1155.sol\":{\"keccak256\":\"0x79096c2f12b2a1918fb4f9f037344fdfe87eebe48debf58ef08447346e438a5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fd842989217721d8125af70a1667a825f3ffab9952f28477fea2090b848ba55f\",\"dweb:/ipfs/QmcvDKXUspukg19CGC7he1KKWh2efNxTMQuk41MfmAQeHR\"]}},\"version\":1}", + "nonce": 6, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 96748, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))" + }, + { + "astId": 96754, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_operatorApprovals", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 96756, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_uri", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 95370, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_roles", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_bytes32,t_struct(RoleData)95365_storage)" + }, + { + "astId": 138354, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_name", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 138356, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_symbol", + "offset": 0, + "slot": "5", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "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_struct(RoleData)95365_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)95365_storage" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(RoleData)95365_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", + "members": [ + { + "astId": 95362, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 95364, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1718203324, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/sepolia/MockERC1155.json b/deployments/sepolia/MockERC1155.json new file mode 100644 index 00000000..2f04f7c7 --- /dev/null +++ b/deployments/sepolia/MockERC1155.json @@ -0,0 +1,901 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "defaultAdmin", + "type": "address", + "internalType": "address" + }, + { + "name": "uri", + "type": "string", + "internalType": "string" + }, + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "BURNER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "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": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "balanceOfBatch", + "inputs": [ + { + "name": "accounts", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnBatch", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "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": "isApprovedForAll", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintBatch", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "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": "safeBatchTransferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "ids", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setApprovalForAll", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "uri", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "ApprovalForAll", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "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": "TransferBatch", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "ids", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "values", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TransferSingle", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "URI", + "inputs": [ + { + "name": "value", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } + ], + "address": "0xFBb71EEE2B420ea88e663B91722b41966E1C5F17", + "args": "0x000000000000000000000000ef46169cd1e954ab10d5e4c280737d9b92d0a936000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010526f6e696e4d6f636b45524331313535000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007524d453131353500000000000000000000000000000000000000000000000000", + "ast": "", + "blockNumber": 6096577, + "bytecode": "0x60806040523480156200001157600080fd5b50604051620026ba380380620026ba8339810160408190526200003491620001f4565b82620000408162000076565b5060046200004f838262000337565b5060056200005e828262000337565b506200006c60008562000088565b5050505062000403565b600262000084828262000337565b5050565b60008281526003602090815260408083206001600160a01b038516845290915290205460ff16620000845760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620000e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200015457600080fd5b81516001600160401b03808211156200017157620001716200012c565b604051601f8301601f19908116603f011681019082821181831017156200019c576200019c6200012c565b8160405283815260209250866020858801011115620001ba57600080fd5b600091505b83821015620001de5785820183015181830184015290820190620001bf565b6000602085830101528094505050505092915050565b600080600080608085870312156200020b57600080fd5b84516001600160a01b03811681146200022357600080fd5b60208601519094506001600160401b03808211156200024157600080fd5b6200024f8883890162000142565b945060408701519150808211156200026657600080fd5b620002748883890162000142565b935060608701519150808211156200028b57600080fd5b506200029a8782880162000142565b91505092959194509250565b600181811c90821680620002bb57607f821691505b602082108103620002dc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000332576000816000526020600020601f850160051c810160208610156200030d5750805b601f850160051c820191505b818110156200032e5782815560010162000319565b5050505b505050565b81516001600160401b038111156200035357620003536200012c565b6200036b81620003648454620002a6565b84620002e2565b602080601f831160018114620003a357600084156200038a5750858301515b600019600386901b1c1916600185901b1785556200032e565b600085815260208120601f198616915b82811015620003d457888601518255948401946001909101908401620003b3565b5085821015620003f35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6122a780620004136000396000f3fe608060405234801561001057600080fd5b50600436106101415760003560e01c80636b20c454116100b8578063a22cb4651161007c578063a22cb465146102b8578063d5391393146102cb578063d547741f146102f2578063e985e9c514610305578063f242432a14610341578063f5298aca1461035457600080fd5b80636b20c4541461026f578063731133e91461028257806391d148541461029557806395d89b41146102a8578063a217fddf146102b057600080fd5b8063248a9ca31161010a578063248a9ca3146101cc578063282c51f3146101ef5780632eb2c2d6146102165780632f2ff15d1461022957806336568abe1461023c5780634e1273f41461024f57600080fd5b8062fdd58e1461014657806301ffc9a71461016c57806306fdde031461018f5780630e89341c146101a45780631f7fdffa146101b7575b600080fd5b610159610154366004611711565b610367565b6040519081526020015b60405180910390f35b61017f61017a366004611751565b610400565b6040519015158152602001610163565b61019761041a565b60405161016391906117be565b6101976101b23660046117d1565b6104ac565b6101ca6101c536600461193b565b610540565b005b6101596101da3660046117d1565b60009081526003602052604090206001015490565b6101597f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6101ca6102243660046119d4565b61057d565b6101ca610237366004611a7e565b6105c2565b6101ca61024a366004611a7e565b6105ec565b61026261025d366004611aaa565b61066a565b6040516101639190611bb1565b6101ca61027d366004611bc4565b61078c565b6101ca610290366004611c38565b6107c7565b61017f6102a3366004611a7e565b6107fd565b610197610828565b610159600081565b6101ca6102c6366004611c8d565b610837565b6101597f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101ca610300366004611a7e565b610842565b61017f610313366004611cc9565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6101ca61034f366004611cf3565b610867565b6101ca610362366004611d58565b6108ac565b60006001600160a01b0383166103d75760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061040b826108e1565b806103fa57506103fa82610931565b60606004805461042990611d8b565b80601f016020809104026020016040519081016040528092919081815260200182805461045590611d8b565b80156104a25780601f10610477576101008083540402835291602001916104a2565b820191906000526020600020905b81548152906001019060200180831161048557829003601f168201915b5050505050905090565b6060600280546104bb90611d8b565b80601f01602080910402602001604051908101604052809291908181526020018280546104e790611d8b565b80156105345780601f1061050957610100808354040283529160200191610534565b820191906000526020600020905b81548152906001019060200180831161051757829003601f168201915b50505050509050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661056a81610956565b61057685858585610963565b5050505050565b6001600160a01b03851633148061059957506105998533610313565b6105b55760405162461bcd60e51b81526004016103ce90611dc5565b6105768585858585610aa3565b6000828152600360205260409020600101546105dd81610956565b6105e78383610c38565b505050565b6001600160a01b038116331461065c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016103ce565b6106668282610cbe565b5050565b606081518351146106cf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016103ce565b6000835167ffffffffffffffff8111156106eb576106eb6117ea565b604051908082528060200260200182016040528015610714578160200160208202803683370190505b50905060005b84518110156107845761075f85828151811061073857610738611e14565b602002602001015185838151811061075257610752611e14565b6020026020010151610367565b82828151811061077157610771611e14565b602090810291909101015260010161071a565b509392505050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486107b681610956565b6107c1848484610d25565b50505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107f181610956565b61057685858585610ea5565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461042990611d8b565b610666338383610f7f565b60008281526003602052604090206001015461085d81610956565b6105e78383610cbe565b6001600160a01b03851633148061088357506108838533610313565b61089f5760405162461bcd60e51b81526004016103ce90611dc5565b610576858585858561105f565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486108d681610956565b6107c1848484611189565b60006001600160e01b03198216636cdb3d1360e11b148061091257506001600160e01b031982166303a24d0760e21b145b806103fa57506301ffc9a760e01b6001600160e01b03198316146103fa565b60006001600160e01b03198216637965db0b60e01b14806103fa57506103fa826108e1565b610960813361128d565b50565b6001600160a01b0384166109895760405162461bcd60e51b81526004016103ce90611e2a565b81518351146109aa5760405162461bcd60e51b81526004016103ce90611e6b565b3360005b8451811015610a3b578381815181106109c9576109c9611e14565b60200260200101516000808784815181106109e6576109e6611e14565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610a2e9190611ec9565b90915550506001016109ae565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610a8c929190611edc565b60405180910390a4610576816000878787876112f1565b8151835114610ac45760405162461bcd60e51b81526004016103ce90611e6b565b6001600160a01b038416610aea5760405162461bcd60e51b81526004016103ce90611f0a565b3360005b8451811015610bca576000858281518110610b0b57610b0b611e14565b602002602001015190506000858381518110610b2957610b29611e14565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610b795760405162461bcd60e51b81526004016103ce90611f4f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610bb6908490611ec9565b909155505060019093019250610aee915050565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c1a929190611edc565b60405180910390a4610c308187878787876112f1565b505050505050565b610c4282826107fd565b6106665760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610c7a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610cc882826107fd565b156106665760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b038316610d4b5760405162461bcd60e51b81526004016103ce90611f99565b8051825114610d6c5760405162461bcd60e51b81526004016103ce90611e6b565b604080516020810190915260009081905233905b8351811015610e38576000848281518110610d9d57610d9d611e14565b602002602001015190506000848381518110610dbb57610dbb611e14565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015610e0b5760405162461bcd60e51b81526004016103ce90611fdc565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055600101610d80565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051610e89929190611edc565b60405180910390a46040805160208101909152600090526107c1565b6001600160a01b038416610ecb5760405162461bcd60e51b81526004016103ce90611e2a565b336000610ed78561144c565b90506000610ee48561144c565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290610f16908490611ec9565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610f7683600089898989611497565b50505050505050565b816001600160a01b0316836001600160a01b031603610ff25760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016103ce565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166110855760405162461bcd60e51b81526004016103ce90611f0a565b3360006110918561144c565b9050600061109e8561144c565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156110e15760405162461bcd60e51b81526004016103ce90611f4f565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061111e908490611ec9565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461117e848a8a8a8a8a611497565b505050505050505050565b6001600160a01b0383166111af5760405162461bcd60e51b81526004016103ce90611f99565b3360006111bb8461144c565b905060006111c88461144c565b60408051602080820183526000918290528882528181528282206001600160a01b038b16835290522054909150848110156112155760405162461bcd60e51b81526004016103ce90611fdc565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052610f76565b61129782826107fd565b610666576112af816001600160a01b03166014611552565b6112ba836020611552565b6040516020016112cb929190612020565b60408051601f198184030181529082905262461bcd60e51b82526103ce916004016117be565b6001600160a01b0384163b15610c305760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906113359089908990889088908890600401612095565b6020604051808303816000875af1925050508015611370575060408051601f3d908101601f1916820190925261136d918101906120f3565b60015b61141c5761137c612110565b806308c379a0036113b5575061139061212c565b8061139b57506113b7565b8060405162461bcd60e51b81526004016103ce91906117be565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016103ce565b6001600160e01b0319811663bc197c8160e01b14610f765760405162461bcd60e51b81526004016103ce906121b6565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061148657611486611e14565b602090810291909101015292915050565b6001600160a01b0384163b15610c305760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906114db90899089908890889088906004016121fe565b6020604051808303816000875af1925050508015611516575060408051601f3d908101601f19168201909252611513918101906120f3565b60015b6115225761137c612110565b6001600160e01b0319811663f23a6e6160e01b14610f765760405162461bcd60e51b81526004016103ce906121b6565b60606000611561836002612243565b61156c906002611ec9565b67ffffffffffffffff811115611584576115846117ea565b6040519080825280601f01601f1916602001820160405280156115ae576020820181803683370190505b509050600360fc1b816000815181106115c9576115c9611e14565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106115f8576115f8611e14565b60200101906001600160f81b031916908160001a905350600061161c846002612243565b611627906001611ec9565b90505b600181111561169f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061165b5761165b611e14565b1a60f81b82828151811061167157611671611e14565b60200101906001600160f81b031916908160001a90535060049490941c936116988161225a565b905061162a565b5083156116ee5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016103ce565b9392505050565b80356001600160a01b038116811461170c57600080fd5b919050565b6000806040838503121561172457600080fd5b61172d836116f5565b946020939093013593505050565b6001600160e01b03198116811461096057600080fd5b60006020828403121561176357600080fd5b81356116ee8161173b565b60005b83811015611789578181015183820152602001611771565b50506000910152565b600081518084526117aa81602086016020860161176e565b601f01601f19169290920160200192915050565b6020815260006116ee6020830184611792565b6000602082840312156117e357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611826576118266117ea565b6040525050565b600067ffffffffffffffff821115611847576118476117ea565b5060051b60200190565b600082601f83011261186257600080fd5b8135602061186f8261182d565b60405161187c8282611800565b80915083815260208101915060208460051b8701019350868411156118a057600080fd5b602086015b848110156118bc57803583529183019183016118a5565b509695505050505050565b600082601f8301126118d857600080fd5b813567ffffffffffffffff8111156118f2576118f26117ea565b604051611909601f8301601f191660200182611800565b81815284602083860101111561191e57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561195157600080fd5b61195a856116f5565b9350602085013567ffffffffffffffff8082111561197757600080fd5b61198388838901611851565b9450604087013591508082111561199957600080fd5b6119a588838901611851565b935060608701359150808211156119bb57600080fd5b506119c8878288016118c7565b91505092959194509250565b600080600080600060a086880312156119ec57600080fd5b6119f5866116f5565b9450611a03602087016116f5565b9350604086013567ffffffffffffffff80821115611a2057600080fd5b611a2c89838a01611851565b94506060880135915080821115611a4257600080fd5b611a4e89838a01611851565b93506080880135915080821115611a6457600080fd5b50611a71888289016118c7565b9150509295509295909350565b60008060408385031215611a9157600080fd5b82359150611aa1602084016116f5565b90509250929050565b60008060408385031215611abd57600080fd5b823567ffffffffffffffff80821115611ad557600080fd5b818501915085601f830112611ae957600080fd5b81356020611af68261182d565b604051611b038282611800565b83815260059390931b8501820192828101915089841115611b2357600080fd5b948201945b83861015611b4857611b39866116f5565b82529482019490820190611b28565b96505086013592505080821115611b5e57600080fd5b50611b6b85828601611851565b9150509250929050565b60008151808452602080850194506020840160005b83811015611ba657815187529582019590820190600101611b8a565b509495945050505050565b6020815260006116ee6020830184611b75565b600080600060608486031215611bd957600080fd5b611be2846116f5565b9250602084013567ffffffffffffffff80821115611bff57600080fd5b611c0b87838801611851565b93506040860135915080821115611c2157600080fd5b50611c2e86828701611851565b9150509250925092565b60008060008060808587031215611c4e57600080fd5b611c57856116f5565b93506020850135925060408501359150606085013567ffffffffffffffff811115611c8157600080fd5b6119c8878288016118c7565b60008060408385031215611ca057600080fd5b611ca9836116f5565b915060208301358015158114611cbe57600080fd5b809150509250929050565b60008060408385031215611cdc57600080fd5b611ce5836116f5565b9150611aa1602084016116f5565b600080600080600060a08688031215611d0b57600080fd5b611d14866116f5565b9450611d22602087016116f5565b93506040860135925060608601359150608086013567ffffffffffffffff811115611d4c57600080fd5b611a71888289016118c7565b600080600060608486031215611d6d57600080fd5b611d76846116f5565b95602085013595506040909401359392505050565b600181811c90821680611d9f57607f821691505b602082108103611dbf57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156103fa576103fa611eb3565b604081526000611eef6040830185611b75565b8281036020840152611f018185611b75565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161205881601785016020880161176e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161208981602884016020880161176e565b01602801949350505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906120c190830186611b75565b82810360608401526120d38186611b75565b905082810360808401526120e78185611792565b98975050505050505050565b60006020828403121561210557600080fd5b81516116ee8161173b565b600060033d11156121295760046000803e5060005160e01c5b90565b600060443d101561213a5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561216a57505050505090565b82850191508151818111156121825750505050505090565b843d870101602082850101111561219c5750505050505090565b6121ab60208286010187611800565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061223890830184611792565b979650505050505050565b80820281158282048414176103fa576103fa611eb3565b60008161226957612269611eb3565b50600019019056fea2646970667358221220c1922d923eac97be683dc6ff45b50a0f7dbad3c951fc4b097bedbbdfa7c1ac5164736f6c63430008170033", + "chainId": 11155111, + "contractAbsolutePath": "MockERC1155.sol", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101415760003560e01c80636b20c454116100b8578063a22cb4651161007c578063a22cb465146102b8578063d5391393146102cb578063d547741f146102f2578063e985e9c514610305578063f242432a14610341578063f5298aca1461035457600080fd5b80636b20c4541461026f578063731133e91461028257806391d148541461029557806395d89b41146102a8578063a217fddf146102b057600080fd5b8063248a9ca31161010a578063248a9ca3146101cc578063282c51f3146101ef5780632eb2c2d6146102165780632f2ff15d1461022957806336568abe1461023c5780634e1273f41461024f57600080fd5b8062fdd58e1461014657806301ffc9a71461016c57806306fdde031461018f5780630e89341c146101a45780631f7fdffa146101b7575b600080fd5b610159610154366004611711565b610367565b6040519081526020015b60405180910390f35b61017f61017a366004611751565b610400565b6040519015158152602001610163565b61019761041a565b60405161016391906117be565b6101976101b23660046117d1565b6104ac565b6101ca6101c536600461193b565b610540565b005b6101596101da3660046117d1565b60009081526003602052604090206001015490565b6101597f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6101ca6102243660046119d4565b61057d565b6101ca610237366004611a7e565b6105c2565b6101ca61024a366004611a7e565b6105ec565b61026261025d366004611aaa565b61066a565b6040516101639190611bb1565b6101ca61027d366004611bc4565b61078c565b6101ca610290366004611c38565b6107c7565b61017f6102a3366004611a7e565b6107fd565b610197610828565b610159600081565b6101ca6102c6366004611c8d565b610837565b6101597f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101ca610300366004611a7e565b610842565b61017f610313366004611cc9565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6101ca61034f366004611cf3565b610867565b6101ca610362366004611d58565b6108ac565b60006001600160a01b0383166103d75760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061040b826108e1565b806103fa57506103fa82610931565b60606004805461042990611d8b565b80601f016020809104026020016040519081016040528092919081815260200182805461045590611d8b565b80156104a25780601f10610477576101008083540402835291602001916104a2565b820191906000526020600020905b81548152906001019060200180831161048557829003601f168201915b5050505050905090565b6060600280546104bb90611d8b565b80601f01602080910402602001604051908101604052809291908181526020018280546104e790611d8b565b80156105345780601f1061050957610100808354040283529160200191610534565b820191906000526020600020905b81548152906001019060200180831161051757829003601f168201915b50505050509050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661056a81610956565b61057685858585610963565b5050505050565b6001600160a01b03851633148061059957506105998533610313565b6105b55760405162461bcd60e51b81526004016103ce90611dc5565b6105768585858585610aa3565b6000828152600360205260409020600101546105dd81610956565b6105e78383610c38565b505050565b6001600160a01b038116331461065c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016103ce565b6106668282610cbe565b5050565b606081518351146106cf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016103ce565b6000835167ffffffffffffffff8111156106eb576106eb6117ea565b604051908082528060200260200182016040528015610714578160200160208202803683370190505b50905060005b84518110156107845761075f85828151811061073857610738611e14565b602002602001015185838151811061075257610752611e14565b6020026020010151610367565b82828151811061077157610771611e14565b602090810291909101015260010161071a565b509392505050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486107b681610956565b6107c1848484610d25565b50505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107f181610956565b61057685858585610ea5565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461042990611d8b565b610666338383610f7f565b60008281526003602052604090206001015461085d81610956565b6105e78383610cbe565b6001600160a01b03851633148061088357506108838533610313565b61089f5760405162461bcd60e51b81526004016103ce90611dc5565b610576858585858561105f565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486108d681610956565b6107c1848484611189565b60006001600160e01b03198216636cdb3d1360e11b148061091257506001600160e01b031982166303a24d0760e21b145b806103fa57506301ffc9a760e01b6001600160e01b03198316146103fa565b60006001600160e01b03198216637965db0b60e01b14806103fa57506103fa826108e1565b610960813361128d565b50565b6001600160a01b0384166109895760405162461bcd60e51b81526004016103ce90611e2a565b81518351146109aa5760405162461bcd60e51b81526004016103ce90611e6b565b3360005b8451811015610a3b578381815181106109c9576109c9611e14565b60200260200101516000808784815181106109e6576109e6611e14565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610a2e9190611ec9565b90915550506001016109ae565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610a8c929190611edc565b60405180910390a4610576816000878787876112f1565b8151835114610ac45760405162461bcd60e51b81526004016103ce90611e6b565b6001600160a01b038416610aea5760405162461bcd60e51b81526004016103ce90611f0a565b3360005b8451811015610bca576000858281518110610b0b57610b0b611e14565b602002602001015190506000858381518110610b2957610b29611e14565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610b795760405162461bcd60e51b81526004016103ce90611f4f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610bb6908490611ec9565b909155505060019093019250610aee915050565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c1a929190611edc565b60405180910390a4610c308187878787876112f1565b505050505050565b610c4282826107fd565b6106665760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610c7a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610cc882826107fd565b156106665760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b038316610d4b5760405162461bcd60e51b81526004016103ce90611f99565b8051825114610d6c5760405162461bcd60e51b81526004016103ce90611e6b565b604080516020810190915260009081905233905b8351811015610e38576000848281518110610d9d57610d9d611e14565b602002602001015190506000848381518110610dbb57610dbb611e14565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015610e0b5760405162461bcd60e51b81526004016103ce90611fdc565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055600101610d80565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051610e89929190611edc565b60405180910390a46040805160208101909152600090526107c1565b6001600160a01b038416610ecb5760405162461bcd60e51b81526004016103ce90611e2a565b336000610ed78561144c565b90506000610ee48561144c565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290610f16908490611ec9565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610f7683600089898989611497565b50505050505050565b816001600160a01b0316836001600160a01b031603610ff25760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016103ce565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166110855760405162461bcd60e51b81526004016103ce90611f0a565b3360006110918561144c565b9050600061109e8561144c565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156110e15760405162461bcd60e51b81526004016103ce90611f4f565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061111e908490611ec9565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461117e848a8a8a8a8a611497565b505050505050505050565b6001600160a01b0383166111af5760405162461bcd60e51b81526004016103ce90611f99565b3360006111bb8461144c565b905060006111c88461144c565b60408051602080820183526000918290528882528181528282206001600160a01b038b16835290522054909150848110156112155760405162461bcd60e51b81526004016103ce90611fdc565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052610f76565b61129782826107fd565b610666576112af816001600160a01b03166014611552565b6112ba836020611552565b6040516020016112cb929190612020565b60408051601f198184030181529082905262461bcd60e51b82526103ce916004016117be565b6001600160a01b0384163b15610c305760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906113359089908990889088908890600401612095565b6020604051808303816000875af1925050508015611370575060408051601f3d908101601f1916820190925261136d918101906120f3565b60015b61141c5761137c612110565b806308c379a0036113b5575061139061212c565b8061139b57506113b7565b8060405162461bcd60e51b81526004016103ce91906117be565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016103ce565b6001600160e01b0319811663bc197c8160e01b14610f765760405162461bcd60e51b81526004016103ce906121b6565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061148657611486611e14565b602090810291909101015292915050565b6001600160a01b0384163b15610c305760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906114db90899089908890889088906004016121fe565b6020604051808303816000875af1925050508015611516575060408051601f3d908101601f19168201909252611513918101906120f3565b60015b6115225761137c612110565b6001600160e01b0319811663f23a6e6160e01b14610f765760405162461bcd60e51b81526004016103ce906121b6565b60606000611561836002612243565b61156c906002611ec9565b67ffffffffffffffff811115611584576115846117ea565b6040519080825280601f01601f1916602001820160405280156115ae576020820181803683370190505b509050600360fc1b816000815181106115c9576115c9611e14565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106115f8576115f8611e14565b60200101906001600160f81b031916908160001a905350600061161c846002612243565b611627906001611ec9565b90505b600181111561169f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061165b5761165b611e14565b1a60f81b82828151811061167157611671611e14565b60200101906001600160f81b031916908160001a90535060049490941c936116988161225a565b905061162a565b5083156116ee5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016103ce565b9392505050565b80356001600160a01b038116811461170c57600080fd5b919050565b6000806040838503121561172457600080fd5b61172d836116f5565b946020939093013593505050565b6001600160e01b03198116811461096057600080fd5b60006020828403121561176357600080fd5b81356116ee8161173b565b60005b83811015611789578181015183820152602001611771565b50506000910152565b600081518084526117aa81602086016020860161176e565b601f01601f19169290920160200192915050565b6020815260006116ee6020830184611792565b6000602082840312156117e357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611826576118266117ea565b6040525050565b600067ffffffffffffffff821115611847576118476117ea565b5060051b60200190565b600082601f83011261186257600080fd5b8135602061186f8261182d565b60405161187c8282611800565b80915083815260208101915060208460051b8701019350868411156118a057600080fd5b602086015b848110156118bc57803583529183019183016118a5565b509695505050505050565b600082601f8301126118d857600080fd5b813567ffffffffffffffff8111156118f2576118f26117ea565b604051611909601f8301601f191660200182611800565b81815284602083860101111561191e57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561195157600080fd5b61195a856116f5565b9350602085013567ffffffffffffffff8082111561197757600080fd5b61198388838901611851565b9450604087013591508082111561199957600080fd5b6119a588838901611851565b935060608701359150808211156119bb57600080fd5b506119c8878288016118c7565b91505092959194509250565b600080600080600060a086880312156119ec57600080fd5b6119f5866116f5565b9450611a03602087016116f5565b9350604086013567ffffffffffffffff80821115611a2057600080fd5b611a2c89838a01611851565b94506060880135915080821115611a4257600080fd5b611a4e89838a01611851565b93506080880135915080821115611a6457600080fd5b50611a71888289016118c7565b9150509295509295909350565b60008060408385031215611a9157600080fd5b82359150611aa1602084016116f5565b90509250929050565b60008060408385031215611abd57600080fd5b823567ffffffffffffffff80821115611ad557600080fd5b818501915085601f830112611ae957600080fd5b81356020611af68261182d565b604051611b038282611800565b83815260059390931b8501820192828101915089841115611b2357600080fd5b948201945b83861015611b4857611b39866116f5565b82529482019490820190611b28565b96505086013592505080821115611b5e57600080fd5b50611b6b85828601611851565b9150509250929050565b60008151808452602080850194506020840160005b83811015611ba657815187529582019590820190600101611b8a565b509495945050505050565b6020815260006116ee6020830184611b75565b600080600060608486031215611bd957600080fd5b611be2846116f5565b9250602084013567ffffffffffffffff80821115611bff57600080fd5b611c0b87838801611851565b93506040860135915080821115611c2157600080fd5b50611c2e86828701611851565b9150509250925092565b60008060008060808587031215611c4e57600080fd5b611c57856116f5565b93506020850135925060408501359150606085013567ffffffffffffffff811115611c8157600080fd5b6119c8878288016118c7565b60008060408385031215611ca057600080fd5b611ca9836116f5565b915060208301358015158114611cbe57600080fd5b809150509250929050565b60008060408385031215611cdc57600080fd5b611ce5836116f5565b9150611aa1602084016116f5565b600080600080600060a08688031215611d0b57600080fd5b611d14866116f5565b9450611d22602087016116f5565b93506040860135925060608601359150608086013567ffffffffffffffff811115611d4c57600080fd5b611a71888289016118c7565b600080600060608486031215611d6d57600080fd5b611d76846116f5565b95602085013595506040909401359392505050565b600181811c90821680611d9f57607f821691505b602082108103611dbf57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156103fa576103fa611eb3565b604081526000611eef6040830185611b75565b8281036020840152611f018185611b75565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161205881601785016020880161176e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161208981602884016020880161176e565b01602801949350505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906120c190830186611b75565b82810360608401526120d38186611b75565b905082810360808401526120e78185611792565b98975050505050505050565b60006020828403121561210557600080fd5b81516116ee8161173b565b600060033d11156121295760046000803e5060005160e01c5b90565b600060443d101561213a5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561216a57505050505090565b82850191508151818111156121825750505050505090565b843d870101602082850101111561219c5750505050505090565b6121ab60208286010187611800565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061223890830184611792565b979650505050505050565b80820281158282048414176103fa576103fa611eb3565b60008161226957612269611eb3565b50600019019056fea2646970667358221220c1922d923eac97be683dc6ff45b50a0f7dbad3c951fc4b097bedbbdfa7c1ac5164736f6c63430008170033", + "deployer": "0xEf46169CD1e954aB10D5e4C280737D9b92d0a936", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "balanceOf(address,uint256)": { + "details": "See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address." + }, + "balanceOfBatch(address[],uint256[])": { + "details": "See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length." + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "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. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC1155-isApprovedForAll}." + }, + "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "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. May emit a {RoleRevoked} event." + }, + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { + "details": "See {IERC1155-safeBatchTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,uint256,bytes)": { + "details": "See {IERC1155-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC1155-setApprovalForAll}." + }, + "uri(uint256)": { + "details": "See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\{id\\}` substring with the actual token type ID." + } + }, + "events": { + "ApprovalForAll(address,address,bool)": { + "details": "Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "TransferBatch(address,address,address,uint256[],uint256[])": { + "details": "Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all transfers." + }, + "TransferSingle(address,address,address,uint256,uint256)": { + "details": "Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`." + }, + "URI(string,uint256)": { + "details": "Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. If an {URI} event was emitted for `id`, the standard https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value returned by {IERC1155MetadataURI-uri}." + } + } + }, + "isFoundry": true, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"defaultAdmin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"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\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"burnBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"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\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mintBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"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\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"TransferBatch(address,address,address,uint256[],uint256[])\":{\"details\":\"Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all transfers.\"},\"TransferSingle(address,address,address,uint256,uint256)\":{\"details\":\"Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\"},\"URI(string,uint256)\":{\"details\":\"Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. If an {URI} event was emitted for `id`, the standard https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value returned by {IERC1155MetadataURI-uri}.\"}},\"kind\":\"dev\",\"methods\":{\"balanceOf(address,uint256)\":{\"details\":\"See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address.\"},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"uri(uint256)\":{\"details\":\"See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\\\{id\\\\}` substring with the actual token type ID.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mocks/token/MockERC1155.sol\":\"MockERC1155\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/script/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba8eb2d22f9321bd4660f6617c181d9611ff30a9b089408b8c6e2216d6d5cdc5\",\"dweb:/ipfs/QmTSJvhjHfnUV1j4hsqDv8PmLvGBLRs9gHLjTUXrUJ5Y9q\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://67d35750fb5ced798b82b8ab085eb5f71529b0d4f72152d182b5bebdc770b20d\",\"dweb:/ipfs/QmUqmyzRZxaLvSXig87HFZgiUxv9ivc2VqfAbxEw7rx32d\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd9c47a375639888e726a99da718890ba16d17d7ad9eacb0ccc892d46d1b3ee0\",\"dweb:/ipfs/Qmb41W5RUjy2sWg49A2rMnxekSeEk6SvGyJL5tyCCSr7un\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0e28648f994abf1d6bc345644a361cc0b7efa544f8bc0c8ec26011fed85a91ec\",\"dweb:/ipfs/QmVVE7AiRjKaQYYji7TkjmTeVzGpNmms5eoxqTCfvvpj6D\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0a5fc67f024fd2d261543c52a33a2a90b96d2ea1867829e8e12fe6b89b53aee1\",\"dweb:/ipfs/QmPc3ryH7Yv4FoY14CGbaXuQVQ7iu2yrxVAtmbGrN7bscf\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e46c80ea068989111d6103e5521223f9ef337e93de76deed8b03f75c6f7b2797\",\"dweb:/ipfs/QmNoSE6knNfFncdDDLTb3fGR6oSQty1srG96Vsx3E9wQdw\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://35c47bece3c03caaa07fab37dd2bb3413bfbca20db7bd9895024390e0a469487\",\"dweb:/ipfs/QmPGWT2x3QHcKxqe6gRmAkdakhbaRgx3DLzcakHz5M4eXG\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f2cf1c531122bc7ca96b8c8db6a60deae60441e5223065e792553d4849b5638\",\"dweb:/ipfs/QmPBdJmBBABMDCfyDjCbdxgiqRavgiSL88SYPGibgbPas9\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb0048dee081f6fffa5f74afc3fb328483c2a30504e94a0ddd2a5114d731ec4d\",\"dweb:/ipfs/QmZptt1nmYoA5SgjwnSgWqgUSDgm4q52Yos3xhnMv3MV43\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"src/mocks/token/MockERC1155.sol\":{\"keccak256\":\"0x79096c2f12b2a1918fb4f9f037344fdfe87eebe48debf58ef08447346e438a5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fd842989217721d8125af70a1667a825f3ffab9952f28477fea2090b848ba55f\",\"dweb:/ipfs/QmcvDKXUspukg19CGC7he1KKWh2efNxTMQuk41MfmAQeHR\"]}},\"version\":1}", + "nonce": 104, + "numDeployments": 1, + "storageLayout": { + "storage": [ + { + "astId": 96748, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))" + }, + { + "astId": 96754, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_operatorApprovals", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 96756, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_uri", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 95370, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_roles", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_bytes32,t_struct(RoleData)95365_storage)" + }, + { + "astId": 138354, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_name", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 138356, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "_symbol", + "offset": 0, + "slot": "5", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "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_struct(RoleData)95365_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)95365_storage" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(RoleData)95365_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", + "members": [ + { + "astId": 95362, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 95364, + "contract": "src/mocks/token/MockERC1155.sol:MockERC1155", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1718248356, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol b/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol new file mode 100644 index 00000000..cd8bc7ab --- /dev/null +++ b/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol @@ -0,0 +1,45 @@ +pragma solidity ^0.8.19; + +import { MockERC1155 } from "@ronin/contracts/mocks/token/MockERC1155.sol"; +import { MockERC1155Deploy } from "../contracts/token/MockERC1155Deploy.s.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; +import { Network } from "../utils/Network.sol"; + +contract Migration__Deploy_MockERC1155_Testnet is Migration { + bytes32 public MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public BURNER_ROLE = keccak256("BURNER_ROLE"); + + address public GatewayV3 = 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca; + + address public defaultAdmin = 0xEf46169CD1e954aB10D5e4C280737D9b92d0a936; + address public testnetAdmin = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; + + MockERC1155 private _mockErc1155; + + function run() public virtual returns (MockERC1155) { + if (network() == Network.Sepolia.key()) { + GatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + } + _mockErc1155 = new MockERC1155Deploy().run(); + _grantRoleAndMint(); + } + + function _grantRoleAndMint() internal { + vm.startBroadcast(defaultAdmin); + + _mockErc1155.grantRole(MINTER_ROLE, defaultAdmin); + _mockErc1155.grantRole(MINTER_ROLE, GatewayV3); + _mockErc1155.grantRole(MINTER_ROLE, testnetAdmin); + + _mockErc1155.grantRole(BURNER_ROLE, GatewayV3); + _mockErc1155.grantRole(BURNER_ROLE, testnetAdmin); + + _mockErc1155.mint(testnetAdmin, 0, 100, ""); + + _mockErc1155.grantRole(0x00, testnetAdmin); + + vm.stopBroadcast(); + } +} diff --git a/src/mocks/MockERC721.sol b/src/mocks/MockERC721.sol new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/mocks/MockERC721.sol @@ -0,0 +1 @@ + From 16a4f36b13bc5c729ae1dae94018adfce85a2a14 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Thu, 13 Jun 2024 11:34:19 +0700 Subject: [PATCH 203/305] rm unnecessary files --- .../20240612_GrantRoleAndMintMockERC1155.sol | 58 ------------------- script/contracts/MockERC1155Deploy.s.sol | 19 ------ 2 files changed, 77 deletions(-) delete mode 100644 script/20240612-grantRoleAndMint-mockErc1155/20240612_GrantRoleAndMintMockERC1155.sol delete mode 100644 script/contracts/MockERC1155Deploy.s.sol diff --git a/script/20240612-grantRoleAndMint-mockErc1155/20240612_GrantRoleAndMintMockERC1155.sol b/script/20240612-grantRoleAndMint-mockErc1155/20240612_GrantRoleAndMintMockERC1155.sol deleted file mode 100644 index 299dc5c5..00000000 --- a/script/20240612-grantRoleAndMint-mockErc1155/20240612_GrantRoleAndMintMockERC1155.sol +++ /dev/null @@ -1,58 +0,0 @@ -pragma solidity ^0.8.19; - -import { MockERC1155 } from "@ronin/contracts/mocks/token/MockERC1155.sol"; - -import { Contract } from "../utils/Contract.sol"; -import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import { Migration } from "../Migration.s.sol"; - -contract MockERC1155_GrantRoleAndMint is Migration { - bytes32 public MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public BURNER_ROLE = keccak256("BURNER_ROLE"); - - address public MainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; - address public RoninGatewayV3 = 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca; - - address public mockErc1155SepoliaAddress = 0xb40979a3FB2f76F640dcad2a6DF1264f62b7A6da; - address public mockErc1155RoninAddress = 0x2B13110C6e3e2Cb1EFbA47897b65cFbf71f806d2; - address public testnetAdmin = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; - - MockERC1155 private _mockErc1155; - - function run() public virtual returns (MockERC1155) { - _grantRoleAndMintSepolia(); - _grantRoleAndMintRonin(); - } - - function _grantRoleAndMintSepolia() internal { - _mockErc1155 = MockERC1155(mockErc1155SepoliaAddress); - - vm.startBroadcast(testnetAdmin); - - _mockErc1155.grantRole(MINTER_ROLE, MainchainGatewayV3); - _mockErc1155.grantRole(MINTER_ROLE, testnetAdmin); - - _mockErc1155.grantRole(BURNER_ROLE, MainchainGatewayV3); - _mockErc1155.grantRole(BURNER_ROLE, testnetAdmin); - - _mockErc1155.mint(testnetAdmin, 0, 100, ""); - - vm.stopBroadcast(); - } - - function _grantRoleAndMintRonin() internal { - _mockErc1155 = MockERC1155(mockErc1155RoninAddress); - - vm.startBroadcast(testnetAdmin); - - _mockErc1155.grantRole(MINTER_ROLE, RoninGatewayV3); - _mockErc1155.grantRole(MINTER_ROLE, testnetAdmin); - - _mockErc1155.grantRole(BURNER_ROLE, RoninGatewayV3); - _mockErc1155.grantRole(BURNER_ROLE, testnetAdmin); - - _mockErc1155.mint(testnetAdmin, 0, 100, ""); - - vm.stopBroadcast(); - } -} diff --git a/script/contracts/MockERC1155Deploy.s.sol b/script/contracts/MockERC1155Deploy.s.sol deleted file mode 100644 index 84824f5f..00000000 --- a/script/contracts/MockERC1155Deploy.s.sol +++ /dev/null @@ -1,19 +0,0 @@ -pragma solidity ^0.8.19; - -import { MockERC1155 } from "@ronin/contracts/mocks/token/MockERC1155.sol"; - -import { Contract } from "../utils/Contract.sol"; -import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import { Migration } from "../Migration.s.sol"; - -contract MockERC1155Deploy is Migration { - function _defaultArguments() internal virtual override returns (bytes memory args) { - ISharedArgument.MockERC1155Param memory param = config.sharedArguments().mockErc1155; - - args = abi.encode(param.defaultAdmin, param.uri, param.name, param.symbol); - } - - function run() public virtual returns (MockERC1155) { - return MockERC1155(_deployImmutable(Contract.MockERC1155.key())); - } -} From 55df959a65ea13984e5793f8cd4dae33945ced4a Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Thu, 13 Jun 2024 14:30:35 +0700 Subject: [PATCH 204/305] chore: rename contract --- .../token/RoninMockERC1155Deploy.s.sol | 19 +++++++ src/mocks/token/RoninMockERC1155.sol | 57 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 script/contracts/token/RoninMockERC1155Deploy.s.sol create mode 100644 src/mocks/token/RoninMockERC1155.sol diff --git a/script/contracts/token/RoninMockERC1155Deploy.s.sol b/script/contracts/token/RoninMockERC1155Deploy.s.sol new file mode 100644 index 00000000..3e778584 --- /dev/null +++ b/script/contracts/token/RoninMockERC1155Deploy.s.sol @@ -0,0 +1,19 @@ +pragma solidity ^0.8.19; + +import { RoninMockERC1155 } from "@ronin/contracts/mocks/token/RoninMockERC1155.sol"; + +import { Contract } from "../../utils/Contract.sol"; +import { ISharedArgument } from "../../interfaces/ISharedArgument.sol"; +import { Migration } from "../../Migration.s.sol"; + +contract RoninMockERC1155Deploy is Migration { + function _defaultArguments() internal virtual override returns (bytes memory args) { + ISharedArgument.RoninMockERC1155Param memory param = config.sharedArguments().mockErc1155; + + args = abi.encode(param.defaultAdmin, param.uri, param.name, param.symbol); + } + + function run() public virtual returns (RoninMockERC1155) { + return RoninMockERC1155(_deployImmutable(Contract.RoninMockERC1155.key())); + } +} diff --git a/src/mocks/token/RoninMockERC1155.sol b/src/mocks/token/RoninMockERC1155.sol new file mode 100644 index 00000000..1d0525c0 --- /dev/null +++ b/src/mocks/token/RoninMockERC1155.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; +import "@openzeppelin/contracts/access/AccessControl.sol"; + +contract RoninMockERC1155 is ERC1155Burnable, AccessControl { + // Token name + string internal _name; + // Token symbol + string internal _symbol; + + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); + + constructor(address defaultAdmin, string memory uri, string memory name, string memory symbol) ERC1155(uri) { + _name = name; + _symbol = symbol; + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin); + } + + function mint(address account, uint256 id, uint256 amount, bytes memory data) public onlyRole(MINTER_ROLE) { + _mint(account, id, amount, data); + } + + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) + public + onlyRole(MINTER_ROLE) + { + _mintBatch(to, ids, amounts, data); + } + + function burn(address from, uint256 id, uint256 value) public override onlyRole(BURNER_ROLE) { + _burn(from, id, value); + } + + function burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) + public + override + onlyRole(BURNER_ROLE) + { + _burnBatch(from, ids, amounts); + } + + function name() public view returns (string memory) { + return _name; + } + + function symbol() public view returns (string memory) { + return _symbol; + } + + function supportsInterface(bytes4 interfaceId) public view override(ERC1155, AccessControl) returns (bool) { + return ERC1155.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId); + } +} From 0365fd576f963aa68bf1731ddc5d7f6d2e37a852 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Thu, 13 Jun 2024 14:37:00 +0700 Subject: [PATCH 205/305] chore: fix naming + param --- .../20240612-deploy-MockERC1155-testnet.sol | 14 +++++++------- script/contracts/token/MockERC1155Deploy.s.sol | 2 +- src/mocks/token/RoninMockERC1155.sol | 11 ++--------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol b/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol index cd8bc7ab..f1154379 100644 --- a/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol +++ b/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol @@ -1,13 +1,13 @@ pragma solidity ^0.8.19; -import { MockERC1155 } from "@ronin/contracts/mocks/token/MockERC1155.sol"; -import { MockERC1155Deploy } from "../contracts/token/MockERC1155Deploy.s.sol"; +import { RoninMockERC1155 } from "@ronin/contracts/mocks/token/RoninMockERC1155.sol"; +import { RoninMockERC1155Deploy } from "../contracts/token/RoninMockERC1155Deploy.s.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import { Migration } from "../Migration.s.sol"; import { Network } from "../utils/Network.sol"; -contract Migration__Deploy_MockERC1155_Testnet is Migration { +contract Migration__Deploy_RoninMockERC1155_Testnet is Migration { bytes32 public MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public BURNER_ROLE = keccak256("BURNER_ROLE"); @@ -16,13 +16,13 @@ contract Migration__Deploy_MockERC1155_Testnet is Migration { address public defaultAdmin = 0xEf46169CD1e954aB10D5e4C280737D9b92d0a936; address public testnetAdmin = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; - MockERC1155 private _mockErc1155; + RoninMockERC1155 private _mockErc1155; - function run() public virtual returns (MockERC1155) { - if (network() == Network.Sepolia.key()) { + function run() public virtual returns (RoninMockERC1155) { + if (network() == Network.Sepolia.key()) { GatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; } - _mockErc1155 = new MockERC1155Deploy().run(); + _mockErc1155 = new RoninMockERC1155Deploy().run(); _grantRoleAndMint(); } diff --git a/script/contracts/token/MockERC1155Deploy.s.sol b/script/contracts/token/MockERC1155Deploy.s.sol index bcbe4bf7..ec82026f 100644 --- a/script/contracts/token/MockERC1155Deploy.s.sol +++ b/script/contracts/token/MockERC1155Deploy.s.sol @@ -10,7 +10,7 @@ contract MockERC1155Deploy is Migration { function _defaultArguments() internal virtual override returns (bytes memory args) { ISharedArgument.MockERC1155Param memory param = config.sharedArguments().mockErc1155; - args = abi.encode(param.defaultAdmin, param.uri, param.name, param.symbol); + args = abi.encode(param.uri); } function run() public virtual returns (MockERC1155) { diff --git a/src/mocks/token/RoninMockERC1155.sol b/src/mocks/token/RoninMockERC1155.sol index 1d0525c0..e2591bbf 100644 --- a/src/mocks/token/RoninMockERC1155.sol +++ b/src/mocks/token/RoninMockERC1155.sol @@ -24,10 +24,7 @@ contract RoninMockERC1155 is ERC1155Burnable, AccessControl { _mint(account, id, amount, data); } - function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) - public - onlyRole(MINTER_ROLE) - { + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyRole(MINTER_ROLE) { _mintBatch(to, ids, amounts, data); } @@ -35,11 +32,7 @@ contract RoninMockERC1155 is ERC1155Burnable, AccessControl { _burn(from, id, value); } - function burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) - public - override - onlyRole(BURNER_ROLE) - { + function burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) public override onlyRole(BURNER_ROLE) { _burnBatch(from, ids, amounts); } From 45df3fc9a6f42d960785800cce8993a17b8c2e3a Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Thu, 13 Jun 2024 14:39:51 +0700 Subject: [PATCH 206/305] rm unnecessary files --- src/mocks/MockERC721.sol | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/mocks/MockERC721.sol diff --git a/src/mocks/MockERC721.sol b/src/mocks/MockERC721.sol deleted file mode 100644 index 8b137891..00000000 --- a/src/mocks/MockERC721.sol +++ /dev/null @@ -1 +0,0 @@ - From aa7c969f3ea5923019691f2dc3fc78aa00a476b4 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Thu, 13 Jun 2024 14:57:46 +0700 Subject: [PATCH 207/305] chore: add RoninMockERC1155 param --- .../20240612-deploy-MockERC1155-testnet.sol | 2 +- script/contracts/token/RoninMockERC1155Deploy.s.sol | 2 +- script/interfaces/ISharedArgument.sol | 8 ++++++++ script/utils/Contract.sol | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol b/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol index f1154379..7bebae4c 100644 --- a/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol +++ b/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol @@ -42,4 +42,4 @@ contract Migration__Deploy_RoninMockERC1155_Testnet is Migration { vm.stopBroadcast(); } -} +} \ No newline at end of file diff --git a/script/contracts/token/RoninMockERC1155Deploy.s.sol b/script/contracts/token/RoninMockERC1155Deploy.s.sol index 3e778584..c498d9d6 100644 --- a/script/contracts/token/RoninMockERC1155Deploy.s.sol +++ b/script/contracts/token/RoninMockERC1155Deploy.s.sol @@ -8,7 +8,7 @@ import { Migration } from "../../Migration.s.sol"; contract RoninMockERC1155Deploy is Migration { function _defaultArguments() internal virtual override returns (bytes memory args) { - ISharedArgument.RoninMockERC1155Param memory param = config.sharedArguments().mockErc1155; + ISharedArgument.RoninMockERC1155Param memory param = config.sharedArguments().roninMockErc1155; args = abi.encode(param.defaultAdmin, param.uri, param.name, param.symbol); } diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index 3aa2022c..069d78cc 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -103,6 +103,13 @@ interface ISharedArgument is IGeneralConfigExtended { string uri; } + struct RoninMockERC1155Param { + address defaultAdmin; + string uri; + string name; + string symbol; + } + struct UnitTestParam { address proxyAdmin; uint256 numberOfBlocksInEpoch; @@ -137,6 +144,7 @@ interface ISharedArgument is IGeneralConfigExtended { MockERC20Param usdc; MockERC721Param mockErc721; MockERC1155Param mockErc1155; + RoninMockERC1155Param roninMockErc1155; UnitTestParam test; } diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index e943ea15..8dec24a7 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -11,6 +11,7 @@ enum Contract { USDC, MockERC721, MockERC1155, + RoninMockERC1155, BridgeTracking, BridgeSlash, BridgeReward, From aa85ae196f9aa64d0822a60f9ee5c78cd748595b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 14 Jun 2024 14:48:57 +0700 Subject: [PATCH 208/305] script for mapping erc1155 --- .../20240613-maptoken-erc1155-ronin.s.sol | 100 +++++++++++++++ .../20240613-maptoken-erc1155-sepolia.s.sol | 118 ++++++++++++++++++ 2 files changed, 218 insertions(+) create mode 100644 script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol create mode 100644 script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol new file mode 100644 index 00000000..fa257429 --- /dev/null +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; +import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; + +import "../Migration.s.sol"; + +contract Migration__20240613_MapERC1155SepoliaRoninchain is Migration { + RoninBridgeManager internal _roninBridgeManager; + IRoninGatewayV3 internal _roninGatewayV3; + + MainchainBridgeAdminUtils _mainchainProposalUtils; + + function setUp() public override { + super.setUp(); + + _roninBridgeManager = RoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); + _roninGatewayV3 = IRoninGatewayV3(0xCee681C9108c42C710c6A8A949307D5F13C9F3ca); + } + + function run() public { + address[] memory mainchainTokens = new address[](1); + address[] memory roninTokens = new address[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + uint256[] memory chainIds = new uint256[](1); + uint256[][4] memory thresholds; + thresholds[0] = new uint256[](1); + thresholds[1] = new uint256[](1); + thresholds[2] = new uint256[](1); + thresholds[3] = new uint256[](1); + + uint256 expiredTime = block.timestamp + 10 days; + address[] memory targets = new address[](1); + uint256[] memory values = new uint256[](1); + bytes[] memory calldatas = new bytes[](1); + uint256[] memory gasAmounts = new uint256[](1); + + mainchainTokens[0] = address(0xFBb71EEE2B420ea88e663B91722b41966E1C5F17); + roninTokens[0] = address(0xDBB04B4BdBb385EB14cb3ea3C7B1FCcA55ea9160); + standards[0] = TokenStandard.ERC1155; + chainIds[0] = 11155111; + + // ================ USDC ERC-20 ====================== + // function mapTokens( + // address[] calldata _roninTokens, + // address[] calldata _mainchainTokens, + // uint256[] calldata chainIds, + // TokenStandard[] calldata _standards + // ) + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[0] = address(_roninGatewayV3); + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + // ================ VERIFY AND EXECUTE PROPOSAL =============== + + address[] memory governors = new address[](4); + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + vm.broadcast(governors[0]); + _roninBridgeManager.proposeProposalForCurrentNetwork(expiredTime, address(0), targets, values, calldatas, gasAmounts, Ballot.VoteType.For); + + uint nonce = 1; + for (uint i = 1; i <= 2; ++i) { + vm.broadcast(governors[i]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(Proposal.ProposalDetail({ + nonce: nonce, + chainId: 2021, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }), Ballot.VoteType.For); + } + } +} diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol new file mode 100644 index 00000000..50d8c60a --- /dev/null +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; +import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; + +import "../Migration.s.sol"; + +contract Migration__20240613_MapERC1155SepoliaMainchain is Migration { + address internal _mainchainPauseEnforcer; + address internal _mainchainGatewayV3; + address internal _mainchainBridgeManager; + + MainchainBridgeAdminUtils _mainchainProposalUtils; + + function setUp() public override { + super.setUp(); + + _mainchainPauseEnforcer = 0x61eC0ebf966AE84C414BDA715E17CeF657e039DF; + _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; + } + + function run() public { + address[] memory mainchainTokens = new address[](1); + address[] memory roninTokens = new address[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + uint256[][4] memory thresholds; + thresholds[0] = new uint256[](1); + thresholds[1] = new uint256[](1); + thresholds[2] = new uint256[](1); + thresholds[3] = new uint256[](1); + + uint256 expiredTime = block.timestamp + 10 days; + address[] memory targets = new address[](1); + uint256[] memory values = new uint256[](1); + bytes[] memory calldatas = new bytes[](1); + uint256[] memory gasAmounts = new uint256[](1); + + // ================ USDC ERC-20 ====================== + + mainchainTokens[0] = address(0xFBb71EEE2B420ea88e663B91722b41966E1C5F17); + roninTokens[0] = address(0xDBB04B4BdBb385EB14cb3ea3C7B1FCcA55ea9160); + standards[0] = TokenStandard.ERC1155; + thresholds[0][0] = 0; + thresholds[1][0] = 0; + thresholds[2][0] = 0; + thresholds[3][0] = 0; + + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); + + vm.prank(_mainchainBridgeManager); + address(_mainchainGatewayV3).call(abi.encodeWithSignature("functionDelegateCall(bytes)", innerData)); + + // return; + + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[0] = _mainchainGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + // ================ VERIFY AND EXECUTE PROPOSAL =============== + + uint256[] memory governorPKs = new uint256[](4); + governorPKs[3] = 0x00; + governorPKs[2] = 0x00; + governorPKs[0] = 0x00; + governorPKs[1] = 0x00; + + address[] memory governors = new address[](4); + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0]); + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); + supports_[0] = Ballot.VoteType.For; + supports_[1] = Ballot.VoteType.For; + supports_[2] = Ballot.VoteType.For; + supports_[3] = Ballot.VoteType.For; + + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, governorPKs); + + vm.broadcast(governors[0]); + // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{gas: 2_000_000}(proposal, supports_, signatures); + } +} From cebc4d9e8ac3d3c664ec1def00cd1f7cd0087641 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 19 Jun 2024 23:11:35 +0700 Subject: [PATCH 209/305] feat: add batch function --- src/interfaces/IMainchainGatewayV3.sol | 5 +++++ src/mainchain/MainchainGatewayV3.sol | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/interfaces/IMainchainGatewayV3.sol b/src/interfaces/IMainchainGatewayV3.sol index 8ac6d6d1..6f78210a 100644 --- a/src/interfaces/IMainchainGatewayV3.sol +++ b/src/interfaces/IMainchainGatewayV3.sol @@ -76,6 +76,11 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { */ function requestDepositFor(Transfer.Request calldata _request) external payable; + /** + * @dev Locks the assets and request deposit for batch. + */ + function requestDepositForBatch(Transfer.RequestBatch calldata requests) external payable; + /** * @dev Withdraws based on the receipt and the validator signatures. * Returns whether the withdrawal is locked. diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 22cb4d9e..97ae1319 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -156,6 +156,16 @@ contract MainchainGatewayV3 is _requestDepositFor(_request, msg.sender); } + /** + * @inheritdoc IMainchainGatewayV3 + */ + function requestDepositForBatch(Transfer.Request[] calldata _requests) external payable virtual whenNotPaused { + uint length = _requests.length; + for (uint256 i; i < length; i++) { + _requestDepositFor(_requests[i], msg.sender); + } + } + /** * @inheritdoc IMainchainGatewayV3 */ From a5f83dc39d848218280904e5c23d911fa4cf7297 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 19 Jun 2024 23:18:32 +0700 Subject: [PATCH 210/305] chore: init script --- .../20240619-operators-key.s.sol | 13 + ...0240619-p3-upgrade-bridge-main-chain.s.sol | 261 ++++++++++++++++++ 2 files changed, 274 insertions(+) create mode 100644 script/20240619-upgrade-sepolia/20240619-operators-key.s.sol create mode 100644 script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol diff --git a/script/20240619-upgrade-sepolia/20240619-operators-key.s.sol b/script/20240619-upgrade-sepolia/20240619-operators-key.s.sol new file mode 100644 index 00000000..11c2f3fd --- /dev/null +++ b/script/20240619-upgrade-sepolia/20240619-operators-key.s.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__20240619_GovernorsKey { + function _loadGovernorPKs() internal pure returns (uint256[] memory res) { + res = new uint256[](4); + + res[0] = 0x00; + res[1] = 0x00; + res[2] = 0x00; + res[3] = 0x00; + } +} diff --git a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol new file mode 100644 index 00000000..96cc33e9 --- /dev/null +++ b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol @@ -0,0 +1,261 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; +import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; + +import "./20240619-operators-key.s.sol"; +import "../Migration.s.sol"; + +contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__20240619_GovernorsKey { + MainchainBridgeManager _currMainchainBridgeManager; + MainchainBridgeManager _newMainchainBridgeManager; + + address private _governor; + address[] private _voters; + + address TESTNET_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; + + function setUp() public virtual override { + super.setUp(); + } + + function run() public virtual onlyOn(Network.Sepolia.key()) { + CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); + + _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + + _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); + _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); + _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); + + _changeTempAdmin(); + _deployMainchainBridgeManager(); + _upgradeBridgeMainchain(); + } + + function _changeTempAdmin() internal { + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); + address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + address(mainchainGatewayV3Proxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + vm.stopBroadcast(); + } + + function _deployMainchainBridgeManager() internal returns (address mainchainBM) { + ISharedArgument.SharedParameter memory param; + + param.mainchainBridgeManager.num = 7; + param.mainchainBridgeManager.denom = 10; + param.mainchainBridgeManager.roninChainId = 2021; + param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.bridgeOperators = new address[](4); + param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; + param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; + param.mainchainBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; + param.mainchainBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; + + param.mainchainBridgeManager.governors = new address[](4); + param.mainchainBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + param.mainchainBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + param.mainchainBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + param.mainchainBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + param.mainchainBridgeManager.voteWeights = new uint96[](4); + param.mainchainBridgeManager.voteWeights[0] = 100; + param.mainchainBridgeManager.voteWeights[1] = 100; + param.mainchainBridgeManager.voteWeights[2] = 100; + param.mainchainBridgeManager.voteWeights[3] = 100; + + param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); + param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; + + param.mainchainBridgeManager.targets = new address[](2); + param.mainchainBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + + _newMainchainBridgeManager = MainchainBridgeManager( + new MainchainBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + _newMainchainBridgeManager.initialize, + ( + param.mainchainBridgeManager.num, + param.mainchainBridgeManager.denom, + param.mainchainBridgeManager.roninChainId, + param.mainchainBridgeManager.bridgeContract, + new address[](0), + param.mainchainBridgeManager.bridgeOperators, + param.mainchainBridgeManager.governors, + param.mainchainBridgeManager.voteWeights, + param.mainchainBridgeManager.targetOptions, + param.mainchainBridgeManager.targets + ) + ) + ).run() + ); + + address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); + vm.broadcast(proxyAdmin); + TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); + } + + function _upgradeBridgeMainchain() internal { + address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); + address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); + + address pauseEnforcerLogic = _deployLogic(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); + + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + ISharedArgument.SharedParameter memory param; + param.mainchainBridgeManager.callbackRegisters = new address[](1); + param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + uint256 expiredTime = block.timestamp + 14 days; + uint N = 7; + address[] memory targets = new address[](N); + uint256[] memory values = new uint256[](N); + bytes[] memory calldatas = new bytes[](N); + uint256[] memory gasAmounts = new uint256[](N); + + targets[0] = mainchainGatewayV3Proxy; + targets[1] = mainchainGatewayV3Proxy; + targets[2] = mainchainGatewayV3Proxy; + targets[3] = pauseEnforcerProxy; + targets[4] = pauseEnforcerProxy; + targets[5] = address(_newMainchainBridgeManager); + targets[6] = address(_newMainchainBridgeManager); + + calldatas[0] = abi.encodeWithSignature( + "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) + ); + calldatas[1] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); + calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[5] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters)) + ); + calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + + for (uint i; i < N; ++i) { + gasAmounts[i] = 1_000_000; + } + + LegacyProposalDetail memory proposal; + proposal.nonce = _currMainchainBridgeManager.round(block.chainid) + 1; + proposal.chainId = block.chainid; + proposal.expiryTimestamp = expiredTime; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + uint V = _voters.length + 1; + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](V); + for (uint i; i < V; ++i) { + supports_[i] = Ballot.VoteType.For; + } + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); + + vm.broadcast(_governor); + address(_currMainchainBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( + abi.encodeWithSignature( + "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures + ) + ); + } + + function getDomain() public pure returns (bytes32) { + return keccak256( + abi.encode( + keccak256("EIP712Domain(string name,string version,bytes32 salt)"), + keccak256("BridgeAdmin"), // name hash + keccak256("2"), // version hash + keccak256(abi.encode("BRIDGE_ADMIN", 2021)) // salt + ) + ); + } + + function _generateSignaturesFor( + bytes32 domain, + bytes32 proposalHash, + uint256[] memory signerPKs, + Ballot.VoteType support + ) public view returns (SignatureConsumer.Signature[] memory sigs) { + sigs = new SignatureConsumer.Signature[](signerPKs.length); + + for (uint256 i; i < signerPKs.length; i++) { + bytes32 digest = ECDSA.toTypedDataHash(domain, Ballot.hash(proposalHash, support)); + sigs[i] = _sign(signerPKs[i], digest); + } + } + + function _sign(uint256 pk, bytes32 digest) internal pure returns (SignatureConsumer.Signature memory sig) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); + sig.v = v; + sig.r = r; + sig.s = s; + } + + function hashLegacyProposal(LegacyProposalDetail memory proposal) public pure returns (bytes32 digest_) { + bytes32 TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a; + + uint256[] memory values = proposal.values; + address[] memory targets = proposal.targets; + bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length); + uint256[] memory gasAmounts = proposal.gasAmounts; + + for (uint256 i; i < calldataHashList.length; ++i) { + calldataHashList[i] = keccak256(proposal.calldatas[i]); + } + + assembly { + let ptr := mload(0x40) + mstore(ptr, TYPE_HASH) + mstore(add(ptr, 0x20), mload(proposal)) // _proposal.nonce + mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // _proposal.chainId + mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // expiry timestamp + + let arrayHashed + arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash + mstore(add(ptr, 0x80), arrayHashed) + arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // _valuesHash + mstore(add(ptr, 0xa0), arrayHashed) + arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // _calldatasHash + mstore(add(ptr, 0xc0), arrayHashed) + arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // _gasAmountsHash + mstore(add(ptr, 0xe0), arrayHashed) + digest_ := keccak256(ptr, 0x100) + } + } +} From e35d1f3d7be0b15e4fd3e4c9375733b3c5ff9a08 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 19 Jun 2024 23:44:35 +0700 Subject: [PATCH 211/305] fix: interface and script --- ...0240619-p3-upgrade-bridge-main-chain.s.sol | 232 +++--------------- src/interfaces/IMainchainGatewayV3.sol | 2 +- 2 files changed, 41 insertions(+), 193 deletions(-) diff --git a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol index 96cc33e9..65f24c2c 100644 --- a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol @@ -24,12 +24,13 @@ import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtil import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; +import "../20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol"; import "./20240619-operators-key.s.sol"; import "../Migration.s.sol"; contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__20240619_GovernorsKey { - MainchainBridgeManager _currMainchainBridgeManager; - MainchainBridgeManager _newMainchainBridgeManager; + MainchainBridgeManager _mainchainBridgeManager; + MainchainBridgeAdminUtils _mainchainProposalUtils; address private _governor; address[] private _voters; @@ -43,95 +44,18 @@ contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__ function run() public virtual onlyOn(Network.Sepolia.key()) { CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); - _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + _mainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); - _changeTempAdmin(); - _deployMainchainBridgeManager(); _upgradeBridgeMainchain(); } - function _changeTempAdmin() internal { - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - - vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); - address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); - address(mainchainGatewayV3Proxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); - vm.stopBroadcast(); - } - - function _deployMainchainBridgeManager() internal returns (address mainchainBM) { - ISharedArgument.SharedParameter memory param; - - param.mainchainBridgeManager.num = 7; - param.mainchainBridgeManager.denom = 10; - param.mainchainBridgeManager.roninChainId = 2021; - param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - param.mainchainBridgeManager.bridgeOperators = new address[](4); - param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; - param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; - param.mainchainBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; - param.mainchainBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; - - param.mainchainBridgeManager.governors = new address[](4); - param.mainchainBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - param.mainchainBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - param.mainchainBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - param.mainchainBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - - param.mainchainBridgeManager.voteWeights = new uint96[](4); - param.mainchainBridgeManager.voteWeights[0] = 100; - param.mainchainBridgeManager.voteWeights[1] = 100; - param.mainchainBridgeManager.voteWeights[2] = 100; - param.mainchainBridgeManager.voteWeights[3] = 100; - - param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); - param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; - param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; - - param.mainchainBridgeManager.targets = new address[](2); - param.mainchainBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - param.mainchainBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - - _newMainchainBridgeManager = MainchainBridgeManager( - new MainchainBridgeManagerDeploy().overrideArgs( - abi.encodeCall( - _newMainchainBridgeManager.initialize, - ( - param.mainchainBridgeManager.num, - param.mainchainBridgeManager.denom, - param.mainchainBridgeManager.roninChainId, - param.mainchainBridgeManager.bridgeContract, - new address[](0), - param.mainchainBridgeManager.bridgeOperators, - param.mainchainBridgeManager.governors, - param.mainchainBridgeManager.voteWeights, - param.mainchainBridgeManager.targetOptions, - param.mainchainBridgeManager.targets - ) - ) - ).run() - ); - - address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); - vm.broadcast(proxyAdmin); - TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); - } - function _upgradeBridgeMainchain() internal { - address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); - address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); - - address pauseEnforcerLogic = _deployLogic(Contract.MainchainPauseEnforcer.key()); address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); - - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); ISharedArgument.SharedParameter memory param; @@ -139,123 +63,47 @@ contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; - uint N = 7; + uint N = 1; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); uint256[] memory gasAmounts = new uint256[](N); targets[0] = mainchainGatewayV3Proxy; - targets[1] = mainchainGatewayV3Proxy; - targets[2] = mainchainGatewayV3Proxy; - targets[3] = pauseEnforcerProxy; - targets[4] = pauseEnforcerProxy; - targets[5] = address(_newMainchainBridgeManager); - targets[6] = address(_newMainchainBridgeManager); - - calldatas[0] = abi.encodeWithSignature( - "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) - ); - calldatas[1] = - abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); - calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); - calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); - calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); - calldatas[5] = abi.encodeWithSignature( - "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters)) - ); - calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); - - for (uint i; i < N; ++i) { - gasAmounts[i] = 1_000_000; - } - - LegacyProposalDetail memory proposal; - proposal.nonce = _currMainchainBridgeManager.round(block.chainid) + 1; - proposal.chainId = block.chainid; - proposal.expiryTimestamp = expiredTime; - proposal.targets = targets; - proposal.values = values; - proposal.calldatas = calldatas; - proposal.gasAmounts = gasAmounts; - - uint V = _voters.length + 1; - Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](V); - for (uint i; i < V; ++i) { - supports_[i] = Ballot.VoteType.For; - } - - SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); - - vm.broadcast(_governor); - address(_currMainchainBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( - abi.encodeWithSignature( - "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures - ) - ); - } - - function getDomain() public pure returns (bytes32) { - return keccak256( - abi.encode( - keccak256("EIP712Domain(string name,string version,bytes32 salt)"), - keccak256("BridgeAdmin"), // name hash - keccak256("2"), // version hash - keccak256(abi.encode("BRIDGE_ADMIN", 2021)) // salt - ) - ); - } - - function _generateSignaturesFor( - bytes32 domain, - bytes32 proposalHash, - uint256[] memory signerPKs, - Ballot.VoteType support - ) public view returns (SignatureConsumer.Signature[] memory sigs) { - sigs = new SignatureConsumer.Signature[](signerPKs.length); - - for (uint256 i; i < signerPKs.length; i++) { - bytes32 digest = ECDSA.toTypedDataHash(domain, Ballot.hash(proposalHash, support)); - sigs[i] = _sign(signerPKs[i], digest); - } - } - - function _sign(uint256 pk, bytes32 digest) internal pure returns (SignatureConsumer.Signature memory sig) { - (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); - sig.v = v; - sig.r = r; - sig.s = s; - } - - function hashLegacyProposal(LegacyProposalDetail memory proposal) public pure returns (bytes32 digest_) { - bytes32 TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a; - - uint256[] memory values = proposal.values; - address[] memory targets = proposal.targets; - bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length); - uint256[] memory gasAmounts = proposal.gasAmounts; - - for (uint256 i; i < calldataHashList.length; ++i) { - calldataHashList[i] = keccak256(proposal.calldatas[i]); - } - - assembly { - let ptr := mload(0x40) - mstore(ptr, TYPE_HASH) - mstore(add(ptr, 0x20), mload(proposal)) // _proposal.nonce - mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // _proposal.chainId - mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // expiry timestamp - - let arrayHashed - arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash - mstore(add(ptr, 0x80), arrayHashed) - arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // _valuesHash - mstore(add(ptr, 0xa0), arrayHashed) - arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // _calldatasHash - mstore(add(ptr, 0xc0), arrayHashed) - arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // _gasAmountsHash - mstore(add(ptr, 0xe0), arrayHashed) - digest_ := keccak256(ptr, 0x100) - } + calldatas[0] = abi.encodeWithSignature("upgradeTo(address)", mainchainGatewayV3Logic); + gasAmounts[0] = 1_000_000; + + // ================ VERIFY AND EXECUTE PROPOSAL =============== + + address[] memory governors = new address[](4); + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _loadGovernorPKs(), MainchainBridgeManager(_mainchainBridgeManager), governors[0]); + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: MainchainBridgeManager(_mainchainBridgeManager).round(block.chainid) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); + supports_[0] = Ballot.VoteType.For; + supports_[1] = Ballot.VoteType.For; + supports_[2] = Ballot.VoteType.For; + supports_[3] = Ballot.VoteType.For; + + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, _loadGovernorPKs()); + + vm.broadcast(governors[0]); + // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{gas: 2_000_000}(proposal, supports_, signatures); } } diff --git a/src/interfaces/IMainchainGatewayV3.sol b/src/interfaces/IMainchainGatewayV3.sol index 6f78210a..9af9600b 100644 --- a/src/interfaces/IMainchainGatewayV3.sol +++ b/src/interfaces/IMainchainGatewayV3.sol @@ -79,7 +79,7 @@ interface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer { /** * @dev Locks the assets and request deposit for batch. */ - function requestDepositForBatch(Transfer.RequestBatch calldata requests) external payable; + function requestDepositForBatch(Transfer.Request[] calldata requests) external payable; /** * @dev Withdraws based on the receipt and the validator signatures. From 8c76b8f614b16bca6fb4a88673f54bdb86ccae93 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 20 Jun 2024 14:29:51 +0700 Subject: [PATCH 212/305] fix: `++i` --- src/mainchain/MainchainGatewayV3.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainchain/MainchainGatewayV3.sol b/src/mainchain/MainchainGatewayV3.sol index 97ae1319..a07d1b93 100644 --- a/src/mainchain/MainchainGatewayV3.sol +++ b/src/mainchain/MainchainGatewayV3.sol @@ -161,7 +161,7 @@ contract MainchainGatewayV3 is */ function requestDepositForBatch(Transfer.Request[] calldata _requests) external payable virtual whenNotPaused { uint length = _requests.length; - for (uint256 i; i < length; i++) { + for (uint256 i; i < length; ++i) { _requestDepositFor(_requests[i], msg.sender); } } From a7aed097317dda42b1cb9428dffe6609af84c056 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 20 Jun 2024 14:38:39 +0700 Subject: [PATCH 213/305] chore: add artifacts --- .../sepolia/MainchainGatewayV3Logic.json | 184 +++++++++++------- 1 file changed, 117 insertions(+), 67 deletions(-) diff --git a/deployments/sepolia/MainchainGatewayV3Logic.json b/deployments/sepolia/MainchainGatewayV3Logic.json index 66f77e76..f5dcb720 100644 --- a/deployments/sepolia/MainchainGatewayV3Logic.json +++ b/deployments/sepolia/MainchainGatewayV3Logic.json @@ -824,6 +824,53 @@ "outputs": [], "stateMutability": "payable" }, + { + "type": "function", + "name": "requestDepositForBatch", + "inputs": [ + { + "name": "_requests", + "type": "tuple[]", + "internalType": "struct Transfer.Request[]", + "components": [ + { + "name": "recipientAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAddr", + "type": "address", + "internalType": "address" + }, + { + "name": "info", + "type": "tuple", + "internalType": "struct TokenInfo", + "components": [ + { + "name": "erc", + "type": "uint8", + "internalType": "enum TokenStandard" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "quantity", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "payable" + }, { "type": "function", "name": "revokeRole", @@ -2321,14 +2368,14 @@ ] } ], - "address": "0x1050f2E63177b5eD18f3E88D000DB3a600d664e3", + "address": "0x6fbFcF5A6DBa4822Dfc06030b74b9f05d817A9C4", "args": "0x", "ast": "", - "blockNumber": 5709370, - "bytecode": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b607154610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60715460ff9081161015620000ec576071805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61556180620000fe6000396000f3fe60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a2646970667358221220a2f9831a0e3d85059cd7b361f6be20ecc705006971478a7cb6c6bfef562802c064736f6c63430008170033", + "blockNumber": 6141559, + "bytecode": "0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b607154610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60715460ff9081161015620000ec576071805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61563b80620000fe6000396000f3fe6080604052600436106103a65760003560e01c80638f34e347116101e7578063b9c362091161010d578063d64af2a6116100a0578063e400327c1161006f578063e400327c14610b2f578063e6a4561814610b4f578063e75235b814610b62578063f23a6e6114610b7a576103b5565b8063d64af2a614610aaf578063dafae40814610acf578063de981f1b14610aef578063dff525e114610b0f576103b5565b8063cdb67444116100dc578063cdb6744414610a1d578063d19773d214610a35578063d547741f14610a62578063d55ed10314610a82576103b5565b8063b9c3620914610991578063bc197c81146109b1578063c48549de146109dd578063ca15c873146109fd576103b5565b8063a217fddf11610185578063affed0e011610154578063affed0e014610901578063b1a2567e14610917578063b1d08a0314610937578063b297579414610964576103b5565b8063a217fddf1461089f578063a3912ec8146103b3578063ab796566146108b4578063ac78dfe8146108e1576103b5565b80639157921c116101c15780639157921c1461080a57806391d148541461082a57806393c5678f1461084a5780639dcc4da31461086a576103b5565b80638f34e347146107895780638f851d8a146107bd5780639010d07c146107ea576103b5565b806338e454b1116102cc578063504af48c1161026a5780636c1ce670116102395780636c1ce6701461071f5780637de5dedd1461073f5780638456cb5914610754578063865e6fd314610769576103b5565b8063504af48c1461069a57806359122f6b146106ad5780635c975abb146106da5780636932be98146106f2576103b5565b80634b14557e116102a65780634b14557e146106175780634d0d66731461062a5780634d493f4e1461064a5780634f4247a11461067a576103b5565b806338e454b1146105cd5780633e70838b146105e25780633f4ba83a14610602576103b5565b80631d4a7210116103445780632f2ff15d116103135780632f2ff15d14610561578063302d12db146105815780633644e5151461059857806336568abe146105ad576103b5565b80631d4a7210146104ce578063248a9ca3146104fb57806329b6eca91461052b5780632dfdf0b51461054b576103b5565b806317ce2dd41161038057806317ce2dd41461044a57806317fcb39b1461046e5780631a8e55b01461048e5780631b6e7594146104ae576103b5565b806301ffc9a7146103bd578063065b3adf146103f2578063110a83081461042a576103b5565b366103b5576103b3610ba6565b005b6103b3610ba6565b3480156103c957600080fd5b506103dd6103d83660046141d4565b610bda565b60405190151581526020015b60405180910390f35b3480156103fe57600080fd5b50600554610412906001600160a01b031681565b6040516001600160a01b0390911681526020016103e9565b34801561043657600080fd5b506103b3610445366004614213565b610c20565b34801561045657600080fd5b5061046060755481565b6040519081526020016103e9565b34801561047a57600080fd5b50607454610412906001600160a01b031681565b34801561049a57600080fd5b506103b36104a9366004614274565b610cc5565b3480156104ba57600080fd5b506103b36104c93660046142df565b610d01565b3480156104da57600080fd5b506104606104e9366004614213565b603e6020526000908152604090205481565b34801561050757600080fd5b50610460610516366004614383565b60009081526072602052604090206001015490565b34801561053757600080fd5b506103b3610546366004614213565b610d41565b34801561055757600080fd5b5061046060765481565b34801561056d57600080fd5b506103b361057c36600461439c565b610dca565b34801561058d57600080fd5b50610460620f424081565b3480156105a457600080fd5b50607754610460565b3480156105b957600080fd5b506103b36105c836600461439c565b610df4565b3480156105d957600080fd5b506103b3610e72565b3480156105ee57600080fd5b506103b36105fd366004614213565b61104f565b34801561060e57600080fd5b506103b3611079565b6103b36106253660046143cc565b611089565b34801561063657600080fd5b506103dd6106453660046143f7565b6110ac565b34801561065657600080fd5b506103dd610665366004614383565b607a6020526000908152604090205460ff1681565b34801561068657600080fd5b50607f54610412906001600160a01b031681565b6103b36106a83660046144a1565b61111c565b3480156106b957600080fd5b506104606106c8366004614213565b603a6020526000908152604090205481565b3480156106e657600080fd5b5060005460ff166103dd565b3480156106fe57600080fd5b5061046061070d366004614383565b60796020526000908152604090205481565b34801561072b57600080fd5b506103dd61073a36600461457b565b6113e2565b34801561074b57600080fd5b506104606113ee565b34801561076057600080fd5b506103b361140f565b34801561077557600080fd5b506103b36107843660046145b6565b61141f565b34801561079557600080fd5b506104607f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107c957600080fd5b506107dd6107d8366004614681565b61143a565b6040516103e99190614778565b3480156107f657600080fd5b5061041261080536600461478d565b6115bc565b34801561081657600080fd5b506103b36108253660046147af565b6115d4565b34801561083657600080fd5b506103dd61084536600461439c565b611858565b34801561085657600080fd5b506103b3610865366004614274565b611883565b34801561087657600080fd5b5061088a61088536600461478d565b6118b9565b604080519283526020830191909152016103e9565b3480156108ab57600080fd5b50610460600081565b3480156108c057600080fd5b506104606108cf366004614213565b603c6020526000908152604090205481565b3480156108ed57600080fd5b506103dd6108fc366004614383565b6118e2565b34801561090d57600080fd5b5061046060045481565b34801561092357600080fd5b506103b3610932366004614274565b611918565b34801561094357600080fd5b50610460610952366004614213565b60396020526000908152604090205481565b34801561097057600080fd5b5061098461097f366004614213565b61194e565b6040516103e991906147f6565b34801561099d57600080fd5b506103b36109ac36600461478d565b6119f1565b3480156109bd57600080fd5b506107dd6109cc3660046148f9565b63bc197c8160e01b95945050505050565b3480156109e957600080fd5b506107dd6109f8366004614274565b611a0b565b348015610a0957600080fd5b50610460610a18366004614383565b611b9f565b348015610a2957600080fd5b5060375460385461088a565b348015610a4157600080fd5b50610460610a50366004614213565b603b6020526000908152604090205481565b348015610a6e57600080fd5b506103b3610a7d36600461439c565b611bb6565b348015610a8e57600080fd5b50610460610a9d366004614213565b603d6020526000908152604090205481565b348015610abb57600080fd5b506103b3610aca366004614213565b611bdb565b348015610adb57600080fd5b506103dd610aea366004614383565b611bec565b348015610afb57600080fd5b50610412610b0a3660046149a6565b611c1a565b348015610b1b57600080fd5b506103b3610b2a3660046149c1565b611c90565b348015610b3b57600080fd5b506103b3610b4a366004614274565b611d05565b6103b3610b5d366004614a7e565b611d3b565b348015610b6e57600080fd5b5060015460025461088a565b348015610b8657600080fd5b506107dd610b95366004614af2565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bc95750607f546001600160a01b031633145b15610bd057565b610bd8611d82565b565b60006001600160e01b03198216631dcdd2c760e31b1480610c0b57506001600160e01b031982166312c0151560e21b145b80610c1a5750610c1a82611dac565b92915050565b607154600490610100900460ff16158015610c42575060715460ff8083169116105b610c675760405162461bcd60e51b8152600401610c5e90614b5a565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff19909316831717169091556040519081526000805160206155e6833981519152906020015b60405180910390a15050565b610ccd611dd1565b6000839003610cef576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484611e2b565b50505050565b610d09611dd1565b6000859003610d2b576040516316ee9d3b60e11b815260040160405180910390fd5b610d39868686868686611f00565b505050505050565b607154600290610100900460ff16158015610d63575060715460ff8083169116105b610d7f5760405162461bcd60e51b8152600401610c5e90614b5a565b6071805461ffff191660ff831617610100179055610d9e600b836120a8565b6071805461ff001916905560405160ff821681526000805160206155e683398151915290602001610cb9565b600082815260726020526040902060010154610de58161214c565b610def8383612156565b505050565b6001600160a01b0381163314610e645760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c5e565b610e6e8282612178565b5050565b607154600390610100900460ff16158015610e94575060715460ff8083169116105b610eb05760405162461bcd60e51b8152600401610c5e90614b5a565b6071805461ffff191660ff8316176101001790556000610ed0600b611c1a565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610f13573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f3b9190810190614c25565b92509250506000805b8351811015610ff857828181518110610f5f57610f5f614d0b565b6020026020010151607e6000868481518110610f7d57610f7d614d0b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fdb57610fdb614d0b565b602002602001015182610fee9190614d37565b9150600101610f44565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff821681526000805160206155e6833981519152906020015b60405180910390a150565b611057611dd1565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61108161219a565b610bd8612209565b61109161225b565b6110a96110a336839003830183614da7565b336122a1565b50565b60006110b661225b565b611112848484808060200260200160405190810160405280939291908181526020016000905b82821015611108576110f960608302860136819003810190614dfa565b815260200190600101906110dc565b505050505061257c565b90505b9392505050565b607154610100900460ff161580801561113c5750607154600160ff909116105b806111565750303b158015611156575060715460ff166001145b6111725760405162461bcd60e51b8152600401610c5e90614b5a565b6071805460ff191660011790558015611195576071805461ff0019166101001790555b6111a060008c612a10565b60758990556111ae8a612a1a565b6112396040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112438887612a68565b61124d8787612af8565b5050611257612b8f565b60006112638680614e44565b905011156113245761128c6112788680614e44565b6112856020890189614e44565b8787611f00565b6112b26112998680614e44565b8660005b6020028101906112ad9190614e44565b612bdc565b6112d86112bf8680614e44565b8660015b6020028101906112d39190614e44565b611e2b565b6112fe6112e58680614e44565b8660025b6020028101906112f99190614e44565b612cb1565b61132461130b8680614e44565b8660035b60200281019061131f9190614e44565b612dc2565b60005b6113346040870187614e44565b90508110156113a0576113987f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461136e6040890189614e44565b8481811061137e5761137e614d0b565b90506020020160208101906113939190614213565b612156565b600101611327565b5080156113d5576071805461ff0019169055604051600181526000805160206155e68339815191529060200160405180910390a15b5050505050505050505050565b60006111158383612e97565b600061140a611405607d546001600160601b031690565b612f62565b905090565b61141761219a565b610bd8612f98565b611427611dd1565b61143081612fd5565b610e6e82826120a8565b6000600b6114478161300b565b82518690811415806114595750808514155b15611485576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b8060000361149d57506347c28ec560e11b91506115b2565b60005b818110156115a5578481815181106114ba576114ba614d0b565b60200260200101511561159d578686828181106114d9576114d9614d0b565b90506020020160208101906114ee9190614e8d565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061152557611525614d0b565b905060200201602081019061153a9190614e8d565b607e60008b8b8581811061155057611550614d0b565b90506020020160208101906115659190614213565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b6001016114a0565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206111159083613057565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115fe8161214c565b600061161761161236859003850185614f07565b613063565b905061162b61161236859003850185614f07565b83356000908152607960205260409020541461165a5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661168b5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116d59083908690614fda565b60405180910390a160006116ef6080850160608601614213565b9050600061170561012086016101008701615060565b6002811115611716576117166147cc565b036117dd576000611730368690038601610100870161507b565b6001600160a01b0383166000908152603b602052604090205490915061175c906101408701359061312d565b60408201526000611776368790038701610100880161507b565b604083015190915061178d90610140880135615097565b60408201526074546117ad908390339086906001600160a01b0316613147565b6117d66117c06060880160408901614213565b60745483919086906001600160a01b0316613147565b5050611819565b6118196117f06060860160408701614213565b60745483906001600160a01b03166118113689900389016101008a0161507b565b929190613147565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161184a929190614fda565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61188b611dd1565b60008390036118ad576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612bdc565b6000806118c4611dd1565b6118ce8484612af8565b90925090506118db612b8f565b9250929050565b60006118f6607d546001600160601b031690565b60375461190391906150aa565b60385461191090846150aa565b101592915050565b611920611dd1565b6000839003611942576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612cb1565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561199c5761199c6147cc565b60028111156119ad576119ad6147cc565b815290546001600160a01b03610100909104811660209283015290820151919250166119ec57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119f9611dd1565b611a038282612a68565b610e6e612b8f565b6000600b611a188161300b565b84838114611a47576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b80600003611a5f5750636242a4ef60e11b9150611b96565b6000805b82811015611b4657868682818110611a7d57611a7d614d0b565b9050602002016020810190611a9291906150c1565b15611b3e57607e60008a8a84818110611aad57611aad614d0b565b9050602002016020810190611ac29190614213565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611b0157611b01614d0b565b9050602002016020810190611b169190614213565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a63565b50607d8054829190600090611b659084906001600160601b03166150de565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610c1a90613379565b600082815260726020526040902060010154611bd18161214c565b610def8383612178565b611be3611dd1565b6110a981612a1a565b6000611c00607d546001600160601b031690565b600154611c0d91906150aa565b60025461191090846150aa565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c5157611c516147cc565b60ff1681526020810191909152604001600020546001600160a01b03169050806119ec578160405163409140df60e11b8152600401610c5e919061510e565b611c98611dd1565b6000869003611cba576040516316ee9d3b60e11b815260040160405180910390fd5b611cc8878787878787611f00565b611cd5878783600061129d565b611ce287878360016112c3565b611cef87878360026112e9565b611cfc878783600361130f565b50505050505050565b611d0d611dd1565b6000839003611d2f576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612dc2565b611d4361225b565b8060005b81811015610cfb57611d7a848483818110611d6457611d64614d0b565b905060a002018036038101906110a39190614da7565b600101611d47565b611d8a61225b565b611d92614193565b3381526040808201513491015280516110a99082906122a1565b60006001600160e01b03198216630271189760e51b1480610c1a5750610c1a82613383565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bd8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c5e92919061511c565b828114611e59576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015611eca57828282818110611e7657611e76614d0b565b90506020020135603a6000878785818110611e9357611e93614d0b565b9050602002016020810190611ea89190614213565b6001600160a01b03168152602081019190915260400160002055600101611e5c565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161184a9493929190615193565b8483148015611f0e57508481145b611f39576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b8581101561205e57848482818110611f5657611f56614d0b565b9050602002016020810190611f6b9190614213565b60786000898985818110611f8157611f81614d0b565b9050602002016020810190611f969190614213565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611fde57611fde614d0b565b9050602002016020810190611ff39190615060565b6078600089898581811061200957612009614d0b565b905060200201602081019061201e9190614213565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115612051576120516147cc565b0217905550600101611f3c565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444868686868686604051612098969594939291906151df565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156120de576120de6147cc565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561211f5761211f6147cc565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6110a981336133a8565b612160828261340c565b6000828152607360205260409020610def9082613492565b61218282826134a7565b6000828152607360205260409020610def908261350e565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806121dc57506005546001600160a01b031633145b610bd8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c5e92919061511c565b612211613523565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bd85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c5e565b604080518082018252600080825260208201526074549184015190916001600160a01b0316906122d09061356c565b60208401516001600160a01b031661237157348460400151604001511461230a5760405163129c2ce160e31b815260040160405180910390fd5b6123138161194e565b604085015151909250600281111561232d5761232d6147cc565b82516002811115612340576123406147cc565b1461235d5760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152612509565b34156123905760405163129c2ce160e31b815260040160405180910390fd5b61239d846020015161194e565b60408501515190925060028111156123b7576123b76147cc565b825160028111156123ca576123ca6147cc565b146123e75760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516123fc9185906135b0565b83602001516001600160a01b0316816001600160a01b03160361250957607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249b9190615250565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124d69160040190815260200190565b600060405180830381600087803b1580156124f057600080fd5b505af1158015612504573d6000803e3d6000fd5b505050505b607680546000918261251a8361526d565b9190505590506000612541858386602001516075548a61372990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61256d82613063565b826040516120989291906152a6565b60008235610140840135826125976080870160608801614213565b90506125b46125af368890038801610100890161507b565b61356c565b60016125c66040880160208901615342565b60018111156125d7576125d76147cc565b146125f55760405163182f3d8760e11b815260040160405180910390fd5b608086013546146126375760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c5e565b600061264c61097f6080890160608a01614213565b905061266061012088016101008901615060565b6002811115612671576126716147cc565b81516002811115612684576126846147cc565b1480156126b5575061269c60e0880160c08901614213565b6001600160a01b031681602001516001600160a01b0316145b80156126c6575060755460e0880135145b6126e35760405163f4b8742f60e01b815260040160405180910390fd5b6000848152607960205260409020541561271057604051634f13df6160e01b815260040160405180910390fd5b600161272461012089016101008a01615060565b6002811115612735576127356147cc565b148061274857506127468284612e97565b155b6127655760405163c51297b760e01b815260040160405180910390fd5b6000612779611612368a90038a018a614f07565b90506000612789607754836137fe565b905060006127a96127a26101208c016101008d01615060565b868861383f565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156128e7578e81815181106127ee576127ee614d0b565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa158015612852573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061289e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c5e9190614778565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128cd908361535d565b91508682106128df57600195506128e7565b6001016127d3565b508461290657604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612981576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc9061296d9085908d90614fda565b60405180910390a150505050505050610c1a565b61298b85876138cf565b6129ca61299e60608c0160408d01614213565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611811919061507b565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516129fb929190614fda565b60405180910390a15050505050505092915050565b610e6e8282612156565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611044565b80821115612a97576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612b2a576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b9f91906150aa565b603854600154612baf91906150aa565b1115610bd8576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b828114612c0a576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612c7b57828282818110612c2757612c27614d0b565b9050602002013560396000878785818110612c4457612c44614d0b565b9050602002016020810190612c599190614213565b6001600160a01b03168152602081019190915260400160002055600101612c0d565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161184a9493929190615193565b828114612cdf576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612d8c57620f4240838383818110612d0057612d00614d0b565b905060200201351115612d265760405163572d3bd360e11b815260040160405180910390fd5b828282818110612d3857612d38614d0b565b90506020020135603b6000878785818110612d5557612d55614d0b565b9050602002016020810190612d6a9190614213565b6001600160a01b03168152602081019190915260400160002055600101612ce2565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161184a9493929190615193565b828114612df0576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612e6157828282818110612e0d57612e0d614d0b565b90506020020135603c6000878785818110612e2a57612e2a614d0b565b9050602002016020810190612e3f9190614213565b6001600160a01b03168152602081019190915260400160002055600101612df3565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161184a9493929190615193565b6001600160a01b0382166000908152603a60205260408120548210612ebe57506000610c1a565b6000612ecd6201518042615370565b6001600160a01b0385166000908152603e6020526040902054909150811115612f135750506001600160a01b0382166000908152603c6020526040902054811015610c1a565b6001600160a01b0384166000908152603d6020526040902054612f3790849061535d565b6001600160a01b0385166000908152603c602052604090205411159150610c1a9050565b5092915050565b6000600254600160025484600154612f7a91906150aa565b612f84919061535d565b612f8e9190615097565b610c1a9190615370565b612fa061225b565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861223e3390565b806001600160a01b03163b6000036110a957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c5e565b61301481611c1a565b6001600160a01b0316336001600160a01b0316146110a9576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c5e93929190615392565b6000611115838361395f565b6000806130738360400151613989565b905060006130848460600151613989565b905060006130d88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061313d83856150aa565b6111159190615370565b806001600160a01b0316826001600160a01b0316036131f45760408085015190516001600160a01b0385169180156108fc02916000818181858888f193505050506131ef57806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156131cb57600080fd5b505af11580156131df573d6000803e3d6000fd5b50505050506131ef8484846139d1565b610cfb565b600084516002811115613209576132096147cc565b036132cf576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015613255573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327991906153c9565b905084604001518110156132be576132a1833083886040015161329c9190615097565b613a50565b6132be57604051632f739fff60e11b815260040160405180910390fd5b6132c98585856139d1565b50610cfb565b6001845160028111156132e4576132e46147cc565b03613315576132f882848660200151613af5565b6131ef5760405163c8e3a09f60e01b815260040160405180910390fd5b60028451600281111561332a5761332a6147cc565b0361336057613343828486602001518760400151613b1c565b6131ef576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610c1a825490565b60006001600160e01b03198216635a05180f60e01b1480610c1a5750610c1a82613b49565b6133b28282611858565b610e6e576133ca816001600160a01b03166014613b7e565b6133d5836020613b7e565b6040516020016133e6929190615406565b60408051601f198184030181529082905262461bcd60e51b8252610c5e916004016154a7565b6134168282611858565b610e6e5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561344e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611115836001600160a01b038416613d19565b6134b18282611858565b15610e6e5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611115836001600160a01b038416613d68565b60005460ff16610bd85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c5e565b61357581613e5b565b80613584575061358481613e92565b80613593575061359381613eba565b6110a95760405163034992a760e51b815260040160405180910390fd5b6000606081855160028111156135c8576135c86147cc565b036136a35760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b17905291519185169161362f91906154ba565b6000604051808303816000865af19150503d806000811461366c576040519150601f19603f3d011682016040523d82523d6000602084013e613671565b606091505b50909250905081801561369c57508051158061369c57508080602001905181019061369c9190615250565b91506136fc565b6001855160028111156136b8576136b86147cc565b036136cd5761369c8385308860200151613ee3565b6002855160028111156136e2576136e26147cc565b036133605761369c83853088602001518960400151613f91565b816137225784843085604051639d2e4c6760e01b8152600401610c5e94939291906154d6565b5050505050565b6137996040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090611115565b6000806000613856607d546001600160601b031690565b905061386181612f62565b92506000866002811115613877576138776147cc565b036138c6576001600160a01b03851660009081526039602052604090205484106138a7576138a481614045565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138de6201518042615370565b6001600160a01b0384166000908152603e602052604090205490915081111561392d576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061395590849061535d565b9091555050505050565b600082600001828154811061397657613976614d0b565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160028111156139e7576139e76147cc565b03613a02576139fb8284866040015161405d565b9050613a2c565b600184516002811115613a1757613a176147cc565b03613360576139fb8230858760200151613ee3565b80610cfb578383836040516341bd7d9160e11b8152600401610c5e9392919061550c565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613aa8916154ba565b6000604051808303816000865af19150503d8060008114613ae5576040519150601f19603f3d011682016040523d82523d6000602084013e613aea565b606091505b509095945050505050565b6000613b0384308585613ee3565b90508061111557613b15848484613a50565b9050611115565b6000613b2b8530868686613f91565b905080613b4157613b3e85858585614130565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610c1a57506301ffc9a760e01b6001600160e01b0319831614610c1a565b60606000613b8d8360026150aa565b613b9890600261535d565b6001600160401b03811115613baf57613baf6145e2565b6040519080825280601f01601f191660200182016040528015613bd9576020820181803683370190505b509050600360fc1b81600081518110613bf457613bf4614d0b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613c2357613c23614d0b565b60200101906001600160f81b031916908160001a9053506000613c478460026150aa565b613c5290600161535d565b90505b6001811115613cca576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c8657613c86614d0b565b1a60f81b828281518110613c9c57613c9c614d0b565b60200101906001600160f81b031916908160001a90535060049490941c93613cc38161553c565b9050613c55565b5083156111155760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c5e565b6000818152600183016020526040812054613d6057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c1a565b506000610c1a565b60008181526001830160205260408120548015613e51576000613d8c600183615097565b8554909150600090613da090600190615097565b9050818114613e05576000866000018281548110613dc057613dc0614d0b565b9060005260206000200154905080876000018481548110613de357613de3614d0b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e1657613e16615553565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c1a565b6000915050610c1a565b60008082516002811115613e7157613e716147cc565b148015613e82575060008260400151115b8015610c1a575050602001511590565b6000600182516002811115613ea957613ea96147cc565b148015610c1a575050604001511590565b6000600282516002811115613ed157613ed16147cc565b148015610c1a57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613f43916154ba565b6000604051808303816000865af19150503d8060008114613f80576040519150601f19603f3d011682016040523d82523d6000602084013e613f85565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613fc190879087908790879060448101615569565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613ff691906154ba565b6000604051808303816000865af19150503d8060008114614033576040519150601f19603f3d011682016040523d82523d6000602084013e614038565b606091505b5090979650505050505050565b6000603854600160385484603754612f7a91906150aa565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916140ba91906154ba565b6000604051808303816000865af19150503d80600081146140f7576040519150601f19603f3d011682016040523d82523d6000602084013e6140fc565b606091505b5090925090508180156141275750805115806141275750808060200190518101906141279190615250565b95945050505050565b604080516000808252602082019092526001600160a01b0386169061415e90869086908690604481016155ae565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613f4391906154ba565b60408051606081018252600080825260208201529081016141cf6040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156141e657600080fd5b81356001600160e01b03198116811461111557600080fd5b6001600160a01b03811681146110a957600080fd5b60006020828403121561422557600080fd5b8135611115816141fe565b60008083601f84011261424257600080fd5b5081356001600160401b0381111561425957600080fd5b6020830191508360208260051b85010111156118db57600080fd5b6000806000806040858703121561428a57600080fd5b84356001600160401b03808211156142a157600080fd5b6142ad88838901614230565b909650945060208701359150808211156142c657600080fd5b506142d387828801614230565b95989497509550505050565b600080600080600080606087890312156142f857600080fd5b86356001600160401b038082111561430f57600080fd5b61431b8a838b01614230565b9098509650602089013591508082111561433457600080fd5b6143408a838b01614230565b9096509450604089013591508082111561435957600080fd5b5061436689828a01614230565b979a9699509497509295939492505050565b80356119ec816141fe565b60006020828403121561439557600080fd5b5035919050565b600080604083850312156143af57600080fd5b8235915060208301356143c1816141fe565b809150509250929050565b600060a082840312156143de57600080fd5b50919050565b600061016082840312156143de57600080fd5b6000806000610180848603121561440d57600080fd5b61441785856143e4565b92506101608401356001600160401b038082111561443457600080fd5b818601915086601f83011261444857600080fd5b81358181111561445757600080fd5b87602060608302850101111561446c57600080fd5b6020830194508093505050509250925092565b8060608101831015610c1a57600080fd5b8060808101831015610c1a57600080fd5b6000806000806000806000806000806101208b8d0312156144c157600080fd5b6144ca8b614378565b99506144d860208c01614378565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b038082111561451057600080fd5b61451c8e838f0161447f565b955060e08d013591508082111561453257600080fd5b61453e8e838f01614490565b94506101008d013591508082111561455557600080fd5b506145628d828e01614230565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561458e57600080fd5b8235614599816141fe565b946020939093013593505050565b8035601081106119ec57600080fd5b600080604083850312156145c957600080fd5b6145d2836145a7565b915060208301356143c1816141fe565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171561461a5761461a6145e2565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614648576146486145e2565b604052919050565b60006001600160401b03821115614669576146696145e2565b5060051b60200190565b80151581146110a957600080fd5b60008060008060006060868803121561469957600080fd5b85356001600160401b03808211156146b057600080fd5b6146bc89838a01614230565b90975095506020915087820135818111156146d657600080fd5b6146e28a828b01614230565b9096509450506040880135818111156146fa57600080fd5b88019050601f8101891361470d57600080fd5b803561472061471b82614650565b614620565b81815260059190911b8201830190838101908b83111561473f57600080fd5b928401925b8284101561476657833561475781614673565b82529284019290840190614744565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b600080604083850312156147a057600080fd5b50508035926020909101359150565b600061016082840312156147c257600080fd5b61111583836143e4565b634e487b7160e01b600052602160045260246000fd5b600381106147f2576147f26147cc565b9052565b60006040820190506148098284516147e2565b6020928301516001600160a01b0316919092015290565b600082601f83011261483157600080fd5b8135602061484161471b83614650565b8083825260208201915060208460051b87010193508684111561486357600080fd5b602086015b8481101561487f5780358352918301918301614868565b509695505050505050565b600082601f83011261489b57600080fd5b81356001600160401b038111156148b4576148b46145e2565b6148c7601f8201601f1916602001614620565b8181528460208386010111156148dc57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561491157600080fd5b853561491c816141fe565b9450602086013561492c816141fe565b935060408601356001600160401b038082111561494857600080fd5b61495489838a01614820565b9450606088013591508082111561496a57600080fd5b61497689838a01614820565b9350608088013591508082111561498c57600080fd5b506149998882890161488a565b9150509295509295909350565b6000602082840312156149b857600080fd5b611115826145a7565b60008060008060008060006080888a0312156149dc57600080fd5b87356001600160401b03808211156149f357600080fd5b6149ff8b838c01614230565b909950975060208a0135915080821115614a1857600080fd5b614a248b838c01614230565b909750955060408a0135915080821115614a3d57600080fd5b614a498b838c01614230565b909550935060608a0135915080821115614a6257600080fd5b50614a6f8a828b01614490565b91505092959891949750929550565b60008060208385031215614a9157600080fd5b82356001600160401b0380821115614aa857600080fd5b818501915085601f830112614abc57600080fd5b813581811115614acb57600080fd5b86602060a083028501011115614ae057600080fd5b60209290920196919550909350505050565b600080600080600060a08688031215614b0a57600080fd5b8535614b15816141fe565b94506020860135614b25816141fe565b9350604086013592506060860135915060808601356001600160401b03811115614b4e57600080fd5b6149998882890161488a565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614bb957600080fd5b81516020614bc961471b83614650565b8083825260208201915060208460051b870101935086841115614beb57600080fd5b602086015b8481101561487f578051614c03816141fe565b8352918301918301614bf0565b6001600160601b03811681146110a957600080fd5b600080600060608486031215614c3a57600080fd5b83516001600160401b0380821115614c5157600080fd5b614c5d87838801614ba8565b9450602091508186015181811115614c7457600080fd5b614c8088828901614ba8565b945050604086015181811115614c9557600080fd5b86019050601f81018713614ca857600080fd5b8051614cb661471b82614650565b81815260059190911b82018301908381019089831115614cd557600080fd5b928401925b82841015614cfc578351614ced81614c10565b82529284019290840190614cda565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612f5b57612f5b614d21565b8035600381106119ec57600080fd5b600060608284031215614d7857600080fd5b614d806145f8565b9050614d8b82614d57565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614db957600080fd5b614dc16145f8565b8235614dcc816141fe565b81526020830135614ddc816141fe565b6020820152614dee8460408501614d66565b60408201529392505050565b600060608284031215614e0c57600080fd5b614e146145f8565b823560ff81168114614e2557600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614e5b57600080fd5b8301803591506001600160401b03821115614e7557600080fd5b6020019150600581901b36038213156118db57600080fd5b600060208284031215614e9f57600080fd5b813561111581614c10565b8035600281106119ec57600080fd5b600060608284031215614ecb57600080fd5b614ed36145f8565b90508135614ee0816141fe565b81526020820135614ef0816141fe565b806020830152506040820135604082015292915050565b60006101608284031215614f1a57600080fd5b60405160a081018181106001600160401b0382111715614f3c57614f3c6145e2565b60405282358152614f4f60208401614eaa565b6020820152614f618460408501614eb9565b6040820152614f738460a08501614eb9565b6060820152614f86846101008501614d66565b60808201529392505050565b600281106147f2576147f26147cc565b8035614fad816141fe565b6001600160a01b039081168352602082013590614fc9826141fe565b166020830152604090810135910152565b60006101808201905083825282356020830152614ff960208401614eaa565b6150066040840182614f92565b506150176060830160408501614fa2565b61502760c0830160a08501614fa2565b61012061504281840161503d6101008701614d57565b6147e2565b61014081850135818501528085013561016085015250509392505050565b60006020828403121561507257600080fd5b61111582614d57565b60006060828403121561508d57600080fd5b6111158383614d66565b81810381811115610c1a57610c1a614d21565b8082028115828204841417610c1a57610c1a614d21565b6000602082840312156150d357600080fd5b813561111581614673565b6001600160601b03828116828216039080821115612f5b57612f5b614d21565b601081106147f2576147f26147cc565b60208101610c1a82846150fe565b6001600160e01b03198316815260408101600b831061513d5761513d6147cc565b8260208301529392505050565b8183526000602080850194508260005b8581101561518857813561516d816141fe565b6001600160a01b03168752958201959082019060010161515a565b509495945050505050565b6040815260006151a760408301868861514a565b82810360208401528381526001600160fb1b038411156151c657600080fd5b8360051b80866020840137016020019695505050505050565b6060815260006151f360608301888a61514a565b6020838203602085015261520882888a61514a565b848103604086015285815286925060200160005b86811015615241576152318261503d86614d57565b928201929082019060010161521c565b509a9950505050505050505050565b60006020828403121561526257600080fd5b815161111581614673565b60006001820161527f5761527f614d21565b5060010190565b6152918282516147e2565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516152cb6040840182614f92565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e0840152604081015161010084015250608083015161533a610120840182615286565b509392505050565b60006020828403121561535457600080fd5b61111582614eaa565b80820180821115610c1a57610c1a614d21565b60008261538d57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016153b060208301856150fe565b6001600160a01b03929092166040919091015292915050565b6000602082840312156153db57600080fd5b5051919050565b60005b838110156153fd5781810151838201526020016153e5565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161543e8160178501602088016153e2565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161546f8160288401602088016153e2565b01602801949350505050565b600081518084526154938160208601602086016153e2565b601f01601f19169290920160200192915050565b602081526000611115602083018461547b565b600082516154cc8184602087016153e2565b9190910192915050565b60c081016154e48287615286565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161551a8286615286565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161554b5761554b614d21565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906155a39083018461547b565b979650505050505050565b60018060a01b03851681528360208201528260408201526080606082015260006155db608083018461547b565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a26469706673582212201e2ed98411cda98706015cdbeb9e494126a836fe1b19bb440229c826fa07419564736f6c63430008170033", "chainId": 11155111, "contractAbsolutePath": "MainchainGatewayV3.sol", - "deployedBytecode": "0x60806040526004361061039b5760003560e01c80638f34e347116101dc578063b9c3620911610102578063d55ed103116100a0578063dff525e11161006f578063dff525e114610b04578063e400327c14610b24578063e75235b814610b44578063f23a6e6114610b5c576103aa565b8063d55ed10314610a77578063d64af2a614610aa4578063dafae40814610ac4578063de981f1b14610ae4576103aa565b8063ca15c873116100dc578063ca15c873146109f2578063cdb6744414610a12578063d19773d214610a2a578063d547741f14610a57576103aa565b8063b9c3620914610986578063bc197c81146109a6578063c48549de146109d2576103aa565b8063a217fddf1161017a578063affed0e011610149578063affed0e0146108f6578063b1a2567e1461090c578063b1d08a031461092c578063b297579414610959576103aa565b8063a217fddf14610894578063a3912ec8146103a8578063ab796566146108a9578063ac78dfe8146108d6576103aa565b80639157921c116101b65780639157921c146107ff57806391d148541461081f57806393c5678f1461083f5780639dcc4da31461085f576103aa565b80638f34e3471461077e5780638f851d8a146107b25780639010d07c146107df576103aa565b806338e454b1116102c1578063504af48c1161025f5780636c1ce6701161022e5780636c1ce670146107145780637de5dedd146107345780638456cb5914610749578063865e6fd31461075e576103aa565b8063504af48c1461068f57806359122f6b146106a25780635c975abb146106cf5780636932be98146106e7576103aa565b80634b14557e1161029b5780634b14557e1461060c5780634d0d66731461061f5780634d493f4e1461063f5780634f4247a11461066f576103aa565b806338e454b1146105c25780633e70838b146105d75780633f4ba83a146105f7576103aa565b80631d4a7210116103395780632f2ff15d116103085780632f2ff15d14610556578063302d12db146105765780633644e5151461058d57806336568abe146105a2576103aa565b80631d4a7210146104c3578063248a9ca3146104f057806329b6eca9146105205780632dfdf0b514610540576103aa565b806317ce2dd41161037557806317ce2dd41461043f57806317fcb39b146104635780631a8e55b0146104835780631b6e7594146104a3576103aa565b806301ffc9a7146103b2578063065b3adf146103e7578063110a83081461041f576103aa565b366103aa576103a8610b88565b005b6103a8610b88565b3480156103be57600080fd5b506103d26103cd36600461416e565b610bbc565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b50600554610407906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b34801561042b57600080fd5b506103a861043a3660046141ad565b610c01565b34801561044b57600080fd5b5061045560755481565b6040519081526020016103de565b34801561046f57600080fd5b50607454610407906001600160a01b031681565b34801561048f57600080fd5b506103a861049e36600461420e565b610ca6565b3480156104af57600080fd5b506103a86104be366004614279565b610ce2565b3480156104cf57600080fd5b506104556104de3660046141ad565b603e6020526000908152604090205481565b3480156104fc57600080fd5b5061045561050b36600461431d565b60009081526072602052604090206001015490565b34801561052c57600080fd5b506103a861053b3660046141ad565b610d22565b34801561054c57600080fd5b5061045560765481565b34801561056257600080fd5b506103a8610571366004614336565b610dab565b34801561058257600080fd5b50610455620f424081565b34801561059957600080fd5b50607754610455565b3480156105ae57600080fd5b506103a86105bd366004614336565b610dd5565b3480156105ce57600080fd5b506103a8610e53565b3480156105e357600080fd5b506103a86105f23660046141ad565b611030565b34801561060357600080fd5b506103a861105a565b6103a861061a366004614366565b61106a565b34801561062b57600080fd5b506103d261063a366004614391565b61108d565b34801561064b57600080fd5b506103d261065a36600461431d565b607a6020526000908152604090205460ff1681565b34801561067b57600080fd5b50607f54610407906001600160a01b031681565b6103a861069d36600461443b565b6110fd565b3480156106ae57600080fd5b506104556106bd3660046141ad565b603a6020526000908152604090205481565b3480156106db57600080fd5b5060005460ff166103d2565b3480156106f357600080fd5b5061045561070236600461431d565b60796020526000908152604090205481565b34801561072057600080fd5b506103d261072f366004614515565b6113c3565b34801561074057600080fd5b506104556113cf565b34801561075557600080fd5b506103a86113f0565b34801561076a57600080fd5b506103a8610779366004614550565b611400565b34801561078a57600080fd5b506104557f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107be57600080fd5b506107d26107cd36600461461b565b61141b565b6040516103de9190614712565b3480156107eb57600080fd5b506104076107fa366004614727565b61159d565b34801561080b57600080fd5b506103a861081a366004614749565b6115b5565b34801561082b57600080fd5b506103d261083a366004614336565b611839565b34801561084b57600080fd5b506103a861085a36600461420e565b611864565b34801561086b57600080fd5b5061087f61087a366004614727565b61189a565b604080519283526020830191909152016103de565b3480156108a057600080fd5b50610455600081565b3480156108b557600080fd5b506104556108c43660046141ad565b603c6020526000908152604090205481565b3480156108e257600080fd5b506103d26108f136600461431d565b6118c3565b34801561090257600080fd5b5061045560045481565b34801561091857600080fd5b506103a861092736600461420e565b6118f9565b34801561093857600080fd5b506104556109473660046141ad565b60396020526000908152604090205481565b34801561096557600080fd5b506109796109743660046141ad565b61192f565b6040516103de9190614790565b34801561099257600080fd5b506103a86109a1366004614727565b6119d2565b3480156109b257600080fd5b506107d26109c1366004614893565b63bc197c8160e01b95945050505050565b3480156109de57600080fd5b506107d26109ed36600461420e565b6119ec565b3480156109fe57600080fd5b50610455610a0d36600461431d565b611b80565b348015610a1e57600080fd5b5060375460385461087f565b348015610a3657600080fd5b50610455610a453660046141ad565b603b6020526000908152604090205481565b348015610a6357600080fd5b506103a8610a72366004614336565b611b97565b348015610a8357600080fd5b50610455610a923660046141ad565b603d6020526000908152604090205481565b348015610ab057600080fd5b506103a8610abf3660046141ad565b611bbc565b348015610ad057600080fd5b506103d2610adf36600461431d565b611bcd565b348015610af057600080fd5b50610407610aff366004614940565b611bfb565b348015610b1057600080fd5b506103a8610b1f36600461495b565b611c71565b348015610b3057600080fd5b506103a8610b3f36600461420e565b611ce6565b348015610b5057600080fd5b5060015460025461087f565b348015610b6857600080fd5b506107d2610b77366004614a18565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bab5750607f546001600160a01b031633145b15610bb257565b610bba611d1c565b565b60006001600160e01b031982166246560160e51b1480610bec57506001600160e01b031982166312c0151560e21b145b80610bfb5750610bfb82611d46565b92915050565b607154600490610100900460ff16158015610c23575060715460ff8083169116105b610c485760405162461bcd60e51b8152600401610c3f90614a80565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff199093168317171690915560405190815260008051602061550c833981519152906020015b60405180910390a15050565b610cae611d6b565b6000839003610cd0576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484611dc5565b50505050565b610cea611d6b565b6000859003610d0c576040516316ee9d3b60e11b815260040160405180910390fd5b610d1a868686868686611e9a565b505050505050565b607154600290610100900460ff16158015610d44575060715460ff8083169116105b610d605760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff831617610100179055610d7f600b83612042565b6071805461ff001916905560405160ff8216815260008051602061550c83398151915290602001610c9a565b600082815260726020526040902060010154610dc6816120e6565b610dd083836120f0565b505050565b6001600160a01b0381163314610e455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c3f565b610e4f8282612112565b5050565b607154600390610100900460ff16158015610e75575060715460ff8083169116105b610e915760405162461bcd60e51b8152600401610c3f90614a80565b6071805461ffff191660ff8316176101001790556000610eb1600b611bfb565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1c9190810190614b4b565b92509250506000805b8351811015610fd957828181518110610f4057610f40614c31565b6020026020010151607e6000868481518110610f5e57610f5e614c31565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fbc57610fbc614c31565b602002602001015182610fcf9190614c5d565b9150600101610f25565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff8216815260008051602061550c833981519152906020015b60405180910390a150565b611038611d6b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b611062612134565b610bba6121a3565b6110726121f5565b61108a61108436839003830183614ccd565b3361223b565b50565b60006110976121f5565b6110f3848484808060200260200160405190810160405280939291908181526020016000905b828210156110e9576110da60608302860136819003810190614d20565b815260200190600101906110bd565b5050505050612516565b90505b9392505050565b607154610100900460ff161580801561111d5750607154600160ff909116105b806111375750303b158015611137575060715460ff166001145b6111535760405162461bcd60e51b8152600401610c3f90614a80565b6071805460ff191660011790558015611176576071805461ff0019166101001790555b61118160008c6129aa565b607589905561118f8a6129b4565b61121a6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112248887612a02565b61122e8787612a92565b5050611238612b29565b60006112448680614d6a565b905011156113055761126d6112598680614d6a565b6112666020890189614d6a565b8787611e9a565b61129361127a8680614d6a565b8660005b60200281019061128e9190614d6a565b612b76565b6112b96112a08680614d6a565b8660015b6020028101906112b49190614d6a565b611dc5565b6112df6112c68680614d6a565b8660025b6020028101906112da9190614d6a565b612c4b565b6113056112ec8680614d6a565b8660035b6020028101906113009190614d6a565b612d5c565b60005b6113156040870187614d6a565b9050811015611381576113797f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461134f6040890189614d6a565b8481811061135f5761135f614c31565b905060200201602081019061137491906141ad565b6120f0565b600101611308565b5080156113b6576071805461ff00191690556040516001815260008051602061550c8339815191529060200160405180910390a15b5050505050505050505050565b60006110f68383612e31565b60006113eb6113e6607d546001600160601b031690565b612efc565b905090565b6113f8612134565b610bba612f32565b611408611d6b565b61141181612f6f565b610e4f8282612042565b6000600b61142881612fa5565b825186908114158061143a5750808514155b15611466576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b8060000361147e57506347c28ec560e11b9150611593565b60005b818110156115865784818151811061149b5761149b614c31565b60200260200101511561157e578686828181106114ba576114ba614c31565b90506020020160208101906114cf9190614db3565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061150657611506614c31565b905060200201602081019061151b9190614db3565b607e60008b8b8581811061153157611531614c31565b905060200201602081019061154691906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b600101611481565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206110f69083612ff1565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115df816120e6565b60006115f86115f336859003850185614e2d565b612ffd565b905061160c6115f336859003850185614e2d565b83356000908152607960205260409020541461163b5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661166c5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116b69083908690614f00565b60405180910390a160006116d060808501606086016141ad565b905060006116e661012086016101008701614f86565b60028111156116f7576116f7614766565b036117be5760006117113686900386016101008701614fa1565b6001600160a01b0383166000908152603b602052604090205490915061173d90610140870135906130c7565b604082015260006117573687900387016101008801614fa1565b604083015190915061176e90610140880135614fbd565b604082015260745461178e908390339086906001600160a01b03166130e1565b6117b76117a160608801604089016141ad565b60745483919086906001600160a01b03166130e1565b50506117fa565b6117fa6117d160608601604087016141ad565b60745483906001600160a01b03166117f23689900389016101008a01614fa1565b9291906130e1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161182b929190614f00565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61186c611d6b565b600083900361188e576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612b76565b6000806118a5611d6b565b6118af8484612a92565b90925090506118bc612b29565b9250929050565b60006118d7607d546001600160601b031690565b6037546118e49190614fd0565b6038546118f19084614fd0565b101592915050565b611901611d6b565b6000839003611923576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612c4b565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561197d5761197d614766565b600281111561198e5761198e614766565b815290546001600160a01b03610100909104811660209283015290820151919250166119cd57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119da611d6b565b6119e48282612a02565b610e4f612b29565b6000600b6119f981612fa5565b84838114611a28576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b80600003611a405750636242a4ef60e11b9150611b77565b6000805b82811015611b2757868682818110611a5e57611a5e614c31565b9050602002016020810190611a739190614fe7565b15611b1f57607e60008a8a84818110611a8e57611a8e614c31565b9050602002016020810190611aa391906141ad565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611ae257611ae2614c31565b9050602002016020810190611af791906141ad565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a44565b50607d8054829190600090611b469084906001600160601b0316615004565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610bfb90613313565b600082815260726020526040902060010154611bb2816120e6565b610dd08383612112565b611bc4611d6b565b61108a816129b4565b6000611be1607d546001600160601b031690565b600154611bee9190614fd0565b6002546118f19084614fd0565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c3257611c32614766565b60ff1681526020810191909152604001600020546001600160a01b03169050806119cd578160405163409140df60e11b8152600401610c3f9190615034565b611c79611d6b565b6000869003611c9b576040516316ee9d3b60e11b815260040160405180910390fd5b611ca9878787878787611e9a565b611cb6878783600061127e565b611cc387878360016112a4565b611cd087878360026112ca565b611cdd87878360036112f0565b50505050505050565b611cee611d6b565b6000839003611d10576040516316ee9d3b60e11b815260040160405180910390fd5b610cdc84848484612d5c565b611d246121f5565b611d2c61412d565b33815260408082015134910152805161108a90829061223b565b60006001600160e01b03198216630271189760e51b1480610bfb5750610bfb8261331d565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b828114611df3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015611e6457828282818110611e1057611e10614c31565b90506020020135603a6000878785818110611e2d57611e2d614c31565b9050602002016020810190611e4291906141ad565b6001600160a01b03168152602081019190915260400160002055600101611df6565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161182b94939291906150b9565b8483148015611ea857508481145b611ed3576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b85811015611ff857848482818110611ef057611ef0614c31565b9050602002016020810190611f0591906141ad565b60786000898985818110611f1b57611f1b614c31565b9050602002016020810190611f3091906141ad565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611f7857611f78614c31565b9050602002016020810190611f8d9190614f86565b60786000898985818110611fa357611fa3614c31565b9050602002016020810190611fb891906141ad565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115611feb57611feb614766565b0217905550600101611ed6565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be7044486868686868660405161203296959493929190615105565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561207857612078614766565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120b9576120b9614766565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61108a8133613342565b6120fa82826133a6565b6000828152607360205260409020610dd0908261342c565b61211c8282613441565b6000828152607360205260409020610dd090826134a8565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633148061217657506005546001600160a01b031633145b610bba576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c3f929190615042565b6121ab6134bd565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bba5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c3f565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061226a90613506565b60208401516001600160a01b031661230b5734846040015160400151146122a45760405163129c2ce160e31b815260040160405180910390fd5b6122ad8161192f565b60408501515190925060028111156122c7576122c7614766565b825160028111156122da576122da614766565b146122f75760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b03811660208501526124a3565b341561232a5760405163129c2ce160e31b815260040160405180910390fd5b612337846020015161192f565b604085015151909250600281111561235157612351614766565b8251600281111561236457612364614766565b146123815760405162035e2b60ea1b815260040160405180910390fd5b6020840151604085015161239691859061354a565b83602001516001600160a01b0316816001600160a01b0316036124a357607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124359190615176565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124709160040190815260200190565b600060405180830381600087803b15801561248a57600080fd5b505af115801561249e573d6000803e3d6000fd5b505050505b60768054600091826124b483615193565b91905055905060006124db858386602001516075548a6136c390949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61250782612ffd565b826040516120329291906151cc565b600082356101408401358261253160808701606088016141ad565b905061254e6125493688900388016101008901614fa1565b613506565b60016125606040880160208901615268565b600181111561257157612571614766565b1461258f5760405163182f3d8760e11b815260040160405180910390fd5b608086013546146125d15760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c3f565b60006125e66109746080890160608a016141ad565b90506125fa61012088016101008901614f86565b600281111561260b5761260b614766565b8151600281111561261e5761261e614766565b14801561264f575061263660e0880160c089016141ad565b6001600160a01b031681602001516001600160a01b0316145b8015612660575060755460e0880135145b61267d5760405163f4b8742f60e01b815260040160405180910390fd5b600084815260796020526040902054156126aa57604051634f13df6160e01b815260040160405180910390fd5b60016126be61012089016101008a01614f86565b60028111156126cf576126cf614766565b14806126e257506126e08284612e31565b155b6126ff5760405163c51297b760e01b815260040160405180910390fd5b60006127136115f3368a90038a018a614e2d565b9050600061272360775483613798565b9050600061274361273c6101208c016101008d01614f86565b86886137d9565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612881578e818151811061278857612788614c31565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156127ec573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b031610612838576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c3f9190614712565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128679083615283565b91508682106128795760019550612881565b60010161276d565b50846128a057604051639e8f5f6360e01b815260040160405180910390fd5b50505060008981526079602052604090208590555050871561291b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906129079085908d90614f00565b60405180910390a150505050505050610bfb565b6129258587613869565b61296461293860608c0160408d016141ad565b86607460009054906101000a90046001600160a01b03168d610100018036038101906117f29190614fa1565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b604051612995929190614f00565b60405180910390a15050505050505092915050565b610e4f82826120f0565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611025565b80821115612a31576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612ac4576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b399190614fd0565b603854600154612b499190614fd0565b1115610bba576000356001600160e01b0319166040516387f6f09560e01b8152600401610c3f9190614712565b828114612ba4576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612c1557828282818110612bc157612bc1614c31565b9050602002013560396000878785818110612bde57612bde614c31565b9050602002016020810190612bf391906141ad565b6001600160a01b03168152602081019190915260400160002055600101612ba7565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161182b94939291906150b9565b828114612c79576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612d2657620f4240838383818110612c9a57612c9a614c31565b905060200201351115612cc05760405163572d3bd360e11b815260040160405180910390fd5b828282818110612cd257612cd2614c31565b90506020020135603b6000878785818110612cef57612cef614c31565b9050602002016020810190612d0491906141ad565b6001600160a01b03168152602081019190915260400160002055600101612c7c565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161182b94939291906150b9565b828114612d8a576000356001600160e01b0319166040516306b5667560e21b8152600401610c3f9190614712565b60005b83811015612dfb57828282818110612da757612da7614c31565b90506020020135603c6000878785818110612dc457612dc4614c31565b9050602002016020810190612dd991906141ad565b6001600160a01b03168152602081019190915260400160002055600101612d8d565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161182b94939291906150b9565b6001600160a01b0382166000908152603a60205260408120548210612e5857506000610bfb565b6000612e676201518042615296565b6001600160a01b0385166000908152603e6020526040902054909150811115612ead5750506001600160a01b0382166000908152603c6020526040902054811015610bfb565b6001600160a01b0384166000908152603d6020526040902054612ed1908490615283565b6001600160a01b0385166000908152603c602052604090205411159150610bfb9050565b5092915050565b6000600254600160025484600154612f149190614fd0565b612f1e9190615283565b612f289190614fbd565b610bfb9190615296565b612f3a6121f5565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121d83390565b806001600160a01b03163b60000361108a57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c3f565b612fae81611bfb565b6001600160a01b0316336001600160a01b03161461108a576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c3f939291906152b8565b60006110f683836138f9565b60008061300d8360400151613923565b9050600061301e8460600151613923565b905060006130728560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f42406130d78385614fd0565b6110f69190615296565b806001600160a01b0316826001600160a01b03160361318e5760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061318957806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561316557600080fd5b505af1158015613179573d6000803e3d6000fd5b505050505061318984848461396b565b610cdc565b6000845160028111156131a3576131a3614766565b03613269576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156131ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061321391906152ef565b905084604001518110156132585761323b83308388604001516132369190614fbd565b6139ea565b61325857604051632f739fff60e11b815260040160405180910390fd5b61326385858561396b565b50610cdc565b60018451600281111561327e5761327e614766565b036132af5761329282848660200151613a8f565b6131895760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156132c4576132c4614766565b036132fa576132dd828486602001518760400151613ab6565b613189576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610bfb825490565b60006001600160e01b03198216635a05180f60e01b1480610bfb5750610bfb82613ae3565b61334c8282611839565b610e4f57613364816001600160a01b03166014613b18565b61336f836020613b18565b60405160200161338092919061532c565b60408051601f198184030181529082905262461bcd60e51b8252610c3f916004016153cd565b6133b08282611839565b610e4f5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006110f6836001600160a01b038416613cb3565b61344b8282611839565b15610e4f5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006110f6836001600160a01b038416613d02565b60005460ff16610bba5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c3f565b61350f81613df5565b8061351e575061351e81613e2c565b8061352d575061352d81613e54565b61108a5760405163034992a760e51b815260040160405180910390fd5b60006060818551600281111561356257613562614766565b0361363d5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b1790529151918516916135c991906153e0565b6000604051808303816000865af19150503d8060008114613606576040519150601f19603f3d011682016040523d82523d6000602084013e61360b565b606091505b5090925090508180156136365750805115806136365750808060200190518101906136369190615176565b9150613696565b60018551600281111561365257613652614766565b03613667576136368385308860200151613e7d565b60028551600281111561367c5761367c614766565b036132fa5761363683853088602001518960400151613f2b565b816136bc5784843085604051639d2e4c6760e01b8152600401610c3f94939291906153fc565b5050505050565b6137336040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b60208083019190915260228201859052604280830185905283518084039091018152606290920190925280519101206000906110f6565b60008060006137f0607d546001600160601b031690565b90506137fb81612efc565b9250600086600281111561381157613811614766565b03613860576001600160a01b03851660009081526039602052604090205484106138415761383e81613fdf565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138786201518042615296565b6001600160a01b0384166000908152603e60205260409020549091508111156138c7576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906138ef908490615283565b9091555050505050565b600082600001828154811061391057613910614c31565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000808451600281111561398157613981614766565b0361399c5761399582848660400151613ff7565b90506139c6565b6001845160028111156139b1576139b1614766565b036132fa576139958230858760200151613e7d565b80610cdc578383836040516341bd7d9160e11b8152600401610c3f93929190615432565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613a42916153e0565b6000604051808303816000865af19150503d8060008114613a7f576040519150601f19603f3d011682016040523d82523d6000602084013e613a84565b606091505b509095945050505050565b6000613a9d84308585613e7d565b9050806110f657613aaf8484846139ea565b90506110f6565b6000613ac58530868686613f2b565b905080613adb57613ad8858585856140ca565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610bfb57506301ffc9a760e01b6001600160e01b0319831614610bfb565b60606000613b27836002614fd0565b613b32906002615283565b6001600160401b03811115613b4957613b4961457c565b6040519080825280601f01601f191660200182016040528015613b73576020820181803683370190505b509050600360fc1b81600081518110613b8e57613b8e614c31565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bbd57613bbd614c31565b60200101906001600160f81b031916908160001a9053506000613be1846002614fd0565b613bec906001615283565b90505b6001811115613c64576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c2057613c20614c31565b1a60f81b828281518110613c3657613c36614c31565b60200101906001600160f81b031916908160001a90535060049490941c93613c5d81615462565b9050613bef565b5083156110f65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c3f565b6000818152600183016020526040812054613cfa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bfb565b506000610bfb565b60008181526001830160205260408120548015613deb576000613d26600183614fbd565b8554909150600090613d3a90600190614fbd565b9050818114613d9f576000866000018281548110613d5a57613d5a614c31565b9060005260206000200154905080876000018481548110613d7d57613d7d614c31565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613db057613db0615479565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bfb565b6000915050610bfb565b60008082516002811115613e0b57613e0b614766565b148015613e1c575060008260400151115b8015610bfb575050602001511590565b6000600182516002811115613e4357613e43614766565b148015610bfb575050604001511590565b6000600282516002811115613e6b57613e6b614766565b148015610bfb57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613edd916153e0565b6000604051808303816000865af19150503d8060008114613f1a576040519150601f19603f3d011682016040523d82523d6000602084013e613f1f565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613f5b9087908790879087906044810161548f565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613f9091906153e0565b6000604051808303816000865af19150503d8060008114613fcd576040519150601f19603f3d011682016040523d82523d6000602084013e613fd2565b606091505b5090979650505050505050565b6000603854600160385484603754612f149190614fd0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000926060929087169161405491906153e0565b6000604051808303816000865af19150503d8060008114614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b5090925090508180156140c15750805115806140c15750808060200190518101906140c19190615176565b95945050505050565b604080516000808252602082019092526001600160a01b038616906140f890869086908690604481016154d4565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613edd91906153e0565b60408051606081018252600080825260208201529081016141696040805160608101909152806000815260200160008152602001600081525090565b905290565b60006020828403121561418057600080fd5b81356001600160e01b0319811681146110f657600080fd5b6001600160a01b038116811461108a57600080fd5b6000602082840312156141bf57600080fd5b81356110f681614198565b60008083601f8401126141dc57600080fd5b5081356001600160401b038111156141f357600080fd5b6020830191508360208260051b85010111156118bc57600080fd5b6000806000806040858703121561422457600080fd5b84356001600160401b038082111561423b57600080fd5b614247888389016141ca565b9096509450602087013591508082111561426057600080fd5b5061426d878288016141ca565b95989497509550505050565b6000806000806000806060878903121561429257600080fd5b86356001600160401b03808211156142a957600080fd5b6142b58a838b016141ca565b909850965060208901359150808211156142ce57600080fd5b6142da8a838b016141ca565b909650945060408901359150808211156142f357600080fd5b5061430089828a016141ca565b979a9699509497509295939492505050565b80356119cd81614198565b60006020828403121561432f57600080fd5b5035919050565b6000806040838503121561434957600080fd5b82359150602083013561435b81614198565b809150509250929050565b600060a0828403121561437857600080fd5b50919050565b6000610160828403121561437857600080fd5b600080600061018084860312156143a757600080fd5b6143b1858561437e565b92506101608401356001600160401b03808211156143ce57600080fd5b818601915086601f8301126143e257600080fd5b8135818111156143f157600080fd5b87602060608302850101111561440657600080fd5b6020830194508093505050509250925092565b8060608101831015610bfb57600080fd5b8060808101831015610bfb57600080fd5b6000806000806000806000806000806101208b8d03121561445b57600080fd5b6144648b614312565b995061447260208c01614312565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b03808211156144aa57600080fd5b6144b68e838f01614419565b955060e08d01359150808211156144cc57600080fd5b6144d88e838f0161442a565b94506101008d01359150808211156144ef57600080fd5b506144fc8d828e016141ca565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561452857600080fd5b823561453381614198565b946020939093013593505050565b8035601081106119cd57600080fd5b6000806040838503121561456357600080fd5b61456c83614541565b9150602083013561435b81614198565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156145b4576145b461457c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145e2576145e261457c565b604052919050565b60006001600160401b038211156146035761460361457c565b5060051b60200190565b801515811461108a57600080fd5b60008060008060006060868803121561463357600080fd5b85356001600160401b038082111561464a57600080fd5b61465689838a016141ca565b909750955060209150878201358181111561467057600080fd5b61467c8a828b016141ca565b90965094505060408801358181111561469457600080fd5b88019050601f810189136146a757600080fd5b80356146ba6146b5826145ea565b6145ba565b81815260059190911b8201830190838101908b8311156146d957600080fd5b928401925b828410156147005783356146f18161460d565b825292840192908401906146de565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b6000806040838503121561473a57600080fd5b50508035926020909101359150565b6000610160828403121561475c57600080fd5b6110f6838361437e565b634e487b7160e01b600052602160045260246000fd5b6003811061478c5761478c614766565b9052565b60006040820190506147a382845161477c565b6020928301516001600160a01b0316919092015290565b600082601f8301126147cb57600080fd5b813560206147db6146b5836145ea565b8083825260208201915060208460051b8701019350868411156147fd57600080fd5b602086015b848110156148195780358352918301918301614802565b509695505050505050565b600082601f83011261483557600080fd5b81356001600160401b0381111561484e5761484e61457c565b614861601f8201601f19166020016145ba565b81815284602083860101111561487657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156148ab57600080fd5b85356148b681614198565b945060208601356148c681614198565b935060408601356001600160401b03808211156148e257600080fd5b6148ee89838a016147ba565b9450606088013591508082111561490457600080fd5b61491089838a016147ba565b9350608088013591508082111561492657600080fd5b5061493388828901614824565b9150509295509295909350565b60006020828403121561495257600080fd5b6110f682614541565b60008060008060008060006080888a03121561497657600080fd5b87356001600160401b038082111561498d57600080fd5b6149998b838c016141ca565b909950975060208a01359150808211156149b257600080fd5b6149be8b838c016141ca565b909750955060408a01359150808211156149d757600080fd5b6149e38b838c016141ca565b909550935060608a01359150808211156149fc57600080fd5b50614a098a828b0161442a565b91505092959891949750929550565b600080600080600060a08688031215614a3057600080fd5b8535614a3b81614198565b94506020860135614a4b81614198565b9350604086013592506060860135915060808601356001600160401b03811115614a7457600080fd5b61493388828901614824565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614adf57600080fd5b81516020614aef6146b5836145ea565b8083825260208201915060208460051b870101935086841115614b1157600080fd5b602086015b84811015614819578051614b2981614198565b8352918301918301614b16565b6001600160601b038116811461108a57600080fd5b600080600060608486031215614b6057600080fd5b83516001600160401b0380821115614b7757600080fd5b614b8387838801614ace565b9450602091508186015181811115614b9a57600080fd5b614ba688828901614ace565b945050604086015181811115614bbb57600080fd5b86019050601f81018713614bce57600080fd5b8051614bdc6146b5826145ea565b81815260059190911b82018301908381019089831115614bfb57600080fd5b928401925b82841015614c22578351614c1381614b36565b82529284019290840190614c00565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612ef557612ef5614c47565b8035600381106119cd57600080fd5b600060608284031215614c9e57600080fd5b614ca6614592565b9050614cb182614c7d565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614cdf57600080fd5b614ce7614592565b8235614cf281614198565b81526020830135614d0281614198565b6020820152614d148460408501614c8c565b60408201529392505050565b600060608284031215614d3257600080fd5b614d3a614592565b823560ff81168114614d4b57600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614d8157600080fd5b8301803591506001600160401b03821115614d9b57600080fd5b6020019150600581901b36038213156118bc57600080fd5b600060208284031215614dc557600080fd5b81356110f681614b36565b8035600281106119cd57600080fd5b600060608284031215614df157600080fd5b614df9614592565b90508135614e0681614198565b81526020820135614e1681614198565b806020830152506040820135604082015292915050565b60006101608284031215614e4057600080fd5b60405160a081018181106001600160401b0382111715614e6257614e6261457c565b60405282358152614e7560208401614dd0565b6020820152614e878460408501614ddf565b6040820152614e998460a08501614ddf565b6060820152614eac846101008501614c8c565b60808201529392505050565b6002811061478c5761478c614766565b8035614ed381614198565b6001600160a01b039081168352602082013590614eef82614198565b166020830152604090810135910152565b60006101808201905083825282356020830152614f1f60208401614dd0565b614f2c6040840182614eb8565b50614f3d6060830160408501614ec8565b614f4d60c0830160a08501614ec8565b610120614f68818401614f636101008701614c7d565b61477c565b61014081850135818501528085013561016085015250509392505050565b600060208284031215614f9857600080fd5b6110f682614c7d565b600060608284031215614fb357600080fd5b6110f68383614c8c565b81810381811115610bfb57610bfb614c47565b8082028115828204841417610bfb57610bfb614c47565b600060208284031215614ff957600080fd5b81356110f68161460d565b6001600160601b03828116828216039080821115612ef557612ef5614c47565b6010811061478c5761478c614766565b60208101610bfb8284615024565b6001600160e01b03198316815260408101600b831061506357615063614766565b8260208301529392505050565b8183526000602080850194508260005b858110156150ae57813561509381614198565b6001600160a01b031687529582019590820190600101615080565b509495945050505050565b6040815260006150cd604083018688615070565b82810360208401528381526001600160fb1b038411156150ec57600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061511960608301888a615070565b6020838203602085015261512e82888a615070565b848103604086015285815286925060200160005b868110156151675761515782614f6386614c7d565b9282019290820190600101615142565b509a9950505050505050505050565b60006020828403121561518857600080fd5b81516110f68161460d565b6000600182016151a5576151a5614c47565b5060010190565b6151b782825161477c565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516151f16040840182614eb8565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516152606101208401826151ac565b509392505050565b60006020828403121561527a57600080fd5b6110f682614dd0565b80820180821115610bfb57610bfb614c47565b6000826152b357634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016152d66020830185615024565b6001600160a01b03929092166040919091015292915050565b60006020828403121561530157600080fd5b5051919050565b60005b8381101561532357818101518382015260200161530b565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615364816017850160208801615308565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615395816028840160208801615308565b01602801949350505050565b600081518084526153b9816020860160208601615308565b601f01601f19169290920160200192915050565b6020815260006110f660208301846153a1565b600082516153f2818460208701615308565b9190910192915050565b60c0810161540a82876151ac565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161544082866151ac565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161547157615471614c47565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906154c9908301846153a1565b979650505050505050565b60018060a01b038516815283602082015282604082015260806060820152600061550160808301846153a1565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a2646970667358221220a2f9831a0e3d85059cd7b361f6be20ecc705006971478a7cb6c6bfef562802c064736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106103a65760003560e01c80638f34e347116101e7578063b9c362091161010d578063d64af2a6116100a0578063e400327c1161006f578063e400327c14610b2f578063e6a4561814610b4f578063e75235b814610b62578063f23a6e6114610b7a576103b5565b8063d64af2a614610aaf578063dafae40814610acf578063de981f1b14610aef578063dff525e114610b0f576103b5565b8063cdb67444116100dc578063cdb6744414610a1d578063d19773d214610a35578063d547741f14610a62578063d55ed10314610a82576103b5565b8063b9c3620914610991578063bc197c81146109b1578063c48549de146109dd578063ca15c873146109fd576103b5565b8063a217fddf11610185578063affed0e011610154578063affed0e014610901578063b1a2567e14610917578063b1d08a0314610937578063b297579414610964576103b5565b8063a217fddf1461089f578063a3912ec8146103b3578063ab796566146108b4578063ac78dfe8146108e1576103b5565b80639157921c116101c15780639157921c1461080a57806391d148541461082a57806393c5678f1461084a5780639dcc4da31461086a576103b5565b80638f34e347146107895780638f851d8a146107bd5780639010d07c146107ea576103b5565b806338e454b1116102cc578063504af48c1161026a5780636c1ce670116102395780636c1ce6701461071f5780637de5dedd1461073f5780638456cb5914610754578063865e6fd314610769576103b5565b8063504af48c1461069a57806359122f6b146106ad5780635c975abb146106da5780636932be98146106f2576103b5565b80634b14557e116102a65780634b14557e146106175780634d0d66731461062a5780634d493f4e1461064a5780634f4247a11461067a576103b5565b806338e454b1146105cd5780633e70838b146105e25780633f4ba83a14610602576103b5565b80631d4a7210116103445780632f2ff15d116103135780632f2ff15d14610561578063302d12db146105815780633644e5151461059857806336568abe146105ad576103b5565b80631d4a7210146104ce578063248a9ca3146104fb57806329b6eca91461052b5780632dfdf0b51461054b576103b5565b806317ce2dd41161038057806317ce2dd41461044a57806317fcb39b1461046e5780631a8e55b01461048e5780631b6e7594146104ae576103b5565b806301ffc9a7146103bd578063065b3adf146103f2578063110a83081461042a576103b5565b366103b5576103b3610ba6565b005b6103b3610ba6565b3480156103c957600080fd5b506103dd6103d83660046141d4565b610bda565b60405190151581526020015b60405180910390f35b3480156103fe57600080fd5b50600554610412906001600160a01b031681565b6040516001600160a01b0390911681526020016103e9565b34801561043657600080fd5b506103b3610445366004614213565b610c20565b34801561045657600080fd5b5061046060755481565b6040519081526020016103e9565b34801561047a57600080fd5b50607454610412906001600160a01b031681565b34801561049a57600080fd5b506103b36104a9366004614274565b610cc5565b3480156104ba57600080fd5b506103b36104c93660046142df565b610d01565b3480156104da57600080fd5b506104606104e9366004614213565b603e6020526000908152604090205481565b34801561050757600080fd5b50610460610516366004614383565b60009081526072602052604090206001015490565b34801561053757600080fd5b506103b3610546366004614213565b610d41565b34801561055757600080fd5b5061046060765481565b34801561056d57600080fd5b506103b361057c36600461439c565b610dca565b34801561058d57600080fd5b50610460620f424081565b3480156105a457600080fd5b50607754610460565b3480156105b957600080fd5b506103b36105c836600461439c565b610df4565b3480156105d957600080fd5b506103b3610e72565b3480156105ee57600080fd5b506103b36105fd366004614213565b61104f565b34801561060e57600080fd5b506103b3611079565b6103b36106253660046143cc565b611089565b34801561063657600080fd5b506103dd6106453660046143f7565b6110ac565b34801561065657600080fd5b506103dd610665366004614383565b607a6020526000908152604090205460ff1681565b34801561068657600080fd5b50607f54610412906001600160a01b031681565b6103b36106a83660046144a1565b61111c565b3480156106b957600080fd5b506104606106c8366004614213565b603a6020526000908152604090205481565b3480156106e657600080fd5b5060005460ff166103dd565b3480156106fe57600080fd5b5061046061070d366004614383565b60796020526000908152604090205481565b34801561072b57600080fd5b506103dd61073a36600461457b565b6113e2565b34801561074b57600080fd5b506104606113ee565b34801561076057600080fd5b506103b361140f565b34801561077557600080fd5b506103b36107843660046145b6565b61141f565b34801561079557600080fd5b506104607f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107c957600080fd5b506107dd6107d8366004614681565b61143a565b6040516103e99190614778565b3480156107f657600080fd5b5061041261080536600461478d565b6115bc565b34801561081657600080fd5b506103b36108253660046147af565b6115d4565b34801561083657600080fd5b506103dd61084536600461439c565b611858565b34801561085657600080fd5b506103b3610865366004614274565b611883565b34801561087657600080fd5b5061088a61088536600461478d565b6118b9565b604080519283526020830191909152016103e9565b3480156108ab57600080fd5b50610460600081565b3480156108c057600080fd5b506104606108cf366004614213565b603c6020526000908152604090205481565b3480156108ed57600080fd5b506103dd6108fc366004614383565b6118e2565b34801561090d57600080fd5b5061046060045481565b34801561092357600080fd5b506103b3610932366004614274565b611918565b34801561094357600080fd5b50610460610952366004614213565b60396020526000908152604090205481565b34801561097057600080fd5b5061098461097f366004614213565b61194e565b6040516103e991906147f6565b34801561099d57600080fd5b506103b36109ac36600461478d565b6119f1565b3480156109bd57600080fd5b506107dd6109cc3660046148f9565b63bc197c8160e01b95945050505050565b3480156109e957600080fd5b506107dd6109f8366004614274565b611a0b565b348015610a0957600080fd5b50610460610a18366004614383565b611b9f565b348015610a2957600080fd5b5060375460385461088a565b348015610a4157600080fd5b50610460610a50366004614213565b603b6020526000908152604090205481565b348015610a6e57600080fd5b506103b3610a7d36600461439c565b611bb6565b348015610a8e57600080fd5b50610460610a9d366004614213565b603d6020526000908152604090205481565b348015610abb57600080fd5b506103b3610aca366004614213565b611bdb565b348015610adb57600080fd5b506103dd610aea366004614383565b611bec565b348015610afb57600080fd5b50610412610b0a3660046149a6565b611c1a565b348015610b1b57600080fd5b506103b3610b2a3660046149c1565b611c90565b348015610b3b57600080fd5b506103b3610b4a366004614274565b611d05565b6103b3610b5d366004614a7e565b611d3b565b348015610b6e57600080fd5b5060015460025461088a565b348015610b8657600080fd5b506107dd610b95366004614af2565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bc95750607f546001600160a01b031633145b15610bd057565b610bd8611d82565b565b60006001600160e01b03198216631dcdd2c760e31b1480610c0b57506001600160e01b031982166312c0151560e21b145b80610c1a5750610c1a82611dac565b92915050565b607154600490610100900460ff16158015610c42575060715460ff8083169116105b610c675760405162461bcd60e51b8152600401610c5e90614b5a565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff19909316831717169091556040519081526000805160206155e6833981519152906020015b60405180910390a15050565b610ccd611dd1565b6000839003610cef576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484611e2b565b50505050565b610d09611dd1565b6000859003610d2b576040516316ee9d3b60e11b815260040160405180910390fd5b610d39868686868686611f00565b505050505050565b607154600290610100900460ff16158015610d63575060715460ff8083169116105b610d7f5760405162461bcd60e51b8152600401610c5e90614b5a565b6071805461ffff191660ff831617610100179055610d9e600b836120a8565b6071805461ff001916905560405160ff821681526000805160206155e683398151915290602001610cb9565b600082815260726020526040902060010154610de58161214c565b610def8383612156565b505050565b6001600160a01b0381163314610e645760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c5e565b610e6e8282612178565b5050565b607154600390610100900460ff16158015610e94575060715460ff8083169116105b610eb05760405162461bcd60e51b8152600401610c5e90614b5a565b6071805461ffff191660ff8316176101001790556000610ed0600b611c1a565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610f13573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f3b9190810190614c25565b92509250506000805b8351811015610ff857828181518110610f5f57610f5f614d0b565b6020026020010151607e6000868481518110610f7d57610f7d614d0b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fdb57610fdb614d0b565b602002602001015182610fee9190614d37565b9150600101610f44565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff821681526000805160206155e6833981519152906020015b60405180910390a150565b611057611dd1565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61108161219a565b610bd8612209565b61109161225b565b6110a96110a336839003830183614da7565b336122a1565b50565b60006110b661225b565b611112848484808060200260200160405190810160405280939291908181526020016000905b82821015611108576110f960608302860136819003810190614dfa565b815260200190600101906110dc565b505050505061257c565b90505b9392505050565b607154610100900460ff161580801561113c5750607154600160ff909116105b806111565750303b158015611156575060715460ff166001145b6111725760405162461bcd60e51b8152600401610c5e90614b5a565b6071805460ff191660011790558015611195576071805461ff0019166101001790555b6111a060008c612a10565b60758990556111ae8a612a1a565b6112396040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112438887612a68565b61124d8787612af8565b5050611257612b8f565b60006112638680614e44565b905011156113245761128c6112788680614e44565b6112856020890189614e44565b8787611f00565b6112b26112998680614e44565b8660005b6020028101906112ad9190614e44565b612bdc565b6112d86112bf8680614e44565b8660015b6020028101906112d39190614e44565b611e2b565b6112fe6112e58680614e44565b8660025b6020028101906112f99190614e44565b612cb1565b61132461130b8680614e44565b8660035b60200281019061131f9190614e44565b612dc2565b60005b6113346040870187614e44565b90508110156113a0576113987f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461136e6040890189614e44565b8481811061137e5761137e614d0b565b90506020020160208101906113939190614213565b612156565b600101611327565b5080156113d5576071805461ff0019169055604051600181526000805160206155e68339815191529060200160405180910390a15b5050505050505050505050565b60006111158383612e97565b600061140a611405607d546001600160601b031690565b612f62565b905090565b61141761219a565b610bd8612f98565b611427611dd1565b61143081612fd5565b610e6e82826120a8565b6000600b6114478161300b565b82518690811415806114595750808514155b15611485576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b8060000361149d57506347c28ec560e11b91506115b2565b60005b818110156115a5578481815181106114ba576114ba614d0b565b60200260200101511561159d578686828181106114d9576114d9614d0b565b90506020020160208101906114ee9190614e8d565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061152557611525614d0b565b905060200201602081019061153a9190614e8d565b607e60008b8b8581811061155057611550614d0b565b90506020020160208101906115659190614213565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b6001016114a0565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206111159083613057565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115fe8161214c565b600061161761161236859003850185614f07565b613063565b905061162b61161236859003850185614f07565b83356000908152607960205260409020541461165a5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661168b5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116d59083908690614fda565b60405180910390a160006116ef6080850160608601614213565b9050600061170561012086016101008701615060565b6002811115611716576117166147cc565b036117dd576000611730368690038601610100870161507b565b6001600160a01b0383166000908152603b602052604090205490915061175c906101408701359061312d565b60408201526000611776368790038701610100880161507b565b604083015190915061178d90610140880135615097565b60408201526074546117ad908390339086906001600160a01b0316613147565b6117d66117c06060880160408901614213565b60745483919086906001600160a01b0316613147565b5050611819565b6118196117f06060860160408701614213565b60745483906001600160a01b03166118113689900389016101008a0161507b565b929190613147565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161184a929190614fda565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61188b611dd1565b60008390036118ad576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612bdc565b6000806118c4611dd1565b6118ce8484612af8565b90925090506118db612b8f565b9250929050565b60006118f6607d546001600160601b031690565b60375461190391906150aa565b60385461191090846150aa565b101592915050565b611920611dd1565b6000839003611942576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612cb1565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561199c5761199c6147cc565b60028111156119ad576119ad6147cc565b815290546001600160a01b03610100909104811660209283015290820151919250166119ec57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119f9611dd1565b611a038282612a68565b610e6e612b8f565b6000600b611a188161300b565b84838114611a47576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b80600003611a5f5750636242a4ef60e11b9150611b96565b6000805b82811015611b4657868682818110611a7d57611a7d614d0b565b9050602002016020810190611a9291906150c1565b15611b3e57607e60008a8a84818110611aad57611aad614d0b565b9050602002016020810190611ac29190614213565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611b0157611b01614d0b565b9050602002016020810190611b169190614213565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a63565b50607d8054829190600090611b659084906001600160601b03166150de565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610c1a90613379565b600082815260726020526040902060010154611bd18161214c565b610def8383612178565b611be3611dd1565b6110a981612a1a565b6000611c00607d546001600160601b031690565b600154611c0d91906150aa565b60025461191090846150aa565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c5157611c516147cc565b60ff1681526020810191909152604001600020546001600160a01b03169050806119ec578160405163409140df60e11b8152600401610c5e919061510e565b611c98611dd1565b6000869003611cba576040516316ee9d3b60e11b815260040160405180910390fd5b611cc8878787878787611f00565b611cd5878783600061129d565b611ce287878360016112c3565b611cef87878360026112e9565b611cfc878783600361130f565b50505050505050565b611d0d611dd1565b6000839003611d2f576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612dc2565b611d4361225b565b8060005b81811015610cfb57611d7a848483818110611d6457611d64614d0b565b905060a002018036038101906110a39190614da7565b600101611d47565b611d8a61225b565b611d92614193565b3381526040808201513491015280516110a99082906122a1565b60006001600160e01b03198216630271189760e51b1480610c1a5750610c1a82613383565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bd8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c5e92919061511c565b828114611e59576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015611eca57828282818110611e7657611e76614d0b565b90506020020135603a6000878785818110611e9357611e93614d0b565b9050602002016020810190611ea89190614213565b6001600160a01b03168152602081019190915260400160002055600101611e5c565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161184a9493929190615193565b8483148015611f0e57508481145b611f39576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b8581101561205e57848482818110611f5657611f56614d0b565b9050602002016020810190611f6b9190614213565b60786000898985818110611f8157611f81614d0b565b9050602002016020810190611f969190614213565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611fde57611fde614d0b565b9050602002016020810190611ff39190615060565b6078600089898581811061200957612009614d0b565b905060200201602081019061201e9190614213565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115612051576120516147cc565b0217905550600101611f3c565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444868686868686604051612098969594939291906151df565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156120de576120de6147cc565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561211f5761211f6147cc565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6110a981336133a8565b612160828261340c565b6000828152607360205260409020610def9082613492565b61218282826134a7565b6000828152607360205260409020610def908261350e565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806121dc57506005546001600160a01b031633145b610bd8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c5e92919061511c565b612211613523565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bd85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c5e565b604080518082018252600080825260208201526074549184015190916001600160a01b0316906122d09061356c565b60208401516001600160a01b031661237157348460400151604001511461230a5760405163129c2ce160e31b815260040160405180910390fd5b6123138161194e565b604085015151909250600281111561232d5761232d6147cc565b82516002811115612340576123406147cc565b1461235d5760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152612509565b34156123905760405163129c2ce160e31b815260040160405180910390fd5b61239d846020015161194e565b60408501515190925060028111156123b7576123b76147cc565b825160028111156123ca576123ca6147cc565b146123e75760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516123fc9185906135b0565b83602001516001600160a01b0316816001600160a01b03160361250957607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249b9190615250565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124d69160040190815260200190565b600060405180830381600087803b1580156124f057600080fd5b505af1158015612504573d6000803e3d6000fd5b505050505b607680546000918261251a8361526d565b9190505590506000612541858386602001516075548a61372990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61256d82613063565b826040516120989291906152a6565b60008235610140840135826125976080870160608801614213565b90506125b46125af368890038801610100890161507b565b61356c565b60016125c66040880160208901615342565b60018111156125d7576125d76147cc565b146125f55760405163182f3d8760e11b815260040160405180910390fd5b608086013546146126375760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c5e565b600061264c61097f6080890160608a01614213565b905061266061012088016101008901615060565b6002811115612671576126716147cc565b81516002811115612684576126846147cc565b1480156126b5575061269c60e0880160c08901614213565b6001600160a01b031681602001516001600160a01b0316145b80156126c6575060755460e0880135145b6126e35760405163f4b8742f60e01b815260040160405180910390fd5b6000848152607960205260409020541561271057604051634f13df6160e01b815260040160405180910390fd5b600161272461012089016101008a01615060565b6002811115612735576127356147cc565b148061274857506127468284612e97565b155b6127655760405163c51297b760e01b815260040160405180910390fd5b6000612779611612368a90038a018a614f07565b90506000612789607754836137fe565b905060006127a96127a26101208c016101008d01615060565b868861383f565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156128e7578e81815181106127ee576127ee614d0b565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa158015612852573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061289e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c5e9190614778565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128cd908361535d565b91508682106128df57600195506128e7565b6001016127d3565b508461290657604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612981576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc9061296d9085908d90614fda565b60405180910390a150505050505050610c1a565b61298b85876138cf565b6129ca61299e60608c0160408d01614213565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611811919061507b565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516129fb929190614fda565b60405180910390a15050505050505092915050565b610e6e8282612156565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611044565b80821115612a97576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612b2a576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b9f91906150aa565b603854600154612baf91906150aa565b1115610bd8576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b828114612c0a576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612c7b57828282818110612c2757612c27614d0b565b9050602002013560396000878785818110612c4457612c44614d0b565b9050602002016020810190612c599190614213565b6001600160a01b03168152602081019190915260400160002055600101612c0d565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161184a9493929190615193565b828114612cdf576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612d8c57620f4240838383818110612d0057612d00614d0b565b905060200201351115612d265760405163572d3bd360e11b815260040160405180910390fd5b828282818110612d3857612d38614d0b565b90506020020135603b6000878785818110612d5557612d55614d0b565b9050602002016020810190612d6a9190614213565b6001600160a01b03168152602081019190915260400160002055600101612ce2565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161184a9493929190615193565b828114612df0576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612e6157828282818110612e0d57612e0d614d0b565b90506020020135603c6000878785818110612e2a57612e2a614d0b565b9050602002016020810190612e3f9190614213565b6001600160a01b03168152602081019190915260400160002055600101612df3565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161184a9493929190615193565b6001600160a01b0382166000908152603a60205260408120548210612ebe57506000610c1a565b6000612ecd6201518042615370565b6001600160a01b0385166000908152603e6020526040902054909150811115612f135750506001600160a01b0382166000908152603c6020526040902054811015610c1a565b6001600160a01b0384166000908152603d6020526040902054612f3790849061535d565b6001600160a01b0385166000908152603c602052604090205411159150610c1a9050565b5092915050565b6000600254600160025484600154612f7a91906150aa565b612f84919061535d565b612f8e9190615097565b610c1a9190615370565b612fa061225b565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861223e3390565b806001600160a01b03163b6000036110a957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c5e565b61301481611c1a565b6001600160a01b0316336001600160a01b0316146110a9576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c5e93929190615392565b6000611115838361395f565b6000806130738360400151613989565b905060006130848460600151613989565b905060006130d88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061313d83856150aa565b6111159190615370565b806001600160a01b0316826001600160a01b0316036131f45760408085015190516001600160a01b0385169180156108fc02916000818181858888f193505050506131ef57806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156131cb57600080fd5b505af11580156131df573d6000803e3d6000fd5b50505050506131ef8484846139d1565b610cfb565b600084516002811115613209576132096147cc565b036132cf576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015613255573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327991906153c9565b905084604001518110156132be576132a1833083886040015161329c9190615097565b613a50565b6132be57604051632f739fff60e11b815260040160405180910390fd5b6132c98585856139d1565b50610cfb565b6001845160028111156132e4576132e46147cc565b03613315576132f882848660200151613af5565b6131ef5760405163c8e3a09f60e01b815260040160405180910390fd5b60028451600281111561332a5761332a6147cc565b0361336057613343828486602001518760400151613b1c565b6131ef576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610c1a825490565b60006001600160e01b03198216635a05180f60e01b1480610c1a5750610c1a82613b49565b6133b28282611858565b610e6e576133ca816001600160a01b03166014613b7e565b6133d5836020613b7e565b6040516020016133e6929190615406565b60408051601f198184030181529082905262461bcd60e51b8252610c5e916004016154a7565b6134168282611858565b610e6e5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561344e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611115836001600160a01b038416613d19565b6134b18282611858565b15610e6e5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611115836001600160a01b038416613d68565b60005460ff16610bd85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c5e565b61357581613e5b565b80613584575061358481613e92565b80613593575061359381613eba565b6110a95760405163034992a760e51b815260040160405180910390fd5b6000606081855160028111156135c8576135c86147cc565b036136a35760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b17905291519185169161362f91906154ba565b6000604051808303816000865af19150503d806000811461366c576040519150601f19603f3d011682016040523d82523d6000602084013e613671565b606091505b50909250905081801561369c57508051158061369c57508080602001905181019061369c9190615250565b91506136fc565b6001855160028111156136b8576136b86147cc565b036136cd5761369c8385308860200151613ee3565b6002855160028111156136e2576136e26147cc565b036133605761369c83853088602001518960400151613f91565b816137225784843085604051639d2e4c6760e01b8152600401610c5e94939291906154d6565b5050505050565b6137996040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090611115565b6000806000613856607d546001600160601b031690565b905061386181612f62565b92506000866002811115613877576138776147cc565b036138c6576001600160a01b03851660009081526039602052604090205484106138a7576138a481614045565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138de6201518042615370565b6001600160a01b0384166000908152603e602052604090205490915081111561392d576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061395590849061535d565b9091555050505050565b600082600001828154811061397657613976614d0b565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160028111156139e7576139e76147cc565b03613a02576139fb8284866040015161405d565b9050613a2c565b600184516002811115613a1757613a176147cc565b03613360576139fb8230858760200151613ee3565b80610cfb578383836040516341bd7d9160e11b8152600401610c5e9392919061550c565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613aa8916154ba565b6000604051808303816000865af19150503d8060008114613ae5576040519150601f19603f3d011682016040523d82523d6000602084013e613aea565b606091505b509095945050505050565b6000613b0384308585613ee3565b90508061111557613b15848484613a50565b9050611115565b6000613b2b8530868686613f91565b905080613b4157613b3e85858585614130565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610c1a57506301ffc9a760e01b6001600160e01b0319831614610c1a565b60606000613b8d8360026150aa565b613b9890600261535d565b6001600160401b03811115613baf57613baf6145e2565b6040519080825280601f01601f191660200182016040528015613bd9576020820181803683370190505b509050600360fc1b81600081518110613bf457613bf4614d0b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613c2357613c23614d0b565b60200101906001600160f81b031916908160001a9053506000613c478460026150aa565b613c5290600161535d565b90505b6001811115613cca576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c8657613c86614d0b565b1a60f81b828281518110613c9c57613c9c614d0b565b60200101906001600160f81b031916908160001a90535060049490941c93613cc38161553c565b9050613c55565b5083156111155760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c5e565b6000818152600183016020526040812054613d6057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c1a565b506000610c1a565b60008181526001830160205260408120548015613e51576000613d8c600183615097565b8554909150600090613da090600190615097565b9050818114613e05576000866000018281548110613dc057613dc0614d0b565b9060005260206000200154905080876000018481548110613de357613de3614d0b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e1657613e16615553565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c1a565b6000915050610c1a565b60008082516002811115613e7157613e716147cc565b148015613e82575060008260400151115b8015610c1a575050602001511590565b6000600182516002811115613ea957613ea96147cc565b148015610c1a575050604001511590565b6000600282516002811115613ed157613ed16147cc565b148015610c1a57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613f43916154ba565b6000604051808303816000865af19150503d8060008114613f80576040519150601f19603f3d011682016040523d82523d6000602084013e613f85565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613fc190879087908790879060448101615569565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613ff691906154ba565b6000604051808303816000865af19150503d8060008114614033576040519150601f19603f3d011682016040523d82523d6000602084013e614038565b606091505b5090979650505050505050565b6000603854600160385484603754612f7a91906150aa565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916140ba91906154ba565b6000604051808303816000865af19150503d80600081146140f7576040519150601f19603f3d011682016040523d82523d6000602084013e6140fc565b606091505b5090925090508180156141275750805115806141275750808060200190518101906141279190615250565b95945050505050565b604080516000808252602082019092526001600160a01b0386169061415e90869086908690604481016155ae565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613f4391906154ba565b60408051606081018252600080825260208201529081016141cf6040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156141e657600080fd5b81356001600160e01b03198116811461111557600080fd5b6001600160a01b03811681146110a957600080fd5b60006020828403121561422557600080fd5b8135611115816141fe565b60008083601f84011261424257600080fd5b5081356001600160401b0381111561425957600080fd5b6020830191508360208260051b85010111156118db57600080fd5b6000806000806040858703121561428a57600080fd5b84356001600160401b03808211156142a157600080fd5b6142ad88838901614230565b909650945060208701359150808211156142c657600080fd5b506142d387828801614230565b95989497509550505050565b600080600080600080606087890312156142f857600080fd5b86356001600160401b038082111561430f57600080fd5b61431b8a838b01614230565b9098509650602089013591508082111561433457600080fd5b6143408a838b01614230565b9096509450604089013591508082111561435957600080fd5b5061436689828a01614230565b979a9699509497509295939492505050565b80356119ec816141fe565b60006020828403121561439557600080fd5b5035919050565b600080604083850312156143af57600080fd5b8235915060208301356143c1816141fe565b809150509250929050565b600060a082840312156143de57600080fd5b50919050565b600061016082840312156143de57600080fd5b6000806000610180848603121561440d57600080fd5b61441785856143e4565b92506101608401356001600160401b038082111561443457600080fd5b818601915086601f83011261444857600080fd5b81358181111561445757600080fd5b87602060608302850101111561446c57600080fd5b6020830194508093505050509250925092565b8060608101831015610c1a57600080fd5b8060808101831015610c1a57600080fd5b6000806000806000806000806000806101208b8d0312156144c157600080fd5b6144ca8b614378565b99506144d860208c01614378565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b038082111561451057600080fd5b61451c8e838f0161447f565b955060e08d013591508082111561453257600080fd5b61453e8e838f01614490565b94506101008d013591508082111561455557600080fd5b506145628d828e01614230565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561458e57600080fd5b8235614599816141fe565b946020939093013593505050565b8035601081106119ec57600080fd5b600080604083850312156145c957600080fd5b6145d2836145a7565b915060208301356143c1816141fe565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171561461a5761461a6145e2565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614648576146486145e2565b604052919050565b60006001600160401b03821115614669576146696145e2565b5060051b60200190565b80151581146110a957600080fd5b60008060008060006060868803121561469957600080fd5b85356001600160401b03808211156146b057600080fd5b6146bc89838a01614230565b90975095506020915087820135818111156146d657600080fd5b6146e28a828b01614230565b9096509450506040880135818111156146fa57600080fd5b88019050601f8101891361470d57600080fd5b803561472061471b82614650565b614620565b81815260059190911b8201830190838101908b83111561473f57600080fd5b928401925b8284101561476657833561475781614673565b82529284019290840190614744565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b600080604083850312156147a057600080fd5b50508035926020909101359150565b600061016082840312156147c257600080fd5b61111583836143e4565b634e487b7160e01b600052602160045260246000fd5b600381106147f2576147f26147cc565b9052565b60006040820190506148098284516147e2565b6020928301516001600160a01b0316919092015290565b600082601f83011261483157600080fd5b8135602061484161471b83614650565b8083825260208201915060208460051b87010193508684111561486357600080fd5b602086015b8481101561487f5780358352918301918301614868565b509695505050505050565b600082601f83011261489b57600080fd5b81356001600160401b038111156148b4576148b46145e2565b6148c7601f8201601f1916602001614620565b8181528460208386010111156148dc57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561491157600080fd5b853561491c816141fe565b9450602086013561492c816141fe565b935060408601356001600160401b038082111561494857600080fd5b61495489838a01614820565b9450606088013591508082111561496a57600080fd5b61497689838a01614820565b9350608088013591508082111561498c57600080fd5b506149998882890161488a565b9150509295509295909350565b6000602082840312156149b857600080fd5b611115826145a7565b60008060008060008060006080888a0312156149dc57600080fd5b87356001600160401b03808211156149f357600080fd5b6149ff8b838c01614230565b909950975060208a0135915080821115614a1857600080fd5b614a248b838c01614230565b909750955060408a0135915080821115614a3d57600080fd5b614a498b838c01614230565b909550935060608a0135915080821115614a6257600080fd5b50614a6f8a828b01614490565b91505092959891949750929550565b60008060208385031215614a9157600080fd5b82356001600160401b0380821115614aa857600080fd5b818501915085601f830112614abc57600080fd5b813581811115614acb57600080fd5b86602060a083028501011115614ae057600080fd5b60209290920196919550909350505050565b600080600080600060a08688031215614b0a57600080fd5b8535614b15816141fe565b94506020860135614b25816141fe565b9350604086013592506060860135915060808601356001600160401b03811115614b4e57600080fd5b6149998882890161488a565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614bb957600080fd5b81516020614bc961471b83614650565b8083825260208201915060208460051b870101935086841115614beb57600080fd5b602086015b8481101561487f578051614c03816141fe565b8352918301918301614bf0565b6001600160601b03811681146110a957600080fd5b600080600060608486031215614c3a57600080fd5b83516001600160401b0380821115614c5157600080fd5b614c5d87838801614ba8565b9450602091508186015181811115614c7457600080fd5b614c8088828901614ba8565b945050604086015181811115614c9557600080fd5b86019050601f81018713614ca857600080fd5b8051614cb661471b82614650565b81815260059190911b82018301908381019089831115614cd557600080fd5b928401925b82841015614cfc578351614ced81614c10565b82529284019290840190614cda565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612f5b57612f5b614d21565b8035600381106119ec57600080fd5b600060608284031215614d7857600080fd5b614d806145f8565b9050614d8b82614d57565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614db957600080fd5b614dc16145f8565b8235614dcc816141fe565b81526020830135614ddc816141fe565b6020820152614dee8460408501614d66565b60408201529392505050565b600060608284031215614e0c57600080fd5b614e146145f8565b823560ff81168114614e2557600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614e5b57600080fd5b8301803591506001600160401b03821115614e7557600080fd5b6020019150600581901b36038213156118db57600080fd5b600060208284031215614e9f57600080fd5b813561111581614c10565b8035600281106119ec57600080fd5b600060608284031215614ecb57600080fd5b614ed36145f8565b90508135614ee0816141fe565b81526020820135614ef0816141fe565b806020830152506040820135604082015292915050565b60006101608284031215614f1a57600080fd5b60405160a081018181106001600160401b0382111715614f3c57614f3c6145e2565b60405282358152614f4f60208401614eaa565b6020820152614f618460408501614eb9565b6040820152614f738460a08501614eb9565b6060820152614f86846101008501614d66565b60808201529392505050565b600281106147f2576147f26147cc565b8035614fad816141fe565b6001600160a01b039081168352602082013590614fc9826141fe565b166020830152604090810135910152565b60006101808201905083825282356020830152614ff960208401614eaa565b6150066040840182614f92565b506150176060830160408501614fa2565b61502760c0830160a08501614fa2565b61012061504281840161503d6101008701614d57565b6147e2565b61014081850135818501528085013561016085015250509392505050565b60006020828403121561507257600080fd5b61111582614d57565b60006060828403121561508d57600080fd5b6111158383614d66565b81810381811115610c1a57610c1a614d21565b8082028115828204841417610c1a57610c1a614d21565b6000602082840312156150d357600080fd5b813561111581614673565b6001600160601b03828116828216039080821115612f5b57612f5b614d21565b601081106147f2576147f26147cc565b60208101610c1a82846150fe565b6001600160e01b03198316815260408101600b831061513d5761513d6147cc565b8260208301529392505050565b8183526000602080850194508260005b8581101561518857813561516d816141fe565b6001600160a01b03168752958201959082019060010161515a565b509495945050505050565b6040815260006151a760408301868861514a565b82810360208401528381526001600160fb1b038411156151c657600080fd5b8360051b80866020840137016020019695505050505050565b6060815260006151f360608301888a61514a565b6020838203602085015261520882888a61514a565b848103604086015285815286925060200160005b86811015615241576152318261503d86614d57565b928201929082019060010161521c565b509a9950505050505050505050565b60006020828403121561526257600080fd5b815161111581614673565b60006001820161527f5761527f614d21565b5060010190565b6152918282516147e2565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516152cb6040840182614f92565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e0840152604081015161010084015250608083015161533a610120840182615286565b509392505050565b60006020828403121561535457600080fd5b61111582614eaa565b80820180821115610c1a57610c1a614d21565b60008261538d57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016153b060208301856150fe565b6001600160a01b03929092166040919091015292915050565b6000602082840312156153db57600080fd5b5051919050565b60005b838110156153fd5781810151838201526020016153e5565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161543e8160178501602088016153e2565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161546f8160288401602088016153e2565b01602801949350505050565b600081518084526154938160208601602086016153e2565b601f01601f19169290920160200192915050565b602081526000611115602083018461547b565b600082516154cc8184602087016153e2565b9190910192915050565b60c081016154e48287615286565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161551a8286615286565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161554b5761554b614d21565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906155a39083018461547b565b979650505050505050565b60018060a01b03851681528360208201528260408201526080606082015260006155db608083018461547b565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a26469706673582212201e2ed98411cda98706015cdbeb9e494126a836fe1b19bb440229c826fa07419564736f6c63430008170033", "deployer": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", "devdoc": { "version": 1, @@ -2426,6 +2473,9 @@ "requestDepositFor((address,address,(uint8,uint256,uint256)))": { "details": "Locks the assets and request deposit." }, + "requestDepositForBatch((address,address,(uint8,uint256,uint256))[])": { + "details": "Locks the assets and request deposit for batch." + }, "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. May emit a {RoleRevoked} event." }, @@ -2697,13 +2747,13 @@ } }, "isFoundry": true, - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC1155MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForApprovedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForInsufficientVoteWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForProcessedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrReachedDailyWithdrawalLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum TokenStandard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"wethUnwrapper_\",\"type\":\"address\"}],\"name\":\"initializeV4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"},{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsAdded\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"removeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsRemoved\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wethUnwrapper\",\"outputs\":[{\"internalType\":\"contract WethUnwrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC1155MintingFailed()\":[{\"details\":\"Error indicating that the mint of ERC1155 tokens has failed.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidPercentage()\":[{\"details\":\"Error of invalid percentage.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForApprovedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for an approved withdrawal.\"}],\"ErrQueryForInsufficientVoteWeight()\":[{\"details\":\"Error indicating that a query was made for insufficient vote weight.\"}],\"ErrQueryForProcessedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for a processed withdrawal.\"}],\"ErrReachedDailyWithdrawalLimit()\":[{\"details\":\"Error indicating that the daily withdrawal limit has been reached.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `handleAssetIn` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"DailyWithdrawalLimitsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the daily limit thresholds are updated\"},\"DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the deposit is requested\"},\"HighTierThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\"},\"HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the high-tier vote weight threshold is updated\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LockedThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for locked withdrawals are updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"TokenMapped(address[],address[],uint8[])\":{\"details\":\"Emitted when the tokens are mapped\"},\"UnlockFeePercentagesUpdated(address[],uint256[])\":{\"details\":\"Emitted when the fee percentages to unlock withdraw are updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is locked\"},\"WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is unlocked\"},\"Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are withdrawn\"},\"WrappedNativeTokenContractUpdated(address)\":{\"details\":\"Emitted when the wrapped native token contract is updated\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"onBridgeOperatorsAdded(address[],uint96[],bool[])\":{\"details\":\"Handles the event when bridge operators are added.\",\"params\":{\"addeds\":\"The corresponding boolean values indicating whether the operators were added or not.\",\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"onBridgeOperatorsRemoved(address[],bool[])\":{\"details\":\"Handles the event when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\",\"removeds\":\"The corresponding boolean values indicating whether the operators were removed or not.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"______deprecatedBridgeOperatorAddedBlock\":{\"custom:deprecated\":\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\"},\"______deprecatedBridgeOperators\":{\"custom:deprecated\":\"Previously `_bridgeOperators` (uint256[])\"},\"_domainSeparator\":{\"details\":\"Domain separator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainGatewayV3.sol\":\"MainchainGatewayV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\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 ReentrancyGuard {\\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 constructor() {\\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 making 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}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(\\n address account,\\n uint256 id,\\n uint256 value\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(\\n address account,\\n uint256[] memory ids,\\n uint256[] memory values\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../extensions/ERC1155Burnable.sol\\\";\\nimport \\\"../extensions/ERC1155Pausable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerable.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev {ERC1155} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n *\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\n */\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\n * deploys the contract.\\n */\\n constructor(string memory uri) ERC1155(uri) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\n *\\n * See {ERC1155-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mint(to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\n */\\n function mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControlEnumerable, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\n uint256 prevNum = _num;\\n uint256 prevDenom = _denom;\\n _num = num;\\n _denom = denom;\\n unchecked {\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/WethUnwrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\ncontract WethUnwrapper is ReentrancyGuard {\\n IWETH public immutable weth;\\n\\n error ErrCannotTransferFrom();\\n error ErrNotWrappedContract();\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\n\\n constructor(address weth_) {\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\n weth = IWETH(weth_);\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n function unwrap(uint256 amount) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(msg.sender), amount);\\n }\\n\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(to), amount);\\n }\\n\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\n if (!success) revert ErrCannotTransferFrom();\\n\\n weth.withdraw(amount);\\n }\\n\\n function _sendNativeTo(address payable to, uint256 val) internal {\\n (bool success,) = to.call{ value: val }(\\\"\\\");\\n if (!success) {\\n revert ErrExternalCallFailed(to, msg.sig);\\n }\\n }\\n\\n function _fallback() internal view {\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\n }\\n}\\n\",\"keccak256\":\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\",\"license\":\"MIT\"},\"src/extensions/WithdrawalLimitation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./GatewayV3.sol\\\";\\n\\nabstract contract WithdrawalLimitation is GatewayV3 {\\n /// @dev Error of invalid percentage.\\n error ErrInvalidPercentage();\\n\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\n event HighTierVoteWeightThresholdUpdated(\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\n );\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\n /// @dev Emitted when the daily limit thresholds are updated\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\n\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\n\\n uint256 internal _highTierVWNum;\\n uint256 internal _highTierVWDenom;\\n\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\n mapping(address => uint256) public highTierThreshold;\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\n mapping(address => uint256) public lockedThreshold;\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\n /// @notice Values 0-1,000,000 map to 0%-100%\\n mapping(address => uint256) public unlockFeePercentages;\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\n mapping(address => uint256) public dailyWithdrawalLimit;\\n /// @dev Mapping from token address => today withdrawal amount\\n mapping(address => uint256) public lastSyncedWithdrawal;\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\n mapping(address => uint256) public lastDateSynced;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `GatewayV3-setThreshold`.\\n *\\n * Requirements:\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n */\\n function setThreshold(uint256 num, uint256 denom) external virtual override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Returns the high-tier vote weight threshold.\\n */\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\n return (_highTierVWNum, _highTierVWDenom);\\n }\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\n */\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function setHighTierVoteWeightThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyProxyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setHighTierThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setLockedThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setUnlockFeePercentages(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setDailyWithdrawalLimits(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the limitation.\\n */\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\n return _reachedWithdrawalLimit(_token, _quantity);\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n\\n _previousNum = _highTierVWNum;\\n _previousDenom = _highTierVWDenom;\\n _highTierVWNum = _numerator;\\n _highTierVWDenom = _denominator;\\n\\n unchecked {\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n * - The percentage is equal to or less than 100_000.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\n if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage();\\n\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\n if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\n *\\n * Requirements:\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\n *\\n */\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\n return false;\\n }\\n\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n return dailyWithdrawalLimit[_token] <= _quantity;\\n } else {\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\n }\\n }\\n\\n /**\\n * @dev Record withdrawal token.\\n */\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n lastDateSynced[_token] = _currentDate;\\n lastSyncedWithdrawal[_token] = _quantity;\\n } else {\\n lastSyncedWithdrawal[_token] += _quantity;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the withdrawal request is locked or not.\\n */\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n return lockedThreshold[_token] <= _quantity;\\n }\\n\\n /**\\n * @dev Computes fee percentage.\\n */\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\n }\\n\\n /**\\n * @dev Returns high-tier vote weight.\\n */\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\n }\\n\\n /**\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\n */\\n function _verifyThresholds() internal view {\\n if (_num * _highTierVWDenom > _highTierVWNum * _denom) revert ErrInvalidThreshold(msg.sig);\\n }\\n}\\n\",\"keccak256\":\"0x4b7d559d4b1f53239b8690776318db8d63f578f72fb269d8024570aa70c2c2a6\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/IMainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./consumers/SignatureConsumer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\n /**\\n * @dev Error indicating that a query was made for an approved withdrawal.\\n */\\n error ErrQueryForApprovedWithdrawal();\\n\\n /**\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\n */\\n error ErrReachedDailyWithdrawalLimit();\\n\\n /**\\n * @dev Error indicating that a query was made for a processed withdrawal.\\n */\\n error ErrQueryForProcessedWithdrawal();\\n\\n /**\\n * @dev Error indicating that a query was made for insufficient vote weight.\\n */\\n error ErrQueryForInsufficientVoteWeight();\\n\\n /// @dev Emitted when the deposit is requested\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the assets are withdrawn\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards);\\n /// @dev Emitted when the wrapped native token contract is updated\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\n /// @dev Emitted when the withdrawal is locked\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is unlocked\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n\\n /**\\n * @dev Returns the domain seperator.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns deposit count.\\n */\\n function depositCount() external view returns (uint256);\\n\\n /**\\n * @dev Sets the wrapped native token contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\n\\n /**\\n * @dev Returns whether the withdrawal is locked.\\n */\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns the withdrawal hash.\\n */\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\n\\n /**\\n * @dev Locks the assets and request deposit.\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\n\\n /**\\n * @dev Withdraws based on the receipt and the validator signatures.\\n * Returns whether the withdrawal is locked.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked);\\n\\n /**\\n * @dev Approves a specific withdrawal.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n uint256[][4] calldata _thresholds\\n ) external;\\n\\n /**\\n * @dev Returns token address on Ronin network.\\n * Note: Reverts for unsupported token.\\n */\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x2d4f53a65e76e903040f5f4dbe5aea53367d61243c60efdc8402ff184bd50a87\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/LibTokenInfo.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n TokenStandard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/LibTokenInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nenum TokenStandard {\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\\nstruct TokenInfo {\\n TokenStandard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n}\\n\\n/**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\n\\n/**\\n * @dev Error indicating that the `handleAssetIn` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\n\\n/// @dev Error indicating that the provided information is invalid.\\nerror ErrInvalidInfo();\\n\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\nerror ErrERC20MintingFailed();\\n\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\nerror ErrERC721MintingFailed();\\n\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\nerror ErrERC1155TransferFailed();\\n\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\nerror ErrERC1155MintingFailed();\\n\\n/// @dev Error indicating that an unsupported standard is encountered.\\nerror ErrUnsupportedStandard();\\n\\nlibrary LibTokenInfo {\\n /**\\n *\\n * HASH\\n *\\n */\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n *\\n * VALIDATE\\n *\\n */\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(TokenInfo memory self) internal pure {\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\n revert ErrInvalidInfo();\\n }\\n }\\n\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\n }\\n\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\n }\\n\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\n }\\n\\n /**\\n *\\n * TRANSFER IN/OUT METHOD\\n *\\n */\\n\\n /**\\n * @dev Transfer asset in.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\n bool success;\\n bytes memory data;\\n if (self.erc == TokenStandard.ERC20) {\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\n } else if (self.erc == TokenStandard.ERC1155) {\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\n }\\n\\n /**\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\n if (token == address(wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!to.send(self.quantity)) {\\n wrappedNativeToken.deposit{ value: self.quantity }();\\n _transferTokenOut(self, to, token);\\n }\\n\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC20) {\\n uint256 balance = IERC20(token).balanceOf(address(this));\\n if (balance < self.quantity) {\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\n }\\n\\n _transferTokenOut(self, to, token);\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC721) {\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\n revert ErrERC721MintingFailed();\\n }\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC1155) {\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\n revert ErrERC1155MintingFailed();\\n }\\n return;\\n }\\n\\n revert ErrUnsupportedStandard();\\n }\\n\\n /**\\n *\\n * TRANSFER HELPERS\\n *\\n */\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\n bool success;\\n if (self.erc == TokenStandard.ERC20) {\\n success = _tryTransferERC20(token, to, self.quantity);\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\n }\\n\\n /**\\n * TRANSFER ERC-20\\n */\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n bytes memory data;\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n }\\n\\n /**\\n * @dev Mints ERC20 token and returns the result.\\n */\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\n }\\n\\n /**\\n * TRANSFER ERC-721\\n */\\n\\n /**\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n success = _tryTransferFromERC721(token, address(this), to, id);\\n if (!success) {\\n return _tryMintERC721(token, to, id);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\n }\\n\\n /**\\n * @dev Mints ERC721 token and returns the result.\\n */\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\n }\\n\\n /**\\n * TRANSFER ERC-1155\\n */\\n\\n /**\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\n if (!success) {\\n return _tryMintERC1155(token, to, id, amount);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC1155 token and returns the result.\\n */\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\n }\\n\\n /**\\n * @dev Mints ERC1155 token and returns the result.\\n */\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\n }\\n}\\n\",\"keccak256\":\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\",\"license\":\"MIT\"},\"src/libraries/LibTokenOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TokenOwner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n}\\n\\nlibrary LibTokenOwner {\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\",\"license\":\"MIT\"},\"src/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./LibTokenInfo.sol\\\";\\nimport \\\"./LibTokenOwner.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n using LibTokenOwner for TokenOwner;\\n using LibTokenInfo for TokenInfo;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n TokenInfo info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n TokenOwner mainchain;\\n TokenOwner ronin;\\n TokenInfo info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\",\"license\":\"MIT\"},\"src/mainchain/MainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport { IBridgeManager } from \\\"../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts, ContractType } from \\\"../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../extensions/WethUnwrapper.sol\\\";\\nimport \\\"../extensions/WithdrawalLimitation.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"../interfaces/IMainchainGatewayV3.sol\\\";\\n\\ncontract MainchainGatewayV3 is\\n WithdrawalLimitation,\\n Initializable,\\n AccessControlEnumerable,\\n ERC1155Holder,\\n IMainchainGatewayV3,\\n HasContracts,\\n IBridgeManagerCallback\\n{\\n using LibTokenInfo for TokenInfo;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n\\n /// @dev Withdrawal unlocker role hash\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\"WITHDRAWAL_UNLOCKER_ROLE\\\");\\n\\n /// @dev Wrapped native token address\\n IWETH public wrappedNativeToken;\\n /// @dev Ronin network id\\n uint256 public roninChainId;\\n /// @dev Total deposit\\n uint256 public depositCount;\\n /// @dev Domain separator\\n bytes32 internal _domainSeparator;\\n /// @dev Mapping from mainchain token => token address on Ronin network\\n mapping(address => MappedToken) internal _roninToken;\\n /// @dev Mapping from withdrawal id => withdrawal hash\\n mapping(uint256 => bytes32) public withdrawalHash;\\n /// @dev Mapping from withdrawal id => locked\\n mapping(uint256 => bool) public withdrawalLocked;\\n\\n /// @custom:deprecated Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\n uint256 private ______deprecatedBridgeOperatorAddedBlock;\\n /// @custom:deprecated Previously `_bridgeOperators` (uint256[])\\n uint256 private ______deprecatedBridgeOperators;\\n\\n uint96 private _totalOperatorWeight;\\n mapping(address operator => uint96 weight) private _operatorWeight;\\n WethUnwrapper public wethUnwrapper;\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n IWETH _wrappedToken,\\n uint256 _roninChainId,\\n uint256 _numerator,\\n uint256 _highTierVWNumerator,\\n uint256 _denominator,\\n // _addresses[0]: mainchainTokens\\n // _addresses[1]: roninTokens\\n // _addresses[2]: withdrawalUnlockers\\n address[][3] calldata _addresses,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds,\\n TokenStandard[] calldata _standards\\n ) external payable virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n roninChainId = _roninChainId;\\n\\n _setWrappedNativeTokenContract(_wrappedToken);\\n _updateDomainSeparator();\\n _setThreshold(_numerator, _denominator);\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\n _verifyThresholds();\\n\\n if (_addresses[0].length > 0) {\\n // Map mainchain tokens to ronin tokens\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\n // Sets thresholds based on the mainchain tokens\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\n }\\n\\n // Grant role for withdrawal unlocker\\n for (uint256 i; i < _addresses[2].length; i++) {\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][i]);\\n }\\n }\\n\\n function initializeV2(address bridgeManagerContract) external reinitializer(2) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n }\\n\\n function initializeV3() external reinitializer(3) {\\n IBridgeManager mainchainBridgeManager = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER));\\n (, address[] memory operators, uint96[] memory weights) = mainchainBridgeManager.getFullBridgeOperatorInfos();\\n\\n uint96 totalWeight;\\n for (uint i; i < operators.length; i++) {\\n _operatorWeight[operators[i]] = weights[i];\\n totalWeight += weights[i];\\n }\\n _totalOperatorWeight = totalWeight;\\n }\\n\\n function initializeV4(address payable wethUnwrapper_) external reinitializer(4) {\\n wethUnwrapper = WethUnwrapper(wethUnwrapper_);\\n }\\n\\n /**\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\n */\\n function receiveEther() external payable { }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparator;\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyProxyAdmin {\\n _setWrappedNativeTokenContract(_wrappedToken);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\n _requestDepositFor(_request, msg.sender);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) {\\n return _submitWithdrawal(_receipt, _signatures);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\n bytes32 _receiptHash = receipt.hash();\\n if (withdrawalHash[receipt.id] != receipt.hash()) {\\n revert ErrInvalidReceipt();\\n }\\n if (!withdrawalLocked[receipt.id]) {\\n revert ErrQueryForApprovedWithdrawal();\\n }\\n delete withdrawalLocked[receipt.id];\\n emit WithdrawalUnlocked(_receiptHash, receipt);\\n\\n address token = receipt.mainchain.tokenAddr;\\n if (receipt.info.erc == TokenStandard.ERC20) {\\n TokenInfo memory feeInfo = receipt.info;\\n feeInfo.quantity = _computeFeePercentage(receipt.info.quantity, unlockFeePercentages[token]);\\n TokenInfo memory withdrawInfo = receipt.info;\\n withdrawInfo.quantity = receipt.info.quantity - feeInfo.quantity;\\n\\n feeInfo.handleAssetOut(payable(msg.sender), token, wrappedNativeToken);\\n withdrawInfo.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n } else {\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n }\\n\\n emit Withdrew(_receiptHash, receipt);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds\\n ) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function getRoninToken(address mainchainToken) public view returns (MappedToken memory token) {\\n token = _roninToken[mainchainToken];\\n if (token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(address[] calldata mainchainTokens, address[] calldata roninTokens, TokenStandard[] calldata standards) internal virtual {\\n if (!(mainchainTokens.length == roninTokens.length && mainchainTokens.length == standards.length)) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 i; i < mainchainTokens.length; ++i) {\\n _roninToken[mainchainTokens[i]].tokenAddr = roninTokens[i];\\n _roninToken[mainchainTokens[i]].erc = standards[i];\\n }\\n\\n emit TokenMapped(mainchainTokens, roninTokens, standards);\\n }\\n\\n /**\\n * @dev Submits withdrawal receipt.\\n *\\n * Requirements:\\n * - The receipt kind is withdrawal.\\n * - The receipt is to withdraw on this chain.\\n * - The receipt is not used to withdraw before.\\n * - The withdrawal is not reached the limit threshold.\\n * - The signer weight total is larger than or equal to the minimum threshold.\\n * - The signature signers are in order.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function _submitWithdrawal(Transfer.Receipt calldata receipt, Signature[] memory signatures) internal virtual returns (bool locked) {\\n uint256 id = receipt.id;\\n uint256 quantity = receipt.info.quantity;\\n address tokenAddr = receipt.mainchain.tokenAddr;\\n\\n receipt.info.validate();\\n if (receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind();\\n\\n if (receipt.mainchain.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, receipt.mainchain.chainId, block.chainid);\\n }\\n\\n MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr);\\n\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr && receipt.ronin.chainId == roninChainId)) {\\n revert ErrInvalidReceipt();\\n }\\n\\n if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal();\\n\\n if (!(receipt.info.erc == TokenStandard.ERC721 || !_reachedWithdrawalLimit(tokenAddr, quantity))) {\\n revert ErrReachedDailyWithdrawalLimit();\\n }\\n\\n bytes32 receiptHash = receipt.hash();\\n bytes32 receiptDigest = Transfer.receiptDigest(_domainSeparator, receiptHash);\\n\\n uint256 minimumWeight;\\n (minimumWeight, locked) = _computeMinVoteWeight(receipt.info.erc, tokenAddr, quantity);\\n\\n {\\n bool passed;\\n address signer;\\n address lastSigner;\\n Signature memory sig;\\n uint256 weight;\\n for (uint256 i; i < signatures.length; i++) {\\n sig = signatures[i];\\n signer = ecrecover(receiptDigest, sig.v, sig.r, sig.s);\\n if (lastSigner >= signer) revert ErrInvalidOrder(msg.sig);\\n\\n lastSigner = signer;\\n\\n weight += _getWeight(signer);\\n if (weight >= minimumWeight) {\\n passed = true;\\n break;\\n }\\n }\\n\\n if (!passed) revert ErrQueryForInsufficientVoteWeight();\\n withdrawalHash[id] = receiptHash;\\n }\\n\\n if (locked) {\\n withdrawalLocked[id] = true;\\n emit WithdrawalLocked(receiptHash, receipt);\\n return locked;\\n }\\n\\n _recordWithdrawal(tokenAddr, quantity);\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), tokenAddr, wrappedNativeToken);\\n emit Withdrew(receiptHash, receipt);\\n }\\n\\n /**\\n * @dev Requests deposit made by `_requester` address.\\n *\\n * Requirements:\\n * - The token info is valid.\\n * - The `msg.value` is 0 while depositing ERC20 token.\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\n *\\n * Emits the `DepositRequested` event.\\n *\\n */\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\n MappedToken memory _token;\\n address _roninWeth = address(wrappedNativeToken);\\n\\n _request.info.validate();\\n if (_request.tokenAddr == address(0)) {\\n if (_request.info.quantity != msg.value) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_roninWeth);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.tokenAddr = _roninWeth;\\n } else {\\n if (msg.value != 0) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_request.tokenAddr);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\n // Withdraw if token is WETH\\n // The withdraw of WETH must go via `WethUnwrapper`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy.\\n if (_roninWeth == _request.tokenAddr) {\\n wrappedNativeToken.approve(address(wethUnwrapper), _request.info.quantity);\\n wethUnwrapper.unwrap(_request.info.quantity);\\n }\\n }\\n\\n uint256 _depositId = depositCount++;\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId);\\n\\n emit DepositRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Returns the minimum vote weight for the token.\\n */\\n function _computeMinVoteWeight(TokenStandard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) {\\n uint256 _totalWeight = _getTotalWeight();\\n _weight = _minimumVoteWeight(_totalWeight);\\n if (_erc == TokenStandard.ERC20) {\\n if (highTierThreshold[_token] <= _quantity) {\\n _weight = _highTierVoteWeight(_totalWeight);\\n }\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\n }\\n }\\n\\n /**\\n * @dev Update domain seperator.\\n */\\n function _updateDomainSeparator() internal {\\n /*\\n * _domainSeparator = keccak256(\\n * abi.encode(\\n * keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n * keccak256(\\\"MainchainGatewayV2\\\"),\\n * keccak256(\\\"2\\\"),\\n * block.chainid,\\n * address(this)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n // keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")\\n mstore(ptr, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)\\n // keccak256(\\\"MainchainGatewayV2\\\")\\n mstore(add(ptr, 0x20), 0x159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b)\\n // keccak256(\\\"2\\\")\\n mstore(add(ptr, 0x40), 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5)\\n mstore(add(ptr, 0x60), chainid())\\n mstore(add(ptr, 0x80), address())\\n sstore(_domainSeparator.slot, keccak256(ptr, 0xa0))\\n }\\n }\\n\\n /**\\n * @dev Sets the WETH contract.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\n wrappedNativeToken = _wrapedToken;\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\n }\\n\\n /**\\n * @dev Receives ETH from WETH or creates deposit request if sender is not WETH or WETHUnwrapper.\\n */\\n function _fallback() internal virtual {\\n if (msg.sender == address(wrappedNativeToken) || msg.sender == address(wethUnwrapper)) {\\n return;\\n }\\n\\n _createDepositOnFallback();\\n }\\n\\n /**\\n * @dev Creates deposit request.\\n */\\n function _createDepositOnFallback() internal virtual whenNotPaused {\\n Transfer.Request memory _request;\\n _request.recipientAddr = msg.sender;\\n _request.info.quantity = msg.value;\\n _requestDepositFor(_request, _request.recipientAddr);\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return _totalOperatorWeight;\\n }\\n\\n /**\\n * @dev Returns the weight of an address.\\n */\\n function _getWeight(address addr) internal view returns (uint256) {\\n return _operatorWeight[addr];\\n }\\n\\n ///////////////////////////////////////////////\\n // CALLBACKS\\n ///////////////////////////////////////////////\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsAdded(\\n address[] calldata operators,\\n uint96[] calldata weights,\\n bool[] memory addeds\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint256 length = operators.length;\\n if (length != addeds.length || length != weights.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n for (uint256 i; i < length; ++i) {\\n unchecked {\\n if (addeds[i]) {\\n _totalOperatorWeight += weights[i];\\n _operatorWeight[operators[i]] = weights[i];\\n }\\n }\\n }\\n\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint length = operators.length;\\n if (length != removeds.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n uint96 totalRemovingWeight;\\n for (uint i; i < length; ++i) {\\n unchecked {\\n if (removeds[i]) {\\n totalRemovingWeight += _operatorWeight[operators[i]];\\n delete _operatorWeight[operators[i]];\\n }\\n }\\n }\\n\\n _totalOperatorWeight -= totalRemovingWeight;\\n\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) {\\n return\\n interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x6fc5c51508dd63916c19d07f93fa37e265fd7c347b9e5e0ad50a14f9ff85ab14\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", - "nonce": 26, - "numDeployments": 3, + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC1155MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForApprovedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForInsufficientVoteWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForProcessedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrReachedDailyWithdrawalLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum ContractType\",\"name\":\"expectedContractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ErrUnexpectedInternalCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum TokenStandard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"wethUnwrapper_\",\"type\":\"address\"}],\"name\":\"initializeV4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum TokenStandard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"uint96[]\",\"name\":\"weights\",\"type\":\"uint96[]\"},{\"internalType\":\"bool[]\",\"name\":\"addeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsAdded\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"removeds\",\"type\":\"bool[]\"}],\"name\":\"onBridgeOperatorsRemoved\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request[]\",\"name\":\"_requests\",\"type\":\"tuple[]\"}],\"name\":\"requestDepositForBatch\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenOwner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum TokenStandard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenInfo\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wethUnwrapper\",\"outputs\":[{\"internalType\":\"contract WethUnwrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC1155MintingFailed()\":[{\"details\":\"Error indicating that the mint of ERC1155 tokens has failed.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidPercentage()\":[{\"details\":\"Error of invalid percentage.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForApprovedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for an approved withdrawal.\"}],\"ErrQueryForInsufficientVoteWeight()\":[{\"details\":\"Error indicating that a query was made for insufficient vote weight.\"}],\"ErrQueryForProcessedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for a processed withdrawal.\"}],\"ErrReachedDailyWithdrawalLimit()\":[{\"details\":\"Error indicating that the daily withdrawal limit has been reached.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `handleAssetIn` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnexpectedInternalCall(bytes4,uint8,address)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"actual\":\"The actual address that called to the function.\",\"expectedContractType\":\"The contract type required to perform the function.\",\"msgSig\":\"The function signature (bytes4).\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"events\":{\"ContractUpdated(uint8,address)\":{\"details\":\"Emitted when a contract is updated.\"},\"DailyWithdrawalLimitsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the daily limit thresholds are updated\"},\"DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the deposit is requested\"},\"HighTierThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\"},\"HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the high-tier vote weight threshold is updated\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LockedThresholdsUpdated(address[],uint256[])\":{\"details\":\"Emitted when the thresholds for locked withdrawals are updated\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Emitted when the threshold is updated\"},\"TokenMapped(address[],address[],uint8[])\":{\"details\":\"Emitted when the tokens are mapped\"},\"UnlockFeePercentagesUpdated(address[],uint256[])\":{\"details\":\"Emitted when the fee percentages to unlock withdraw are updated\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is locked\"},\"WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the withdrawal is unlocked\"},\"Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Emitted when the assets are withdrawn\"},\"WrappedNativeTokenContractUpdated(address)\":{\"details\":\"Emitted when the wrapped native token contract is updated\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"onBridgeOperatorsAdded(address[],uint96[],bool[])\":{\"details\":\"Handles the event when bridge operators are added.\",\"params\":{\"addeds\":\"The corresponding boolean values indicating whether the operators were added or not.\",\"bridgeOperators\":\"The addresses of the bridge operators.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"onBridgeOperatorsRemoved(address[],bool[])\":{\"details\":\"Handles the event when bridge operators are removed.\",\"params\":{\"bridgeOperators\":\"The addresses of the bridge operators.\",\"removeds\":\"The corresponding boolean values indicating whether the operators were removed or not.\"},\"returns\":{\"_0\":\"The selector of the function being called.\"}},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"requestDepositForBatch((address,address,(uint8,uint256,uint256))[])\":{\"details\":\"Locks the assets and request deposit for batch.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"______deprecatedBridgeOperatorAddedBlock\":{\"custom:deprecated\":\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\"},\"______deprecatedBridgeOperators\":{\"custom:deprecated\":\"Previously `_bridgeOperators` (uint256[])\"},\"_domainSeparator\":{\"details\":\"Domain separator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/mainchain/MainchainGatewayV3.sol\":\"MainchainGatewayV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@fdk/=lib/foundry-deployment-kit/script/\",\":@openzeppelin/=lib/openzeppelin-contracts/\",\":@prb/math/=lib/prb-math/\",\":@prb/test/=lib/prb-test/src/\",\":@ronin/contracts/=src/\",\":@ronin/script/=script/\",\":@ronin/test/=test/\",\":contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/\",\":foundry-deployment-kit/=lib/foundry-deployment-kit/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/foundry-deployment-kit/lib/openzeppelin-contracts/contracts/\",\":prb-math/=lib/prb-math/src/\",\":prb-test/=lib/prb-test/src/\",\":sample-projects/=node_modules/hardhat/sample-projects/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\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 ReentrancyGuard {\\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 constructor() {\\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 making 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}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(\\n address account,\\n uint256 id,\\n uint256 value\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(\\n address account,\\n uint256[] memory ids,\\n uint256[] memory values\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../extensions/ERC1155Burnable.sol\\\";\\nimport \\\"../extensions/ERC1155Pausable.sol\\\";\\nimport \\\"../../../access/AccessControlEnumerable.sol\\\";\\nimport \\\"../../../utils/Context.sol\\\";\\n\\n/**\\n * @dev {ERC1155} token, including:\\n *\\n * - ability for holders to burn (destroy) their tokens\\n * - a minter role that allows for token minting (creation)\\n * - a pauser role that allows to stop all token transfers\\n *\\n * This contract uses {AccessControl} to lock permissioned functions using the\\n * different roles - head to its documentation for details.\\n *\\n * The account that deploys the contract will be granted the minter and pauser\\n * roles, as well as the default admin role, which will let it grant both minter\\n * and pauser roles to other accounts.\\n *\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\n */\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /**\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\n * deploys the contract.\\n */\\n constructor(string memory uri) ERC1155(uri) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\n\\n _setupRole(MINTER_ROLE, _msgSender());\\n _setupRole(PAUSER_ROLE, _msgSender());\\n }\\n\\n /**\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\n *\\n * See {ERC1155-_mint}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `MINTER_ROLE`.\\n */\\n function mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mint(to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\n */\\n function mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual {\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have minter role to mint\\\");\\n\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Pauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function pause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses all token transfers.\\n *\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\n *\\n * Requirements:\\n *\\n * - the caller must have the `PAUSER_ROLE`.\\n */\\n function unpause() public virtual {\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\");\\n _unpause();\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControlEnumerable, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n}\\n\",\"keccak256\":\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ERC1155Receiver.sol\\\";\\n\\n/**\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\n *\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\n * stuck.\\n *\\n * @dev _Available since v3.1._\\n */\\ncontract ERC1155Holder is ERC1155Receiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] memory,\\n uint256[] memory,\\n bytes memory\\n ) public virtual override returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155Receiver.sol\\\";\\nimport \\\"../../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"src/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\n uint256 prevNum = _num;\\n uint256 prevDenom = _denom;\\n _num = num;\\n _denom = denom;\\n unchecked {\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\",\"license\":\"MIT\"},\"src/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 { revert(0, returndatasize()) }\\n default { return(0, returndatasize()) }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\",\"license\":\"MIT\"},\"src/extensions/WethUnwrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\ncontract WethUnwrapper is ReentrancyGuard {\\n IWETH public immutable weth;\\n\\n error ErrCannotTransferFrom();\\n error ErrNotWrappedContract();\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\n\\n constructor(address weth_) {\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\n weth = IWETH(weth_);\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n function unwrap(uint256 amount) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(msg.sender), amount);\\n }\\n\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\n _deductWrappedAndWithdraw(amount);\\n _sendNativeTo(payable(to), amount);\\n }\\n\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\n if (!success) revert ErrCannotTransferFrom();\\n\\n weth.withdraw(amount);\\n }\\n\\n function _sendNativeTo(address payable to, uint256 val) internal {\\n (bool success,) = to.call{ value: val }(\\\"\\\");\\n if (!success) {\\n revert ErrExternalCallFailed(to, msg.sig);\\n }\\n }\\n\\n function _fallback() internal view {\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\n }\\n}\\n\",\"keccak256\":\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\",\"license\":\"MIT\"},\"src/extensions/WithdrawalLimitation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./GatewayV3.sol\\\";\\n\\nabstract contract WithdrawalLimitation is GatewayV3 {\\n /// @dev Error of invalid percentage.\\n error ErrInvalidPercentage();\\n\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\n event HighTierVoteWeightThresholdUpdated(\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\n );\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\n /// @dev Emitted when the daily limit thresholds are updated\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\n\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\n\\n uint256 internal _highTierVWNum;\\n uint256 internal _highTierVWDenom;\\n\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\n mapping(address => uint256) public highTierThreshold;\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\n mapping(address => uint256) public lockedThreshold;\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\n /// @notice Values 0-1,000,000 map to 0%-100%\\n mapping(address => uint256) public unlockFeePercentages;\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\n mapping(address => uint256) public dailyWithdrawalLimit;\\n /// @dev Mapping from token address => today withdrawal amount\\n mapping(address => uint256) public lastSyncedWithdrawal;\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\n mapping(address => uint256) public lastDateSynced;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `GatewayV3-setThreshold`.\\n *\\n * Requirements:\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n */\\n function setThreshold(uint256 num, uint256 denom) external virtual override onlyProxyAdmin {\\n _setThreshold(num, denom);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Returns the high-tier vote weight threshold.\\n */\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\n return (_highTierVWNum, _highTierVWDenom);\\n }\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\n */\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function setHighTierVoteWeightThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyProxyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setHighTierThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setLockedThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setUnlockFeePercentages(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyProxyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setDailyWithdrawalLimits(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the limitation.\\n */\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\n return _reachedWithdrawalLimit(_token, _quantity);\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n\\n _previousNum = _highTierVWNum;\\n _previousDenom = _highTierVWDenom;\\n _highTierVWNum = _numerator;\\n _highTierVWDenom = _denominator;\\n\\n unchecked {\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n * - The percentage is equal to or less than 100_000.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\n if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage();\\n\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\n if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length;) {\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\n *\\n * Requirements:\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\n *\\n */\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\n return false;\\n }\\n\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n return dailyWithdrawalLimit[_token] <= _quantity;\\n } else {\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\n }\\n }\\n\\n /**\\n * @dev Record withdrawal token.\\n */\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n lastDateSynced[_token] = _currentDate;\\n lastSyncedWithdrawal[_token] = _quantity;\\n } else {\\n lastSyncedWithdrawal[_token] += _quantity;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the withdrawal request is locked or not.\\n */\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n return lockedThreshold[_token] <= _quantity;\\n }\\n\\n /**\\n * @dev Computes fee percentage.\\n */\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\n }\\n\\n /**\\n * @dev Returns high-tier vote weight.\\n */\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\n }\\n\\n /**\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\n */\\n function _verifyThresholds() internal view {\\n if (_num * _highTierVWDenom > _highTierVWNum * _denom) revert ErrInvalidThreshold(msg.sig);\\n }\\n}\\n\",\"keccak256\":\"0x4b7d559d4b1f53239b8690776318db8d63f578f72fb269d8024570aa70c2c2a6\",\"license\":\"MIT\"},\"src/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\",\"license\":\"MIT\"},\"src/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyProxyAdmin() {\\n _requireProxyAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getProxyAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireProxyAdmin() internal view {\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\",\"license\":\"MIT\"},\"src/interfaces/IMainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./consumers/SignatureConsumer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\n /**\\n * @dev Error indicating that a query was made for an approved withdrawal.\\n */\\n error ErrQueryForApprovedWithdrawal();\\n\\n /**\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\n */\\n error ErrReachedDailyWithdrawalLimit();\\n\\n /**\\n * @dev Error indicating that a query was made for a processed withdrawal.\\n */\\n error ErrQueryForProcessedWithdrawal();\\n\\n /**\\n * @dev Error indicating that a query was made for insufficient vote weight.\\n */\\n error ErrQueryForInsufficientVoteWeight();\\n\\n /// @dev Emitted when the deposit is requested\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the assets are withdrawn\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards);\\n /// @dev Emitted when the wrapped native token contract is updated\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\n /// @dev Emitted when the withdrawal is locked\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is unlocked\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n\\n /**\\n * @dev Returns the domain seperator.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns deposit count.\\n */\\n function depositCount() external view returns (uint256);\\n\\n /**\\n * @dev Sets the wrapped native token contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\n\\n /**\\n * @dev Returns whether the withdrawal is locked.\\n */\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns the withdrawal hash.\\n */\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\n\\n /**\\n * @dev Locks the assets and request deposit.\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\n\\n /**\\n * @dev Locks the assets and request deposit for batch.\\n */\\n function requestDepositForBatch(Transfer.Request[] calldata requests) external payable;\\n\\n /**\\n * @dev Withdraws based on the receipt and the validator signatures.\\n * Returns whether the withdrawal is locked.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked);\\n\\n /**\\n * @dev Approves a specific withdrawal.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n uint256[][4] calldata _thresholds\\n ) external;\\n\\n /**\\n * @dev Returns token address on Ronin network.\\n * Note: Reverts for unsupported token.\\n */\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x77b52c1dce7c096d298e0ae14d19d79cb1d506248e947fdee27f295b33743d46\",\"license\":\"MIT\"},\"src/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\n}\\n\",\"keccak256\":\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\",\"license\":\"MIT\"},\"src/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n function deposit() external payable;\\n\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function approve(address guy, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /// @notice Error indicating that cannot find the querying operator\\n error ErrOperatorNotFound(address operator);\\n /// @notice Error indicating that cannot find the querying governor\\n error ErrGovernorNotFound(address governor);\\n /// @notice Error indicating that the msg.sender is not match the required governor\\n error ErrGovernorNotMatch(address required, address sender);\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\n error ErrBelowMinRequiredGovernors();\\n /// @notice Common invalid input error\\n error ErrInvalidInput();\\n\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns the corresponding `operator` of a `governor`.\\n */\\n function getOperatorOf(address governor) external view returns (address operator);\\n\\n /**\\n * @dev Returns the corresponding `governor` of a `operator`.\\n */\\n function getGovernorOf(address operator) external view returns (address governor);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n */\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\n\\n /**\\n * @dev Self-call to update the minimum required governor.\\n * @param min The minimum number, this must not less than 3.\\n */\\n function setMinRequiredGovernor(uint min) external;\\n}\\n\",\"keccak256\":\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\",\"license\":\"MIT\"},\"src/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\",\"license\":\"MIT\"},\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev Emitted when new bridge operators are added.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to add.\\n */\\n event BridgeOperatorAddingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is failed to remove.\\n */\\n event BridgeOperatorRemovingFailed(address indexed operator);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n */\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\n\\n /**\\n * @dev Emitted when the minimum number of required governors is updated.\\n */\\n event MinRequiredGovernorUpdated(uint min);\\n}\\n\",\"keccak256\":\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\",\"license\":\"MIT\"},\"src/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"src/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/LibTokenInfo.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n TokenStandard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\",\"license\":\"MIT\"},\"src/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"src/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA;) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB;) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\",\"license\":\"UNLICENSED\"},\"src/libraries/LibTokenInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nenum TokenStandard {\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\\nstruct TokenInfo {\\n TokenStandard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n}\\n\\n/**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\n\\n/**\\n * @dev Error indicating that the `handleAssetIn` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\n\\n/// @dev Error indicating that the provided information is invalid.\\nerror ErrInvalidInfo();\\n\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\nerror ErrERC20MintingFailed();\\n\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\nerror ErrERC721MintingFailed();\\n\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\nerror ErrERC1155TransferFailed();\\n\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\nerror ErrERC1155MintingFailed();\\n\\n/// @dev Error indicating that an unsupported standard is encountered.\\nerror ErrUnsupportedStandard();\\n\\nlibrary LibTokenInfo {\\n /**\\n *\\n * HASH\\n *\\n */\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n *\\n * VALIDATE\\n *\\n */\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(TokenInfo memory self) internal pure {\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\n revert ErrInvalidInfo();\\n }\\n }\\n\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\n }\\n\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\n }\\n\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\n }\\n\\n /**\\n *\\n * TRANSFER IN/OUT METHOD\\n *\\n */\\n\\n /**\\n * @dev Transfer asset in.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\n bool success;\\n bytes memory data;\\n if (self.erc == TokenStandard.ERC20) {\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\n } else if (self.erc == TokenStandard.ERC1155) {\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\n }\\n\\n /**\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\n if (token == address(wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!to.send(self.quantity)) {\\n wrappedNativeToken.deposit{ value: self.quantity }();\\n _transferTokenOut(self, to, token);\\n }\\n\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC20) {\\n uint256 balance = IERC20(token).balanceOf(address(this));\\n if (balance < self.quantity) {\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\n }\\n\\n _transferTokenOut(self, to, token);\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC721) {\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\n revert ErrERC721MintingFailed();\\n }\\n return;\\n }\\n\\n if (self.erc == TokenStandard.ERC1155) {\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\n revert ErrERC1155MintingFailed();\\n }\\n return;\\n }\\n\\n revert ErrUnsupportedStandard();\\n }\\n\\n /**\\n *\\n * TRANSFER HELPERS\\n *\\n */\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\n bool success;\\n if (self.erc == TokenStandard.ERC20) {\\n success = _tryTransferERC20(token, to, self.quantity);\\n } else if (self.erc == TokenStandard.ERC721) {\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\n } else {\\n revert ErrUnsupportedStandard();\\n }\\n\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\n }\\n\\n /**\\n * TRANSFER ERC-20\\n */\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n bytes memory data;\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\n }\\n\\n /**\\n * @dev Mints ERC20 token and returns the result.\\n */\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\n }\\n\\n /**\\n * TRANSFER ERC-721\\n */\\n\\n /**\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n success = _tryTransferFromERC721(token, address(this), to, id);\\n if (!success) {\\n return _tryMintERC721(token, to, id);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\n }\\n\\n /**\\n * @dev Mints ERC721 token and returns the result.\\n */\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\n }\\n\\n /**\\n * TRANSFER ERC-1155\\n */\\n\\n /**\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\n * @return success Returns `false` if both transfer and mint are failed.\\n */\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\n if (!success) {\\n return _tryMintERC1155(token, to, id, amount);\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC1155 token and returns the result.\\n */\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\n }\\n\\n /**\\n * @dev Mints ERC1155 token and returns the result.\\n */\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\n }\\n}\\n\",\"keccak256\":\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\",\"license\":\"MIT\"},\"src/libraries/LibTokenOwner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nstruct TokenOwner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n}\\n\\nlibrary LibTokenOwner {\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\",\"license\":\"MIT\"},\"src/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./LibTokenInfo.sol\\\";\\nimport \\\"./LibTokenOwner.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n using LibTokenOwner for TokenOwner;\\n using LibTokenInfo for TokenInfo;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n TokenInfo info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n TokenOwner mainchain;\\n TokenOwner ronin;\\n TokenInfo info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\",\"license\":\"MIT\"},\"src/mainchain/MainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\";\\nimport { IBridgeManager } from \\\"../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts, ContractType } from \\\"../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../extensions/WethUnwrapper.sol\\\";\\nimport \\\"../extensions/WithdrawalLimitation.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"../interfaces/IMainchainGatewayV3.sol\\\";\\n\\ncontract MainchainGatewayV3 is\\n WithdrawalLimitation,\\n Initializable,\\n AccessControlEnumerable,\\n ERC1155Holder,\\n IMainchainGatewayV3,\\n HasContracts,\\n IBridgeManagerCallback\\n{\\n using LibTokenInfo for TokenInfo;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n\\n /// @dev Withdrawal unlocker role hash\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\"WITHDRAWAL_UNLOCKER_ROLE\\\");\\n\\n /// @dev Wrapped native token address\\n IWETH public wrappedNativeToken;\\n /// @dev Ronin network id\\n uint256 public roninChainId;\\n /// @dev Total deposit\\n uint256 public depositCount;\\n /// @dev Domain separator\\n bytes32 internal _domainSeparator;\\n /// @dev Mapping from mainchain token => token address on Ronin network\\n mapping(address => MappedToken) internal _roninToken;\\n /// @dev Mapping from withdrawal id => withdrawal hash\\n mapping(uint256 => bytes32) public withdrawalHash;\\n /// @dev Mapping from withdrawal id => locked\\n mapping(uint256 => bool) public withdrawalLocked;\\n\\n /// @custom:deprecated Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\n uint256 private ______deprecatedBridgeOperatorAddedBlock;\\n /// @custom:deprecated Previously `_bridgeOperators` (uint256[])\\n uint256 private ______deprecatedBridgeOperators;\\n\\n uint96 private _totalOperatorWeight;\\n mapping(address operator => uint96 weight) private _operatorWeight;\\n WethUnwrapper public wethUnwrapper;\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n IWETH _wrappedToken,\\n uint256 _roninChainId,\\n uint256 _numerator,\\n uint256 _highTierVWNumerator,\\n uint256 _denominator,\\n // _addresses[0]: mainchainTokens\\n // _addresses[1]: roninTokens\\n // _addresses[2]: withdrawalUnlockers\\n address[][3] calldata _addresses,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds,\\n TokenStandard[] calldata _standards\\n ) external payable virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n roninChainId = _roninChainId;\\n\\n _setWrappedNativeTokenContract(_wrappedToken);\\n _updateDomainSeparator();\\n _setThreshold(_numerator, _denominator);\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\n _verifyThresholds();\\n\\n if (_addresses[0].length > 0) {\\n // Map mainchain tokens to ronin tokens\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\n // Sets thresholds based on the mainchain tokens\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\n }\\n\\n // Grant role for withdrawal unlocker\\n for (uint256 i; i < _addresses[2].length; i++) {\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][i]);\\n }\\n }\\n\\n function initializeV2(address bridgeManagerContract) external reinitializer(2) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n }\\n\\n function initializeV3() external reinitializer(3) {\\n IBridgeManager mainchainBridgeManager = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER));\\n (, address[] memory operators, uint96[] memory weights) = mainchainBridgeManager.getFullBridgeOperatorInfos();\\n\\n uint96 totalWeight;\\n for (uint i; i < operators.length; i++) {\\n _operatorWeight[operators[i]] = weights[i];\\n totalWeight += weights[i];\\n }\\n _totalOperatorWeight = totalWeight;\\n }\\n\\n function initializeV4(address payable wethUnwrapper_) external reinitializer(4) {\\n wethUnwrapper = WethUnwrapper(wethUnwrapper_);\\n }\\n\\n /**\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\n */\\n function receiveEther() external payable { }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparator;\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyProxyAdmin {\\n _setWrappedNativeTokenContract(_wrappedToken);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\n _requestDepositFor(_request, msg.sender);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function requestDepositForBatch(Transfer.Request[] calldata _requests) external payable virtual whenNotPaused {\\n uint length = _requests.length;\\n for (uint256 i; i < length; ++i) {\\n _requestDepositFor(_requests[i], msg.sender);\\n }\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) {\\n return _submitWithdrawal(_receipt, _signatures);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\n bytes32 _receiptHash = receipt.hash();\\n if (withdrawalHash[receipt.id] != receipt.hash()) {\\n revert ErrInvalidReceipt();\\n }\\n if (!withdrawalLocked[receipt.id]) {\\n revert ErrQueryForApprovedWithdrawal();\\n }\\n delete withdrawalLocked[receipt.id];\\n emit WithdrawalUnlocked(_receiptHash, receipt);\\n\\n address token = receipt.mainchain.tokenAddr;\\n if (receipt.info.erc == TokenStandard.ERC20) {\\n TokenInfo memory feeInfo = receipt.info;\\n feeInfo.quantity = _computeFeePercentage(receipt.info.quantity, unlockFeePercentages[token]);\\n TokenInfo memory withdrawInfo = receipt.info;\\n withdrawInfo.quantity = receipt.info.quantity - feeInfo.quantity;\\n\\n feeInfo.handleAssetOut(payable(msg.sender), token, wrappedNativeToken);\\n withdrawInfo.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n } else {\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\n }\\n\\n emit Withdrew(_receiptHash, receipt);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n TokenStandard[] calldata _standards,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds\\n ) external virtual onlyProxyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function getRoninToken(address mainchainToken) public view returns (MappedToken memory token) {\\n token = _roninToken[mainchainToken];\\n if (token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(address[] calldata mainchainTokens, address[] calldata roninTokens, TokenStandard[] calldata standards) internal virtual {\\n if (!(mainchainTokens.length == roninTokens.length && mainchainTokens.length == standards.length)) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 i; i < mainchainTokens.length; ++i) {\\n _roninToken[mainchainTokens[i]].tokenAddr = roninTokens[i];\\n _roninToken[mainchainTokens[i]].erc = standards[i];\\n }\\n\\n emit TokenMapped(mainchainTokens, roninTokens, standards);\\n }\\n\\n /**\\n * @dev Submits withdrawal receipt.\\n *\\n * Requirements:\\n * - The receipt kind is withdrawal.\\n * - The receipt is to withdraw on this chain.\\n * - The receipt is not used to withdraw before.\\n * - The withdrawal is not reached the limit threshold.\\n * - The signer weight total is larger than or equal to the minimum threshold.\\n * - The signature signers are in order.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function _submitWithdrawal(Transfer.Receipt calldata receipt, Signature[] memory signatures) internal virtual returns (bool locked) {\\n uint256 id = receipt.id;\\n uint256 quantity = receipt.info.quantity;\\n address tokenAddr = receipt.mainchain.tokenAddr;\\n\\n receipt.info.validate();\\n if (receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind();\\n\\n if (receipt.mainchain.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, receipt.mainchain.chainId, block.chainid);\\n }\\n\\n MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr);\\n\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr && receipt.ronin.chainId == roninChainId)) {\\n revert ErrInvalidReceipt();\\n }\\n\\n if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal();\\n\\n if (!(receipt.info.erc == TokenStandard.ERC721 || !_reachedWithdrawalLimit(tokenAddr, quantity))) {\\n revert ErrReachedDailyWithdrawalLimit();\\n }\\n\\n bytes32 receiptHash = receipt.hash();\\n bytes32 receiptDigest = Transfer.receiptDigest(_domainSeparator, receiptHash);\\n\\n uint256 minimumWeight;\\n (minimumWeight, locked) = _computeMinVoteWeight(receipt.info.erc, tokenAddr, quantity);\\n\\n {\\n bool passed;\\n address signer;\\n address lastSigner;\\n Signature memory sig;\\n uint256 weight;\\n for (uint256 i; i < signatures.length; i++) {\\n sig = signatures[i];\\n signer = ecrecover(receiptDigest, sig.v, sig.r, sig.s);\\n if (lastSigner >= signer) revert ErrInvalidOrder(msg.sig);\\n\\n lastSigner = signer;\\n\\n weight += _getWeight(signer);\\n if (weight >= minimumWeight) {\\n passed = true;\\n break;\\n }\\n }\\n\\n if (!passed) revert ErrQueryForInsufficientVoteWeight();\\n withdrawalHash[id] = receiptHash;\\n }\\n\\n if (locked) {\\n withdrawalLocked[id] = true;\\n emit WithdrawalLocked(receiptHash, receipt);\\n return locked;\\n }\\n\\n _recordWithdrawal(tokenAddr, quantity);\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), tokenAddr, wrappedNativeToken);\\n emit Withdrew(receiptHash, receipt);\\n }\\n\\n /**\\n * @dev Requests deposit made by `_requester` address.\\n *\\n * Requirements:\\n * - The token info is valid.\\n * - The `msg.value` is 0 while depositing ERC20 token.\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\n *\\n * Emits the `DepositRequested` event.\\n *\\n */\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\n MappedToken memory _token;\\n address _roninWeth = address(wrappedNativeToken);\\n\\n _request.info.validate();\\n if (_request.tokenAddr == address(0)) {\\n if (_request.info.quantity != msg.value) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_roninWeth);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.tokenAddr = _roninWeth;\\n } else {\\n if (msg.value != 0) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_request.tokenAddr);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\n // Withdraw if token is WETH\\n // The withdraw of WETH must go via `WethUnwrapper`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy.\\n if (_roninWeth == _request.tokenAddr) {\\n wrappedNativeToken.approve(address(wethUnwrapper), _request.info.quantity);\\n wethUnwrapper.unwrap(_request.info.quantity);\\n }\\n }\\n\\n uint256 _depositId = depositCount++;\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId);\\n\\n emit DepositRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Returns the minimum vote weight for the token.\\n */\\n function _computeMinVoteWeight(TokenStandard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) {\\n uint256 _totalWeight = _getTotalWeight();\\n _weight = _minimumVoteWeight(_totalWeight);\\n if (_erc == TokenStandard.ERC20) {\\n if (highTierThreshold[_token] <= _quantity) {\\n _weight = _highTierVoteWeight(_totalWeight);\\n }\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\n }\\n }\\n\\n /**\\n * @dev Update domain seperator.\\n */\\n function _updateDomainSeparator() internal {\\n /*\\n * _domainSeparator = keccak256(\\n * abi.encode(\\n * keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n * keccak256(\\\"MainchainGatewayV2\\\"),\\n * keccak256(\\\"2\\\"),\\n * block.chainid,\\n * address(this)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n // keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")\\n mstore(ptr, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)\\n // keccak256(\\\"MainchainGatewayV2\\\")\\n mstore(add(ptr, 0x20), 0x159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b)\\n // keccak256(\\\"2\\\")\\n mstore(add(ptr, 0x40), 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5)\\n mstore(add(ptr, 0x60), chainid())\\n mstore(add(ptr, 0x80), address())\\n sstore(_domainSeparator.slot, keccak256(ptr, 0xa0))\\n }\\n }\\n\\n /**\\n * @dev Sets the WETH contract.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\n wrappedNativeToken = _wrapedToken;\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\n }\\n\\n /**\\n * @dev Receives ETH from WETH or creates deposit request if sender is not WETH or WETHUnwrapper.\\n */\\n function _fallback() internal virtual {\\n if (msg.sender == address(wrappedNativeToken) || msg.sender == address(wethUnwrapper)) {\\n return;\\n }\\n\\n _createDepositOnFallback();\\n }\\n\\n /**\\n * @dev Creates deposit request.\\n */\\n function _createDepositOnFallback() internal virtual whenNotPaused {\\n Transfer.Request memory _request;\\n _request.recipientAddr = msg.sender;\\n _request.info.quantity = msg.value;\\n _requestDepositFor(_request, _request.recipientAddr);\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return _totalOperatorWeight;\\n }\\n\\n /**\\n * @dev Returns the weight of an address.\\n */\\n function _getWeight(address addr) internal view returns (uint256) {\\n return _operatorWeight[addr];\\n }\\n\\n ///////////////////////////////////////////////\\n // CALLBACKS\\n ///////////////////////////////////////////////\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsAdded(\\n address[] calldata operators,\\n uint96[] calldata weights,\\n bool[] memory addeds\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint256 length = operators.length;\\n if (length != addeds.length || length != weights.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n for (uint256 i; i < length; ++i) {\\n unchecked {\\n if (addeds[i]) {\\n _totalOperatorWeight += weights[i];\\n _operatorWeight[operators[i]] = weights[i];\\n }\\n }\\n }\\n\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\n }\\n\\n /**\\n * @inheritdoc IBridgeManagerCallback\\n */\\n function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\n uint length = operators.length;\\n if (length != removeds.length) revert ErrLengthMismatch(msg.sig);\\n if (length == 0) {\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n uint96 totalRemovingWeight;\\n for (uint i; i < length; ++i) {\\n unchecked {\\n if (removeds[i]) {\\n totalRemovingWeight += _operatorWeight[operators[i]];\\n delete _operatorWeight[operators[i]];\\n }\\n }\\n }\\n\\n _totalOperatorWeight -= totalRemovingWeight;\\n\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) {\\n return\\n interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xcb718591e95d9de1f4b07a6a12d9e6bee4c16822e8dd8885b1d6affeda2cc0f9\",\"license\":\"MIT\"},\"src/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\\n/**\\n * @dev Error thrown when an invalid proposal is encountered.\\n * @param actual The actual value of the proposal.\\n * @param expected The expected value of the proposal.\\n */\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\n\\n/**\\n * @dev Error of proposal is not approved for executing.\\n */\\nerror ErrProposalNotApproved();\\n\\n/**\\n * @dev Error of the caller is not the specified executor.\\n */\\nerror ErrInvalidExecutor();\\n\\n/**\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\n */\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\n\",\"keccak256\":\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\",\"license\":\"MIT\"},\"src/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n UNKNOWN, // 0\\n PAUSE_ENFORCER, // 1\\n BRIDGE, // 2\\n BRIDGE_TRACKING, // 3\\n GOVERNANCE_ADMIN, // 4\\n MAINTENANCE, // 5\\n SLASH_INDICATOR, // 6\\n STAKING_VESTING, // 7\\n VALIDATOR, // 8\\n STAKING, // 9\\n RONIN_TRUSTED_ORGANIZATION, // 10\\n BRIDGE_MANAGER, // 11\\n BRIDGE_SLASH, // 12\\n BRIDGE_REWARD, // 13\\n FAST_FINALITY_TRACKING, // 14\\n PROFILE // 15\\n\\n}\\n\",\"keccak256\":\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\",\"license\":\"MIT\"},\"src/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\",\"license\":\"MIT\"},\"src/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n UNKNOWN, // 0\\n ADMIN, // 1\\n COINBASE, // 2\\n GOVERNOR, // 3\\n CANDIDATE_ADMIN, // 4\\n WITHDRAWAL_MIGRATOR, // 5\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\n BLOCK_PRODUCER, // 7\\n VALIDATOR_CANDIDATE, // 8\\n CONSENSUS, // 9\\n TREASURY // 10\\n\\n}\\n\",\"keccak256\":\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\",\"license\":\"MIT\"}},\"version\":1}", + "nonce": 57, + "numDeployments": 4, "storageLayout": { "storage": [ { - "astId": 58352, + "astId": 58349, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_paused", "offset": 0, @@ -2711,7 +2761,7 @@ "type": "t_bool" }, { - "astId": 103479, + "astId": 101999, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_num", "offset": 0, @@ -2719,7 +2769,7 @@ "type": "t_uint256" }, { - "astId": 103481, + "astId": 102001, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_denom", "offset": 0, @@ -2727,7 +2777,7 @@ "type": "t_uint256" }, { - "astId": 103483, + "astId": 102003, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecated", "offset": 0, @@ -2735,7 +2785,7 @@ "type": "t_address" }, { - "astId": 103485, + "astId": 102005, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "nonce", "offset": 0, @@ -2743,7 +2793,7 @@ "type": "t_uint256" }, { - "astId": 103487, + "astId": 102007, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "emergencyPauser", "offset": 0, @@ -2751,7 +2801,7 @@ "type": "t_address" }, { - "astId": 103492, + "astId": 102012, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______gap", "offset": 0, @@ -2759,7 +2809,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 104214, + "astId": 102734, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_highTierVWNum", "offset": 0, @@ -2767,7 +2817,7 @@ "type": "t_uint256" }, { - "astId": 104216, + "astId": 102736, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_highTierVWDenom", "offset": 0, @@ -2775,7 +2825,7 @@ "type": "t_uint256" }, { - "astId": 104221, + "astId": 102741, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "highTierThreshold", "offset": 0, @@ -2783,7 +2833,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 104226, + "astId": 102746, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lockedThreshold", "offset": 0, @@ -2791,7 +2841,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 104231, + "astId": 102751, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "unlockFeePercentages", "offset": 0, @@ -2799,7 +2849,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 104236, + "astId": 102756, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "dailyWithdrawalLimit", "offset": 0, @@ -2807,7 +2857,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 104241, + "astId": 102761, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lastSyncedWithdrawal", "offset": 0, @@ -2815,7 +2865,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 104246, + "astId": 102766, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lastDateSynced", "offset": 0, @@ -2823,7 +2873,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 104251, + "astId": 102771, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______gap", "offset": 0, @@ -2831,7 +2881,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 58190, + "astId": 58187, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_initialized", "offset": 0, @@ -2839,7 +2889,7 @@ "type": "t_uint8" }, { - "astId": 58193, + "astId": 58190, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_initializing", "offset": 1, @@ -2847,31 +2897,31 @@ "type": "t_bool" }, { - "astId": 56841, + "astId": 56838, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roles", "offset": 0, "slot": "114", - "type": "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)56833_storage)" }, { - "astId": 57155, + "astId": 57152, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roleMembers", "offset": 0, "slot": "115", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)63339_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)63336_storage)" }, { - "astId": 114774, + "astId": 113073, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "wrappedNativeToken", "offset": 0, "slot": "116", - "type": "t_contract(IWETH)109972" + "type": "t_contract(IWETH)108470" }, { - "astId": 114777, + "astId": 113076, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "roninChainId", "offset": 0, @@ -2879,7 +2929,7 @@ "type": "t_uint256" }, { - "astId": 114780, + "astId": 113079, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "depositCount", "offset": 0, @@ -2887,7 +2937,7 @@ "type": "t_uint256" }, { - "astId": 114783, + "astId": 113082, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_domainSeparator", "offset": 0, @@ -2895,15 +2945,15 @@ "type": "t_bytes32" }, { - "astId": 114789, + "astId": 113088, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roninToken", "offset": 0, "slot": "120", - "type": "t_mapping(t_address,t_struct(MappedToken)110662_storage)" + "type": "t_mapping(t_address,t_struct(MappedToken)109160_storage)" }, { - "astId": 114794, + "astId": 113093, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "withdrawalHash", "offset": 0, @@ -2911,7 +2961,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 114799, + "astId": 113098, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "withdrawalLocked", "offset": 0, @@ -2919,7 +2969,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 114802, + "astId": 113101, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecatedBridgeOperatorAddedBlock", "offset": 0, @@ -2927,7 +2977,7 @@ "type": "t_uint256" }, { - "astId": 114805, + "astId": 113104, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecatedBridgeOperators", "offset": 0, @@ -2935,7 +2985,7 @@ "type": "t_uint256" }, { - "astId": 114807, + "astId": 113106, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_totalOperatorWeight", "offset": 0, @@ -2943,7 +2993,7 @@ "type": "t_uint96" }, { - "astId": 114811, + "astId": 113110, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_operatorWeight", "offset": 0, @@ -2951,12 +3001,12 @@ "type": "t_mapping(t_address,t_uint96)" }, { - "astId": 114814, + "astId": 113113, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "wethUnwrapper", "offset": 0, "slot": "127", - "type": "t_contract(WethUnwrapper)104152" + "type": "t_contract(WethUnwrapper)102672" } ], "types": { @@ -2993,17 +3043,17 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IWETH)109972": { + "t_contract(IWETH)108470": { "encoding": "inplace", "label": "contract IWETH", "numberOfBytes": "20" }, - "t_contract(WethUnwrapper)104152": { + "t_contract(WethUnwrapper)102672": { "encoding": "inplace", "label": "contract WethUnwrapper", "numberOfBytes": "20" }, - "t_enum(TokenStandard)112266": { + "t_enum(TokenStandard)110645": { "encoding": "inplace", "label": "enum TokenStandard", "numberOfBytes": "1" @@ -3015,12 +3065,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_address,t_struct(MappedToken)110662_storage)": { + "t_mapping(t_address,t_struct(MappedToken)109160_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct MappedTokenConsumer.MappedToken)", "numberOfBytes": "32", - "value": "t_struct(MappedToken)110662_storage" + "value": "t_struct(MappedToken)109160_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -3036,19 +3086,19 @@ "numberOfBytes": "32", "value": "t_uint96" }, - "t_mapping(t_bytes32,t_struct(AddressSet)63339_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)63336_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)63339_storage" + "value": "t_struct(AddressSet)63336_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)56836_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)56833_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)56836_storage" + "value": "t_struct(RoleData)56833_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -3071,36 +3121,36 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(AddressSet)63339_storage": { + "t_struct(AddressSet)63336_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 63338, + "astId": 63335, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)63038_storage" + "type": "t_struct(Set)63035_storage" } ] }, - "t_struct(MappedToken)110662_storage": { + "t_struct(MappedToken)109160_storage": { "encoding": "inplace", "label": "struct MappedTokenConsumer.MappedToken", "numberOfBytes": "32", "members": [ { - "astId": 110659, + "astId": 109157, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "erc", "offset": 0, "slot": "0", - "type": "t_enum(TokenStandard)112266" + "type": "t_enum(TokenStandard)110645" }, { - "astId": 110661, + "astId": 109159, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "tokenAddr", "offset": 1, @@ -3109,13 +3159,13 @@ } ] }, - "t_struct(RoleData)56836_storage": { + "t_struct(RoleData)56833_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", "numberOfBytes": "64", "members": [ { - "astId": 56833, + "astId": 56830, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "members", "offset": 0, @@ -3123,7 +3173,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 56835, + "astId": 56832, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "adminRole", "offset": 0, @@ -3132,13 +3182,13 @@ } ] }, - "t_struct(Set)63038_storage": { + "t_struct(Set)63035_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 63033, + "astId": 63030, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_values", "offset": 0, @@ -3146,7 +3196,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 63037, + "astId": 63034, "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_indexes", "offset": 0, @@ -3172,7 +3222,7 @@ } } }, - "timestamp": 1713254892, + "timestamp": 1718814660, "userdoc": { "version": 1, "kind": "user", From ff619492ee74cee744f71a762b165d2563336870 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Wed, 26 Jun 2024 15:46:37 +0700 Subject: [PATCH 214/305] script: mapping Anima token --- .../20240626-maptoken-anima-mainchain.s.sol | 20 +++ ...0240626-maptoken-anima-ronin-testnet.s.sol | 21 +++ .../base-maptoken.s.sol | 20 +++ .../caller-configs.s.sol | 6 + .../maptoken-anima-configs.s.sol | 18 +++ .../factory-maptoken-mainchain-testnet.s.sol | 150 ++++++++++++++++++ 6 files changed, 235 insertions(+) create mode 100644 script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol create mode 100644 script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol create mode 100644 script/20240626-maptoken-anima/base-maptoken.s.sol create mode 100644 script/20240626-maptoken-anima/caller-configs.s.sol create mode 100644 script/20240626-maptoken-anima/maptoken-anima-configs.s.sol create mode 100644 script/factories/factory-maptoken-mainchain-testnet.s.sol diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol new file mode 100644 index 00000000..e39b80e1 --- /dev/null +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "../factories/factory-maptoken-mainchain-testnet.s.sol"; +import "./base-maptoken.s.sol"; + +contract Migration__20240308_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchain_Testnet { + function _initCaller() internal override(Base__MapToken, Factory__MapTokensMainchain_Testnet) returns (address) { + return Base__MapToken._initCaller(); + } + + function _initTokenList() internal override(Base__MapToken, Factory__MapTokensMainchain_Testnet) returns (uint256 totalToken, MapTokenInfo[] memory infos) { + return Base__MapToken._initTokenList(); + } + + function run() public override { + console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network + super.run(); + } +} diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol new file mode 100644 index 00000000..bf3356b0 --- /dev/null +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import "../factories/factory-maptoken-roninchain.s.sol"; +import "./base-maptoken.s.sol"; + +contract Migration__20240308_MapTokenAnimaRoninchain is Base__MapToken, Factory__MapTokensRoninchain { + function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (address) { + return Base__MapToken._initCaller(); + } + + function _initTokenList() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (uint256 totalToken, MapTokenInfo[] memory infos) { + return Base__MapToken._initTokenList(); + } + + function run() public override { + console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network + super.run(); + } +} diff --git a/script/20240626-maptoken-anima/base-maptoken.s.sol b/script/20240626-maptoken-anima/base-maptoken.s.sol new file mode 100644 index 00000000..82565522 --- /dev/null +++ b/script/20240626-maptoken-anima/base-maptoken.s.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "forge-std/console2.sol"; + +import "./caller-configs.s.sol"; +import "./maptoken-anima-configs.s.sol"; + +contract Base__MapToken is Migration__Caller_Config, Migration__MapToken_Anima_Config { + function _initCaller() internal virtual returns (address) { + return SM_GOVERNOR; + } + + function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos) { + totalToken = 1; + + infos = new MapTokenInfo[](totalToken); + infos[0] = _animaInfo; + } +} diff --git a/script/20240626-maptoken-anima/caller-configs.s.sol b/script/20240626-maptoken-anima/caller-configs.s.sol new file mode 100644 index 00000000..1e3428d5 --- /dev/null +++ b/script/20240626-maptoken-anima/caller-configs.s.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__Caller_Config { + address internal SM_GOVERNOR = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; // TODO: replace by address of the SV governor +} diff --git a/script/20240626-maptoken-anima/maptoken-anima-configs.s.sol b/script/20240626-maptoken-anima/maptoken-anima-configs.s.sol new file mode 100644 index 00000000..d59329bd --- /dev/null +++ b/script/20240626-maptoken-anima/maptoken-anima-configs.s.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; + +contract Migration__MapToken_Anima_Config { + MapTokenInfo _animaInfo; + + constructor() { + _animaInfo.roninToken = address(0x9F6a5cDc477e9f667d60424bFdb4E82089d9d72c); + _animaInfo.mainchainToken = address(0xEd52E203D2D44FAaEA0D9fB6A40220A63c743c80); + _animaInfo.minThreshold = 100 ether; + _animaInfo.highTierThreshold = 20_000_000 ether; + _animaInfo.lockedThreshold = 100_000_000 ether; + _animaInfo.dailyWithdrawalLimit = 50_000_000 ether; + _animaInfo.unlockFeePercentages = 10; // 0.001%. Max percentage is 100_0000, so 10 is 0.001% (`10 / 1e6 = 0.001 * 100`) + } +} diff --git a/script/factories/factory-maptoken-mainchain-testnet.s.sol b/script/factories/factory-maptoken-mainchain-testnet.s.sol new file mode 100644 index 00000000..d16ce76f --- /dev/null +++ b/script/factories/factory-maptoken-mainchain-testnet.s.sol @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Migration } from "../Migration.s.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; + +abstract contract Factory__MapTokensMainchain_Testnet is Migration { + using LibCompanionNetwork for *; + + address internal _mainchainGatewayV3; + address internal _mainchainBridgeManager; + address private _governor; + MainchainBridgeAdminUtils _mainchainProposalUtils; + + function setUp() public override { + super.setUp(); + + _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; + _governor = _initCaller(); + } + + function _initCaller() internal virtual returns (address); + function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); + + function run() public virtual { + (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); + + address[] memory mainchainTokens = new address[](N); + address[] memory roninTokens = new address[](N); + TokenStandard[] memory standards = new TokenStandard[](N); + uint256[][4] memory thresholds; + thresholds[0] = new uint256[](N); + thresholds[1] = new uint256[](N); + thresholds[2] = new uint256[](N); + thresholds[3] = new uint256[](N); + + uint256 expiredTime = block.timestamp + 14 days; + address[] memory targets = new address[](1); + uint256[] memory values = new uint256[](1); + bytes[] memory calldatas = new bytes[](1); + uint256[] memory gasAmounts = new uint256[](1); + + // ================ ERC-20 ====================== + + for (uint256 i; i < N; ++i) { + mainchainTokens[i] = tokenInfos[i].mainchainToken; + roninTokens[i] = tokenInfos[i].roninToken; + standards[i] = TokenStandard.ERC20; + thresholds[0][i] = tokenInfos[i].highTierThreshold; + thresholds[1][i] = tokenInfos[i].lockedThreshold; + thresholds[2][i] = tokenInfos[i].unlockFeePercentages; + thresholds[3][i] = tokenInfos[i].dailyWithdrawalLimit; + } + + // function mapTokensAndThresholds( + // address[] calldata _mainchainTokens, + // address[] calldata _roninTokens, + // TokenStandard[] calldata _standards, + // uint256[][4] calldata _thresholds + // ) + + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); + + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[0] = _mainchainGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + // TODO: Replace with real governors, this is for local simulation only. + uint256[] memory governorPKs = new uint256[](4); + governorPKs[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; + governorPKs[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; + governorPKs[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; + governorPKs[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; + + address[] memory governors = new address[](4); + governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; + governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; + governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + + // ================ Cheat Storage =============== + + + bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); + + //cheat governors addresses + for (uint256 i; i < 4; ++i) { + bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); + vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(governors[i])))); + } + //after cheat + for (uint256 i; i < 4; ++i) { + bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); + bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); + + assertEq(afterCheatData, bytes32(uint256(uint160(governors[i])))); + } + + //cheat governors weights + bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); + for (uint256 i; i < 4; ++i) { + address key = governors[i]; + bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); + vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); + } + bytes32 governorsWeightData = vm.load(_mainchainBridgeManager, keccak256(abi.encode(0x087D08e3ba42e64E3948962dd1371F906D1278b9, governorsWeightSlot))); + + // ================ VERIFY AND EXECUTE PROPOSAL =============== + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0]); + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); + supports_[0] = Ballot.VoteType.For; + supports_[1] = Ballot.VoteType.For; + supports_[2] = Ballot.VoteType.For; + supports_[3] = Ballot.VoteType.For; + + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, governorPKs); + vm.broadcast(governors[0]); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); + } +} From 95b746119b46262eebf255a26ca7e7bf4f6c5fa4 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Wed, 26 Jun 2024 16:37:31 +0700 Subject: [PATCH 215/305] script: add factory script for ronin-testnet --- ...0240626-maptoken-anima-ronin-testnet.s.sol | 8 +- .../factory-maptoken-ronin-testnet.s.sol | 141 ++++++++++++++++++ 2 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 script/factories/factory-maptoken-ronin-testnet.s.sol diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol index bf3356b0..3a10a2d9 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol @@ -2,15 +2,15 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; -import "../factories/factory-maptoken-roninchain.s.sol"; +import "../factories/factory-maptoken-ronin-testnet.s.sol"; import "./base-maptoken.s.sol"; -contract Migration__20240308_MapTokenAnimaRoninchain is Base__MapToken, Factory__MapTokensRoninchain { - function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (address) { +contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factory__MapTokensRoninTestnet { + function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninTestnet) returns (address) { return Base__MapToken._initCaller(); } - function _initTokenList() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (uint256 totalToken, MapTokenInfo[] memory infos) { + function _initTokenList() internal override(Base__MapToken, Factory__MapTokensRoninTestnet) returns (uint256 totalToken, MapTokenInfo[] memory infos) { return Base__MapToken._initTokenList(); } diff --git a/script/factories/factory-maptoken-ronin-testnet.s.sol b/script/factories/factory-maptoken-ronin-testnet.s.sol new file mode 100644 index 00000000..710c5747 --- /dev/null +++ b/script/factories/factory-maptoken-ronin-testnet.s.sol @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; + +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; +import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; + +import { Contract } from "../utils/Contract.sol"; +import { Migration } from "../Migration.s.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; + +import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; + +abstract contract Factory__MapTokensRoninTestnet is Migration { + using LibCompanionNetwork for *; + + RoninBridgeManager internal _roninBridgeManager; + address internal _roninGatewayV3; + address private _governor; + + function setUp() public override { + super.setUp(); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + + _governor = _initCaller(); + _cheatWeightOperator(_governor); + } + + function _cheatWeightOperator(address gov) internal { + bytes32 $ = keccak256(abi.encode(gov, 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3)); + bytes32 opAndWeight = vm.load(address(_roninBridgeManager), $); + + uint256 totalWeight = _roninBridgeManager.getTotalWeight(); + bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(opAndWeight))); + vm.store(address(_roninBridgeManager), $, newOpAndWeight); + } + + function _initCaller() internal virtual returns (address); + function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); + + function run() public virtual { + (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); + + address[] memory roninTokens = new address[](N); + address[] memory mainchainTokens = new address[](N); + uint256[] memory chainIds = new uint256[](N); + TokenStandard[] memory standards = new TokenStandard[](N); + + uint256 expiredTime = block.timestamp + 14 days; + address[] memory targets = new address[](2); + uint256[] memory values = new uint256[](2); + bytes[] memory calldatas = new bytes[](2); + uint256[] memory gasAmounts = new uint256[](2); + + // ============= MAP TOKENS =========== + + for (uint256 i; i < N; ++i) { + roninTokens[i] = tokenInfos[i].roninToken; + mainchainTokens[i] = tokenInfos[i].mainchainToken; + chainIds[i] = network().companionChainId(); + standards[i] = TokenStandard.ERC20; + } + + // function mapTokens( + // address[] calldata _roninTokens, + // address[] calldata _mainchainTokens, + // uint256[] calldata chainIds, + // TokenStandard[] calldata _standards + // ) + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[0] = _roninGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + // ============= SET MIN THRESHOLD ============ + // function setMinimumThresholds( + // address[] calldata _tokens, + // uint256[] calldata _thresholds + // ); + address[] memory roninTokensToSetMinThreshold = new address[](N); + uint256[] memory minThresholds = new uint256[](N); + + for (uint256 i; i < N; ++i) { + roninTokensToSetMinThreshold[i] = tokenInfos[i].roninToken; + minThresholds[i] = tokenInfos[i].minThreshold; + } + + innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); + proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[1] = _roninGatewayV3; + values[1] = 0; + calldatas[1] = proxyData; + gasAmounts[1] = 1_000_000; + + // ================ VERIFY AND EXECUTE PROPOSAL =============== + // LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: 2, + chainId: 2021, + expiryTimestamp: expiredTime, + executor: 0x0000000000000000000000000000000000000000, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + + address[] memory governors = new address[](4); + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + // _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); + + vm.broadcast(_governor); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); + vm.broadcast(governors[0]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + vm.broadcast(governors[1]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + vm.broadcast(governors[2]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + } +} From c84234a324dec8ee4768a8ddff131d2a90bc67dd Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Thu, 27 Jun 2024 11:12:24 +0700 Subject: [PATCH 216/305] chore: refactor factory script --- .../20240626-maptoken-anima-mainchain.s.sol | 95 ++++++++++- ...0240626-maptoken-anima-ronin-testnet.s.sol | 45 +++++- .../factory-maptoken-mainchain-testnet.s.sol | 150 ------------------ .../factory-maptoken-mainchain.s.sol | 57 ++++--- .../factory-maptoken-ronin-testnet.s.sol | 141 ---------------- .../factory-maptoken-roninchain.s.sol | 76 +++++---- 6 files changed, 213 insertions(+), 351 deletions(-) delete mode 100644 script/factories/factory-maptoken-mainchain-testnet.s.sol delete mode 100644 script/factories/factory-maptoken-ronin-testnet.s.sol diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol index e39b80e1..ba079049 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol @@ -1,18 +1,105 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import "../factories/factory-maptoken-mainchain-testnet.s.sol"; +import "../factories/factory-maptoken-mainchain.s.sol"; import "./base-maptoken.s.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; -contract Migration__20240308_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchain_Testnet { - function _initCaller() internal override(Base__MapToken, Factory__MapTokensMainchain_Testnet) returns (address) { +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; + +contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchain { + uint256[] private _governorPKs; + address[] private _governors; + MainchainBridgeAdminUtils _mainchainProposalUtils; + + function setUp() public virtual override { + _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; + } + + function _initCaller() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (address) { return Base__MapToken._initCaller(); } - function _initTokenList() internal override(Base__MapToken, Factory__MapTokensMainchain_Testnet) returns (uint256 totalToken, MapTokenInfo[] memory infos) { + function _initTokenList() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (uint256 totalToken, MapTokenInfo[] memory infos) { return Base__MapToken._initTokenList(); } + function _cheatStorage() internal { + // TODO: Replace with real governors, this is for local simulation only. + _governorPKs = new uint256[](4); + _governorPKs[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; + _governorPKs[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; + _governorPKs[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; + _governorPKs[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; + + _governors = new address[](4); + _governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + _governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; + _governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; + _governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + + // ================ Cheat Storage =============== + + bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); + + //cheat governors addresses + for (uint256 i; i < 4; ++i) { + bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); + vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(_governors[i])))); + } + //after cheat + for (uint256 i; i < 4; ++i) { + bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); + bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); + + assertEq(afterCheatData, bytes32(uint256(uint160(_governors[i])))); + } + + //cheat governors weights + bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); + for (uint256 i; i < 4; ++i) { + address key = _governors[i]; + bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); + vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); + } + bytes32 governorsWeightData = vm.load(_mainchainBridgeManager, keccak256(abi.encode(0x087D08e3ba42e64E3948962dd1371F906D1278b9, governorsWeightSlot))); + } + + function _verifyAndExecuteProposal() internal virtual override { + (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) = _prepareProposal(); + _cheatStorage(); + + // uint256 chainId = network().companionChainId(); + uint256 expiredTime = block.timestamp + 14 days; + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + console2.log("preparing..."); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); + supports_[0] = Ballot.VoteType.For; + supports_[1] = Ballot.VoteType.For; + supports_[2] = Ballot.VoteType.For; + supports_[3] = Ballot.VoteType.For; + + SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, _governorPKs); + vm.broadcast(_governors[0]); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); + } + function run() public override { console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network super.run(); diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol index 3a10a2d9..8c73a539 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol @@ -2,18 +2,55 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; -import "../factories/factory-maptoken-ronin-testnet.s.sol"; +import "../factories/factory-maptoken-roninchain.s.sol"; import "./base-maptoken.s.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; -contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factory__MapTokensRoninTestnet { - function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninTestnet) returns (address) { +contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factory__MapTokensRoninchain { + function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (address) { return Base__MapToken._initCaller(); } - function _initTokenList() internal override(Base__MapToken, Factory__MapTokensRoninTestnet) returns (uint256 totalToken, MapTokenInfo[] memory infos) { + function _initTokenList() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (uint256 totalToken, MapTokenInfo[] memory infos) { return Base__MapToken._initTokenList(); } + function _verifyAndExecuteProposal() internal virtual override { + // ================ VERIFY AND EXECUTE PROPOSAL =============== + // LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); + (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) = _prepareProposal(); + + uint256 expiredTime = block.timestamp + 14 days; + + Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ + nonce: 2, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: 0x0000000000000000000000000000000000000000, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + + address[] memory governors = new address[](4); + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + // _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); + + vm.broadcast(governors[0]); + _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); + vm.broadcast(governors[0]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + vm.broadcast(governors[1]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + vm.broadcast(governors[2]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + } + function run() public override { console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network super.run(); diff --git a/script/factories/factory-maptoken-mainchain-testnet.s.sol b/script/factories/factory-maptoken-mainchain-testnet.s.sol deleted file mode 100644 index d16ce76f..00000000 --- a/script/factories/factory-maptoken-mainchain-testnet.s.sol +++ /dev/null @@ -1,150 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import { console2 } from "forge-std/console2.sol"; -import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; -import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; -import { Contract } from "../utils/Contract.sol"; -import { Migration } from "../Migration.s.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; -import { Network } from "../utils/Network.sol"; -import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; -import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; -import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; -import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; -import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; - -abstract contract Factory__MapTokensMainchain_Testnet is Migration { - using LibCompanionNetwork for *; - - address internal _mainchainGatewayV3; - address internal _mainchainBridgeManager; - address private _governor; - MainchainBridgeAdminUtils _mainchainProposalUtils; - - function setUp() public override { - super.setUp(); - - _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; - _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; - _governor = _initCaller(); - } - - function _initCaller() internal virtual returns (address); - function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - - function run() public virtual { - (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); - - address[] memory mainchainTokens = new address[](N); - address[] memory roninTokens = new address[](N); - TokenStandard[] memory standards = new TokenStandard[](N); - uint256[][4] memory thresholds; - thresholds[0] = new uint256[](N); - thresholds[1] = new uint256[](N); - thresholds[2] = new uint256[](N); - thresholds[3] = new uint256[](N); - - uint256 expiredTime = block.timestamp + 14 days; - address[] memory targets = new address[](1); - uint256[] memory values = new uint256[](1); - bytes[] memory calldatas = new bytes[](1); - uint256[] memory gasAmounts = new uint256[](1); - - // ================ ERC-20 ====================== - - for (uint256 i; i < N; ++i) { - mainchainTokens[i] = tokenInfos[i].mainchainToken; - roninTokens[i] = tokenInfos[i].roninToken; - standards[i] = TokenStandard.ERC20; - thresholds[0][i] = tokenInfos[i].highTierThreshold; - thresholds[1][i] = tokenInfos[i].lockedThreshold; - thresholds[2][i] = tokenInfos[i].unlockFeePercentages; - thresholds[3][i] = tokenInfos[i].dailyWithdrawalLimit; - } - - // function mapTokensAndThresholds( - // address[] calldata _mainchainTokens, - // address[] calldata _roninTokens, - // TokenStandard[] calldata _standards, - // uint256[][4] calldata _thresholds - // ) - - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); - - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[0] = _mainchainGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; - - // TODO: Replace with real governors, this is for local simulation only. - uint256[] memory governorPKs = new uint256[](4); - governorPKs[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; - governorPKs[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; - governorPKs[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; - governorPKs[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; - - address[] memory governors = new address[](4); - governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; - governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; - governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; - governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; - - // ================ Cheat Storage =============== - - - bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); - - //cheat governors addresses - for (uint256 i; i < 4; ++i) { - bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); - vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(governors[i])))); - } - //after cheat - for (uint256 i; i < 4; ++i) { - bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); - bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); - - assertEq(afterCheatData, bytes32(uint256(uint160(governors[i])))); - } - - //cheat governors weights - bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); - for (uint256 i; i < 4; ++i) { - address key = governors[i]; - bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); - vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); - } - bytes32 governorsWeightData = vm.load(_mainchainBridgeManager, keccak256(abi.encode(0x087D08e3ba42e64E3948962dd1371F906D1278b9, governorsWeightSlot))); - - // ================ VERIFY AND EXECUTE PROPOSAL =============== - _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0]); - - Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ - nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, - chainId: block.chainid, - expiryTimestamp: expiredTime, - executor: address(0), - targets: targets, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts - }); - - Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); - supports_[0] = Ballot.VoteType.For; - supports_[1] = Ballot.VoteType.For; - supports_[2] = Ballot.VoteType.For; - supports_[3] = Ballot.VoteType.For; - - SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, governorPKs); - vm.broadcast(governors[0]); - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); - } -} diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index fa0f4d7e..ea5a12de 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -24,7 +24,7 @@ abstract contract Factory__MapTokensMainchain is Migration { address internal _mainchainBridgeManager; address private _governor; - function setUp() public override { + function setUp() public virtual override { super.setUp(); _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); @@ -37,26 +37,27 @@ abstract contract Factory__MapTokensMainchain is Migration { function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - function run() public virtual { + function _prepareMapTokensAndThresholds() + internal + returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) + { + // function mapTokensAndThresholds( + // address[] calldata _mainchainTokens, + // address[] calldata _roninTokens, + // TokenStandard.ERC20[] calldata _standards, + // uint256[][4] calldata _thresholds + // ) (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); - address[] memory mainchainTokens = new address[](N); - address[] memory roninTokens = new address[](N); - TokenStandard[] memory standards = new TokenStandard[](N); - uint256[][4] memory thresholds; + mainchainTokens = new address[](N); + roninTokens = new address[](N); + standards = new TokenStandard[](N); + thresholds[0] = new uint256[](N); thresholds[1] = new uint256[](N); thresholds[2] = new uint256[](N); thresholds[3] = new uint256[](N); - uint256 expiredTime = block.timestamp + 14 days; - address[] memory targets = new address[](1); - uint256[] memory values = new uint256[](1); - bytes[] memory calldatas = new bytes[](1); - uint256[] memory gasAmounts = new uint256[](1); - - // ================ APERIOS AND YGG ERC-20 ====================== - for (uint256 i; i < N; ++i) { mainchainTokens[i] = tokenInfos[i].mainchainToken; roninTokens[i] = tokenInfos[i].roninToken; @@ -66,30 +67,36 @@ abstract contract Factory__MapTokensMainchain is Migration { thresholds[2][i] = tokenInfos[i].unlockFeePercentages; thresholds[3][i] = tokenInfos[i].dailyWithdrawalLimit; } + } - // function mapTokensAndThresholds( - // address[] calldata _mainchainTokens, - // address[] calldata _roninTokens, - // TokenStandard[] calldata _standards, - // uint256[][4] calldata _thresholds - // ) - + function _prepareProposal() internal returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) { + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) = + _prepareMapTokensAndThresholds(); bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + targets = new address[](1); + values = new uint256[](1); + calldatas = new bytes[](1); + gasAmounts = new uint256[](1); + targets[0] = _mainchainGatewayV3; values[0] = 0; calldatas[0] = proxyData; gasAmounts[0] = 1_000_000; + } - // ================ VERIFY AND EXECUTE PROPOSAL =============== - - // _verifyMainchainProposalGasAmount(targets, values, calldatas, gasAmounts); + function _verifyAndExecuteProposal() internal virtual { + (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) = _prepareProposal(); uint256 chainId = network().companionChainId(); + uint256 expiredTime = block.timestamp + 14 days; vm.broadcast(_governor); _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } + + function run() public virtual { + _verifyAndExecuteProposal(); + } } diff --git a/script/factories/factory-maptoken-ronin-testnet.s.sol b/script/factories/factory-maptoken-ronin-testnet.s.sol deleted file mode 100644 index 710c5747..00000000 --- a/script/factories/factory-maptoken-ronin-testnet.s.sol +++ /dev/null @@ -1,141 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import { console2 } from "forge-std/console2.sol"; -import { StdStyle } from "forge-std/StdStyle.sol"; - -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; -import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; -import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; -import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; -import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; - -import { Contract } from "../utils/Contract.sol"; -import { Migration } from "../Migration.s.sol"; -import { Network } from "../utils/Network.sol"; -import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; - -import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; -import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; - -abstract contract Factory__MapTokensRoninTestnet is Migration { - using LibCompanionNetwork for *; - - RoninBridgeManager internal _roninBridgeManager; - address internal _roninGatewayV3; - address private _governor; - - function setUp() public override { - super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - - _governor = _initCaller(); - _cheatWeightOperator(_governor); - } - - function _cheatWeightOperator(address gov) internal { - bytes32 $ = keccak256(abi.encode(gov, 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3)); - bytes32 opAndWeight = vm.load(address(_roninBridgeManager), $); - - uint256 totalWeight = _roninBridgeManager.getTotalWeight(); - bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(opAndWeight))); - vm.store(address(_roninBridgeManager), $, newOpAndWeight); - } - - function _initCaller() internal virtual returns (address); - function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - - function run() public virtual { - (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); - - address[] memory roninTokens = new address[](N); - address[] memory mainchainTokens = new address[](N); - uint256[] memory chainIds = new uint256[](N); - TokenStandard[] memory standards = new TokenStandard[](N); - - uint256 expiredTime = block.timestamp + 14 days; - address[] memory targets = new address[](2); - uint256[] memory values = new uint256[](2); - bytes[] memory calldatas = new bytes[](2); - uint256[] memory gasAmounts = new uint256[](2); - - // ============= MAP TOKENS =========== - - for (uint256 i; i < N; ++i) { - roninTokens[i] = tokenInfos[i].roninToken; - mainchainTokens[i] = tokenInfos[i].mainchainToken; - chainIds[i] = network().companionChainId(); - standards[i] = TokenStandard.ERC20; - } - - // function mapTokens( - // address[] calldata _roninTokens, - // address[] calldata _mainchainTokens, - // uint256[] calldata chainIds, - // TokenStandard[] calldata _standards - // ) - bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[0] = _roninGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; - - // ============= SET MIN THRESHOLD ============ - // function setMinimumThresholds( - // address[] calldata _tokens, - // uint256[] calldata _thresholds - // ); - address[] memory roninTokensToSetMinThreshold = new address[](N); - uint256[] memory minThresholds = new uint256[](N); - - for (uint256 i; i < N; ++i) { - roninTokensToSetMinThreshold[i] = tokenInfos[i].roninToken; - minThresholds[i] = tokenInfos[i].minThreshold; - } - - innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); - proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[1] = _roninGatewayV3; - values[1] = 0; - calldatas[1] = proxyData; - gasAmounts[1] = 1_000_000; - - // ================ VERIFY AND EXECUTE PROPOSAL =============== - // LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); - - Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ - nonce: 2, - chainId: 2021, - expiryTimestamp: expiredTime, - executor: 0x0000000000000000000000000000000000000000, - targets: targets, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts - }); - - address[] memory governors = new address[](4); - governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - - // _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); - - vm.broadcast(_governor); - _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); - vm.broadcast(governors[0]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); - vm.broadcast(governors[1]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); - vm.broadcast(governors[2]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); - } -} diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index 6fb30cd8..0354745e 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -48,19 +48,22 @@ abstract contract Factory__MapTokensRoninchain is Migration { function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - function run() public virtual { + function _prepareMapToken() + internal + returns (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) + { + // function mapTokens( + // address[] calldata _roninTokens, + // address[] calldata _mainchainTokens, + // uint256[] calldata chainIds, + // TokenStandard[] calldata _standards + // ) (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); - address[] memory roninTokens = new address[](N); - address[] memory mainchainTokens = new address[](N); - uint256[] memory chainIds = new uint256[](N); - TokenStandard[] memory standards = new TokenStandard[](N); - - uint256 expiredTime = block.timestamp + 14 days; - address[] memory targets = new address[](2); - uint256[] memory values = new uint256[](2); - bytes[] memory calldatas = new bytes[](2); - uint256[] memory gasAmounts = new uint256[](2); + roninTokens = new address[](N); + mainchainTokens = new address[](N); + chainIds = new uint256[](N); + standards = new TokenStandard[](N); // ============= MAP TOKENS =========== @@ -70,33 +73,41 @@ abstract contract Factory__MapTokensRoninchain is Migration { chainIds[i] = network().companionChainId(); standards[i] = TokenStandard.ERC20; } + } - // function mapTokens( - // address[] calldata _roninTokens, - // address[] calldata _mainchainTokens, - // uint256[] calldata chainIds, - // TokenStandard[] calldata _standards - // ) - bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[0] = _roninGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; + function _prepareSetMinThreshold() internal returns (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) { + (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); // ============= SET MIN THRESHOLD ============ // function setMinimumThresholds( // address[] calldata _tokens, // uint256[] calldata _thresholds // ); - address[] memory roninTokensToSetMinThreshold = new address[](N); - uint256[] memory minThresholds = new uint256[](N); + roninTokensToSetMinThreshold = new address[](N); + minThresholds = new uint256[](N); for (uint256 i; i < N; ++i) { roninTokensToSetMinThreshold[i] = tokenInfos[i].roninToken; minThresholds[i] = tokenInfos[i].minThreshold; } + } + + function _prepareProposal() internal returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) { + (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) = _prepareMapToken(); + (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) = _prepareSetMinThreshold(); + + targets = new address[](2); + values = new uint256[](2); + calldatas = new bytes[](2); + gasAmounts = new uint256[](2); + + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[0] = _roninGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); @@ -105,12 +116,23 @@ abstract contract Factory__MapTokensRoninchain is Migration { values[1] = 0; calldatas[1] = proxyData; gasAmounts[1] = 1_000_000; + } + function _verifyAndExecuteProposal() internal virtual { // ================ VERIFY AND EXECUTE PROPOSAL =============== // _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); + (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) = _prepareProposal(); + + uint256 chainId = network().companionChainId(); + uint256 expiredTime = block.timestamp + 14 days; + vm.broadcast(_governor); - _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); + _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); + } + + function run() public virtual { + _verifyAndExecuteProposal(); } } From 09c5b1b899bc5e662509b65f8b5be1d24e08e074 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Fri, 28 Jun 2024 10:29:34 +0700 Subject: [PATCH 217/305] chore: refactor code --- .../20240626-maptoken-anima-mainchain.s.sol | 92 +++--------- ...0240626-maptoken-anima-ronin-testnet.s.sol | 45 ++---- .../factory-maptoken-mainchain.s.sol | 133 +++++++++++++---- .../factory-maptoken-roninchain.s.sol | 136 +++++++++++------- 4 files changed, 215 insertions(+), 191 deletions(-) diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol index ba079049..5ae85a9e 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol @@ -4,20 +4,31 @@ pragma solidity ^0.8.19; import "../factories/factory-maptoken-mainchain.s.sol"; import "./base-maptoken.s.sol"; import "@ronin/contracts/libraries/Ballot.sol"; - +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchain { - uint256[] private _governorPKs; - address[] private _governors; MainchainBridgeAdminUtils _mainchainProposalUtils; function setUp() public virtual override { _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; + + _governorPKs = new uint256[](4); + _governorPKs[3] = 0x0; + _governorPKs[2] = 0x0; + _governorPKs[0] = 0x0; + _governorPKs[1] = 0x0; + + _governors = new address[](4); + _governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + _governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + _governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; } function _initCaller() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (address) { @@ -28,80 +39,9 @@ contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__ return Base__MapToken._initTokenList(); } - function _cheatStorage() internal { - // TODO: Replace with real governors, this is for local simulation only. - _governorPKs = new uint256[](4); - _governorPKs[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; - _governorPKs[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; - _governorPKs[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; - _governorPKs[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; - - _governors = new address[](4); - _governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; - _governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; - _governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; - _governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; - - // ================ Cheat Storage =============== - - bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); - - //cheat governors addresses - for (uint256 i; i < 4; ++i) { - bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); - vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(_governors[i])))); - } - //after cheat - for (uint256 i; i < 4; ++i) { - bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); - bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); - - assertEq(afterCheatData, bytes32(uint256(uint160(_governors[i])))); - } - - //cheat governors weights - bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); - for (uint256 i; i < 4; ++i) { - address key = _governors[i]; - bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); - vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); - } - bytes32 governorsWeightData = vm.load(_mainchainBridgeManager, keccak256(abi.encode(0x087D08e3ba42e64E3948962dd1371F906D1278b9, governorsWeightSlot))); - } - - function _verifyAndExecuteProposal() internal virtual override { - (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) = _prepareProposal(); - _cheatStorage(); - - // uint256 chainId = network().companionChainId(); - uint256 expiredTime = block.timestamp + 14 days; - _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); - - Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ - nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, - chainId: block.chainid, - expiryTimestamp: expiredTime, - executor: address(0), - targets: targets, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts - }); - console2.log("preparing..."); - - Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](4); - supports_[0] = Ballot.VoteType.For; - supports_[1] = Ballot.VoteType.For; - supports_[2] = Ballot.VoteType.For; - supports_[3] = Ballot.VoteType.For; - - SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, _governorPKs); - vm.broadcast(_governors[0]); - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); - } - function run() public override { console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network - super.run(); + // _cheatStorage(_governors); + _relayProposal(); } } diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol index 8c73a539..0ca3a3ea 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol @@ -7,6 +7,15 @@ import "./base-maptoken.s.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factory__MapTokensRoninchain { + function setUp() public virtual override { + super.setUp(); + _governors = new address[](4); + _governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + _governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + _governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + } + function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (address) { return Base__MapToken._initCaller(); } @@ -15,42 +24,6 @@ contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factor return Base__MapToken._initTokenList(); } - function _verifyAndExecuteProposal() internal virtual override { - // ================ VERIFY AND EXECUTE PROPOSAL =============== - // LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); - (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) = _prepareProposal(); - - uint256 expiredTime = block.timestamp + 14 days; - - Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ - nonce: 2, - chainId: block.chainid, - expiryTimestamp: expiredTime, - executor: 0x0000000000000000000000000000000000000000, - targets: targets, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts - }); - - address[] memory governors = new address[](4); - governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - - // _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); - - vm.broadcast(governors[0]); - _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); - vm.broadcast(governors[0]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); - vm.broadcast(governors[1]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); - vm.broadcast(governors[2]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); - } - function run() public override { console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network super.run(); diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index ea5a12de..9748226f 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -1,20 +1,25 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import "@ronin/contracts/libraries/Ballot.sol"; import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; import { Migration } from "../Migration.s.sol"; -import { Network } from "../utils/Network.sol"; +import { Network, TNetwork } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; - +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; abstract contract Factory__MapTokensMainchain is Migration { using LibCompanionNetwork for *; @@ -22,7 +27,9 @@ abstract contract Factory__MapTokensMainchain is Migration { RoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; - address private _governor; + address internal _governor; + address[] internal _governors; + uint256[] internal _governorPKs; function setUp() public virtual override { super.setUp(); @@ -34,9 +41,80 @@ abstract contract Factory__MapTokensMainchain is Migration { _governor = _initCaller(); } + function run() public virtual { + _proposeProposal(); + } + function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); + function _proposeProposal() internal virtual { + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + + vm.broadcast(_governor); + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + } + + function _relayProposal() internal { + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + + MainchainBridgeAdminUtils mainchainProposalUtils = + new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](_governors.length); + require(_governors.length > 0 && _governors.length == _governorPKs.length, "Invalid governors information"); + + for (uint256 i; i < _governors.length; ++i) { + supports_[i] = Ballot.VoteType.For; + } + + SignatureConsumer.Signature[] memory signatures = mainchainProposalUtils.generateSignatures(proposal, _governorPKs); + vm.broadcast(_governors[0]); + + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); + } + + function _createAndVerifyProposal() internal returns (Proposal.ProposalDetail memory proposal) { + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) = + _prepareMapTokensAndThresholds(); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + uint256 expiredTime = block.timestamp + 14 days; + address[] memory targets = new address[](1); + uint256[] memory values = new uint256[](1); + bytes[] memory calldatas = new bytes[](1); + uint256[] memory gasAmounts = new uint256[](1); + + targets[0] = _mainchainGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + uint256 nonce = (block.chainid == 2021 || block.chainid == 2020) ? 0 : MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1; + + // Verify gas when call from mainchain. + LibProposal.verifyProposalGasAmount(address(_mainchainBridgeManager), targets, values, calldatas, gasAmounts); + + // // Verify gas when call from ronin. + // (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); + // address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + // LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); + + proposal = Proposal.ProposalDetail({ + nonce: nonce, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + } + function _prepareMapTokensAndThresholds() internal returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) @@ -69,34 +147,31 @@ abstract contract Factory__MapTokensMainchain is Migration { } } - function _prepareProposal() internal returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) { - (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) = - _prepareMapTokensAndThresholds(); - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets = new address[](1); - values = new uint256[](1); - calldatas = new bytes[](1); - gasAmounts = new uint256[](1); - - targets[0] = _mainchainGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; - } - - function _verifyAndExecuteProposal() internal virtual { - (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) = _prepareProposal(); + function _cheatStorage(address[] memory governors) internal { + // ================ Cheat Storage =============== - uint256 chainId = network().companionChainId(); - uint256 expiredTime = block.timestamp + 14 days; + bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); + uint256 length = governors.length; + //cheat governors addresses + for (uint256 i; i < length; ++i) { + bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); + vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(governors[i])))); + } + //after cheat + for (uint256 i; i < length; ++i) { + bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); + bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); - vm.broadcast(_governor); - _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); - } + assertEq(afterCheatData, bytes32(uint256(uint160(governors[i])))); + } - function run() public virtual { - _verifyAndExecuteProposal(); + //cheat governors weights + bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); + for (uint256 i; i < length; ++i) { + address key = governors[i]; + bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); + vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); + } + bytes32 governorsWeightData = vm.load(_mainchainBridgeManager, keccak256(abi.encode(0x087D08e3ba42e64E3948962dd1371F906D1278b9, governorsWeightSlot))); } } diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index 0354745e..ee26346b 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -10,13 +10,13 @@ import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; - +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { Contract } from "../utils/Contract.sol"; import { Migration } from "../Migration.s.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; - +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; @@ -26,14 +26,97 @@ abstract contract Factory__MapTokensRoninchain is Migration { RoninBridgeManager internal _roninBridgeManager; address internal _roninGatewayV3; address private _governor; + address[] internal _governors; - function setUp() public override { + function setUp() public virtual override { super.setUp(); _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); _governor = _initCaller(); _cheatWeightOperator(_governor); + + _governors = new address[](4); + _governors[3] = address(0); + _governors[2] = address(0); + _governors[0] = address(0); + _governors[1] = address(0); + } + + function run() public virtual { + _proposeAndCastVoteForProposal(); + } + + function _initCaller() internal virtual returns (address); + function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); + + function _proposeAndCastVoteForProposal() internal { + Proposal.ProposalDetail memory proposal = _proposeProposal(); + + uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); + uint256 sumVoteWeight; + uint256 amountGovernorsNeedToVote; + + for (uint256 i; i < _governors.length; ++i) { + sumVoteWeight += _roninBridgeManager.getGovernorWeight(_governors[i]); + amountGovernorsNeedToVote++; + if (sumVoteWeight >= minVoteWeight) break; + } + require(sumVoteWeight > 0 && amountGovernorsNeedToVote > 0); + + for (uint256 i; i < amountGovernorsNeedToVote; ++i) { + vm.broadcast(_governors[i]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + } + } + + function _proposeProposal() internal virtual returns (Proposal.ProposalDetail memory proposal) { + proposal = _createAndVerifyProposal(); + + vm.broadcast(_governor); + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + } + + function _createAndVerifyProposal() internal returns (Proposal.ProposalDetail memory proposal) { + (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) = _prepareMapToken(); + (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) = _prepareSetMinThreshold(); + + address[] memory targets = new address[](2); + uint256[] memory values = new uint256[](2); + bytes[] memory calldatas = new bytes[](2); + uint256[] memory gasAmounts = new uint256[](2); + + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + uint256 expiredTime = block.timestamp + 14 days; + targets[0] = _roninGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); + proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[1] = _roninGatewayV3; + values[1] = 0; + calldatas[1] = proxyData; + gasAmounts[1] = 1_000_000; + + LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); + + proposal = Proposal.ProposalDetail({ + nonce: RoninBridgeManager(_roninBridgeManager).round(2021) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: 0x0000000000000000000000000000000000000000, + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); } function _cheatWeightOperator(address gov) internal { @@ -45,9 +128,6 @@ abstract contract Factory__MapTokensRoninchain is Migration { vm.store(address(_roninBridgeManager), $, newOpAndWeight); } - function _initCaller() internal virtual returns (address); - function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - function _prepareMapToken() internal returns (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) @@ -91,48 +171,4 @@ abstract contract Factory__MapTokensRoninchain is Migration { minThresholds[i] = tokenInfos[i].minThreshold; } } - - function _prepareProposal() internal returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) { - (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) = _prepareMapToken(); - (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) = _prepareSetMinThreshold(); - - targets = new address[](2); - values = new uint256[](2); - calldatas = new bytes[](2); - gasAmounts = new uint256[](2); - - bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[0] = _roninGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; - - innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); - proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[1] = _roninGatewayV3; - values[1] = 0; - calldatas[1] = proxyData; - gasAmounts[1] = 1_000_000; - } - - function _verifyAndExecuteProposal() internal virtual { - // ================ VERIFY AND EXECUTE PROPOSAL =============== - - // _verifyRoninProposalGasAmount(targets, values, calldatas, gasAmounts); - - (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, uint256[] memory gasAmounts) = _prepareProposal(); - - uint256 chainId = network().companionChainId(); - uint256 expiredTime = block.timestamp + 14 days; - - vm.broadcast(_governor); - _roninBridgeManager.propose(chainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); - } - - function run() public virtual { - _verifyAndExecuteProposal(); - } } From ada6b24cbc0725734568804cdb849314630213ad Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Mon, 1 Jul 2024 15:51:28 +0700 Subject: [PATCH 218/305] chore: refactor factory and map anima token script --- .../20240626-maptoken-anima-mainchain.s.sol | 38 +++++++++---------- ...0240626-maptoken-anima-ronin-testnet.s.sol | 20 +++++----- .../factory-maptoken-mainchain.s.sol | 25 ++++++------ .../factory-maptoken-roninchain.s.sol | 24 ++++++------ 4 files changed, 49 insertions(+), 58 deletions(-) diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol index 5ae85a9e..c9c7d6de 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol @@ -14,23 +14,6 @@ import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBrid contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchain { MainchainBridgeAdminUtils _mainchainProposalUtils; - function setUp() public virtual override { - _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; - _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; - - _governorPKs = new uint256[](4); - _governorPKs[3] = 0x0; - _governorPKs[2] = 0x0; - _governorPKs[0] = 0x0; - _governorPKs[1] = 0x0; - - _governors = new address[](4); - _governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - _governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - _governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - _governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - } - function _initCaller() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (address) { return Base__MapToken._initCaller(); } @@ -40,8 +23,23 @@ contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__ } function run() public override { - console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network - // _cheatStorage(_governors); - _relayProposal(); + _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; + _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; + + _governorPKs = new uint256[](4); + _governorPKs[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; + _governorPKs[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; + _governorPKs[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; + _governorPKs[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; + _governors = new address[](4); + _governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + _governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; + _governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; + _governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + + _cheatStorage(_governors); + _relayProposal(proposal); } } diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol index 0ca3a3ea..53aa0a18 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol @@ -7,15 +7,6 @@ import "./base-maptoken.s.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factory__MapTokensRoninchain { - function setUp() public virtual override { - super.setUp(); - _governors = new address[](4); - _governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - _governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - _governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - _governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - } - function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (address) { return Base__MapToken._initCaller(); } @@ -25,7 +16,14 @@ contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factor } function run() public override { - console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network - super.run(); + _governors = new address[](4); + _governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + _governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + _governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + + _proposeAndExecute(proposal); } } diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index 9748226f..18cb6b6b 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -12,7 +12,6 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Migration } from "../Migration.s.sol"; import { Network, TNetwork } from "../utils/Network.sol"; -import { Contract } from "../utils/Contract.sol"; import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; @@ -31,35 +30,33 @@ abstract contract Factory__MapTokensMainchain is Migration { address[] internal _governors; uint256[] internal _governorPKs; - function setUp() public virtual override { + function setUp() public override { super.setUp(); - - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); - _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); + if (block.chainid == 2020 || block.chainid == 2021) { + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); + } _governor = _initCaller(); } function run() public virtual { - _proposeProposal(); + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + _propose(proposal); } function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - function _proposeProposal() internal virtual { - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); - + function _propose(Proposal.ProposalDetail memory proposal) internal virtual { vm.broadcast(_governor); _roninBridgeManager.propose( proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts ); } - function _relayProposal() internal { - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); - + function _relayProposal(Proposal.ProposalDetail memory proposal) internal { MainchainBridgeAdminUtils mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); @@ -71,8 +68,8 @@ abstract contract Factory__MapTokensMainchain is Migration { } SignatureConsumer.Signature[] memory signatures = mainchainProposalUtils.generateSignatures(proposal, _governorPKs); - vm.broadcast(_governors[0]); + vm.broadcast(_governors[0]); MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); } diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index ee26346b..9cc636c2 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -35,23 +35,20 @@ abstract contract Factory__MapTokensRoninchain is Migration { _governor = _initCaller(); _cheatWeightOperator(_governor); - - _governors = new address[](4); - _governors[3] = address(0); - _governors[2] = address(0); - _governors[0] = address(0); - _governors[1] = address(0); } function run() public virtual { - _proposeAndCastVoteForProposal(); + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + _propose(proposal); } function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - function _proposeAndCastVoteForProposal() internal { - Proposal.ProposalDetail memory proposal = _proposeProposal(); + function _proposeAndExecute(Proposal.ProposalDetail memory proposal) internal { + proposal.executor = _governors[0]; + + _propose(proposal); uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); uint256 sumVoteWeight; @@ -68,11 +65,12 @@ abstract contract Factory__MapTokensRoninchain is Migration { vm.broadcast(_governors[i]); _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); } - } - function _proposeProposal() internal virtual returns (Proposal.ProposalDetail memory proposal) { - proposal = _createAndVerifyProposal(); + vm.broadcast(_governors[0]); + _roninBridgeManager.execute{ gas: 2_000_000 }(proposal); + } + function _propose(Proposal.ProposalDetail memory proposal) internal virtual { vm.broadcast(_governor); _roninBridgeManager.propose( proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts @@ -111,7 +109,7 @@ abstract contract Factory__MapTokensRoninchain is Migration { nonce: RoninBridgeManager(_roninBridgeManager).round(2021) + 1, chainId: block.chainid, expiryTimestamp: expiredTime, - executor: 0x0000000000000000000000000000000000000000, + executor: address(0), targets: targets, values: values, calldatas: calldatas, From 6c27f978c33455959e64b38a5ef9d07ff862dc0f Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Mon, 1 Jul 2024 17:23:30 +0700 Subject: [PATCH 219/305] script: refactor scripts --- .../20240626-maptoken-anima-mainchain.s.sol | 29 +++++++++++-------- ...0240626-maptoken-anima-ronin-testnet.s.sol | 13 +++++---- .../factory-maptoken-mainchain.s.sol | 23 +++++++++++---- .../factory-maptoken-roninchain.s.sol | 1 - 4 files changed, 42 insertions(+), 24 deletions(-) diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol index c9c7d6de..7e165396 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol @@ -26,20 +26,25 @@ contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__ _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; - _governorPKs = new uint256[](4); - _governorPKs[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; - _governorPKs[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; - _governorPKs[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; - _governorPKs[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; - _governors = new address[](4); - _governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; - _governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; - _governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; - _governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + uint256[] memory governorsPkMemory = new uint256[](4); + governorsPkMemory[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; + governorsPkMemory[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; + governorsPkMemory[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; + governorsPkMemory[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; + + address[] memory governorsMemory = new address[](4); + governorsMemory[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + governorsMemory[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; + governorsMemory[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; + governorsMemory[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + + for (uint256 i; i < 4; ++i) { + _governors.push(governorsMemory[i]); + _governorPKs.push(governorsPkMemory[i]); + } Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); - - _cheatStorage(_governors); + _cheatStorage(governorsMemory); _relayProposal(proposal); } } diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol index 53aa0a18..347f05fc 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol @@ -16,11 +16,14 @@ contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factor } function run() public override { - _governors = new address[](4); - _governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - _governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - _governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - _governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + address[] memory governorsMemory = new address[](4); + governorsMemory[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governorsMemory[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governorsMemory[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governorsMemory[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + for (uint256 i; i < 4; ++i) { + _governors.push(governorsMemory[i]); + } Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index 18cb6b6b..9cc7f660 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -69,8 +69,13 @@ abstract contract Factory__MapTokensMainchain is Migration { SignatureConsumer.Signature[] memory signatures = mainchainProposalUtils.generateSignatures(proposal, _governorPKs); + uint256 gasAmounts = 1_000_000; + for (uint256 i; i < proposal.gasAmounts.length; ++i) { + gasAmounts += proposal.gasAmounts[i]; + } + vm.broadcast(_governors[0]); - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, supports_, signatures); } function _createAndVerifyProposal() internal returns (Proposal.ProposalDetail memory proposal) { @@ -90,8 +95,6 @@ abstract contract Factory__MapTokensMainchain is Migration { calldatas[0] = proxyData; gasAmounts[0] = 1_000_000; - uint256 nonce = (block.chainid == 2021 || block.chainid == 2020) ? 0 : MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1; - // Verify gas when call from mainchain. LibProposal.verifyProposalGasAmount(address(_mainchainBridgeManager), targets, values, calldatas, gasAmounts); @@ -100,9 +103,19 @@ abstract contract Factory__MapTokensMainchain is Migration { // address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); // LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); + uint256 chainId; + uint256 nonce; + if (block.chainid == 2020 || block.chainid == 2021) { + nonce = 0; + (chainId,) = network().companionNetworkData(); + } else { + nonce = MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1; + chainId = block.chainid; + } + proposal = Proposal.ProposalDetail({ nonce: nonce, - chainId: block.chainid, + chainId: chainId, expiryTimestamp: expiredTime, executor: address(0), targets: targets, @@ -145,8 +158,6 @@ abstract contract Factory__MapTokensMainchain is Migration { } function _cheatStorage(address[] memory governors) internal { - // ================ Cheat Storage =============== - bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); uint256 length = governors.length; //cheat governors addresses diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index 9cc636c2..35f92d42 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -47,7 +47,6 @@ abstract contract Factory__MapTokensRoninchain is Migration { function _proposeAndExecute(Proposal.ProposalDetail memory proposal) internal { proposal.executor = _governors[0]; - _propose(proposal); uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); From a7a19f1806a6344f8c0695f5493409808b95f268 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Tue, 2 Jul 2024 17:11:44 +0700 Subject: [PATCH 220/305] script: minor refactor --- .../20240626-maptoken-anima-mainchain.s.sol | 34 ++-- ...0240626-maptoken-anima-ronin-testnet.s.sol | 21 +-- .../base-maptoken.s.sol | 11 +- .../governors-configs.s.sol | 20 +++ .../factory-maptoken-mainchain-ethereum.s.sol | 29 ++++ .../factory-maptoken-mainchain-sepolia.s.sol | 40 +++++ .../factory-maptoken-mainchain.s.sol | 160 +++++++++++++++++ .../factory-maptoken-ronin-mainnet.s.sol | 28 +++ .../factory-maptoken-ronin-testnet.s.sol | 34 ++++ .../factory-maptoken-roninchain.s.sol | 163 ++++++++++++++++++ 10 files changed, 501 insertions(+), 39 deletions(-) create mode 100644 script/20240626-maptoken-anima/governors-configs.s.sol create mode 100644 script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol create mode 100644 script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol create mode 100644 script/factories/mainchain/factory-maptoken-mainchain.s.sol create mode 100644 script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol create mode 100644 script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol create mode 100644 script/factories/roninchain/factory-maptoken-roninchain.s.sol diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol index 7e165396..f85a5e6b 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import "../factories/factory-maptoken-mainchain.s.sol"; +import "../factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol"; import "./base-maptoken.s.sol"; import "@ronin/contracts/libraries/Ballot.sol"; import { console2 } from "forge-std/console2.sol"; @@ -11,7 +11,7 @@ import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/Signatu import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; -contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchain { +contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchainSepolia { MainchainBridgeAdminUtils _mainchainProposalUtils; function _initCaller() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (address) { @@ -22,29 +22,15 @@ contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__ return Base__MapToken._initTokenList(); } - function run() public override { - _mainchainGatewayV3 = 0x06855f31dF1d3D25cE486CF09dB49bDa535D2a9e; - _mainchainBridgeManager = 0x603075B625cc2cf69FbB3546C6acC2451FE792AF; - - uint256[] memory governorsPkMemory = new uint256[](4); - governorsPkMemory[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; - governorsPkMemory[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; - governorsPkMemory[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; - governorsPkMemory[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; - - address[] memory governorsMemory = new address[](4); - governorsMemory[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; - governorsMemory[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; - governorsMemory[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; - governorsMemory[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + function _initGovernors() internal override(Base__MapToken, Factory__MapTokensMainchainSepolia) returns (address[] memory) { + return Base__MapToken._initGovernors(); + } - for (uint256 i; i < 4; ++i) { - _governors.push(governorsMemory[i]); - _governorPKs.push(governorsPkMemory[i]); - } + function _initGovernorPKs() internal override(Base__MapToken, Factory__MapTokensMainchainSepolia) returns (uint256[] memory) { + return Base__MapToken._initGovernorPKs(); + } - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); - _cheatStorage(governorsMemory); - _relayProposal(proposal); + function run() public override { + super.run(); } } diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol index 347f05fc..e2c9185a 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol @@ -2,11 +2,11 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; -import "../factories/factory-maptoken-roninchain.s.sol"; +import "../factories/roninchain/factory-maptoken-ronin-testnet.s.sol"; import "./base-maptoken.s.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; -contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factory__MapTokensRoninchain { +contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factory__MapTokensRonin_Testnet { function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (address) { return Base__MapToken._initCaller(); } @@ -15,18 +15,11 @@ contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factor return Base__MapToken._initTokenList(); } - function run() public override { - address[] memory governorsMemory = new address[](4); - governorsMemory[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - governorsMemory[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - governorsMemory[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - governorsMemory[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - for (uint256 i; i < 4; ++i) { - _governors.push(governorsMemory[i]); - } - - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + function _initGovernors() internal override(Base__MapToken, Factory__MapTokensRonin_Testnet) returns (address[] memory) { + return Base__MapToken._initGovernors(); + } - _proposeAndExecute(proposal); + function run() public override { + super.run(); } } diff --git a/script/20240626-maptoken-anima/base-maptoken.s.sol b/script/20240626-maptoken-anima/base-maptoken.s.sol index 82565522..aca143de 100644 --- a/script/20240626-maptoken-anima/base-maptoken.s.sol +++ b/script/20240626-maptoken-anima/base-maptoken.s.sol @@ -5,12 +5,21 @@ import "forge-std/console2.sol"; import "./caller-configs.s.sol"; import "./maptoken-anima-configs.s.sol"; +import "./governors-configs.s.sol"; -contract Base__MapToken is Migration__Caller_Config, Migration__MapToken_Anima_Config { +contract Base__MapToken is Migration__Caller_Config, Migration__MapToken_Anima_Config, Migration__Governors_Config { function _initCaller() internal virtual returns (address) { return SM_GOVERNOR; } + function _initGovernors() internal virtual returns (address[] memory) { + return governors; + } + + function _initGovernorPKs() internal virtual returns (uint256[] memory) { + return governorPks; + } + function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos) { totalToken = 1; diff --git a/script/20240626-maptoken-anima/governors-configs.s.sol b/script/20240626-maptoken-anima/governors-configs.s.sol new file mode 100644 index 00000000..09877741 --- /dev/null +++ b/script/20240626-maptoken-anima/governors-configs.s.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__Governors_Config { + address[] internal governors = new address[](4); + uint256[] internal governorPks = new uint256[](4); + + constructor() { + // TODO: replace by address of the testnet governors + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + // TODO: replace by private key of the testnet governors + governorPks[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; + governorPks[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; + governorPks[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; + governorPks[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; + } +} diff --git a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol new file mode 100644 index 00000000..e2ddec08 --- /dev/null +++ b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { Network, TNetwork } from "../../utils/Network.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "./factory-maptoken-mainchain.s.sol"; + +abstract contract Factory__MapTokensMainchainEthereum is Factory__MapTokensMainchain { + using LibCompanionNetwork for *; + + function setUp() public override { + super.setUp(); + + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); + + _governor = _initCaller(); + } + + function run() public virtual override { + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(block.chainid, 0); + _propose(proposal); + } +} diff --git a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol new file mode 100644 index 00000000..a680f573 --- /dev/null +++ b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { Network, TNetwork } from "../../utils/Network.sol"; +import { console2 } from "forge-std/console2.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "./factory-maptoken-mainchain.s.sol"; + +abstract contract Factory__MapTokensMainchainSepolia is Factory__MapTokensMainchain { + using LibCompanionNetwork for *; + + function setUp() public override { + super.setUp(); + _mainchainGatewayV3 = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + } + + function _initGovernorPKs() internal virtual returns (uint256[] memory); + function _initGovernors() internal virtual returns (address[] memory); + + function run() public virtual override { + address[] memory governorsM = _initGovernors(); + uint256[] memory governorsPksM = _initGovernorPKs(); + + for (uint256 i; i < governorsM.length; ++i) { + _governors.push(governorsM[i]); + _governorPKs.push(governorsPksM[i]); + } + _cheatStorage(_governors); + + uint256 chainId = block.chainid; + uint256 nonce = MainchainBridgeManager(_mainchainBridgeManager).round(chainId) + 1; + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(chainId, nonce); + _relayProposal(proposal); + } +} diff --git a/script/factories/mainchain/factory-maptoken-mainchain.s.sol b/script/factories/mainchain/factory-maptoken-mainchain.s.sol new file mode 100644 index 00000000..667a64d4 --- /dev/null +++ b/script/factories/mainchain/factory-maptoken-mainchain.s.sol @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@ronin/contracts/libraries/Ballot.sol"; +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { Migration } from "../../Migration.s.sol"; +import { Network, TNetwork } from "../../utils/Network.sol"; +import { IGeneralConfigExtended } from "../../interfaces/IGeneralConfigExtended.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { MapTokenInfo } from "../../libraries/MapTokenInfo.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; + +abstract contract Factory__MapTokensMainchain is Migration { + using LibCompanionNetwork for *; + + RoninBridgeManager internal _roninBridgeManager; + address internal _mainchainGatewayV3; + address internal _mainchainBridgeManager; + address internal _governor; + address[] internal _governors; + uint256[] internal _governorPKs; + + function run() public virtual; + function _initCaller() internal virtual returns (address); + function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); + + function _propose(Proposal.ProposalDetail memory proposal) internal virtual { + vm.broadcast(_governor); + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + } + + function _relayProposal(Proposal.ProposalDetail memory proposal) internal { + MainchainBridgeAdminUtils mainchainProposalUtils = + new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](_governors.length); + require(_governors.length > 0 && _governors.length == _governorPKs.length, "Invalid governors information"); + + for (uint256 i; i < _governors.length; ++i) { + supports_[i] = Ballot.VoteType.For; + } + + SignatureConsumer.Signature[] memory signatures = mainchainProposalUtils.generateSignatures(proposal, _governorPKs); + + uint256 gasAmounts = 1_000_000; + for (uint256 i; i < proposal.gasAmounts.length; ++i) { + gasAmounts += proposal.gasAmounts[i]; + } + + vm.broadcast(_governors[0]); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, supports_, signatures); + } + + function _createAndVerifyProposal(uint256 chainId, uint256 nonce) internal returns (Proposal.ProposalDetail memory proposal) { + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) = + _prepareMapTokensAndThresholds(); + bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + uint256 expiredTime = block.timestamp + 14 days; + address[] memory targets = new address[](1); + uint256[] memory values = new uint256[](1); + bytes[] memory calldatas = new bytes[](1); + uint256[] memory gasAmounts = new uint256[](1); + + targets[0] = _mainchainGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + // Verify gas when call from mainchain. + LibProposal.verifyProposalGasAmount(address(_mainchainBridgeManager), targets, values, calldatas, gasAmounts); + + // // Verify gas when call from ronin. + // (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); + // address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + // LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); + + proposal = Proposal.ProposalDetail({ + nonce: nonce, + chainId: chainId, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + } + + function _prepareMapTokensAndThresholds() + internal + returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) + { + // function mapTokensAndThresholds( + // address[] calldata _mainchainTokens, + // address[] calldata _roninTokens, + // TokenStandard.ERC20[] calldata _standards, + // uint256[][4] calldata _thresholds + // ) + (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); + + mainchainTokens = new address[](N); + roninTokens = new address[](N); + standards = new TokenStandard[](N); + + thresholds[0] = new uint256[](N); + thresholds[1] = new uint256[](N); + thresholds[2] = new uint256[](N); + thresholds[3] = new uint256[](N); + + for (uint256 i; i < N; ++i) { + mainchainTokens[i] = tokenInfos[i].mainchainToken; + roninTokens[i] = tokenInfos[i].roninToken; + standards[i] = TokenStandard.ERC20; + thresholds[0][i] = tokenInfos[i].highTierThreshold; + thresholds[1][i] = tokenInfos[i].lockedThreshold; + thresholds[2][i] = tokenInfos[i].unlockFeePercentages; + thresholds[3][i] = tokenInfos[i].dailyWithdrawalLimit; + } + } + + function _cheatStorage(address[] memory governors) internal { + bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); + uint256 length = governors.length; + //cheat governors addresses + for (uint256 i; i < length; ++i) { + bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); + vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(governors[i])))); + } + //after cheat + for (uint256 i; i < length; ++i) { + bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); + bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); + + assertEq(afterCheatData, bytes32(uint256(uint160(governors[i])))); + } + + //cheat governors weights + bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); + for (uint256 i; i < length; ++i) { + address key = governors[i]; + bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); + vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); + } + bytes32 governorsWeightData = vm.load(_mainchainBridgeManager, keccak256(abi.encode(0x087D08e3ba42e64E3948962dd1371F906D1278b9, governorsWeightSlot))); + } +} diff --git a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol new file mode 100644 index 00000000..3be12de4 --- /dev/null +++ b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol @@ -0,0 +1,28 @@ +pragma solidity ^0.8.19; + +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { Network, TNetwork } from "../../utils/Network.sol"; +import { console2 } from "forge-std/console2.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "./factory-maptoken-roninchain.s.sol"; + +abstract contract Factory__MapTokensRonin_Testnet is Factory__MapTokensRoninchain { + using LibCompanionNetwork for *; + + function setUp() public override { + super.setUp(); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _governor = _initCaller(); + } + + function _initGovernors() internal virtual returns (address[] memory); + + function run() public virtual override { + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + _propose(proposal); + } +} diff --git a/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol new file mode 100644 index 00000000..28d58f06 --- /dev/null +++ b/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol @@ -0,0 +1,34 @@ +pragma solidity ^0.8.19; + +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { Network, TNetwork } from "../../utils/Network.sol"; +import { console2 } from "forge-std/console2.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "./factory-maptoken-roninchain.s.sol"; + +abstract contract Factory__MapTokensRonin_Testnet is Factory__MapTokensRoninchain { + using LibCompanionNetwork for *; + + function setUp() public override { + super.setUp(); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _governor = _initCaller(); + } + + function _initGovernors() internal virtual returns (address[] memory); + + function run() public virtual override { + address[] memory governorsM = _initGovernors(); + + for (uint256 i; i < governorsM.length; ++i) { + _governors.push(governorsM[i]); + } + + Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + _proposeAndExecute(proposal); + } +} diff --git a/script/factories/roninchain/factory-maptoken-roninchain.s.sol b/script/factories/roninchain/factory-maptoken-roninchain.s.sol new file mode 100644 index 00000000..581f6d61 --- /dev/null +++ b/script/factories/roninchain/factory-maptoken-roninchain.s.sol @@ -0,0 +1,163 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; + +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; +import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { Migration } from "../../Migration.s.sol"; +import { Network } from "../../utils/Network.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { IGeneralConfigExtended } from "../../interfaces/IGeneralConfigExtended.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { MapTokenInfo } from "../../libraries/MapTokenInfo.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; + +abstract contract Factory__MapTokensRoninchain is Migration { + using LibCompanionNetwork for *; + + RoninBridgeManager internal _roninBridgeManager; + address internal _roninGatewayV3; + address internal _governor; + address[] internal _governors; + + function run() public virtual; + function _initCaller() internal virtual returns (address); + function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); + + function _proposeAndExecute(Proposal.ProposalDetail memory proposal) internal { + proposal.executor = _governors[0]; + _propose(proposal); + + uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); + uint256 sumVoteWeight; + uint256 numberGovernorsNeedToVote; + + for (uint256 i; i < _governors.length; ++i) { + sumVoteWeight += _roninBridgeManager.getGovernorWeight(_governors[i]); + numberGovernorsNeedToVote++; + if (sumVoteWeight >= minVoteWeight) break; + } + require(sumVoteWeight > 0 && numberGovernorsNeedToVote > 0); + + for (uint256 i; i < numberGovernorsNeedToVote; ++i) { + vm.broadcast(_governors[i]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + } + + uint256 gasAmounts = 1_000_000; + for (uint256 i; i < proposal.gasAmounts.length; ++i) { + gasAmounts += proposal.gasAmounts[i]; + } + + vm.broadcast(_governors[0]); + _roninBridgeManager.execute{ gas: gasAmounts }(proposal); + } + + function _propose(Proposal.ProposalDetail memory proposal) internal virtual { + vm.broadcast(_governor); + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + } + + function _createAndVerifyProposal() internal returns (Proposal.ProposalDetail memory proposal) { + (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) = _prepareMapToken(); + (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) = _prepareSetMinThreshold(); + + address[] memory targets = new address[](2); + uint256[] memory values = new uint256[](2); + bytes[] memory calldatas = new bytes[](2); + uint256[] memory gasAmounts = new uint256[](2); + + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + uint256 expiredTime = block.timestamp + 14 days; + targets[0] = _roninGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); + proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[1] = _roninGatewayV3; + values[1] = 0; + calldatas[1] = proxyData; + gasAmounts[1] = 1_000_000; + + LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); + + proposal = Proposal.ProposalDetail({ + nonce: RoninBridgeManager(_roninBridgeManager).round(2021) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + } + + function _cheatWeightOperator(address gov) internal { + bytes32 $ = keccak256(abi.encode(gov, 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3)); + bytes32 opAndWeight = vm.load(address(_roninBridgeManager), $); + + uint256 totalWeight = _roninBridgeManager.getTotalWeight(); + bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(opAndWeight))); + vm.store(address(_roninBridgeManager), $, newOpAndWeight); + } + + function _prepareMapToken() + internal + returns (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) + { + // function mapTokens( + // address[] calldata _roninTokens, + // address[] calldata _mainchainTokens, + // uint256[] calldata chainIds, + // TokenStandard[] calldata _standards + // ) + (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); + + roninTokens = new address[](N); + mainchainTokens = new address[](N); + chainIds = new uint256[](N); + standards = new TokenStandard[](N); + + // ============= MAP TOKENS =========== + + for (uint256 i; i < N; ++i) { + roninTokens[i] = tokenInfos[i].roninToken; + mainchainTokens[i] = tokenInfos[i].mainchainToken; + chainIds[i] = network().companionChainId(); + standards[i] = TokenStandard.ERC20; + } + } + + function _prepareSetMinThreshold() internal returns (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) { + (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); + + // ============= SET MIN THRESHOLD ============ + // function setMinimumThresholds( + // address[] calldata _tokens, + // uint256[] calldata _thresholds + // ); + roninTokensToSetMinThreshold = new address[](N); + minThresholds = new uint256[](N); + + for (uint256 i; i < N; ++i) { + roninTokensToSetMinThreshold[i] = tokenInfos[i].roninToken; + minThresholds[i] = tokenInfos[i].minThreshold; + } + } +} From 015948bc00647dc2a0a7005c9aa5424fbe454e10 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Wed, 3 Jul 2024 11:32:25 +0700 Subject: [PATCH 221/305] chore: restructure factories scripts --- .../governors-configs.s.sol | 8 +- .../factory-maptoken-mainchain.s.sol | 185 ------------------ .../factory-maptoken-roninchain.s.sol | 171 ---------------- .../factory-maptoken-ronin-mainnet.s.sol | 4 +- 4 files changed, 5 insertions(+), 363 deletions(-) delete mode 100644 script/factories/factory-maptoken-mainchain.s.sol delete mode 100644 script/factories/factory-maptoken-roninchain.s.sol diff --git a/script/20240626-maptoken-anima/governors-configs.s.sol b/script/20240626-maptoken-anima/governors-configs.s.sol index 09877741..04241b3d 100644 --- a/script/20240626-maptoken-anima/governors-configs.s.sol +++ b/script/20240626-maptoken-anima/governors-configs.s.sol @@ -7,10 +7,10 @@ contract Migration__Governors_Config { constructor() { // TODO: replace by address of the testnet governors - governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; + governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; + governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; // TODO: replace by private key of the testnet governors governorPks[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; governorPks[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol deleted file mode 100644 index 9cc7f660..00000000 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ /dev/null @@ -1,185 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import "@ronin/contracts/libraries/Ballot.sol"; -import { console2 } from "forge-std/console2.sol"; -import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; -import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; -import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; -import { Contract } from "../utils/Contract.sol"; -import { Migration } from "../Migration.s.sol"; -import { Network, TNetwork } from "../utils/Network.sol"; -import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; -import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; -import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; -import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; -import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; -import { LibProposal } from "script/shared/libraries/LibProposal.sol"; - -abstract contract Factory__MapTokensMainchain is Migration { - using LibCompanionNetwork for *; - - RoninBridgeManager internal _roninBridgeManager; - address internal _mainchainGatewayV3; - address internal _mainchainBridgeManager; - address internal _governor; - address[] internal _governors; - uint256[] internal _governorPKs; - - function setUp() public override { - super.setUp(); - if (block.chainid == 2020 || block.chainid == 2021) { - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); - _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); - } - - _governor = _initCaller(); - } - - function run() public virtual { - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); - _propose(proposal); - } - - function _initCaller() internal virtual returns (address); - function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - - function _propose(Proposal.ProposalDetail memory proposal) internal virtual { - vm.broadcast(_governor); - _roninBridgeManager.propose( - proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts - ); - } - - function _relayProposal(Proposal.ProposalDetail memory proposal) internal { - MainchainBridgeAdminUtils mainchainProposalUtils = - new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); - - Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](_governors.length); - require(_governors.length > 0 && _governors.length == _governorPKs.length, "Invalid governors information"); - - for (uint256 i; i < _governors.length; ++i) { - supports_[i] = Ballot.VoteType.For; - } - - SignatureConsumer.Signature[] memory signatures = mainchainProposalUtils.generateSignatures(proposal, _governorPKs); - - uint256 gasAmounts = 1_000_000; - for (uint256 i; i < proposal.gasAmounts.length; ++i) { - gasAmounts += proposal.gasAmounts[i]; - } - - vm.broadcast(_governors[0]); - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, supports_, signatures); - } - - function _createAndVerifyProposal() internal returns (Proposal.ProposalDetail memory proposal) { - (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) = - _prepareMapTokensAndThresholds(); - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - uint256 expiredTime = block.timestamp + 14 days; - address[] memory targets = new address[](1); - uint256[] memory values = new uint256[](1); - bytes[] memory calldatas = new bytes[](1); - uint256[] memory gasAmounts = new uint256[](1); - - targets[0] = _mainchainGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; - - // Verify gas when call from mainchain. - LibProposal.verifyProposalGasAmount(address(_mainchainBridgeManager), targets, values, calldatas, gasAmounts); - - // // Verify gas when call from ronin. - // (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); - // address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - // LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); - - uint256 chainId; - uint256 nonce; - if (block.chainid == 2020 || block.chainid == 2021) { - nonce = 0; - (chainId,) = network().companionNetworkData(); - } else { - nonce = MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1; - chainId = block.chainid; - } - - proposal = Proposal.ProposalDetail({ - nonce: nonce, - chainId: chainId, - expiryTimestamp: expiredTime, - executor: address(0), - targets: targets, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts - }); - } - - function _prepareMapTokensAndThresholds() - internal - returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) - { - // function mapTokensAndThresholds( - // address[] calldata _mainchainTokens, - // address[] calldata _roninTokens, - // TokenStandard.ERC20[] calldata _standards, - // uint256[][4] calldata _thresholds - // ) - (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); - - mainchainTokens = new address[](N); - roninTokens = new address[](N); - standards = new TokenStandard[](N); - - thresholds[0] = new uint256[](N); - thresholds[1] = new uint256[](N); - thresholds[2] = new uint256[](N); - thresholds[3] = new uint256[](N); - - for (uint256 i; i < N; ++i) { - mainchainTokens[i] = tokenInfos[i].mainchainToken; - roninTokens[i] = tokenInfos[i].roninToken; - standards[i] = TokenStandard.ERC20; - thresholds[0][i] = tokenInfos[i].highTierThreshold; - thresholds[1][i] = tokenInfos[i].lockedThreshold; - thresholds[2][i] = tokenInfos[i].unlockFeePercentages; - thresholds[3][i] = tokenInfos[i].dailyWithdrawalLimit; - } - } - - function _cheatStorage(address[] memory governors) internal { - bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); - uint256 length = governors.length; - //cheat governors addresses - for (uint256 i; i < length; ++i) { - bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); - vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(governors[i])))); - } - //after cheat - for (uint256 i; i < length; ++i) { - bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); - bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); - - assertEq(afterCheatData, bytes32(uint256(uint160(governors[i])))); - } - - //cheat governors weights - bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); - for (uint256 i; i < length; ++i) { - address key = governors[i]; - bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); - vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); - } - bytes32 governorsWeightData = vm.load(_mainchainBridgeManager, keccak256(abi.encode(0x087D08e3ba42e64E3948962dd1371F906D1278b9, governorsWeightSlot))); - } -} diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol deleted file mode 100644 index 35f92d42..00000000 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import { console2 } from "forge-std/console2.sol"; -import { StdStyle } from "forge-std/StdStyle.sol"; - -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; -import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; -import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; -import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; -import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; -import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; -import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; -import { Contract } from "../utils/Contract.sol"; -import { Migration } from "../Migration.s.sol"; -import { Network } from "../utils/Network.sol"; -import { Contract } from "../utils/Contract.sol"; -import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; -import { LibProposal } from "script/shared/libraries/LibProposal.sol"; -import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; -import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; - -abstract contract Factory__MapTokensRoninchain is Migration { - using LibCompanionNetwork for *; - - RoninBridgeManager internal _roninBridgeManager; - address internal _roninGatewayV3; - address private _governor; - address[] internal _governors; - - function setUp() public virtual override { - super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - - _governor = _initCaller(); - _cheatWeightOperator(_governor); - } - - function run() public virtual { - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); - _propose(proposal); - } - - function _initCaller() internal virtual returns (address); - function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - - function _proposeAndExecute(Proposal.ProposalDetail memory proposal) internal { - proposal.executor = _governors[0]; - _propose(proposal); - - uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); - uint256 sumVoteWeight; - uint256 amountGovernorsNeedToVote; - - for (uint256 i; i < _governors.length; ++i) { - sumVoteWeight += _roninBridgeManager.getGovernorWeight(_governors[i]); - amountGovernorsNeedToVote++; - if (sumVoteWeight >= minVoteWeight) break; - } - require(sumVoteWeight > 0 && amountGovernorsNeedToVote > 0); - - for (uint256 i; i < amountGovernorsNeedToVote; ++i) { - vm.broadcast(_governors[i]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); - } - - vm.broadcast(_governors[0]); - _roninBridgeManager.execute{ gas: 2_000_000 }(proposal); - } - - function _propose(Proposal.ProposalDetail memory proposal) internal virtual { - vm.broadcast(_governor); - _roninBridgeManager.propose( - proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts - ); - } - - function _createAndVerifyProposal() internal returns (Proposal.ProposalDetail memory proposal) { - (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) = _prepareMapToken(); - (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) = _prepareSetMinThreshold(); - - address[] memory targets = new address[](2); - uint256[] memory values = new uint256[](2); - bytes[] memory calldatas = new bytes[](2); - uint256[] memory gasAmounts = new uint256[](2); - - bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - uint256 expiredTime = block.timestamp + 14 days; - targets[0] = _roninGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; - - innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); - proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[1] = _roninGatewayV3; - values[1] = 0; - calldatas[1] = proxyData; - gasAmounts[1] = 1_000_000; - - LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); - - proposal = Proposal.ProposalDetail({ - nonce: RoninBridgeManager(_roninBridgeManager).round(2021) + 1, - chainId: block.chainid, - expiryTimestamp: expiredTime, - executor: address(0), - targets: targets, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts - }); - } - - function _cheatWeightOperator(address gov) internal { - bytes32 $ = keccak256(abi.encode(gov, 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3)); - bytes32 opAndWeight = vm.load(address(_roninBridgeManager), $); - - uint256 totalWeight = _roninBridgeManager.getTotalWeight(); - bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(opAndWeight))); - vm.store(address(_roninBridgeManager), $, newOpAndWeight); - } - - function _prepareMapToken() - internal - returns (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) - { - // function mapTokens( - // address[] calldata _roninTokens, - // address[] calldata _mainchainTokens, - // uint256[] calldata chainIds, - // TokenStandard[] calldata _standards - // ) - (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); - - roninTokens = new address[](N); - mainchainTokens = new address[](N); - chainIds = new uint256[](N); - standards = new TokenStandard[](N); - - // ============= MAP TOKENS =========== - - for (uint256 i; i < N; ++i) { - roninTokens[i] = tokenInfos[i].roninToken; - mainchainTokens[i] = tokenInfos[i].mainchainToken; - chainIds[i] = network().companionChainId(); - standards[i] = TokenStandard.ERC20; - } - } - - function _prepareSetMinThreshold() internal returns (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) { - (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); - - // ============= SET MIN THRESHOLD ============ - // function setMinimumThresholds( - // address[] calldata _tokens, - // uint256[] calldata _thresholds - // ); - roninTokensToSetMinThreshold = new address[](N); - minThresholds = new uint256[](N); - - for (uint256 i; i < N; ++i) { - roninTokensToSetMinThreshold[i] = tokenInfos[i].roninToken; - minThresholds[i] = tokenInfos[i].minThreshold; - } - } -} diff --git a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol index 3be12de4..b3896b82 100644 --- a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol +++ b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol @@ -9,7 +9,7 @@ import { Contract } from "../../utils/Contract.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "./factory-maptoken-roninchain.s.sol"; -abstract contract Factory__MapTokensRonin_Testnet is Factory__MapTokensRoninchain { +abstract contract Factory__MapTokensRonin_Mainnet is Factory__MapTokensRoninchain { using LibCompanionNetwork for *; function setUp() public override { @@ -19,8 +19,6 @@ abstract contract Factory__MapTokensRonin_Testnet is Factory__MapTokensRoninchai _governor = _initCaller(); } - function _initGovernors() internal virtual returns (address[] memory); - function run() public virtual override { Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); _propose(proposal); From b5e07ce3697369eca038f89a3059ea403840038e Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Fri, 5 Jul 2024 18:00:33 +0700 Subject: [PATCH 222/305] chore: resolve Bao's comments --- .../20240308-maptoken-aperios-mainchain.s.sol | 4 +- ...20240308-maptoken-aperios-roninchain.s.sol | 4 +- .../20240626-maptoken-anima-mainchain.s.sol | 29 ++++- ...0240626-maptoken-anima-ronin-testnet.s.sol | 2 +- .../governors-configs.s.sol | 16 +-- .../maptoken-anima-configs.s.sol | 2 + .../factory-maptoken-mainchain-ethereum.s.sol | 6 +- .../factory-maptoken-mainchain-sepolia.s.sol | 42 +++++-- .../factory-maptoken-mainchain.s.sol | 93 ++++++++++---- .../factory-maptoken-ronin-mainnet.s.sol | 4 +- .../factory-maptoken-ronin-testnet.s.sol | 12 +- .../factory-maptoken-roninchain.s.sol | 117 +++++++++++------- script/libraries/MapTokenInfo.sol | 4 + 13 files changed, 222 insertions(+), 113 deletions(-) diff --git a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol index 57cf4462..b5fc25a7 100644 --- a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol +++ b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import "../factories/factory-maptoken-mainchain.s.sol"; +import "../factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol"; import "./base-maptoken.s.sol"; -contract Migration__20240308_MapTokenAperiosMainchain is Base__MapToken, Factory__MapTokensMainchain { +contract Migration__20240308_MapTokenAperiosMainchain is Base__MapToken, Factory__MapTokensMainchain_Ethereum { function _initCaller() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (address) { return Base__MapToken._initCaller(); } diff --git a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol index ff54faad..212ee7f0 100644 --- a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol +++ b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol @@ -2,10 +2,10 @@ pragma solidity ^0.8.19; import { console2 } from "forge-std/console2.sol"; -import "../factories/factory-maptoken-roninchain.s.sol"; +import "../factories/roninchain/factory-maptoken-ronin-mainnet.s.sol"; import "./base-maptoken.s.sol"; -contract Migration__20240308_MapTokenAperiosRoninchain is Base__MapToken, Factory__MapTokensRoninchain { +contract Migration__20240308_MapTokenAperiosRoninchain is Base__MapToken, Factory__MapTokensRonin_Mainnet { function _initCaller() internal override(Base__MapToken, Factory__MapTokensRoninchain) returns (address) { return Base__MapToken._initCaller(); } diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol index f85a5e6b..6bc8e51f 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol @@ -4,33 +4,52 @@ pragma solidity ^0.8.19; import "../factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol"; import "./base-maptoken.s.sol"; import "@ronin/contracts/libraries/Ballot.sol"; -import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; -contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchainSepolia { +contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__MapTokensMainchain_Sepolia { MainchainBridgeAdminUtils _mainchainProposalUtils; function _initCaller() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (address) { return Base__MapToken._initCaller(); } + function _isLocalSimulation() internal override returns (bool) { + return true; + } + + function _initLocalGovernors() internal override returns (address[] memory governors) { + governors = new address[](4); + governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; + governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; + governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; + governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + } + + function _initLocalGovernorPKs() internal override returns (uint256[] memory governorsPks) { + governorsPks = new uint256[](4); + governorsPks[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; + governorsPks[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; + governorsPks[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; + governorsPks[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; + } + function _initTokenList() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (uint256 totalToken, MapTokenInfo[] memory infos) { return Base__MapToken._initTokenList(); } - function _initGovernors() internal override(Base__MapToken, Factory__MapTokensMainchainSepolia) returns (address[] memory) { + function _initGovernors() internal override(Base__MapToken, Factory__MapTokensMainchain_Sepolia) returns (address[] memory) { return Base__MapToken._initGovernors(); } - function _initGovernorPKs() internal override(Base__MapToken, Factory__MapTokensMainchainSepolia) returns (uint256[] memory) { + function _initGovernorPKs() internal override(Base__MapToken, Factory__MapTokensMainchain_Sepolia) returns (uint256[] memory) { return Base__MapToken._initGovernorPKs(); } function run() public override { - super.run(); + Factory__MapTokensMainchain_Sepolia.run(); } } diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol index e2c9185a..3d6bf393 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-ronin-testnet.s.sol @@ -20,6 +20,6 @@ contract Migration__20242606_MapTokenAnimaRoninTestnet is Base__MapToken, Factor } function run() public override { - super.run(); + Factory__MapTokensRonin_Testnet.run(); } } diff --git a/script/20240626-maptoken-anima/governors-configs.s.sol b/script/20240626-maptoken-anima/governors-configs.s.sol index 04241b3d..2e729f5a 100644 --- a/script/20240626-maptoken-anima/governors-configs.s.sol +++ b/script/20240626-maptoken-anima/governors-configs.s.sol @@ -7,14 +7,14 @@ contract Migration__Governors_Config { constructor() { // TODO: replace by address of the testnet governors - governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; - governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; - governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; - governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; + governors[3] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + governors[2] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; // TODO: replace by private key of the testnet governors - governorPks[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; - governorPks[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; - governorPks[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; - governorPks[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; + governorPks[3] = 0x0; + governorPks[2] = 0x0; + governorPks[0] = 0x0; + governorPks[1] = 0x0; } } diff --git a/script/20240626-maptoken-anima/maptoken-anima-configs.s.sol b/script/20240626-maptoken-anima/maptoken-anima-configs.s.sol index d59329bd..b86ba82e 100644 --- a/script/20240626-maptoken-anima/maptoken-anima-configs.s.sol +++ b/script/20240626-maptoken-anima/maptoken-anima-configs.s.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.19; import { MapTokenInfo } from "../libraries/MapTokenInfo.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; contract Migration__MapToken_Anima_Config { MapTokenInfo _animaInfo; @@ -9,6 +10,7 @@ contract Migration__MapToken_Anima_Config { constructor() { _animaInfo.roninToken = address(0x9F6a5cDc477e9f667d60424bFdb4E82089d9d72c); _animaInfo.mainchainToken = address(0xEd52E203D2D44FAaEA0D9fB6A40220A63c743c80); + _animaInfo.standard = TokenStandard.ERC20; _animaInfo.minThreshold = 100 ether; _animaInfo.highTierThreshold = 20_000_000 ether; _animaInfo.lockedThreshold = 100_000_000 ether; diff --git a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol index e2ddec08..8c2fe2a8 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol @@ -9,7 +9,7 @@ import { Contract } from "../../utils/Contract.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "./factory-maptoken-mainchain.s.sol"; -abstract contract Factory__MapTokensMainchainEthereum is Factory__MapTokensMainchain { +abstract contract Factory__MapTokensMainchain_Ethereum is Factory__MapTokensMainchain { using LibCompanionNetwork for *; function setUp() public override { @@ -19,11 +19,11 @@ abstract contract Factory__MapTokensMainchainEthereum is Factory__MapTokensMainc _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); - _governor = _initCaller(); + _specifiedCaller = _initCaller(); } function run() public virtual override { - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(block.chainid, 0); + Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnMainchain(network().companionChainId(), 0); _propose(proposal); } } diff --git a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol index a680f573..2a14272a 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol @@ -1,40 +1,58 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { Network, TNetwork } from "../../utils/Network.sol"; -import { console2 } from "forge-std/console2.sol"; +import { console2 as console } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { Contract } from "../../utils/Contract.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "./factory-maptoken-mainchain.s.sol"; -abstract contract Factory__MapTokensMainchainSepolia is Factory__MapTokensMainchain { - using LibCompanionNetwork for *; - +abstract contract Factory__MapTokensMainchain_Sepolia is Factory__MapTokensMainchain { function setUp() public override { super.setUp(); _mainchainGatewayV3 = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); } + function _isLocalSimulation() internal virtual returns (bool); function _initGovernorPKs() internal virtual returns (uint256[] memory); function _initGovernors() internal virtual returns (address[] memory); + function _initLocalGovernorPKs() internal virtual returns (uint256[] memory) { + require(_isLocalSimulation(), "Not in local simulation mode"); + revert("_initLocalGovernorPKs() must be implemented for local simulation"); + } + + function _initLocalGovernors() internal virtual returns (address[] memory) { + require(_isLocalSimulation(), "Not in local simulation mode"); + revert("_initLocalGovernors() must be implemented for local simulation"); + } + function run() public virtual override { - address[] memory governorsM = _initGovernors(); - uint256[] memory governorsPksM = _initGovernorPKs(); + address[] memory mGovernors; + uint256[] memory mGovernorsPk; + + if (_isLocalSimulation()) { + mGovernors = _initLocalGovernors(); + mGovernorsPk = _initLocalGovernorPKs(); + + _cheatLocalReplaceGovernors(mGovernors); + } else { + mGovernors = _initGovernors(); + mGovernorsPk = _initGovernorPKs(); + } - for (uint256 i; i < governorsM.length; ++i) { - _governors.push(governorsM[i]); - _governorPKs.push(governorsPksM[i]); + for (uint256 i; i < mGovernors.length; ++i) { + _governors.push(mGovernors[i]); + _governorPKs.push(mGovernorsPk[i]); } - _cheatStorage(_governors); uint256 chainId = block.chainid; uint256 nonce = MainchainBridgeManager(_mainchainBridgeManager).round(chainId) + 1; - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(chainId, nonce); + Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnMainchain(chainId, nonce); _relayProposal(proposal); } } diff --git a/script/factories/mainchain/factory-maptoken-mainchain.s.sol b/script/factories/mainchain/factory-maptoken-mainchain.s.sol index 667a64d4..caf34e11 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import "@ronin/contracts/libraries/Ballot.sol"; -import { console2 } from "forge-std/console2.sol"; +import { console2 as console } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -26,7 +26,7 @@ abstract contract Factory__MapTokensMainchain is Migration { RoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; - address internal _governor; + address internal _specifiedCaller; address[] internal _governors; uint256[] internal _governorPKs; @@ -35,7 +35,7 @@ abstract contract Factory__MapTokensMainchain is Migration { function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); function _propose(Proposal.ProposalDetail memory proposal) internal virtual { - vm.broadcast(_governor); + vm.broadcast(_specifiedCaller); _roninBridgeManager.propose( proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts ); @@ -63,11 +63,25 @@ abstract contract Factory__MapTokensMainchain is Migration { MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, supports_, signatures); } - function _createAndVerifyProposal(uint256 chainId, uint256 nonce) internal returns (Proposal.ProposalDetail memory proposal) { - (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) = - _prepareMapTokensAndThresholds(); - bytes memory innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + function _createAndVerifyProposalOnMainchain(uint256 chainId, uint256 nonce) internal returns (Proposal.ProposalDetail memory proposal) { + (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); + require(tokenInfos.length > 0, "Number of tokens required to map cannot be 0."); + + bytes memory innerData; + bytes memory proxyData; + + if (tokenInfos[0].standard == TokenStandard.ERC20) { + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) = + _prepareMapTokensAndThresholds(N, tokenInfos); + + innerData = abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)); + proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + } else { + (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) = _prepareMapTokens(N, tokenInfos); + + innerData = abi.encodeCall(IMainchainGatewayV3.mapTokens, (mainchainTokens, roninTokens, standards)); + proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + } uint256 expiredTime = block.timestamp + 14 days; address[] memory targets = new address[](1); @@ -80,13 +94,15 @@ abstract contract Factory__MapTokensMainchain is Migration { calldatas[0] = proxyData; gasAmounts[0] = 1_000_000; - // Verify gas when call from mainchain. - LibProposal.verifyProposalGasAmount(address(_mainchainBridgeManager), targets, values, calldatas, gasAmounts); - - // // Verify gas when call from ronin. - // (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); - // address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - // LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); + if (block.chainid == 2020) { + // Verify gas when call from ronin. + (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); + address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); + } else { + // Verify gas when call from mainchain. + LibProposal.verifyProposalGasAmount(address(_mainchainBridgeManager), targets, values, calldatas, gasAmounts); + } proposal = Proposal.ProposalDetail({ nonce: nonce, @@ -100,17 +116,16 @@ abstract contract Factory__MapTokensMainchain is Migration { }); } - function _prepareMapTokensAndThresholds() - internal - returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) - { + function _prepareMapTokensAndThresholds( + uint256 N, + MapTokenInfo[] memory tokenInfos + ) internal returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards, uint256[][4] memory thresholds) { // function mapTokensAndThresholds( // address[] calldata _mainchainTokens, // address[] calldata _roninTokens, // TokenStandard.ERC20[] calldata _standards, // uint256[][4] calldata _thresholds // ) - (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); mainchainTokens = new address[](N); roninTokens = new address[](N); @@ -124,7 +139,8 @@ abstract contract Factory__MapTokensMainchain is Migration { for (uint256 i; i < N; ++i) { mainchainTokens[i] = tokenInfos[i].mainchainToken; roninTokens[i] = tokenInfos[i].roninToken; - standards[i] = TokenStandard.ERC20; + standards[i] = tokenInfos[i].standard; + thresholds[0][i] = tokenInfos[i].highTierThreshold; thresholds[1][i] = tokenInfos[i].lockedThreshold; thresholds[2][i] = tokenInfos[i].unlockFeePercentages; @@ -132,15 +148,39 @@ abstract contract Factory__MapTokensMainchain is Migration { } } - function _cheatStorage(address[] memory governors) internal { - bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300)); + function _prepareMapTokens( + uint256 N, + MapTokenInfo[] memory tokenInfos + ) internal returns (address[] memory mainchainTokens, address[] memory roninTokens, TokenStandard[] memory standards) { + // function mapTokens( + // address[] calldata _mainchainTokens, + // address[] calldata _roninTokens, + // TokenStandard[] calldata _standards + // ); + + mainchainTokens = new address[](N); + roninTokens = new address[](N); + standards = new TokenStandard[](N); + + for (uint256 i; i < N; ++i) { + mainchainTokens[i] = tokenInfos[i].mainchainToken; + roninTokens[i] = tokenInfos[i].roninToken; + standards[i] = tokenInfos[i].standard; + } + } + + function _cheatLocalReplaceGovernors(address[] memory governors) internal { + bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830)); + console.logBytes32(governorsSlot); uint256 length = governors.length; - //cheat governors addresses + + // Cheat governors addresses. for (uint256 i; i < length; ++i) { bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(governors[i])))); } - //after cheat + + // Check if cheat successfully. for (uint256 i; i < length; ++i) { bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); @@ -148,13 +188,12 @@ abstract contract Factory__MapTokensMainchain is Migration { assertEq(afterCheatData, bytes32(uint256(uint160(governors[i])))); } - //cheat governors weights + // Cheat governors weights. bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); for (uint256 i; i < length; ++i) { address key = governors[i]; bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); } - bytes32 governorsWeightData = vm.load(_mainchainBridgeManager, keccak256(abi.encode(0x087D08e3ba42e64E3948962dd1371F906D1278b9, governorsWeightSlot))); } } diff --git a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol index b3896b82..aa0ece3d 100644 --- a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol +++ b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol @@ -16,11 +16,11 @@ abstract contract Factory__MapTokensRonin_Mainnet is Factory__MapTokensRoninchai super.setUp(); _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - _governor = _initCaller(); + _specifiedCaller = _initCaller(); } function run() public virtual override { - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); + Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnRonin(); _propose(proposal); } } diff --git a/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol index 28d58f06..ea5a4df4 100644 --- a/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol +++ b/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol @@ -16,19 +16,19 @@ abstract contract Factory__MapTokensRonin_Testnet is Factory__MapTokensRoninchai super.setUp(); _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - _governor = _initCaller(); + _specifiedCaller = _initCaller(); } function _initGovernors() internal virtual returns (address[] memory); function run() public virtual override { - address[] memory governorsM = _initGovernors(); + address[] memory mGovernors = _initGovernors(); - for (uint256 i; i < governorsM.length; ++i) { - _governors.push(governorsM[i]); + for (uint256 i; i < mGovernors.length; ++i) { + _governors.push(mGovernors[i]); } - Proposal.ProposalDetail memory proposal = _createAndVerifyProposal(); - _proposeAndExecute(proposal); + Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnRonin(); + _proposeAndExecuteProposal(proposal); } } diff --git a/script/factories/roninchain/factory-maptoken-roninchain.s.sol b/script/factories/roninchain/factory-maptoken-roninchain.s.sol index 581f6d61..fcbd42cf 100644 --- a/script/factories/roninchain/factory-maptoken-roninchain.s.sol +++ b/script/factories/roninchain/factory-maptoken-roninchain.s.sol @@ -25,17 +25,84 @@ abstract contract Factory__MapTokensRoninchain is Migration { RoninBridgeManager internal _roninBridgeManager; address internal _roninGatewayV3; - address internal _governor; + address internal _specifiedCaller; address[] internal _governors; function run() public virtual; function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - function _proposeAndExecute(Proposal.ProposalDetail memory proposal) internal { + function _proposeAndExecuteProposal(Proposal.ProposalDetail memory proposal) internal { proposal.executor = _governors[0]; _propose(proposal); + _executeProposal(proposal); + } + + function _createAndVerifyProposalOnRonin() internal returns (Proposal.ProposalDetail memory proposal) { + (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); + + (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) = _prepareMapTokens(); + + // Assume that all tokens have the same standard. + TokenStandard tokenStandard = standards[0]; + + address[] memory targets; + uint256[] memory values; + bytes[] memory calldatas; + uint256[] memory gasAmounts; + + targets = new address[](1); + values = new uint256[](1); + calldatas = new bytes[](1); + gasAmounts = new uint256[](1); + + bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); + bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + uint256 expiredTime = block.timestamp + 14 days; + targets[0] = _roninGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + if (tokenStandard == TokenStandard.ERC20) { + targets = new address[](2); + values = new uint256[](2); + calldatas = new bytes[](2); + gasAmounts = new uint256[](2); + + uint256 expiredTime = block.timestamp + 14 days; + targets[0] = _roninGatewayV3; + values[0] = 0; + calldatas[0] = proxyData; + gasAmounts[0] = 1_000_000; + + (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) = _prepareSetMinThreshold(); + + innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); + proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); + + targets[1] = _roninGatewayV3; + values[1] = 0; + calldatas[1] = proxyData; + gasAmounts[1] = 1_000_000; + } + + LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); + + proposal = Proposal.ProposalDetail({ + nonce: RoninBridgeManager(_roninBridgeManager).round(block.chainid) + 1, + chainId: block.chainid, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }); + } + + function _executeProposal(Proposal.ProposalDetail memory proposal) internal { uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); uint256 sumVoteWeight; uint256 numberGovernorsNeedToVote; @@ -62,52 +129,12 @@ abstract contract Factory__MapTokensRoninchain is Migration { } function _propose(Proposal.ProposalDetail memory proposal) internal virtual { - vm.broadcast(_governor); + vm.broadcast(_specifiedCaller); _roninBridgeManager.propose( proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts ); } - function _createAndVerifyProposal() internal returns (Proposal.ProposalDetail memory proposal) { - (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) = _prepareMapToken(); - (address[] memory roninTokensToSetMinThreshold, uint256[] memory minThresholds) = _prepareSetMinThreshold(); - - address[] memory targets = new address[](2); - uint256[] memory values = new uint256[](2); - bytes[] memory calldatas = new bytes[](2); - uint256[] memory gasAmounts = new uint256[](2); - - bytes memory innerData = abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)); - bytes memory proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - uint256 expiredTime = block.timestamp + 14 days; - targets[0] = _roninGatewayV3; - values[0] = 0; - calldatas[0] = proxyData; - gasAmounts[0] = 1_000_000; - - innerData = abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (roninTokensToSetMinThreshold, minThresholds)); - proxyData = abi.encodeWithSignature("functionDelegateCall(bytes)", innerData); - - targets[1] = _roninGatewayV3; - values[1] = 0; - calldatas[1] = proxyData; - gasAmounts[1] = 1_000_000; - - LibProposal.verifyProposalGasAmount(address(_roninBridgeManager), targets, values, calldatas, gasAmounts); - - proposal = Proposal.ProposalDetail({ - nonce: RoninBridgeManager(_roninBridgeManager).round(2021) + 1, - chainId: block.chainid, - expiryTimestamp: expiredTime, - executor: address(0), - targets: targets, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts - }); - } - function _cheatWeightOperator(address gov) internal { bytes32 $ = keccak256(abi.encode(gov, 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3)); bytes32 opAndWeight = vm.load(address(_roninBridgeManager), $); @@ -117,7 +144,7 @@ abstract contract Factory__MapTokensRoninchain is Migration { vm.store(address(_roninBridgeManager), $, newOpAndWeight); } - function _prepareMapToken() + function _prepareMapTokens() internal returns (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) { @@ -140,7 +167,7 @@ abstract contract Factory__MapTokensRoninchain is Migration { roninTokens[i] = tokenInfos[i].roninToken; mainchainTokens[i] = tokenInfos[i].mainchainToken; chainIds[i] = network().companionChainId(); - standards[i] = TokenStandard.ERC20; + standards[i] = tokenInfos[i].standard; } } diff --git a/script/libraries/MapTokenInfo.sol b/script/libraries/MapTokenInfo.sol index fc7edbf6..3ca87af7 100644 --- a/script/libraries/MapTokenInfo.sol +++ b/script/libraries/MapTokenInfo.sol @@ -1,9 +1,13 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; + struct MapTokenInfo { address roninToken; address mainchainToken; + TokenStandard standard; + // This properties is used for ERC20 only. // Config on mainchain uint256 minThreshold; // Config on ronin chain From 4f04068b211bd38cfa4cc85b88b5ff1fa76ab055 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Wed, 10 Jul 2024 10:47:12 +0700 Subject: [PATCH 223/305] script: supports local simulation for factories scripts --- .../20240626-maptoken-anima-mainchain.s.sol | 20 --- .../factory-maptoken-mainchain-ethereum.s.sol | 4 +- .../factory-maptoken-mainchain-sepolia.s.sol | 24 +--- .../factory-maptoken-mainchain.s.sol | 101 ++++++++++----- .../factory-maptoken-roninchain.s.sol | 119 +++++++++++------- 5 files changed, 152 insertions(+), 116 deletions(-) diff --git a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol index 6bc8e51f..4584161c 100644 --- a/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol +++ b/script/20240626-maptoken-anima/20240626-maptoken-anima-mainchain.s.sol @@ -17,26 +17,6 @@ contract Migration__20242606_MapTokenAnimaMainchain is Base__MapToken, Factory__ return Base__MapToken._initCaller(); } - function _isLocalSimulation() internal override returns (bool) { - return true; - } - - function _initLocalGovernors() internal override returns (address[] memory governors) { - governors = new address[](4); - governors[3] = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266; - governors[2] = 0x90F79bf6EB2c4f870365E785982E1f101E93b906; - governors[0] = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC; - governors[1] = 0x70997970C51812dc3A010C7d01b50e0d17dc79C8; - } - - function _initLocalGovernorPKs() internal override returns (uint256[] memory governorsPks) { - governorsPks = new uint256[](4); - governorsPks[3] = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; - governorsPks[2] = 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6; - governorsPks[0] = 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a; - governorsPks[1] = 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d; - } - function _initTokenList() internal override(Base__MapToken, Factory__MapTokensMainchain) returns (uint256 totalToken, MapTokenInfo[] memory infos) { return Base__MapToken._initTokenList(); } diff --git a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol index 8c2fe2a8..f377f856 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol @@ -23,7 +23,9 @@ abstract contract Factory__MapTokensMainchain_Ethereum is Factory__MapTokensMain } function run() public virtual override { - Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnMainchain(network().companionChainId(), 0); + uint256 chainId = network().companionChainId(); + uint256 nonce = _roninBridgeManager.round(chainId) + 1; + Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnMainchain(chainId, nonce); _propose(proposal); } } diff --git a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol index 2a14272a..b5939faa 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol @@ -15,35 +15,19 @@ abstract contract Factory__MapTokensMainchain_Sepolia is Factory__MapTokensMainc super.setUp(); _mainchainGatewayV3 = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + + _specifiedCaller = _initCaller(); } - function _isLocalSimulation() internal virtual returns (bool); function _initGovernorPKs() internal virtual returns (uint256[] memory); function _initGovernors() internal virtual returns (address[] memory); - function _initLocalGovernorPKs() internal virtual returns (uint256[] memory) { - require(_isLocalSimulation(), "Not in local simulation mode"); - revert("_initLocalGovernorPKs() must be implemented for local simulation"); - } - - function _initLocalGovernors() internal virtual returns (address[] memory) { - require(_isLocalSimulation(), "Not in local simulation mode"); - revert("_initLocalGovernors() must be implemented for local simulation"); - } - function run() public virtual override { address[] memory mGovernors; uint256[] memory mGovernorsPk; - if (_isLocalSimulation()) { - mGovernors = _initLocalGovernors(); - mGovernorsPk = _initLocalGovernorPKs(); - - _cheatLocalReplaceGovernors(mGovernors); - } else { - mGovernors = _initGovernors(); - mGovernorsPk = _initGovernorPKs(); - } + mGovernors = _initGovernors(); + mGovernorsPk = _initGovernorPKs(); for (uint256 i; i < mGovernors.length; ++i) { _governors.push(mGovernors[i]); diff --git a/script/factories/mainchain/factory-maptoken-mainchain.s.sol b/script/factories/mainchain/factory-maptoken-mainchain.s.sol index caf34e11..670a43bd 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain.s.sol @@ -19,6 +19,8 @@ import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { Network, TNetwork } from "../../utils/Network.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; abstract contract Factory__MapTokensMainchain is Migration { using LibCompanionNetwork for *; @@ -35,6 +37,8 @@ abstract contract Factory__MapTokensMainchain is Migration { function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); function _propose(Proposal.ProposalDetail memory proposal) internal virtual { + _simulateProposeAndRelayProposal(proposal); + vm.broadcast(_specifiedCaller); _roninBridgeManager.propose( proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts @@ -42,6 +46,8 @@ abstract contract Factory__MapTokensMainchain is Migration { } function _relayProposal(Proposal.ProposalDetail memory proposal) internal { + _simulateProposeAndRelayProposal(proposal); + MainchainBridgeAdminUtils mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); @@ -59,10 +65,69 @@ abstract contract Factory__MapTokensMainchain is Migration { gasAmounts += proposal.gasAmounts[i]; } - vm.broadcast(_governors[0]); + vm.broadcast(_specifiedCaller); MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, supports_, signatures); } + function _simulateProposeAndRelayProposal(Proposal.ProposalDetail memory proposal) internal { + uint256 snapshot = vm.snapshot(); + (address cheatingGov, uint256 cheatingGovPk) = makeAddrAndKey("Governor"); + + Ballot.VoteType[] memory cheatingSupports = new Ballot.VoteType[](1); + uint256[] memory cheatingPks = new uint256[](1); + + cheatingSupports[0] = Ballot.VoteType.For; + cheatingPks[0] = cheatingGovPk; + + uint256 gasAmounts = 1_000_000; + for (uint256 i; i < proposal.gasAmounts.length; ++i) { + gasAmounts += proposal.gasAmounts[i]; + } + + vm.startPrank(cheatingGov); + if (block.chainid == 2020 || block.chainid == 2021) { + _cheatWeightOperator(address(_roninBridgeManager), cheatingGov); + + SignatureConsumer.Signature[] memory cheatingSignatures = LibProposal.generateSignatures(proposal, cheatingPks, Ballot.VoteType.For); + + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + _roninBridgeManager.castProposalBySignatures(proposal, cheatingSupports, cheatingSignatures); + + TNetwork currentNetwork = network(); + config.createFork(network().companionNetwork()); + config.switchTo(network().companionNetwork()); + _cheatWeightOperator(address(_mainchainBridgeManager), cheatingGov); + + // Handle wrong proposal nonce on testnet. + proposal.nonce = MainchainBridgeManager(_mainchainBridgeManager).round(block.chainid) + 1; + SignatureConsumer.Signature[] memory signatures = LibProposal.generateSignatures(proposal, cheatingPks, Ballot.VoteType.For); + + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, cheatingSupports, signatures); + config.switchTo(currentNetwork); + } else { + _cheatWeightOperator(address(_mainchainBridgeManager), cheatingGov); + SignatureConsumer.Signature[] memory signatures = LibProposal.generateSignatures(proposal, cheatingPks, Ballot.VoteType.For); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, cheatingSupports, signatures); + } + vm.stopPrank(); + + vm.revertTo(snapshot); + } + + function _cheatWeightOperator(address manager, address gov) internal { + bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); + + bytes32 $ = keccak256(abi.encode(gov, governorsWeightSlot)); + bytes32 opAndWeight = vm.load(manager, $); + + uint256 totalWeight = IBridgeManager(manager).getTotalWeight(); + bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(totalWeight))); + vm.store(manager, $, newOpAndWeight); + IBridgeManager(manager).getGovernorWeight(gov); + } + function _createAndVerifyProposalOnMainchain(uint256 chainId, uint256 nonce) internal returns (Proposal.ProposalDetail memory proposal) { (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); require(tokenInfos.length > 0, "Number of tokens required to map cannot be 0."); @@ -94,13 +159,13 @@ abstract contract Factory__MapTokensMainchain is Migration { calldatas[0] = proxyData; gasAmounts[0] = 1_000_000; - if (block.chainid == 2020) { - // Verify gas when call from ronin. + if (block.chainid == 2020 || block.chainid == 2021) { + // Verify gas amount for ronin targets. (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); } else { - // Verify gas when call from mainchain. + // Verify gas amount for mainchain targets. LibProposal.verifyProposalGasAmount(address(_mainchainBridgeManager), targets, values, calldatas, gasAmounts); } @@ -168,32 +233,4 @@ abstract contract Factory__MapTokensMainchain is Migration { standards[i] = tokenInfos[i].standard; } } - - function _cheatLocalReplaceGovernors(address[] memory governors) internal { - bytes32 governorsSlot = keccak256(abi.encode(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830)); - console.logBytes32(governorsSlot); - uint256 length = governors.length; - - // Cheat governors addresses. - for (uint256 i; i < length; ++i) { - bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); - vm.store(_mainchainBridgeManager, governorSlotId, bytes32(uint256(uint160(governors[i])))); - } - - // Check if cheat successfully. - for (uint256 i; i < length; ++i) { - bytes32 governorSlotId = bytes32(uint256(governorsSlot) + uint256(i)); - bytes32 afterCheatData = vm.load(_mainchainBridgeManager, bytes32(uint256(governorsSlot) + uint256(i))); - - assertEq(afterCheatData, bytes32(uint256(uint160(governors[i])))); - } - - // Cheat governors weights. - bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); - for (uint256 i; i < length; ++i) { - address key = governors[i]; - bytes32 valueSlot = keccak256(abi.encode(key, governorsWeightSlot)); - vm.store(_mainchainBridgeManager, valueSlot, bytes32(uint256(uint96(100)))); - } - } } diff --git a/script/factories/roninchain/factory-maptoken-roninchain.s.sol b/script/factories/roninchain/factory-maptoken-roninchain.s.sol index fcbd42cf..9243a698 100644 --- a/script/factories/roninchain/factory-maptoken-roninchain.s.sol +++ b/script/factories/roninchain/factory-maptoken-roninchain.s.sol @@ -32,12 +32,87 @@ abstract contract Factory__MapTokensRoninchain is Migration { function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); + function _propose(Proposal.ProposalDetail memory proposal) internal virtual { + _simulateProposeAndExecuteProposal(proposal); + + vm.broadcast(_specifiedCaller); + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + } + function _proposeAndExecuteProposal(Proposal.ProposalDetail memory proposal) internal { - proposal.executor = _governors[0]; + proposal.executor = _specifiedCaller; _propose(proposal); _executeProposal(proposal); } + function _executeProposal(Proposal.ProposalDetail memory proposal) internal { + uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); + uint256 sumVoteWeight; + uint256 numberGovernorsNeedToVote; + + for (uint256 i; i < _governors.length; ++i) { + sumVoteWeight += _roninBridgeManager.getGovernorWeight(_governors[i]); + numberGovernorsNeedToVote++; + if (sumVoteWeight >= minVoteWeight) break; + } + require(sumVoteWeight > 0 && numberGovernorsNeedToVote > 0); + + for (uint256 i; i < numberGovernorsNeedToVote; ++i) { + vm.broadcast(_governors[i]); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); + } + + uint256 gasAmounts = 1_000_000; + for (uint256 i; i < proposal.gasAmounts.length; ++i) { + gasAmounts += proposal.gasAmounts[i]; + } + + vm.broadcast(_specifiedCaller); + _roninBridgeManager.execute{ gas: gasAmounts }(proposal); + } + + function _simulateProposeAndExecuteProposal(Proposal.ProposalDetail memory proposal) internal { + Proposal.ProposalDetail memory cheatingProposal = proposal; + Ballot.VoteType cheatingSupport = Ballot.VoteType.For; + uint256 snapshot = vm.snapshot(); + address cheatingGov = makeAddr("Governor"); + _cheatWeightOperator(cheatingGov); + + vm.startPrank(cheatingGov); + _roninBridgeManager.propose( + cheatingProposal.chainId, + cheatingProposal.expiryTimestamp, + cheatingProposal.executor, + cheatingProposal.targets, + cheatingProposal.values, + cheatingProposal.calldatas, + cheatingProposal.gasAmounts + ); + _roninBridgeManager.castProposalVoteForCurrentNetwork(cheatingProposal, cheatingSupport); + vm.stopPrank(); + + if (cheatingProposal.executor != address(0)) { + vm.prank(cheatingProposal.executor); + _roninBridgeManager.execute(proposal); + } + + vm.revertTo(snapshot); + } + + function _cheatWeightOperator(address gov) internal { + bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); + + bytes32 $ = keccak256(abi.encode(gov, governorsWeightSlot)); + bytes32 opAndWeight = vm.load(address(_roninBridgeManager), $); + + uint256 totalWeight = _roninBridgeManager.getTotalWeight(); + bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(totalWeight))); + vm.store(address(_roninBridgeManager), $, newOpAndWeight); + _roninBridgeManager.getGovernorWeight(gov); + } + function _createAndVerifyProposalOnRonin() internal returns (Proposal.ProposalDetail memory proposal) { (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); @@ -102,48 +177,6 @@ abstract contract Factory__MapTokensRoninchain is Migration { }); } - function _executeProposal(Proposal.ProposalDetail memory proposal) internal { - uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); - uint256 sumVoteWeight; - uint256 numberGovernorsNeedToVote; - - for (uint256 i; i < _governors.length; ++i) { - sumVoteWeight += _roninBridgeManager.getGovernorWeight(_governors[i]); - numberGovernorsNeedToVote++; - if (sumVoteWeight >= minVoteWeight) break; - } - require(sumVoteWeight > 0 && numberGovernorsNeedToVote > 0); - - for (uint256 i; i < numberGovernorsNeedToVote; ++i) { - vm.broadcast(_governors[i]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, Ballot.VoteType.For); - } - - uint256 gasAmounts = 1_000_000; - for (uint256 i; i < proposal.gasAmounts.length; ++i) { - gasAmounts += proposal.gasAmounts[i]; - } - - vm.broadcast(_governors[0]); - _roninBridgeManager.execute{ gas: gasAmounts }(proposal); - } - - function _propose(Proposal.ProposalDetail memory proposal) internal virtual { - vm.broadcast(_specifiedCaller); - _roninBridgeManager.propose( - proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts - ); - } - - function _cheatWeightOperator(address gov) internal { - bytes32 $ = keccak256(abi.encode(gov, 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3)); - bytes32 opAndWeight = vm.load(address(_roninBridgeManager), $); - - uint256 totalWeight = _roninBridgeManager.getTotalWeight(); - bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(opAndWeight))); - vm.store(address(_roninBridgeManager), $, newOpAndWeight); - } - function _prepareMapTokens() internal returns (address[] memory roninTokens, address[] memory mainchainTokens, uint256[] memory chainIds, TokenStandard[] memory standards) From 1c6916ca891edd884a17dc1b08518c9734cf9f89 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Wed, 10 Jul 2024 11:26:42 +0700 Subject: [PATCH 224/305] script: fix duplicate code --- .../mainchain/factory-maptoken-mainchain-ethereum.s.sol | 3 --- .../mainchain/factory-maptoken-mainchain-sepolia.s.sol | 2 -- .../factories/mainchain/factory-maptoken-mainchain.s.sol | 5 +++++ .../roninchain/factory-maptoken-ronin-mainnet.s.sol | 7 ------- .../roninchain/factory-maptoken-ronin-testnet.s.sol | 7 ------- .../factories/roninchain/factory-maptoken-roninchain.s.sol | 7 +++++++ 6 files changed, 12 insertions(+), 19 deletions(-) diff --git a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol index f377f856..0ca9a94a 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol @@ -14,12 +14,9 @@ abstract contract Factory__MapTokensMainchain_Ethereum is Factory__MapTokensMain function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); - - _specifiedCaller = _initCaller(); } function run() public virtual override { diff --git a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol index b5939faa..2734c860 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol @@ -15,8 +15,6 @@ abstract contract Factory__MapTokensMainchain_Sepolia is Factory__MapTokensMainc super.setUp(); _mainchainGatewayV3 = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); - - _specifiedCaller = _initCaller(); } function _initGovernorPKs() internal virtual returns (uint256[] memory); diff --git a/script/factories/mainchain/factory-maptoken-mainchain.s.sol b/script/factories/mainchain/factory-maptoken-mainchain.s.sol index 670a43bd..2a47ee0f 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain.s.sol @@ -32,6 +32,11 @@ abstract contract Factory__MapTokensMainchain is Migration { address[] internal _governors; uint256[] internal _governorPKs; + function setUp() public virtual override { + super.setUp(); + _specifiedCaller = _initCaller(); + } + function run() public virtual; function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); diff --git a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol index aa0ece3d..dc85edeb 100644 --- a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol +++ b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol @@ -12,13 +12,6 @@ import "./factory-maptoken-roninchain.s.sol"; abstract contract Factory__MapTokensRonin_Mainnet is Factory__MapTokensRoninchain { using LibCompanionNetwork for *; - function setUp() public override { - super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - _specifiedCaller = _initCaller(); - } - function run() public virtual override { Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnRonin(); _propose(proposal); diff --git a/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol index ea5a4df4..0932126f 100644 --- a/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol +++ b/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol @@ -12,13 +12,6 @@ import "./factory-maptoken-roninchain.s.sol"; abstract contract Factory__MapTokensRonin_Testnet is Factory__MapTokensRoninchain { using LibCompanionNetwork for *; - function setUp() public override { - super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - _specifiedCaller = _initCaller(); - } - function _initGovernors() internal virtual returns (address[] memory); function run() public virtual override { diff --git a/script/factories/roninchain/factory-maptoken-roninchain.s.sol b/script/factories/roninchain/factory-maptoken-roninchain.s.sol index 9243a698..13f2436c 100644 --- a/script/factories/roninchain/factory-maptoken-roninchain.s.sol +++ b/script/factories/roninchain/factory-maptoken-roninchain.s.sol @@ -28,6 +28,13 @@ abstract contract Factory__MapTokensRoninchain is Migration { address internal _specifiedCaller; address[] internal _governors; + function setUp() public virtual override { + super.setUp(); + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _specifiedCaller = _initCaller(); + } + function run() public virtual; function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); From 5448b5af766b2c722d51b58da679bdfb8b8311d7 Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Tue, 23 Jul 2024 23:09:14 +0700 Subject: [PATCH 225/305] script: organize factories folder and add more simulation script --- .../caller-configs.s.sol | 2 +- .../factory-maptoken-mainchain-ethereum.s.sol | 3 + .../factory-maptoken-mainchain-sepolia.s.sol | 4 + .../factory-maptoken-mainchain.s.sol | 64 +------------- .../factory-maptoken-ronin-mainnet.s.sol | 3 + .../factory-maptoken-ronin-testnet.s.sol | 3 + .../factory-maptoken-roninchain.s.sol | 42 --------- .../factory-maptoken-simulation-base.s.sol | 36 ++++++++ ...actory-maptoken-simulation-mainchain.s.sol | 88 +++++++++++++++++++ ...ctory-maptoken-simulation-roninchain.s.sol | 45 ++++++++++ 10 files changed, 184 insertions(+), 106 deletions(-) create mode 100644 script/factories/simulation/factory-maptoken-simulation-base.s.sol create mode 100644 script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol create mode 100644 script/factories/simulation/factory-maptoken-simulation-roninchain.s.sol diff --git a/script/20240308-maptoken-aperios/caller-configs.s.sol b/script/20240308-maptoken-aperios/caller-configs.s.sol index d1fad437..1e3428d5 100644 --- a/script/20240308-maptoken-aperios/caller-configs.s.sol +++ b/script/20240308-maptoken-aperios/caller-configs.s.sol @@ -2,5 +2,5 @@ pragma solidity ^0.8.19; contract Migration__Caller_Config { - address internal SM_GOVERNOR = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // TODO: replace by address of the SV governor + address internal SM_GOVERNOR = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; // TODO: replace by address of the SV governor } diff --git a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol index 0ca9a94a..7238de33 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain-ethereum.s.sol @@ -8,6 +8,7 @@ import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { Contract } from "../../utils/Contract.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "./factory-maptoken-mainchain.s.sol"; +import "../simulation/factory-maptoken-simulation-mainchain.s.sol"; abstract contract Factory__MapTokensMainchain_Ethereum is Factory__MapTokensMainchain { using LibCompanionNetwork for *; @@ -23,6 +24,8 @@ abstract contract Factory__MapTokensMainchain_Ethereum is Factory__MapTokensMain uint256 chainId = network().companionChainId(); uint256 nonce = _roninBridgeManager.round(chainId) + 1; Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnMainchain(chainId, nonce); + // Simulate relay proposal + new Factory__MapTokensSimulation_Mainchain().simulate(proposal); _propose(proposal); } } diff --git a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol index 2734c860..63266612 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain-sepolia.s.sol @@ -9,6 +9,7 @@ import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { Contract } from "../../utils/Contract.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "./factory-maptoken-mainchain.s.sol"; +import "../simulation/factory-maptoken-simulation-mainchain.s.sol"; abstract contract Factory__MapTokensMainchain_Sepolia is Factory__MapTokensMainchain { function setUp() public override { @@ -34,7 +35,10 @@ abstract contract Factory__MapTokensMainchain_Sepolia is Factory__MapTokensMainc uint256 chainId = block.chainid; uint256 nonce = MainchainBridgeManager(_mainchainBridgeManager).round(chainId) + 1; + Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnMainchain(chainId, nonce); + // Simulate relay proposal + new Factory__MapTokensSimulation_Mainchain().simulate(proposal); _relayProposal(proposal); } } diff --git a/script/factories/mainchain/factory-maptoken-mainchain.s.sol b/script/factories/mainchain/factory-maptoken-mainchain.s.sol index 2a47ee0f..53ae7a9b 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain.s.sol @@ -21,6 +21,7 @@ import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBrid import { LibProposal } from "script/shared/libraries/LibProposal.sol"; import { Network, TNetwork } from "../../utils/Network.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; abstract contract Factory__MapTokensMainchain is Migration { using LibCompanionNetwork for *; @@ -42,8 +43,6 @@ abstract contract Factory__MapTokensMainchain is Migration { function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); function _propose(Proposal.ProposalDetail memory proposal) internal virtual { - _simulateProposeAndRelayProposal(proposal); - vm.broadcast(_specifiedCaller); _roninBridgeManager.propose( proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts @@ -51,8 +50,6 @@ abstract contract Factory__MapTokensMainchain is Migration { } function _relayProposal(Proposal.ProposalDetail memory proposal) internal { - _simulateProposeAndRelayProposal(proposal); - MainchainBridgeAdminUtils mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); @@ -74,65 +71,6 @@ abstract contract Factory__MapTokensMainchain is Migration { MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, supports_, signatures); } - function _simulateProposeAndRelayProposal(Proposal.ProposalDetail memory proposal) internal { - uint256 snapshot = vm.snapshot(); - (address cheatingGov, uint256 cheatingGovPk) = makeAddrAndKey("Governor"); - - Ballot.VoteType[] memory cheatingSupports = new Ballot.VoteType[](1); - uint256[] memory cheatingPks = new uint256[](1); - - cheatingSupports[0] = Ballot.VoteType.For; - cheatingPks[0] = cheatingGovPk; - - uint256 gasAmounts = 1_000_000; - for (uint256 i; i < proposal.gasAmounts.length; ++i) { - gasAmounts += proposal.gasAmounts[i]; - } - - vm.startPrank(cheatingGov); - if (block.chainid == 2020 || block.chainid == 2021) { - _cheatWeightOperator(address(_roninBridgeManager), cheatingGov); - - SignatureConsumer.Signature[] memory cheatingSignatures = LibProposal.generateSignatures(proposal, cheatingPks, Ballot.VoteType.For); - - _roninBridgeManager.propose( - proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts - ); - _roninBridgeManager.castProposalBySignatures(proposal, cheatingSupports, cheatingSignatures); - - TNetwork currentNetwork = network(); - config.createFork(network().companionNetwork()); - config.switchTo(network().companionNetwork()); - _cheatWeightOperator(address(_mainchainBridgeManager), cheatingGov); - - // Handle wrong proposal nonce on testnet. - proposal.nonce = MainchainBridgeManager(_mainchainBridgeManager).round(block.chainid) + 1; - SignatureConsumer.Signature[] memory signatures = LibProposal.generateSignatures(proposal, cheatingPks, Ballot.VoteType.For); - - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, cheatingSupports, signatures); - config.switchTo(currentNetwork); - } else { - _cheatWeightOperator(address(_mainchainBridgeManager), cheatingGov); - SignatureConsumer.Signature[] memory signatures = LibProposal.generateSignatures(proposal, cheatingPks, Ballot.VoteType.For); - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, cheatingSupports, signatures); - } - vm.stopPrank(); - - vm.revertTo(snapshot); - } - - function _cheatWeightOperator(address manager, address gov) internal { - bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); - - bytes32 $ = keccak256(abi.encode(gov, governorsWeightSlot)); - bytes32 opAndWeight = vm.load(manager, $); - - uint256 totalWeight = IBridgeManager(manager).getTotalWeight(); - bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(totalWeight))); - vm.store(manager, $, newOpAndWeight); - IBridgeManager(manager).getGovernorWeight(gov); - } - function _createAndVerifyProposalOnMainchain(uint256 chainId, uint256 nonce) internal returns (Proposal.ProposalDetail memory proposal) { (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); require(tokenInfos.length > 0, "Number of tokens required to map cannot be 0."); diff --git a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol index dc85edeb..bafcb28a 100644 --- a/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol +++ b/script/factories/roninchain/factory-maptoken-ronin-mainnet.s.sol @@ -8,12 +8,15 @@ import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { Contract } from "../../utils/Contract.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "./factory-maptoken-roninchain.s.sol"; +import "../simulation/factory-maptoken-simulation-roninchain.s.sol"; abstract contract Factory__MapTokensRonin_Mainnet is Factory__MapTokensRoninchain { using LibCompanionNetwork for *; function run() public virtual override { Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnRonin(); + // Simulate execute proposal + new Factory__MapTokensSimulation_Roninchain().simulate(proposal); _propose(proposal); } } diff --git a/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol b/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol index 0932126f..01e71143 100644 --- a/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol +++ b/script/factories/roninchain/factory-maptoken-ronin-testnet.s.sol @@ -8,6 +8,7 @@ import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { Contract } from "../../utils/Contract.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "./factory-maptoken-roninchain.s.sol"; +import "../simulation/factory-maptoken-simulation-roninchain.s.sol"; abstract contract Factory__MapTokensRonin_Testnet is Factory__MapTokensRoninchain { using LibCompanionNetwork for *; @@ -22,6 +23,8 @@ abstract contract Factory__MapTokensRonin_Testnet is Factory__MapTokensRoninchai } Proposal.ProposalDetail memory proposal = _createAndVerifyProposalOnRonin(); + // Simulate execute proposal + new Factory__MapTokensSimulation_Roninchain().simulate(proposal); _proposeAndExecuteProposal(proposal); } } diff --git a/script/factories/roninchain/factory-maptoken-roninchain.s.sol b/script/factories/roninchain/factory-maptoken-roninchain.s.sol index 13f2436c..b5d278e2 100644 --- a/script/factories/roninchain/factory-maptoken-roninchain.s.sol +++ b/script/factories/roninchain/factory-maptoken-roninchain.s.sol @@ -40,8 +40,6 @@ abstract contract Factory__MapTokensRoninchain is Migration { function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); function _propose(Proposal.ProposalDetail memory proposal) internal virtual { - _simulateProposeAndExecuteProposal(proposal); - vm.broadcast(_specifiedCaller); _roninBridgeManager.propose( proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts @@ -80,46 +78,6 @@ abstract contract Factory__MapTokensRoninchain is Migration { _roninBridgeManager.execute{ gas: gasAmounts }(proposal); } - function _simulateProposeAndExecuteProposal(Proposal.ProposalDetail memory proposal) internal { - Proposal.ProposalDetail memory cheatingProposal = proposal; - Ballot.VoteType cheatingSupport = Ballot.VoteType.For; - uint256 snapshot = vm.snapshot(); - address cheatingGov = makeAddr("Governor"); - _cheatWeightOperator(cheatingGov); - - vm.startPrank(cheatingGov); - _roninBridgeManager.propose( - cheatingProposal.chainId, - cheatingProposal.expiryTimestamp, - cheatingProposal.executor, - cheatingProposal.targets, - cheatingProposal.values, - cheatingProposal.calldatas, - cheatingProposal.gasAmounts - ); - _roninBridgeManager.castProposalVoteForCurrentNetwork(cheatingProposal, cheatingSupport); - vm.stopPrank(); - - if (cheatingProposal.executor != address(0)) { - vm.prank(cheatingProposal.executor); - _roninBridgeManager.execute(proposal); - } - - vm.revertTo(snapshot); - } - - function _cheatWeightOperator(address gov) internal { - bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); - - bytes32 $ = keccak256(abi.encode(gov, governorsWeightSlot)); - bytes32 opAndWeight = vm.load(address(_roninBridgeManager), $); - - uint256 totalWeight = _roninBridgeManager.getTotalWeight(); - bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(totalWeight))); - vm.store(address(_roninBridgeManager), $, newOpAndWeight); - _roninBridgeManager.getGovernorWeight(gov); - } - function _createAndVerifyProposalOnRonin() internal returns (Proposal.ProposalDetail memory proposal) { (uint256 N, MapTokenInfo[] memory tokenInfos) = _initTokenList(); diff --git a/script/factories/simulation/factory-maptoken-simulation-base.s.sol b/script/factories/simulation/factory-maptoken-simulation-base.s.sol new file mode 100644 index 00000000..30b15747 --- /dev/null +++ b/script/factories/simulation/factory-maptoken-simulation-base.s.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { Migration } from "../../Migration.s.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; + +abstract contract Factory__MapTokensSimulation_Base is Migration { + modifier inSimulation() { + uint256 snapshot = vm.snapshot(); + _; + vm.revertTo(snapshot); + } + + function simulate() public virtual { + _setUp(); + } + + function _setUp() internal virtual; + + function _cheatWeightOperator(IBridgeManager manager, address gov) internal virtual { + bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); + + bytes32 $ = keccak256(abi.encode(gov, governorsWeightSlot)); + bytes32 opAndWeight = vm.load(address(manager), $); + + uint256 totalWeight = manager.getTotalWeight(); + bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(totalWeight))); + vm.store(address(manager), $, newOpAndWeight); + manager.getGovernorWeight(gov); + } +} diff --git a/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol b/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol new file mode 100644 index 00000000..4c8ff74a --- /dev/null +++ b/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "@ronin/contracts/libraries/Ballot.sol"; +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import "./factory-maptoken-simulation-base.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { LibProposal } from "script/shared/libraries/LibProposal.sol"; +import { Network, TNetwork } from "../../utils/Network.sol"; + +contract Factory__MapTokensSimulation_Mainchain is Factory__MapTokensSimulation_Base { + using LibCompanionNetwork for *; + + RoninBridgeManager internal _roninBridgeManager; + address internal _mainchainGatewayV3; + address internal _mainchainBridgeManager; + + function _setUp() internal override { + if (network() == DefaultNetwork.RoninMainnet.key() || network() == DefaultNetwork.RoninTestnet.key()) { + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); + } else { + _mainchainGatewayV3 = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + _mainchainBridgeManager = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + } + } + + function simulate(Proposal.ProposalDetail memory proposal) public inSimulation { + super.simulate(); + + Ballot.VoteType[] memory cheatingSupports = new Ballot.VoteType[](1); + uint256[] memory cheatingPks = new uint256[](1); + (address cheatingGov, uint256 cheatingGovPk) = makeAddrAndKey("Governor"); + + cheatingSupports[0] = Ballot.VoteType.For; + cheatingPks[0] = cheatingGovPk; + SignatureConsumer.Signature[] memory cheatingSignatures = LibProposal.generateSignatures(proposal, cheatingPks, Ballot.VoteType.For); + + uint256 gasAmounts = 1_000_000; + for (uint256 i; i < proposal.gasAmounts.length; ++i) { + gasAmounts += proposal.gasAmounts[i]; + } + + vm.startPrank(cheatingGov); + if (network() == DefaultNetwork.RoninMainnet.key() || network() == DefaultNetwork.RoninTestnet.key()) { + _cheatWeightOperator(IBridgeManager(_roninBridgeManager), cheatingGov); + + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + _roninBridgeManager.castProposalBySignatures(proposal, cheatingSupports, cheatingSignatures); + + address mMainchainAdress = _mainchainBridgeManager; + TNetwork currentNetwork = network(); + config.createFork(network().companionNetwork()); + config.switchTo(network().companionNetwork()); + + // Handle wrong nonce on testnet + if (currentNetwork == DefaultNetwork.RoninTestnet.key()) { + uint256 roundSlot = 2; + bytes32 $ = keccak256(abi.encode(block.chainid, roundSlot)); + + bytes32 newNonce = bytes32(proposal.nonce - 1); + vm.store(address(mMainchainAdress), $, newNonce); + assertEq(MainchainBridgeManager(mMainchainAdress).round(block.chainid) + 1, proposal.nonce); + } + + _cheatWeightOperator(IBridgeManager(mMainchainAdress), cheatingGov); + MainchainBridgeManager(mMainchainAdress).relayProposal{ gas: gasAmounts }(proposal, cheatingSupports, cheatingSignatures); + + config.switchTo(currentNetwork); + } else { + _cheatWeightOperator(IBridgeManager(_mainchainBridgeManager), cheatingGov); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, cheatingSupports, cheatingSignatures); + } + vm.stopPrank(); + } +} diff --git a/script/factories/simulation/factory-maptoken-simulation-roninchain.s.sol b/script/factories/simulation/factory-maptoken-simulation-roninchain.s.sol new file mode 100644 index 00000000..cbeabe65 --- /dev/null +++ b/script/factories/simulation/factory-maptoken-simulation-roninchain.s.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; +import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; +import "./factory-maptoken-simulation-base.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { Contract } from "../../utils/Contract.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; + +contract Factory__MapTokensSimulation_Roninchain is Factory__MapTokensSimulation_Base { + using LibCompanionNetwork for *; + + RoninBridgeManager internal _roninBridgeManager; + address internal _roninGatewayV3; + + function _setUp() internal override { + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + } + + function simulate(Proposal.ProposalDetail memory proposal) public inSimulation { + super.simulate(); + + Ballot.VoteType cheatingSupport = Ballot.VoteType.For; + address cheatingGov = makeAddr("Governor"); + _cheatWeightOperator(IBridgeManager(_roninBridgeManager), cheatingGov); + + vm.startPrank(cheatingGov); + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + _roninBridgeManager.castProposalVoteForCurrentNetwork(proposal, cheatingSupport); + vm.stopPrank(); + + if (proposal.executor != address(0)) { + vm.prank(proposal.executor); + _roninBridgeManager.execute(proposal); + } + } +} From 698ee6efef3a8953191afcd7b3f94b05d58d026a Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Tue, 23 Jul 2024 23:31:29 +0700 Subject: [PATCH 226/305] chore: rename func --- .../simulation/factory-maptoken-simulation-base.s.sol | 11 +++++------ .../factory-maptoken-simulation-mainchain.s.sol | 6 +++--- .../factory-maptoken-simulation-roninchain.s.sol | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/script/factories/simulation/factory-maptoken-simulation-base.s.sol b/script/factories/simulation/factory-maptoken-simulation-base.s.sol index 30b15747..f314fa1f 100644 --- a/script/factories/simulation/factory-maptoken-simulation-base.s.sol +++ b/script/factories/simulation/factory-maptoken-simulation-base.s.sol @@ -22,15 +22,14 @@ abstract contract Factory__MapTokensSimulation_Base is Migration { function _setUp() internal virtual; - function _cheatWeightOperator(IBridgeManager manager, address gov) internal virtual { + function _cheatWeightGovernor(IBridgeManager manager, address gov) internal virtual { bytes32 governorsWeightSlot = bytes32(uint256(0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300) + uint256(2)); - bytes32 $ = keccak256(abi.encode(gov, governorsWeightSlot)); - bytes32 opAndWeight = vm.load(address(manager), $); uint256 totalWeight = manager.getTotalWeight(); - bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(totalWeight))); - vm.store(address(manager), $, newOpAndWeight); - manager.getGovernorWeight(gov); + bytes32 newGovWeight = bytes32(uint256(totalWeight)); + + vm.store(address(manager), $, newGovWeight); + assert(manager.getGovernorWeight(gov) == totalWeight); } } diff --git a/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol b/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol index 4c8ff74a..1dc4254c 100644 --- a/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol +++ b/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol @@ -53,7 +53,7 @@ contract Factory__MapTokensSimulation_Mainchain is Factory__MapTokensSimulation_ vm.startPrank(cheatingGov); if (network() == DefaultNetwork.RoninMainnet.key() || network() == DefaultNetwork.RoninTestnet.key()) { - _cheatWeightOperator(IBridgeManager(_roninBridgeManager), cheatingGov); + _cheatWeightGovernor(IBridgeManager(_roninBridgeManager), cheatingGov); _roninBridgeManager.propose( proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts @@ -75,12 +75,12 @@ contract Factory__MapTokensSimulation_Mainchain is Factory__MapTokensSimulation_ assertEq(MainchainBridgeManager(mMainchainAdress).round(block.chainid) + 1, proposal.nonce); } - _cheatWeightOperator(IBridgeManager(mMainchainAdress), cheatingGov); + _cheatWeightGovernor(IBridgeManager(mMainchainAdress), cheatingGov); MainchainBridgeManager(mMainchainAdress).relayProposal{ gas: gasAmounts }(proposal, cheatingSupports, cheatingSignatures); config.switchTo(currentNetwork); } else { - _cheatWeightOperator(IBridgeManager(_mainchainBridgeManager), cheatingGov); + _cheatWeightGovernor(IBridgeManager(_mainchainBridgeManager), cheatingGov); MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, cheatingSupports, cheatingSignatures); } vm.stopPrank(); diff --git a/script/factories/simulation/factory-maptoken-simulation-roninchain.s.sol b/script/factories/simulation/factory-maptoken-simulation-roninchain.s.sol index cbeabe65..28afc7dc 100644 --- a/script/factories/simulation/factory-maptoken-simulation-roninchain.s.sol +++ b/script/factories/simulation/factory-maptoken-simulation-roninchain.s.sol @@ -28,7 +28,7 @@ contract Factory__MapTokensSimulation_Roninchain is Factory__MapTokensSimulation Ballot.VoteType cheatingSupport = Ballot.VoteType.For; address cheatingGov = makeAddr("Governor"); - _cheatWeightOperator(IBridgeManager(_roninBridgeManager), cheatingGov); + _cheatWeightGovernor(IBridgeManager(_roninBridgeManager), cheatingGov); vm.startPrank(cheatingGov); _roninBridgeManager.propose( From bd619670d7ea99d65f538f55e43b164d0d75ec8a Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Wed, 24 Jul 2024 17:32:10 +0700 Subject: [PATCH 227/305] chore: small fix --- script/factories/mainchain/factory-maptoken-mainchain.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/factories/mainchain/factory-maptoken-mainchain.s.sol b/script/factories/mainchain/factory-maptoken-mainchain.s.sol index 53ae7a9b..3bb2691e 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain.s.sol @@ -102,7 +102,7 @@ abstract contract Factory__MapTokensMainchain is Migration { calldatas[0] = proxyData; gasAmounts[0] = 1_000_000; - if (block.chainid == 2020 || block.chainid == 2021) { + if (network() == DefaultNetwork.RoninMainnet.key() || network() == DefaultNetwork.RoninMainnet.key()) { // Verify gas amount for ronin targets. (uint256 companionChainId, TNetwork companionNetwork) = network().companionNetworkData(); address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); From bfe920b9a66e007d703ea1a84f5f5b635843e9dd Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Wed, 24 Jul 2024 18:09:23 +0700 Subject: [PATCH 228/305] chore: minor fix --- .../roninchain/factory-maptoken-roninchain.s.sol | 14 +++++++------- .../factory-maptoken-simulation-mainchain.s.sol | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/script/factories/roninchain/factory-maptoken-roninchain.s.sol b/script/factories/roninchain/factory-maptoken-roninchain.s.sol index b5d278e2..47766a5c 100644 --- a/script/factories/roninchain/factory-maptoken-roninchain.s.sol +++ b/script/factories/roninchain/factory-maptoken-roninchain.s.sol @@ -39,19 +39,19 @@ abstract contract Factory__MapTokensRoninchain is Migration { function _initCaller() internal virtual returns (address); function _initTokenList() internal virtual returns (uint256 totalToken, MapTokenInfo[] memory infos); - function _propose(Proposal.ProposalDetail memory proposal) internal virtual { - vm.broadcast(_specifiedCaller); - _roninBridgeManager.propose( - proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts - ); - } - function _proposeAndExecuteProposal(Proposal.ProposalDetail memory proposal) internal { proposal.executor = _specifiedCaller; _propose(proposal); _executeProposal(proposal); } + function _propose(Proposal.ProposalDetail memory proposal) internal { + vm.broadcast(_specifiedCaller); + _roninBridgeManager.propose( + proposal.chainId, proposal.expiryTimestamp, proposal.executor, proposal.targets, proposal.values, proposal.calldatas, proposal.gasAmounts + ); + } + function _executeProposal(Proposal.ProposalDetail memory proposal) internal { uint256 minVoteWeight = _roninBridgeManager.minimumVoteWeight(); uint256 sumVoteWeight; diff --git a/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol b/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol index 1dc4254c..d402d27b 100644 --- a/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol +++ b/script/factories/simulation/factory-maptoken-simulation-mainchain.s.sol @@ -67,7 +67,7 @@ contract Factory__MapTokensSimulation_Mainchain is Factory__MapTokensSimulation_ // Handle wrong nonce on testnet if (currentNetwork == DefaultNetwork.RoninTestnet.key()) { - uint256 roundSlot = 2; + uint256 roundSlot = uint256(0x0000000000000000000000000000000000000000000000000000000000000002); bytes32 $ = keccak256(abi.encode(block.chainid, roundSlot)); bytes32 newNonce = bytes32(proposal.nonce - 1); From 1dd50b4187dbd8da7ffb9f5de4d252553c2990f5 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 24 Jul 2024 22:57:54 +0700 Subject: [PATCH 229/305] tmp commit --- ...0240716-deploy-bridge-manager-helper.s.sol | 103 +++++++ .../20240716-helper.s.sol | 48 ++++ .../20240716-operators-key-template.s.sol | 10 + ...716-p1-1-deploy-ronin-bridge-manager.s.sol | 38 +++ .../20240716-p1-2-deploy-wbtc.s.sol | 18 ++ ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 201 ++++++++++++++ ...0240716-p3-upgrade-bridge-main-chain.s.sol | 262 ++++++++++++++++++ .../verify-script.s.sol | 23 ++ 8 files changed, 703 insertions(+) create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-operators-key-template.s.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol new file mode 100644 index 00000000..81450cbf --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; + +import "../Migration.s.sol"; + +contract Migration__20240716_DeployRoninBridgeManagerHelper is Migration { + using LibProxy for *; + + RoninBridgeManager _newRoninBridgeManager; + + function _deployRoninBridgeManager() internal returns (RoninBridgeManager) { + address currRoninBridgeManager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + console.log(currRoninBridgeManager); + + ISharedArgument.SharedParameter memory param; + + param.roninBridgeManager.num = 7; + param.roninBridgeManager.denom = 10; + param.roninBridgeManager.roninChainId = block.chainid; + param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.roninBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.bridgeOperators = new address[](4); + param.roninBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; + param.roninBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; + param.roninBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; + param.roninBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; + + param.roninBridgeManager.governors = new address[](4); + param.roninBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + param.roninBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + param.roninBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + param.roninBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + param.roninBridgeManager.voteWeights = new uint96[](4); + param.roninBridgeManager.voteWeights[0] = 100; + param.roninBridgeManager.voteWeights[1] = 100; + param.roninBridgeManager.voteWeights[2] = 100; + param.roninBridgeManager.voteWeights[3] = 100; + + param.roninBridgeManager.targetOptions = new GlobalProposal.TargetOption[](5); + param.roninBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + param.roninBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.BridgeReward; + param.roninBridgeManager.targetOptions[2] = GlobalProposal.TargetOption.BridgeSlash; + param.roninBridgeManager.targetOptions[3] = GlobalProposal.TargetOption.BridgeTracking; + param.roninBridgeManager.targetOptions[4] = GlobalProposal.TargetOption.PauseEnforcer; + + param.roninBridgeManager.targets = new address[](5); + param.roninBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); + param.roninBridgeManager.targets[2] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + param.roninBridgeManager.targets[3] = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + param.roninBridgeManager.targets[4] = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + + _newRoninBridgeManager = RoninBridgeManager( + new RoninBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + RoninBridgeManagerConstructor.initialize, + ( + param.roninBridgeManager.num, + param.roninBridgeManager.denom, + param.roninBridgeManager.roninChainId, + param.roninBridgeManager.expiryDuration, + param.roninBridgeManager.bridgeContract, + new address[](0), + param.roninBridgeManager.bridgeOperators, + param.roninBridgeManager.governors, + param.roninBridgeManager.voteWeights, + param.roninBridgeManager.targetOptions, + param.roninBridgeManager.targets + ) + ) + ).run() + ); + + address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newRoninBridgeManager))); + vm.broadcast(proxyAdmin); + TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(currRoninBridgeManager)); + + return _newRoninBridgeManager; + } +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol new file mode 100644 index 00000000..f80f75b7 --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import "../Migration.s.sol"; + +struct LegacyProposalDetail { + uint256 nonce; + uint256 chainId; + uint256 expiryTimestamp; + address[] targets; + uint256[] values; + bytes[] calldatas; + uint256[] gasAmounts; +} + +contract Migration__20240716_Helper is Migration { + address internal _governor; + address[] internal _voters; + + RoninBridgeManager internal _currRoninBridgeManager; + + function _helperProposeForCurrentNetwork(LegacyProposalDetail memory proposal) internal { + vm.broadcast(_governor); + address(_currRoninBridgeManager).call( + abi.encodeWithSignature( + "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", + proposal.expiryTimestamp, + proposal.targets, + proposal.values, + proposal.calldatas, + proposal.gasAmounts, + Ballot.VoteType.For + ) + ); + } + + function _helperVoteForCurrentNetwork(LegacyProposalDetail memory proposal) internal { + for (uint i; i < _voters.length - 1; ++i) { + vm.broadcast(_voters[i]); + address(_currRoninBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( + abi.encodeWithSignature( + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For + ) + ); + } + } +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-operators-key-template.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-operators-key-template.s.sol new file mode 100644 index 00000000..fa6c4ab1 --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-operators-key-template.s.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__20240716_GovernorsKey { + function _loadGovernorPKs() internal pure returns (uint256[] memory res) { + res = new uint256[](1); + + res[0] = 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef; + } +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol new file mode 100644 index 00000000..61ed5e2b --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; + +import "./20240716-deploy-bridge-manager-helper.s.sol"; +import "../Migration.s.sol"; + +// NOTE: Run this script with `optimizer_runs = 1`. +contract Migration__20240716_P1_1_DeployRoninBridgeManager is Migration, Migration__20240716_DeployRoninBridgeManagerHelper { + ISharedArgument.SharedParameter _param; + + function setUp() public override { + super.setUp(); + } + + function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { + _deployRoninBridgeManager(); + } +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol new file mode 100644 index 00000000..34d5bf22 --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; +import { Contract } from "../utils/Contract.sol"; +import { WBTC } from "src/tokens/erc20/WBTC.sol"; + +contract Migration__20240716_P1_1_DeployWBTC is Migration { + function _defaultArguments() internal virtual override returns (bytes memory) { + ISharedArgument.WBTCParam memory param = config.sharedArguments().wbtc; + return abi.encode(param.gateway, param.pauser); + } + + function run() public returns (WBTC instance) { + instance = WBTC(_deployImmutable(Contract.WBTC.key())); + } +} \ No newline at end of file diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol new file mode 100644 index 00000000..2af20ea4 --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -0,0 +1,201 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/ronin/gateway/BridgeReward.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; +import "./20240716-deploy-bridge-manager-helper.s.sol"; +import "./20240716-helper.s.sol"; + +contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_Helper, Migration__20240716_DeployRoninBridgeManagerHelper { + ISharedArgument.SharedParameter _param; + + function setUp() public virtual override { + super.setUp(); + } + + function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { + _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _newRoninBridgeManager = RoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); + + _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); + _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); + _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); + + _changeAdminOfEnforcer(); + _upgradeBridgeRoninchain(); + + config.setAddress(network(), Contract.RoninBridgeManager.key(), address(_newRoninBridgeManager)); + } + + function _changeAdminOfEnforcer() private { + RoninBridgeManager roninGA = RoninBridgeManager(0x53Ea388CB72081A3a397114a43741e7987815896); + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + + uint256 expiredTime = block.timestamp + 14 days; + uint N = 1; + address[] memory targets = new address[](N); + uint256[] memory values = new uint256[](N); + bytes[] memory calldatas = new bytes[](N); + uint256[] memory gasAmounts = new uint256[](N); + + targets[0] = pauseEnforcerProxy; + calldatas[0] = abi.encodeWithSignature("changeAdmin(address)", address(_currRoninBridgeManager)); + gasAmounts[0] = 1_000_000; + + // LegacyProposalDetail memory proposal; + // proposal.nonce = roninGA.round(block.chainid) + 1; + // proposal.chainId = block.chainid; + // proposal.expiryTimestamp = expiredTime; + // proposal.targets = targets; + // proposal.values = values; + // proposal.calldatas = calldatas; + // proposal.gasAmounts = gasAmounts; + + address gaGovernor = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + address[] memory gaVoters = new address[](3); + gaVoters[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + gaVoters[1] = 0x06f8Af58F656B507918d91B0B6F8B89bfCC556f9; + gaVoters[2] = 0xe1100401454B5f850b09f3b92cE7f071C5F1CEF4; + + // vm.broadcast(gaGovernor); + // address(roninGA).call( + // abi.encodeWithSignature( + // "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", + // // proposal.chainId, + // proposal.expiryTimestamp, + // proposal.targets, + // proposal.values, + // proposal.calldatas, + // proposal.gasAmounts, + // Ballot.VoteType.For + // ) + // ); + + // for (uint i; i < gaVoters.length; ++i) { + // vm.broadcast(gaVoters[i]); + // address(roninGA).call{gas: 10_000_000}( + // abi.encodeWithSignature( + // "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For + // ) + // ); + // } + + // ((45, 2021, 1714451658 [1.714e9], [0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95], [0], [0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753], [1000000 [1e6]]), 0) + + LegacyProposalDetail memory proposal; + proposal.nonce = 45; + proposal.chainId = 2021; + proposal.expiryTimestamp = 1714451658; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + vm.broadcast(gaVoters[2]); + address(roninGA).call{ gas: 10_000_000 }( + abi.encodeWithSignature( + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For + ) + ); + } + + function _upgradeBridgeRoninchain() private { + address bridgeRewardLogic = _deployLogic(Contract.BridgeReward.key()); + address bridgeSlashLogic = _deployLogic(Contract.BridgeSlash.key()); + address bridgeTrackingLogic = _deployLogic(Contract.BridgeTracking.key()); + address pauseEnforcerLogic = _deployLogic(Contract.RoninPauseEnforcer.key()); + address roninGatewayV3Logic = _deployLogic(Contract.RoninGatewayV3.key()); + + address bridgeRewardProxy = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); + address bridgeSlashProxy = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + address bridgeTrackingProxy = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + + ISharedArgument.SharedParameter memory param; + param.roninBridgeManager.callbackRegisters = new address[](1); + param.roninBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + + uint N = 17; + address[] memory targets = new address[](N); + uint256[] memory values = new uint256[](N); + bytes[] memory calldatas = new bytes[](N); + uint256[] memory gasAmounts = new uint256[](N); + + targets[0] = bridgeRewardProxy; + targets[1] = bridgeSlashProxy; + targets[2] = bridgeTrackingProxy; + targets[3] = roninGatewayV3Proxy; + targets[4] = pauseEnforcerProxy; + targets[5] = bridgeRewardProxy; + targets[6] = bridgeSlashProxy; + targets[7] = bridgeTrackingProxy; + targets[8] = roninGatewayV3Proxy; + targets[9] = bridgeRewardProxy; + targets[10] = bridgeSlashProxy; + targets[11] = bridgeTrackingProxy; + targets[12] = roninGatewayV3Proxy; + targets[13] = pauseEnforcerProxy; + targets[14] = address(_newRoninBridgeManager); + targets[15] = address(_newRoninBridgeManager); + + calldatas[0] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", bridgeRewardLogic, abi.encodeWithSelector(BridgeReward.initializeV2.selector)); + calldatas[1] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); + calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", bridgeTrackingLogic); + calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); + calldatas[4] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[5] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[6] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[7] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[8] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); + calldatas[9] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[10] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[11] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[12] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[13] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + calldatas[14] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.roninBridgeManager.callbackRegisters)) + ); + calldatas[15] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + for (uint i; i < N; ++i) { + gasAmounts[i] = 1_000_000; + } + + LegacyProposalDetail memory proposal; + proposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; + proposal.chainId = block.chainid; + proposal.expiryTimestamp = block.timestamp + 14 days; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + _helperProposeForCurrentNetwork(proposal); + _helperVoteForCurrentNetwork(proposal); + } +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol new file mode 100644 index 00000000..264617b6 --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -0,0 +1,262 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; + +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; +import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; + +import "./20240716-helper.s.sol"; +import "./20240716-operators-key.s.sol"; +import "../Migration.s.sol"; + +contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey { + MainchainBridgeManager _currMainchainBridgeManager; + MainchainBridgeManager _newMainchainBridgeManager; + + address private _governor; + address[] private _voters; + + address TESTNET_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; + + function setUp() public virtual override { + super.setUp(); + } + + function run() public virtual onlyOn(Network.Ethereum.key()) { + CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); + + _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + + _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); + _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); + _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); + + _changeTempAdmin(); + _deployMainchainBridgeManager(); + _upgradeBridgeMainchain(); + } + + function _changeTempAdmin() internal { + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); + address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + address(mainchainGatewayV3Proxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + vm.stopBroadcast(); + } + + function _deployMainchainBridgeManager() internal returns (address mainchainBM) { + ISharedArgument.SharedParameter memory param; + + param.mainchainBridgeManager.num = 7; + param.mainchainBridgeManager.denom = 10; + param.mainchainBridgeManager.roninChainId = 2021; + param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.bridgeOperators = new address[](4); + param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; + param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; + param.mainchainBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; + param.mainchainBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; + + param.mainchainBridgeManager.governors = new address[](4); + param.mainchainBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + param.mainchainBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; + param.mainchainBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; + param.mainchainBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; + + param.mainchainBridgeManager.voteWeights = new uint96[](4); + param.mainchainBridgeManager.voteWeights[0] = 100; + param.mainchainBridgeManager.voteWeights[1] = 100; + param.mainchainBridgeManager.voteWeights[2] = 100; + param.mainchainBridgeManager.voteWeights[3] = 100; + + param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); + param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; + + param.mainchainBridgeManager.targets = new address[](2); + param.mainchainBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + + _newMainchainBridgeManager = MainchainBridgeManager( + new MainchainBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + _newMainchainBridgeManager.initialize, + ( + param.mainchainBridgeManager.num, + param.mainchainBridgeManager.denom, + param.mainchainBridgeManager.roninChainId, + param.mainchainBridgeManager.bridgeContract, + new address[](0), + param.mainchainBridgeManager.bridgeOperators, + param.mainchainBridgeManager.governors, + param.mainchainBridgeManager.voteWeights, + param.mainchainBridgeManager.targetOptions, + param.mainchainBridgeManager.targets + ) + ) + ).run() + ); + + address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); + vm.broadcast(proxyAdmin); + TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); + } + + function _upgradeBridgeMainchain() internal { + address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); + address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); + + address pauseEnforcerLogic = _deployLogic(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); + + address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + ISharedArgument.SharedParameter memory param; + param.mainchainBridgeManager.callbackRegisters = new address[](1); + param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + + uint256 expiredTime = block.timestamp + 14 days; + uint N = 7; + address[] memory targets = new address[](N); + uint256[] memory values = new uint256[](N); + bytes[] memory calldatas = new bytes[](N); + uint256[] memory gasAmounts = new uint256[](N); + + targets[0] = mainchainGatewayV3Proxy; + targets[1] = mainchainGatewayV3Proxy; + targets[2] = mainchainGatewayV3Proxy; + targets[3] = pauseEnforcerProxy; + targets[4] = pauseEnforcerProxy; + targets[5] = address(_newMainchainBridgeManager); + targets[6] = address(_newMainchainBridgeManager); + + calldatas[0] = abi.encodeWithSignature( + "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) + ); + calldatas[1] = + abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); + calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); + calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[5] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters)) + ); + calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + + for (uint i; i < N; ++i) { + gasAmounts[i] = 1_000_000; + } + + LegacyProposalDetail memory proposal; + proposal.nonce = _currMainchainBridgeManager.round(block.chainid) + 1; + proposal.chainId = block.chainid; + proposal.expiryTimestamp = expiredTime; + proposal.targets = targets; + proposal.values = values; + proposal.calldatas = calldatas; + proposal.gasAmounts = gasAmounts; + + uint V = _voters.length + 1; + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](V); + for (uint i; i < V; ++i) { + supports_[i] = Ballot.VoteType.For; + } + + SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); + + vm.broadcast(_governor); + address(_currMainchainBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( + abi.encodeWithSignature( + "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures + ) + ); + } + + function getDomain() public pure returns (bytes32) { + return keccak256( + abi.encode( + keccak256("EIP712Domain(string name,string version,bytes32 salt)"), + keccak256("BridgeAdmin"), // name hash + keccak256("2"), // version hash + keccak256(abi.encode("BRIDGE_ADMIN", 2021)) // salt + ) + ); + } + + function _generateSignaturesFor( + bytes32 domain, + bytes32 proposalHash, + uint256[] memory signerPKs, + Ballot.VoteType support + ) public view returns (SignatureConsumer.Signature[] memory sigs) { + sigs = new SignatureConsumer.Signature[](signerPKs.length); + + for (uint256 i; i < signerPKs.length; i++) { + bytes32 digest = ECDSA.toTypedDataHash(domain, Ballot.hash(proposalHash, support)); + sigs[i] = _sign(signerPKs[i], digest); + } + } + + function _sign(uint256 pk, bytes32 digest) internal pure returns (SignatureConsumer.Signature memory sig) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(pk, digest); + sig.v = v; + sig.r = r; + sig.s = s; + } + + function hashLegacyProposal(LegacyProposalDetail memory proposal) public pure returns (bytes32 digest_) { + bytes32 TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a; + + uint256[] memory values = proposal.values; + address[] memory targets = proposal.targets; + bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length); + uint256[] memory gasAmounts = proposal.gasAmounts; + + for (uint256 i; i < calldataHashList.length; ++i) { + calldataHashList[i] = keccak256(proposal.calldatas[i]); + } + + assembly { + let ptr := mload(0x40) + mstore(ptr, TYPE_HASH) + mstore(add(ptr, 0x20), mload(proposal)) // _proposal.nonce + mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // _proposal.chainId + mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // expiry timestamp + + let arrayHashed + arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash + mstore(add(ptr, 0x80), arrayHashed) + arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // _valuesHash + mstore(add(ptr, 0xa0), arrayHashed) + arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // _calldatasHash + mstore(add(ptr, 0xc0), arrayHashed) + arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // _gasAmountsHash + mstore(add(ptr, 0xe0), arrayHashed) + digest_ := keccak256(ptr, 0x100) + } + } +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol new file mode 100644 index 00000000..7c841b7c --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "./20240716-p2-upgrade-bridge-ronin-chain.s.sol"; +import "./20240716-p3-upgrade-bridge-main-chain.s.sol"; + +contract Verify_Script_20240716 is Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain { + function setUp() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { + Migration__20240716_P2_UpgradeBridgeRoninchain.setUp(); + } + + function run() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); + // Migration__20240716_P2_UpgradeBridgeRoninchain.run(); + + CONFIG.createFork(companionNetwork); + CONFIG.switchTo(companionNetwork); + Migration__20240716_P3_UpgradeBridgeMainchain.run(); + + CONFIG.switchTo(currentNetwork); + } +} From 41145268a45494757f795668e5ae706f038b041a Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 25 Jul 2024 10:50:45 +0700 Subject: [PATCH 230/305] fix: shadow names --- src/mocks/token/RoninMockERC1155.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mocks/token/RoninMockERC1155.sol b/src/mocks/token/RoninMockERC1155.sol index e2591bbf..b6f5c81e 100644 --- a/src/mocks/token/RoninMockERC1155.sol +++ b/src/mocks/token/RoninMockERC1155.sol @@ -14,9 +14,9 @@ contract RoninMockERC1155 is ERC1155Burnable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); - constructor(address defaultAdmin, string memory uri, string memory name, string memory symbol) ERC1155(uri) { - _name = name; - _symbol = symbol; + constructor(address defaultAdmin, string memory uri, string memory name_, string memory symbol_) ERC1155(uri) { + _name = name_; + _symbol = symbol_; _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin); } From 975c004fce9d1089a0ac19fba68d0f0d158c98b6 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 25 Jul 2024 10:51:41 +0700 Subject: [PATCH 231/305] chore: stage previous script --- .../20240626-maptoken-anima/last_vote.s.sol | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 script/20240626-maptoken-anima/last_vote.s.sol diff --git a/script/20240626-maptoken-anima/last_vote.s.sol b/script/20240626-maptoken-anima/last_vote.s.sol new file mode 100644 index 00000000..98092b98 --- /dev/null +++ b/script/20240626-maptoken-anima/last_vote.s.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console2 } from "forge-std/console2.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; + +import { console, Script } from "../../lib/forge-std/src/Script.sol"; + +contract Migration__20242606_MapTokenAnimaRoninTestnet_LastVote is Script { + + function run(bytes memory, string memory) public { + // ProposalCreated(chainId: 2021, round: 2, proposalHash: 0x6f25293b1d7bfbb2e754230cafe94cb38acb29e574753e802c20642f1e5f5823, proposal: ProposalDetail({ nonce: 2, chainId: 2021, expiryTimestamp: 1720761170 [1.72e9], executor: 0x0000000000000000000000000000000000000000, targets: [0xCee681C9108c42C710c6A8A949307D5F13C9F3ca, 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca], values: [0, 0], calldatas: [0x4bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184dbd2ef6c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed52e203d2d44faaea0d9fb6a40220a63c743c8000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c464363f780000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000], gasAmounts: [1000000 [1e6], 1000000 [1e6]] }), creator: 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa) + + Proposal.ProposalDetail memory proposal; + proposal.nonce = 2; + proposal.chainId = 2021; + proposal.expiryTimestamp = 1720761170; + proposal.executor = address(0); + + proposal.calldatas = new bytes[](2); + proposal.calldatas[0] = + hex"4bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184dbd2ef6c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed52e203d2d44faaea0d9fb6a40220a63c743c8000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; + proposal.calldatas[1] = hex"4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c464363f780000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000"; + + proposal.targets = new address[](2); + proposal.targets[0] = 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca; + proposal.targets[1] = 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca; + + proposal.values = new uint256[](2); + proposal.values[0] = 0; + proposal.values[1] = 0; + + proposal.gasAmounts = new uint256[](2); + proposal.gasAmounts[0] = 1000000; + proposal.gasAmounts[1] = 1000000; + // proposal.targets = [0xCee681C9108c42C710c6A8A949307D5F13C9F3ca, 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca]; + // proposal.values = [0, 0]; + // gasAmounts: [1000000 , 1000000] + + vm.broadcast(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); + RoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF).castProposalVoteForCurrentNetwork{ gas: 2_000_000 }(proposal, Ballot.VoteType.For); + } +} From 68a2bfe30eaa02cba84bbdf73e86baacc3ce7c12 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 25 Jul 2024 10:52:35 +0700 Subject: [PATCH 232/305] script: init mainnet v3.2.2 script --- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 2 +- script/interfaces/ISharedArgument.sol | 12 ++++++-- script/utils/Contract.sol | 2 ++ src/tokens/erc20/WBTC.sol | 30 +++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 src/tokens/erc20/WBTC.sol diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 264617b6..aa10da83 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -41,7 +41,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ super.setUp(); } - function run() public virtual onlyOn(Network.Ethereum.key()) { + function run() public virtual onlyOn(Network.EthMainnet.key()) { CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index 069d78cc..2e053ccf 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -84,6 +84,11 @@ interface ISharedArgument is IGeneralConfigExtended { address[] sentries; } + struct WBTCParam { + address gateway; + address pauser; + } + struct MockWrappedTokenParam { string name; string symbol; @@ -105,8 +110,8 @@ interface ISharedArgument is IGeneralConfigExtended { struct RoninMockERC1155Param { address defaultAdmin; - string uri; - string name; + string uri; + string name; string symbol; } @@ -137,6 +142,9 @@ interface ISharedArgument is IGeneralConfigExtended { BridgeTrackingParam bridgeTracking; BridgeRewardParam bridgeReward; // tokens + WBTCParam wbtc; + + // mock tokens MockWrappedTokenParam weth; MockWrappedTokenParam wron; MockERC20Param axs; diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index 8dec24a7..912b0945 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -9,6 +9,7 @@ enum Contract { AXS, SLP, USDC, + WBTC, MockERC721, MockERC1155, RoninMockERC1155, @@ -39,6 +40,7 @@ function name(Contract contractEnum) pure returns (string memory) { if (contractEnum == Contract.AXS) return "AXS"; if (contractEnum == Contract.SLP) return "SLP"; if (contractEnum == Contract.USDC) return "USDC"; + if (contractEnum == Contract.WBTC) return "WBTC"; if (contractEnum == Contract.MockERC721) return "MockERC721"; if (contractEnum == Contract.MockERC1155) return "MockERC1155"; diff --git a/src/tokens/erc20/WBTC.sol b/src/tokens/erc20/WBTC.sol new file mode 100644 index 00000000..c00adbd2 --- /dev/null +++ b/src/tokens/erc20/WBTC.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol"; + +contract WBTC is ERC20PresetMinterPauser { + address public immutable GATEWAY_ADDRESS; + + constructor(address gateway, address pauser) ERC20PresetMinterPauser("Wrapped Bitcoin", "WBTC") { + _setupRole(DEFAULT_ADMIN_ROLE, pauser); + _setupRole(PAUSER_ROLE, pauser); + + GATEWAY_ADDRESS = gateway; + _setupRole(MINTER_ROLE, gateway); + + _revokeRole(DEFAULT_ADMIN_ROLE, _msgSender()); + _revokeRole(MINTER_ROLE, _msgSender()); + _revokeRole(PAUSER_ROLE, _msgSender()); + } + + function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20PresetMinterPauser) { + if (to == address(0)) { + if (_msgSender() != GATEWAY_ADDRESS) { + revert("WBTC: only gateway can burn tokens"); + } + } + + super._beforeTokenTransfer(from, to, amount); + } +} From bf747c25e8e45d6af2155159f841e2c6b84d3326 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 25 Jul 2024 10:53:03 +0700 Subject: [PATCH 233/305] chore: update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5d7d5663..7ae63ad1 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,4 @@ out .DS_Store dry-run/ -20240411-operators-key.s.sol \ No newline at end of file +**-operators-key.s.sol \ No newline at end of file From 3d2d4298e6eccf4505576450352e1efbcf88c4bc Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 25 Jul 2024 13:19:07 +0700 Subject: [PATCH 234/305] script: map contract name, switch network --- .../20240716-p1-1-deploy-ronin-bridge-manager.s.sol | 2 +- script/GeneralConfig.sol | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol index 61ed5e2b..51161f11 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol @@ -32,7 +32,7 @@ contract Migration__20240716_P1_1_DeployRoninBridgeManager is Migration, Migrati super.setUp(); } - function run() public onlyOn(DefaultNetwork.RoninTestnet.key()) { + function run() public onlyOn(DefaultNetwork.RoninMainnet.key()) { _deployRoninBridgeManager(); } } diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 74eeedfd..7ae4f5b0 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -73,6 +73,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _mapContractName(Contract.MockERC721); _mapContractName(Contract.MockERC1155); _mapContractName(Contract.RoninBridgeManagerConstructor); + _mapContractName(Contract.WBTC); _mapContractName(Contract.PostChecker); _contractNameMap[Contract.AXS.key()] = "MockERC20"; From 75d51dad57559dda15567dfdc5e7bbfd8456e177 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 26 Jul 2024 15:18:22 +0700 Subject: [PATCH 235/305] script: add mainnet proposal --- ...0240716-deploy-bridge-manager-helper.s.sol | 46 ++--- .../20240716-deploy-wbtc-helper.s.sol | 15 ++ .../20240716-helper.s.sol | 10 +- .../20240716-p1-2-deploy-wbtc.s.sol | 6 +- ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 195 ++++++++---------- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 173 ++++++++++------ .../wbtc-threshold.s.sol | 16 ++ script/Migration.s.sol | 2 + 8 files changed, 261 insertions(+), 202 deletions(-) create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index 81450cbf..629f877a 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -25,39 +25,37 @@ import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; import "../Migration.s.sol"; -contract Migration__20240716_DeployRoninBridgeManagerHelper is Migration { +abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migration { using LibProxy for *; RoninBridgeManager _newRoninBridgeManager; function _deployRoninBridgeManager() internal returns (RoninBridgeManager) { address currRoninBridgeManager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); - console.log(currRoninBridgeManager); + console.log("Current Ronin Bridge Manager:", currRoninBridgeManager); ISharedArgument.SharedParameter memory param; - param.roninBridgeManager.num = 7; - param.roninBridgeManager.denom = 10; - param.roninBridgeManager.roninChainId = block.chainid; - param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.roninBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - param.roninBridgeManager.bridgeOperators = new address[](4); - param.roninBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; - param.roninBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; - param.roninBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; - param.roninBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; - - param.roninBridgeManager.governors = new address[](4); - param.roninBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - param.roninBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - param.roninBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - param.roninBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - - param.roninBridgeManager.voteWeights = new uint96[](4); - param.roninBridgeManager.voteWeights[0] = 100; - param.roninBridgeManager.voteWeights[1] = 100; - param.roninBridgeManager.voteWeights[2] = 100; - param.roninBridgeManager.voteWeights[3] = 100; + { + (address[] memory currGovernors, address[] memory currOperators, uint96[] memory currWeights) = RoninBridgeManager(currRoninBridgeManager).getFullBridgeOperatorInfos(); + + param.roninBridgeManager.num = 7; + param.roninBridgeManager.denom = 10; + param.roninBridgeManager.roninChainId = block.chainid; + param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.roninBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + + uint totalCurrGovernors = currGovernors.length; + param.roninBridgeManager.bridgeOperators = new address[](totalCurrGovernors); + param.roninBridgeManager.governors = new address[](totalCurrGovernors); + param.roninBridgeManager.voteWeights = new uint96[](totalCurrGovernors); + + for (uint i = 0; i < totalCurrGovernors; i++) { + param.roninBridgeManager.bridgeOperators[i] = currOperators[i]; + param.roninBridgeManager.governors[i] = currGovernors[i]; + param.roninBridgeManager.voteWeights[i] = currWeights[i]; + } + } param.roninBridgeManager.targetOptions = new GlobalProposal.TargetOption[](5); param.roninBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol new file mode 100644 index 00000000..1c07cce8 --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { console2 as console } from "forge-std/console2.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; +import { Contract } from "../utils/Contract.sol"; +import { WBTC } from "src/tokens/erc20/WBTC.sol"; + +abstract contract Migration__20240716_DeployWBTC_Helper is Migration { + function _deployWBTC() internal { + WBTC instance = WBTC(_deployImmutable(Contract.WBTC.key())); + console.log("WBTC deployed at:", address(instance)); + } +} \ No newline at end of file diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol index f80f75b7..ecf03b88 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol @@ -15,13 +15,13 @@ struct LegacyProposalDetail { } contract Migration__20240716_Helper is Migration { - address internal _governor; + address internal _proposer; address[] internal _voters; RoninBridgeManager internal _currRoninBridgeManager; function _helperProposeForCurrentNetwork(LegacyProposalDetail memory proposal) internal { - vm.broadcast(_governor); + vm.broadcast(_proposer); address(_currRoninBridgeManager).call( abi.encodeWithSignature( "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", @@ -37,7 +37,11 @@ contract Migration__20240716_Helper is Migration { function _helperVoteForCurrentNetwork(LegacyProposalDetail memory proposal) internal { for (uint i; i < _voters.length - 1; ++i) { - vm.broadcast(_voters[i]); + if (_voters[i] == _proposer) { + continue; + } + + vm.prank(_voters[i]); address(_currRoninBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( abi.encodeWithSignature( "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol index 34d5bf22..a4e8d140 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol @@ -6,13 +6,15 @@ import { Migration } from "../Migration.s.sol"; import { Contract } from "../utils/Contract.sol"; import { WBTC } from "src/tokens/erc20/WBTC.sol"; -contract Migration__20240716_P1_1_DeployWBTC is Migration { +import "./20240716-deploy-wbtc-helper.s.sol"; + +contract Migration__20240716_P1_1_DeployWBTC is Migration__20240716_DeployWBTC_Helper { function _defaultArguments() internal virtual override returns (bytes memory) { ISharedArgument.WBTCParam memory param = config.sharedArguments().wbtc; return abi.encode(param.gateway, param.pauser); } function run() public returns (WBTC instance) { - instance = WBTC(_deployImmutable(Contract.WBTC.key())); + _deployWBTC(); } } \ No newline at end of file diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index 2af20ea4..df7ab5c6 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -5,6 +5,8 @@ import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; +import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; @@ -24,8 +26,9 @@ import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import "./20240716-deploy-bridge-manager-helper.s.sol"; import "./20240716-helper.s.sol"; +import "./wbtc-threshold.s.sol"; -contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_Helper, Migration__20240716_DeployRoninBridgeManagerHelper { +contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_Helper, Migration__20240716_DeployRoninBridgeManagerHelper, Migration__MapToken_WBTC_Threshold { ISharedArgument.SharedParameter _param; function setUp() public virtual override { @@ -34,91 +37,20 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_H function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _newRoninBridgeManager = RoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); + _newRoninBridgeManager = _deployRoninBridgeManager(); - _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); - _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); - _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); + _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; + + (address[] memory currGovernors,,) = _currRoninBridgeManager.getFullBridgeOperatorInfos(); + for (uint i = 0; i < currGovernors.length; i++) { + _voters.push(currGovernors[i]); + } - _changeAdminOfEnforcer(); _upgradeBridgeRoninchain(); config.setAddress(network(), Contract.RoninBridgeManager.key(), address(_newRoninBridgeManager)); } - function _changeAdminOfEnforcer() private { - RoninBridgeManager roninGA = RoninBridgeManager(0x53Ea388CB72081A3a397114a43741e7987815896); - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); - - uint256 expiredTime = block.timestamp + 14 days; - uint N = 1; - address[] memory targets = new address[](N); - uint256[] memory values = new uint256[](N); - bytes[] memory calldatas = new bytes[](N); - uint256[] memory gasAmounts = new uint256[](N); - - targets[0] = pauseEnforcerProxy; - calldatas[0] = abi.encodeWithSignature("changeAdmin(address)", address(_currRoninBridgeManager)); - gasAmounts[0] = 1_000_000; - - // LegacyProposalDetail memory proposal; - // proposal.nonce = roninGA.round(block.chainid) + 1; - // proposal.chainId = block.chainid; - // proposal.expiryTimestamp = expiredTime; - // proposal.targets = targets; - // proposal.values = values; - // proposal.calldatas = calldatas; - // proposal.gasAmounts = gasAmounts; - - address gaGovernor = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - address[] memory gaVoters = new address[](3); - gaVoters[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - gaVoters[1] = 0x06f8Af58F656B507918d91B0B6F8B89bfCC556f9; - gaVoters[2] = 0xe1100401454B5f850b09f3b92cE7f071C5F1CEF4; - - // vm.broadcast(gaGovernor); - // address(roninGA).call( - // abi.encodeWithSignature( - // "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", - // // proposal.chainId, - // proposal.expiryTimestamp, - // proposal.targets, - // proposal.values, - // proposal.calldatas, - // proposal.gasAmounts, - // Ballot.VoteType.For - // ) - // ); - - // for (uint i; i < gaVoters.length; ++i) { - // vm.broadcast(gaVoters[i]); - // address(roninGA).call{gas: 10_000_000}( - // abi.encodeWithSignature( - // "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For - // ) - // ); - // } - - // ((45, 2021, 1714451658 [1.714e9], [0x1aD54D61F47acBcBA99fb6540A1694EB2F47AB95], [0], [0x8f283970000000000000000000000000b0507f2f22697022ecb25963a00d3d076dac5753], [1000000 [1e6]]), 0) - - LegacyProposalDetail memory proposal; - proposal.nonce = 45; - proposal.chainId = 2021; - proposal.expiryTimestamp = 1714451658; - proposal.targets = targets; - proposal.values = values; - proposal.calldatas = calldatas; - proposal.gasAmounts = gasAmounts; - - vm.broadcast(gaVoters[2]); - address(roninGA).call{ gas: 10_000_000 }( - abi.encodeWithSignature( - "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8)", proposal, Ballot.VoteType.For - ) - ); - } - function _upgradeBridgeRoninchain() private { address bridgeRewardLogic = _deployLogic(Contract.BridgeReward.key()); address bridgeSlashLogic = _deployLogic(Contract.BridgeSlash.key()); @@ -129,58 +61,93 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_H address bridgeRewardProxy = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); address bridgeSlashProxy = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); address bridgeTrackingProxy = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + // address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); ISharedArgument.SharedParameter memory param; param.roninBridgeManager.callbackRegisters = new address[](1); param.roninBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - uint N = 17; + uint N = 16; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); uint256[] memory gasAmounts = new uint256[](N); - targets[0] = bridgeRewardProxy; - targets[1] = bridgeSlashProxy; - targets[2] = bridgeTrackingProxy; - targets[3] = roninGatewayV3Proxy; - targets[4] = pauseEnforcerProxy; - targets[5] = bridgeRewardProxy; - targets[6] = bridgeSlashProxy; - targets[7] = bridgeTrackingProxy; - targets[8] = roninGatewayV3Proxy; - targets[9] = bridgeRewardProxy; - targets[10] = bridgeSlashProxy; - targets[11] = bridgeTrackingProxy; - targets[12] = roninGatewayV3Proxy; - targets[13] = pauseEnforcerProxy; - targets[14] = address(_newRoninBridgeManager); - targets[15] = address(_newRoninBridgeManager); - - calldatas[0] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", bridgeRewardLogic, abi.encodeWithSelector(BridgeReward.initializeV2.selector)); - calldatas[1] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); - calldatas[2] = abi.encodeWithSignature("upgradeTo(address)", bridgeTrackingLogic); - calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); - calldatas[4] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); - calldatas[5] = + uint cCount; + + targets[cCount] = bridgeRewardProxy; + calldatas[cCount++] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", bridgeRewardLogic, abi.encodeWithSelector(BridgeReward.initializeV2.selector)); + + targets[cCount] = bridgeSlashProxy; + calldatas[cCount++] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); + + targets[cCount] = bridgeTrackingProxy; + calldatas[cCount++] = abi.encodeWithSignature("upgradeTo(address)", bridgeTrackingLogic); + + targets[cCount] = roninGatewayV3Proxy; + calldatas[cCount++] = abi.encodeWithSignature("upgradeTo(address)", roninGatewayV3Logic); + + targets[cCount] = bridgeRewardProxy; + calldatas[cCount++] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[6] = + + targets[cCount] = bridgeSlashProxy; + calldatas[cCount++] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[7] = + + targets[cCount] = bridgeTrackingProxy; + calldatas[cCount++] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[8] = + + targets[cCount] = roninGatewayV3Proxy; + calldatas[cCount++] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newRoninBridgeManager)))); - calldatas[9] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[10] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[11] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[12] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[13] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); - calldatas[14] = abi.encodeWithSignature( + + { + address[] memory roninTokens = new address[](1); + address[] memory mainchainTokens = new address[](1); + uint256[] memory chainIds = new uint256[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + + roninTokens[0] = _wbtcRoninToken; + mainchainTokens[0] = _wbtcMainchainToken; + chainIds[0] = config.getNetworkData(config.getCompanionNetwork(network())).chainId; + standards[0] = TokenStandard.ERC20; + + address[] memory mainchainTokensToSetMinThreshold = new address[](1); + uint256[] memory minThresholds = new uint256[](1); + mainchainTokensToSetMinThreshold[0] = _wbtcMainchainToken; + minThresholds[0] = _wbtcMinThreshold; + + targets[cCount] = roninGatewayV3Proxy; + calldatas[cCount++] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards))); + + targets[cCount] = roninGatewayV3Proxy; + calldatas[cCount++] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (mainchainTokensToSetMinThreshold, minThresholds))); + } + + targets[cCount] = bridgeRewardProxy; + calldatas[cCount++] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + targets[cCount] = bridgeSlashProxy; + calldatas[cCount++] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + targets[cCount] = bridgeTrackingProxy; + calldatas[cCount++] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + targets[cCount] = roninGatewayV3Proxy; + calldatas[cCount++] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + targets[cCount] = address(_newRoninBridgeManager); + calldatas[cCount++] = abi.encodeWithSignature( "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.roninBridgeManager.callbackRegisters)) ); - calldatas[15] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + targets[cCount] = address(_newRoninBridgeManager); + calldatas[cCount++] = abi.encodeWithSignature("changeAdmin(address)", address(_newRoninBridgeManager)); + + assertEq(cCount, N); for (uint i; i < N; ++i) { gasAmounts[i] = 1_000_000; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index aa10da83..007f2427 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -26,71 +26,63 @@ import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; import "./20240716-helper.s.sol"; import "./20240716-operators-key.s.sol"; +import "./wbtc-threshold.s.sol"; import "../Migration.s.sol"; -contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey { +contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey, Migration__MapToken_WBTC_Threshold { MainchainBridgeManager _currMainchainBridgeManager; MainchainBridgeManager _newMainchainBridgeManager; address private _governor; - address[] private _voters; - - address TESTNET_ADMIN = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; function setUp() public virtual override { super.setUp(); } function run() public virtual onlyOn(Network.EthMainnet.key()) { - CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); + // CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); - _voters.push(0x087D08e3ba42e64E3948962dd1371F906D1278b9); - _voters.push(0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F); - _changeTempAdmin(); + // _changeTempAdmin(); _deployMainchainBridgeManager(); _upgradeBridgeMainchain(); } - function _changeTempAdmin() internal { - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + // function _changeTempAdmin() internal { + // address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + // address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); - address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); - address(mainchainGatewayV3Proxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); - vm.stopBroadcast(); - } + // vm.startBroadcast(TESTNET_ADMIN); + // address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + // address(mainchainGatewayV3Proxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); + // vm.stopBroadcast(); + // } function _deployMainchainBridgeManager() internal returns (address mainchainBM) { ISharedArgument.SharedParameter memory param; + { + (address[] memory currGovernors, address[] memory currOperators, uint96[] memory currWeights) = _currMainchainBridgeManager.getFullBridgeOperatorInfos(); + uint totalCurrGovernors = currGovernors.length; + param.roninBridgeManager.bridgeOperators = new address[](totalCurrGovernors); + param.roninBridgeManager.governors = new address[](totalCurrGovernors); + param.roninBridgeManager.voteWeights = new uint96[](totalCurrGovernors); + + for (uint i = 0; i < totalCurrGovernors; i++) { + param.roninBridgeManager.bridgeOperators[i] = currOperators[i]; + param.roninBridgeManager.governors[i] = currGovernors[i]; + param.roninBridgeManager.voteWeights[i] = currWeights[i]; + } + } + param.mainchainBridgeManager.num = 7; param.mainchainBridgeManager.denom = 10; - param.mainchainBridgeManager.roninChainId = 2021; + param.mainchainBridgeManager.roninChainId = 2020; param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - param.mainchainBridgeManager.bridgeOperators = new address[](4); - param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; - param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; - param.mainchainBridgeManager.bridgeOperators[2] = 0xB266Bf53Cf7EAc4E2065A404598DCB0E15E9462c; - param.mainchainBridgeManager.bridgeOperators[3] = 0xcc5Fc5B6c8595F56306Da736F6CD02eD9141C84A; - - param.mainchainBridgeManager.governors = new address[](4); - param.mainchainBridgeManager.governors[0] = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - param.mainchainBridgeManager.governors[1] = 0xb033ba62EC622dC54D0ABFE0254e79692147CA26; - param.mainchainBridgeManager.governors[2] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; - param.mainchainBridgeManager.governors[3] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - - param.mainchainBridgeManager.voteWeights = new uint96[](4); - param.mainchainBridgeManager.voteWeights[0] = 100; - param.mainchainBridgeManager.voteWeights[1] = 100; - param.mainchainBridgeManager.voteWeights[2] = 100; - param.mainchainBridgeManager.voteWeights[3] = 100; param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; @@ -140,7 +132,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; - uint N = 7; + uint N = 6; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); bytes[] memory calldatas = new bytes[](N); @@ -149,23 +141,49 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ targets[0] = mainchainGatewayV3Proxy; targets[1] = mainchainGatewayV3Proxy; targets[2] = mainchainGatewayV3Proxy; - targets[3] = pauseEnforcerProxy; - targets[4] = pauseEnforcerProxy; + targets[3] = mainchainGatewayV3Proxy; + targets[4] = address(_newMainchainBridgeManager); targets[5] = address(_newMainchainBridgeManager); - targets[6] = address(_newMainchainBridgeManager); - calldatas[0] = abi.encodeWithSignature( + + // Mapping WBTC calldata + { + address[] memory mainchainTokens = new address[](1); + address[] memory roninTokens = new address[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + uint256[][4] memory thresholds; + + mainchainTokens[0] = _wbtcMainchainToken; + roninTokens[0] = _wbtcRoninToken; + standards[0] = TokenStandard.ERC20; + // highTierThreshold + thresholds[0] = new uint256[](1); + thresholds[0][0] = _wbtcHighTierThreshold; + // lockedThreshold + thresholds[1] = new uint256[](1); + thresholds[1][0] = _wbtcLockedThreshold; + // unlockFeePercentages + thresholds[2] = new uint256[](1); + thresholds[2][0] = _wbtcUnlockFeePercentages; + // dailyWithdrawalLimit + thresholds[3] = new uint256[](1); + thresholds[3][0] = _wbtcDailyWithdrawalLimit; + + calldatas[0] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds))); + } + + calldatas[1] = abi.encodeWithSignature( "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) ); - calldatas[1] = + calldatas[2] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); - calldatas[2] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); - calldatas[3] = abi.encodeWithSignature("upgradeTo(address)", pauseEnforcerLogic); - calldatas[4] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); - calldatas[5] = abi.encodeWithSignature( + + // Do all setting steps before migrating to change admin + calldatas[3] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[4] = abi.encodeWithSignature( "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters)) ); - calldatas[6] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + calldatas[5] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); for (uint i; i < N; ++i) { gasAmounts[i] = 1_000_000; @@ -180,20 +198,22 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ proposal.calldatas = calldatas; proposal.gasAmounts = gasAmounts; - uint V = _voters.length + 1; - Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](V); - for (uint i; i < V; ++i) { - supports_[i] = Ballot.VoteType.For; - } + _simulateProposal(proposal); - SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); + // uint V = _voters.length + 1; + // Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](V); + // for (uint i; i < V; ++i) { + // supports_[i] = Ballot.VoteType.For; + // } - vm.broadcast(_governor); - address(_currMainchainBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( - abi.encodeWithSignature( - "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures - ) - ); + // SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); + + // vm.broadcast(_governor); + // address(_currMainchainBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( + // abi.encodeWithSignature( + // "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures + // ) + // ); } function getDomain() public pure returns (bytes32) { @@ -202,7 +222,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ keccak256("EIP712Domain(string name,string version,bytes32 salt)"), keccak256("BridgeAdmin"), // name hash keccak256("2"), // version hash - keccak256(abi.encode("BRIDGE_ADMIN", 2021)) // salt + keccak256(abi.encode("BRIDGE_ADMIN", 2020)) // salt ) ); } @@ -259,4 +279,39 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ digest_ := keccak256(ptr, 0x100) } } + + function _simulateProposal(LegacyProposalDetail memory proposal) internal { + Ballot.VoteType[] memory cheatingSupports = new Ballot.VoteType[](1); + uint256[] memory cheatingPks = new uint256[](1); + (address cheatingGov, uint256 cheatingGovPk) = makeAddrAndKey("Governor"); + + cheatingSupports[0] = Ballot.VoteType.For; + cheatingPks[0] = cheatingGovPk; + SignatureConsumer.Signature[] memory cheatingSignatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), cheatingPks, Ballot.VoteType.For); + + uint256 totalGas = 1_000_000; + for (uint256 i; i < proposal.gasAmounts.length; ++i) { + totalGas += proposal.gasAmounts[i]; + } + + _cheatWeightGovernor(IBridgeManager(_currMainchainBridgeManager), cheatingGov); + + vm.prank(cheatingGov); + address(_currMainchainBridgeManager).call{ gas: totalGas }( + abi.encodeWithSignature( + "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, cheatingSupports, cheatingSignatures + ) + ); + } + + function _cheatWeightGovernor(IBridgeManager manager, address gov) internal { + bytes32 $ = keccak256(abi.encode(gov, 0x88547008e60f5748911f2e59feb3093b7e4c2e87b2dd69d61f112fcc932de8e3)); + bytes32 opAndWeight = vm.load(address(manager), $); + + uint256 totalWeight = manager.getTotalWeight(); + bytes32 newOpAndWeight = bytes32((totalWeight << 160) + uint160(uint256(opAndWeight))); + vm.store(address(manager), $, newOpAndWeight); + + assert(manager.getGovernorWeight(gov) == totalWeight); + } } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol new file mode 100644 index 00000000..04ea7ae7 --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +contract Migration__MapToken_WBTC_Threshold { + address _wbtcRoninToken = address(0xdeadbeef); // TODO: replace by real WBTC token address + address _wbtcMainchainToken = address(0x3429d03c6F7521AeC737a0BBF2E5ddcef2C3Ae31); + + // The decimal of WBTC token is 18 + uint256 _wbtcHighTierThreshold = 17 ether; + uint256 _wbtcLockedThreshold = 34 ether; + uint256 _wbtcDailyWithdrawalLimit = 42 ether; + uint256 _wbtcMinThreshold = 0.000167 ether; + + // The MAX_PERCENTAGE is 100_0000 + uint256 _wbtcUnlockFeePercentages = 10; // 0.001%. Max percentage is 1e6 so 10 is 0.001% (`10 / 1e6 = 0.001 * 100`) +} \ No newline at end of file diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 999048ee..7f6e8d76 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -99,6 +99,8 @@ contract Migration is BaseMigration, Utils { param.mainchainBridgeManager.voteWeights = voteWeights; param.mainchainBridgeManager.targetOptions = options; param.mainchainBridgeManager.targets = targets; + } else if (network() == Network.EthMainnet.key()) { + // Undefined } else if (network() == DefaultNetwork.RoninTestnet.key()) { // Undefined } else if (network() == DefaultNetwork.RoninMainnet.key()) { From 38944c46f0245394e7888de748d96098c177de59 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 26 Jul 2024 17:12:23 +0700 Subject: [PATCH 236/305] forge install: foundry-deployment-kit badf219 --- lib/foundry-deployment-kit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index 68f4fd8b..badf2194 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit 68f4fd8bedc1d5532d1e9df6403eb83363bf9877 +Subproject commit badf2194b2fb005e45473c67066764c16c8d1343 From 777ca808406843dad68c02c9461f44e886054e9d Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 26 Jul 2024 17:14:17 +0700 Subject: [PATCH 237/305] forge install: foundry-deployment-kit 46822c40b686135379460bf58d355a9a710657bb --- lib/foundry-deployment-kit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index badf2194..46822c40 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit badf2194b2fb005e45473c67066764c16c8d1343 +Subproject commit 46822c40b686135379460bf58d355a9a710657bb From 3406065858f49310f4d204b142bbbbe01d15a690 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 26 Jul 2024 17:35:26 +0700 Subject: [PATCH 238/305] forge install: foundry-deployment-kit ff4e5f1 --- lib/foundry-deployment-kit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit index 46822c40..ff4e5f12 160000 --- a/lib/foundry-deployment-kit +++ b/lib/foundry-deployment-kit @@ -1 +1 @@ -Subproject commit 46822c40b686135379460bf58d355a9a710657bb +Subproject commit ff4e5f126c1979ad47aa74dd4c1833fca13ab05f From 4ee4d442cd22a06fbee72622c37a418efb3ce8d6 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Fri, 26 Jul 2024 17:56:15 +0700 Subject: [PATCH 239/305] script: adapt fdk-3.0.0-beta --- remappings.txt | 4 +- .../20231218-maptoken-mainchain.s.sol | 2 +- .../20231218-maptoken-roninchain.s.sol | 2 +- .../20240115-maptoken-mainchain.s.sol | 2 +- .../20240115-maptoken-roninchain.s.sol | 2 +- .../20240131-maptoken-pixel-mainchain.s.sol | 2 +- .../20240131-maptoken-pixel-roninchain.s.sol | 4 +- .../20240206-maptoken-banana-mainchain.s.sol | 4 +- .../20240206-maptoken-banana-roninchain.s.sol | 4 +- .../20240308-maptoken-aperios-mainchain.s.sol | 2 +- ...20240308-maptoken-aperios-roninchain.s.sol | 4 +- .../base-maptoken.s.sol | 2 +- .../20240405-maptoken-usdc-mainchain.s.sol | 3 +- .../20240409-maptoken-slp-mainchain.s.sol | 3 +- .../deploy-sepolia.s.sol | 2 +- ...0240411-deploy-bridge-manager-helper.s.sol | 3 +- .../20240411-helper.s.sol | 3 +- ...40411-p1-deploy-ronin-bridge-manager.s.sol | 5 +- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 3 +- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 4 +- .../verify-script.s.sol | 1 + .../20240606-deploy-batcher-sepolia.s.sol | 4 +- .../20240612-maptoken-nft-sepolia.s.sol | 4 +- .../20240613-maptoken-erc1155-ronin.s.sol | 4 +- .../20240613-maptoken-erc1155-sepolia.s.sol | 4 +- ...0240619-p3-upgrade-bridge-main-chain.s.sol | 4 +- .../20240626-maptoken-anima/last_vote.s.sol | 18 ++-- ...0240716-deploy-bridge-manager-helper.s.sol | 4 +- .../20240716-deploy-wbtc-helper.s.sol | 2 +- .../20240716-helper.s.sol | 3 +- ...716-p1-1-deploy-ronin-bridge-manager.s.sol | 5 +- ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 19 +++-- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 4 +- .../verify-script.s.sol | 1 + script/GeneralConfig.sol | 49 ++++------- script/Migration.s.sol | 82 ++++++++++++++++--- script/PostChecker.sol | 15 +++- .../contracts/RoninBridgeManagerDeploy.s.sol | 19 ++++- script/deploy-v0.3.1/Deploy.v0.3.1.s.sol | 2 +- .../factory-maptoken-mainchain.s.sol | 2 +- .../factory-maptoken-roninchain.s.sol | 2 +- script/post-check/BasePostCheck.s.sol | 4 +- script/shared/libraries/LibProposal.sol | 4 +- script/utils/Contract.sol | 3 +- script/utils/Network.sol | 22 ++++- 45 files changed, 214 insertions(+), 127 deletions(-) diff --git a/remappings.txt b/remappings.txt index 082d6472..b8999650 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,5 +1,5 @@ ds-test/=lib/forge-std/lib/ds-test/src/ -forge-std/=lib/foundry-deployment-kit/lib/forge-std/src/ +forge-std/=lib/foundry-deployment-kit/dependencies/forge-std-1.8.2/src/ @openzeppelin/=lib/openzeppelin-contracts/ hardhat/=node_modules/hardhat/ @ronin/contracts/=src/ @@ -7,5 +7,5 @@ hardhat/=node_modules/hardhat/ @ronin/script=script/ @prb/test/=lib/prb-test/src/ @prb/math/=lib/prb-math/ -solady/=lib/solady/src/ +solady/=lib/foundry-deployment-kit/dependencies/solady-0.0.206/src/ @fdk/=lib/foundry-deployment-kit/script/ diff --git a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol index 7cf53616..f0a186aa 100644 --- a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; diff --git a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol index 4160037c..c26898b6 100644 --- a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index 6c30a645..9d116ec8 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index aed10322..19149517 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol index df2762eb..400353f8 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol index cb54e108..7093b861 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; @@ -17,7 +17,7 @@ import { Migration } from "../Migration.s.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; -import "forge-std/console2.sol"; +import "forge-std/console.sol"; import "./maptoken-pixel-configs.s.sol"; import "./update-axiechat-config.s.sol"; diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index 9f151d8a..bdc28e9c 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -145,7 +145,7 @@ contract Migration__20240206_MapTokenBananaMainchain is address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); LibProposal.verifyMainchainProposalGasAmount(companionNetwork, companionManager, targets, values, calldatas, gasAmounts); - console2.log("Nonce:", vm.getNonce(_governor)); + console.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); _roninBridgeManager.propose(companionChainId, expiredTime, address(0), targets, values, calldatas, gasAmounts); } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index 55cc2c6b..7852c290 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; @@ -163,7 +163,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is } config.switchTo(currentNetwork); - console2.log("Nonce:", vm.getNonce(_governor)); + console.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); _roninBridgeManager.propose(block.chainid, expiredTime, address(0), targets, values, calldatas, gasAmounts); diff --git a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol index 57cf4462..3f38b41d 100644 --- a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol +++ b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-mainchain.s.sol @@ -14,7 +14,7 @@ contract Migration__20240308_MapTokenAperiosMainchain is Base__MapToken, Factory } function run() public override { - console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network + console.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network super.run(); } } diff --git a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol index ff54faad..bd4da409 100644 --- a/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol +++ b/script/20240308-maptoken-aperios/20240308-maptoken-aperios-roninchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import "../factories/factory-maptoken-roninchain.s.sol"; import "./base-maptoken.s.sol"; @@ -15,7 +15,7 @@ contract Migration__20240308_MapTokenAperiosRoninchain is Base__MapToken, Factor } function run() public override { - console2.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network + console.log("nonce", vm.getNonce(SM_GOVERNOR)); // Log nonce for workaround of nonce increase when switch network super.run(); } } diff --git a/script/20240308-maptoken-aperios/base-maptoken.s.sol b/script/20240308-maptoken-aperios/base-maptoken.s.sol index e4561c68..e802fbd7 100644 --- a/script/20240308-maptoken-aperios/base-maptoken.s.sol +++ b/script/20240308-maptoken-aperios/base-maptoken.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import "forge-std/console2.sol"; +import "forge-std/console.sol"; import "./caller-configs.s.sol"; import "./maptoken-aperios-configs.s.sol"; diff --git a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol index c7d8ae8d..ce97bd40 100644 --- a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -20,7 +19,7 @@ import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "./maptoken-usdc-configs.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240405_MapTokenUsdcMainchain is Migration, Migration__MapToken_Usdc_Config { address internal _mainchainPauseEnforcer; diff --git a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol index c20a7f06..ad270084 100644 --- a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -21,7 +20,7 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "./maptoken-slp-configs.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240409_MapTokenSlpMainchain is Migration, Migration__MapToken_Slp_Config { address internal _mainchainPauseEnforcer; diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 1770c391..7c80bc9f 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -31,7 +31,7 @@ import { Migration } from "../Migration.s.sol"; import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import "./changeGV-config.s.sol"; -import "forge-std/console2.sol"; +import "forge-std/console.sol"; contract DeploySepolia is Migration, DeploySepolia__ChangeGV_Config { ISharedArgument.SharedParameter _param; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol index 6aa95cc4..7a3895b5 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -23,7 +22,7 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { using LibProxy for *; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol index 2497d517..4cf5eec2 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -2,7 +2,8 @@ pragma solidity ^0.8.19; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; struct LegacyProposalDetail { uint256 nonce; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol index d0be13ac..07dfdd01 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -22,7 +22,8 @@ import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtil import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; import "./20240411-deploy-bridge-manager-helper.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; // Run this script with `optimizer_runs = 1`. contract Migration__20240409_P1_DeployRoninBridgeManager is Migration, Migration__2024041_DeployRoninBridgeManagerHelper { diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index d3a7a726..112db860 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -24,6 +24,7 @@ import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import "./20240411-deploy-bridge-manager-helper.s.sol"; import "./20240411-helper.s.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_Helper, Migration__2024041_DeployRoninBridgeManagerHelper { ISharedArgument.SharedParameter _param; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index e8014b9a..62561f1c 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -26,7 +26,7 @@ import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; import "./20240411-helper.s.sol"; import "./20240411-operators-key.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__20240409_GovernorsKey { MainchainBridgeManager _currMainchainBridgeManager; diff --git a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol index 09c47032..f00308ee 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.19; import "./20240411-p2-upgrade-bridge-ronin-chain.s.sol"; import "./20240411-p3-upgrade-bridge-main-chain.s.sol"; +import { TNetwork } from "@fdk/types/TNetwork.sol"; contract Verify_Script_20240411 is Migration__20240409_P2_UpgradeBridgeRoninchain, Migration__20240409_P3_UpgradeBridgeMainchain { function setUp() public override(Migration__20240409_P2_UpgradeBridgeRoninchain, Migration__20240409_P3_UpgradeBridgeMainchain) { diff --git a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol index 49820e71..e2b909ab 100644 --- a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol +++ b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -25,7 +25,7 @@ import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; import "@ronin/script/contracts/MainchainGatewayBatcherDeploy.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240606_DeployBatcherSepolia is Migration { MainchainBridgeManager _currMainchainBridgeManager; diff --git a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol index 520a48dc..5c7068c0 100644 --- a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -19,7 +19,7 @@ import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240612_MapNTFSepoliaMainchain is Migration { address internal _mainchainPauseEnforcer; diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol index fa257429..50b3ba4c 100644 --- a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -19,7 +19,7 @@ import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240613_MapERC1155SepoliaRoninchain is Migration { RoninBridgeManager internal _roninBridgeManager; diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol index 50d8c60a..6c643122 100644 --- a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -19,7 +19,7 @@ import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; import { USDCDeploy } from "@ronin/script/contracts/token/USDCDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240613_MapERC1155SepoliaMainchain is Migration { address internal _mainchainPauseEnforcer; diff --git a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol index 65f24c2c..5cbeb82b 100644 --- a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -26,7 +26,7 @@ import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; import "../20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol"; import "./20240619-operators-key.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__20240619_GovernorsKey { MainchainBridgeManager _mainchainBridgeManager; diff --git a/script/20240626-maptoken-anima/last_vote.s.sol b/script/20240626-maptoken-anima/last_vote.s.sol index 98092b98..a9355bcc 100644 --- a/script/20240626-maptoken-anima/last_vote.s.sol +++ b/script/20240626-maptoken-anima/last_vote.s.sol @@ -1,28 +1,28 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; -import { console, Script } from "../../lib/forge-std/src/Script.sol"; +import { Script } from "forge-std/Script.sol"; contract Migration__20242606_MapTokenAnimaRoninTestnet_LastVote is Script { - function run(bytes memory, string memory) public { // ProposalCreated(chainId: 2021, round: 2, proposalHash: 0x6f25293b1d7bfbb2e754230cafe94cb38acb29e574753e802c20642f1e5f5823, proposal: ProposalDetail({ nonce: 2, chainId: 2021, expiryTimestamp: 1720761170 [1.72e9], executor: 0x0000000000000000000000000000000000000000, targets: [0xCee681C9108c42C710c6A8A949307D5F13C9F3ca, 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca], values: [0, 0], calldatas: [0x4bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184dbd2ef6c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed52e203d2d44faaea0d9fb6a40220a63c743c8000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 0x4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c464363f780000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000], gasAmounts: [1000000 [1e6], 1000000 [1e6]] }), creator: 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa) Proposal.ProposalDetail memory proposal; - proposal.nonce = 2; - proposal.chainId = 2021; - proposal.expiryTimestamp = 1720761170; - proposal.executor = address(0); + proposal.nonce = 2; + proposal.chainId = 2021; + proposal.expiryTimestamp = 1720761170; + proposal.executor = address(0); proposal.calldatas = new bytes[](2); proposal.calldatas[0] = - hex"4bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184dbd2ef6c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed52e203d2d44faaea0d9fb6a40220a63c743c8000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; - proposal.calldatas[1] = hex"4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c464363f780000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000"; + hex"4bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184dbd2ef6c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed52e203d2d44faaea0d9fb6a40220a63c743c8000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; + proposal.calldatas[1] = + hex"4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c464363f780000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009f6a5cdc477e9f667d60424bfdb4e82089d9d72c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000"; proposal.targets = new address[](2); proposal.targets[0] = 0xCee681C9108c42C710c6A8A949307D5F13C9F3ca; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index 629f877a..41d86bda 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -23,7 +23,7 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migration { using LibProxy for *; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol index 1c07cce8..15b4b784 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import { Migration } from "../Migration.s.sol"; import { Contract } from "../utils/Contract.sol"; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol index ecf03b88..80a19af7 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol @@ -2,7 +2,8 @@ pragma solidity ^0.8.19; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; struct LegacyProposalDetail { uint256 nonce; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol index 51161f11..1dc9092a 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -22,7 +22,8 @@ import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtil import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; import "./20240716-deploy-bridge-manager-helper.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; // NOTE: Run this script with `optimizer_runs = 1`. contract Migration__20240716_P1_1_DeployRoninBridgeManager is Migration, Migration__20240716_DeployRoninBridgeManagerHelper { diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index df7ab5c6..5209b62d 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -27,8 +27,13 @@ import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import "./20240716-deploy-bridge-manager-helper.s.sol"; import "./20240716-helper.s.sol"; import "./wbtc-threshold.s.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; -contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_Helper, Migration__20240716_DeployRoninBridgeManagerHelper, Migration__MapToken_WBTC_Threshold { +contract Migration__20240716_P2_UpgradeBridgeRoninchain is + Migration__20240716_Helper, + Migration__20240716_DeployRoninBridgeManagerHelper, + Migration__MapToken_WBTC_Threshold +{ ISharedArgument.SharedParameter _param; function setUp() public virtual override { @@ -77,7 +82,8 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_H uint cCount; targets[cCount] = bridgeRewardProxy; - calldatas[cCount++] = abi.encodeWithSignature("upgradeToAndCall(address,bytes)", bridgeRewardLogic, abi.encodeWithSelector(BridgeReward.initializeV2.selector)); + calldatas[cCount++] = + abi.encodeWithSignature("upgradeToAndCall(address,bytes)", bridgeRewardLogic, abi.encodeWithSelector(BridgeReward.initializeV2.selector)); targets[cCount] = bridgeSlashProxy; calldatas[cCount++] = abi.encodeWithSignature("upgradeTo(address)", bridgeSlashLogic); @@ -121,10 +127,13 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_H minThresholds[0] = _wbtcMinThreshold; targets[cCount] = roninGatewayV3Proxy; - calldatas[cCount++] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards))); + calldatas[cCount++] = + abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards))); targets[cCount] = roninGatewayV3Proxy; - calldatas[cCount++] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (mainchainTokensToSetMinThreshold, minThresholds))); + calldatas[cCount++] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (mainchainTokensToSetMinThreshold, minThresholds)) + ); } targets[cCount] = bridgeRewardProxy; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 007f2427..b97b0dc1 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; @@ -27,7 +27,7 @@ import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; import "./20240716-helper.s.sol"; import "./20240716-operators-key.s.sol"; import "./wbtc-threshold.s.sol"; -import "../Migration.s.sol"; +import { Migration } from "../Migration.s.sol"; contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey, Migration__MapToken_WBTC_Threshold { MainchainBridgeManager _currMainchainBridgeManager; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol index 7c841b7c..232c670c 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.19; import "./20240716-p2-upgrade-bridge-ronin-chain.s.sol"; import "./20240716-p3-upgrade-bridge-main-chain.s.sol"; +import { TNetwork } from "@fdk/types/TNetwork.sol"; contract Verify_Script_20240716 is Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain { function setUp() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 7ae4f5b0..97446bdc 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { BaseGeneralConfig } from "@fdk/BaseGeneralConfig.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { Contract } from "./utils/Contract.sol"; @@ -15,30 +15,9 @@ contract GeneralConfig is BaseGeneralConfig, Utils { constructor() BaseGeneralConfig("", "deployments/") { } function _setUpNetworks() internal virtual override { - setNetworkInfo( - Network.Sepolia.chainId(), - Network.Sepolia.key(), - Network.Sepolia.chainAlias(), - Network.Sepolia.deploymentDir(), - Network.Sepolia.envLabel(), - Network.Sepolia.explorer() - ); - setNetworkInfo( - Network.EthMainnet.chainId(), - Network.EthMainnet.key(), - Network.EthMainnet.chainAlias(), - Network.EthMainnet.deploymentDir(), - Network.EthMainnet.envLabel(), - Network.EthMainnet.explorer() - ); - setNetworkInfo( - Network.RoninDevnet.chainId(), - Network.RoninDevnet.key(), - Network.RoninDevnet.chainAlias(), - Network.RoninDevnet.deploymentDir(), - Network.RoninDevnet.envLabel(), - Network.RoninDevnet.explorer() - ); + setNetworkInfo(Network.Sepolia.data()); + setNetworkInfo(Network.EthMainnet.data()); + setNetworkInfo(Network.RoninDevnet.data()); } function getCompanionNetwork(TNetwork network) public view virtual returns (TNetwork companionNetwork) { @@ -46,7 +25,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { if (network == Network.EthMainnet.key()) return DefaultNetwork.RoninMainnet.key(); if (network == DefaultNetwork.RoninTestnet.key()) return Network.Sepolia.key(); if (network == Network.Sepolia.key()) return DefaultNetwork.RoninTestnet.key(); - if (network == DefaultNetwork.Local.key()) return DefaultNetwork.Local.key(); + if (network == DefaultNetwork.LocalHost.key()) return DefaultNetwork.LocalHost.key(); revert("Network: Unknown companion network"); } @@ -86,17 +65,17 @@ contract GeneralConfig is BaseGeneralConfig, Utils { _contractNameMap[Contract.RoninPauseEnforcer.key()] = "PauseEnforcer"; _contractNameMap[Contract.MainchainPauseEnforcer.key()] = "PauseEnforcer"; - _contractAddrMap[Network.Goerli.chainId()][Contract.WETH.name()] = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; - _contractAddrMap[Network.Sepolia.chainId()][Contract.WETH.name()] = 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9; - _contractAddrMap[Network.EthMainnet.chainId()][Contract.WETH.name()] = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; + _contractAddrMap[Network.Goerli.key()][Contract.WETH.name()] = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; + _contractAddrMap[Network.Sepolia.key()][Contract.WETH.name()] = 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9; + _contractAddrMap[Network.EthMainnet.key()][Contract.WETH.name()] = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; - _contractAddrMap[DefaultNetwork.RoninTestnet.chainId()][Contract.AXS.name()] = 0x0eD7e52944161450477ee417DE9Cd3a859b14fD0; + _contractAddrMap[DefaultNetwork.RoninTestnet.key()][Contract.AXS.name()] = 0x0eD7e52944161450477ee417DE9Cd3a859b14fD0; - _contractAddrMap[DefaultNetwork.RoninMainnet.chainId()][Contract.WETH.name()] = 0xc99a6A985eD2Cac1ef41640596C5A5f9F4E19Ef5; - _contractAddrMap[DefaultNetwork.RoninMainnet.chainId()][Contract.WRON.name()] = 0xe514d9DEB7966c8BE0ca922de8a064264eA6bcd4; + _contractAddrMap[DefaultNetwork.RoninMainnet.key()][Contract.WETH.name()] = 0xc99a6A985eD2Cac1ef41640596C5A5f9F4E19Ef5; + _contractAddrMap[DefaultNetwork.RoninMainnet.key()][Contract.WRON.name()] = 0xe514d9DEB7966c8BE0ca922de8a064264eA6bcd4; - _contractAddrMap[DefaultNetwork.RoninTestnet.chainId()][Contract.WETH.name()] = 0x29C6F8349A028E1bdfC68BFa08BDee7bC5D47E16; - _contractAddrMap[DefaultNetwork.RoninTestnet.chainId()][Contract.WRON.name()] = 0xA959726154953bAe111746E265E6d754F48570E6; + _contractAddrMap[DefaultNetwork.RoninTestnet.key()][Contract.WETH.name()] = 0x29C6F8349A028E1bdfC68BFa08BDee7bC5D47E16; + _contractAddrMap[DefaultNetwork.RoninTestnet.key()][Contract.WRON.name()] = 0xA959726154953bAe111746E265E6d754F48570E6; } function _mapContractName(Contract contractEnum) internal { @@ -105,7 +84,7 @@ contract GeneralConfig is BaseGeneralConfig, Utils { function getSender() public view virtual override returns (address payable sender) { sender = _option.trezor ? payable(_trezorSender) : payable(_envSender); - bool isLocalNetwork = getCurrentNetwork() == DefaultNetwork.Local.key(); + bool isLocalNetwork = getCurrentNetwork() == DefaultNetwork.LocalHost.key(); if (sender == address(0x0) && isLocalNetwork) sender = payable(DEFAULT_SENDER); require(sender != address(0x0), "GeneralConfig: Sender is address(0x0)"); diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 7f6e8d76..f93b0964 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.23; import { ProxyAdmin } from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import { LibString } from "solady/utils/LibString.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; @@ -20,6 +20,7 @@ import { TransparentUpgradeableProxy, TransparentUpgradeableProxyV2 } from "@ron import { LibArray } from "script/shared/libraries/LibArray.sol"; import { IPostCheck } from "./interfaces/IPostCheck.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { LibDeploy, DeployInfo, ProxyInterface, UpgradeInfo } from "@fdk/libraries/LibDeploy.sol"; contract Migration is BaseMigration, Utils { using LibProxy for *; @@ -105,7 +106,7 @@ contract Migration is BaseMigration, Utils { // Undefined } else if (network() == DefaultNetwork.RoninMainnet.key()) { // Undefined - } else if (network() == DefaultNetwork.Local.key()) { + } else if (network() == DefaultNetwork.LocalHost.key()) { // test param.test.numberOfBlocksInEpoch = 200; param.test.proxyAdmin = makeAddr("proxy-admin"); @@ -210,7 +211,7 @@ contract Migration is BaseMigration, Utils { function _getProxyAdmin() internal virtual override returns (address payable proxyAdmin) { TNetwork currentNetwork = network(); - console.log("[>] _getProxyAdmin", "Network name:".yellow(), currentNetwork.networkName()); + console.log("[>] _getProxyAdmin", "Network name:".yellow(), currentNetwork.chainAlias()); if ( currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == Network.RoninDevnet.key() @@ -222,7 +223,7 @@ contract Migration is BaseMigration, Utils { return loadContract(Contract.MainchainBridgeManager.key()); } - if (currentNetwork == DefaultNetwork.Local.key()) { + if (currentNetwork == DefaultNetwork.LocalHost.key()) { if (config.getLocalNetwork() == IGeneralConfigExtended.LocalNetwork.Ronin) { try config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()) returns (address payable res) { proxyAdmin = res; @@ -246,31 +247,39 @@ contract Migration is BaseMigration, Utils { return proxyAdmin; } - console.log("Network not supported".yellow(), currentNetwork.networkName()); + console.log("Network not supported".yellow(), currentNetwork.chainAlias()); console.log("Chain Id".yellow(), block.chainid); revert("BridgeMigration(_getProxyAdmin): Unhandled case"); } - function _upgradeRaw(address proxyAdmin, address payable proxy, address logic, bytes memory args) internal virtual override { + function upgradeCallback( + address proxy, + address logic, + uint256, /* callValue */ + bytes memory args, + ProxyInterface /* proxyInterface */ + ) public virtual override { if (!config.isPostChecking() && logic.codehash == payable(proxy).getProxyImplementation({ nullCheck: true }).codehash) { console.log("BaseMigration: Logic is already upgraded!".yellow()); return; } + address proxyAdmin = proxy.getProxyAdmin(); + assertTrue(proxyAdmin != address(0x0), "BridgeMigration: Invalid {proxyAdmin} or {proxy} is not a Proxy contract"); TNetwork currentNetwork = network(); if (proxyAdmin.code.length == 0) { // in case proxyAdmin is an eoa console.log(StdStyle.yellow("Upgrading with EOA wallet...")); - _prankOrBroadcast(address(proxyAdmin)); - if (args.length == 0) TransparentUpgradeableProxyV2(proxy).upgradeTo(logic); - else TransparentUpgradeableProxyV2(proxy).upgradeToAndCall(logic, args); + prankOrBroadcast(address(proxyAdmin)); + if (args.length == 0) TransparentUpgradeableProxyV2(payable(proxy)).upgradeTo(logic); + else TransparentUpgradeableProxyV2(payable(proxy)).upgradeToAndCall(logic, args); } // in case proxyAdmin is GovernanceAdmin else if ( currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == Network.RoninDevnet.key() - || currentNetwork == DefaultNetwork.Local.key() + || currentNetwork == DefaultNetwork.LocalHost.key() ) { // handle for ronin network console.log(StdStyle.yellow("Voting on RoninBridgeManager for upgrading...")); @@ -309,6 +318,44 @@ contract Migration is BaseMigration, Utils { logic = _deployLogic(contractType, EMPTY_ARGS); } + function _deployProxy( + TContract contractType, + address nominatedSender + ) internal virtual logFn(string.concat("_deployProxy ", TContract.unwrap(contractType).unpackOne())) returns (address payable deployed) { + string memory contractName = config.getContractName(contractType); + bytes memory callData = arguments(); + + address logic = _deployLogic(contractType); + string memory proxyAbsolutePath = "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2"; + uint256 proxyNonce; + address proxyAdmin = _getProxyAdmin(); + assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); + + deployed = LibDeploy.deployTransparentProxyV2({ + implInfo: DeployInfo({ + callValue: 0, + by: nominatedSender, + contractName: contractName, + absolutePath: vme.getContractAbsolutePath(contractType), + artifactName: contractName, + constructorArgs: "" + }), + callValue: 0, + proxyAdmin: _getProxyAdmin(), + callData: callData + }); + + // validate proxy admin + address actualProxyAdmin = deployed.getProxyAdmin(); + assertEq( + actualProxyAdmin, + proxyAdmin, + string.concat("BaseMigration: Invalid proxy admin\n", "Actual: ", vm.toString(actualProxyAdmin), "\nExpected: ", vm.toString(proxyAdmin)) + ); + + config.setAddress(network(), contractType, deployed); + } + function _deployProxy( TContract contractType, bytes memory args @@ -321,7 +368,19 @@ contract Migration is BaseMigration, Utils { address proxyAdmin = _getProxyAdmin(); assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); - (deployed, proxyNonce) = _deployRaw(proxyAbsolutePath, abi.encode(logic, proxyAdmin, args)); + deployed = LibDeploy.deployTransparentProxyV2({ + implInfo: DeployInfo({ + callValue: 0, + by: sender(), + contractName: contractName, + absolutePath: vme.getContractAbsolutePath(contractType), + artifactName: contractName, + constructorArgs: "" + }), + callValue: 0, + proxyAdmin: _getProxyAdmin(), + callData: args + }); // validate proxy admin address actualProxyAdmin = deployed.getProxyAdmin(); @@ -332,7 +391,6 @@ contract Migration is BaseMigration, Utils { ); config.setAddress(network(), contractType, deployed); - ARTIFACT_FACTORY.generateArtifact(sender(), deployed, proxyAbsolutePath, string.concat(contractName, "Proxy"), args, proxyNonce); } function _getProxyAdminFromCurrentNetwork() internal view virtual returns (address proxyAdmin) { diff --git a/script/PostChecker.sol b/script/PostChecker.sol index eba216dc..d4d62464 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -10,6 +10,7 @@ import { PostCheck_BridgeManager } from "./post-check/bridge-manager/PostCheck_B import { PostCheck_Gateway } from "./post-check/gateway/PostCheck_Gateway.s.sol"; import { Migration } from "./Migration.s.sol"; import { ScriptExtended } from "@fdk/extensions/ScriptExtended.s.sol"; +import { ProxyInterface } from "@fdk/libraries/LibDeploy.sol"; contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { using LibCompanionNetwork for *; @@ -28,8 +29,14 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { return super._deployLogic(contractType); } - function _upgradeRaw(address proxyAdmin, address payable proxy, address logic, bytes memory args) internal virtual override(BaseMigration, Migration) { - super._upgradeRaw(proxyAdmin, proxy, logic, args); + function upgradeCallback( + address proxy, + address logic, + uint256 callValue, + bytes memory callData, + ProxyInterface proxyInterface + ) public virtual override(BaseMigration, Migration) { + super.upgradeCallback(proxy, logic, callValue, callData, proxyInterface); } function _postCheck() internal virtual override(ScriptExtended, Migration) { @@ -48,7 +55,7 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { TNetwork currentNetwork = network(); if ( currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() - || currentNetwork == DefaultNetwork.Local.key() + || currentNetwork == DefaultNetwork.LocalHost.key() ) { bridgeSlash = loadContract(Contract.BridgeSlash.key()); bridgeReward = loadContract(Contract.BridgeReward.key()); @@ -67,7 +74,7 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { vm.makePersistent(mainchainGateway); vm.makePersistent(mainchainBridgeManager); } else { - revert(string.concat("Unsupported network: ", currentNetwork.networkName())); + revert(string.concat("Unsupported network: ", currentNetwork.chainAlias())); } } } diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index cae1bac1..42df7253 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import { RoninBridgeManagerConstructor } from "@ronin/contracts/ronin/gateway/RoninBridgeManagerConstructor.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; @@ -11,6 +11,7 @@ import { Migration } from "../Migration.s.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { RoninGatewayV3Deploy } from "./RoninGatewayV3Deploy.s.sol"; import { BridgeSlashDeploy } from "./BridgeSlashDeploy.s.sol"; +import { LibDeploy, DeployInfo, ProxyInterface, UpgradeInfo } from "@fdk/libraries/LibDeploy.sol"; contract RoninBridgeManagerDeploy is Migration { using LibProxy for *; @@ -39,9 +40,19 @@ contract RoninBridgeManagerDeploy is Migration { address payable instance = _deployProxy(Contract.RoninBridgeManagerConstructor.key(), sender()); address logic = _deployLogic(Contract.RoninBridgeManager.key()); address proxyAdmin = instance.getProxyAdmin(); - console2.log("Proxy admin ", proxyAdmin); - console2.log("Sender: ", sender()); - _upgradeRaw(proxyAdmin, instance, logic, EMPTY_ARGS); + console.log("Proxy admin ", proxyAdmin); + console.log("Sender: ", sender()); + + UpgradeInfo({ + proxy: instance, + logic: logic, + callValue: 0, + callData: EMPTY_ARGS, + proxyInterface: ProxyInterface.Transparent, + shouldPrompt: false, + upgradeCallback: this.upgradeCallback, + shouldUseCallback: true + }).upgrade(); // if (proxyAdmin != instance) { // vm.broadcast(proxyAdmin); diff --git a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol index ad534228..b8e11a0a 100644 --- a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol +++ b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol @@ -36,7 +36,7 @@ contract Deploy_v0_3_1 is Migration { config.switchTo(currentNetwork); new Migration_02_Deploy_MainchainBridge().run(); - } else if (currentNetwork == DefaultNetwork.Local.key()) { + } else if (currentNetwork == DefaultNetwork.LocalHost.key()) { new Migration_01_Deploy_RoninBridge().run(); new Migration_02_Deploy_MainchainBridge().run(); } else { diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index fa0f4d7e..b25699de 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index 6fb30cd8..ae55d3df 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; diff --git a/script/post-check/BasePostCheck.s.sol b/script/post-check/BasePostCheck.s.sol index c1a7043b..5e7da60d 100644 --- a/script/post-check/BasePostCheck.s.sol +++ b/script/post-check/BasePostCheck.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { Vm } from "forge-std/Vm.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { TNetwork, Network } from "script/utils/Network.sol"; @@ -43,7 +43,7 @@ abstract contract BasePostCheck is BaseMigration { modifier onlyOnRoninNetworkOrLocal() { require( block.chainid == DefaultNetwork.RoninMainnet.chainId() || block.chainid == DefaultNetwork.RoninTestnet.chainId() - || block.chainid == Network.RoninDevnet.chainId() || block.chainid == DefaultNetwork.Local.chainId(), + || block.chainid == Network.RoninDevnet.chainId() || block.chainid == DefaultNetwork.LocalHost.chainId(), "chainid != RoninMainnet or RoninTestnet" ); _; diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index 2f0b0ad3..456a905d 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.0; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { Vm } from "forge-std/Vm.sol"; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { IGeneralConfigExtended } from "script/interfaces/IGeneralConfigExtended.sol"; import { TNetwork, Network } from "script/utils/Network.sol"; import { Contract } from "script/utils/Contract.sol"; @@ -19,7 +19,7 @@ import { CoreGovernance } from "@ronin/contracts/extensions/sequential-governanc import { LibArray } from "./LibArray.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { LibCompanionNetwork } from "./LibCompanionNetwork.sol"; -import { LibErrorHandler } from "lib/foundry-deployment-kit/lib/contract-libs/src/LibErrorHandler.sol"; +import { LibErrorHandler } from "lib/foundry-deployment-kit/script/libraries/LibErrorHandler.sol"; import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; library LibProposal { diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index 912b0945..82574e57 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -1,7 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { LibString, TContract } from "@fdk/types/Types.sol"; +import { TContract } from "@fdk/types/Types.sol"; +import { LibString } from "solady/utils/LibString.sol"; enum Contract { WETH, diff --git a/script/utils/Network.sol b/script/utils/Network.sol index 6084c371..3eebb798 100644 --- a/script/utils/Network.sol +++ b/script/utils/Network.sol @@ -1,7 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { LibString, TNetwork } from "@fdk/types/Types.sol"; +import { TNetwork } from "@fdk/types/Types.sol"; +import { LibString } from "solady/utils/LibString.sol"; +import { INetworkConfig } from "@fdk/interfaces/configs/INetworkConfig.sol"; enum Network { Goerli, @@ -10,7 +12,17 @@ enum Network { RoninDevnet } -using { key, name, chainId, chainAlias, envLabel, deploymentDir, explorer } for Network global; +using { key, chainId, chainAlias, explorer, data } for Network global; + +function data(Network network) pure returns (INetworkConfig.NetworkData memory) { + return INetworkConfig.NetworkData({ + network: key(network), + chainAlias: chainAlias(network), + blockTime: blockTime(network), + explorer: explorer(network), + chainId: chainId(network) + }); +} function chainId(Network network) pure returns (uint256) { if (network == Network.Goerli) return 5; @@ -25,6 +37,12 @@ function key(Network network) pure returns (TNetwork) { return TNetwork.wrap(LibString.packOne(name(network))); } +function blockTime(Network network) pure returns (uint256) { + if (network == Network.Goerli) return 15; + if (network == Network.Sepolia) return 15; + if (network == Network.EthMainnet) return 3; +} + function explorer(Network network) pure returns (string memory link) { if (network == Network.Goerli) return "https://goerli.etherscan.io/"; if (network == Network.Sepolia) return "https://sepolia.etherscan.io/"; From 5a70a5a8c0a5079b7b070a0322396259aa60e843 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 26 Jul 2024 16:04:12 +0700 Subject: [PATCH 240/305] script: fix --- ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 27 ++++++++++--------- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 15 ----------- script/GeneralConfig.sol | 2 ++ 3 files changed, 17 insertions(+), 27 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index 5209b62d..f9571f24 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -35,6 +35,7 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__MapToken_WBTC_Threshold { ISharedArgument.SharedParameter _param; + LegacyProposalDetail _proposal; function setUp() public virtual override { super.setUp(); @@ -66,7 +67,6 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is address bridgeRewardProxy = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); address bridgeSlashProxy = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); address bridgeTrackingProxy = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - // address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); ISharedArgument.SharedParameter memory param; @@ -162,16 +162,19 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is gasAmounts[i] = 1_000_000; } - LegacyProposalDetail memory proposal; - proposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; - proposal.chainId = block.chainid; - proposal.expiryTimestamp = block.timestamp + 14 days; - proposal.targets = targets; - proposal.values = values; - proposal.calldatas = calldatas; - proposal.gasAmounts = gasAmounts; - - _helperProposeForCurrentNetwork(proposal); - _helperVoteForCurrentNetwork(proposal); + _proposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; + _proposal.chainId = block.chainid; + _proposal.expiryTimestamp = block.timestamp + 14 days; + _proposal.targets = targets; + _proposal.values = values; + _proposal.calldatas = calldatas; + _proposal.gasAmounts = gasAmounts; + + _helperProposeForCurrentNetwork(_proposal); + } + + function _postCheck() internal virtual override { + _helperVoteForCurrentNetwork(_proposal); + super._postCheck(); } } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index b97b0dc1..aa41107d 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -199,21 +199,6 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ proposal.gasAmounts = gasAmounts; _simulateProposal(proposal); - - // uint V = _voters.length + 1; - // Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](V); - // for (uint i; i < V; ++i) { - // supports_[i] = Ballot.VoteType.For; - // } - - // SignatureConsumer.Signature[] memory signatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), _loadGovernorPKs(), Ballot.VoteType.For); - - // vm.broadcast(_governor); - // address(_currMainchainBridgeManager).call{ gas: (proposal.targets.length + 1) * 1_000_000 }( - // abi.encodeWithSignature( - // "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, supports_, signatures - // ) - // ); } function getDomain() public pure returns (bytes32) { diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 97446bdc..04def745 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -39,6 +39,8 @@ contract GeneralConfig is BaseGeneralConfig, Utils { } function _setUpContracts() internal virtual override { + setContractAbsolutePathMap(Contract.PostChecker.key(), "out/PostChecker.sol/PostChecker.json"); + // map contract name _mapContractName(Contract.BridgeSlash); _mapContractName(Contract.MockERC721); From 0d6c751db6e80edd33f334ec1bb1fbfed1b441c9 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 26 Jul 2024 17:41:45 +0700 Subject: [PATCH 241/305] script: fix mainchain script --- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index aa41107d..32353fe4 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -30,9 +31,13 @@ import "./wbtc-threshold.s.sol"; import { Migration } from "../Migration.s.sol"; contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey, Migration__MapToken_WBTC_Threshold { + RoninBridgeManager _currRoninBridgeManager; MainchainBridgeManager _currMainchainBridgeManager; MainchainBridgeManager _newMainchainBridgeManager; + TNetwork _currentNetwork; + TNetwork _companionNetwork; + address private _governor; function setUp() public virtual override { @@ -40,27 +45,26 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function run() public virtual onlyOn(Network.EthMainnet.key()) { - // CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); + _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + // _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); - _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + _currentNetwork = network(); + _companionNetwork = config.getCompanionNetwork(_currentNetwork); + config.createFork(_companionNetwork); + config.switchTo(_companionNetwork); + { + address companionManager = config.getAddress(_currentNetwork, Contract.MainchainBridgeManager.key()); + _currMainchainBridgeManager = MainchainBridgeManager(companionManager); + // LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + } + config.switchTo(_currentNetwork); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; - // _changeTempAdmin(); _deployMainchainBridgeManager(); _upgradeBridgeMainchain(); } - // function _changeTempAdmin() internal { - // address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - // address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - - // vm.startBroadcast(TESTNET_ADMIN); - // address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); - // address(mainchainGatewayV3Proxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); - // vm.stopBroadcast(); - // } - function _deployMainchainBridgeManager() internal returns (address mainchainBM) { ISharedArgument.SharedParameter memory param; @@ -190,14 +194,28 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } LegacyProposalDetail memory proposal; - proposal.nonce = _currMainchainBridgeManager.round(block.chainid) + 1; - proposal.chainId = block.chainid; + + proposal.nonce = _currMainchainBridgeManager.round(Network.EthMainnet.chainId()) + 1; + proposal.chainId = Network.EthMainnet.chainId(); proposal.expiryTimestamp = expiredTime; proposal.targets = targets; proposal.values = values; proposal.calldatas = calldatas; proposal.gasAmounts = gasAmounts; + vm.broadcast(_governor); + address(_currRoninBridgeManager).call( + abi.encodeWithSignature( + "propose(uint256,uint256,address[],uint256,bytes[],uint256[])", + proposal.chainId, + proposal.expiryTimestamp, + proposal.targets, + proposal.values, + proposal.calldatas, + proposal.gasAmounts + ) + ); + _simulateProposal(proposal); } @@ -266,6 +284,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _simulateProposal(LegacyProposalDetail memory proposal) internal { + config.switchTo(_companionNetwork); + Ballot.VoteType[] memory cheatingSupports = new Ballot.VoteType[](1); uint256[] memory cheatingPks = new uint256[](1); (address cheatingGov, uint256 cheatingGovPk) = makeAddrAndKey("Governor"); From f136eb601f5d3de992c8eed905fbecc8b583b378 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 26 Jul 2024 18:32:31 +0700 Subject: [PATCH 242/305] script: update mainchain script --- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 17 +++++---- .../verify-script.s.sol | 38 +++++++++---------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 32353fe4..a184b035 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -24,6 +24,8 @@ import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; +import { TNetwork } from "@fdk/types/TNetwork.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import "./20240716-helper.s.sol"; import "./20240716-operators-key.s.sol"; @@ -31,7 +33,7 @@ import "./wbtc-threshold.s.sol"; import { Migration } from "../Migration.s.sol"; contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey, Migration__MapToken_WBTC_Threshold { - RoninBridgeManager _currRoninBridgeManager; + RoninBridgeManager _roninBridgeManager; MainchainBridgeManager _currMainchainBridgeManager; MainchainBridgeManager _newMainchainBridgeManager; @@ -44,8 +46,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ super.setUp(); } - function run() public virtual onlyOn(Network.EthMainnet.key()) { - _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { + _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); // _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); _currentNetwork = network(); @@ -53,9 +55,10 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ config.createFork(_companionNetwork); config.switchTo(_companionNetwork); { - address companionManager = config.getAddress(_currentNetwork, Contract.MainchainBridgeManager.key()); - _currMainchainBridgeManager = MainchainBridgeManager(companionManager); - // LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); + // address companionManager = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + + _currMainchainBridgeManager = MainchainBridgeManager(0xa71456fA88a5f6a4696D0446E690Db4a5913fab0); + // _currMainchainBridgeManager = MainchainBridgeManager(companionManager); // TODO: resolve later } config.switchTo(_currentNetwork); @@ -204,7 +207,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ proposal.gasAmounts = gasAmounts; vm.broadcast(_governor); - address(_currRoninBridgeManager).call( + address(_roninBridgeManager).call( abi.encodeWithSignature( "propose(uint256,uint256,address[],uint256,bytes[],uint256[])", proposal.chainId, diff --git a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol index 232c670c..4dc20af2 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol @@ -1,24 +1,24 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +// // SPDX-License-Identifier: MIT +// pragma solidity ^0.8.19; -import "./20240716-p2-upgrade-bridge-ronin-chain.s.sol"; -import "./20240716-p3-upgrade-bridge-main-chain.s.sol"; -import { TNetwork } from "@fdk/types/TNetwork.sol"; +// import "./20240716-p2-upgrade-bridge-ronin-chain.s.sol"; +// import "./20240716-p3-upgrade-bridge-main-chain.s.sol"; +// import { TNetwork } from "@fdk/types/TNetwork.sol"; -contract Verify_Script_20240716 is Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain { - function setUp() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { - Migration__20240716_P2_UpgradeBridgeRoninchain.setUp(); - } +// contract Verify_Script_20240716 is Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain { +// function setUp() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { +// Migration__20240716_P2_UpgradeBridgeRoninchain.setUp(); +// } - function run() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { - TNetwork currentNetwork = network(); - TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); - // Migration__20240716_P2_UpgradeBridgeRoninchain.run(); +// function run() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { +// TNetwork currentNetwork = network(); +// TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); +// // Migration__20240716_P2_UpgradeBridgeRoninchain.run(); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); - Migration__20240716_P3_UpgradeBridgeMainchain.run(); +// CONFIG.createFork(companionNetwork); +// CONFIG.switchTo(companionNetwork); +// Migration__20240716_P3_UpgradeBridgeMainchain.run(); - CONFIG.switchTo(currentNetwork); - } -} +// CONFIG.switchTo(currentNetwork); +// } +// } From 6389e7fdb4fbad3a7b3d189c7460a3bdd13a45d9 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Sun, 28 Jul 2024 01:34:17 +0700 Subject: [PATCH 243/305] script: fix network key calculation --- script/utils/Network.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/utils/Network.sol b/script/utils/Network.sol index 3eebb798..5f1e450c 100644 --- a/script/utils/Network.sol +++ b/script/utils/Network.sol @@ -34,7 +34,7 @@ function chainId(Network network) pure returns (uint256) { } function key(Network network) pure returns (TNetwork) { - return TNetwork.wrap(LibString.packOne(name(network))); + return TNetwork.wrap(LibString.packOne(chainAlias(network))); } function blockTime(Network network) pure returns (uint256) { From d28ee34374a18e825afa83c6f4fdf6b2154be48b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 29 Jul 2024 10:02:53 +0700 Subject: [PATCH 244/305] script: forge fmt --- .../20240606-deploy-batcher-sepolia.s.sol | 5 ++-- .../20240612-deploy-MockERC1155-testnet.sol | 2 +- .../20240612-maptoken-nft-sepolia.s.sol | 2 +- .../20240613-maptoken-erc1155-ronin.s.sol | 23 +++++++++++-------- .../20240613-maptoken-erc1155-sepolia.s.sol | 2 +- ...0240619-p3-upgrade-bridge-main-chain.s.sol | 2 +- ...0240716-deploy-bridge-manager-helper.s.sol | 5 ++-- .../20240716-deploy-wbtc-helper.s.sol | 2 +- .../20240716-p1-2-deploy-wbtc.s.sol | 2 +- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 17 ++++++++++---- .../wbtc-threshold.s.sol | 2 +- script/interfaces/ISharedArgument.sol | 9 ++++---- .../PostCheck_BridgeManager_Proposal.s.sol | 2 +- 13 files changed, 43 insertions(+), 32 deletions(-) diff --git a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol index e2b909ab..017f6fd6 100644 --- a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol +++ b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol @@ -59,9 +59,8 @@ contract Migration__20240606_DeployBatcherSepolia is Migration { _currMainchainBridge = MainchainGatewayV3(config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key())); // vm.stopBroadcast(); // vm.startBroadcast(TESTNET_ADMIN); - _mainchainGatewayBatcher = new MainchainGatewayBatcherDeploy().runWithArgs( - abi.encodeWithSelector(MainchainGatewayBatcher.initialize.selector, address(_currMainchainBridge)) - ); + _mainchainGatewayBatcher = + new MainchainGatewayBatcherDeploy().runWithArgs(abi.encodeWithSelector(MainchainGatewayBatcher.initialize.selector, address(_currMainchainBridge))); // vm.stopBroadcast(); } diff --git a/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol b/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol index 7bebae4c..f1154379 100644 --- a/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol +++ b/script/20240612-deploy-mockErc1155-testnet/20240612-deploy-MockERC1155-testnet.sol @@ -42,4 +42,4 @@ contract Migration__Deploy_RoninMockERC1155_Testnet is Migration { vm.stopBroadcast(); } -} \ No newline at end of file +} diff --git a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol index 5c7068c0..2b94701e 100644 --- a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol @@ -113,6 +113,6 @@ contract Migration__20240612_MapNTFSepoliaMainchain is Migration { vm.broadcast(governors[0]); // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{gas: 2_000_000}(proposal, supports_, signatures); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); } } diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol index 50b3ba4c..f98a34fd 100644 --- a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol @@ -85,16 +85,19 @@ contract Migration__20240613_MapERC1155SepoliaRoninchain is Migration { uint nonce = 1; for (uint i = 1; i <= 2; ++i) { vm.broadcast(governors[i]); - _roninBridgeManager.castProposalVoteForCurrentNetwork(Proposal.ProposalDetail({ - nonce: nonce, - chainId: 2021, - expiryTimestamp: expiredTime, - executor: address(0), - targets: targets, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts - }), Ballot.VoteType.For); + _roninBridgeManager.castProposalVoteForCurrentNetwork( + Proposal.ProposalDetail({ + nonce: nonce, + chainId: 2021, + expiryTimestamp: expiredTime, + executor: address(0), + targets: targets, + values: values, + calldatas: calldatas, + gasAmounts: gasAmounts + }), + Ballot.VoteType.For + ); } } } diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol index 6c643122..40caabf4 100644 --- a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol @@ -113,6 +113,6 @@ contract Migration__20240613_MapERC1155SepoliaMainchain is Migration { vm.broadcast(governors[0]); // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{gas: 2_000_000}(proposal, supports_, signatures); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); } } diff --git a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol index 5cbeb82b..b04fddb7 100644 --- a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol @@ -104,6 +104,6 @@ contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__ vm.broadcast(governors[0]); // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{gas: 2_000_000}(proposal, supports_, signatures); + MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); } } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index 41d86bda..56e56136 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -32,12 +32,13 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio function _deployRoninBridgeManager() internal returns (RoninBridgeManager) { address currRoninBridgeManager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); - console.log("Current Ronin Bridge Manager:", currRoninBridgeManager); + console.log("Current Ronin Bridge Manager:", currRoninBridgeManager); ISharedArgument.SharedParameter memory param; { - (address[] memory currGovernors, address[] memory currOperators, uint96[] memory currWeights) = RoninBridgeManager(currRoninBridgeManager).getFullBridgeOperatorInfos(); + (address[] memory currGovernors, address[] memory currOperators, uint96[] memory currWeights) = + RoninBridgeManager(currRoninBridgeManager).getFullBridgeOperatorInfos(); param.roninBridgeManager.num = 7; param.roninBridgeManager.denom = 10; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol index 15b4b784..30dca7b3 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-wbtc-helper.s.sol @@ -12,4 +12,4 @@ abstract contract Migration__20240716_DeployWBTC_Helper is Migration { WBTC instance = WBTC(_deployImmutable(Contract.WBTC.key())); console.log("WBTC deployed at:", address(instance)); } -} \ No newline at end of file +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol index a4e8d140..4f6baf13 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol @@ -17,4 +17,4 @@ contract Migration__20240716_P1_1_DeployWBTC is Migration__20240716_DeployWBTC_H function run() public returns (WBTC instance) { _deployWBTC(); } -} \ No newline at end of file +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index a184b035..878791b4 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -69,6 +69,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _deployMainchainBridgeManager() internal returns (address mainchainBM) { + config.switchTo(_companionNetwork); + ISharedArgument.SharedParameter memory param; { @@ -122,6 +124,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); vm.broadcast(proxyAdmin); TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); + + config.switchTo(_currentNetwork); } function _upgradeBridgeMainchain() internal { @@ -152,7 +156,6 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ targets[4] = address(_newMainchainBridgeManager); targets[5] = address(_newMainchainBridgeManager); - // Mapping WBTC calldata { address[] memory mainchainTokens = new address[](1); @@ -176,7 +179,9 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ thresholds[3] = new uint256[](1); thresholds[3][0] = _wbtcDailyWithdrawalLimit; - calldatas[0] = abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds))); + calldatas[0] = abi.encodeWithSignature( + "functionDelegateCall(bytes)", abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)) + ); } calldatas[1] = abi.encodeWithSignature( @@ -295,7 +300,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ cheatingSupports[0] = Ballot.VoteType.For; cheatingPks[0] = cheatingGovPk; - SignatureConsumer.Signature[] memory cheatingSignatures = _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), cheatingPks, Ballot.VoteType.For); + SignatureConsumer.Signature[] memory cheatingSignatures = + _generateSignaturesFor(getDomain(), hashLegacyProposal(proposal), cheatingPks, Ballot.VoteType.For); uint256 totalGas = 1_000_000; for (uint256 i; i < proposal.gasAmounts.length; ++i) { @@ -307,7 +313,10 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ vm.prank(cheatingGov); address(_currMainchainBridgeManager).call{ gas: totalGas }( abi.encodeWithSignature( - "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", proposal, cheatingSupports, cheatingSignatures + "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", + proposal, + cheatingSupports, + cheatingSignatures ) ); } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol index 04ea7ae7..9adcaa0b 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol @@ -13,4 +13,4 @@ contract Migration__MapToken_WBTC_Threshold { // The MAX_PERCENTAGE is 100_0000 uint256 _wbtcUnlockFeePercentages = 10; // 0.001%. Max percentage is 1e6 so 10 is 0.001% (`10 / 1e6 = 0.001 * 100`) -} \ No newline at end of file +} diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index 2e053ccf..a2864b31 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -108,11 +108,11 @@ interface ISharedArgument is IGeneralConfigExtended { string uri; } - struct RoninMockERC1155Param { + struct RoninMockERC1155Param { address defaultAdmin; - string uri; - string name; - string symbol; + string uri; + string name; + string symbol; } struct UnitTestParam { @@ -143,7 +143,6 @@ interface ISharedArgument is IGeneralConfigExtended { BridgeRewardParam bridgeReward; // tokens WBTCParam wbtc; - // mock tokens MockWrappedTokenParam weth; MockWrappedTokenParam wron; diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index f9082dfb..0bff45bb 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -194,7 +194,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { calldatas: abi.encodeCall( TransparentUpgradeableProxyV2.functionDelegateCall, (abi.encodeCall(IBridgeManager.addBridgeOperators, (_voteWeights, _addingGovernors, _addingOperators))) - ).toSingletonArray(), + ).toSingletonArray(), gasAmounts: uint256(1_000_000).toSingletonArray(), nonce: manager.round(0) + 1 }); From 82a0741bae8b3efda75ab81079aabfda365f33ea Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 29 Jul 2024 11:08:02 +0700 Subject: [PATCH 245/305] script: fix proxy admin of new bridge manager --- .../20240716-deploy-bridge-manager-helper.s.sol | 4 +++- .../20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol | 5 ++++- .../20240716-p2-upgrade-bridge-ronin-chain.s.sol | 5 ++++- .../20240716-p3-upgrade-bridge-main-chain.s.sol | 7 ++++--- script/contracts/RoninBridgeManagerDeploy.s.sol | 4 ++++ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index 56e56136..1443c826 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -95,7 +95,9 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newRoninBridgeManager))); vm.broadcast(proxyAdmin); - TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(currRoninBridgeManager)); + + // // transfer admin to self + // TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_newRoninBridgeManager)); return _newRoninBridgeManager; } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol index 80a19af7..a72b1d6d 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import { console } from "forge-std/console.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { Migration } from "../Migration.s.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; @@ -22,7 +23,8 @@ contract Migration__20240716_Helper is Migration { RoninBridgeManager internal _currRoninBridgeManager; function _helperProposeForCurrentNetwork(LegacyProposalDetail memory proposal) internal { - vm.broadcast(_proposer); + console.log("Real start broadcast to propose proposal:", _proposer); + vm.startBroadcast(_proposer); address(_currRoninBridgeManager).call( abi.encodeWithSignature( "proposeProposalForCurrentNetwork(uint256,address[],uint256[],bytes[],uint256[],uint8)", @@ -34,6 +36,7 @@ contract Migration__20240716_Helper is Migration { Ballot.VoteType.For ) ); + vm.stopBroadcast(); } function _helperVoteForCurrentNetwork(LegacyProposalDetail memory proposal) internal { diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index f9571f24..72a97560 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -34,6 +34,8 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is Migration__20240716_DeployRoninBridgeManagerHelper, Migration__MapToken_WBTC_Threshold { + using StdStyle for *; + ISharedArgument.SharedParameter _param; LegacyProposalDetail _proposal; @@ -45,7 +47,7 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _newRoninBridgeManager = _deployRoninBridgeManager(); - _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; + _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor (address[] memory currGovernors,,) = _currRoninBridgeManager.getFullBridgeOperatorInfos(); for (uint i = 0; i < currGovernors.length; i++) { @@ -174,6 +176,7 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is } function _postCheck() internal virtual override { + console.log("Starting post-check".bold().cyan()); _helperVoteForCurrentNetwork(_proposal); super._postCheck(); } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 878791b4..9dff52c2 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -129,13 +129,12 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _upgradeBridgeMainchain() internal { + config.switchTo(_companionNetwork); + address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); - address pauseEnforcerLogic = _deployLogic(Contract.MainchainPauseEnforcer.key()); address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); - - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); ISharedArgument.SharedParameter memory param; @@ -211,6 +210,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ proposal.calldatas = calldatas; proposal.gasAmounts = gasAmounts; + config.switchTo(_currentNetwork); + vm.broadcast(_governor); address(_roninBridgeManager).call( abi.encodeWithSignature( diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index 42df7253..53215108 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -36,6 +36,10 @@ contract RoninBridgeManagerDeploy is Migration { ); } + function _getProxyAdmin() internal virtual override returns(address payable) { + return sender(); + } + function run() public virtual returns (RoninBridgeManager) { address payable instance = _deployProxy(Contract.RoninBridgeManagerConstructor.key(), sender()); address logic = _deployLogic(Contract.RoninBridgeManager.key()); From 812c0551e27de7377f4af641c8a66bfb6fe97c47 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 29 Jul 2024 13:43:14 +0700 Subject: [PATCH 246/305] script: utilize soldeer and fix switch network bug --- .gitignore | 4 ++- .gitmodules | 9 ------- foundry.toml | 3 +++ lib/forge-std | 1 - lib/foundry-deployment-kit | 1 - lib/solady | 1 - remappings.txt | 7 +++--- run.sh | 2 +- .../20240206-maptoken-banana-roninchain.s.sol | 5 ++-- .../verify-script.s.sol | 5 ++-- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 18 ++++++------- .../verify-script.s.sol | 5 ++-- script/PostChecker.sol | 3 ++- script/deploy-v0.3.1/Deploy.v0.3.1.s.sol | 10 +++----- .../PostCheck_BridgeManager_Proposal.s.sol | 15 +++++------ .../PostCheck_BridgeManager_Quorum.s.sol | 5 ++-- ...PostCheck_Gateway_DepositAndWithdraw.s.sol | 25 ++++++++----------- .../shared/libraries/LibCompanionNetwork.sol | 9 +++---- script/shared/libraries/LibProposal.sol | 7 ++++-- soldeer.lock | 6 +++++ 20 files changed, 64 insertions(+), 77 deletions(-) delete mode 160000 lib/forge-std delete mode 160000 lib/foundry-deployment-kit delete mode 160000 lib/solady create mode 100644 soldeer.lock diff --git a/.gitignore b/.gitignore index 7ae63ad1..b5e3de51 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,6 @@ out .DS_Store dry-run/ -**-operators-key.s.sol \ No newline at end of file +**-operators-key.s.sol +dependencies +deployments/**/exported_address \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 8deb9b9e..26fd7bb9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "lib/forge-std"] - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std [submodule "lib/prb-test"] branch = release-v0 path = lib/prb-test @@ -9,12 +6,6 @@ path = lib/prb-math url = https://github.com/PaulRBerg/prb-math branch = release-v4 -[submodule "lib/solady"] - path = lib/solady - url = https://github.com/vectorized/solady [submodule "lib/openzeppelin-contracts"] path = lib/openzeppelin-contracts url = https://github.com/openzeppelin/openzeppelin-contracts -[submodule "lib/foundry-deployment-kit"] - path = lib/foundry-deployment-kit - url = https://github.com/axieinfinity/foundry-deployment-kit diff --git a/foundry.toml b/foundry.toml index 12025047..78381f48 100644 --- a/foundry.toml +++ b/foundry.toml @@ -66,3 +66,6 @@ sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}" goerli = "https://ethereum-goerli.publicnode.com" ronin-mainnet = "https://api-partner.roninchain.com/rpc" ronin-testnet = "https://saigon-archive.roninchain.com/rpc" + +[dependencies] +"@fdk" = { version = "0.3.1-beta", url = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.1-beta.zip" } diff --git a/lib/forge-std b/lib/forge-std deleted file mode 160000 index e4aef94c..00000000 --- a/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e4aef94c1768803a16fe19f7ce8b65defd027cfd diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit deleted file mode 160000 index ff4e5f12..00000000 --- a/lib/foundry-deployment-kit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ff4e5f126c1979ad47aa74dd4c1833fca13ab05f diff --git a/lib/solady b/lib/solady deleted file mode 160000 index d6b02fd7..00000000 --- a/lib/solady +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d6b02fd7dcbaebc6c32004c1fbe0c2c91dddfa82 diff --git a/remappings.txt b/remappings.txt index b8999650..5e5848a1 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,5 +1,4 @@ -ds-test/=lib/forge-std/lib/ds-test/src/ -forge-std/=lib/foundry-deployment-kit/dependencies/forge-std-1.8.2/src/ +forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/ @openzeppelin/=lib/openzeppelin-contracts/ hardhat/=node_modules/hardhat/ @ronin/contracts/=src/ @@ -7,5 +6,5 @@ hardhat/=node_modules/hardhat/ @ronin/script=script/ @prb/test/=lib/prb-test/src/ @prb/math/=lib/prb-math/ -solady/=lib/foundry-deployment-kit/dependencies/solady-0.0.206/src/ -@fdk/=lib/foundry-deployment-kit/script/ +solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/ +@fdk=dependencies/@fdk-0.3.1-beta/script/ \ No newline at end of file diff --git a/run.sh b/run.sh index 931b150b..85db82ff 100755 --- a/run.sh +++ b/run.sh @@ -1 +1 @@ -source lib/foundry-deployment-kit/run.sh \ No newline at end of file +source dependencies/@fdk-0.3.1-beta/run.sh \ No newline at end of file diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index 7852c290..f2059802 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -155,13 +155,12 @@ contract Migration__20240206_MapTokenBananaRoninChain is TNetwork currentNetwork = network(); TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); - config.createFork(companionNetwork); - config.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); { address companionManager = config.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); LibProposal.verifyProposalGasAmount(companionManager, targets, values, calldatas, gasAmounts); } - config.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); console.log("Nonce:", vm.getNonce(_governor)); vm.broadcast(_governor); diff --git a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol index f00308ee..a251561f 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/verify-script.s.sol @@ -15,10 +15,9 @@ contract Verify_Script_20240411 is Migration__20240409_P2_UpgradeBridgeRoninchai TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); // Migration__20240409_P2_UpgradeBridgeRoninchain.run(); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); Migration__20240409_P3_UpgradeBridgeMainchain.run(); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 9dff52c2..ff4cd9de 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -52,15 +52,15 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ _currentNetwork = network(); _companionNetwork = config.getCompanionNetwork(_currentNetwork); - config.createFork(_companionNetwork); - config.switchTo(_companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); { // address companionManager = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); _currMainchainBridgeManager = MainchainBridgeManager(0xa71456fA88a5f6a4696D0446E690Db4a5913fab0); // _currMainchainBridgeManager = MainchainBridgeManager(companionManager); // TODO: resolve later } - config.switchTo(_currentNetwork); + console.log("Switch back"); + switchBack(prevNetwork, prevForkId); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; @@ -69,7 +69,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _deployMainchainBridgeManager() internal returns (address mainchainBM) { - config.switchTo(_companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); ISharedArgument.SharedParameter memory param; @@ -125,11 +125,11 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ vm.broadcast(proxyAdmin); TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); - config.switchTo(_currentNetwork); + switchBack(prevNetwork, prevForkId); } function _upgradeBridgeMainchain() internal { - config.switchTo(_companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); @@ -210,7 +210,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ proposal.calldatas = calldatas; proposal.gasAmounts = gasAmounts; - config.switchTo(_currentNetwork); + switchBack(prevNetwork, prevForkId); vm.broadcast(_governor); address(_roninBridgeManager).call( @@ -244,7 +244,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ bytes32 proposalHash, uint256[] memory signerPKs, Ballot.VoteType support - ) public view returns (SignatureConsumer.Signature[] memory sigs) { + ) public pure returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { @@ -293,7 +293,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _simulateProposal(LegacyProposalDetail memory proposal) internal { - config.switchTo(_companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); Ballot.VoteType[] memory cheatingSupports = new Ballot.VoteType[](1); uint256[] memory cheatingPks = new uint256[](1); diff --git a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol index 4dc20af2..ad5bfd90 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol @@ -15,10 +15,9 @@ // TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); // // Migration__20240716_P2_UpgradeBridgeRoninchain.run(); -// CONFIG.createFork(companionNetwork); -// CONFIG.switchTo(companionNetwork); +// (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); // Migration__20240716_P3_UpgradeBridgeMainchain.run(); -// CONFIG.switchTo(currentNetwork); +// switchBack(prevNetwork, prevForkId); // } // } diff --git a/script/PostChecker.sol b/script/PostChecker.sol index d4d62464..2c9cd7d2 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -74,7 +74,8 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { vm.makePersistent(mainchainGateway); vm.makePersistent(mainchainBridgeManager); } else { - revert(string.concat("Unsupported network: ", currentNetwork.chainAlias())); + TNetwork companionNetwork = currentNetwork.companionNetwork(); + switchTo(companionNetwork); } } } diff --git a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol index b8e11a0a..2e063711 100644 --- a/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol +++ b/script/deploy-v0.3.1/Deploy.v0.3.1.s.sol @@ -21,19 +21,17 @@ contract Deploy_v0_3_1 is Migration { ) { new Migration_01_Deploy_RoninBridge().run(); - config.createFork(companionNetwork); - config.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); new Migration_02_Deploy_MainchainBridge().run(); - config.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } else if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { - config.createFork(companionNetwork); - config.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); new Migration_01_Deploy_RoninBridge().run(); - config.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); new Migration_02_Deploy_MainchainBridge().run(); } else if (currentNetwork == DefaultNetwork.LocalHost.key()) { diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 0bff45bb..e28b90c4 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -66,8 +66,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { TNetwork currentNetwork = CONFIG.getCurrentNetwork(); (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); @@ -104,7 +103,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { bool reverted = vm.revertTo(snapshotId); assertTrue(reverted, "Cannot revert to snapshot id"); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } } @@ -112,8 +111,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { TNetwork currentNetwork = CONFIG.getCurrentNetwork(); (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); @@ -173,7 +171,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { bool reverted = vm.revertTo(snapshotId); assertTrue(reverted, "Cannot revert to snapshot id"); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } function validate_ProposeGlobalProposalAndRelay_addBridgeOperator() @@ -219,8 +217,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { TNetwork currentNetwork = CONFIG.getCurrentNetwork(); (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); @@ -237,7 +234,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { bool reverted = vm.revertTo(snapshotId); assertTrue(reverted, "Cannot revert to snapshot id"); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } } diff --git a/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol b/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol index f2d2db9f..c7444a5f 100644 --- a/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol +++ b/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol @@ -24,11 +24,10 @@ abstract contract PostCheck_BridgeManager_Quorum is BasePostCheck { TNetwork currentNetwork = network(); (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); assertTrue(IQuorum(mainchainBridgeManager).minimumVoteWeight() > 0, "Mainchain: Minimum vote weight must be greater than 0"); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } } diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol index c030a536..6a913998 100644 --- a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -79,8 +79,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu function _mapTokenMainchain() private { (, companionNetwork) = network().companionNetworkData(); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); uint256[][4] memory thresholds; thresholds[0] = new uint256[](1); @@ -101,7 +100,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu abi.encodeCall(MainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)) ); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } function _setUpOnRonin() private { @@ -119,8 +118,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu function _setUpOnMainchain() private { (, companionNetwork) = network().companionNetworkData(); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); mainchainChainId = block.chainid; gwDomainSeparator = MainchainGatewayV3(payable(mainchainGateway)).DOMAIN_SEPARATOR(); @@ -134,7 +132,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu vm.deal(user, 10 ether); deal(address(mainchainERC20), user, 1000 ether); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } function _validate_Gateway_DepositAndWithdraw() internal onlyOnRoninNetworkOrLocal { @@ -151,15 +149,14 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu assertEq(HasContracts(bridgeReward).getContract(ContractType.BRIDGE_MANAGER), roninBridgeManager, "Invalid RoninBridgeManager in bridgeReward"); assertEq(HasContracts(bridgeSlash).getContract(ContractType.BRIDGE_MANAGER), roninBridgeManager, "Invalid RoninBridgeManager in bridgeSlash"); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); assertEq(mainchainBridgeManager.getProxyAdmin(), mainchainBridgeManager, "Invalid ProxyAdmin in MainchainBridgeManager, expected self"); assertEq( HasContracts(mainchainGateway).getContract(ContractType.BRIDGE_MANAGER), mainchainBridgeManager, "Invalid MainchainBridgeManager in mainchainGateway" ); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } function validate_Gateway_depositERC20() private onPostCheck("validate_Gateway_depositERC20") { @@ -169,8 +166,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu depositRequest.info.id = 0; depositRequest.info.quantity = 100 ether; - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); vm.prank(user); mainchainERC20.approve(address(mainchainGateway), 100 ether); @@ -187,7 +183,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu } } - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); vm.prank(cheatOperator); RoninGatewayV3(roninGateway).depositFor(receipt); @@ -225,14 +221,13 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu Signature[] memory sigs = new Signature[](1); sigs[0] = Signature(v, r, s); - CONFIG.createFork(companionNetwork); - CONFIG.switchTo(companionNetwork); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); MainchainGatewayV3(payable(mainchainGateway)).submitWithdrawal(receipt, sigs); assertEq(mainchainERC20.balanceOf(withdrawRequest.recipientAddr), 100 ether); - CONFIG.switchTo(currentNetwork); + switchBack(prevNetwork, prevForkId); } // Set the balance of an account for any ERC20 token diff --git a/script/shared/libraries/LibCompanionNetwork.sol b/script/shared/libraries/LibCompanionNetwork.sol index 4637ee62..bbe451c6 100644 --- a/script/shared/libraries/LibCompanionNetwork.sol +++ b/script/shared/libraries/LibCompanionNetwork.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.0; import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; import { IGeneralConfigExtended } from "script/interfaces/IGeneralConfigExtended.sol"; import { TNetwork } from "@fdk/types/Types.sol"; +import { INetworkConfig } from "@fdk/interfaces/configs/INetworkConfig.sol"; library LibCompanionNetwork { IGeneralConfigExtended private constant config = IGeneralConfigExtended(LibSharedAddress.CONFIG); @@ -28,11 +29,9 @@ library LibCompanionNetwork { return companionNetworkData(config.getCurrentNetwork()); } - function companionNetworkData(TNetwork network) internal returns (uint256 chainId, TNetwork companionTNetwork) { + function companionNetworkData(TNetwork network) internal view returns (uint256 chainId, TNetwork companionTNetwork) { companionTNetwork = config.getCompanionNetwork(network); - config.createFork(companionTNetwork); - config.switchTo(companionTNetwork); - chainId = block.chainid; - config.switchTo(network); + INetworkConfig.NetworkData memory dt = config.getNetworkData(companionTNetwork); + chainId = dt.chainId; } } diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index 456a905d..5fc87ef6 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -19,7 +19,7 @@ import { CoreGovernance } from "@ronin/contracts/extensions/sequential-governanc import { LibArray } from "./LibArray.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { LibCompanionNetwork } from "./LibCompanionNetwork.sol"; -import { LibErrorHandler } from "lib/foundry-deployment-kit/script/libraries/LibErrorHandler.sol"; +import { LibErrorHandler } from "@fdk/libraries/LibErrorHandler.sol"; import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; library LibProposal { @@ -192,8 +192,11 @@ library LibProposal { uint256[] memory gasAmounts ) internal preserveState { TNetwork currentNetwork = config.getCurrentNetwork(); + uint256 currentForkId = config.getForkId(currentNetwork); + config.createFork(companionNetwork); config.switchTo(companionNetwork); + uint256 snapshotId = vm.snapshot(); for (uint256 i; i < mainchainTargets.length; i++) { @@ -217,7 +220,7 @@ library LibProposal { bool reverted = vm.revertTo(snapshotId); require(reverted, string.concat("Cannot revert to snapshot id: ", vm.toString(snapshotId))); - config.switchTo(currentNetwork); + config.switchTo(currentForkId); } function verifyProposalGasAmount( diff --git a/soldeer.lock b/soldeer.lock new file mode 100644 index 00000000..cddf90f5 --- /dev/null +++ b/soldeer.lock @@ -0,0 +1,6 @@ + +[[dependencies]] +name = "@fdk" +version = "0.3.1-beta" +source = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.1-beta.zip" +checksum = "53cb5bf15abdc909d177c64e78070387af24ef39b2a4b408651836ac9de059c4" From 96468dc34176be3c0495575602f199829fef90c8 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 29 Jul 2024 13:50:06 +0700 Subject: [PATCH 247/305] script: fix load contract ronin after switch network --- script/Migration.s.sol | 1 - script/PostChecker.sol | 37 +++++++++++-------- .../shared/libraries/LibCompanionNetwork.sol | 8 ++-- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/script/Migration.s.sol b/script/Migration.s.sol index f93b0964..8d99baf9 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -364,7 +364,6 @@ contract Migration is BaseMigration, Utils { address logic = _deployLogic(contractType); string memory proxyAbsolutePath = "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2"; - uint256 proxyNonce; address proxyAdmin = _getProxyAdmin(); assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); diff --git a/script/PostChecker.sol b/script/PostChecker.sol index 2c9cd7d2..a7a433b4 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -57,25 +57,30 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { currentNetwork == DefaultNetwork.RoninMainnet.key() || currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == Network.RoninDevnet.key() || currentNetwork == DefaultNetwork.LocalHost.key() ) { - bridgeSlash = loadContract(Contract.BridgeSlash.key()); - bridgeReward = loadContract(Contract.BridgeReward.key()); - roninGateway = loadContract(Contract.RoninGatewayV3.key()); - bridgeTracking = loadContract(Contract.BridgeTracking.key()); - roninBridgeManager = loadContract(Contract.RoninBridgeManager.key()); - - (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); - mainchainGateway = CONFIG.getAddress(companionNetwork, Contract.MainchainGatewayV3.key()); - mainchainBridgeManager = CONFIG.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - - vm.makePersistent(bridgeSlash); - vm.makePersistent(bridgeReward); - vm.makePersistent(roninGateway); - vm.makePersistent(roninBridgeManager); - vm.makePersistent(mainchainGateway); - vm.makePersistent(mainchainBridgeManager); + _loadRoninContracts(currentNetwork); } else { TNetwork companionNetwork = currentNetwork.companionNetwork(); switchTo(companionNetwork); + _loadRoninContracts(companionNetwork); } } + + function _loadRoninContracts(TNetwork roninNetwork) private { + bridgeSlash = loadContract(Contract.BridgeSlash.key()); + bridgeReward = loadContract(Contract.BridgeReward.key()); + roninGateway = loadContract(Contract.RoninGatewayV3.key()); + bridgeTracking = loadContract(Contract.BridgeTracking.key()); + roninBridgeManager = loadContract(Contract.RoninBridgeManager.key()); + + (, TNetwork companionNetwork) = roninNetwork.companionNetworkData(); + mainchainGateway = CONFIG.getAddress(companionNetwork, Contract.MainchainGatewayV3.key()); + mainchainBridgeManager = CONFIG.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); + + vm.makePersistent(bridgeSlash); + vm.makePersistent(bridgeReward); + vm.makePersistent(roninGateway); + vm.makePersistent(roninBridgeManager); + vm.makePersistent(mainchainGateway); + vm.makePersistent(mainchainBridgeManager); + } } diff --git a/script/shared/libraries/LibCompanionNetwork.sol b/script/shared/libraries/LibCompanionNetwork.sol index bbe451c6..d3c6e2d7 100644 --- a/script/shared/libraries/LibCompanionNetwork.sol +++ b/script/shared/libraries/LibCompanionNetwork.sol @@ -9,11 +9,11 @@ import { INetworkConfig } from "@fdk/interfaces/configs/INetworkConfig.sol"; library LibCompanionNetwork { IGeneralConfigExtended private constant config = IGeneralConfigExtended(LibSharedAddress.CONFIG); - function companionChainId() internal returns (uint256 chainId) { + function companionChainId() internal view returns (uint256 chainId) { (chainId,) = companionNetworkData(); } - function companionChainId(TNetwork network) internal returns (uint256 chainId) { + function companionChainId(TNetwork network) internal view returns (uint256 chainId) { (chainId,) = companionNetworkData(network); } @@ -21,11 +21,11 @@ library LibCompanionNetwork { (, network) = companionNetworkData(); } - function companionNetwork(TNetwork network) internal returns (TNetwork companionTNetwork) { + function companionNetwork(TNetwork network) internal view returns (TNetwork companionTNetwork) { (, companionTNetwork) = companionNetworkData(network); } - function companionNetworkData() internal returns (uint256, TNetwork) { + function companionNetworkData() internal view returns (uint256, TNetwork) { return companionNetworkData(config.getCurrentNetwork()); } From 5702571cbe420c09cea602c187d7f95b3c10578f Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 29 Jul 2024 14:03:28 +0700 Subject: [PATCH 248/305] script: resolve warning --- .../20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol | 2 +- .../20240411-p3-upgrade-bridge-main-chain.s.sol | 2 +- .../20240606-deploy-batcher-sepolia.s.sol | 2 +- script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol | 2 +- script/shared/libraries/LibCompanionNetwork.sol | 2 +- script/shared/libraries/LibProposal.sol | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index 19149517..67a562f6 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -39,7 +39,7 @@ contract Migration__MapTokenRoninchain is Migration { _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); } - function _mapTokens() internal returns (bytes memory) { + function _mapTokens() internal view returns (bytes memory) { address[] memory mainchainTokens = new address[](2); address[] memory roninTokens = new address[](2); uint256[] memory chainIds = new uint256[](2); diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index 62561f1c..b18924c3 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -212,7 +212,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ bytes32 proposalHash, uint256[] memory signerPKs, Ballot.VoteType support - ) public view returns (SignatureConsumer.Signature[] memory sigs) { + ) public pure returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); for (uint256 i; i < signerPKs.length; i++) { diff --git a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol index 017f6fd6..a6c91f9f 100644 --- a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol +++ b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol @@ -74,7 +74,7 @@ contract Migration__20240606_DeployBatcherSepolia is Migration { vm.stopBroadcast(); } - function _postCheck() internal override { + function _postCheck() internal pure override { console.log(StdStyle.green("Migration skipped")); } } diff --git a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol index 3791c167..838bde76 100644 --- a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol +++ b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol @@ -72,7 +72,7 @@ contract Migration_01_Deploy_RoninBridge is Migration { // _initRoninBridgeManager(); } - function _initRoninBridgeManager() internal logFn("Init RoninBridgeManager") { + function _initRoninBridgeManager() internal view logFn("Init RoninBridgeManager") { ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; // address[] memory callbackRegisters = new address[](1); // callbackRegisters[0] = address(_bridgeSlash); diff --git a/script/shared/libraries/LibCompanionNetwork.sol b/script/shared/libraries/LibCompanionNetwork.sol index d3c6e2d7..34310b41 100644 --- a/script/shared/libraries/LibCompanionNetwork.sol +++ b/script/shared/libraries/LibCompanionNetwork.sol @@ -17,7 +17,7 @@ library LibCompanionNetwork { (chainId,) = companionNetworkData(network); } - function companionNetwork() internal returns (TNetwork network) { + function companionNetwork() internal view returns (TNetwork network) { (, network) = companionNetworkData(); } diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index 5fc87ef6..080551ac 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -44,7 +44,7 @@ library LibProposal { require(reverted, string.concat("Cannot revert to snapshot id: ", vm.toString(snapshotId))); } - function getBridgeManagerDomain() internal returns (bytes32) { + function getBridgeManagerDomain() internal view returns (bytes32) { uint256 chainId; TNetwork currentNetwork = config.getCurrentNetwork(); if (currentNetwork == Network.EthMainnet.key() || currentNetwork == Network.Goerli.key() || currentNetwork == Network.Sepolia.key()) { From b9ddd82b600ea7e08d82932f9dbf9454c322b0aa Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 29 Jul 2024 16:26:31 +0700 Subject: [PATCH 249/305] script: use IRoninBridgeManager instead of RoninBridgeManager --- .../20231218-maptoken-mainchain.s.sol | 6 +- .../20231218-maptoken-roninchain.s.sol | 6 +- .../20240115-maptoken-mainchain.s.sol | 6 +- .../20240115-maptoken-roninchain.s.sol | 6 +- .../20240131-maptoken-pixel-mainchain.s.sol | 6 +- .../20240131-maptoken-pixel-roninchain.s.sol | 6 +- .../20240206-maptoken-banana-mainchain.s.sol | 6 +- .../20240206-maptoken-banana-roninchain.s.sol | 6 +- .../20240405-maptoken-usdc-mainchain.s.sol | 2 +- .../20240409-maptoken-slp-mainchain.s.sol | 2 +- ...0240411-deploy-bridge-manager-helper.s.sol | 8 +- .../20240411-helper.s.sol | 4 +- ...40411-p1-deploy-ronin-bridge-manager.s.sol | 2 +- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 8 +- .../20240612-maptoken-nft-sepolia.s.sol | 2 +- .../20240613-maptoken-erc1155-ronin.s.sol | 6 +- .../20240613-maptoken-erc1155-sepolia.s.sol | 2 +- .../20240626-maptoken-anima/last_vote.s.sol | 4 +- ...0240716-deploy-bridge-manager-helper.s.sol | 10 +- .../20240716-helper.s.sol | 4 +- ...716-p1-1-deploy-ronin-bridge-manager.s.sol | 2 +- ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 4 +- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 6 +- script/Migration.s.sol | 13 +- .../contracts/RoninBridgeManagerDeploy.s.sol | 8 +- .../deploy-v0.3.1/01_Deploy_RoninBridge.s.sol | 8 +- .../factory-maptoken-mainchain.s.sol | 6 +- .../factory-maptoken-roninchain.s.sol | 6 +- script/interfaces/IRoninBridgeManager.sol | 163 ++++++++++++++++++ .../PostCheck_BridgeManager_Proposal.s.sol | 8 +- ...PostCheck_Gateway_DepositAndWithdraw.s.sol | 2 +- script/shared/libraries/LibProposal.sol | 12 +- 32 files changed, 251 insertions(+), 89 deletions(-) create mode 100644 script/interfaces/IRoninBridgeManager.sol diff --git a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol index f0a186aa..570b72d6 100644 --- a/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-mainchain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -20,7 +20,7 @@ contract Migration__20231215_MapTokenMainchain is Migration { using LibProposal for *; using LibCompanionNetwork for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address constant _aggRoninToken = address(0x294311a8C37F0744F99EB152c419D4D3D6FEC1C7); address constant _aggMainchainToken = address(0xFB0489e9753B045DdB35e39c6B0Cc02EC6b99AC5); address internal _mainchainGatewayV3; @@ -35,7 +35,7 @@ contract Migration__20231215_MapTokenMainchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); } diff --git a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol index c26898b6..1e1e1b11 100644 --- a/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol +++ b/script/20231218-maptoken/20231218-maptoken-roninchain.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract } from "../utils/Contract.sol"; @@ -17,14 +17,14 @@ import { Contract } from "../utils/Contract.sol"; contract Migration__20231215_MapTokenRoninchain is Migration { using LibProposal for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address constant _aggRoninToken = address(0x294311a8C37F0744F99EB152c419D4D3D6FEC1C7); address constant _aggMainchainToken = address(0xFB0489e9753B045DdB35e39c6B0Cc02EC6b99AC5); address internal _roninGatewayV3; function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _roninGatewayV3 = loadContract(Contract.RoninGatewayV3.key()); } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index 9d116ec8..2807d943 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -18,7 +18,7 @@ import { Contract } from "../utils/Contract.sol"; contract Migration__MapTokenMainchain is Migration { using LibCompanionNetwork for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address constant _pixelRoninToken = address(0x8b50c162494567B3c8B7F00F6031341861c8dEeD); // TODO: fill this address @@ -44,7 +44,7 @@ contract Migration__MapTokenMainchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainBridgeManager.key()); } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index 67a562f6..79d84f88 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -18,7 +18,7 @@ contract Migration__MapTokenRoninchain is Migration { using LibProposal for *; using LibCompanionNetwork for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address constant _pixelRoninToken = address(0x8b50c162494567B3c8B7F00F6031341861c8dEeD); // TODO: fill this address @@ -35,7 +35,7 @@ contract Migration__MapTokenRoninchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); } diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol index 400353f8..4d82c819 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-mainchain.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -22,14 +22,14 @@ contract Migration__20240131_MapTokenPixelMainchain is Migration, Migration__Map using LibProposal for *; using LibCompanionNetwork for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainBridgeManager.key()); } diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol index 7093b861..f46e1ceb 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol @@ -5,7 +5,7 @@ import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -25,12 +25,12 @@ import "./update-axiechat-config.s.sol"; contract Migration__20240131_MapTokenPixelRoninchain is Migration, Migration__MapToken_Pixel_Config, Migration__Update_AxieChat_Config { using LibProposal for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address internal _roninGatewayV3; function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _roninGatewayV3 = loadContract(Contract.RoninGatewayV3.key()); _cheatWeightOperator(_governor); diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index bdc28e9c..a26c7abe 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -29,14 +29,14 @@ contract Migration__20240206_MapTokenBananaMainchain is { using LibCompanionNetwork for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; function setUp() public virtual override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainBridgeManager.key()); } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index f2059802..682a6f59 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -5,7 +5,7 @@ import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -34,7 +34,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is using LibProposal for *; using LibCompanionNetwork for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address internal _roninGatewayV3; address pixelRoninToken = 0x7EAe20d11Ef8c779433Eb24503dEf900b9d28ad7; @@ -47,7 +47,7 @@ contract Migration__20240206_MapTokenBananaRoninChain is function setUp() public virtual override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); } diff --git a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol index ce97bd40..90b3fd29 100644 --- a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; diff --git a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol index ad270084..a6f954d3 100644 --- a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol index 7a3895b5..2ee9f364 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -27,9 +27,9 @@ import { Migration } from "../Migration.s.sol"; contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { using LibProxy for *; - RoninBridgeManager _newRoninBridgeManager; + IRoninBridgeManager _newRoninBridgeManager; - function _deployRoninBridgeManager() internal returns (RoninBridgeManager) { + function _deployRoninBridgeManager() internal returns (IRoninBridgeManager) { address currRoninBridgeManager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); ISharedArgument.SharedParameter memory param; @@ -71,7 +71,7 @@ contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { param.roninBridgeManager.targets[3] = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); param.roninBridgeManager.targets[4] = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); - _newRoninBridgeManager = RoninBridgeManager( + _newRoninBridgeManager = IRoninBridgeManager( new RoninBridgeManagerDeploy().overrideArgs( abi.encodeCall( RoninBridgeManagerConstructor.initialize, diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol index 4cf5eec2..f9384bc2 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-helper.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { Migration } from "../Migration.s.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; struct LegacyProposalDetail { uint256 nonce; @@ -19,7 +19,7 @@ contract Migration__20240409_Helper is Migration { address internal _governor; address[] internal _voters; - RoninBridgeManager internal _currRoninBridgeManager; + IRoninBridgeManager internal _currRoninBridgeManager; function _helperProposeForCurrentNetwork(LegacyProposalDetail memory proposal) internal { vm.broadcast(_governor); diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol index 07dfdd01..2a52023b 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index 112db860..bf6b8ac0 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -34,8 +34,8 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H } function run() public virtual onlyOn(DefaultNetwork.RoninTestnet.key()) { - _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _newRoninBridgeManager = RoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); + _currRoninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _newRoninBridgeManager = IRoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); @@ -49,7 +49,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H } function _changeAdminOfEnforcer() private { - RoninBridgeManager roninGA = RoninBridgeManager(0x53Ea388CB72081A3a397114a43741e7987815896); + IRoninBridgeManager roninGA = IRoninBridgeManager(0x53Ea388CB72081A3a397114a43741e7987815896); address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); uint256 expiredTime = block.timestamp + 14 days; diff --git a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol index 2b94701e..7dcbdf83 100644 --- a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol index f98a34fd..877fbf0f 100644 --- a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -22,7 +22,7 @@ import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtil import { Migration } from "../Migration.s.sol"; contract Migration__20240613_MapERC1155SepoliaRoninchain is Migration { - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; IRoninGatewayV3 internal _roninGatewayV3; MainchainBridgeAdminUtils _mainchainProposalUtils; @@ -30,7 +30,7 @@ contract Migration__20240613_MapERC1155SepoliaRoninchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); + _roninBridgeManager = IRoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); _roninGatewayV3 = IRoninGatewayV3(0xCee681C9108c42C710c6A8A949307D5F13C9F3ca); } diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol index 40caabf4..b1b9d32c 100644 --- a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; diff --git a/script/20240626-maptoken-anima/last_vote.s.sol b/script/20240626-maptoken-anima/last_vote.s.sol index a9355bcc..356342a9 100644 --- a/script/20240626-maptoken-anima/last_vote.s.sol +++ b/script/20240626-maptoken-anima/last_vote.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { Script } from "forge-std/Script.sol"; @@ -40,6 +40,6 @@ contract Migration__20242606_MapTokenAnimaRoninTestnet_LastVote is Script { // gasAmounts: [1000000 , 1000000] vm.broadcast(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); - RoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF).castProposalVoteForCurrentNetwork{ gas: 2_000_000 }(proposal, Ballot.VoteType.For); + IRoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF).castProposalVoteForCurrentNetwork{ gas: 2_000_000 }(proposal, Ballot.VoteType.For); } } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index 1443c826..0fa5ed3a 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -28,9 +28,9 @@ import { Migration } from "../Migration.s.sol"; abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migration { using LibProxy for *; - RoninBridgeManager _newRoninBridgeManager; + IRoninBridgeManager _newRoninBridgeManager; - function _deployRoninBridgeManager() internal returns (RoninBridgeManager) { + function _deployRoninBridgeManager() internal returns (IRoninBridgeManager) { address currRoninBridgeManager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); console.log("Current Ronin Bridge Manager:", currRoninBridgeManager); @@ -38,7 +38,7 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio { (address[] memory currGovernors, address[] memory currOperators, uint96[] memory currWeights) = - RoninBridgeManager(currRoninBridgeManager).getFullBridgeOperatorInfos(); + IRoninBridgeManager(currRoninBridgeManager).getFullBridgeOperatorInfos(); param.roninBridgeManager.num = 7; param.roninBridgeManager.denom = 10; @@ -72,7 +72,7 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio param.roninBridgeManager.targets[3] = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); param.roninBridgeManager.targets[4] = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); - _newRoninBridgeManager = RoninBridgeManager( + _newRoninBridgeManager = IRoninBridgeManager( new RoninBridgeManagerDeploy().overrideArgs( abi.encodeCall( RoninBridgeManagerConstructor.initialize, diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol index a72b1d6d..11821500 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-helper.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { Migration } from "../Migration.s.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; struct LegacyProposalDetail { uint256 nonce; @@ -20,7 +20,7 @@ contract Migration__20240716_Helper is Migration { address internal _proposer; address[] internal _voters; - RoninBridgeManager internal _currRoninBridgeManager; + IRoninBridgeManager internal _currRoninBridgeManager; function _helperProposeForCurrentNetwork(LegacyProposalDetail memory proposal) internal { console.log("Real start broadcast to propose proposal:", _proposer); diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol index 1dc9092a..8aa16882 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index 72a97560..2d7ac88d 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; @@ -44,7 +44,7 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is } function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { - _currRoninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _currRoninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _newRoninBridgeManager = _deployRoninBridgeManager(); _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index ff4cd9de..2406e8ea 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -33,7 +33,7 @@ import "./wbtc-threshold.s.sol"; import { Migration } from "../Migration.s.sol"; contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey, Migration__MapToken_WBTC_Threshold { - RoninBridgeManager _roninBridgeManager; + IRoninBridgeManager _roninBridgeManager; MainchainBridgeManager _currMainchainBridgeManager; MainchainBridgeManager _newMainchainBridgeManager; @@ -47,7 +47,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); // _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); _currentNetwork = network(); diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 8d99baf9..1f66c7b1 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -8,7 +8,6 @@ import { console } from "forge-std/console.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; -import { GeneralConfig } from "./GeneralConfig.sol"; import { ISharedArgument } from "./interfaces/ISharedArgument.sol"; import { TNetwork, Network } from "./utils/Network.sol"; import { IGeneralConfigExtended } from "./interfaces/IGeneralConfigExtended.sol"; @@ -16,10 +15,10 @@ import { Utils } from "./utils/Utils.sol"; import { LibTokenInfo, TokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; import { Contract, TContract } from "./utils/Contract.sol"; import { GlobalProposal, Proposal, LibProposal } from "script/shared/libraries/LibProposal.sol"; -import { TransparentUpgradeableProxy, TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; +import { TransparentUpgradeableProxy } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { LibArray } from "script/shared/libraries/LibArray.sol"; import { IPostCheck } from "./interfaces/IPostCheck.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { LibDeploy, DeployInfo, ProxyInterface, UpgradeInfo } from "@fdk/libraries/LibDeploy.sol"; contract Migration is BaseMigration, Utils { @@ -44,7 +43,7 @@ contract Migration is BaseMigration, Utils { } function _configByteCode() internal virtual override returns (bytes memory) { - return abi.encodePacked(type(GeneralConfig).creationCode); + return vm.getCode("out/GeneralConfig.sol/GeneralConfig.json"); } function _sharedArguments() internal virtual override returns (bytes memory rawArgs) { @@ -273,8 +272,8 @@ contract Migration is BaseMigration, Utils { // in case proxyAdmin is an eoa console.log(StdStyle.yellow("Upgrading with EOA wallet...")); prankOrBroadcast(address(proxyAdmin)); - if (args.length == 0) TransparentUpgradeableProxyV2(payable(proxy)).upgradeTo(logic); - else TransparentUpgradeableProxyV2(payable(proxy)).upgradeToAndCall(logic, args); + if (args.length == 0) TransparentUpgradeableProxy(payable(proxy)).upgradeTo(logic); + else TransparentUpgradeableProxy(payable(proxy)).upgradeToAndCall(logic, args); } // in case proxyAdmin is GovernanceAdmin else if ( @@ -284,7 +283,7 @@ contract Migration is BaseMigration, Utils { // handle for ronin network console.log(StdStyle.yellow("Voting on RoninBridgeManager for upgrading...")); - RoninBridgeManager manager = RoninBridgeManager(proxyAdmin); + IRoninBridgeManager manager = IRoninBridgeManager(proxyAdmin); bytes[] memory callDatas = new bytes[](1); uint256[] memory values = new uint256[](1); address[] memory targets = new address[](1); diff --git a/script/contracts/RoninBridgeManagerDeploy.s.sol b/script/contracts/RoninBridgeManagerDeploy.s.sol index 53215108..a5986181 100644 --- a/script/contracts/RoninBridgeManagerDeploy.s.sol +++ b/script/contracts/RoninBridgeManagerDeploy.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import { RoninBridgeManagerConstructor } from "@ronin/contracts/ronin/gateway/RoninBridgeManagerConstructor.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import { Migration } from "../Migration.s.sol"; @@ -36,11 +36,11 @@ contract RoninBridgeManagerDeploy is Migration { ); } - function _getProxyAdmin() internal virtual override returns(address payable) { + function _getProxyAdmin() internal virtual override returns (address payable) { return sender(); } - function run() public virtual returns (RoninBridgeManager) { + function run() public virtual returns (IRoninBridgeManager) { address payable instance = _deployProxy(Contract.RoninBridgeManagerConstructor.key(), sender()); address logic = _deployLogic(Contract.RoninBridgeManager.key()); address proxyAdmin = instance.getProxyAdmin(); @@ -65,6 +65,6 @@ contract RoninBridgeManagerDeploy is Migration { // } config.setAddress(network(), Contract.RoninBridgeManager.key(), instance); - return RoninBridgeManager(instance); + return IRoninBridgeManager(instance); } } diff --git a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol index 838bde76..e037e256 100644 --- a/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol +++ b/script/deploy-v0.3.1/01_Deploy_RoninBridge.s.sol @@ -17,7 +17,7 @@ import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { HasContracts } from "@ronin/contracts/extensions/collections/HasContracts.sol"; -import { RoninBridgeManagerConstructor, RoninBridgeManager, RoninBridgeManagerDeploy } from "../contracts/RoninBridgeManagerDeploy.s.sol"; +import { RoninBridgeManagerConstructor, IRoninBridgeManager, RoninBridgeManagerDeploy } from "../contracts/RoninBridgeManagerDeploy.s.sol"; import { MockValidatorContract_OnlyTiming_ForHardhatTest } from "@ronin/contracts/mocks/ronin/MockValidatorContract_OnlyTiming_ForHardhatTest.sol"; contract Migration_01_Deploy_RoninBridge is Migration { @@ -28,7 +28,7 @@ contract Migration_01_Deploy_RoninBridge is Migration { BridgeReward private _bridgeReward; RoninGatewayV3 private _roninGatewayV3; BridgeTracking private _bridgeTracking; - RoninBridgeManager private _roninBridgeManager; + IRoninBridgeManager private _roninBridgeManager; address private _validatorSet; function run() external { @@ -39,7 +39,7 @@ contract Migration_01_Deploy_RoninBridge is Migration { // callbackRegisters[0] = address(_bridgeSlash); // callbackRegisters[1] = address(_roninGatewayV3); - _roninBridgeManager = RoninBridgeManager( + _roninBridgeManager = IRoninBridgeManager( new RoninBridgeManagerDeploy().overrideArgs( abi.encodeCall( RoninBridgeManagerConstructor.initialize, @@ -72,7 +72,7 @@ contract Migration_01_Deploy_RoninBridge is Migration { // _initRoninBridgeManager(); } - function _initRoninBridgeManager() internal view logFn("Init RoninBridgeManager") { + function _initRoninBridgeManager() internal logFn("Init RoninBridgeManager") { ISharedArgument.BridgeManagerParam memory param = config.sharedArguments().roninBridgeManager; // address[] memory callbackRegisters = new address[](1); // callbackRegisters[0] = address(_bridgeSlash); diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index b25699de..068cb2e5 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -19,7 +19,7 @@ import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork abstract contract Factory__MapTokensMainchain is Migration { using LibCompanionNetwork for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address internal _mainchainGatewayV3; address internal _mainchainBridgeManager; address private _governor; @@ -27,7 +27,7 @@ abstract contract Factory__MapTokensMainchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index ae55d3df..701a6de8 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -23,13 +23,13 @@ import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork abstract contract Factory__MapTokensRoninchain is Migration { using LibCompanionNetwork for *; - RoninBridgeManager internal _roninBridgeManager; + IRoninBridgeManager internal _roninBridgeManager; address internal _roninGatewayV3; address private _governor; function setUp() public override { super.setUp(); - _roninBridgeManager = RoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); _governor = _initCaller(); diff --git a/script/interfaces/IRoninBridgeManager.sol b/script/interfaces/IRoninBridgeManager.sol new file mode 100644 index 00000000..3037849c --- /dev/null +++ b/script/interfaces/IRoninBridgeManager.sol @@ -0,0 +1,163 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { RoleAccess } from "@ronin/contracts/utils/RoleAccess.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; + +interface IRoninBridgeManager is VoteStatusConsumer, SignatureConsumer { + error ErrAlreadyVoted(address voter); + error ErrBelowMinRequiredGovernors(); + error ErrContractTypeNotFound(ContractType contractType); + error ErrCurrentProposalIsNotCompleted(); + error ErrDuplicated(bytes4 msgSig); + error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData); + error ErrGovernorNotFound(address governor); + error ErrGovernorNotMatch(address required, address sender); + error ErrInsufficientGas(bytes32 proposalHash); + error ErrInvalidArguments(bytes4 msgSig); + error ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected); + error ErrInvalidExecutor(); + error ErrInvalidExpiryTimestamp(); + error ErrInvalidInput(); + error ErrInvalidOrder(bytes4 msgSig); + error ErrInvalidProposal(bytes32 actual, bytes32 expected); + error ErrInvalidProposalNonce(bytes4 msgSig); + error ErrInvalidSignatures(bytes4 msgSig); + error ErrInvalidThreshold(bytes4 msgSig); + error ErrInvalidVoteWeight(bytes4 msgSig); + error ErrLengthMismatch(bytes4 msgSig); + error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg); + error ErrOnlySelfCall(bytes4 msgSig); + error ErrOperatorNotFound(address operator); + error ErrProposalNotApproved(); + error ErrQueryForEmptyVote(); + error ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole); + error ErrUnsupportedInterface(bytes4 interfaceId, address addr); + error ErrUnsupportedVoteType(bytes4 msgSig); + error ErrVoteIsFinalized(); + error ErrZeroAddress(bytes4 msgSig); + error ErrZeroCodeContract(address addr); + + event BridgeOperatorAddingFailed(address indexed operator); + event BridgeOperatorRemovingFailed(address indexed operator); + event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator); + event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators); + event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators); + event CallbackRegistered(address, bool); + event ContractUpdated(ContractType indexed contractType, address indexed addr); + event GlobalProposalCreated( + uint256 indexed round, + bytes32 indexed proposalHash, + Proposal.ProposalDetail proposal, + bytes32 globalProposalHash, + GlobalProposal.GlobalProposalDetail globalProposal, + address creator + ); + event Initialized(uint8 version); + event MinRequiredGovernorUpdated(uint256 min); + event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas); + event ProposalApproved(bytes32 indexed proposalHash); + event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator); + event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); + event ProposalExpired(bytes32 indexed proposalHash); + event ProposalExpiryDurationChanged(uint256 indexed duration); + event ProposalRejected(bytes32 indexed proposalHash); + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr); + event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator); + + function DOMAIN_SEPARATOR() external view returns (bytes32); + function addBridgeOperators(uint96[] memory voteWeights, address[] memory governors, address[] memory bridgeOperators) external; + function castGlobalProposalBySignatures( + GlobalProposal.GlobalProposalDetail memory globalProposal, + Ballot.VoteType[] memory supports_, + Signature[] memory signatures + ) external; + function castProposalBySignatures(Proposal.ProposalDetail memory proposal, Ballot.VoteType[] memory supports_, Signature[] memory signatures) external; + function castProposalVoteForCurrentNetwork(Proposal.ProposalDetail memory proposal, Ballot.VoteType support) external; + function checkThreshold(uint256 voteWeight) external view returns (bool); + function deleteExpired(uint256 _chainId, uint256 _round) external; + function execute(Proposal.ProposalDetail memory proposal) external; + function executeGlobal(GlobalProposal.GlobalProposalDetail memory globalProposal) external; + function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight); + function getBridgeOperators() external view returns (address[] memory); + function getCallbackRegisters() external view returns (address[] memory registers); + function getContract(ContractType contractType) external view returns (address contract_); + function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights); + function getGlobalProposalSignatures(uint256 round_) + external + view + returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures); + function getGovernorOf(address operator) external view returns (address governor); + function getGovernorWeight(address governor) external view returns (uint96 weight); + function getGovernorWeights(address[] memory governors) external view returns (uint96[] memory weights); + function getGovernors() external view returns (address[] memory); + function getOperatorOf(address governor) external view returns (address operator); + function getProposalExpiryDuration() external view returns (uint256); + function getProposalSignatures( + uint256 _chainId, + uint256 _round + ) external view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures); + function getThreshold() external view returns (uint256 num, uint256 denom); + function getTotalWeight() external view returns (uint256); + function globalProposalVoted(uint256 round_, address voter) external view returns (bool); + function isBridgeOperator(address addr) external view returns (bool); + function minimumVoteWeight() external view returns (uint256); + function proposalVoted(uint256 _chainId, uint256 _round, address _voter) external view returns (bool); + function propose( + uint256 chainId, + uint256 expiryTimestamp, + address executor, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory gasAmounts + ) external; + function proposeGlobal( + uint256 expiryTimestamp, + address executor, + GlobalProposal.TargetOption[] memory targetOptions, + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory gasAmounts + ) external; + function proposeGlobalProposalStructAndCastVotes( + GlobalProposal.GlobalProposalDetail memory globalProposal, + Ballot.VoteType[] memory supports_, + Signature[] memory signatures + ) external; + function proposeProposalForCurrentNetwork( + uint256 expiryTimestamp, + address executor, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + uint256[] memory gasAmounts, + Ballot.VoteType support + ) external; + function proposeProposalStructAndCastVotes( + Proposal.ProposalDetail memory _proposal, + Ballot.VoteType[] memory _supports, + Signature[] memory _signatures + ) external; + function registerCallbacks(address[] memory registers) external; + function removeBridgeOperators(address[] memory bridgeOperators) external; + function resolveTargets(GlobalProposal.TargetOption[] memory targetOptions) external view returns (address[] memory targets); + function round(uint256) external view returns (uint256); + function setContract(ContractType contractType, address addr) external; + function setMinRequiredGovernor(uint256 min) external; + function setThreshold(uint256 num, uint256 denom) external; + function sumGovernorsWeight(address[] memory governors) external view returns (uint256 sum); + function totalBridgeOperator() external view returns (uint256); + function unregisterCallbacks(address[] memory registers) external; + function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external; + function vote( + uint256, + uint256 + ) external view returns (VoteStatus status, bytes32 hash, uint256 againstVoteWeight, uint256 forVoteWeight, uint256 expiryTimestamp); +} diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index e28b90c4..d6cba14e 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -5,7 +5,7 @@ import { console } from "forge-std/console.sol"; import { TransparentUpgradeableProxyV2, TransparentUpgradeableProxy } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { BasePostCheck } from "../../BasePostCheck.s.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { TContract, Contract } from "script/utils/Contract.sol"; import { TNetwork, Network } from "script/utils/Network.sol"; @@ -34,7 +34,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { } function validate_proposeAndRelay_addBridgeOperator() private onlyOnRoninNetworkOrLocal onPostCheck("validate_proposeAndRelay_addBridgeOperator") { - RoninBridgeManager manager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + IRoninBridgeManager manager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); // Cheat add governor cheatAddOverWeightedGovernor(address(manager)); @@ -179,7 +179,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { onlyOnRoninNetworkOrLocal onPostCheck("validate_ProposeGlobalProposalAndRelay_addBridgeOperator") { - RoninBridgeManager manager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + IRoninBridgeManager manager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); cheatAddOverWeightedGovernor(address(manager)); GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); @@ -257,7 +257,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { } function validate_canExcuteUpgradeAllOneProposal() private onlyOnRoninNetworkOrLocal onPostCheck("validate_canExcuteUpgradeAllOneProposal") { - RoninBridgeManager manager = RoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + IRoninBridgeManager manager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); TContract[] memory contractTypes = new TContract[](5); contractTypes[0] = Contract.BridgeSlash.key(); contractTypes[1] = Contract.BridgeReward.key(); diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol index 6a913998..d57e2b0e 100644 --- a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -18,7 +18,7 @@ import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManage import { LibArray } from "script/shared/libraries/LibArray.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { IRoninGatewayV3, RoninGatewayV3 } from "@ronin/contracts/ronin/gateway/RoninGatewayV3.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import { IMainchainGatewayV3, MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index 080551ac..4a4e8b3e 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -13,7 +13,7 @@ import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { CoreGovernance } from "@ronin/contracts/extensions/sequential-governance/CoreGovernance.sol"; import { LibArray } from "./LibArray.sol"; @@ -105,7 +105,7 @@ library LibProposal { }); } - function executeProposal(RoninBridgeManager manager, Proposal.ProposalDetail memory proposal) internal { + function executeProposal(IRoninBridgeManager manager, Proposal.ProposalDetail memory proposal) internal { Ballot.VoteType support = Ballot.VoteType.For; address[] memory governors = manager.getGovernors(); @@ -124,7 +124,7 @@ library LibProposal { voteFor(manager, proposal); } - function voteFor(RoninBridgeManager manager, Proposal.ProposalDetail memory proposal) internal { + function voteFor(IRoninBridgeManager manager, Proposal.ProposalDetail memory proposal) internal { Ballot.VoteType support = Ballot.VoteType.For; address[] memory governors = manager.getGovernors(); bool shouldPrankOnly = config.isPostChecking(); @@ -254,7 +254,7 @@ library LibProposal { Proposal.ProposalDetail memory proposal, uint256[] memory signerPKs, Ballot.VoteType support - ) internal returns (SignatureConsumer.Signature[] memory sigs) { + ) internal view returns (SignatureConsumer.Signature[] memory sigs) { return generateSignaturesFor(proposal.hash(), signerPKs, support); } @@ -262,7 +262,7 @@ library LibProposal { GlobalProposal.GlobalProposalDetail memory proposal, uint256[] memory signerPKs, Ballot.VoteType support - ) internal returns (SignatureConsumer.Signature[] memory sigs) { + ) internal view returns (SignatureConsumer.Signature[] memory sigs) { return generateSignaturesFor(proposal.hash(), signerPKs, support); } @@ -270,7 +270,7 @@ library LibProposal { bytes32 proposalHash, uint256[] memory signerPKs, Ballot.VoteType support - ) internal returns (SignatureConsumer.Signature[] memory sigs) { + ) internal view returns (SignatureConsumer.Signature[] memory sigs) { sigs = new SignatureConsumer.Signature[](signerPKs.length); bytes32 domain = getBridgeManagerDomain(); for (uint256 i; i < signerPKs.length; i++) { From 08303ecc0d0c6d667c2a77a880ce55459728962a Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 29 Jul 2024 16:55:15 +0700 Subject: [PATCH 250/305] script: minor refactor --- .../20240115-maptoken-mainchain.s.sol | 2 +- .../20240115-maptoken-roninchain.s.sol | 4 ++-- .../20240206-maptoken-banana-mainchain.s.sol | 2 +- .../20240206-maptoken-banana-roninchain.s.sol | 4 ++-- ...0240411-deploy-bridge-manager-helper.s.sol | 14 ++++++------- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 16 +++++++-------- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 20 +++++++++---------- .../20240606-deploy-batcher-sepolia.s.sol | 8 ++++---- ...0240619-p3-upgrade-bridge-main-chain.s.sol | 6 +++--- ...0240716-deploy-bridge-manager-helper.s.sol | 14 ++++++------- ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 12 +++++------ ...0240716-p3-upgrade-bridge-main-chain.s.sol | 18 ++++++++--------- script/Migration.s.sol | 9 ++++----- .../factory-maptoken-mainchain.s.sol | 2 +- .../factory-maptoken-roninchain.s.sol | 4 ++-- script/shared/libraries/LibProposal.sol | 2 -- 16 files changed, 67 insertions(+), 70 deletions(-) diff --git a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol index 2807d943..e85d82ce 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-mainchain.s.sol @@ -44,7 +44,7 @@ contract Migration__MapTokenMainchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainBridgeManager.key()); } diff --git a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol index 79d84f88..f26e0314 100644 --- a/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol +++ b/script/20240115-mappixeltoken/20240115-maptoken-roninchain.s.sol @@ -35,8 +35,8 @@ contract Migration__MapTokenRoninchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = loadContract(Contract.RoninGatewayV3.key()); } function _mapTokens() internal view returns (bytes memory) { diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol index a26c7abe..108868fd 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-mainchain.s.sol @@ -36,7 +36,7 @@ contract Migration__20240206_MapTokenBananaMainchain is function setUp() public virtual override { super.setUp(); - _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(config.getCompanionNetwork(network()), Contract.MainchainBridgeManager.key()); } diff --git a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol index 682a6f59..31ee2fad 100644 --- a/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol +++ b/script/20240206-maptoken-banana/20240206-maptoken-banana-roninchain.s.sol @@ -47,8 +47,8 @@ contract Migration__20240206_MapTokenBananaRoninChain is function setUp() public virtual override { super.setUp(); - _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = loadContract(Contract.RoninGatewayV3.key()); } function _cheatWeightOperator(address gov) internal { diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol index 2ee9f364..d52c15d2 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol @@ -30,7 +30,7 @@ contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { IRoninBridgeManager _newRoninBridgeManager; function _deployRoninBridgeManager() internal returns (IRoninBridgeManager) { - address currRoninBridgeManager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + address currRoninBridgeManager = loadContract(Contract.RoninBridgeManager.key()); ISharedArgument.SharedParameter memory param; @@ -38,7 +38,7 @@ contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { param.roninBridgeManager.denom = 10; param.roninBridgeManager.roninChainId = block.chainid; param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.roninBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.bridgeContract = loadContract(Contract.RoninGatewayV3.key()); param.roninBridgeManager.bridgeOperators = new address[](4); param.roninBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; param.roninBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; @@ -65,11 +65,11 @@ contract Migration__2024041_DeployRoninBridgeManagerHelper is Migration { param.roninBridgeManager.targetOptions[4] = GlobalProposal.TargetOption.PauseEnforcer; param.roninBridgeManager.targets = new address[](5); - param.roninBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - param.roninBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); - param.roninBridgeManager.targets[2] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - param.roninBridgeManager.targets[3] = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - param.roninBridgeManager.targets[4] = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + param.roninBridgeManager.targets[0] = loadContract(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.targets[1] = loadContract(Contract.BridgeReward.key()); + param.roninBridgeManager.targets[2] = loadContract(Contract.BridgeSlash.key()); + param.roninBridgeManager.targets[3] = loadContract(Contract.BridgeTracking.key()); + param.roninBridgeManager.targets[4] = loadContract(Contract.RoninPauseEnforcer.key()); _newRoninBridgeManager = IRoninBridgeManager( new RoninBridgeManagerDeploy().overrideArgs( diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index bf6b8ac0..a53e00ec 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -34,7 +34,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H } function run() public virtual onlyOn(DefaultNetwork.RoninTestnet.key()) { - _currRoninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _currRoninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _newRoninBridgeManager = IRoninBridgeManager(0x8AaAD4782890eb879A0fC132A6AdF9E5eE708faF); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; @@ -50,7 +50,7 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H function _changeAdminOfEnforcer() private { IRoninBridgeManager roninGA = IRoninBridgeManager(0x53Ea388CB72081A3a397114a43741e7987815896); - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + address pauseEnforcerProxy = loadContract(Contract.RoninPauseEnforcer.key()); uint256 expiredTime = block.timestamp + 14 days; uint N = 1; @@ -127,15 +127,15 @@ contract Migration__20240409_P2_UpgradeBridgeRoninchain is Migration__20240409_H address pauseEnforcerLogic = _deployLogic(Contract.RoninPauseEnforcer.key()); address roninGatewayV3Logic = _deployLogic(Contract.RoninGatewayV3.key()); - address bridgeRewardProxy = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); - address bridgeSlashProxy = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - address bridgeTrackingProxy = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); - address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + address bridgeRewardProxy = loadContract(Contract.BridgeReward.key()); + address bridgeSlashProxy = loadContract(Contract.BridgeSlash.key()); + address bridgeTrackingProxy = loadContract(Contract.BridgeTracking.key()); + address pauseEnforcerProxy = loadContract(Contract.RoninPauseEnforcer.key()); + address roninGatewayV3Proxy = loadContract(Contract.RoninGatewayV3.key()); ISharedArgument.SharedParameter memory param; param.roninBridgeManager.callbackRegisters = new address[](1); - param.roninBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + param.roninBridgeManager.callbackRegisters[0] = loadContract(Contract.BridgeSlash.key()); uint N = 17; address[] memory targets = new address[](N); diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index b18924c3..f96fd74a 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -44,7 +44,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ function run() public virtual onlyOn(Network.Sepolia.key()) { CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); - _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + _currMainchainBridgeManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); @@ -57,8 +57,8 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _changeTempAdmin() internal { - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + address pauseEnforcerProxy = loadContract(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = loadContract(Contract.MainchainGatewayV3.key()); vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); @@ -73,7 +73,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.denom = 10; param.mainchainBridgeManager.roninChainId = 2021; param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.bridgeContract = loadContract(Contract.MainchainGatewayV3.key()); param.mainchainBridgeManager.bridgeOperators = new address[](4); param.mainchainBridgeManager.bridgeOperators[0] = 0x2e82D2b56f858f79DeeF11B160bFC4631873da2B; param.mainchainBridgeManager.bridgeOperators[1] = 0xBcb61783dd2403FE8cC9B89B27B1A9Bb03d040Cb; @@ -97,8 +97,8 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; param.mainchainBridgeManager.targets = new address[](2); - param.mainchainBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - param.mainchainBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + param.mainchainBridgeManager.targets[0] = loadContract(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.targets[1] = loadContract(Contract.MainchainPauseEnforcer.key()); _newMainchainBridgeManager = MainchainBridgeManager( new MainchainBridgeManagerDeploy().overrideArgs( @@ -126,18 +126,18 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _upgradeBridgeMainchain() internal { - address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); + address weth = loadContract(Contract.WETH.key()); address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); address pauseEnforcerLogic = _deployLogic(Contract.MainchainPauseEnforcer.key()); address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + address pauseEnforcerProxy = loadContract(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = loadContract(Contract.MainchainGatewayV3.key()); ISharedArgument.SharedParameter memory param; param.mainchainBridgeManager.callbackRegisters = new address[](1); - param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.callbackRegisters[0] = loadContract(Contract.MainchainGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; uint N = 7; diff --git a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol index a6c91f9f..55594c39 100644 --- a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol +++ b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol @@ -45,7 +45,7 @@ contract Migration__20240606_DeployBatcherSepolia is Migration { function run() public virtual onlyOn(Network.Sepolia.key()) { CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); - // _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + // _currMainchainBridgeManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); // _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; // _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); @@ -56,7 +56,7 @@ contract Migration__20240606_DeployBatcherSepolia is Migration { // _deployMainchainBridgeManager(); // _upgradeBridgeMainchain(); - _currMainchainBridge = MainchainGatewayV3(config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key())); + _currMainchainBridge = MainchainGatewayV3(loadContract(Contract.MainchainGatewayV3.key())); // vm.stopBroadcast(); // vm.startBroadcast(TESTNET_ADMIN); _mainchainGatewayBatcher = @@ -65,8 +65,8 @@ contract Migration__20240606_DeployBatcherSepolia is Migration { } function _changeTempAdmin() internal { - address pauseEnforcerProxy = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); - address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + address pauseEnforcerProxy = loadContract(Contract.MainchainPauseEnforcer.key()); + address mainchainGatewayV3Proxy = loadContract(Contract.MainchainGatewayV3.key()); vm.startBroadcast(0x968D0Cd7343f711216817E617d3f92a23dC91c07); address(pauseEnforcerProxy).call(abi.encodeWithSignature("changeAdmin(address)", _currMainchainBridgeManager)); diff --git a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol index b04fddb7..3ac9a98b 100644 --- a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol @@ -44,7 +44,7 @@ contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__ function run() public virtual onlyOn(Network.Sepolia.key()) { CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); - _mainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + _mainchainBridgeManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); @@ -56,11 +56,11 @@ contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__ function _upgradeBridgeMainchain() internal { address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); - address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + address mainchainGatewayV3Proxy = loadContract(Contract.MainchainGatewayV3.key()); ISharedArgument.SharedParameter memory param; param.mainchainBridgeManager.callbackRegisters = new address[](1); - param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.callbackRegisters[0] = loadContract(Contract.MainchainGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; uint N = 1; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index 0fa5ed3a..cbb01591 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -31,7 +31,7 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio IRoninBridgeManager _newRoninBridgeManager; function _deployRoninBridgeManager() internal returns (IRoninBridgeManager) { - address currRoninBridgeManager = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + address currRoninBridgeManager = loadContract(Contract.RoninBridgeManager.key()); console.log("Current Ronin Bridge Manager:", currRoninBridgeManager); ISharedArgument.SharedParameter memory param; @@ -44,7 +44,7 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio param.roninBridgeManager.denom = 10; param.roninBridgeManager.roninChainId = block.chainid; param.roninBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.roninBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.bridgeContract = loadContract(Contract.RoninGatewayV3.key()); uint totalCurrGovernors = currGovernors.length; param.roninBridgeManager.bridgeOperators = new address[](totalCurrGovernors); @@ -66,11 +66,11 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio param.roninBridgeManager.targetOptions[4] = GlobalProposal.TargetOption.PauseEnforcer; param.roninBridgeManager.targets = new address[](5); - param.roninBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); - param.roninBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); - param.roninBridgeManager.targets[2] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - param.roninBridgeManager.targets[3] = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - param.roninBridgeManager.targets[4] = config.getAddressFromCurrentNetwork(Contract.RoninPauseEnforcer.key()); + param.roninBridgeManager.targets[0] = loadContract(Contract.RoninGatewayV3.key()); + param.roninBridgeManager.targets[1] = loadContract(Contract.BridgeReward.key()); + param.roninBridgeManager.targets[2] = loadContract(Contract.BridgeSlash.key()); + param.roninBridgeManager.targets[3] = loadContract(Contract.BridgeTracking.key()); + param.roninBridgeManager.targets[4] = loadContract(Contract.RoninPauseEnforcer.key()); _newRoninBridgeManager = IRoninBridgeManager( new RoninBridgeManagerDeploy().overrideArgs( diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index 2d7ac88d..fa674e9f 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -44,7 +44,7 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is } function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { - _currRoninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _currRoninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _newRoninBridgeManager = _deployRoninBridgeManager(); _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor @@ -66,14 +66,14 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is address pauseEnforcerLogic = _deployLogic(Contract.RoninPauseEnforcer.key()); address roninGatewayV3Logic = _deployLogic(Contract.RoninGatewayV3.key()); - address bridgeRewardProxy = config.getAddressFromCurrentNetwork(Contract.BridgeReward.key()); - address bridgeSlashProxy = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); - address bridgeTrackingProxy = config.getAddressFromCurrentNetwork(Contract.BridgeTracking.key()); - address roninGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + address bridgeRewardProxy = loadContract(Contract.BridgeReward.key()); + address bridgeSlashProxy = loadContract(Contract.BridgeSlash.key()); + address bridgeTrackingProxy = loadContract(Contract.BridgeTracking.key()); + address roninGatewayV3Proxy = loadContract(Contract.RoninGatewayV3.key()); ISharedArgument.SharedParameter memory param; param.roninBridgeManager.callbackRegisters = new address[](1); - param.roninBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.BridgeSlash.key()); + param.roninBridgeManager.callbackRegisters[0] = loadContract(Contract.BridgeSlash.key()); uint N = 16; address[] memory targets = new address[](N); diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 2406e8ea..c3e68370 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -47,14 +47,14 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { - _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - // _currMainchainBridgeManager = MainchainBridgeManager(config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + // _currMainchainBridgeManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); _currentNetwork = network(); _companionNetwork = config.getCompanionNetwork(_currentNetwork); (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); { - // address companionManager = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + // address companionManager = loadContract(Contract.MainchainBridgeManager.key()); _currMainchainBridgeManager = MainchainBridgeManager(0xa71456fA88a5f6a4696D0446E690Db4a5913fab0); // _currMainchainBridgeManager = MainchainBridgeManager(companionManager); // TODO: resolve later @@ -91,15 +91,15 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.denom = 10; param.mainchainBridgeManager.roninChainId = 2020; param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days - param.mainchainBridgeManager.bridgeContract = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.bridgeContract = loadContract(Contract.MainchainGatewayV3.key()); param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; param.mainchainBridgeManager.targets = new address[](2); - param.mainchainBridgeManager.targets[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); - param.mainchainBridgeManager.targets[1] = config.getAddressFromCurrentNetwork(Contract.MainchainPauseEnforcer.key()); + param.mainchainBridgeManager.targets[0] = loadContract(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.targets[1] = loadContract(Contract.MainchainPauseEnforcer.key()); _newMainchainBridgeManager = MainchainBridgeManager( new MainchainBridgeManagerDeploy().overrideArgs( @@ -131,15 +131,15 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ function _upgradeBridgeMainchain() internal { (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); - address weth = config.getAddressFromCurrentNetwork(Contract.WETH.key()); + address weth = loadContract(Contract.WETH.key()); address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); - address mainchainGatewayV3Proxy = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + address mainchainGatewayV3Proxy = loadContract(Contract.MainchainGatewayV3.key()); ISharedArgument.SharedParameter memory param; param.mainchainBridgeManager.callbackRegisters = new address[](1); - param.mainchainBridgeManager.callbackRegisters[0] = config.getAddressFromCurrentNetwork(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.callbackRegisters[0] = loadContract(Contract.MainchainGatewayV3.key()); uint256 expiredTime = block.timestamp + 14 days; uint N = 6; diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 1f66c7b1..2cdfb65d 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -224,7 +224,7 @@ contract Migration is BaseMigration, Utils { if (currentNetwork == DefaultNetwork.LocalHost.key()) { if (config.getLocalNetwork() == IGeneralConfigExtended.LocalNetwork.Ronin) { - try config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()) returns (address payable res) { + try this.loadContract(Contract.RoninBridgeManager.key()) returns (address payable res) { proxyAdmin = res; } catch { console.log("BridgeMigration(_getProxyAdmin): RoninBridgeManager not found".yellow()); @@ -232,7 +232,7 @@ contract Migration is BaseMigration, Utils { proxyAdmin = sender(); } } else if (config.getLocalNetwork() == IGeneralConfigExtended.LocalNetwork.Eth) { - try config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()) returns (address payable res) { + try this.loadContract(Contract.MainchainBridgeManager.key()) returns (address payable res) { proxyAdmin = res; } catch { console.log("BridgeMigration(_getProxyAdmin): MainchainBridgeManager not found".yellow()); @@ -326,7 +326,6 @@ contract Migration is BaseMigration, Utils { address logic = _deployLogic(contractType); string memory proxyAbsolutePath = "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2"; - uint256 proxyNonce; address proxyAdmin = _getProxyAdmin(); assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); @@ -394,9 +393,9 @@ contract Migration is BaseMigration, Utils { function _getProxyAdminFromCurrentNetwork() internal view virtual returns (address proxyAdmin) { TNetwork currentNetwork = network(); if (currentNetwork == DefaultNetwork.RoninTestnet.key() || currentNetwork == DefaultNetwork.RoninMainnet.key()) { - proxyAdmin = config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key()); + proxyAdmin = loadContract(Contract.RoninBridgeManager.key()); } else if (currentNetwork == Network.Goerli.key() || currentNetwork == Network.EthMainnet.key()) { - proxyAdmin = config.getAddressFromCurrentNetwork(Contract.MainchainBridgeManager.key()); + proxyAdmin = loadContract(Contract.MainchainBridgeManager.key()); } else { revert("BridgeMigration(_getProxyAdminFromCurrentNetwork): Unhandled case"); } diff --git a/script/factories/factory-maptoken-mainchain.s.sol b/script/factories/factory-maptoken-mainchain.s.sol index 068cb2e5..b171e62b 100644 --- a/script/factories/factory-maptoken-mainchain.s.sol +++ b/script/factories/factory-maptoken-mainchain.s.sol @@ -27,7 +27,7 @@ abstract contract Factory__MapTokensMainchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); _mainchainGatewayV3 = config.getAddress(network().companionNetwork(), Contract.MainchainGatewayV3.key()); _mainchainBridgeManager = config.getAddress(network().companionNetwork(), Contract.MainchainBridgeManager.key()); diff --git a/script/factories/factory-maptoken-roninchain.s.sol b/script/factories/factory-maptoken-roninchain.s.sol index 701a6de8..88ce5700 100644 --- a/script/factories/factory-maptoken-roninchain.s.sol +++ b/script/factories/factory-maptoken-roninchain.s.sol @@ -29,8 +29,8 @@ abstract contract Factory__MapTokensRoninchain is Migration { function setUp() public override { super.setUp(); - _roninBridgeManager = IRoninBridgeManager(config.getAddressFromCurrentNetwork(Contract.RoninBridgeManager.key())); - _roninGatewayV3 = config.getAddressFromCurrentNetwork(Contract.RoninGatewayV3.key()); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _roninGatewayV3 = loadContract(Contract.RoninGatewayV3.key()); _governor = _initCaller(); _cheatWeightOperator(_governor); diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index 4a4e8b3e..8db4199a 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.0; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; -import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { Vm } from "forge-std/Vm.sol"; import { console } from "forge-std/console.sol"; import { IGeneralConfigExtended } from "script/interfaces/IGeneralConfigExtended.sol"; @@ -15,7 +14,6 @@ import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; -import { CoreGovernance } from "@ronin/contracts/extensions/sequential-governance/CoreGovernance.sol"; import { LibArray } from "./LibArray.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { LibCompanionNetwork } from "./LibCompanionNetwork.sol"; From 71a7a220ee295739f61d54f1cd273cfca0b7dc70 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 29 Jul 2024 17:05:10 +0700 Subject: [PATCH 251/305] fix: solve issue staticcall after broadcast --- .../20240716-deploy-bridge-manager-helper.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index cbb01591..3337df62 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -94,7 +94,7 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio ); address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newRoninBridgeManager))); - vm.broadcast(proxyAdmin); + // vm.broadcast(proxyAdmin); // // transfer admin to self // TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_newRoninBridgeManager)); From bfedde14c6fa9248ae283290f1044535f99ee2ca Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 29 Jul 2024 17:42:12 +0700 Subject: [PATCH 252/305] script: use IMainchainBridgeManager instead of MainchainBridgeManager --- .../20240405-maptoken-usdc-mainchain.s.sol | 8 +- .../20240409-maptoken-slp-mainchain.s.sol | 2 +- .../deploy-sepolia.s.sol | 6 +- ...0240411-deploy-bridge-manager-helper.s.sol | 2 +- ...40411-p1-deploy-ronin-bridge-manager.s.sol | 2 +- ...240411-p2-upgrade-bridge-ronin-chain.s.sol | 2 +- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 12 +- .../20240606-deploy-batcher-sepolia.s.sol | 8 +- .../20240612-maptoken-nft-sepolia.s.sol | 8 +- .../20240613-maptoken-erc1155-ronin.s.sol | 2 +- .../20240613-maptoken-erc1155-sepolia.s.sol | 8 +- ...0240619-p3-upgrade-bridge-main-chain.s.sol | 13 +- ...0240716-deploy-bridge-manager-helper.s.sol | 2 +- ...716-p1-1-deploy-ronin-bridge-manager.s.sol | 2 +- ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 2 +- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 18 +-- script/Migration.s.sol | 2 - .../MainchainBridgeManagerDeploy.s.sol | 6 +- .../02_Deploy_MainchainBridge.s.sol | 4 +- script/interfaces/IMainchainBridgeManager.sol | 122 ++++++++++++++++++ .../PostCheck_BridgeManager_Proposal.s.sol | 8 +- ...PostCheck_Gateway_DepositAndWithdraw.s.sol | 2 +- test/bridge/integration/BaseIntegration.t.sol | 2 +- test/helpers/MainchainBridgeAdminUtils.t.sol | 6 +- 24 files changed, 185 insertions(+), 64 deletions(-) create mode 100644 script/interfaces/IMainchainBridgeManager.sol diff --git a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol index 90b3fd29..a6d48a8d 100644 --- a/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240405-maptoken-usdc-mainchain.s.sol @@ -9,7 +9,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; @@ -108,10 +108,10 @@ contract Migration__20240405_MapTokenUsdcMainchain is Migration, Migration__MapT governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0]); + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, IMainchainBridgeManager(_mainchainBridgeManager), governors[0]); Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ - nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + nonce: IMainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, chainId: block.chainid, expiryTimestamp: expiredTime, executor: address(0), @@ -130,6 +130,6 @@ contract Migration__20240405_MapTokenUsdcMainchain is Migration, Migration__MapT SignatureConsumer.Signature[] memory signatures = _mainchainProposalUtils.generateSignatures(proposal, governorPKs); vm.broadcast(governors[0]); - MainchainBridgeManager(_mainchainBridgeManager).relayProposal(proposal, supports_, signatures); + IMainchainBridgeManager(_mainchainBridgeManager).relayProposal(proposal, supports_, signatures); } } diff --git a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol index a6f954d3..8f2e4ae6 100644 --- a/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol +++ b/script/20240403-deploy-sepolia/20240409-maptoken-slp-mainchain.s.sol @@ -10,7 +10,7 @@ import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 7c80bc9f..998e34bb 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -6,7 +6,9 @@ import { LibSharedAddress } from "@fdk/libraries/LibSharedAddress.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/ronin/gateway/PauseEnforcer.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; import { MockERC20 } from "@ronin/contracts/mocks/token/MockERC20.sol"; @@ -38,7 +40,7 @@ contract DeploySepolia is Migration, DeploySepolia__ChangeGV_Config { PauseEnforcer _mainchainPauseEnforcer; MainchainGatewayV3 _mainchainGatewayV3; - MainchainBridgeManager _mainchainBridgeManager; + IMainchainBridgeManager _mainchainBridgeManager; MockWrappedToken _mainchainWeth; MockERC20 _mainchainAxs; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol index d52c15d2..9422e97c 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-deploy-bridge-manager-helper.s.sol @@ -12,7 +12,7 @@ import { Contract } from "../utils/Contract.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol index 2a52023b..d4f8e4df 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p1-deploy-ronin-bridge-manager.s.sol @@ -11,7 +11,7 @@ import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol index a53e00ec..b3ec947c 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p2-upgrade-bridge-ronin-chain.s.sol @@ -12,7 +12,7 @@ import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/ronin/gateway/BridgeReward.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index f96fd74a..ee7b7e45 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -11,7 +11,7 @@ import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; @@ -29,8 +29,8 @@ import "./20240411-operators-key.s.sol"; import { Migration } from "../Migration.s.sol"; contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__20240409_GovernorsKey { - MainchainBridgeManager _currMainchainBridgeManager; - MainchainBridgeManager _newMainchainBridgeManager; + IMainchainBridgeManager _currMainchainBridgeManager; + IMainchainBridgeManager _newMainchainBridgeManager; address private _governor; address[] private _voters; @@ -44,7 +44,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ function run() public virtual onlyOn(Network.Sepolia.key()) { CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); - _currMainchainBridgeManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + _currMainchainBridgeManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); @@ -100,7 +100,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.targets[0] = loadContract(Contract.MainchainGatewayV3.key()); param.mainchainBridgeManager.targets[1] = loadContract(Contract.MainchainPauseEnforcer.key()); - _newMainchainBridgeManager = MainchainBridgeManager( + _newMainchainBridgeManager = IMainchainBridgeManager( new MainchainBridgeManagerDeploy().overrideArgs( abi.encodeCall( _newMainchainBridgeManager.initialize, diff --git a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol index 55594c39..e63c7237 100644 --- a/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol +++ b/script/20240606-deploy-batcher-sepolia/20240606-deploy-batcher-sepolia.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -11,7 +11,7 @@ import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; @@ -28,8 +28,8 @@ import "@ronin/script/contracts/MainchainGatewayBatcherDeploy.s.sol"; import { Migration } from "../Migration.s.sol"; contract Migration__20240606_DeployBatcherSepolia is Migration { - MainchainBridgeManager _currMainchainBridgeManager; - MainchainBridgeManager _newMainchainBridgeManager; + IMainchainBridgeManager _currMainchainBridgeManager; + IMainchainBridgeManager _newMainchainBridgeManager; MainchainGatewayV3 _currMainchainBridge; MainchainGatewayBatcher _mainchainGatewayBatcher; diff --git a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol index 7dcbdf83..f6a158da 100644 --- a/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240612-maptoken-nft-sepolia.s.sol @@ -10,7 +10,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; @@ -90,10 +90,10 @@ contract Migration__20240612_MapNTFSepoliaMainchain is Migration { governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0]); + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, IMainchainBridgeManager(_mainchainBridgeManager), governors[0]); Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ - nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + nonce: IMainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, chainId: block.chainid, expiryTimestamp: expiredTime, executor: address(0), @@ -113,6 +113,6 @@ contract Migration__20240612_MapNTFSepoliaMainchain is Migration { vm.broadcast(governors[0]); // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); + IMainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); } } diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol index 877fbf0f..f0307a92 100644 --- a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-ronin.s.sol @@ -10,7 +10,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; diff --git a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol index b1b9d32c..30f0dba6 100644 --- a/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol +++ b/script/20240612-maptoken-nft-sepolia/20240613-maptoken-erc1155-sepolia.s.sol @@ -10,7 +10,7 @@ import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibToken import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; @@ -90,10 +90,10 @@ contract Migration__20240613_MapERC1155SepoliaMainchain is Migration { governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, MainchainBridgeManager(_mainchainBridgeManager), governors[0]); + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, governorPKs, IMainchainBridgeManager(_mainchainBridgeManager), governors[0]); Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ - nonce: MainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, + nonce: IMainchainBridgeManager(_mainchainBridgeManager).round(11155111) + 1, chainId: block.chainid, expiryTimestamp: expiredTime, executor: address(0), @@ -113,6 +113,6 @@ contract Migration__20240613_MapERC1155SepoliaMainchain is Migration { vm.broadcast(governors[0]); // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); + IMainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); } } diff --git a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol index 3ac9a98b..d1839cc1 100644 --- a/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240619-upgrade-sepolia/20240619-p3-upgrade-bridge-main-chain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; @@ -11,7 +11,6 @@ import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; @@ -29,7 +28,7 @@ import "./20240619-operators-key.s.sol"; import { Migration } from "../Migration.s.sol"; contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__20240619_GovernorsKey { - MainchainBridgeManager _mainchainBridgeManager; + IMainchainBridgeManager _mainchainBridgeManager; MainchainBridgeAdminUtils _mainchainProposalUtils; address private _governor; @@ -44,7 +43,7 @@ contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__ function run() public virtual onlyOn(Network.Sepolia.key()) { CONFIG.setAddress(network(), DefaultContract.ProxyAdmin.key(), TESTNET_ADMIN); - _mainchainBridgeManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + _mainchainBridgeManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; _voters.push(0xb033ba62EC622dC54D0ABFE0254e79692147CA26); @@ -81,10 +80,10 @@ contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__ governors[0] = 0x087D08e3ba42e64E3948962dd1371F906D1278b9; governors[1] = 0x52ec2e6BBcE45AfFF8955Da6410bb13812F4289F; - _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _loadGovernorPKs(), MainchainBridgeManager(_mainchainBridgeManager), governors[0]); + _mainchainProposalUtils = new MainchainBridgeAdminUtils(2021, _loadGovernorPKs(), IMainchainBridgeManager(_mainchainBridgeManager), governors[0]); Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({ - nonce: MainchainBridgeManager(_mainchainBridgeManager).round(block.chainid) + 1, + nonce: IMainchainBridgeManager(_mainchainBridgeManager).round(block.chainid) + 1, chainId: block.chainid, expiryTimestamp: expiredTime, executor: address(0), @@ -104,6 +103,6 @@ contract Migration__20240619_P3_UpgradeBridgeMainchain is Migration, Migration__ vm.broadcast(governors[0]); // 2_000_000 to assure tx.gasleft is bigger than the gas of the proposal. - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); + IMainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: 2_000_000 }(proposal, supports_, signatures); } } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index 3337df62..e0b90085 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -13,7 +13,7 @@ import { Contract } from "../utils/Contract.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol index 8aa16882..23800007 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-1-deploy-ronin-bridge-manager.s.sol @@ -11,7 +11,7 @@ import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index fa674e9f..13eed8d4 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -14,7 +14,7 @@ import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; import "@ronin/contracts/ronin/gateway/BridgeReward.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index c3e68370..6c38d4e3 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; @@ -12,7 +12,7 @@ import { Contract } from "../utils/Contract.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; -import "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import "@ronin/contracts/libraries/Proposal.sol"; import "@ronin/contracts/libraries/Ballot.sol"; @@ -34,8 +34,8 @@ import { Migration } from "../Migration.s.sol"; contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey, Migration__MapToken_WBTC_Threshold { IRoninBridgeManager _roninBridgeManager; - MainchainBridgeManager _currMainchainBridgeManager; - MainchainBridgeManager _newMainchainBridgeManager; + IMainchainBridgeManager _currMainchainBridgeManager; + IMainchainBridgeManager _newMainchainBridgeManager; TNetwork _currentNetwork; TNetwork _companionNetwork; @@ -48,7 +48,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); - // _currMainchainBridgeManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + // _currMainchainBridgeManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); _currentNetwork = network(); _companionNetwork = config.getCompanionNetwork(_currentNetwork); @@ -56,8 +56,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ { // address companionManager = loadContract(Contract.MainchainBridgeManager.key()); - _currMainchainBridgeManager = MainchainBridgeManager(0xa71456fA88a5f6a4696D0446E690Db4a5913fab0); - // _currMainchainBridgeManager = MainchainBridgeManager(companionManager); // TODO: resolve later + _currMainchainBridgeManager = IMainchainBridgeManager(0xa71456fA88a5f6a4696D0446E690Db4a5913fab0); + // _currMainchainBridgeManager = IMainchainBridgeManager(companionManager); // TODO: resolve later } console.log("Switch back"); switchBack(prevNetwork, prevForkId); @@ -101,7 +101,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.targets[0] = loadContract(Contract.MainchainGatewayV3.key()); param.mainchainBridgeManager.targets[1] = loadContract(Contract.MainchainPauseEnforcer.key()); - _newMainchainBridgeManager = MainchainBridgeManager( + _newMainchainBridgeManager = IMainchainBridgeManager( new MainchainBridgeManagerDeploy().overrideArgs( abi.encodeCall( _newMainchainBridgeManager.initialize, @@ -309,7 +309,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ totalGas += proposal.gasAmounts[i]; } - _cheatWeightGovernor(IBridgeManager(_currMainchainBridgeManager), cheatingGov); + _cheatWeightGovernor(IBridgeManager(address(_currMainchainBridgeManager)), cheatingGov); vm.prank(cheatingGov); address(_currMainchainBridgeManager).call{ gas: totalGas }( diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 2cdfb65d..2e03c4dc 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -325,7 +325,6 @@ contract Migration is BaseMigration, Utils { bytes memory callData = arguments(); address logic = _deployLogic(contractType); - string memory proxyAbsolutePath = "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2"; address proxyAdmin = _getProxyAdmin(); assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); @@ -361,7 +360,6 @@ contract Migration is BaseMigration, Utils { string memory contractName = config.getContractName(contractType); address logic = _deployLogic(contractType); - string memory proxyAbsolutePath = "TransparentUpgradeableProxyV2.sol:TransparentUpgradeableProxyV2"; address proxyAdmin = _getProxyAdmin(); assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); diff --git a/script/contracts/MainchainBridgeManagerDeploy.s.sol b/script/contracts/MainchainBridgeManagerDeploy.s.sol index 6b1de624..9968b361 100644 --- a/script/contracts/MainchainBridgeManagerDeploy.s.sol +++ b/script/contracts/MainchainBridgeManagerDeploy.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import { Contract } from "../utils/Contract.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; @@ -13,8 +13,8 @@ import { MainchainGatewayV3Deploy } from "./MainchainGatewayV3Deploy.s.sol"; contract MainchainBridgeManagerDeploy is Migration { using LibProxy for *; - function run() public virtual returns (MainchainBridgeManager instance) { - instance = MainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key(), sender())); + function run() public virtual returns (IMainchainBridgeManager instance) { + instance = IMainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key(), sender())); address proxyAdmin = payable(address(instance)).getProxyAdmin(); // if (proxyAdmin != address(instance)) { diff --git a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol index 38b4efc3..e78f4374 100644 --- a/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol +++ b/script/deploy-v0.3.1/02_Deploy_MainchainBridge.s.sol @@ -14,7 +14,7 @@ import { IGeneralConfigExtended } from "../interfaces/IGeneralConfigExtended.sol import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { MainchainGatewayV3, MainchainGatewayV3Deploy } from "../contracts/MainchainGatewayV3Deploy.s.sol"; import { WethUnwrapper, MainchainWethUnwrapperDeploy } from "../contracts/MainchainWethUnwrapperDeploy.s.sol"; -import { MainchainBridgeManager, MainchainBridgeManagerDeploy } from "../contracts/MainchainBridgeManagerDeploy.s.sol"; +import { IMainchainBridgeManager, MainchainBridgeManagerDeploy } from "../contracts/MainchainBridgeManagerDeploy.s.sol"; contract Migration_02_Deploy_MainchainBridge is Migration { using StdStyle for *; @@ -23,7 +23,7 @@ contract Migration_02_Deploy_MainchainBridge is Migration { address private _weth; WethUnwrapper private _mainchainWethUnwrapper; MainchainGatewayV3 private _mainchainGatewayV3; - MainchainBridgeManager private _mainchainBridgeManager; + IMainchainBridgeManager private _mainchainBridgeManager; function _injectDependencies() internal virtual override { _setDependencyDeployScript(Contract.WETH.key(), new WETHDeploy()); diff --git a/script/interfaces/IMainchainBridgeManager.sol b/script/interfaces/IMainchainBridgeManager.sol new file mode 100644 index 00000000..9a6704ed --- /dev/null +++ b/script/interfaces/IMainchainBridgeManager.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { ContractType } from "@ronin/contracts/utils/ContractType.sol"; +import { RoleAccess } from "@ronin/contracts/utils/RoleAccess.sol"; +import { Proposal } from "@ronin/contracts/libraries/Proposal.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; +import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; +import { Ballot } from "@ronin/contracts/libraries/Ballot.sol"; + +interface IMainchainBridgeManager is VoteStatusConsumer, SignatureConsumer { + error ErrBelowMinRequiredGovernors(); + error ErrContractTypeNotFound(ContractType contractType); + error ErrCurrentProposalIsNotCompleted(); + error ErrDuplicated(bytes4 msgSig); + error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData); + error ErrGovernorNotFound(address governor); + error ErrGovernorNotMatch(address required, address sender); + error ErrInsufficientGas(bytes32 proposalHash); + error ErrInvalidArguments(bytes4 msgSig); + error ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected); + error ErrInvalidExpiryTimestamp(); + error ErrInvalidInput(); + error ErrInvalidOrder(bytes4 msgSig); + error ErrInvalidProposalNonce(bytes4 msgSig); + error ErrInvalidThreshold(bytes4 msgSig); + error ErrInvalidVoteWeight(bytes4 msgSig); + error ErrLengthMismatch(bytes4 msgSig); + error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg); + error ErrNonExecutorCannotRelay(address executor, address caller); + error ErrOnlySelfCall(bytes4 msgSig); + error ErrOperatorNotFound(address operator); + error ErrRelayFailed(bytes4 msgSig); + error ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole); + error ErrUnsupportedInterface(bytes4 interfaceId, address addr); + error ErrUnsupportedVoteType(bytes4 msgSig); + error ErrVoteIsFinalized(); + error ErrZeroAddress(bytes4 msgSig); + error ErrZeroCodeContract(address addr); + + event BridgeOperatorAddingFailed(address indexed operator); + event BridgeOperatorRemovingFailed(address indexed operator); + event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator); + event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators); + event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators); + event CallbackRegistered(address, bool); + event ContractUpdated(ContractType indexed contractType, address indexed addr); + event GlobalProposalCreated( + uint256 indexed round, + bytes32 indexed proposalHash, + Proposal.ProposalDetail proposal, + bytes32 globalProposalHash, + GlobalProposal.GlobalProposalDetail globalProposal, + address creator + ); + event Initialized(uint8 version); + event MinRequiredGovernorUpdated(uint256 min); + event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas); + event ProposalApproved(bytes32 indexed proposalHash); + event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator); + event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas); + event ProposalExpired(bytes32 indexed proposalHash); + event ProposalExpiryDurationChanged(uint256 indexed duration); + event ProposalRejected(bytes32 indexed proposalHash); + event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight); + event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr); + event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator); + + function DOMAIN_SEPARATOR() external view returns (bytes32); + function addBridgeOperators(uint96[] memory voteWeights, address[] memory governors, address[] memory bridgeOperators) external; + function checkThreshold(uint256 voteWeight) external view returns (bool); + function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight); + function getBridgeOperators() external view returns (address[] memory); + function getCallbackRegisters() external view returns (address[] memory registers); + function getContract(ContractType contractType) external view returns (address contract_); + function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights); + function getGovernorOf(address operator) external view returns (address governor); + function getGovernorWeight(address governor) external view returns (uint96 weight); + function getGovernorWeights(address[] memory governors) external view returns (uint96[] memory weights); + function getGovernors() external view returns (address[] memory); + function getOperatorOf(address governor) external view returns (address operator); + function getProposalExpiryDuration() external view returns (uint256); + function getThreshold() external view returns (uint256 num, uint256 denom); + function getTotalWeight() external view returns (uint256); + function globalProposalRelayed(uint256 _round) external view returns (bool); + function initialize( + uint256 num, + uint256 denom, + uint256 roninChainId, + address bridgeContract, + address[] memory callbackRegisters, + address[] memory bridgeOperators, + address[] memory governors, + uint96[] memory voteWeights, + GlobalProposal.TargetOption[] memory targetOptions, + address[] memory targets + ) external; + function isBridgeOperator(address addr) external view returns (bool); + function minimumVoteWeight() external view returns (uint256); + function registerCallbacks(address[] memory registers) external; + function relayGlobalProposal( + GlobalProposal.GlobalProposalDetail memory globalProposal, + Ballot.VoteType[] memory supports_, + Signature[] memory signatures + ) external; + function relayProposal(Proposal.ProposalDetail memory proposal, Ballot.VoteType[] memory supports_, Signature[] memory signatures) external; + function removeBridgeOperators(address[] memory bridgeOperators) external; + function resolveTargets(GlobalProposal.TargetOption[] memory targetOptions) external view returns (address[] memory targets); + function round(uint256) external view returns (uint256); + function setContract(ContractType contractType, address addr) external; + function setMinRequiredGovernor(uint256 min) external; + function setThreshold(uint256 num, uint256 denom) external; + function sumGovernorsWeight(address[] memory governors) external view returns (uint256 sum); + function totalBridgeOperator() external view returns (uint256); + function unregisterCallbacks(address[] memory registers) external; + function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external; + function vote( + uint256, + uint256 + ) external view returns (VoteStatus status, bytes32 hash, uint256 againstVoteWeight, uint256 forVoteWeight, uint256 expiryTimestamp); +} diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index d6cba14e..5dc3659e 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -6,7 +6,7 @@ import { TransparentUpgradeableProxyV2, TransparentUpgradeableProxy } from "@ron import { BasePostCheck } from "../../BasePostCheck.s.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { TContract, Contract } from "script/utils/Contract.sol"; import { TNetwork, Network } from "script/utils/Network.sol"; import { LibArray } from "script/shared/libraries/LibArray.sol"; @@ -68,7 +68,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); - MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + IMainchainBridgeManager mainchainManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); uint256 snapshotId = vm.snapshot(); @@ -113,7 +113,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); - MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + IMainchainBridgeManager mainchainManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); uint256 snapshotId = vm.snapshot(); @@ -219,7 +219,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); - MainchainBridgeManager mainchainManager = MainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); + IMainchainBridgeManager mainchainManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); uint256 snapshotId = vm.snapshot(); diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol index d57e2b0e..2d0b3687 100644 --- a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -19,7 +19,7 @@ import { LibArray } from "script/shared/libraries/LibArray.sol"; import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/SignatureConsumer.sol"; import { IRoninGatewayV3, RoninGatewayV3 } from "@ronin/contracts/ronin/gateway/RoninGatewayV3.sol"; import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { IMainchainGatewayV3, MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { HasContracts } from "@ronin/contracts/extensions/collections/HasContracts.sol"; diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 962cbba7..cd9a9a8d 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -16,7 +16,7 @@ import { BridgeSlash } from "@ronin/contracts/ronin/gateway/BridgeSlash.sol"; import { BridgeReward } from "@ronin/contracts/ronin/gateway/BridgeReward.sol"; import { MainchainGatewayV3 } from "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; import { MainchainGatewayBatcher } from "@ronin/contracts/mainchain/MainchainGatewayBatcher.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { WethUnwrapper } from "@ronin/contracts/extensions/WethUnwrapper.sol"; import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; import { MockUSDC } from "@ronin/contracts/mocks/token/MockUSDC.sol"; diff --git a/test/helpers/MainchainBridgeAdminUtils.t.sol b/test/helpers/MainchainBridgeAdminUtils.t.sol index e90fe7a9..6a183e28 100644 --- a/test/helpers/MainchainBridgeAdminUtils.t.sol +++ b/test/helpers/MainchainBridgeAdminUtils.t.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import "./ProposalUtils.t.sol"; contract MainchainBridgeAdminUtils is ProposalUtils { - MainchainBridgeManager _contract; + IMainchainBridgeManager _contract; address _sender; - constructor(uint256 roninChainId, uint256[] memory signerPKs, MainchainBridgeManager contract_, address sender) ProposalUtils(roninChainId, signerPKs) { + constructor(uint256 roninChainId, uint256[] memory signerPKs, IMainchainBridgeManager contract_, address sender) ProposalUtils(roninChainId, signerPKs) { _contract = contract_; _sender = sender; } From ee80d5819b22ef649547dc6f32388bcea768962c Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 29 Jul 2024 17:43:40 +0700 Subject: [PATCH 253/305] script: fix remove unused deploy logic --- script/Migration.s.sol | 2 -- 1 file changed, 2 deletions(-) diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 2e03c4dc..00a0fa9d 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -324,7 +324,6 @@ contract Migration is BaseMigration, Utils { string memory contractName = config.getContractName(contractType); bytes memory callData = arguments(); - address logic = _deployLogic(contractType); address proxyAdmin = _getProxyAdmin(); assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); @@ -359,7 +358,6 @@ contract Migration is BaseMigration, Utils { ) internal virtual override logFn(string.concat("_deployProxy ", TContract.unwrap(contractType).unpackOne())) returns (address payable deployed) { string memory contractName = config.getContractName(contractType); - address logic = _deployLogic(contractType); address proxyAdmin = _getProxyAdmin(); assertTrue(proxyAdmin != address(0x0), "BaseMigration: Null ProxyAdmin"); From 486163024454afb5baec3d5d580d811b698d04a4 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 30 Jul 2024 10:20:26 +0700 Subject: [PATCH 254/305] chore: fix compile error in test --- test/bridge/integration/BaseIntegration.t.sol | 2 +- .../executor.relayGlobal.MainchainBridgeManager.t.sol | 4 ++-- .../voteBridgeOperator.RoninBridgeManager.t.sol | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index cd9a9a8d..47bfd468 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -95,7 +95,7 @@ contract BaseIntegration_Test is Base_Test { PauseEnforcer _mainchainPauseEnforcer; MainchainGatewayV3 _mainchainGatewayV3; MainchainGatewayBatcher _mainchainGatewayBatcher; - MainchainBridgeManager _mainchainBridgeManager; + IMainchainBridgeManager _mainchainBridgeManager; WethUnwrapper _mainchainWethUnwrapper; MockWrappedToken _roninWeth; diff --git a/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol index c0a97047..ae91a290 100644 --- a/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/proposal-executor/executor.relayGlobal.MainchainBridgeManager.t.sol @@ -100,7 +100,7 @@ contract ProposalWithExecutor_GlobalProposal_MainchainBridgeManager_Test is Base function test_relayGlobal_autoProposal_revertWhen_proposalIsAlreadyExecuted() external { test_relayGlobal_autoProposal_strictProposal_WhenAllInternalCallsPass(); - vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, MainchainBridgeManager.relayGlobalProposal.selector)); + vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, IMainchainBridgeManager.relayGlobalProposal.selector)); vm.prank(_param.roninBridgeManager.governors[0]); _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); @@ -131,7 +131,7 @@ contract ProposalWithExecutor_GlobalProposal_MainchainBridgeManager_Test is Base function test_relayGlobal_executorProposal_revertWhen_proposalIsAlreadyExecuted() external { test_relayGlobal_executorProposal_strictProposal_WhenAllInternalCallsPass(); - vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, MainchainBridgeManager.relayGlobalProposal.selector)); + vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, IMainchainBridgeManager.relayGlobalProposal.selector)); vm.prank(_param.roninBridgeManager.governors[0]); _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); diff --git a/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol b/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol index 110d1070..36172722 100644 --- a/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol +++ b/test/bridge/integration/bridge-manager/propose-and-cast-vote/voteBridgeOperator.RoninBridgeManager.t.sol @@ -102,7 +102,7 @@ contract VoteBridgeOperator_RoninBridgeManager_Test is BaseIntegration_Test { function test_RevertWhen_RelayAgain() public { test_relayAddBridgeOperator(); - vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, MainchainBridgeManager.relayGlobalProposal.selector)); + vm.expectRevert(abi.encodeWithSelector(ErrInvalidProposalNonce.selector, IMainchainBridgeManager.relayGlobalProposal.selector)); vm.prank(_param.mainchainBridgeManager.governors[0]); _mainchainBridgeManager.relayGlobalProposal(_globalProposal, _supports, _signatures); From ba7854e17b7f2d58ae44486cb098b5cece61df0b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 30 Jul 2024 10:21:56 +0700 Subject: [PATCH 255/305] script: add verify proposal script --- ...0240716-deploy-bridge-manager-helper.s.sol | 8 +-- ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 20 ++++---- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 48 +++++++++++------- .../verify-script.s.sol | 49 ++++++++++++------- 4 files changed, 76 insertions(+), 49 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index e0b90085..4a456e33 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -94,10 +94,12 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio ); address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newRoninBridgeManager))); - // vm.broadcast(proxyAdmin); - // // transfer admin to self - // TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_newRoninBridgeManager)); + console.log("Finish deploy Ronin Bridge Manager"); + + // transfer admin to self + vm.broadcast(proxyAdmin); + TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_newRoninBridgeManager)); return _newRoninBridgeManager; } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index 13eed8d4..c5fa8979 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -37,7 +37,7 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is using StdStyle for *; ISharedArgument.SharedParameter _param; - LegacyProposalDetail _proposal; + LegacyProposalDetail _roninProposal; function setUp() public virtual override { super.setUp(); @@ -164,20 +164,20 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is gasAmounts[i] = 1_000_000; } - _proposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; - _proposal.chainId = block.chainid; - _proposal.expiryTimestamp = block.timestamp + 14 days; - _proposal.targets = targets; - _proposal.values = values; - _proposal.calldatas = calldatas; - _proposal.gasAmounts = gasAmounts; + _roninProposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; + _roninProposal.chainId = block.chainid; + _roninProposal.expiryTimestamp = block.timestamp + 14 days; + _roninProposal.targets = targets; + _roninProposal.values = values; + _roninProposal.calldatas = calldatas; + _roninProposal.gasAmounts = gasAmounts; - _helperProposeForCurrentNetwork(_proposal); + _helperProposeForCurrentNetwork(_roninProposal); } function _postCheck() internal virtual override { console.log("Starting post-check".bold().cyan()); - _helperVoteForCurrentNetwork(_proposal); + _helperVoteForCurrentNetwork(_roninProposal); super._postCheck(); } } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 6c38d4e3..edd14f18 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -33,6 +33,8 @@ import "./wbtc-threshold.s.sol"; import { Migration } from "../Migration.s.sol"; contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey, Migration__MapToken_WBTC_Threshold { + using StdStyle for *; + IRoninBridgeManager _roninBridgeManager; IMainchainBridgeManager _currMainchainBridgeManager; IMainchainBridgeManager _newMainchainBridgeManager; @@ -40,6 +42,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ TNetwork _currentNetwork; TNetwork _companionNetwork; + LegacyProposalDetail _mainchainProposal; + address private _governor; function setUp() public virtual override { @@ -60,7 +64,10 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ // _currMainchainBridgeManager = IMainchainBridgeManager(companionManager); // TODO: resolve later } console.log("Switch back"); - switchBack(prevNetwork, prevForkId); + console.log("Current network:", vm.toString(TNetwork.unwrap(_currentNetwork))); + console.log("Prev network:", vm.toString(TNetwork.unwrap(prevNetwork))); + switchBack(_currentNetwork, prevForkId); + // switchBack(prevNetwork, prevForkId); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; @@ -69,6 +76,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _deployMainchainBridgeManager() internal returns (address mainchainBM) { + console.log("Switch to companion"); (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); ISharedArgument.SharedParameter memory param; @@ -123,7 +131,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); vm.broadcast(proxyAdmin); - TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); + // TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); + TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_newMainchainBridgeManager)); switchBack(prevNetwork, prevForkId); } @@ -200,15 +209,13 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ gasAmounts[i] = 1_000_000; } - LegacyProposalDetail memory proposal; - - proposal.nonce = _currMainchainBridgeManager.round(Network.EthMainnet.chainId()) + 1; - proposal.chainId = Network.EthMainnet.chainId(); - proposal.expiryTimestamp = expiredTime; - proposal.targets = targets; - proposal.values = values; - proposal.calldatas = calldatas; - proposal.gasAmounts = gasAmounts; + _mainchainProposal.nonce = _currMainchainBridgeManager.round(Network.EthMainnet.chainId()) + 1; + _mainchainProposal.chainId = Network.EthMainnet.chainId(); + _mainchainProposal.expiryTimestamp = expiredTime; + _mainchainProposal.targets = targets; + _mainchainProposal.values = values; + _mainchainProposal.calldatas = calldatas; + _mainchainProposal.gasAmounts = gasAmounts; switchBack(prevNetwork, prevForkId); @@ -216,16 +223,21 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ address(_roninBridgeManager).call( abi.encodeWithSignature( "propose(uint256,uint256,address[],uint256,bytes[],uint256[])", - proposal.chainId, - proposal.expiryTimestamp, - proposal.targets, - proposal.values, - proposal.calldatas, - proposal.gasAmounts + _mainchainProposal.chainId, + _mainchainProposal.expiryTimestamp, + _mainchainProposal.targets, + _mainchainProposal.values, + _mainchainProposal.calldatas, + _mainchainProposal.gasAmounts ) ); + } + + function _postCheck() internal virtual override { + console.log("Starting post-check".bold().cyan()); + _simulateProposal(_mainchainProposal); - _simulateProposal(proposal); + super._postCheck(); } function getDomain() public pure returns (bytes32) { diff --git a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol index ad5bfd90..a6368a88 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol @@ -1,23 +1,36 @@ -// // SPDX-License-Identifier: MIT -// pragma solidity ^0.8.19; +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; -// import "./20240716-p2-upgrade-bridge-ronin-chain.s.sol"; -// import "./20240716-p3-upgrade-bridge-main-chain.s.sol"; -// import { TNetwork } from "@fdk/types/TNetwork.sol"; +import "./20240716-p2-upgrade-bridge-ronin-chain.s.sol"; +import "./20240716-p3-upgrade-bridge-main-chain.s.sol"; +import { TNetwork } from "@fdk/types/TNetwork.sol"; -// contract Verify_Script_20240716 is Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain { -// function setUp() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { -// Migration__20240716_P2_UpgradeBridgeRoninchain.setUp(); -// } +contract Verify_Script_20240716 is Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain { + using StdStyle for *; -// function run() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { -// TNetwork currentNetwork = network(); -// TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); -// // Migration__20240716_P2_UpgradeBridgeRoninchain.run(); + function setUp() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { + Migration__20240716_P2_UpgradeBridgeRoninchain.setUp(); + } -// (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); -// Migration__20240716_P3_UpgradeBridgeMainchain.run(); + function run() public override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { + TNetwork currentNetwork = network(); + TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); -// switchBack(prevNetwork, prevForkId); -// } -// } + console.log("*** Verify proposal Ronin chain".bold().cyan()); + Migration__20240716_P2_UpgradeBridgeRoninchain.run(); + + console.log("*** Verify proposal Main chain".bold().cyan()); + Migration__20240716_P3_UpgradeBridgeMainchain.run(); + // switchBack(prevNetwork, prevForkId); + } + + function _postCheck() internal virtual override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { + console.log("Starting post-check".bold().cyan()); + + _helperVoteForCurrentNetwork(_roninProposal); + _simulateProposal(_mainchainProposal); + + Migration._postCheck(); + // super._postCheck(); + } +} From 871c2879e929f26f33c6cde6c61d6b76e07e7d54 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 30 Jul 2024 11:14:26 +0700 Subject: [PATCH 256/305] script: fix create unused fork --- script/PostChecker.sol | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/script/PostChecker.sol b/script/PostChecker.sol index a7a433b4..3f33df89 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import { console } from "forge-std/console.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { TContract, Contract } from "script/utils/Contract.sol"; import { Network } from "script/utils/Network.sol"; @@ -15,10 +16,6 @@ import { ProxyInterface } from "@fdk/libraries/LibDeploy.sol"; contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { using LibCompanionNetwork for *; - function setUp() public virtual override(BaseMigration, Migration) { - super.setUp(); - } - function run() external { _loadSysContract(); _validate_BridgeManager(); @@ -60,7 +57,9 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { _loadRoninContracts(currentNetwork); } else { TNetwork companionNetwork = currentNetwork.companionNetwork(); - switchTo(companionNetwork); + uint256 originForkBlockNumber = config.getRuntimeConfig().forkBlockNumber; + uint256 originForkId = config.getForkId(companionNetwork, originForkBlockNumber); + config.switchTo(originForkId); _loadRoninContracts(companionNetwork); } } From 8071c31a62caec3bcf9c9ededefe0449b2f88354 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 30 Jul 2024 11:24:34 +0700 Subject: [PATCH 257/305] script: minor refactor --- .../20240131-maptoken-pixel-roninchain.s.sol | 2 +- script/20240308-maptoken-aperios/base-maptoken.s.sol | 2 +- script/20240403-deploy-sepolia/deploy-sepolia.s.sol | 2 +- script/Migration.s.sol | 5 ----- .../quorum/PostCheck_BridgeManager_Quorum.s.sol | 1 - 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol index f46e1ceb..d72c6a64 100644 --- a/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol +++ b/script/20240131-maptoken-pixel/20240131-maptoken-pixel-roninchain.s.sol @@ -17,7 +17,7 @@ import { Migration } from "../Migration.s.sol"; import { Network } from "../utils/Network.sol"; import { Contract } from "../utils/Contract.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; -import "forge-std/console.sol"; +import { console } from "forge-std/console.sol"; import "./maptoken-pixel-configs.s.sol"; import "./update-axiechat-config.s.sol"; diff --git a/script/20240308-maptoken-aperios/base-maptoken.s.sol b/script/20240308-maptoken-aperios/base-maptoken.s.sol index e802fbd7..f9ee8fc4 100644 --- a/script/20240308-maptoken-aperios/base-maptoken.s.sol +++ b/script/20240308-maptoken-aperios/base-maptoken.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import "forge-std/console.sol"; +import { console } from "forge-std/console.sol"; import "./caller-configs.s.sol"; import "./maptoken-aperios-configs.s.sol"; diff --git a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol index 998e34bb..85bea523 100644 --- a/script/20240403-deploy-sepolia/deploy-sepolia.s.sol +++ b/script/20240403-deploy-sepolia/deploy-sepolia.s.sol @@ -33,7 +33,7 @@ import { Migration } from "../Migration.s.sol"; import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import "./changeGV-config.s.sol"; -import "forge-std/console.sol"; +import { console } from "forge-std/console.sol"; contract DeploySepolia is Migration, DeploySepolia__ChangeGV_Config { ISharedArgument.SharedParameter _param; diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 00a0fa9d..9c0f840e 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { ProxyAdmin } from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import { LibString } from "solady/utils/LibString.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { console } from "forge-std/console.sol"; @@ -31,10 +30,6 @@ contract Migration is BaseMigration, Utils { uint256 internal constant DEFAULT_PROPOSAL_GAS = 1_000_000; ISharedArgument internal constant config = ISharedArgument(address(CONFIG)); - function setUp() public virtual override { - super.setUp(); - } - function _postCheck() internal virtual override { address postChecker = _deployImmutable(Contract.PostChecker.key()); vm.allowCheatcodes(postChecker); diff --git a/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol b/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol index c7444a5f..1fedfa8a 100644 --- a/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol +++ b/script/post-check/bridge-manager/quorum/PostCheck_BridgeManager_Quorum.s.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import { TransparentUpgradeableProxyV2 } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; import { IQuorum } from "@ronin/contracts/interfaces/IQuorum.sol"; import { BasePostCheck } from "script/post-check/BasePostCheck.s.sol"; From 3595fbae18934f3571a6b635bf67b0da821f750b Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 30 Jul 2024 13:38:37 +0700 Subject: [PATCH 258/305] script: resolve contract collision --- ...0240411-p3-upgrade-bridge-main-chain.s.sol | 1 + script/PostChecker.sol | 27 +++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol index ee7b7e45..7b2ec232 100644 --- a/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240411-upgrade-v3.2.0-testnet/20240411-p3-upgrade-bridge-main-chain.s.sol @@ -126,6 +126,7 @@ contract Migration__20240409_P3_UpgradeBridgeMainchain is Migration, Migration__ } function _upgradeBridgeMainchain() internal { + console.log("Upgrading Bridge Mainchain...."); address weth = loadContract(Contract.WETH.key()); address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); diff --git a/script/PostChecker.sol b/script/PostChecker.sol index 3f33df89..44613279 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.19; import { console } from "forge-std/console.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { BaseMigration } from "@fdk/BaseMigration.s.sol"; import { TContract, Contract } from "script/utils/Contract.sol"; import { Network } from "script/utils/Network.sol"; @@ -55,13 +56,25 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { || currentNetwork == DefaultNetwork.LocalHost.key() ) { _loadRoninContracts(currentNetwork); + + (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); + mainchainGateway = CONFIG.getAddress(companionNetwork, Contract.MainchainGatewayV3.key()); + mainchainBridgeManager = CONFIG.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); } else { - TNetwork companionNetwork = currentNetwork.companionNetwork(); + mainchainGateway = loadContract(Contract.MainchainGatewayV3.key()); + mainchainBridgeManager = loadContract(Contract.MainchainBridgeManager.key()); + + console.log("Mainchain Bridge Manager Logic:", LibProxy.getProxyImplementation(mainchainBridgeManager)); + (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); + uint256 originForkBlockNumber = config.getRuntimeConfig().forkBlockNumber; uint256 originForkId = config.getForkId(companionNetwork, originForkBlockNumber); config.switchTo(originForkId); + _loadRoninContracts(companionNetwork); } + + _markSysContractsAsPersistent(); } function _loadRoninContracts(TNetwork roninNetwork) private { @@ -70,16 +83,8 @@ contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { roninGateway = loadContract(Contract.RoninGatewayV3.key()); bridgeTracking = loadContract(Contract.BridgeTracking.key()); roninBridgeManager = loadContract(Contract.RoninBridgeManager.key()); + } - (, TNetwork companionNetwork) = roninNetwork.companionNetworkData(); - mainchainGateway = CONFIG.getAddress(companionNetwork, Contract.MainchainGatewayV3.key()); - mainchainBridgeManager = CONFIG.getAddress(companionNetwork, Contract.MainchainBridgeManager.key()); - - vm.makePersistent(bridgeSlash); - vm.makePersistent(bridgeReward); - vm.makePersistent(roninGateway); - vm.makePersistent(roninBridgeManager); - vm.makePersistent(mainchainGateway); - vm.makePersistent(mainchainBridgeManager); + function _markSysContractsAsPersistent() internal { } } From be0993afd894d28d3a20667e1759bdaa913ae4a1 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 30 Jul 2024 15:32:50 +0700 Subject: [PATCH 259/305] chore: add BridgeManager artifact --- .../RoninBridgeManagerConstructorLogic.json | 615 ++++++++++++++++++ .../RoninBridgeManagerConstructorProxy.json | 54 ++ 2 files changed, 669 insertions(+) create mode 100644 deployments/ronin-mainnet/RoninBridgeManagerConstructorLogic.json create mode 100644 deployments/ronin-mainnet/RoninBridgeManagerConstructorProxy.json diff --git a/deployments/ronin-mainnet/RoninBridgeManagerConstructorLogic.json b/deployments/ronin-mainnet/RoninBridgeManagerConstructorLogic.json new file mode 100644 index 00000000..bfeb557f --- /dev/null +++ b/deployments/ronin-mainnet/RoninBridgeManagerConstructorLogic.json @@ -0,0 +1,615 @@ +{ + "abi": "[{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addBridgeOperators\",\"inputs\":[{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperatorWeight\",\"inputs\":[{\"name\":\"bridgeOperator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperators\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCallbackRegisters\",\"inputs\":[],\"outputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFullBridgeOperatorInfos\",\"inputs\":[],\"outputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalProposalSignatures\",\"inputs\":[{\"name\":\"round_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"voters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorOf\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeight\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeights\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernors\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorOf\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalSignatures\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"_voters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_supports\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"_signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalProposalVoted\",\"inputs\":[{\"name\":\"round_\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"roninChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryDuration\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bridgeContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"callbackRegisters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isBridgeOperator\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposalVoted\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeBridgeOperators\",\"inputs\":[{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolveTargets\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"}],\"outputs\":[{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"round\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinRequiredGovernor\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sumGovernorsWeight\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"sum\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalBridgeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unregisterCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateManyTargetOption\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"vote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"againstVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"forVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BridgeOperatorAddingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorRemovingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorUpdated\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsAdded\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"indexed\":false,\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsRemoved\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallbackRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalProposalCreated\",\"inputs\":[{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"globalProposalHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"globalProposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinRequiredGovernorUpdated\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Notified\",\"inputs\":[{\"name\":\"callData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"registers\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalApproved\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalCreated\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExecuted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"successCalls\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpired\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpiryDurationChanged\",\"inputs\":[{\"name\":\"duration\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalRejected\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalVoted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"voter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"support\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TargetOptionUpdated\",\"inputs\":[{\"name\":\"targetOption\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrBelowMinRequiredGovernors\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrCurrentProposalIsNotCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrDuplicated\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrExistOneInternalCallFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"callData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotFound\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotMatch\",\"inputs\":[{\"name\":\"required\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidArguments\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidInput\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidVoteWeight\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOnlySelfCall\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOperatorNotFound\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrVoteIsFinalized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroAddress\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + "absolutePath": "RoninBridgeManagerConstructor.sol", + "address": "0x89F25eF52e46e583eAd6C5e1acD2471ed499C8C7", + "ast": "", + "blockNumber": 36830781, + "bytecode": "\"0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61398280620000f46000396000f3fe608060405234801561001057600080fd5b50600436106101965760003560e01c806301a5f43f1461019b57806306aba0e1146101b05780630a44fa43146101cb5780630f7c3189146101de5780631c905e39146101f35780631f425338146102155780632c5e6520146102285780632d6d7d731461024b57806334d5f37b1461025e57806335da81211461027e5780633644e515146102915780637d4c1d781461029a5780637de5dedd146102ad5780637f7fe058146102b5578063800eaab3146102d5578063828fc1a1146102e8578063865e6fd3146102fb578063901979d51461030e5780639b19dbfd14610339578063a64a838014610341578063aee1767f14610354578063b384abef14610367578063b405aaf2146103c2578063b9c36209146103d5578063bc4e068f146103e8578063c441c4a8146103fb578063cc7e6b3b14610412578063d0a50db014610432578063d78392f81461043a578063dafae4081461044d578063de981f1b14610460578063e75235b814610473578063e9c0349814610490578063f80b5352146104a3575b600080fd5b6101ae6101a9366004612d91565b6104ab565b005b6101b861055a565b6040519081526020015b60405180910390f35b6101b86101d9366004612e2a565b610569565b6101e66105ee565b6040516101c29190612eb0565b610206610201366004612ec3565b610600565b6040516101c293929190612efb565b6101ae610223366004612e2a565b61061c565b61023b610236366004612fce565b6106bb565b60405190151581526020016101c2565b6101e6610259366004612e2a565b6106c8565b6101b861026c366004613003565b60026020526000908152604090205481565b6101ae61028c366004612e2a565b61070f565b6101b860015481565b6101ae6102a83660046131dd565b610757565b6101b8610893565b6102c86102c3366004613317565b6108e9565b6040516101c29190613332565b6101ae6102e3366004613346565b61095c565b61023b6102f63660046133a9565b610994565b6101ae6103093660046133e4565b6109a2565b61032161031c366004613317565b6109bd565b6040516001600160601b0390911681526020016101c2565b6101e66109f3565b6101ae61034f366004613003565b610a5e565b6102c8610362366004613317565b610a72565b6103b1610375366004612ec3565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101c295949392919061340e565b61023b6103d0366004613317565b610a84565b6101ae6103e3366004612ec3565b610abc565b6102066103f6366004613003565b610ace565b610403610aeb565b6040516101c29392919061347d565b610425610420366004612e2a565b610bc5565b6040516101c291906134c0565b6101b8610c03565b610321610448366004613317565b610c16565b61023b61045b366004613003565b610c21565b6102c861046e3660046134d3565b610c5d565b61047b610cbf565b604080519283526020830191909152016101c2565b6101ae61049e366004612e2a565b610ce1565b6101e6610d2a565b6104b3610d8d565b61055186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610de992505050565b50505050505050565b600061056461114b565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105aa925083915061115e9050565b6105e684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061119392505050565b949350505050565b60606105646105fb611218565b61123c565b606080606061060f8585611250565b9250925092509250925092565b610624610d8d565b818180806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610663925083915061115e9050565b600061066d611218565b905060005b838110156106b4576106ab85858381811061068f5761068f6134ee565b90506020020160208101906106a49190613317565b8390611639565b50600101610672565b5050505050565b60006105e684848461164e565b606061070683838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611684915050565b90505b92915050565b610717610d8d565b6107538282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506117d792505050565b5050565b600054610100900460ff16158080156107775750600054600160ff909116105b806107915750303b158015610791575060005460ff166001145b6107f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561081c576000805461ff0019166101001790555b61082589611892565b61082f83836118c2565b61083f8c8c8c8b8b8b8b8b6118f3565b8015610885576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60008061089e611944565b90506000806108ab610cbf565b91509150806001828560040154856108c3919061351a565b6108cd9190613531565b6108d79190613544565b6108e19190613557565b935050505090565b60008060006108ff6108f9611944565b85611968565b9150915081610923578360405163141e2e1f60e11b81526004016107f09190613332565b61092b611944565b600101818154811061093f5761093f6134ee565b6000918252602090912001546001600160a01b0316949350505050565b33301461098a576000356001600160e01b0319166040516307337e1960e41b81526004016107f09190613579565b61075382826119cd565b60006107066000848461164e565b6109aa610d8d565b6109b381611a76565b6107538282611aa3565b6000806109c8611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109fd611944565b600101805480602002602001604051908101604052809291908181526020018280548015610a5457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a36575b5050505050905090565b610a66610d8d565b610a6f81611b2e565b50565b6000610a7d82611b9b565b5092915050565b600080610a8f611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610ac4610d8d565b6107538282611c12565b6060806060610ade600085611250565b9250925092509193909250565b60608060606000610afa611944565b805460408051602080840282018101909252828152929350839190830182828015610b4e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b30575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b50505050509250610bbd84611cc4565b915050909192565b6060610706838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611cc492505050565b6000610c0d611944565b60010154919050565b600061070982611db0565b600080610c2c611de5565b9050610c3661114b565b8160010154610c45919061351a565b6002820154610c54908561351a565b10159392505050565b6000610c67611e09565b600083600f811115610c7b57610c7b612ee5565b60ff1681526020810191909152604001600020546001600160a01b0316905080610cba578160405163409140df60e11b81526004016107f0919061358e565b919050565b6000806000610ccc611de5565b90508060010154816002015492509250509091565b610ce9610d8d565b610d25828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e2d92505050565b505050565b6060610d34611944565b805460408051602080840282018101909252828152929190830182828015610a54576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a36575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610de7576000356001600160e01b0319166001604051620f948f60ea1b81526004016107f09291906135a8565b565b6060610df58383612213565b610dfe8161115e565b6000610e08611944565b845187519192509081148015610e1e5750855181145b610e49576000356001600160e01b0319166040516306b5667560e21b81526004016107f09190613579565b806001600160401b03811115610e6157610e6161301c565b604051908082528060200260200182016040528015610e8a578160200160208202803683370190505b50935080600003610e9c575050611143565b60008060008060005b858110156110af578a8181518110610ebf57610ebf6134ee565b60200260200101519450898181518110610edb57610edb6134ee565b602002602001015193508b8181518110610ef757610ef76134ee565b60200260200101519250610f0a8561231d565b610f138461231d565b826001600160601b0316600003610f4b576000356001600160e01b031916604051637f11b8a360e11b81526004016107f09190613579565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692610fa39290811691166135d6565b610fad91906135d6565b610fb791906135d6565b6001600160601b0316600014898281518110610fd557610fd56134ee565b602002602001019015159081151581525050888181518110610ff957610ff96134ee565b6020026020010151156110a7578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556110a49083613531565b91505b600101610ea5565b50808660040160008282546110c49190613531565b90915550506040516110ff906347c28ec560e11b906110eb908c908f908d90602001613629565b604051602081830303815290604052612352565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516111349493929190613662565b60405180910390a15050505050505b509392505050565b6000611155611944565b60040154905090565b6111678161237f565b15610a6f576000356001600160e01b031916604051630d697db160e11b81526004016107f09190613579565b60008161119f8161115e565b60006111a9611944565b905060005b8451811015611210578160020160008683815181106111cf576111cf6134ee565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611206906001600160601b031685613531565b93506001016111ae565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b606060006112498361241e565b9392505050565b600082815260036020908152604080832084845290915281206004810154600582015460609384938493909290916112888284613531565b9050806001600160401b038111156112a2576112a261301c565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509550806001600160401b038111156112e6576112e661301c565b60405190808252806020026020018201604052801561133157816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816113045790505b509450806001600160401b0381111561134c5761134c61301c565b604051908082528060200260200182016040528015611375578160200160208202803683370190505b50965060005b838110156114ca576000878281518110611397576113976134ee565b602002602001019060018111156113b0576113b0612ee5565b908160018111156113c3576113c3612ee5565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106113fc576113fc6134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061145a5761145a6134ee565b602002602001018190525084600401818154811061147a5761147a6134ee565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106114aa576114aa6134ee565b6001600160a01b039092166020928302919091019091015260010161137b565b5060005b8281101561162d576001876114e38684613531565b815181106114f3576114f36134ee565b6020026020010190600181111561150c5761150c612ee5565b9081600181111561151f5761151f612ee5565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611558576115586134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866115ad8684613531565b815181106115bd576115bd6134ee565b60200260200101819052508460050181815481106115dd576115dd6134ee565b6000918252602090912001546001600160a01b0316886115fd8684613531565b8151811061160d5761160d6134ee565b6001600160a01b03909216602092830291909101909101526001016114ce565b50505050509250925092565b6000610706836001600160a01b03841661247a565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff166105e6565b606082516001600160401b0381111561169f5761169f61301c565b6040519080825280602002602001820160405280156116c8578160200160208202803683370190505b50905060005b8351811015610a7d57600560008583815181106116ed576116ed6134ee565b6020026020010151600581111561170657611706612ee5565b600581111561171757611717612ee5565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061174b5761174b6134ee565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156117a3575060006001600160a01b0316828281518110611790576117906134ee565b60200260200101516001600160a01b0316145b156117cf576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b6001016116ce565b806117e18161115e565b60006117eb611218565b905060008060005b855181101561188a5785818151811061180e5761180e6134ee565b6020026020010151925061182183611a76565b611832836312c0151560e21b61256d565b61183c8484612700565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016117f3565b505050505050565b600054610100900460ff166118b95760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612715565b600054610100900460ff166118e95760405162461bcd60e51b81526004016107f0906136ba565b6107538282612745565b600054610100900460ff1661191a5760405162461bcd60e51b81526004016107f0906136ba565b6119248888612777565b61192d846127b8565b61193a86868585856127e8565b5050505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156119bb57848181548110611989576119896134ee565b6000918252602090912001546001600160a01b03908116908516036119b3576001925090506119c6565b60010161196e565b506000600019915091505b9250929050565b60005b8251811015610d2557306001600160a01b03168282815181106119f5576119f56134ee565b60200260200101516001600160a01b031603611a32576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b611a6e838281518110611a4757611a476134ee565b6020026020010151838381518110611a6157611a616134ee565b6020026020010151612912565b6001016119d0565b806001600160a01b03163b600003610a6f5780604051630bfc64a360e21b81526004016107f09190613332565b80611aac611e09565b600084600f811115611ac057611ac0612ee5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b0157611b01612ee5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611b50576040516305f4dee960e31b815260040160405180910390fd5b6000611b5a611944565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611bb5611bac611944565b60010186611968565b9150915081611bd957846040516326527e1760e01b81526004016107f09190613332565b611be1611944565b805482908110611bf357611bf36134ee565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611c21575060018111155b15611c4d576000356001600160e01b0319166040516387f6f09560e01b81526004016107f09190613579565b6000611c57611de5565b6001810180546002830180549287905585905582549293509184908690856000611c8083613705565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611cd0611944565b905082516001600160401b03811115611ceb57611ceb61301c565b604051908082528060200260200182016040528015611d14578160200160208202803683370190505b50915060005b8351811015611da957816002016000858381518110611d3b57611d3b6134ee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611d8957611d896134ee565b6001600160601b0390921660209283029190910190910152600101611d1a565b5050919050565b6000611dba611944565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081611e398161115e565b6000611e43611944565b8451909150806001600160401b03811115611e6057611e6061301c565b604051908082528060200260200182016040528015611e89578160200160208202803683370190505b50935080600003611e9b57505061220d565b60058201548254611ead908390613544565b1015611ecc5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561219357898181518110611eef57611eef6134ee565b60200260200101519350611f0284611b9b565b9095509150611f108561231d565b611f198461231d565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611f6d57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611f7f57611f7f6134ee565b602002602001019015159081151581525050888181518110611fa357611fa36134ee565b60200260200101511561218b576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611fe690600190613544565b9050886000018181548110611ffd57611ffd6134ee565b60009182526020909120015489546001600160a01b03909116908a9086908110612029576120296134ee565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120635761206361371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106120c3576120c36134ee565b60009182526020909120015460018a0180546001600160a01b0390921691869081106120f1576120f16134ee565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121325761213261371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b03191690556121868286613531565b945050505b600101611ed5565b50818660040160008282546121a89190613544565b90915550506040516121cd90636242a4ef60e11b906110eb908c908c90602001613734565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516121fe929190613762565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122355761223561301c565b60405190808252806020026020018201604052801561225e578160200160208202803683370190505b50925060005b828110156122b85785818151811061227e5761227e6134ee565b6020026020010151848281518110612298576122986134ee565b6001600160a01b0390921660209283029190910190910152600101612264565b60005b82811015612313578581815181106122d5576122d56134ee565b60200260200101518583815181106122ef576122ef6134ee565b6001600160a01b0390921660209283029190910190910152600191820191016122bb565b5050505092915050565b6001600160a01b038116610a6f576000356001600160e01b03191660405163104c66df60e31b81526004016107f09190613579565b61235c82826129a5565b610753573382826040516319b5fdcb60e31b81526004016107f0939291906137d7565b6000815160000361239257506000919050565b60005b600183510381101561241557600181015b835181101561240c578381815181106123c1576123c16134ee565b60200260200101516001600160a01b03168483815181106123e4576123e46134ee565b60200260200101516001600160a01b031603612404575060019392505050565b6001016123a6565b50600101612395565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561246e57602002820191906000526020600020905b81548152602001906001019080831161245a575b50505050509050919050565b6000818152600183016020526040812054801561256357600061249e600183613544565b85549091506000906124b290600190613544565b90508181146125175760008660000182815481106124d2576124d26134ee565b90600052602060002001549050808760000184815481106124f5576124f56134ee565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125285761252861371e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610709565b6000915050610709565b6000816040516024016125809190613579565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906125c990859061380b565b600060405180830381855afa9150503d8060008114612604576040519150601f19603f3d011682016040523d82523d6000602084013e612609565b606091505b5091509150816126cb57846001600160a01b03168360405160240161262e9190613827565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251612663919061380b565b600060405180830381855afa9150503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b509092509050816126cb57838560405163069d427960e11b81526004016107f092919061383a565b808060200190518101906126df919061385d565b6106b457838560405163069d427960e11b81526004016107f092919061383a565b6000610706836001600160a01b038416612ccb565b600054610100900460ff1661273c5760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612d1a565b600054610100900460ff1661276c5760405162461bcd60e51b81526004016107f0906136ba565b61098a600030612912565b600054610100900460ff1661279e5760405162461bcd60e51b81526004016107f0906136ba565b60006127a8611de5565b600181559050610d258383611c12565b600054610100900460ff166127df5760405162461bcd60e51b81526004016107f0906136ba565b610a6f816117d7565b600054610100900460ff1661280f5760405162461bcd60e51b81526004016107f0906136ba565b61281a600285611aa3565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155612907818385610de9565b506106b46003611b2e565b806005600084600581111561292957612929612ee5565b600581111561293a5761293a612ee5565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561297857612978612ee5565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b600160006129b46105fb611218565b805190915060008190036129c9575050610709565b6000816001600160401b038111156129e3576129e361301c565b604051908082528060200260200182016040528015612a0c578160200160208202803683370190505b5090506000826001600160401b03811115612a2957612a2961301c565b604051908082528060200260200182016040528015612a5c57816020015b6060815260200190600190039081612a475790505b50905060008787604051602001612a7492919061387f565b6040516020818303038152906040529050600081604051602401612a989190613827565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612c8157868181518110612ae157612ae16134ee565b60200260200101516001600160a01b031683604051612b00919061380b565b6000604051808303816000865af19150503d8060008114612b3d576040519150601f19603f3d011682016040523d82523d6000602084013e612b42565b606091505b50868381518110612b5557612b556134ee565b60200260200101868481518110612b6e57612b6e6134ee565b6020026020010182905282151515158152505050848181518110612b9457612b946134ee565b6020026020010151612c7957868181518110612bb257612bb26134ee565b60200260200101516001600160a01b031682604051612bd1919061380b565b6000604051808303816000865af19150503d8060008114612c0e576040519150601f19603f3d011682016040523d82523d6000602084013e612c13565b606091505b50868381518110612c2657612c266134ee565b60200260200101868481518110612c3f57612c3f6134ee565b6020026020010182905282151515158152505050878015612c765750848181518110612c6d57612c6d6134ee565b60200260200101515b97505b600101612ac7565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612cb794939291906138b0565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612d1257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610709565b506000610709565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b60008083601f840112612d5f57600080fd5b5081356001600160401b03811115612d7657600080fd5b6020830191508360208260051b85010111156119c657600080fd5b60008060008060008060608789031215612daa57600080fd5b86356001600160401b0380821115612dc157600080fd5b612dcd8a838b01612d4d565b90985096506020890135915080821115612de657600080fd5b612df28a838b01612d4d565b90965094506040890135915080821115612e0b57600080fd5b50612e1889828a01612d4d565b979a9699509497509295939492505050565b60008060208385031215612e3d57600080fd5b82356001600160401b03811115612e5357600080fd5b612e5f85828601612d4d565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612ea55781516001600160a01b031687529582019590820190600101612e80565b509495945050505050565b6020815260006107066020830184612e6b565b60008060408385031215612ed657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60006060808352612f0f6060840187612e6b565b83810360208581019190915286518083528782019282019060005b81811015612f5657845160028110612f4457612f44612ee5565b83529383019391830191600101612f2a565b50506040925085810360408701528087518083528383019150838901925060005b81811015612fa7578351805160ff1684528581015186850152860151868401529284019291860191600101612f77565b50909a9950505050505050505050565b80356001600160a01b0381168114610cba57600080fd5b600080600060608486031215612fe357600080fd5b8335925060208401359150612ffa60408501612fb7565b90509250925092565b60006020828403121561301557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561305a5761305a61301c565b604052919050565b60006001600160401b0382111561307b5761307b61301c565b5060051b60200190565b600082601f83011261309657600080fd5b813560206130ab6130a683613062565b613032565b8083825260208201915060208460051b8701019350868411156130cd57600080fd5b602086015b848110156130f0576130e381612fb7565b83529183019183016130d2565b509695505050505050565b600082601f83011261310c57600080fd5b8135602061311c6130a683613062565b8083825260208201915060208460051b87010193508684111561313e57600080fd5b602086015b848110156130f05780356001600160601b03811681146131635760008081fd5b8352918301918301613143565b600082601f83011261318157600080fd5b813560206131916130a683613062565b8083825260208201915060208460051b8701019350868411156131b357600080fd5b602086015b848110156130f0578035600681106131d05760008081fd5b83529183019183016131b8565b60008060008060008060008060008060006101608c8e0312156131ff57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975061322460808d01612fb7565b96506001600160401b0360a08d013581101561323f57600080fd5b61324f8e60a08f01358f01613085565b96508060c08e0135111561326257600080fd5b6132728e60c08f01358f01613085565b95508060e08e0135111561328557600080fd5b6132958e60e08f01358f01613085565b9450806101008e013511156132a957600080fd5b6132ba8e6101008f01358f016130fb565b9350806101208e013511156132ce57600080fd5b6132df8e6101208f01358f01613170565b9250806101408e013511156132f357600080fd5b506133058d6101408e01358e01613085565b90509295989b509295989b9093969950565b60006020828403121561332957600080fd5b61070682612fb7565b6001600160a01b0391909116815260200190565b6000806040838503121561335957600080fd5b82356001600160401b038082111561337057600080fd5b61337c86838701613170565b9350602085013591508082111561339257600080fd5b5061339f85828601613085565b9150509250929050565b600080604083850312156133bc57600080fd5b823591506133cc60208401612fb7565b90509250929050565b803560108110610cba57600080fd5b600080604083850312156133f757600080fd5b613400836133d5565b91506133cc60208401612fb7565b60a081016005871061342257613422612ee5565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612ea55781516001600160601b031687529582019590820190600101613458565b6060815260006134906060830186612e6b565b82810360208401526134a28186612e6b565b905082810360408401526134b68185613443565b9695505050505050565b6020815260006107066020830184613443565b6000602082840312156134e557600080fd5b610706826133d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761070957610709613504565b8082018082111561070957610709613504565b8181038181111561070957610709613504565b60008261357457634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60208101601083106135a2576135a2612ee5565b91905290565b6001600160e01b03198316815260408101600b83106135c9576135c9612ee5565b8260208301529392505050565b6001600160601b03818116838216019080821115610a7d57610a7d613504565b60008151808452602080850194506020840160005b83811015612ea557815115158752958201959082019060010161360b565b60608152600061363c6060830186612e6b565b828103602084015261364e8186613443565b905082810360408401526134b681856135f6565b60808152600061367560808301876135f6565b82810360208401526136878187613443565b9050828103604084015261369b8186612e6b565b905082810360608401526136af8185612e6b565b979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001820161371757613717613504565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006137476040830185612e6b565b828103602084015261375981856135f6565b95945050505050565b60408152600061377560408301856135f6565b82810360208401526137598185612e6b565b60005b838110156137a257818101518382015260200161378a565b50506000910152565b600081518084526137c3816020860160208601613787565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090613759908301846137ab565b6000825161381d818460208701613787565b9190910192915050565b60208152600061070660208301846137ab565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561386f57600080fd5b8151801515811461124957600080fd5b6001600160e01b03198316815281516000906138a2816004850160208701613787565b919091016004019392505050565b6080815260006138c360808301876137ab565b6020838203818501526138d68288612e6b565b915083820360408501526138ea82876135f6565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561393b57601f198784030185526139298383516137ab565b9486019492509085019060010161390d565b50909b9a505050505050505050505056fea2646970667358221220cd62c0794d3b29bb74e0ab5abd55f987534e4f5cb82c3b7005e3a3a0d49f193c64736f6c63430008170033\"", + "callValue": 0, + "chainId": 2020, + "constructorArgs": "0x", + "contractName": "RoninBridgeManagerConstructor", + "deployedBytecode": "\"0x608060405234801561001057600080fd5b50600436106101965760003560e01c806301a5f43f1461019b57806306aba0e1146101b05780630a44fa43146101cb5780630f7c3189146101de5780631c905e39146101f35780631f425338146102155780632c5e6520146102285780632d6d7d731461024b57806334d5f37b1461025e57806335da81211461027e5780633644e515146102915780637d4c1d781461029a5780637de5dedd146102ad5780637f7fe058146102b5578063800eaab3146102d5578063828fc1a1146102e8578063865e6fd3146102fb578063901979d51461030e5780639b19dbfd14610339578063a64a838014610341578063aee1767f14610354578063b384abef14610367578063b405aaf2146103c2578063b9c36209146103d5578063bc4e068f146103e8578063c441c4a8146103fb578063cc7e6b3b14610412578063d0a50db014610432578063d78392f81461043a578063dafae4081461044d578063de981f1b14610460578063e75235b814610473578063e9c0349814610490578063f80b5352146104a3575b600080fd5b6101ae6101a9366004612d91565b6104ab565b005b6101b861055a565b6040519081526020015b60405180910390f35b6101b86101d9366004612e2a565b610569565b6101e66105ee565b6040516101c29190612eb0565b610206610201366004612ec3565b610600565b6040516101c293929190612efb565b6101ae610223366004612e2a565b61061c565b61023b610236366004612fce565b6106bb565b60405190151581526020016101c2565b6101e6610259366004612e2a565b6106c8565b6101b861026c366004613003565b60026020526000908152604090205481565b6101ae61028c366004612e2a565b61070f565b6101b860015481565b6101ae6102a83660046131dd565b610757565b6101b8610893565b6102c86102c3366004613317565b6108e9565b6040516101c29190613332565b6101ae6102e3366004613346565b61095c565b61023b6102f63660046133a9565b610994565b6101ae6103093660046133e4565b6109a2565b61032161031c366004613317565b6109bd565b6040516001600160601b0390911681526020016101c2565b6101e66109f3565b6101ae61034f366004613003565b610a5e565b6102c8610362366004613317565b610a72565b6103b1610375366004612ec3565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101c295949392919061340e565b61023b6103d0366004613317565b610a84565b6101ae6103e3366004612ec3565b610abc565b6102066103f6366004613003565b610ace565b610403610aeb565b6040516101c29392919061347d565b610425610420366004612e2a565b610bc5565b6040516101c291906134c0565b6101b8610c03565b610321610448366004613317565b610c16565b61023b61045b366004613003565b610c21565b6102c861046e3660046134d3565b610c5d565b61047b610cbf565b604080519283526020830191909152016101c2565b6101ae61049e366004612e2a565b610ce1565b6101e6610d2a565b6104b3610d8d565b61055186868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610de992505050565b50505050505050565b600061056461114b565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506105aa925083915061115e9050565b6105e684848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061119392505050565b949350505050565b60606105646105fb611218565b61123c565b606080606061060f8585611250565b9250925092509250925092565b610624610d8d565b818180806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610663925083915061115e9050565b600061066d611218565b905060005b838110156106b4576106ab85858381811061068f5761068f6134ee565b90506020020160208101906106a49190613317565b8390611639565b50600101610672565b5050505050565b60006105e684848461164e565b606061070683838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611684915050565b90505b92915050565b610717610d8d565b6107538282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506117d792505050565b5050565b600054610100900460ff16158080156107775750600054600160ff909116105b806107915750303b158015610791575060005460ff166001145b6107f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561081c576000805461ff0019166101001790555b61082589611892565b61082f83836118c2565b61083f8c8c8c8b8b8b8b8b6118f3565b8015610885576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60008061089e611944565b90506000806108ab610cbf565b91509150806001828560040154856108c3919061351a565b6108cd9190613531565b6108d79190613544565b6108e19190613557565b935050505090565b60008060006108ff6108f9611944565b85611968565b9150915081610923578360405163141e2e1f60e11b81526004016107f09190613332565b61092b611944565b600101818154811061093f5761093f6134ee565b6000918252602090912001546001600160a01b0316949350505050565b33301461098a576000356001600160e01b0319166040516307337e1960e41b81526004016107f09190613579565b61075382826119cd565b60006107066000848461164e565b6109aa610d8d565b6109b381611a76565b6107538282611aa3565b6000806109c8611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109fd611944565b600101805480602002602001604051908101604052809291908181526020018280548015610a5457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a36575b5050505050905090565b610a66610d8d565b610a6f81611b2e565b50565b6000610a7d82611b9b565b5092915050565b600080610a8f611944565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610ac4610d8d565b6107538282611c12565b6060806060610ade600085611250565b9250925092509193909250565b60608060606000610afa611944565b805460408051602080840282018101909252828152929350839190830182828015610b4e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b30575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b50505050509250610bbd84611cc4565b915050909192565b6060610706838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611cc492505050565b6000610c0d611944565b60010154919050565b600061070982611db0565b600080610c2c611de5565b9050610c3661114b565b8160010154610c45919061351a565b6002820154610c54908561351a565b10159392505050565b6000610c67611e09565b600083600f811115610c7b57610c7b612ee5565b60ff1681526020810191909152604001600020546001600160a01b0316905080610cba578160405163409140df60e11b81526004016107f0919061358e565b919050565b6000806000610ccc611de5565b90508060010154816002015492509250509091565b610ce9610d8d565b610d25828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e2d92505050565b505050565b6060610d34611944565b805460408051602080840282018101909252828152929190830182828015610a54576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a36575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610de7576000356001600160e01b0319166001604051620f948f60ea1b81526004016107f09291906135a8565b565b6060610df58383612213565b610dfe8161115e565b6000610e08611944565b845187519192509081148015610e1e5750855181145b610e49576000356001600160e01b0319166040516306b5667560e21b81526004016107f09190613579565b806001600160401b03811115610e6157610e6161301c565b604051908082528060200260200182016040528015610e8a578160200160208202803683370190505b50935080600003610e9c575050611143565b60008060008060005b858110156110af578a8181518110610ebf57610ebf6134ee565b60200260200101519450898181518110610edb57610edb6134ee565b602002602001015193508b8181518110610ef757610ef76134ee565b60200260200101519250610f0a8561231d565b610f138461231d565b826001600160601b0316600003610f4b576000356001600160e01b031916604051637f11b8a360e11b81526004016107f09190613579565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692610fa39290811691166135d6565b610fad91906135d6565b610fb791906135d6565b6001600160601b0316600014898281518110610fd557610fd56134ee565b602002602001019015159081151581525050888181518110610ff957610ff96134ee565b6020026020010151156110a7578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556110a49083613531565b91505b600101610ea5565b50808660040160008282546110c49190613531565b90915550506040516110ff906347c28ec560e11b906110eb908c908f908d90602001613629565b604051602081830303815290604052612352565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516111349493929190613662565b60405180910390a15050505050505b509392505050565b6000611155611944565b60040154905090565b6111678161237f565b15610a6f576000356001600160e01b031916604051630d697db160e11b81526004016107f09190613579565b60008161119f8161115e565b60006111a9611944565b905060005b8451811015611210578160020160008683815181106111cf576111cf6134ee565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611206906001600160601b031685613531565b93506001016111ae565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b606060006112498361241e565b9392505050565b600082815260036020908152604080832084845290915281206004810154600582015460609384938493909290916112888284613531565b9050806001600160401b038111156112a2576112a261301c565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509550806001600160401b038111156112e6576112e661301c565b60405190808252806020026020018201604052801561133157816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816113045790505b509450806001600160401b0381111561134c5761134c61301c565b604051908082528060200260200182016040528015611375578160200160208202803683370190505b50965060005b838110156114ca576000878281518110611397576113976134ee565b602002602001019060018111156113b0576113b0612ee5565b908160018111156113c3576113c3612ee5565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106113fc576113fc6134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061145a5761145a6134ee565b602002602001018190525084600401818154811061147a5761147a6134ee565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106114aa576114aa6134ee565b6001600160a01b039092166020928302919091019091015260010161137b565b5060005b8281101561162d576001876114e38684613531565b815181106114f3576114f36134ee565b6020026020010190600181111561150c5761150c612ee5565b9081600181111561151f5761151f612ee5565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611558576115586134ee565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866115ad8684613531565b815181106115bd576115bd6134ee565b60200260200101819052508460050181815481106115dd576115dd6134ee565b6000918252602090912001546001600160a01b0316886115fd8684613531565b8151811061160d5761160d6134ee565b6001600160a01b03909216602092830291909101909101526001016114ce565b50505050509250925092565b6000610706836001600160a01b03841661247a565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff166105e6565b606082516001600160401b0381111561169f5761169f61301c565b6040519080825280602002602001820160405280156116c8578160200160208202803683370190505b50905060005b8351811015610a7d57600560008583815181106116ed576116ed6134ee565b6020026020010151600581111561170657611706612ee5565b600581111561171757611717612ee5565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061174b5761174b6134ee565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156117a3575060006001600160a01b0316828281518110611790576117906134ee565b60200260200101516001600160a01b0316145b156117cf576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b6001016116ce565b806117e18161115e565b60006117eb611218565b905060008060005b855181101561188a5785818151811061180e5761180e6134ee565b6020026020010151925061182183611a76565b611832836312c0151560e21b61256d565b61183c8484612700565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016117f3565b505050505050565b600054610100900460ff166118b95760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612715565b600054610100900460ff166118e95760405162461bcd60e51b81526004016107f0906136ba565b6107538282612745565b600054610100900460ff1661191a5760405162461bcd60e51b81526004016107f0906136ba565b6119248888612777565b61192d846127b8565b61193a86868585856127e8565b5050505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156119bb57848181548110611989576119896134ee565b6000918252602090912001546001600160a01b03908116908516036119b3576001925090506119c6565b60010161196e565b506000600019915091505b9250929050565b60005b8251811015610d2557306001600160a01b03168282815181106119f5576119f56134ee565b60200260200101516001600160a01b031603611a32576000356001600160e01b03191660405163053265f160e01b81526004016107f09190613579565b611a6e838281518110611a4757611a476134ee565b6020026020010151838381518110611a6157611a616134ee565b6020026020010151612912565b6001016119d0565b806001600160a01b03163b600003610a6f5780604051630bfc64a360e21b81526004016107f09190613332565b80611aac611e09565b600084600f811115611ac057611ac0612ee5565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b0157611b01612ee5565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611b50576040516305f4dee960e31b815260040160405180910390fd5b6000611b5a611944565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611bb5611bac611944565b60010186611968565b9150915081611bd957846040516326527e1760e01b81526004016107f09190613332565b611be1611944565b805482908110611bf357611bf36134ee565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611c21575060018111155b15611c4d576000356001600160e01b0319166040516387f6f09560e01b81526004016107f09190613579565b6000611c57611de5565b6001810180546002830180549287905585905582549293509184908690856000611c8083613705565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611cd0611944565b905082516001600160401b03811115611ceb57611ceb61301c565b604051908082528060200260200182016040528015611d14578160200160208202803683370190505b50915060005b8351811015611da957816002016000858381518110611d3b57611d3b6134ee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611d8957611d896134ee565b6001600160601b0390921660209283029190910190910152600101611d1a565b5050919050565b6000611dba611944565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081611e398161115e565b6000611e43611944565b8451909150806001600160401b03811115611e6057611e6061301c565b604051908082528060200260200182016040528015611e89578160200160208202803683370190505b50935080600003611e9b57505061220d565b60058201548254611ead908390613544565b1015611ecc5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561219357898181518110611eef57611eef6134ee565b60200260200101519350611f0284611b9b565b9095509150611f108561231d565b611f198461231d565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611f6d57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611f7f57611f7f6134ee565b602002602001019015159081151581525050888181518110611fa357611fa36134ee565b60200260200101511561218b576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611fe690600190613544565b9050886000018181548110611ffd57611ffd6134ee565b60009182526020909120015489546001600160a01b03909116908a9086908110612029576120296134ee565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120635761206361371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106120c3576120c36134ee565b60009182526020909120015460018a0180546001600160a01b0390921691869081106120f1576120f16134ee565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121325761213261371e565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b03191690556121868286613531565b945050505b600101611ed5565b50818660040160008282546121a89190613544565b90915550506040516121cd90636242a4ef60e11b906110eb908c908c90602001613734565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516121fe929190613762565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122355761223561301c565b60405190808252806020026020018201604052801561225e578160200160208202803683370190505b50925060005b828110156122b85785818151811061227e5761227e6134ee565b6020026020010151848281518110612298576122986134ee565b6001600160a01b0390921660209283029190910190910152600101612264565b60005b82811015612313578581815181106122d5576122d56134ee565b60200260200101518583815181106122ef576122ef6134ee565b6001600160a01b0390921660209283029190910190910152600191820191016122bb565b5050505092915050565b6001600160a01b038116610a6f576000356001600160e01b03191660405163104c66df60e31b81526004016107f09190613579565b61235c82826129a5565b610753573382826040516319b5fdcb60e31b81526004016107f0939291906137d7565b6000815160000361239257506000919050565b60005b600183510381101561241557600181015b835181101561240c578381815181106123c1576123c16134ee565b60200260200101516001600160a01b03168483815181106123e4576123e46134ee565b60200260200101516001600160a01b031603612404575060019392505050565b6001016123a6565b50600101612395565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561246e57602002820191906000526020600020905b81548152602001906001019080831161245a575b50505050509050919050565b6000818152600183016020526040812054801561256357600061249e600183613544565b85549091506000906124b290600190613544565b90508181146125175760008660000182815481106124d2576124d26134ee565b90600052602060002001549050808760000184815481106124f5576124f56134ee565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125285761252861371e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610709565b6000915050610709565b6000816040516024016125809190613579565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906125c990859061380b565b600060405180830381855afa9150503d8060008114612604576040519150601f19603f3d011682016040523d82523d6000602084013e612609565b606091505b5091509150816126cb57846001600160a01b03168360405160240161262e9190613827565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251612663919061380b565b600060405180830381855afa9150503d806000811461269e576040519150601f19603f3d011682016040523d82523d6000602084013e6126a3565b606091505b509092509050816126cb57838560405163069d427960e11b81526004016107f092919061383a565b808060200190518101906126df919061385d565b6106b457838560405163069d427960e11b81526004016107f092919061383a565b6000610706836001600160a01b038416612ccb565b600054610100900460ff1661273c5760405162461bcd60e51b81526004016107f0906136ba565b610a6f81612d1a565b600054610100900460ff1661276c5760405162461bcd60e51b81526004016107f0906136ba565b61098a600030612912565b600054610100900460ff1661279e5760405162461bcd60e51b81526004016107f0906136ba565b60006127a8611de5565b600181559050610d258383611c12565b600054610100900460ff166127df5760405162461bcd60e51b81526004016107f0906136ba565b610a6f816117d7565b600054610100900460ff1661280f5760405162461bcd60e51b81526004016107f0906136ba565b61281a600285611aa3565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155612907818385610de9565b506106b46003611b2e565b806005600084600581111561292957612929612ee5565b600581111561293a5761293a612ee5565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561297857612978612ee5565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b600160006129b46105fb611218565b805190915060008190036129c9575050610709565b6000816001600160401b038111156129e3576129e361301c565b604051908082528060200260200182016040528015612a0c578160200160208202803683370190505b5090506000826001600160401b03811115612a2957612a2961301c565b604051908082528060200260200182016040528015612a5c57816020015b6060815260200190600190039081612a475790505b50905060008787604051602001612a7492919061387f565b6040516020818303038152906040529050600081604051602401612a989190613827565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612c8157868181518110612ae157612ae16134ee565b60200260200101516001600160a01b031683604051612b00919061380b565b6000604051808303816000865af19150503d8060008114612b3d576040519150601f19603f3d011682016040523d82523d6000602084013e612b42565b606091505b50868381518110612b5557612b556134ee565b60200260200101868481518110612b6e57612b6e6134ee565b6020026020010182905282151515158152505050848181518110612b9457612b946134ee565b6020026020010151612c7957868181518110612bb257612bb26134ee565b60200260200101516001600160a01b031682604051612bd1919061380b565b6000604051808303816000865af19150503d8060008114612c0e576040519150601f19603f3d011682016040523d82523d6000602084013e612c13565b606091505b50868381518110612c2657612c266134ee565b60200260200101868481518110612c3f57612c3f6134ee565b6020026020010182905282151515158152505050878015612c765750848181518110612c6d57612c6d6134ee565b60200260200101515b97505b600101612ac7565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612cb794939291906138b0565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612d1257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610709565b506000610709565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b60008083601f840112612d5f57600080fd5b5081356001600160401b03811115612d7657600080fd5b6020830191508360208260051b85010111156119c657600080fd5b60008060008060008060608789031215612daa57600080fd5b86356001600160401b0380821115612dc157600080fd5b612dcd8a838b01612d4d565b90985096506020890135915080821115612de657600080fd5b612df28a838b01612d4d565b90965094506040890135915080821115612e0b57600080fd5b50612e1889828a01612d4d565b979a9699509497509295939492505050565b60008060208385031215612e3d57600080fd5b82356001600160401b03811115612e5357600080fd5b612e5f85828601612d4d565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612ea55781516001600160a01b031687529582019590820190600101612e80565b509495945050505050565b6020815260006107066020830184612e6b565b60008060408385031215612ed657600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60006060808352612f0f6060840187612e6b565b83810360208581019190915286518083528782019282019060005b81811015612f5657845160028110612f4457612f44612ee5565b83529383019391830191600101612f2a565b50506040925085810360408701528087518083528383019150838901925060005b81811015612fa7578351805160ff1684528581015186850152860151868401529284019291860191600101612f77565b50909a9950505050505050505050565b80356001600160a01b0381168114610cba57600080fd5b600080600060608486031215612fe357600080fd5b8335925060208401359150612ffa60408501612fb7565b90509250925092565b60006020828403121561301557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561305a5761305a61301c565b604052919050565b60006001600160401b0382111561307b5761307b61301c565b5060051b60200190565b600082601f83011261309657600080fd5b813560206130ab6130a683613062565b613032565b8083825260208201915060208460051b8701019350868411156130cd57600080fd5b602086015b848110156130f0576130e381612fb7565b83529183019183016130d2565b509695505050505050565b600082601f83011261310c57600080fd5b8135602061311c6130a683613062565b8083825260208201915060208460051b87010193508684111561313e57600080fd5b602086015b848110156130f05780356001600160601b03811681146131635760008081fd5b8352918301918301613143565b600082601f83011261318157600080fd5b813560206131916130a683613062565b8083825260208201915060208460051b8701019350868411156131b357600080fd5b602086015b848110156130f0578035600681106131d05760008081fd5b83529183019183016131b8565b60008060008060008060008060008060006101608c8e0312156131ff57600080fd5b8b359a5060208c0135995060408c0135985060608c0135975061322460808d01612fb7565b96506001600160401b0360a08d013581101561323f57600080fd5b61324f8e60a08f01358f01613085565b96508060c08e0135111561326257600080fd5b6132728e60c08f01358f01613085565b95508060e08e0135111561328557600080fd5b6132958e60e08f01358f01613085565b9450806101008e013511156132a957600080fd5b6132ba8e6101008f01358f016130fb565b9350806101208e013511156132ce57600080fd5b6132df8e6101208f01358f01613170565b9250806101408e013511156132f357600080fd5b506133058d6101408e01358e01613085565b90509295989b509295989b9093969950565b60006020828403121561332957600080fd5b61070682612fb7565b6001600160a01b0391909116815260200190565b6000806040838503121561335957600080fd5b82356001600160401b038082111561337057600080fd5b61337c86838701613170565b9350602085013591508082111561339257600080fd5b5061339f85828601613085565b9150509250929050565b600080604083850312156133bc57600080fd5b823591506133cc60208401612fb7565b90509250929050565b803560108110610cba57600080fd5b600080604083850312156133f757600080fd5b613400836133d5565b91506133cc60208401612fb7565b60a081016005871061342257613422612ee5565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612ea55781516001600160601b031687529582019590820190600101613458565b6060815260006134906060830186612e6b565b82810360208401526134a28186612e6b565b905082810360408401526134b68185613443565b9695505050505050565b6020815260006107066020830184613443565b6000602082840312156134e557600080fd5b610706826133d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761070957610709613504565b8082018082111561070957610709613504565b8181038181111561070957610709613504565b60008261357457634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60208101601083106135a2576135a2612ee5565b91905290565b6001600160e01b03198316815260408101600b83106135c9576135c9612ee5565b8260208301529392505050565b6001600160601b03818116838216019080821115610a7d57610a7d613504565b60008151808452602080850194506020840160005b83811015612ea557815115158752958201959082019060010161360b565b60608152600061363c6060830186612e6b565b828103602084015261364e8186613443565b905082810360408401526134b681856135f6565b60808152600061367560808301876135f6565b82810360208401526136878187613443565b9050828103604084015261369b8186612e6b565b905082810360608401526136af8185612e6b565b979650505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001820161371757613717613504565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006137476040830185612e6b565b828103602084015261375981856135f6565b95945050505050565b60408152600061377560408301856135f6565b82810360208401526137598185612e6b565b60005b838110156137a257818101518382015260200161378a565b50506000910152565b600081518084526137c3816020860160208601613787565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090613759908301846137ab565b6000825161381d818460208701613787565b9190910192915050565b60208152600061070660208301846137ab565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561386f57600080fd5b8151801515811461124957600080fd5b6001600160e01b03198316815281516000906138a2816004850160208701613787565b919091016004019392505050565b6080815260006138c360808301876137ab565b6020838203818501526138d68288612e6b565b915083820360408501526138ea82876135f6565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561393b57601f198784030185526139298383516137ab565b9486019492509085019060010161390d565b50909b9a505050505050505050505056fea2646970667358221220cd62c0794d3b29bb74e0ab5abd55f987534e4f5cb82c3b7005e3a3a0d49f193c64736f6c63430008170033\"", + "deployer": "0x08295771719b138a241F45023B13CC868D72827D", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "addBridgeOperators(uint96[],address[],address[])": { + "details": "Adds multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to add.", + "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." + } + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "getBridgeOperatorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific bridge operator.", + "params": { + "bridgeOperator": "The address of the bridge operator to get the vote weight for." + }, + "returns": { + "weight": "The vote weight of the specified bridge operator." + } + }, + "getBridgeOperators()": { + "details": "Returns an array of all bridge operators.", + "returns": { + "_0": "An array containing the addresses of all bridge operators." + } + }, + "getCallbackRegisters()": { + "details": "Retrieves the addresses of registered callbacks.", + "returns": { + "registers": "An array containing the addresses of registered callbacks." + } + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getFullBridgeOperatorInfos()": { + "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", + "returns": { + "bridgeOperators": "An array of addresses representing the registered bridge operators.", + "governors": "An array of addresses representing the governors of each bridge operator.", + "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" + } + }, + "getGlobalProposalSignatures(uint256)": { + "details": "See {CommonGovernanceProposal-_getProposalSignatures}" + }, + "getGovernorOf(address)": { + "details": "Returns the corresponding `governor` of a `operator`." + }, + "getGovernorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific governor.", + "params": { + "governor": "The address of the governor to get the vote weight for." + }, + "returns": { + "weight": "voteWeight The vote weight of the specified governor." + } + }, + "getGovernorWeights(address[])": { + "details": "Returns the weights of a list of governor addresses." + }, + "getGovernors()": { + "details": "Returns an array of all governors.", + "returns": { + "_0": "An array containing the addresses of all governors." + } + }, + "getOperatorOf(address)": { + "details": "Returns the corresponding `operator` of a `governor`." + }, + "getProposalSignatures(uint256,uint256)": { + "details": "See {CommonGovernanceProposal-_getProposalSignatures}" + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTotalWeight()": { + "details": "Returns total weights." + }, + "globalProposalVoted(uint256,address)": { + "details": "See {CommonGovernanceProposal-_proposalVoted}" + }, + "isBridgeOperator(address)": { + "details": "Checks if the given address is a bridge operator.", + "params": { + "addr": "The address to check." + }, + "returns": { + "_0": "A boolean indicating whether the address is a bridge operator." + } + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "proposalVoted(uint256,uint256,address)": { + "details": "See {CommonGovernanceProposal-_proposalVoted}" + }, + "registerCallbacks(address[])": { + "details": "Registers multiple callbacks with the bridge.", + "params": { + "registers": "The array of callback addresses to register." + } + }, + "removeBridgeOperators(address[])": { + "details": "Removes multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to remove." + } + }, + "resolveTargets(uint8[])": { + "details": "Returns corresponding address of target options. Return address(0) on non-existent target." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setMinRequiredGovernor(uint256)": { + "details": "Self-call to update the minimum required governor.", + "params": { + "min": "The minimum number, this must not less than 3." + } + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "sumGovernorsWeight(address[])": { + "details": "Returns total weights of the governor list." + }, + "totalBridgeOperator()": { + "details": "Returns the total number of bridge operators.", + "returns": { + "_0": "The total number of bridge operators." + } + }, + "unregisterCallbacks(address[])": { + "details": "Unregisters multiple callbacks from the bridge.", + "params": { + "registers": "The array of callback addresses to unregister." + } + }, + "updateManyTargetOption(uint8[],address[])": { + "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal." + } + }, + "events": { + "BridgeOperatorAddingFailed(address)": { + "details": "Emitted when a bridge operator is failed to add." + }, + "BridgeOperatorRemovingFailed(address)": { + "details": "Emitted when a bridge operator is failed to remove." + }, + "BridgeOperatorUpdated(address,address,address)": { + "details": "Emitted when a bridge operator is updated." + }, + "BridgeOperatorsAdded(bool[],uint96[],address[],address[])": { + "details": "Emitted when new bridge operators are added." + }, + "BridgeOperatorsRemoved(bool[],address[])": { + "details": "Emitted when bridge operators are removed." + }, + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MinRequiredGovernorUpdated(uint256)": { + "details": "Emitted when the minimum number of required governors is updated." + }, + "Notified(bytes,address[],bool[],bytes[])": { + "details": "Emitted when the contract notifies multiple registers with statuses and return data." + }, + "ProposalApproved(bytes32)": { + "details": "Emitted when the proposal is approved" + }, + "ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "ProposalExecuted(bytes32,bool[],bytes[])": { + "details": "Emitted when the proposal is executed" + }, + "ProposalExpired(bytes32)": { + "details": "Emitted when the vote is expired" + }, + "ProposalExpiryDurationChanged(uint256)": { + "details": "Emitted when the proposal expiry duration is changed." + }, + "ProposalRejected(bytes32)": { + "details": "Emitted when the vote is reject" + }, + "ProposalVoted(bytes32,address,uint8,uint256)": { + "details": "Emitted when the proposal is voted" + }, + "TargetOptionUpdated(uint8,address)": { + "details": "Emitted when the target options are updated" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + } + }, + "errors": { + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrCurrentProposalIsNotCompleted()": [ + { + "details": "Error thrown when the current proposal is not completed." + } + ], + "ErrDuplicated(bytes4)": [ + { + "details": "Error thrown when a duplicated element is detected in an array.", + "params": { + "msgSig": "The function signature that invoke the error." + } + } + ], + "ErrInvalidArguments(bytes4)": [ + { + "details": "Error indicating that arguments are invalid." + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidVoteWeight(bytes4)": [ + { + "details": "Error indicating that a vote weight is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." + } + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrOnlySelfCall(bytes4)": [ + { + "details": "Error indicating that a function can only be called by the contract itself.", + "params": { + "msgSig": "The function signature (bytes4) that can only be called by the contract itself." + } + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedInterface(bytes4,address)": [ + { + "details": "The error indicating an unsupported interface.", + "params": { + "addr": "The address where the unsupported interface was encountered.", + "interfaceId": "The bytes4 interface identifier that is not supported." + } + } + ], + "ErrVoteIsFinalized()": [ + { + "details": "Error thrown when attempting to interact with a finalized vote." + } + ], + "ErrZeroAddress(bytes4)": [ + { + "details": "Error indicating that given address is null when it should not." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrBelowMinRequiredGovernors\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrCurrentProposalIsNotCompleted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrDuplicated\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrExistOneInternalCallFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"required\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotMatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidArguments\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInput\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidVoteWeight\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrOnlySelfCall\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrOperatorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrUnsupportedInterface\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrVoteIsFinalized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrZeroAddress\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorAddingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorRemovingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"fromBridgeOperator\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"toBridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"CallbackRegistered\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"globalProposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GlobalProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"MinRequiredGovernorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"Notified\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalApproved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"successCalls\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"ProposalExecuted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalExpired\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"duration\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalExpiryDurationChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalRejected\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalVoted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption\\\",\\\"name\\\":\\\"targetOption\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"TargetOptionUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DOMAIN_SEPARATOR\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"addBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getBridgeOperatorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getBridgeOperators\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getCallbackRegisters\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getFullBridgeOperatorInfos\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round_\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getGlobalProposalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"voters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"getGovernorWeights\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getGovernors\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getOperatorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getProposalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_voters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"_supports\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getTotalWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round_\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"globalProposalVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"roninChainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryDuration\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeContract\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"callbackRegisters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"initialize\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"proposalVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"removeBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"resolveTargets\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"round\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setMinRequiredGovernor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"sumGovernorsWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"sum\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"unregisterCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"updateManyTargetOption\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"vote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"hash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"againstVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"forVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrCurrentProposalIsNotCompleted()\\\":[{\\\"details\\\":\\\"Error thrown when the current proposal is not completed.\\\"}],\\\"ErrDuplicated(bytes4)\\\":[{\\\"details\\\":\\\"Error thrown when a duplicated element is detected in an array.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature that invoke the error.\\\"}}],\\\"ErrInvalidArguments(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that arguments are invalid.\\\"}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidVoteWeight(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote weight is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid vote weight.\\\"}}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrOnlySelfCall(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a function can only be called by the contract itself.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that can only be called by the contract itself.\\\"}}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnsupportedInterface(bytes4,address)\\\":[{\\\"details\\\":\\\"The error indicating an unsupported interface.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address where the unsupported interface was encountered.\\\",\\\"interfaceId\\\":\\\"The bytes4 interface identifier that is not supported.\\\"}}],\\\"ErrVoteIsFinalized()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to interact with a finalized vote.\\\"}],\\\"ErrZeroAddress(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that given address is null when it should not.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"BridgeOperatorAddingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to add.\\\"},\\\"BridgeOperatorRemovingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to remove.\\\"},\\\"BridgeOperatorUpdated(address,address,address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is updated.\\\"},\\\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Emitted when new bridge operators are added.\\\"},\\\"BridgeOperatorsRemoved(bool[],address[])\\\":{\\\"details\\\":\\\"Emitted when bridge operators are removed.\\\"},\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"MinRequiredGovernorUpdated(uint256)\\\":{\\\"details\\\":\\\"Emitted when the minimum number of required governors is updated.\\\"},\\\"Notified(bytes,address[],bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the contract notifies multiple registers with statuses and return data.\\\"},\\\"ProposalApproved(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the proposal is approved\\\"},\\\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"ProposalExecuted(bytes32,bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the proposal is executed\\\"},\\\"ProposalExpired(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is expired\\\"},\\\"ProposalExpiryDurationChanged(uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal expiry duration is changed.\\\"},\\\"ProposalRejected(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is reject\\\"},\\\"ProposalVoted(bytes32,address,uint8,uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal is voted\\\"},\\\"TargetOptionUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when the target options are updated\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addBridgeOperators(uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Adds multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to add.\\\",\\\"governors\\\":\\\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\"}},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"getBridgeOperatorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific bridge operator.\\\",\\\"params\\\":{\\\"bridgeOperator\\\":\\\"The address of the bridge operator to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"The vote weight of the specified bridge operator.\\\"}},\\\"getBridgeOperators()\\\":{\\\"details\\\":\\\"Returns an array of all bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all bridge operators.\\\"}},\\\"getCallbackRegisters()\\\":{\\\"details\\\":\\\"Retrieves the addresses of registered callbacks.\\\",\\\"returns\\\":{\\\"registers\\\":\\\"An array containing the addresses of registered callbacks.\\\"}},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getFullBridgeOperatorInfos()\\\":{\\\"details\\\":\\\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\",\\\"returns\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the registered bridge operators.\\\",\\\"governors\\\":\\\"An array of addresses representing the governors of each bridge operator.\\\",\\\"weights\\\":\\\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\\\"}},\\\"getGlobalProposalSignatures(uint256)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_getProposalSignatures}\\\"},\\\"getGovernorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `governor` of a `operator`.\\\"},\\\"getGovernorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific governor.\\\",\\\"params\\\":{\\\"governor\\\":\\\"The address of the governor to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"voteWeight The vote weight of the specified governor.\\\"}},\\\"getGovernorWeights(address[])\\\":{\\\"details\\\":\\\"Returns the weights of a list of governor addresses.\\\"},\\\"getGovernors()\\\":{\\\"details\\\":\\\"Returns an array of all governors.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all governors.\\\"}},\\\"getOperatorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `operator` of a `governor`.\\\"},\\\"getProposalSignatures(uint256,uint256)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_getProposalSignatures}\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"getTotalWeight()\\\":{\\\"details\\\":\\\"Returns total weights.\\\"},\\\"globalProposalVoted(uint256,address)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_proposalVoted}\\\"},\\\"isBridgeOperator(address)\\\":{\\\"details\\\":\\\"Checks if the given address is a bridge operator.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address to check.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"A boolean indicating whether the address is a bridge operator.\\\"}},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"proposalVoted(uint256,uint256,address)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_proposalVoted}\\\"},\\\"registerCallbacks(address[])\\\":{\\\"details\\\":\\\"Registers multiple callbacks with the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to register.\\\"}},\\\"removeBridgeOperators(address[])\\\":{\\\"details\\\":\\\"Removes multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to remove.\\\"}},\\\"resolveTargets(uint8[])\\\":{\\\"details\\\":\\\"Returns corresponding address of target options. Return address(0) on non-existent target.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setMinRequiredGovernor(uint256)\\\":{\\\"details\\\":\\\"Self-call to update the minimum required governor.\\\",\\\"params\\\":{\\\"min\\\":\\\"The minimum number, this must not less than 3.\\\"}},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\\\"},\\\"sumGovernorsWeight(address[])\\\":{\\\"details\\\":\\\"Returns total weights of the governor list.\\\"},\\\"totalBridgeOperator()\\\":{\\\"details\\\":\\\"Returns the total number of bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"The total number of bridge operators.\\\"}},\\\"unregisterCallbacks(address[])\\\":{\\\"details\\\":\\\"Unregisters multiple callbacks from the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to unregister.\\\"}},\\\"updateManyTargetOption(uint8[],address[])\\\":{\\\"details\\\":\\\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"errors\\\":{\\\"ErrBelowMinRequiredGovernors()\\\":[{\\\"notice\\\":\\\"Error indicating that the governors list will go below minimum number of required governor.\\\"}],\\\"ErrGovernorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying governor\\\"}],\\\"ErrGovernorNotMatch(address,address)\\\":[{\\\"notice\\\":\\\"Error indicating that the msg.sender is not match the required governor\\\"}],\\\"ErrInvalidInput()\\\":[{\\\"notice\\\":\\\"Common invalid input error\\\"}],\\\"ErrOperatorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying operator\\\"}]},\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"round(uint256)\\\":{\\\"notice\\\":\\\"chain id = 0 for global proposal\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/ronin/gateway/RoninBridgeManagerConstructor.sol\\\":\\\"RoninBridgeManagerConstructor\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":1},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\\\\\"./BridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IHasContracts, HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\n\\\\nimport { IBridgeManager } from \\\\\\\"../../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\nimport { AddressArrayUtils } from \\\\\\\"../../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"../../utils/RoleAccess.sol\\\\\\\";\\\\nimport { TUint256Slot } from \\\\\\\"../../types/Types.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"./BridgeManagerQuorum.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n struct BridgeManagerStorage {\\\\n /// @notice List of the governors.\\\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\\\n address[] _governors;\\\\n address[] _operators;\\\\n /// @dev Mapping from address to the governor weight\\\\n mapping(address governor => uint96 weight) _governorWeight;\\\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\\\n mapping(address operator => uint96 weight) _operatorWeight;\\\\n /// @dev Total weight of all governors / operators.\\\\n uint256 _totalWeight;\\\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\\\n uint256 _minRequiredGovernor;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerStorageLocation\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n bytes32 public DOMAIN_SEPARATOR;\\\\n\\\\n modifier onlyGovernor() virtual {\\\\n _requireGovernor(msg.sender);\\\\n _;\\\\n }\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n function __BridgeManager_init(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n __BridgeManagerQuorum_init_unchained(num, denom);\\\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n function __BridgeManager_init_unchained(\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n _setContract(ContractType.BRIDGE, bridgeContract);\\\\n\\\\n DOMAIN_SEPARATOR = keccak256(\\\\n abi.encode(\\\\n keccak256(\\\\\\\"EIP712Domain(string name,string version,bytes32 salt)\\\\\\\"),\\\\n keccak256(\\\\\\\"BridgeManager\\\\\\\"), // name hash\\\\n keccak256(\\\\\\\"3\\\\\\\"), // version hash\\\\n keccak256(abi.encode(\\\\\\\"BRIDGE_MANAGER\\\\\\\", roninChainId)) // salt\\\\n )\\\\n );\\\\n\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n _setMinRequiredGovernor(3);\\\\n }\\\\n\\\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerStorageLocation\\\\n }\\\\n }\\\\n\\\\n // ===================== CONFIG ========================\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\\\n _setMinRequiredGovernor(min);\\\\n }\\\\n\\\\n function _setMinRequiredGovernor(uint min) internal {\\\\n if (min < 3) revert ErrInvalidInput();\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n $._minRequiredGovernor = min;\\\\n emit MinRequiredGovernorUpdated(min);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the caller has governor role access.\\\\n */\\\\n function _requireGovernor(address addr) internal view {\\\\n if (_getGovernorWeight(addr) == 0) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\\\n }\\\\n }\\\\n\\\\n // ===================== WEIGHTS METHOD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getTotalWeight() public view returns (uint256) {\\\\n return _totalWeight();\\\\n }\\\\n\\\\n function _totalWeight() internal view override returns (uint256) {\\\\n return _getBridgeManagerStorage()._totalWeight;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weights of a given array of governors.\\\\n */\\\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n weights = new uint96[](governors.length);\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n weights[i] = $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\\\n weight = _getGovernorWeight(governor);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\\\n */\\\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\\\n return _getBridgeManagerStorage()._governorWeight[governor];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\\\n sum = _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\\\n * @param governors The non-duplicated input.\\\\n */\\\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n sum += $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n return $._operatorWeight[bridgeOperator];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n (uint256 numerator, uint256 denominator) = getThreshold();\\\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\\\n }\\\\n\\\\n // ===================== MANAGER CRUD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _removeBridgeOperators(bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to add bridge operators.\\\\n *\\\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to add bridge operators.\\\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\\\n *\\\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\\\n */\\\\n function _addBridgeOperators(\\\\n uint96[] memory voteWeights,\\\\n address[] memory newGovernors,\\\\n address[] memory newOperators\\\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = newOperators.length;\\\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\\\n addeds = new bool[](length);\\\\n\\\\n // simply skip add operations if inputs are empty.\\\\n if (length == 0) return addeds;\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint96 iVoteWeight;\\\\n uint256 accumulatedWeight;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iGovernor = newGovernors[i];\\\\n iOperator = newOperators[i];\\\\n iVoteWeight = voteWeights[i];\\\\n\\\\n // Check non-zero inputs\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n\\\\n // Check not yet added operators\\\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\\\n\\\\n // Only add the valid operator\\\\n if (addeds[i]) {\\\\n // Add governor to list, update governor weight\\\\n $._governors.push(iGovernor);\\\\n $._governorWeight[iGovernor] = iVoteWeight;\\\\n\\\\n // Add operator to list, update governor weight\\\\n $._operators.push(iOperator);\\\\n $._operatorWeight[iOperator] = iVoteWeight;\\\\n\\\\n accumulatedWeight += iVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight += accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\\\n\\\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to remove bridge operators.\\\\n *\\\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to remove bridge operators.\\\\n *\\\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\\\n */\\\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = removingOperators.length;\\\\n removeds = new bool[](length);\\\\n\\\\n // simply skip remove operations if inputs are empty.\\\\n if (length == 0) return removeds;\\\\n if ($._governors.length - length < $._minRequiredGovernor) {\\\\n revert ErrBelowMinRequiredGovernors();\\\\n }\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint256 accumulatedWeight;\\\\n uint idx;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iOperator = removingOperators[i];\\\\n\\\\n // Check non-zero inputs\\\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n\\\\n // Check existing operators\\\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\\\n\\\\n // Only remove the valid operator\\\\n if (removeds[i]) {\\\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\\\n\\\\n // Remove governor from list, update governor weight\\\\n uint lastIdx = $._governors.length - 1;\\\\n $._governors[idx] = $._governors[lastIdx];\\\\n $._governors.pop();\\\\n delete $._governorWeight[iGovernor];\\\\n\\\\n // Remove operator from list, update operator weight\\\\n $._operators[idx] = $._operators[lastIdx];\\\\n $._operators.pop();\\\\n delete $._operatorWeight[iOperator];\\\\n\\\\n accumulatedWeight += removingVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight -= accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\\\n\\\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\\\n }\\\\n\\\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\\\n for (uint i; i < $_array.length; i++) {\\\\n if (addr == $_array[i]) {\\\\n return (true, i);\\\\n }\\\\n }\\\\n\\\\n return (false, type(uint256).max);\\\\n }\\\\n\\\\n // ================= MANAGER VIEW METHODS =============\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256) {\\\\n return _getBridgeManagerStorage()._operators.length;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n return $._operatorWeight[addr] > 0;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._operators;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernors() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._governors;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator) {\\\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\\\n if (!found) revert ErrGovernorNotFound(governor);\\\\n\\\\n return _getBridgeManagerStorage()._operators[idx];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor) {\\\\n (governor,) = _getGovernorOf(operator);\\\\n }\\\\n\\\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\\\n if (!found) revert ErrOperatorNotFound(operator);\\\\n\\\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n governors = $._governors;\\\\n bridgeOperators = $._operators;\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { EnumerableSet } from \\\\\\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\\\\\";\\\\nimport { IBridgeManagerCallbackRegister } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title BridgeManagerCallbackRegister\\\\n * @dev A contract that manages callback registrations and execution for a bridge.\\\\n */\\\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n /**\\\\n * @dev Storage slot for the address set of callback registers.\\\\n * @dev Value is equal to keccak256(\\\\\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\\\\\") - 1.\\\\n */\\\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\\\n\\\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\\\n _registerCallbacks(callbackRegisters);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\\\n _registerCallbacks(registers);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n _callbackRegisters.remove(registers[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\\\n registers = _getCallbackRegisters().values();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to register multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n address register;\\\\n bool regSuccess;\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n register = registers[i];\\\\n\\\\n _requireHasCode(register);\\\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\\\n\\\\n regSuccess = _callbackRegisters.add(register);\\\\n\\\\n emit CallbackRegistered(register, regSuccess);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\\\n */\\\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\\\n * @param callbackFnSig The function signature of the callback method.\\\\n * @param inputs The data to pass to the callback method.\\\\n * @return allSuccess Return true if all internal calls are success\\\\n */\\\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\\\n allSuccess = true;\\\\n\\\\n address[] memory registers = _getCallbackRegisters().values();\\\\n uint256 length = registers.length;\\\\n if (length == 0) return allSuccess;\\\\n\\\\n bool[] memory successes = new bool[](length);\\\\n bytes[] memory returnDatas = new bytes[](length);\\\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n // First, attempt to call normally\\\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\\\n\\\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\\\n if (!successes[i]) {\\\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\\\n allSuccess = allSuccess && successes[i];\\\\n }\\\\n }\\\\n\\\\n emit Notified(callData, registers, successes, returnDatas);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the address set of callback registers.\\\\n * @return callbackRegisters The storage reference to the callback registers.\\\\n */\\\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IQuorum } from \\\\\\\"../../interfaces/IQuorum.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\\\n struct BridgeManagerQuorumStorage {\\\\n uint256 _nonce;\\\\n uint256 _numerator;\\\\n uint256 _denominator;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerQuorumStorage\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\\\n\\\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n $._nonce = 1;\\\\n\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerQuorumStorage\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n return ($._numerator, $._denominator);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\\\n\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n uint256 prevNum = $._numerator;\\\\n uint256 prevDenom = $._denominator;\\\\n\\\\n $._numerator = num;\\\\n $._denominator = denom;\\\\n\\\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n\\\\n function _totalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/CoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Ballot.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\n\\\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to interact with a finalized vote.\\\\n */\\\\n error ErrVoteIsFinalized();\\\\n\\\\n /**\\\\n * @dev Error thrown when the current proposal is not completed.\\\\n */\\\\n error ErrCurrentProposalIsNotCompleted();\\\\n\\\\n struct ProposalVote {\\\\n VoteStatus status;\\\\n bytes32 hash;\\\\n uint256 againstVoteWeight; // Total weight of against votes\\\\n uint256 forVoteWeight; // Total weight of for votes\\\\n address[] forVoteds; // Array of addresses voting for\\\\n address[] againstVoteds; // Array of addresses voting against\\\\n uint256 expiryTimestamp;\\\\n mapping(address => Signature) sig;\\\\n mapping(address => bool) voted;\\\\n }\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\\\n /// @dev Emitted when the proposal is voted\\\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\\\n /// @dev Emitted when the proposal is approved\\\\n event ProposalApproved(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is reject\\\\n event ProposalRejected(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is expired\\\\n event ProposalExpired(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the proposal is executed\\\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\\\n /// @dev Emitted when the proposal expiry duration is changed.\\\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\\\n\\\\n /// @dev Mapping from chain id => vote round\\\\n /// @notice chain id = 0 for global proposal\\\\n mapping(uint256 => uint256) public round;\\\\n /// @dev Mapping from chain id => vote round => proposal vote\\\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\\\n\\\\n uint256 internal _proposalExpiryDuration;\\\\n\\\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\\\n __CoreGovernance_init_unchained(expiryDuration);\\\\n }\\\\n\\\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\\\n _setProposalExpiryDuration(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\\\n * if it is expired and not increase the `_round`.\\\\n */\\\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\\\n _round = round[_chainId];\\\\n // Skip checking for the first ever round\\\\n if (_round == 0) {\\\\n _round = round[_chainId] = 1;\\\\n } else {\\\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\\\n if (!_isExpired) {\\\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\\\n unchecked {\\\\n _round = ++round[_chainId];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\\\n */\\\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\\\n _vote.hash = _proposalHash;\\\\n _vote.expiryTimestamp = _expiryTimestamp;\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The chain id is not equal to 0.\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `ProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\\\n uint256 chainId = proposal.chainId;\\\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n round_ = _createVotingRound(chainId);\\\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the round.\\\\n * - The vote is not finalized.\\\\n * - The voter has not voted for the round.\\\\n *\\\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\\\n * proposal is approved, executed or rejected.\\\\n *\\\\n */\\\\n function _castVote(\\\\n Proposal.ProposalDetail memory proposal,\\\\n Ballot.VoteType support,\\\\n uint256 minimumForVoteWeight,\\\\n uint256 minimumAgainstVoteWeight,\\\\n address voter,\\\\n Signature memory signature,\\\\n uint256 voterWeight\\\\n ) internal virtual returns (bool done) {\\\\n uint256 chainId = proposal.chainId;\\\\n uint256 round_ = proposal.nonce;\\\\n ProposalVote storage _vote = vote[chainId][round_];\\\\n\\\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\\\n return true;\\\\n }\\\\n\\\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\\\n\\\\n _vote.voted[voter] = true;\\\\n // Stores the signature if it is not empty\\\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\\\n _vote.sig[voter] = signature;\\\\n }\\\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\\\n\\\\n uint256 _forVoteWeight;\\\\n uint256 _againstVoteWeight;\\\\n if (support == Ballot.VoteType.For) {\\\\n _vote.forVoteds.push(voter);\\\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\\\n } else if (support == Ballot.VoteType.Against) {\\\\n _vote.againstVoteds.push(voter);\\\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_forVoteWeight >= minimumForVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n if (proposal.isAutoExecute()) {\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev The specified executor executes the proposal on an approved proposal.\\\\n */\\\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\\\n bytes32 proposalHash = proposal.hash();\\\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\\\n\\\\n if (_vote.hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\\\n }\\\\n\\\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\\\n\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n\\\\n /**\\\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\\\n *\\\\n * Emits the event `ProposalExpired` if the vote is expired.\\\\n *\\\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\\\n * before or it will emit an unexpected event of `ProposalExpired`.\\\\n */\\\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\\\n\\\\n if (isExpired) {\\\\n emit ProposalExpired(proposalVote.hash);\\\\n\\\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n delete proposalVote.status;\\\\n delete proposalVote.hash;\\\\n delete proposalVote.againstVoteWeight;\\\\n delete proposalVote.forVoteWeight;\\\\n delete proposalVote.forVoteds;\\\\n delete proposalVote.againstVoteds;\\\\n delete proposalVote.expiryTimestamp;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\\\n */\\\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\\\n if (proposal.executable()) {\\\\n vote_.status = VoteStatus.Executed;\\\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the expiry duration for a new proposal.\\\\n */\\\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\\\n _proposalExpiryDuration = expiryDuration;\\\\n emit ProposalExpiryDurationChanged(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter casted for the proposal.\\\\n */\\\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\\\n return vote_.voted[voter];\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns total weight from validators.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns minimum vote to pass a proposal.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\\\n */\\\\n function _getChainType() internal view virtual returns (ChainType);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"./CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event GlobalProposalCreated(\\\\n uint256 indexed round,\\\\n bytes32 indexed proposalHash,\\\\n Proposal.ProposalDetail proposal,\\\\n bytes32 globalProposalHash,\\\\n GlobalProposal.GlobalProposalDetail globalProposal,\\\\n address creator\\\\n );\\\\n\\\\n /// @dev Emitted when the target options are updated\\\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\\\n\\\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\\\n }\\\\n\\\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\\\n _updateManyTargetOption(targetOptions, addrs);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes for a global proposal.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n address executor,\\\\n uint256[] memory values,\\\\n bytes[] memory calldatas,\\\\n uint256[] memory gasAmounts,\\\\n address creator\\\\n ) internal virtual {\\\\n uint256 round_ = _createVotingRound(0);\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes global proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobalStruct(\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\\\n address creator\\\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n uint256 round_ = _createVotingRound(0);\\\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\\\n\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\\\n */\\\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal helper of {resolveTargets}.\\\\n *\\\\n * @param strict When the param is set to `true`, revert on non-existent target.\\\\n */\\\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\\\n targets = new address[](targetOptions.length);\\\\n\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n *\\\\n * Requirement:\\\\n * - Only allow self-call through proposal.\\\\n *\\\\n */\\\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\\\n // HACK: Cannot reuse the existing library due to too deep stack\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n _updateManyTargetOption(targetOptions, targets);\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n */\\\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\\\n _updateTargetOption(targetOptions[i], targets[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates `targetOption` to `target`.\\\\n *\\\\n * Requirement:\\\\n * - Emit a `TargetOptionUpdated` event.\\\\n */\\\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\\\n _targetOptionsMap[targetOption] = target;\\\\n emit TargetOptionUpdated(targetOption, target);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract CommonGovernanceProposal is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Casts votes by signatures.\\\\n *\\\\n * Note: This method does not verify the proposal hash with the vote hash. Please consider checking it before.\\\\n *\\\\n */\\\\n function _castVotesBySignatures(\\\\n Proposal.ProposalDetail memory _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n bytes32 proposalHash\\\\n ) internal {\\\\n if (!(_supports.length != 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\\\n\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n\\\\n address _lastSigner;\\\\n\\\\n for (uint256 _i; _i < _signatures.length;) {\\\\n Signature calldata _sig;\\\\n address _signer;\\\\n _sig = _signatures[_i];\\\\n\\\\n if (_supports[_i] == Ballot.VoteType.For) {\\\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\\\n } else if (_supports[_i] == Ballot.VoteType.Against) {\\\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\\\n _lastSigner = _signer;\\\\n\\\\n uint256 _weight = _getWeight(_signer);\\\\n\\\\n if (_weight == 0) revert ErrInvalidSignatures(msg.sig);\\\\n\\\\n if (_castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)) {\\\\n return;\\\\n }\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the voted signatures for the proposals.\\\\n *\\\\n * Note: The signatures can be empty in case the proposal is voted on the current network.\\\\n *\\\\n */\\\\n function _getProposalSignatures(\\\\n uint256 _chainId,\\\\n uint256 _round\\\\n ) internal view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\\\n ProposalVote storage _vote = vote[_chainId][_round];\\\\n\\\\n uint256 _forLength = _vote.forVoteds.length;\\\\n uint256 _againstLength = _vote.againstVoteds.length;\\\\n uint256 _voterLength = _forLength + _againstLength;\\\\n\\\\n _supports = new Ballot.VoteType[](_voterLength);\\\\n _signatures = new Signature[](_voterLength);\\\\n _voters = new address[](_voterLength);\\\\n for (uint256 _i; _i < _forLength;) {\\\\n _supports[_i] = Ballot.VoteType.For;\\\\n _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]];\\\\n _voters[_i] = _vote.forVoteds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < _againstLength;) {\\\\n _supports[_i + _forLength] = Ballot.VoteType.Against;\\\\n _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]];\\\\n _voters[_i + _forLength] = _vote.againstVoteds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\\\n */\\\\n function _proposalVoted(uint256 _chainId, uint256 _round, address _voter) internal view returns (bool) {\\\\n return _voted(vote[_chainId][_round], _voter);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the weight of a governor.\\\\n */\\\\n function _getWeight(address _governor) internal view virtual returns (uint256);\\\\n\\\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa7fbe65047096bcf4269cfe42e4529eb9a8bbbf93aff9207edd46b04e9661949\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../GlobalCoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceProposal.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Proposes and casts votes for a global proposal by signatures.\\\\n */\\\\n function _proposeGlobalProposalStructAndCastVotes(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures,\\\\n address creator\\\\n ) internal returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = _proposeGlobalStruct(globalProposal, creator);\\\\n _castVotesBySignatures(proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts votes for a global proposal by signatures.\\\\n */\\\\n function _castGlobalProposalBySignatures(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) internal {\\\\n Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n\\\\n bytes32 proposalHash = _proposal.hash();\\\\n if (vote[0][_proposal.nonce].hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, vote[0][_proposal.nonce].hash);\\\\n }\\\\n\\\\n _castVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\\\n */\\\\n function getGlobalProposalSignatures(uint256 round_)\\\\n external\\\\n view\\\\n returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures)\\\\n {\\\\n return _getProposalSignatures(0, round_);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\\\n */\\\\n function globalProposalVoted(uint256 round_, address voter) external view returns (bool) {\\\\n return _proposalVoted(0, round_, voter);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3905efdfd61681db17bcc392cf93d6571e94bf752f813eacd2504662241231c8\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceProposal.sol\\\\\\\";\\\\n\\\\nabstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Proposes a proposal struct and casts votes by signature.\\\\n */\\\\n function _proposeProposalStructAndCastVotes(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n address _creator\\\\n ) internal {\\\\n _proposeProposalStruct(_proposal, _creator);\\\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes a proposal struct and casts votes by signature.\\\\n */\\\\n function _castProposalBySignatures(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures\\\\n ) internal {\\\\n bytes32 _proposalHash = _proposal.hash();\\\\n\\\\n if (vote[_proposal.chainId][_proposal.nonce].hash != _proposalHash) {\\\\n revert ErrInvalidProposal(_proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\\\n }\\\\n\\\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev See `castProposalVoteForCurrentNetwork`.\\\\n */\\\\n function _castProposalVoteForCurrentNetwork(address _voter, Proposal.ProposalDetail memory _proposal, Ballot.VoteType _support) internal {\\\\n if (_proposal.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid);\\\\n\\\\n bytes32 proposalHash = _proposal.hash();\\\\n if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\\\n }\\\\n\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n Signature memory _emptySignature;\\\\n _castVote(_proposal, _support, _minimumForVoteWeight, _minimumAgainstVoteWeight, _voter, _emptySignature, _getWeight(_voter));\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\\\n */\\\\n function getProposalSignatures(\\\\n uint256 _chainId,\\\\n uint256 _round\\\\n ) external view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\\\n return _getProposalSignatures(_chainId, _round);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\\\n */\\\\n function proposalVoted(uint256 _chainId, uint256 _round, address _voter) external view returns (bool) {\\\\n return _proposalVoted(_chainId, _round, _voter);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x820788183e3300ede4a19be84a3d7c991ac579017f78a098b26d1bbebc411ec4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallback.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManagerCallback\\\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\\\n */\\\\ninterface IBridgeManagerCallback is IERC165 {\\\\n /**\\\\n * @dev Handles the event when bridge operators are added.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\\\n\\\\n /**\\\\n * @dev Handles the event when bridge operators are removed.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerCallbackRegister {\\\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\\\n\\\\n event CallbackRegistered(address, bool);\\\\n /**\\\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\\\n */\\\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\\\n\\\\n /**\\\\n * @dev Retrieves the addresses of registered callbacks.\\\\n * @return registers An array containing the addresses of registered callbacks.\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers);\\\\n\\\\n /**\\\\n * @dev Registers multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external;\\\\n\\\\n /**\\\\n * @dev Unregisters multiple callbacks from the bridge.\\\\n * @param registers The array of callback addresses to unregister.\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/ChainTypeConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface ChainTypeConsumer {\\\\n enum ChainType {\\\\n RoninChain,\\\\n Mainchain\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/SignatureConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface SignatureConsumer {\\\\n struct Signature {\\\\n uint8 v;\\\\n bytes32 r;\\\\n bytes32 s;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/VoteStatusConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface VoteStatusConsumer {\\\\n enum VoteStatus {\\\\n Pending,\\\\n Approved,\\\\n Executed,\\\\n Rejected,\\\\n Expired\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/Ballot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\n\\\\nlibrary Ballot {\\\\n using ECDSA for bytes32;\\\\n\\\\n enum VoteType {\\\\n For,\\\\n Against\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Ballot(bytes32 proposalHash,uint8 support)\\\\\\\");\\\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\\\n\\\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, BALLOT_TYPEHASH)\\\\n mstore(add(ptr, 0x20), _proposalHash)\\\\n mstore(add(ptr, 0x40), _support)\\\\n digest := keccak256(ptr, 0x60)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/GlobalProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./Proposal.sol\\\\\\\";\\\\n\\\\nlibrary GlobalProposal {\\\\n /**\\\\n * @dev Error thrown when attempting to interact with an unsupported target.\\\\n */\\\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\\\n\\\\n enum TargetOption {\\\\n BridgeManager, // 0\\\\n GatewayContract, // 1\\\\n BridgeReward, // 2\\\\n BridgeSlash, // 3\\\\n BridgeTracking, // 4\\\\n PauseEnforcer // 5\\\\n\\\\n }\\\\n\\\\n struct GlobalProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n uint256 expiryTimestamp;\\\\n address executor;\\\\n TargetOption[] targetOptions;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = self.values;\\\\n TargetOption[] memory targets = self.targetOptions;\\\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\\\n uint256[] memory gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length;) {\\\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\\\n\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * proposal.nonce,\\\\n * proposal.expiryTimestamp,\\\\n * proposal.executor,\\\\n * targetsHash,\\\\n * valuesHash,\\\\n * calldatasHash,\\\\n * gasAmountsHash\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0x80), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x100)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts into the normal proposal.\\\\n */\\\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\\\n detail_.nonce = self.nonce;\\\\n detail_.chainId = 0;\\\\n detail_.expiryTimestamp = self.expiryTimestamp;\\\\n detail_.executor = self.executor;\\\\n\\\\n detail_.targets = new address[](self.targetOptions.length);\\\\n detail_.values = self.values;\\\\n detail_.calldatas = self.calldatas;\\\\n detail_.gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\\\n detail_.targets[i] = targets[i];\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Proposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nlibrary Proposal {\\\\n /**\\\\n * @dev Error thrown when there is insufficient gas to execute a function.\\\\n */\\\\n error ErrInsufficientGas(bytes32 proposalHash);\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\\\n */\\\\n error ErrInvalidExpiryTimestamp();\\\\n\\\\n /**\\\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\\n */\\\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\\\n\\\\n struct ProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n // Value 0: all chain should run this proposal\\\\n // Other values: only specific chain has to execute\\\\n uint256 chainId;\\\\n uint256 expiryTimestamp;\\\\n // The address that execute the proposal after the proposal passes.\\\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\\\n address executor;\\\\n address[] targets;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\\\n\\\\n /**\\\\n * @dev Validates the proposal.\\\\n */\\\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\\\n if (\\\\n !(\\\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\\\n && proposal.targets.length == proposal.gasAmounts.length\\\\n )\\\\n ) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\\\n revert ErrInvalidExpiryTimestamp();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = proposal.values;\\\\n address[] memory targets = proposal.targets;\\\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length; ++i) {\\\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\\\n }\\\\n\\\\n // return\\\\n // keccak256(\\\\n // abi.encode(\\\\n // TYPE_HASH,\\\\n // proposal.nonce,\\\\n // proposal.chainId,\\\\n // proposal.expiryTimestamp\\\\n // proposal.executor\\\\n // targetsHash,\\\\n // valuesHash,\\\\n // calldatasHash,\\\\n // gasAmountsHash\\\\n // )\\\\n // );\\\\n // /\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0x100), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x120)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\\\n */\\\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\\\n return proposal.executor == address(0);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is executable for the current chain.\\\\n *\\\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\\\n *\\\\n */\\\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal.\\\\n */\\\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\\\n\\\\n successCalls = new bool[](proposal.targets.length);\\\\n returnDatas = new bytes[](proposal.targets.length);\\\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\\\n\\\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\\\n\\\\n if (!successCalls[i]) {\\\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/ronin/gateway/RoninBridgeManagerConstructor.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from \\\\\\\"../../extensions/bridge-operator-governance/BridgeManager.sol\\\\\\\";\\\\nimport {\\\\n Ballot,\\\\n GlobalProposal,\\\\n Proposal,\\\\n CommonGovernanceProposal,\\\\n GovernanceProposal\\\\n} from \\\\\\\"../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\\\\\";\\\\nimport {\\\\n CoreGovernance,\\\\n GlobalCoreGovernance,\\\\n GlobalGovernanceProposal\\\\n} from \\\\\\\"../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\\\\\";\\\\nimport { VoteStatusConsumer } from \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\ncontract RoninBridgeManagerConstructor is BridgeManager, GovernanceProposal, GlobalGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n function initialize(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n uint256 expiryDuration,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights,\\\\n GlobalProposal.TargetOption[] memory targetOptions,\\\\n address[] memory targets\\\\n ) external initializer {\\\\n __CoreGovernance_init(expiryDuration);\\\\n __GlobalCoreGovernance_init(targetOptions, targets);\\\\n __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the chain type of the contract.\\\\n * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain).\\\\n */\\\\n function _getChainType() internal pure override returns (ChainType) {\\\\n return ChainType.RoninChain;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the total weights of all governors.\\\\n * @return The total weights of all governors combined.\\\\n */\\\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\\\n return getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the minimum vote weight required for governance actions.\\\\n * @return The minimum vote weight required for governance actions.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\\\\n return minimumVoteWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weight of a specific governor.\\\\n * @param _governor The address of the governor to get the vote weight for.\\\\n * @return The vote weight of the specified governor.\\\\n */\\\\n function _getWeight(address _governor) internal view virtual override returns (uint256) {\\\\n return _getGovernorWeight(_governor);\\\\n }\\\\n\\\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\\\n return DOMAIN_SEPARATOR;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xbd91923f0b98646e3bbf22b28e854e7932d815c5cdb5e4d0d7f92291d076f97f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/Types.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { LibTUint256Slot } from \\\\\\\"./operations/LibTUint256Slot.sol\\\\\\\";\\\\n\\\\ntype TUint256Slot is bytes32;\\\\n\\\\nusing {\\\\n LibTUint256Slot.add,\\\\n LibTUint256Slot.sub,\\\\n LibTUint256Slot.mul,\\\\n LibTUint256Slot.div,\\\\n LibTUint256Slot.load,\\\\n LibTUint256Slot.store,\\\\n LibTUint256Slot.addAssign,\\\\n LibTUint256Slot.subAssign,\\\\n LibTUint256Slot.preDecrement,\\\\n LibTUint256Slot.postDecrement,\\\\n LibTUint256Slot.preIncrement,\\\\n LibTUint256Slot.postIncrement\\\\n} for TUint256Slot global;\\\\n\\\",\\\"keccak256\\\":\\\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/operations/LibTUint256Slot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { TUint256Slot } from \\\\\\\"../Types.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title LibTUint256Slot\\\\n * @dev Library for handling unsigned 256-bit integers.\\\\n */\\\\nlibrary LibTUint256Slot {\\\\n /// @dev value is equal to bytes4(keccak256(\\\\\\\"Panic(uint256)\\\\\\\"))\\\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\\\n /// @dev error code for {Arithmetic over/underflow} error\\\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\\\n /// @dev error code for {Division or modulo by 0} error\\\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\\\n\\\\n /**\\\\n * @dev Loads the value of the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @return val The loaded value.\\\\n */\\\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\\\n assembly {\\\\n val := sload(self)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a value into the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to be stored.\\\\n */\\\\n function store(TUint256Slot self, uint256 other) internal {\\\\n assembly {\\\\n sstore(self, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Multiplies the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to multiply by.\\\\n * @return res The resulting value after multiplication.\\\\n */\\\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n if iszero(iszero(storedVal)) {\\\\n res := mul(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if iszero(eq(other, div(res, storedVal))) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Divides the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to divide by.\\\\n * @return res The resulting value after division.\\\\n */\\\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n // revert if divide by zero\\\\n if iszero(other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, DIVISION_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n res := div(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction.\\\\n */\\\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n\\\\n // Underflow check\\\\n if lt(storedVal, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n\\\\n res := sub(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition.\\\\n */\\\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n res := add(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if lt(res, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after incrementing.\\\\n */\\\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = addAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The original value before incrementing.\\\\n */\\\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res + 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after decrementing.\\\\n */\\\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = subAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value before decrementing.\\\\n */\\\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res - 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition and storage.\\\\n */\\\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = add(self, other));\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction and storage.\\\\n */\\\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = sub(self, other));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 32, + "storageLayout": { + "storage": [ + { + "astId": 52029, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 52032, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 67500, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "DOMAIN_SEPARATOR", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 69549, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "round", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 69557, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "vote", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)69487_storage))" + }, + { + "astId": 69559, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "_proposalExpiryDuration", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 70281, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "_targetOptionsMap", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_enum(TargetOption)74353,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32", + "base": "t_address" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(TargetOption)74353": { + "encoding": "inplace", + "label": "enum GlobalProposal.TargetOption", + "numberOfBytes": "1" + }, + "t_enum(VoteStatus)73297": { + "encoding": "inplace", + "label": "enum VoteStatusConsumer.VoteStatus", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(Signature)73288_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SignatureConsumer.Signature)", + "numberOfBytes": "32", + "value": "t_struct(Signature)73288_storage" + }, + "t_mapping(t_enum(TargetOption)74353,t_address)": { + "encoding": "mapping", + "key": "t_enum(TargetOption)74353", + "label": "mapping(enum GlobalProposal.TargetOption => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)69487_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(ProposalVote)69487_storage)" + }, + "t_mapping(t_uint256,t_struct(ProposalVote)69487_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVote)69487_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(ProposalVote)69487_storage": { + "encoding": "inplace", + "label": "struct CoreGovernance.ProposalVote", + "numberOfBytes": "288", + "members": [ + { + "astId": 69463, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(VoteStatus)73297" + }, + { + "astId": 69465, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "hash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 69467, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "againstVoteWeight", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 69469, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "forVoteWeight", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 69472, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "forVoteds", + "offset": 0, + "slot": "4", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 69475, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "againstVoteds", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 69477, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "expiryTimestamp", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 69482, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "sig", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Signature)73288_storage)" + }, + { + "astId": 69486, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "voted", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ] + }, + "t_struct(Signature)73288_storage": { + "encoding": "inplace", + "label": "struct SignatureConsumer.Signature", + "numberOfBytes": "96", + "members": [ + { + "astId": 73283, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "v", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 73285, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "r", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 73287, + "contract": "src/ronin/gateway/RoninBridgeManagerConstructor.sol:RoninBridgeManagerConstructor", + "label": "s", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1722327286, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "round(uint256)": { + "notice": "chain id = 0 for global proposal" + } + }, + "errors": { + "ErrBelowMinRequiredGovernors()": [ + { + "notice": "Error indicating that the governors list will go below minimum number of required governor." + } + ], + "ErrGovernorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying governor" + } + ], + "ErrGovernorNotMatch(address,address)": [ + { + "notice": "Error indicating that the msg.sender is not match the required governor" + } + ], + "ErrInvalidInput()": [ + { + "notice": "Common invalid input error" + } + ], + "ErrOperatorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying operator" + } + ] + } + } +} \ No newline at end of file diff --git a/deployments/ronin-mainnet/RoninBridgeManagerConstructorProxy.json b/deployments/ronin-mainnet/RoninBridgeManagerConstructorProxy.json new file mode 100644 index 00000000..f9c27b85 --- /dev/null +++ b/deployments/ronin-mainnet/RoninBridgeManagerConstructorProxy.json @@ -0,0 +1,54 @@ +{ + "abi": "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"logic\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"payable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"functionDelegateCall\",\"inputs\":[{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", + "absolutePath": "TransparentProxyV2.sol:TransparentProxyV2", + "address": "0x2ae89936FC398AeA23c63dB2404018fE361A8628", + "ast": "", + "blockNumber": 36830781, + "bytecode": "\"0x608060405260405162000f1a38038062000f1a833981016040819052620000269162000439565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200056c565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000ed3833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000ef3602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000ed38339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b62000211816200031c565b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b6060600080856001600160a01b031685604051620002bc919062000519565b600060405180830381855af49150503d8060008114620002f9576040519150601f19603f3d011682016040523d82523d6000602084013e620002fe565b606091505b50909250905062000312868383876200032b565b9695505050505050565b6001600160a01b03163b151590565b606083156200039f578251600003620003975762000349856200031c565b620003975760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001ca565b5081620003ab565b620003ab8383620003b3565b949350505050565b815115620003c45781518083602001fd5b8060405162461bcd60e51b8152600401620001ca919062000537565b80516001600160a01b0381168114620003f857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200043057818101518382015260200162000416565b50506000910152565b6000806000606084860312156200044f57600080fd5b6200045a84620003e0565b92506200046a60208501620003e0565b60408501519092506001600160401b03808211156200048857600080fd5b818601915086601f8301126200049d57600080fd5b815181811115620004b257620004b2620003fd565b604051601f8201601f19908116603f01168101908382118183101715620004dd57620004dd620003fd565b81604052828152896020848701011115620004f757600080fd5b6200050a83602083016020880162000413565b80955050505050509250925092565b600082516200052d81846020870162000413565b9190910192915050565b60208152600082518060208401526200055881604085016020870162000413565b601f01601f19169190910160400192915050565b610957806200057c6000396000f3fe6080604052600436106100225760003560e01c80634bb5274a1461003957610031565b366100315761002f61004c565b005b61002f61004c565b61002f610047366004610765565b61019e565b6100546101ee565b6001600160a01b031633036101945760606001600160e01b0319600035166364d3180d60e11b810161008f5761008861020f565b915061018c565b63587086bd60e11b6001600160e01b03198216016100af57610088610266565b63070d7c6960e41b6001600160e01b03198216016100cf576100886102ac565b621eb96f60e61b6001600160e01b03198216016100ee576100886102dd565b63a39f25e560e01b6001600160e01b031982160161010e5761008861031d565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b61019c610331565b565b6101a66101ee565b6001600160a01b031633036101e35760006101bf610341565b9050600080835160208501845af43d6000803e8080156101de573d6000f35b3d6000fd5b6101eb61004c565b50565b60006000805160206108bb8339815191525b546001600160a01b0316919050565b6060610219610350565b60006102283660048184610799565b81019061023591906107df565b90506102528160405180602001604052806000815250600061035b565b505060408051602081019091526000815290565b60606000806102783660048184610799565b81019061028591906107fa565b915091506102958282600161035b565b604051806020016040528060008152509250505090565b60606102b6610350565b60006102c53660048184610799565b8101906102d291906107df565b905061025281610387565b60606102e7610350565b60006102f16101ee565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b6060610327610350565b60006102f1610341565b61019c61033c610341565b6103db565b600061034b6103fa565b905090565b341561019c57600080fd5b61036483610410565b6000825111806103715750805b15610382576103808383610450565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b06101ee565b604080516001600160a01b03928316815291841660208301520160405180910390a16101eb8161047c565b3660008037600080366000845af43d6000803e8080156101de573d6000f35b60006000805160206108db833981519152610200565b61041981610513565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061047583836040518060600160405280602781526020016108fb60279139610593565b9392505050565b6001600160a01b0381166104e15760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610183565b806000805160206108bb8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051c8161060b565b61057e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610183565b806000805160206108db8339815191526104f2565b6060600080856001600160a01b0316856040516105b0919061086b565b600060405180830381855af49150503d80600081146105eb576040519150601f19603f3d011682016040523d82523d6000602084013e6105f0565b606091505b50915091506106018683838761061a565b9695505050505050565b6001600160a01b03163b151590565b60608315610687578251600003610680576106348561060b565b6106805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610183565b5081610691565b6106918383610699565b949350505050565b8151156106a95781518083602001fd5b8060405162461bcd60e51b81526004016101839190610887565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126106ea57600080fd5b81356001600160401b0380821115610704576107046106c3565b604051601f8301601f19908116603f0116810190828211818310171561072c5761072c6106c3565b8160405283815286602085880101111561074557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561077757600080fd5b81356001600160401b0381111561078d57600080fd5b610691848285016106d9565b600080858511156107a957600080fd5b838611156107b657600080fd5b5050820193919092039150565b80356001600160a01b03811681146107da57600080fd5b919050565b6000602082840312156107f157600080fd5b610475826107c3565b6000806040838503121561080d57600080fd5b610816836107c3565b915060208301356001600160401b0381111561083157600080fd5b61083d858286016106d9565b9150509250929050565b60005b8381101561086257818101518382015260200161084a565b50506000910152565b6000825161087d818460208701610847565b9190910192915050565b60208152600082518060208401526108a6816040850160208701610847565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200edc2e26cd2f089d2440222c204925f8d9a021cedddb62009458361437a857ce64736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564\"", + "callValue": 0, + "chainId": 2020, + "constructorArgs": "0x00000000000000000000000089f25ef52e46e583ead6c5e1acd2471ed499c8c7000000000000000000000000a62dddcc58e769bcfd2f9a7a61cdf331f18c265000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ba47d4c1d780000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e400000000000000000000000000000000000000000000000000000000001275000000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000007400000000000000000000000000000000000000000000000000000000000000a200000000000000000000000000000000000000000000000000000000000000ae000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000c23f2907bc11848b5d5cedbb835e915d7b760d990000000000000000000000004b3844a29cfa5824f53e2137edb6dc2b54501bea0000000000000000000000004a4217d8751a027d853785824ef40522c512a3fe00000000000000000000000032cb6da260726bb2192c4085b857afd945a215cb000000000000000000000000a91d05b7c6e684f43e8fe0c25b3c4bb1747a2a9e000000000000000000000000e38afbe7738b6ec4280a6bca1176c1c1a928a19c000000000000000000000000e795f18f2f5df5a666994e839b98263dba86c902000000000000000000000000f4682b9263d1ba9bd9db09da125708607d1edd3a000000000000000000000000f0c48b7f020bb61e6a3500abc4b4954bde7a2039000000000000000000000000063105d0e7215b703909a7274fe38393302f3134000000000000000000000000d9d5b3e58fa693b468a20c716793b18a1195380a000000000000000000000000ff30ed09e3ae60d39bce1727ee3292fd76a6face0000000000000000000000008c4ad2dc12adb9ad115e37ee9ad2e00e343edf8500000000000000000000000073f5b22312b7b2b3b1cd179fc62269ab369c82060000000000000000000000005e04dc8156ce222289d52487dbadcb01c8c990f9000000000000000000000000772112c7e5dd4ed663e844e79d77c1569a2e88ce000000000000000000000000ec5c90401f95f8c49b1e133e94f09d85b21d96a4000000000000000000000000332253265e36689d9830e57112cd1aadb1a773f9000000000000000000000000236af2ffdb611b14e3042a982d13eda1627d9c9600000000000000000000000054c8c42f07007d43c3049bef6f10ea68687d43ef00000000000000000000000066225acc78be789c57a11c9a18f051c779d678b5000000000000000000000000564dcb855eb360826f27d1eb9c57cbbe6c76f50f0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000ed3805fb65ff51a99fef4676bdbc97abeca93d11000000000000000000000000e880802580a1fbdef67ace39d1b21c5b2c74f0590000000000000000000000004b18cebeb9797ea594b5977109cc07b21c37e8c3000000000000000000000000a441f1399c8c023798586fbbbcf35f27279638a100000000000000000000000072a69b04b59c36fced19ac54209bef878e84fcbf000000000000000000000000e258f9996723b910712d6e67ada4eafc15f7f101000000000000000000000000020dd9a5e318695a61dda88db7ad077ec306e3e900000000000000000000000060c4b72fc62b3e3a74e283aa9ba20d61dd4d8f1b0000000000000000000000009b0612e43855ef9a7c329ee89653ba45273b550e00000000000000000000000047cfcb64f8ea44d6ea7fab32f13efa2f8e65eec1000000000000000000000000ad23e87306aa3c7b95ee760e86f40f3021e5fa18000000000000000000000000bacb04ea617b3e5eee0e3f6e8fcb5ba886b8395800000000000000000000000077ab649caa7b4b673c9f2cf069900df48114d79d0000000000000000000000000dca20728c8bb7173d3452559f40e95c609157990000000000000000000000000d48adbdc523681c0dee736dbdc4497e02bec2100000000000000000000000005832c3219c1da998e828e1a2406b73dbfc02a70c000000000000000000000000ed448901cc62be10c5525ba19645ddca1fd9da1d0000000000000000000000008d4f4e4ba313c4332e720445d8268e087d5c19b800000000000000000000000058abcbcab52dee942491700cd0db67826bbaa8c60000000000000000000000004620fb95eabdab4bf681d987e116e0aaef1adef2000000000000000000000000c092fa0c772b3c850e676c57d8737bb39084b9ac0000000000000000000000003c583c0c97646a73843ae57b93f33e1995c8dc800000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000050000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df000000000000000000000000796a163a21e9a659fc9773166e0afdc1eb01aad1000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b240000000000000000000000003fb325b251ee80945d3fc8c7692f5affca1b8bc20000000000000000000000002367cd5468c2b3cd18aa74adb7e14e43426af83700000000000000000000000000000000000000000000000000000000", + "contractName": "TransparentProxyV2", + "deployedBytecode": "\"0x6080604052600436106100225760003560e01c80634bb5274a1461003957610031565b366100315761002f61004c565b005b61002f61004c565b61002f610047366004610765565b61019e565b6100546101ee565b6001600160a01b031633036101945760606001600160e01b0319600035166364d3180d60e11b810161008f5761008861020f565b915061018c565b63587086bd60e11b6001600160e01b03198216016100af57610088610266565b63070d7c6960e41b6001600160e01b03198216016100cf576100886102ac565b621eb96f60e61b6001600160e01b03198216016100ee576100886102dd565b63a39f25e560e01b6001600160e01b031982160161010e5761008861031d565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b61019c610331565b565b6101a66101ee565b6001600160a01b031633036101e35760006101bf610341565b9050600080835160208501845af43d6000803e8080156101de573d6000f35b3d6000fd5b6101eb61004c565b50565b60006000805160206108bb8339815191525b546001600160a01b0316919050565b6060610219610350565b60006102283660048184610799565b81019061023591906107df565b90506102528160405180602001604052806000815250600061035b565b505060408051602081019091526000815290565b60606000806102783660048184610799565b81019061028591906107fa565b915091506102958282600161035b565b604051806020016040528060008152509250505090565b60606102b6610350565b60006102c53660048184610799565b8101906102d291906107df565b905061025281610387565b60606102e7610350565b60006102f16101ee565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b6060610327610350565b60006102f1610341565b61019c61033c610341565b6103db565b600061034b6103fa565b905090565b341561019c57600080fd5b61036483610410565b6000825111806103715750805b15610382576103808383610450565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b06101ee565b604080516001600160a01b03928316815291841660208301520160405180910390a16101eb8161047c565b3660008037600080366000845af43d6000803e8080156101de573d6000f35b60006000805160206108db833981519152610200565b61041981610513565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061047583836040518060600160405280602781526020016108fb60279139610593565b9392505050565b6001600160a01b0381166104e15760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610183565b806000805160206108bb8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051c8161060b565b61057e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610183565b806000805160206108db8339815191526104f2565b6060600080856001600160a01b0316856040516105b0919061086b565b600060405180830381855af49150503d80600081146105eb576040519150601f19603f3d011682016040523d82523d6000602084013e6105f0565b606091505b50915091506106018683838761061a565b9695505050505050565b6001600160a01b03163b151590565b60608315610687578251600003610680576106348561060b565b6106805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610183565b5081610691565b6106918383610699565b949350505050565b8151156106a95781518083602001fd5b8060405162461bcd60e51b81526004016101839190610887565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126106ea57600080fd5b81356001600160401b0380821115610704576107046106c3565b604051601f8301601f19908116603f0116810190828211818310171561072c5761072c6106c3565b8160405283815286602085880101111561074557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561077757600080fd5b81356001600160401b0381111561078d57600080fd5b610691848285016106d9565b600080858511156107a957600080fd5b838611156107b657600080fd5b5050820193919092039150565b80356001600160a01b03811681146107da57600080fd5b919050565b6000602082840312156107f157600080fd5b610475826107c3565b6000806040838503121561080d57600080fd5b610816836107c3565b915060208301356001600160401b0381111561083157600080fd5b61083d858286016106d9565b9150509250929050565b60005b8381101561086257818101518382015260200161084a565b50506000910152565b6000825161087d818460208701610847565b9190910192915050565b60208152600082518060208401526108a6816040850160208701610847565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200edc2e26cd2f089d2440222c204925f8d9a021cedddb62009458361437a857ce64736f6c63430008170033\"", + "deployer": "0x08295771719b138a241F45023B13CC868D72827D", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the Proxy contract.", + "params": { + "admin": "The address of the admin contract.", + "data": "The initialization data.", + "logic": "The address of the logic contract." + } + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + } + }, + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is changed." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + } + }, + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"logic\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"admin\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"previousAdmin\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newAdmin\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"AdminChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"beacon\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BeaconUpgraded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"implementation\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"Upgraded\\\",\\\"type\\\":\\\"event\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"fallback\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"functionDelegateCall\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"function\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"receive\\\"}],\\\"devdoc\\\":{\\\"events\\\":{\\\"AdminChanged(address,address)\\\":{\\\"details\\\":\\\"Emitted when the admin account has changed.\\\"},\\\"BeaconUpgraded(address)\\\":{\\\"details\\\":\\\"Emitted when the beacon is changed.\\\"},\\\"Upgraded(address)\\\":{\\\"details\\\":\\\"Emitted when the implementation is upgraded.\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"constructor\\\":{\\\"details\\\":\\\"Initializes the Proxy contract.\\\",\\\"params\\\":{\\\"admin\\\":\\\"The address of the admin contract.\\\",\\\"data\\\":\\\"The initialization data.\\\",\\\"logic\\\":\\\"The address of the logic contract.\\\"}},\\\"functionDelegateCall(bytes)\\\":{\\\"details\\\":\\\"Calls a function from the current implementation as specified by `data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"dependencies/@fdk-0.3.1-beta/src/TransparentProxyV2.sol\\\":\\\"TransparentProxyV2\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":1},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/interfaces/IERC1967.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\\\n *\\\\n * _Available since v4.8.3._\\\\n */\\\\ninterface IERC1967 {\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is changed.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/IERC1967.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\nabstract contract ERC1967Upgrade is IERC1967 {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\\\n * include them in the ABI so this interface must be used to interact with it.\\\\n */\\\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\\\n function admin() external view returns (address);\\\\n\\\\n function implementation() external view returns (address);\\\\n\\\\n function changeAdmin(address) external;\\\\n\\\\n function upgradeTo(address) external;\\\\n\\\\n function upgradeToAndCall(address, bytes memory) external payable;\\\\n}\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n *\\\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\\\n * implementation.\\\\n *\\\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n *\\\\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\\\n * implementation provides a function with the same selector.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\\\n */\\\\n function _fallback() internal virtual override {\\\\n if (msg.sender == _getAdmin()) {\\\\n bytes memory ret;\\\\n bytes4 selector = msg.sig;\\\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\\\n ret = _dispatchUpgradeTo();\\\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\\\n ret = _dispatchUpgradeToAndCall();\\\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\\\n ret = _dispatchChangeAdmin();\\\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\\\n ret = _dispatchAdmin();\\\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\\\n ret = _dispatchImplementation();\\\\n } else {\\\\n revert(\\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n }\\\\n assembly {\\\\n return(add(ret, 0x20), mload(ret))\\\\n }\\\\n } else {\\\\n super._fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function _dispatchAdmin() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address admin = _getAdmin();\\\\n return abi.encode(admin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function _dispatchImplementation() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address implementation = _implementation();\\\\n return abi.encode(implementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address newAdmin = abi.decode(msg.data[4:], (address));\\\\n _changeAdmin(newAdmin);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n */\\\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address newImplementation = abi.decode(msg.data[4:], (address));\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n */\\\\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\\\n */\\\\n function _requireZeroValue() private {\\\\n require(msg.value == 0);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * Furthermore, `isContract` will also return true if the target contract within\\\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\\\n * which only has an effect at the end of a transaction.\\\\n * ====\\\\n *\\\\n * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(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(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\\\n *\\\\n * _Available since v4.8._\\\\n */\\\\n function verifyCallResultFromTarget(\\\\n address target,\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n if (success) {\\\\n if (returndata.length == 0) {\\\\n // only check isContract if the call was successful and the return data is empty\\\\n // otherwise we already know that it was a contract\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n }\\\\n return returndata;\\\\n } else {\\\\n _revert(returndata, errorMessage);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason or using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n _revert(returndata, errorMessage);\\\\n }\\\\n }\\\\n\\\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\\\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 /// @solidity memory-safe-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\\\",\\\"keccak256\\\":\\\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```solidity\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\\\\n * _Available since v4.9 for `string`, `bytes`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n struct StringSlot {\\\\n string value;\\\\n }\\\\n\\\\n struct BytesSlot {\\\\n bytes value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\\\n */\\\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\\\n */\\\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := store.slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\\\n */\\\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := store.slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/src/TransparentProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { TransparentUpgradeableProxy } from\\\\n \\\\\\\"../dependencies/@openzeppelin-4.9.3/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentProxyV2 is TransparentUpgradeableProxy {\\\\n /**\\\\n * @dev Initializes the Proxy contract.\\\\n * @param logic The address of the logic contract.\\\\n * @param admin The address of the admin contract.\\\\n * @param data The initialization data.\\\\n */\\\\n constructor(address logic, address admin, bytes memory data) payable TransparentUpgradeableProxy(logic, admin, data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory data) public payable ifAdmin {\\\\n address addr = _implementation();\\\\n\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let result := delegatecall(gas(), addr, add(data, 32), mload(data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1a3bc632cc0a6406551f4f5582bb236e702d906411a56cb412e92a785ab911ac\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 33, + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1722327286, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file From 7563498d009c566ad015a8bceddd49592229ee8f Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 30 Jul 2024 15:47:41 +0700 Subject: [PATCH 260/305] chore: add bridge manager artifact --- .../RoninBridgeManagerLogic.json | 732 ++++++++++++++++++ 1 file changed, 732 insertions(+) create mode 100644 deployments/ronin-mainnet/RoninBridgeManagerLogic.json diff --git a/deployments/ronin-mainnet/RoninBridgeManagerLogic.json b/deployments/ronin-mainnet/RoninBridgeManagerLogic.json new file mode 100644 index 00000000..2b4d0b41 --- /dev/null +++ b/deployments/ronin-mainnet/RoninBridgeManagerLogic.json @@ -0,0 +1,732 @@ +{ + "abi": "[{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addBridgeOperators\",\"inputs\":[{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castGlobalProposalBySignatures\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castProposalBySignatures\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castProposalVoteForCurrentNetwork\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"support\",\"type\":\"uint8\",\"internalType\":\"enum Ballot.VoteType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deleteExpired\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"execute\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executeGlobal\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getBridgeOperatorWeight\",\"inputs\":[{\"name\":\"bridgeOperator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperators\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCallbackRegisters\",\"inputs\":[],\"outputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFullBridgeOperatorInfos\",\"inputs\":[],\"outputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalProposalSignatures\",\"inputs\":[{\"name\":\"round_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"voters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorOf\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeight\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeights\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernors\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorOf\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalExpiryDuration\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalSignatures\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"_voters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_supports\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"_signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalProposalVoted\",\"inputs\":[{\"name\":\"round_\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isBridgeOperator\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposalVoted\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"propose\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeGlobal\",\"inputs\":[{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeGlobalProposalStructAndCastVotes\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeProposalForCurrentNetwork\",\"inputs\":[{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"support\",\"type\":\"uint8\",\"internalType\":\"enum Ballot.VoteType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeProposalStructAndCastVotes\",\"inputs\":[{\"name\":\"_proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"_supports\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"_signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeBridgeOperators\",\"inputs\":[{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolveTargets\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"}],\"outputs\":[{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"round\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinRequiredGovernor\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sumGovernorsWeight\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"sum\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalBridgeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unregisterCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateManyTargetOption\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"vote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"againstVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"forVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BridgeOperatorAddingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorRemovingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorUpdated\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsAdded\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"indexed\":false,\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsRemoved\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallbackRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalProposalCreated\",\"inputs\":[{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"globalProposalHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"globalProposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinRequiredGovernorUpdated\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Notified\",\"inputs\":[{\"name\":\"callData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"registers\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalApproved\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalCreated\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExecuted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"successCalls\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpired\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpiryDurationChanged\",\"inputs\":[{\"name\":\"duration\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalRejected\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalVoted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"voter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"support\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TargetOptionUpdated\",\"inputs\":[{\"name\":\"targetOption\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrAlreadyVoted\",\"inputs\":[{\"name\":\"voter\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrBelowMinRequiredGovernors\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrCurrentProposalIsNotCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrDuplicated\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrExistOneInternalCallFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"callData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotFound\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotMatch\",\"inputs\":[{\"name\":\"required\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrInsufficientGas\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidArguments\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidChainId\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidExecutor\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidExpiryTimestamp\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidInput\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidOrder\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidProposal\",\"inputs\":[{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidProposalNonce\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidSignatures\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidVoteWeight\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLooseProposalInternallyRevert\",\"inputs\":[{\"name\":\"callIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"revertMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrOnlySelfCall\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOperatorNotFound\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrProposalNotApproved\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrQueryForEmptyVote\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedVoteType\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrVoteIsFinalized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroAddress\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + "address": "0xacE8Be70b25ac65b7c2ccd15EE3C5E8b2F2a12D3", + "blockNumber": 36831093, + "bytecode": "\"0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615f2b80620000f46000396000f3fe608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fada5ab5800bf4e9bcf7778daed87fd94e994cf8b0e146958844535dcc724d8664736f6c63430008170033\"", + "contractName": "RoninBridgeManager", + "deployedBytecode": "\"0x608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fada5ab5800bf4e9bcf7778daed87fd94e994cf8b0e146958844535dcc724d8664736f6c63430008170033\"", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "addBridgeOperators(uint96[],address[],address[])": { + "details": "Adds multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to add.", + "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." + } + }, + "castGlobalProposalBySignatures((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceProposal-_castGlobalProposalBySignatures`." + }, + "castProposalBySignatures((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceProposal-_castProposalBySignatures`." + }, + "castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8)": { + "details": "Casts vote for a proposal on the current network. Requirements: - The method caller is governor." + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "deleteExpired(uint256,uint256)": { + "details": "Deletes the expired proposal by its chainId and nonce, without creating a new proposal. Requirements: - The proposal is already created." + }, + "execute((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]))": { + "details": "See {CoreGovernance-_executeWithCaller}." + }, + "executeGlobal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]))": { + "details": "See {GlobalCoreGovernance-_executeWithCaller}." + }, + "getBridgeOperatorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific bridge operator.", + "params": { + "bridgeOperator": "The address of the bridge operator to get the vote weight for." + }, + "returns": { + "weight": "The vote weight of the specified bridge operator." + } + }, + "getBridgeOperators()": { + "details": "Returns an array of all bridge operators.", + "returns": { + "_0": "An array containing the addresses of all bridge operators." + } + }, + "getCallbackRegisters()": { + "details": "Retrieves the addresses of registered callbacks.", + "returns": { + "registers": "An array containing the addresses of registered callbacks." + } + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getFullBridgeOperatorInfos()": { + "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", + "returns": { + "bridgeOperators": "An array of addresses representing the registered bridge operators.", + "governors": "An array of addresses representing the governors of each bridge operator.", + "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" + } + }, + "getGlobalProposalSignatures(uint256)": { + "details": "See {CommonGovernanceProposal-_getProposalSignatures}" + }, + "getGovernorOf(address)": { + "details": "Returns the corresponding `governor` of a `operator`." + }, + "getGovernorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific governor.", + "params": { + "governor": "The address of the governor to get the vote weight for." + }, + "returns": { + "weight": "voteWeight The vote weight of the specified governor." + } + }, + "getGovernorWeights(address[])": { + "details": "Returns the weights of a list of governor addresses." + }, + "getGovernors()": { + "details": "Returns an array of all governors.", + "returns": { + "_0": "An array containing the addresses of all governors." + } + }, + "getOperatorOf(address)": { + "details": "Returns the corresponding `operator` of a `governor`." + }, + "getProposalExpiryDuration()": { + "details": "Returns the expiry duration for a new proposal." + }, + "getProposalSignatures(uint256,uint256)": { + "details": "See {CommonGovernanceProposal-_getProposalSignatures}" + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTotalWeight()": { + "details": "Returns total weights." + }, + "globalProposalVoted(uint256,address)": { + "details": "See {CommonGovernanceProposal-_proposalVoted}" + }, + "isBridgeOperator(address)": { + "details": "Checks if the given address is a bridge operator.", + "params": { + "addr": "The address to check." + }, + "returns": { + "_0": "A boolean indicating whether the address is a bridge operator." + } + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "proposalVoted(uint256,uint256,address)": { + "details": "See {CommonGovernanceProposal-_proposalVoted}" + }, + "propose(uint256,uint256,address,address[],uint256[],bytes[],uint256[])": { + "details": "See `CoreGovernance-_proposeProposal`. Requirements: - The method caller is governor." + }, + "proposeGlobal(uint256,address,uint8[],uint256[],bytes[],uint256[])": { + "details": "See `CoreGovernance-_proposeGlobal`. Requirements: - The method caller is governor." + }, + "proposeGlobalProposalStructAndCastVotes((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. Requirements: - The method caller is governor." + }, + "proposeProposalForCurrentNetwork(uint256,address,address[],uint256[],bytes[],uint256[],uint8)": { + "details": "Proposes and casts vote for a proposal on the current network. Requirements: - The method caller is governor. - The proposal is for the current network." + }, + "proposeProposalStructAndCastVotes((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceProposal-_proposeProposalStructAndCastVotes`. Requirements: - The method caller is governor. - The proposal is for the current network." + }, + "registerCallbacks(address[])": { + "details": "Registers multiple callbacks with the bridge.", + "params": { + "registers": "The array of callback addresses to register." + } + }, + "removeBridgeOperators(address[])": { + "details": "Removes multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to remove." + } + }, + "resolveTargets(uint8[])": { + "details": "Returns corresponding address of target options. Return address(0) on non-existent target." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setMinRequiredGovernor(uint256)": { + "details": "Self-call to update the minimum required governor.", + "params": { + "min": "The minimum number, this must not less than 3." + } + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "sumGovernorsWeight(address[])": { + "details": "Returns total weights of the governor list." + }, + "totalBridgeOperator()": { + "details": "Returns the total number of bridge operators.", + "returns": { + "_0": "The total number of bridge operators." + } + }, + "unregisterCallbacks(address[])": { + "details": "Unregisters multiple callbacks from the bridge.", + "params": { + "registers": "The array of callback addresses to unregister." + } + }, + "updateManyTargetOption(uint8[],address[])": { + "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal." + } + }, + "events": { + "BridgeOperatorAddingFailed(address)": { + "details": "Emitted when a bridge operator is failed to add." + }, + "BridgeOperatorRemovingFailed(address)": { + "details": "Emitted when a bridge operator is failed to remove." + }, + "BridgeOperatorUpdated(address,address,address)": { + "details": "Emitted when a bridge operator is updated." + }, + "BridgeOperatorsAdded(bool[],uint96[],address[],address[])": { + "details": "Emitted when new bridge operators are added." + }, + "BridgeOperatorsRemoved(bool[],address[])": { + "details": "Emitted when bridge operators are removed." + }, + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MinRequiredGovernorUpdated(uint256)": { + "details": "Emitted when the minimum number of required governors is updated." + }, + "Notified(bytes,address[],bool[],bytes[])": { + "details": "Emitted when the contract notifies multiple registers with statuses and return data." + }, + "ProposalApproved(bytes32)": { + "details": "Emitted when the proposal is approved" + }, + "ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "ProposalExecuted(bytes32,bool[],bytes[])": { + "details": "Emitted when the proposal is executed" + }, + "ProposalExpired(bytes32)": { + "details": "Emitted when the vote is expired" + }, + "ProposalExpiryDurationChanged(uint256)": { + "details": "Emitted when the proposal expiry duration is changed." + }, + "ProposalRejected(bytes32)": { + "details": "Emitted when the vote is reject" + }, + "ProposalVoted(bytes32,address,uint8,uint256)": { + "details": "Emitted when the proposal is voted" + }, + "TargetOptionUpdated(uint8,address)": { + "details": "Emitted when the target options are updated" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + } + }, + "errors": { + "ErrAlreadyVoted(address)": [ + { + "details": "Error indicating that a voter has already voted.", + "params": { + "voter": "The address of the voter who has already voted." + } + } + ], + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrCurrentProposalIsNotCompleted()": [ + { + "details": "Error thrown when the current proposal is not completed." + } + ], + "ErrDuplicated(bytes4)": [ + { + "details": "Error thrown when a duplicated element is detected in an array.", + "params": { + "msgSig": "The function signature that invoke the error." + } + } + ], + "ErrInsufficientGas(bytes32)": [ + { + "details": "Error thrown when there is insufficient gas to execute a function." + } + ], + "ErrInvalidArguments(bytes4)": [ + { + "details": "Error indicating that arguments are invalid." + } + ], + "ErrInvalidChainId(bytes4,uint256,uint256)": [ + { + "details": "Error indicating that the chain ID is invalid.", + "params": { + "actual": "Current chain ID that executing function.", + "expected": "Expected chain ID required for the tx to success.", + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." + } + } + ], + "ErrInvalidExecutor()": [ + { + "details": "Error of the caller is not the specified executor." + } + ], + "ErrInvalidExpiryTimestamp()": [ + { + "details": "Error thrown when an invalid expiry timestamp is provided." + } + ], + "ErrInvalidOrder(bytes4)": [ + { + "details": "Error indicating that an order is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." + } + } + ], + "ErrInvalidProposal(bytes32,bytes32)": [ + { + "details": "Error thrown when an invalid proposal is encountered.", + "params": { + "actual": "The actual value of the proposal.", + "expected": "The expected value of the proposal." + } + } + ], + "ErrInvalidProposalNonce(bytes4)": [ + { + "details": "Error indicating that the proposal nonce is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid proposal nonce." + } + } + ], + "ErrInvalidSignatures(bytes4)": [ + { + "details": "Error indicating that a signature is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid signature." + } + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidVoteWeight(bytes4)": [ + { + "details": "Error indicating that a vote weight is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." + } + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrLooseProposalInternallyRevert(uint256,bytes)": [ + { + "details": "Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`." + } + ], + "ErrOnlySelfCall(bytes4)": [ + { + "details": "Error indicating that a function can only be called by the contract itself.", + "params": { + "msgSig": "The function signature (bytes4) that can only be called by the contract itself." + } + } + ], + "ErrProposalNotApproved()": [ + { + "details": "Error of proposal is not approved for executing." + } + ], + "ErrQueryForEmptyVote()": [ + { + "details": "Error thrown when querying for an empty vote." + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedInterface(bytes4,address)": [ + { + "details": "The error indicating an unsupported interface.", + "params": { + "addr": "The address where the unsupported interface was encountered.", + "interfaceId": "The bytes4 interface identifier that is not supported." + } + } + ], + "ErrUnsupportedVoteType(bytes4)": [ + { + "details": "Error indicating that a vote type is not supported.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an unsupported vote type." + } + } + ], + "ErrVoteIsFinalized()": [ + { + "details": "Error thrown when attempting to interact with a finalized vote." + } + ], + "ErrZeroAddress(bytes4)": [ + { + "details": "Error indicating that given address is null when it should not." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrAlreadyVoted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrBelowMinRequiredGovernors\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrCurrentProposalIsNotCompleted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrDuplicated\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrExistOneInternalCallFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"required\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotMatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ErrInsufficientGas\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidArguments\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ErrInvalidChainId\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidExecutor\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidExpiryTimestamp\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInput\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidOrder\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ErrInvalidProposal\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidProposalNonce\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidSignatures\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidVoteWeight\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"callIndex\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"revertMsg\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrLooseProposalInternallyRevert\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrOnlySelfCall\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrOperatorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrProposalNotApproved\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrQueryForEmptyVote\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrUnsupportedInterface\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrUnsupportedVoteType\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrVoteIsFinalized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrZeroAddress\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorAddingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorRemovingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"fromBridgeOperator\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"toBridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"CallbackRegistered\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"globalProposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GlobalProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"MinRequiredGovernorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"Notified\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalApproved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"successCalls\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"ProposalExecuted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalExpired\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"duration\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalExpiryDurationChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalRejected\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalVoted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption\\\",\\\"name\\\":\\\"targetOption\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"TargetOptionUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DOMAIN_SEPARATOR\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"addBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"castGlobalProposalBySignatures\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"castProposalBySignatures\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"castProposalVoteForCurrentNetwork\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"deleteExpired\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"execute\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"executeGlobal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getBridgeOperatorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getBridgeOperators\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getCallbackRegisters\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getFullBridgeOperatorInfos\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round_\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getGlobalProposalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"voters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"getGovernorWeights\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getGovernors\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getOperatorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getProposalExpiryDuration\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getProposalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_voters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"_supports\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getTotalWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round_\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"globalProposalVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"proposalVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"propose\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"proposeGlobal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"proposeGlobalProposalStructAndCastVotes\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"proposeProposalForCurrentNetwork\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"_proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"_supports\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"proposeProposalStructAndCastVotes\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"removeBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"resolveTargets\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"round\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setMinRequiredGovernor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"sumGovernorsWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"sum\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"unregisterCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"updateManyTargetOption\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"vote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"hash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"againstVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"forVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrAlreadyVoted(address)\\\":[{\\\"details\\\":\\\"Error indicating that a voter has already voted.\\\",\\\"params\\\":{\\\"voter\\\":\\\"The address of the voter who has already voted.\\\"}}],\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrCurrentProposalIsNotCompleted()\\\":[{\\\"details\\\":\\\"Error thrown when the current proposal is not completed.\\\"}],\\\"ErrDuplicated(bytes4)\\\":[{\\\"details\\\":\\\"Error thrown when a duplicated element is detected in an array.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature that invoke the error.\\\"}}],\\\"ErrInsufficientGas(bytes32)\\\":[{\\\"details\\\":\\\"Error thrown when there is insufficient gas to execute a function.\\\"}],\\\"ErrInvalidArguments(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that arguments are invalid.\\\"}],\\\"ErrInvalidChainId(bytes4,uint256,uint256)\\\":[{\\\"details\\\":\\\"Error indicating that the chain ID is invalid.\\\",\\\"params\\\":{\\\"actual\\\":\\\"Current chain ID that executing function.\\\",\\\"expected\\\":\\\"Expected chain ID required for the tx to success.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\"}}],\\\"ErrInvalidExecutor()\\\":[{\\\"details\\\":\\\"Error of the caller is not the specified executor.\\\"}],\\\"ErrInvalidExpiryTimestamp()\\\":[{\\\"details\\\":\\\"Error thrown when an invalid expiry timestamp is provided.\\\"}],\\\"ErrInvalidOrder(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that an order is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid order.\\\"}}],\\\"ErrInvalidProposal(bytes32,bytes32)\\\":[{\\\"details\\\":\\\"Error thrown when an invalid proposal is encountered.\\\",\\\"params\\\":{\\\"actual\\\":\\\"The actual value of the proposal.\\\",\\\"expected\\\":\\\"The expected value of the proposal.\\\"}}],\\\"ErrInvalidProposalNonce(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the proposal nonce is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\"}}],\\\"ErrInvalidSignatures(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a signature is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid signature.\\\"}}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidVoteWeight(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote weight is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid vote weight.\\\"}}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrLooseProposalInternallyRevert(uint256,bytes)\\\":[{\\\"details\\\":\\\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\"}],\\\"ErrOnlySelfCall(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a function can only be called by the contract itself.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that can only be called by the contract itself.\\\"}}],\\\"ErrProposalNotApproved()\\\":[{\\\"details\\\":\\\"Error of proposal is not approved for executing.\\\"}],\\\"ErrQueryForEmptyVote()\\\":[{\\\"details\\\":\\\"Error thrown when querying for an empty vote.\\\"}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnsupportedInterface(bytes4,address)\\\":[{\\\"details\\\":\\\"The error indicating an unsupported interface.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address where the unsupported interface was encountered.\\\",\\\"interfaceId\\\":\\\"The bytes4 interface identifier that is not supported.\\\"}}],\\\"ErrUnsupportedVoteType(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote type is not supported.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\"}}],\\\"ErrVoteIsFinalized()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to interact with a finalized vote.\\\"}],\\\"ErrZeroAddress(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that given address is null when it should not.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"BridgeOperatorAddingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to add.\\\"},\\\"BridgeOperatorRemovingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to remove.\\\"},\\\"BridgeOperatorUpdated(address,address,address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is updated.\\\"},\\\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Emitted when new bridge operators are added.\\\"},\\\"BridgeOperatorsRemoved(bool[],address[])\\\":{\\\"details\\\":\\\"Emitted when bridge operators are removed.\\\"},\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"MinRequiredGovernorUpdated(uint256)\\\":{\\\"details\\\":\\\"Emitted when the minimum number of required governors is updated.\\\"},\\\"Notified(bytes,address[],bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the contract notifies multiple registers with statuses and return data.\\\"},\\\"ProposalApproved(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the proposal is approved\\\"},\\\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"ProposalExecuted(bytes32,bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the proposal is executed\\\"},\\\"ProposalExpired(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is expired\\\"},\\\"ProposalExpiryDurationChanged(uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal expiry duration is changed.\\\"},\\\"ProposalRejected(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is reject\\\"},\\\"ProposalVoted(bytes32,address,uint8,uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal is voted\\\"},\\\"TargetOptionUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when the target options are updated\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addBridgeOperators(uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Adds multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to add.\\\",\\\"governors\\\":\\\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\"}},\\\"castGlobalProposalBySignatures((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_castGlobalProposalBySignatures`.\\\"},\\\"castProposalBySignatures((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_castProposalBySignatures`.\\\"},\\\"castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8)\\\":{\\\"details\\\":\\\"Casts vote for a proposal on the current network. Requirements: - The method caller is governor.\\\"},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"deleteExpired(uint256,uint256)\\\":{\\\"details\\\":\\\"Deletes the expired proposal by its chainId and nonce, without creating a new proposal. Requirements: - The proposal is already created.\\\"},\\\"execute((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]))\\\":{\\\"details\\\":\\\"See {CoreGovernance-_executeWithCaller}.\\\"},\\\"executeGlobal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]))\\\":{\\\"details\\\":\\\"See {GlobalCoreGovernance-_executeWithCaller}.\\\"},\\\"getBridgeOperatorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific bridge operator.\\\",\\\"params\\\":{\\\"bridgeOperator\\\":\\\"The address of the bridge operator to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"The vote weight of the specified bridge operator.\\\"}},\\\"getBridgeOperators()\\\":{\\\"details\\\":\\\"Returns an array of all bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all bridge operators.\\\"}},\\\"getCallbackRegisters()\\\":{\\\"details\\\":\\\"Retrieves the addresses of registered callbacks.\\\",\\\"returns\\\":{\\\"registers\\\":\\\"An array containing the addresses of registered callbacks.\\\"}},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getFullBridgeOperatorInfos()\\\":{\\\"details\\\":\\\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\",\\\"returns\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the registered bridge operators.\\\",\\\"governors\\\":\\\"An array of addresses representing the governors of each bridge operator.\\\",\\\"weights\\\":\\\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\\\"}},\\\"getGlobalProposalSignatures(uint256)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_getProposalSignatures}\\\"},\\\"getGovernorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `governor` of a `operator`.\\\"},\\\"getGovernorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific governor.\\\",\\\"params\\\":{\\\"governor\\\":\\\"The address of the governor to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"voteWeight The vote weight of the specified governor.\\\"}},\\\"getGovernorWeights(address[])\\\":{\\\"details\\\":\\\"Returns the weights of a list of governor addresses.\\\"},\\\"getGovernors()\\\":{\\\"details\\\":\\\"Returns an array of all governors.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all governors.\\\"}},\\\"getOperatorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `operator` of a `governor`.\\\"},\\\"getProposalExpiryDuration()\\\":{\\\"details\\\":\\\"Returns the expiry duration for a new proposal.\\\"},\\\"getProposalSignatures(uint256,uint256)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_getProposalSignatures}\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"getTotalWeight()\\\":{\\\"details\\\":\\\"Returns total weights.\\\"},\\\"globalProposalVoted(uint256,address)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_proposalVoted}\\\"},\\\"isBridgeOperator(address)\\\":{\\\"details\\\":\\\"Checks if the given address is a bridge operator.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address to check.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"A boolean indicating whether the address is a bridge operator.\\\"}},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"proposalVoted(uint256,uint256,address)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_proposalVoted}\\\"},\\\"propose(uint256,uint256,address,address[],uint256[],bytes[],uint256[])\\\":{\\\"details\\\":\\\"See `CoreGovernance-_proposeProposal`. Requirements: - The method caller is governor.\\\"},\\\"proposeGlobal(uint256,address,uint8[],uint256[],bytes[],uint256[])\\\":{\\\"details\\\":\\\"See `CoreGovernance-_proposeGlobal`. Requirements: - The method caller is governor.\\\"},\\\"proposeGlobalProposalStructAndCastVotes((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. Requirements: - The method caller is governor.\\\"},\\\"proposeProposalForCurrentNetwork(uint256,address,address[],uint256[],bytes[],uint256[],uint8)\\\":{\\\"details\\\":\\\"Proposes and casts vote for a proposal on the current network. Requirements: - The method caller is governor. - The proposal is for the current network.\\\"},\\\"proposeProposalStructAndCastVotes((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_proposeProposalStructAndCastVotes`. Requirements: - The method caller is governor. - The proposal is for the current network.\\\"},\\\"registerCallbacks(address[])\\\":{\\\"details\\\":\\\"Registers multiple callbacks with the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to register.\\\"}},\\\"removeBridgeOperators(address[])\\\":{\\\"details\\\":\\\"Removes multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to remove.\\\"}},\\\"resolveTargets(uint8[])\\\":{\\\"details\\\":\\\"Returns corresponding address of target options. Return address(0) on non-existent target.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setMinRequiredGovernor(uint256)\\\":{\\\"details\\\":\\\"Self-call to update the minimum required governor.\\\",\\\"params\\\":{\\\"min\\\":\\\"The minimum number, this must not less than 3.\\\"}},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\\\"},\\\"sumGovernorsWeight(address[])\\\":{\\\"details\\\":\\\"Returns total weights of the governor list.\\\"},\\\"totalBridgeOperator()\\\":{\\\"details\\\":\\\"Returns the total number of bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"The total number of bridge operators.\\\"}},\\\"unregisterCallbacks(address[])\\\":{\\\"details\\\":\\\"Unregisters multiple callbacks from the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to unregister.\\\"}},\\\"updateManyTargetOption(uint8[],address[])\\\":{\\\"details\\\":\\\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"errors\\\":{\\\"ErrBelowMinRequiredGovernors()\\\":[{\\\"notice\\\":\\\"Error indicating that the governors list will go below minimum number of required governor.\\\"}],\\\"ErrGovernorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying governor\\\"}],\\\"ErrGovernorNotMatch(address,address)\\\":[{\\\"notice\\\":\\\"Error indicating that the msg.sender is not match the required governor\\\"}],\\\"ErrInvalidInput()\\\":[{\\\"notice\\\":\\\"Common invalid input error\\\"}],\\\"ErrOperatorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying operator\\\"}]},\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"round(uint256)\\\":{\\\"notice\\\":\\\"chain id = 0 for global proposal\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/ronin/gateway/RoninBridgeManager.sol\\\":\\\"RoninBridgeManager\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":1},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\\\\\"./BridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IHasContracts, HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\n\\\\nimport { IBridgeManager } from \\\\\\\"../../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\nimport { AddressArrayUtils } from \\\\\\\"../../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"../../utils/RoleAccess.sol\\\\\\\";\\\\nimport { TUint256Slot } from \\\\\\\"../../types/Types.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"./BridgeManagerQuorum.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n struct BridgeManagerStorage {\\\\n /// @notice List of the governors.\\\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\\\n address[] _governors;\\\\n address[] _operators;\\\\n /// @dev Mapping from address to the governor weight\\\\n mapping(address governor => uint96 weight) _governorWeight;\\\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\\\n mapping(address operator => uint96 weight) _operatorWeight;\\\\n /// @dev Total weight of all governors / operators.\\\\n uint256 _totalWeight;\\\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\\\n uint256 _minRequiredGovernor;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerStorageLocation\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n bytes32 public DOMAIN_SEPARATOR;\\\\n\\\\n modifier onlyGovernor() virtual {\\\\n _requireGovernor(msg.sender);\\\\n _;\\\\n }\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n function __BridgeManager_init(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n __BridgeManagerQuorum_init_unchained(num, denom);\\\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n function __BridgeManager_init_unchained(\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n _setContract(ContractType.BRIDGE, bridgeContract);\\\\n\\\\n DOMAIN_SEPARATOR = keccak256(\\\\n abi.encode(\\\\n keccak256(\\\\\\\"EIP712Domain(string name,string version,bytes32 salt)\\\\\\\"),\\\\n keccak256(\\\\\\\"BridgeManager\\\\\\\"), // name hash\\\\n keccak256(\\\\\\\"3\\\\\\\"), // version hash\\\\n keccak256(abi.encode(\\\\\\\"BRIDGE_MANAGER\\\\\\\", roninChainId)) // salt\\\\n )\\\\n );\\\\n\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n _setMinRequiredGovernor(3);\\\\n }\\\\n\\\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerStorageLocation\\\\n }\\\\n }\\\\n\\\\n // ===================== CONFIG ========================\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\\\n _setMinRequiredGovernor(min);\\\\n }\\\\n\\\\n function _setMinRequiredGovernor(uint min) internal {\\\\n if (min < 3) revert ErrInvalidInput();\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n $._minRequiredGovernor = min;\\\\n emit MinRequiredGovernorUpdated(min);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the caller has governor role access.\\\\n */\\\\n function _requireGovernor(address addr) internal view {\\\\n if (_getGovernorWeight(addr) == 0) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\\\n }\\\\n }\\\\n\\\\n // ===================== WEIGHTS METHOD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getTotalWeight() public view returns (uint256) {\\\\n return _totalWeight();\\\\n }\\\\n\\\\n function _totalWeight() internal view override returns (uint256) {\\\\n return _getBridgeManagerStorage()._totalWeight;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weights of a given array of governors.\\\\n */\\\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n weights = new uint96[](governors.length);\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n weights[i] = $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\\\n weight = _getGovernorWeight(governor);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\\\n */\\\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\\\n return _getBridgeManagerStorage()._governorWeight[governor];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\\\n sum = _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\\\n * @param governors The non-duplicated input.\\\\n */\\\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n sum += $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n return $._operatorWeight[bridgeOperator];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n (uint256 numerator, uint256 denominator) = getThreshold();\\\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\\\n }\\\\n\\\\n // ===================== MANAGER CRUD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _removeBridgeOperators(bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to add bridge operators.\\\\n *\\\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to add bridge operators.\\\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\\\n *\\\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\\\n */\\\\n function _addBridgeOperators(\\\\n uint96[] memory voteWeights,\\\\n address[] memory newGovernors,\\\\n address[] memory newOperators\\\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = newOperators.length;\\\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\\\n addeds = new bool[](length);\\\\n\\\\n // simply skip add operations if inputs are empty.\\\\n if (length == 0) return addeds;\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint96 iVoteWeight;\\\\n uint256 accumulatedWeight;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iGovernor = newGovernors[i];\\\\n iOperator = newOperators[i];\\\\n iVoteWeight = voteWeights[i];\\\\n\\\\n // Check non-zero inputs\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n\\\\n // Check not yet added operators\\\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\\\n\\\\n // Only add the valid operator\\\\n if (addeds[i]) {\\\\n // Add governor to list, update governor weight\\\\n $._governors.push(iGovernor);\\\\n $._governorWeight[iGovernor] = iVoteWeight;\\\\n\\\\n // Add operator to list, update governor weight\\\\n $._operators.push(iOperator);\\\\n $._operatorWeight[iOperator] = iVoteWeight;\\\\n\\\\n accumulatedWeight += iVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight += accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\\\n\\\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to remove bridge operators.\\\\n *\\\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to remove bridge operators.\\\\n *\\\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\\\n */\\\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = removingOperators.length;\\\\n removeds = new bool[](length);\\\\n\\\\n // simply skip remove operations if inputs are empty.\\\\n if (length == 0) return removeds;\\\\n if ($._governors.length - length < $._minRequiredGovernor) {\\\\n revert ErrBelowMinRequiredGovernors();\\\\n }\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint256 accumulatedWeight;\\\\n uint idx;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iOperator = removingOperators[i];\\\\n\\\\n // Check non-zero inputs\\\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n\\\\n // Check existing operators\\\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\\\n\\\\n // Only remove the valid operator\\\\n if (removeds[i]) {\\\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\\\n\\\\n // Remove governor from list, update governor weight\\\\n uint lastIdx = $._governors.length - 1;\\\\n $._governors[idx] = $._governors[lastIdx];\\\\n $._governors.pop();\\\\n delete $._governorWeight[iGovernor];\\\\n\\\\n // Remove operator from list, update operator weight\\\\n $._operators[idx] = $._operators[lastIdx];\\\\n $._operators.pop();\\\\n delete $._operatorWeight[iOperator];\\\\n\\\\n accumulatedWeight += removingVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight -= accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\\\n\\\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\\\n }\\\\n\\\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\\\n for (uint i; i < $_array.length; i++) {\\\\n if (addr == $_array[i]) {\\\\n return (true, i);\\\\n }\\\\n }\\\\n\\\\n return (false, type(uint256).max);\\\\n }\\\\n\\\\n // ================= MANAGER VIEW METHODS =============\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256) {\\\\n return _getBridgeManagerStorage()._operators.length;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n return $._operatorWeight[addr] > 0;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._operators;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernors() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._governors;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator) {\\\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\\\n if (!found) revert ErrGovernorNotFound(governor);\\\\n\\\\n return _getBridgeManagerStorage()._operators[idx];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor) {\\\\n (governor,) = _getGovernorOf(operator);\\\\n }\\\\n\\\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\\\n if (!found) revert ErrOperatorNotFound(operator);\\\\n\\\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n governors = $._governors;\\\\n bridgeOperators = $._operators;\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { EnumerableSet } from \\\\\\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\\\\\";\\\\nimport { IBridgeManagerCallbackRegister } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title BridgeManagerCallbackRegister\\\\n * @dev A contract that manages callback registrations and execution for a bridge.\\\\n */\\\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n /**\\\\n * @dev Storage slot for the address set of callback registers.\\\\n * @dev Value is equal to keccak256(\\\\\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\\\\\") - 1.\\\\n */\\\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\\\n\\\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\\\n _registerCallbacks(callbackRegisters);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\\\n _registerCallbacks(registers);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n _callbackRegisters.remove(registers[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\\\n registers = _getCallbackRegisters().values();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to register multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n address register;\\\\n bool regSuccess;\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n register = registers[i];\\\\n\\\\n _requireHasCode(register);\\\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\\\n\\\\n regSuccess = _callbackRegisters.add(register);\\\\n\\\\n emit CallbackRegistered(register, regSuccess);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\\\n */\\\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\\\n * @param callbackFnSig The function signature of the callback method.\\\\n * @param inputs The data to pass to the callback method.\\\\n * @return allSuccess Return true if all internal calls are success\\\\n */\\\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\\\n allSuccess = true;\\\\n\\\\n address[] memory registers = _getCallbackRegisters().values();\\\\n uint256 length = registers.length;\\\\n if (length == 0) return allSuccess;\\\\n\\\\n bool[] memory successes = new bool[](length);\\\\n bytes[] memory returnDatas = new bytes[](length);\\\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n // First, attempt to call normally\\\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\\\n\\\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\\\n if (!successes[i]) {\\\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\\\n allSuccess = allSuccess && successes[i];\\\\n }\\\\n }\\\\n\\\\n emit Notified(callData, registers, successes, returnDatas);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the address set of callback registers.\\\\n * @return callbackRegisters The storage reference to the callback registers.\\\\n */\\\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IQuorum } from \\\\\\\"../../interfaces/IQuorum.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\\\n struct BridgeManagerQuorumStorage {\\\\n uint256 _nonce;\\\\n uint256 _numerator;\\\\n uint256 _denominator;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerQuorumStorage\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\\\n\\\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n $._nonce = 1;\\\\n\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerQuorumStorage\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n return ($._numerator, $._denominator);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\\\n\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n uint256 prevNum = $._numerator;\\\\n uint256 prevDenom = $._denominator;\\\\n\\\\n $._numerator = num;\\\\n $._denominator = denom;\\\\n\\\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n\\\\n function _totalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/CoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Ballot.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\n\\\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to interact with a finalized vote.\\\\n */\\\\n error ErrVoteIsFinalized();\\\\n\\\\n /**\\\\n * @dev Error thrown when the current proposal is not completed.\\\\n */\\\\n error ErrCurrentProposalIsNotCompleted();\\\\n\\\\n struct ProposalVote {\\\\n VoteStatus status;\\\\n bytes32 hash;\\\\n uint256 againstVoteWeight; // Total weight of against votes\\\\n uint256 forVoteWeight; // Total weight of for votes\\\\n address[] forVoteds; // Array of addresses voting for\\\\n address[] againstVoteds; // Array of addresses voting against\\\\n uint256 expiryTimestamp;\\\\n mapping(address => Signature) sig;\\\\n mapping(address => bool) voted;\\\\n }\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\\\n /// @dev Emitted when the proposal is voted\\\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\\\n /// @dev Emitted when the proposal is approved\\\\n event ProposalApproved(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is reject\\\\n event ProposalRejected(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is expired\\\\n event ProposalExpired(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the proposal is executed\\\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\\\n /// @dev Emitted when the proposal expiry duration is changed.\\\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\\\n\\\\n /// @dev Mapping from chain id => vote round\\\\n /// @notice chain id = 0 for global proposal\\\\n mapping(uint256 => uint256) public round;\\\\n /// @dev Mapping from chain id => vote round => proposal vote\\\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\\\n\\\\n uint256 internal _proposalExpiryDuration;\\\\n\\\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\\\n __CoreGovernance_init_unchained(expiryDuration);\\\\n }\\\\n\\\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\\\n _setProposalExpiryDuration(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\\\n * if it is expired and not increase the `_round`.\\\\n */\\\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\\\n _round = round[_chainId];\\\\n // Skip checking for the first ever round\\\\n if (_round == 0) {\\\\n _round = round[_chainId] = 1;\\\\n } else {\\\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\\\n if (!_isExpired) {\\\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\\\n unchecked {\\\\n _round = ++round[_chainId];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\\\n */\\\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\\\n _vote.hash = _proposalHash;\\\\n _vote.expiryTimestamp = _expiryTimestamp;\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The chain id is not equal to 0.\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `ProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\\\n uint256 chainId = proposal.chainId;\\\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n round_ = _createVotingRound(chainId);\\\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the round.\\\\n * - The vote is not finalized.\\\\n * - The voter has not voted for the round.\\\\n *\\\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\\\n * proposal is approved, executed or rejected.\\\\n *\\\\n */\\\\n function _castVote(\\\\n Proposal.ProposalDetail memory proposal,\\\\n Ballot.VoteType support,\\\\n uint256 minimumForVoteWeight,\\\\n uint256 minimumAgainstVoteWeight,\\\\n address voter,\\\\n Signature memory signature,\\\\n uint256 voterWeight\\\\n ) internal virtual returns (bool done) {\\\\n uint256 chainId = proposal.chainId;\\\\n uint256 round_ = proposal.nonce;\\\\n ProposalVote storage _vote = vote[chainId][round_];\\\\n\\\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\\\n return true;\\\\n }\\\\n\\\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\\\n\\\\n _vote.voted[voter] = true;\\\\n // Stores the signature if it is not empty\\\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\\\n _vote.sig[voter] = signature;\\\\n }\\\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\\\n\\\\n uint256 _forVoteWeight;\\\\n uint256 _againstVoteWeight;\\\\n if (support == Ballot.VoteType.For) {\\\\n _vote.forVoteds.push(voter);\\\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\\\n } else if (support == Ballot.VoteType.Against) {\\\\n _vote.againstVoteds.push(voter);\\\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_forVoteWeight >= minimumForVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n if (proposal.isAutoExecute()) {\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev The specified executor executes the proposal on an approved proposal.\\\\n */\\\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\\\n bytes32 proposalHash = proposal.hash();\\\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\\\n\\\\n if (_vote.hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\\\n }\\\\n\\\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\\\n\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n\\\\n /**\\\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\\\n *\\\\n * Emits the event `ProposalExpired` if the vote is expired.\\\\n *\\\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\\\n * before or it will emit an unexpected event of `ProposalExpired`.\\\\n */\\\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\\\n\\\\n if (isExpired) {\\\\n emit ProposalExpired(proposalVote.hash);\\\\n\\\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n delete proposalVote.status;\\\\n delete proposalVote.hash;\\\\n delete proposalVote.againstVoteWeight;\\\\n delete proposalVote.forVoteWeight;\\\\n delete proposalVote.forVoteds;\\\\n delete proposalVote.againstVoteds;\\\\n delete proposalVote.expiryTimestamp;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\\\n */\\\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\\\n if (proposal.executable()) {\\\\n vote_.status = VoteStatus.Executed;\\\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the expiry duration for a new proposal.\\\\n */\\\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\\\n _proposalExpiryDuration = expiryDuration;\\\\n emit ProposalExpiryDurationChanged(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter casted for the proposal.\\\\n */\\\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\\\n return vote_.voted[voter];\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns total weight from validators.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns minimum vote to pass a proposal.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\\\n */\\\\n function _getChainType() internal view virtual returns (ChainType);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"./CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event GlobalProposalCreated(\\\\n uint256 indexed round,\\\\n bytes32 indexed proposalHash,\\\\n Proposal.ProposalDetail proposal,\\\\n bytes32 globalProposalHash,\\\\n GlobalProposal.GlobalProposalDetail globalProposal,\\\\n address creator\\\\n );\\\\n\\\\n /// @dev Emitted when the target options are updated\\\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\\\n\\\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\\\n }\\\\n\\\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\\\n _updateManyTargetOption(targetOptions, addrs);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes for a global proposal.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n address executor,\\\\n uint256[] memory values,\\\\n bytes[] memory calldatas,\\\\n uint256[] memory gasAmounts,\\\\n address creator\\\\n ) internal virtual {\\\\n uint256 round_ = _createVotingRound(0);\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes global proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobalStruct(\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\\\n address creator\\\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n uint256 round_ = _createVotingRound(0);\\\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\\\n\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\\\n */\\\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal helper of {resolveTargets}.\\\\n *\\\\n * @param strict When the param is set to `true`, revert on non-existent target.\\\\n */\\\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\\\n targets = new address[](targetOptions.length);\\\\n\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n *\\\\n * Requirement:\\\\n * - Only allow self-call through proposal.\\\\n *\\\\n */\\\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\\\n // HACK: Cannot reuse the existing library due to too deep stack\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n _updateManyTargetOption(targetOptions, targets);\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n */\\\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\\\n _updateTargetOption(targetOptions[i], targets[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates `targetOption` to `target`.\\\\n *\\\\n * Requirement:\\\\n * - Emit a `TargetOptionUpdated` event.\\\\n */\\\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\\\n _targetOptionsMap[targetOption] = target;\\\\n emit TargetOptionUpdated(targetOption, target);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract CommonGovernanceProposal is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Casts votes by signatures.\\\\n *\\\\n * Note: This method does not verify the proposal hash with the vote hash. Please consider checking it before.\\\\n *\\\\n */\\\\n function _castVotesBySignatures(\\\\n Proposal.ProposalDetail memory _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n bytes32 proposalHash\\\\n ) internal {\\\\n if (!(_supports.length != 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\\\n\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n\\\\n address _lastSigner;\\\\n\\\\n for (uint256 _i; _i < _signatures.length;) {\\\\n Signature calldata _sig;\\\\n address _signer;\\\\n _sig = _signatures[_i];\\\\n\\\\n if (_supports[_i] == Ballot.VoteType.For) {\\\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\\\n } else if (_supports[_i] == Ballot.VoteType.Against) {\\\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\\\n _lastSigner = _signer;\\\\n\\\\n uint256 _weight = _getWeight(_signer);\\\\n\\\\n if (_weight == 0) revert ErrInvalidSignatures(msg.sig);\\\\n\\\\n if (_castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)) {\\\\n return;\\\\n }\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the voted signatures for the proposals.\\\\n *\\\\n * Note: The signatures can be empty in case the proposal is voted on the current network.\\\\n *\\\\n */\\\\n function _getProposalSignatures(\\\\n uint256 _chainId,\\\\n uint256 _round\\\\n ) internal view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\\\n ProposalVote storage _vote = vote[_chainId][_round];\\\\n\\\\n uint256 _forLength = _vote.forVoteds.length;\\\\n uint256 _againstLength = _vote.againstVoteds.length;\\\\n uint256 _voterLength = _forLength + _againstLength;\\\\n\\\\n _supports = new Ballot.VoteType[](_voterLength);\\\\n _signatures = new Signature[](_voterLength);\\\\n _voters = new address[](_voterLength);\\\\n for (uint256 _i; _i < _forLength;) {\\\\n _supports[_i] = Ballot.VoteType.For;\\\\n _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]];\\\\n _voters[_i] = _vote.forVoteds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < _againstLength;) {\\\\n _supports[_i + _forLength] = Ballot.VoteType.Against;\\\\n _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]];\\\\n _voters[_i + _forLength] = _vote.againstVoteds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\\\n */\\\\n function _proposalVoted(uint256 _chainId, uint256 _round, address _voter) internal view returns (bool) {\\\\n return _voted(vote[_chainId][_round], _voter);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the weight of a governor.\\\\n */\\\\n function _getWeight(address _governor) internal view virtual returns (uint256);\\\\n\\\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa7fbe65047096bcf4269cfe42e4529eb9a8bbbf93aff9207edd46b04e9661949\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../GlobalCoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceProposal.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Proposes and casts votes for a global proposal by signatures.\\\\n */\\\\n function _proposeGlobalProposalStructAndCastVotes(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures,\\\\n address creator\\\\n ) internal returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = _proposeGlobalStruct(globalProposal, creator);\\\\n _castVotesBySignatures(proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts votes for a global proposal by signatures.\\\\n */\\\\n function _castGlobalProposalBySignatures(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) internal {\\\\n Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n\\\\n bytes32 proposalHash = _proposal.hash();\\\\n if (vote[0][_proposal.nonce].hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, vote[0][_proposal.nonce].hash);\\\\n }\\\\n\\\\n _castVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\\\n */\\\\n function getGlobalProposalSignatures(uint256 round_)\\\\n external\\\\n view\\\\n returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures)\\\\n {\\\\n return _getProposalSignatures(0, round_);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\\\n */\\\\n function globalProposalVoted(uint256 round_, address voter) external view returns (bool) {\\\\n return _proposalVoted(0, round_, voter);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3905efdfd61681db17bcc392cf93d6571e94bf752f813eacd2504662241231c8\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceProposal.sol\\\\\\\";\\\\n\\\\nabstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Proposes a proposal struct and casts votes by signature.\\\\n */\\\\n function _proposeProposalStructAndCastVotes(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n address _creator\\\\n ) internal {\\\\n _proposeProposalStruct(_proposal, _creator);\\\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes a proposal struct and casts votes by signature.\\\\n */\\\\n function _castProposalBySignatures(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures\\\\n ) internal {\\\\n bytes32 _proposalHash = _proposal.hash();\\\\n\\\\n if (vote[_proposal.chainId][_proposal.nonce].hash != _proposalHash) {\\\\n revert ErrInvalidProposal(_proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\\\n }\\\\n\\\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev See `castProposalVoteForCurrentNetwork`.\\\\n */\\\\n function _castProposalVoteForCurrentNetwork(address _voter, Proposal.ProposalDetail memory _proposal, Ballot.VoteType _support) internal {\\\\n if (_proposal.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid);\\\\n\\\\n bytes32 proposalHash = _proposal.hash();\\\\n if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\\\n }\\\\n\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n Signature memory _emptySignature;\\\\n _castVote(_proposal, _support, _minimumForVoteWeight, _minimumAgainstVoteWeight, _voter, _emptySignature, _getWeight(_voter));\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\\\n */\\\\n function getProposalSignatures(\\\\n uint256 _chainId,\\\\n uint256 _round\\\\n ) external view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\\\n return _getProposalSignatures(_chainId, _round);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\\\n */\\\\n function proposalVoted(uint256 _chainId, uint256 _round, address _voter) external view returns (bool) {\\\\n return _proposalVoted(_chainId, _round, _voter);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x820788183e3300ede4a19be84a3d7c991ac579017f78a098b26d1bbebc411ec4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallback.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManagerCallback\\\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\\\n */\\\\ninterface IBridgeManagerCallback is IERC165 {\\\\n /**\\\\n * @dev Handles the event when bridge operators are added.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\\\n\\\\n /**\\\\n * @dev Handles the event when bridge operators are removed.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerCallbackRegister {\\\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\\\n\\\\n event CallbackRegistered(address, bool);\\\\n /**\\\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\\\n */\\\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\\\n\\\\n /**\\\\n * @dev Retrieves the addresses of registered callbacks.\\\\n * @return registers An array containing the addresses of registered callbacks.\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers);\\\\n\\\\n /**\\\\n * @dev Registers multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external;\\\\n\\\\n /**\\\\n * @dev Unregisters multiple callbacks from the bridge.\\\\n * @param registers The array of callback addresses to unregister.\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/ChainTypeConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface ChainTypeConsumer {\\\\n enum ChainType {\\\\n RoninChain,\\\\n Mainchain\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/SignatureConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface SignatureConsumer {\\\\n struct Signature {\\\\n uint8 v;\\\\n bytes32 r;\\\\n bytes32 s;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/VoteStatusConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface VoteStatusConsumer {\\\\n enum VoteStatus {\\\\n Pending,\\\\n Approved,\\\\n Executed,\\\\n Rejected,\\\\n Expired\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/Ballot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\n\\\\nlibrary Ballot {\\\\n using ECDSA for bytes32;\\\\n\\\\n enum VoteType {\\\\n For,\\\\n Against\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Ballot(bytes32 proposalHash,uint8 support)\\\\\\\");\\\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\\\n\\\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, BALLOT_TYPEHASH)\\\\n mstore(add(ptr, 0x20), _proposalHash)\\\\n mstore(add(ptr, 0x40), _support)\\\\n digest := keccak256(ptr, 0x60)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/GlobalProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./Proposal.sol\\\\\\\";\\\\n\\\\nlibrary GlobalProposal {\\\\n /**\\\\n * @dev Error thrown when attempting to interact with an unsupported target.\\\\n */\\\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\\\n\\\\n enum TargetOption {\\\\n BridgeManager, // 0\\\\n GatewayContract, // 1\\\\n BridgeReward, // 2\\\\n BridgeSlash, // 3\\\\n BridgeTracking, // 4\\\\n PauseEnforcer // 5\\\\n\\\\n }\\\\n\\\\n struct GlobalProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n uint256 expiryTimestamp;\\\\n address executor;\\\\n TargetOption[] targetOptions;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = self.values;\\\\n TargetOption[] memory targets = self.targetOptions;\\\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\\\n uint256[] memory gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length;) {\\\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\\\n\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * proposal.nonce,\\\\n * proposal.expiryTimestamp,\\\\n * proposal.executor,\\\\n * targetsHash,\\\\n * valuesHash,\\\\n * calldatasHash,\\\\n * gasAmountsHash\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0x80), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x100)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts into the normal proposal.\\\\n */\\\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\\\n detail_.nonce = self.nonce;\\\\n detail_.chainId = 0;\\\\n detail_.expiryTimestamp = self.expiryTimestamp;\\\\n detail_.executor = self.executor;\\\\n\\\\n detail_.targets = new address[](self.targetOptions.length);\\\\n detail_.values = self.values;\\\\n detail_.calldatas = self.calldatas;\\\\n detail_.gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\\\n detail_.targets[i] = targets[i];\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Proposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nlibrary Proposal {\\\\n /**\\\\n * @dev Error thrown when there is insufficient gas to execute a function.\\\\n */\\\\n error ErrInsufficientGas(bytes32 proposalHash);\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\\\n */\\\\n error ErrInvalidExpiryTimestamp();\\\\n\\\\n /**\\\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\\n */\\\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\\\n\\\\n struct ProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n // Value 0: all chain should run this proposal\\\\n // Other values: only specific chain has to execute\\\\n uint256 chainId;\\\\n uint256 expiryTimestamp;\\\\n // The address that execute the proposal after the proposal passes.\\\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\\\n address executor;\\\\n address[] targets;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\\\n\\\\n /**\\\\n * @dev Validates the proposal.\\\\n */\\\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\\\n if (\\\\n !(\\\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\\\n && proposal.targets.length == proposal.gasAmounts.length\\\\n )\\\\n ) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\\\n revert ErrInvalidExpiryTimestamp();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = proposal.values;\\\\n address[] memory targets = proposal.targets;\\\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length; ++i) {\\\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\\\n }\\\\n\\\\n // return\\\\n // keccak256(\\\\n // abi.encode(\\\\n // TYPE_HASH,\\\\n // proposal.nonce,\\\\n // proposal.chainId,\\\\n // proposal.expiryTimestamp\\\\n // proposal.executor\\\\n // targetsHash,\\\\n // valuesHash,\\\\n // calldatasHash,\\\\n // gasAmountsHash\\\\n // )\\\\n // );\\\\n // /\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0x100), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x120)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\\\n */\\\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\\\n return proposal.executor == address(0);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is executable for the current chain.\\\\n *\\\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\\\n *\\\\n */\\\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal.\\\\n */\\\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\\\n\\\\n successCalls = new bool[](proposal.targets.length);\\\\n returnDatas = new bytes[](proposal.targets.length);\\\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\\\n\\\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\\\n\\\\n if (!successCalls[i]) {\\\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/ronin/gateway/RoninBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from \\\\\\\"../../extensions/bridge-operator-governance/BridgeManager.sol\\\\\\\";\\\\nimport {\\\\n Ballot,\\\\n GlobalProposal,\\\\n Proposal,\\\\n CommonGovernanceProposal,\\\\n GovernanceProposal\\\\n} from \\\\\\\"../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\\\\\";\\\\nimport {\\\\n CoreGovernance,\\\\n GlobalCoreGovernance,\\\\n GlobalGovernanceProposal\\\\n} from \\\\\\\"../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\\\\\";\\\\nimport { VoteStatusConsumer } from \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\ncontract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * CURRENT NETWORK\\\\n */\\\\n\\\\n /**\\\\n * @dev See `CoreGovernance-_proposeProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function propose(\\\\n uint256 chainId,\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n address[] calldata targets,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts\\\\n ) external onlyGovernor {\\\\n _proposeProposalStruct(\\\\n Proposal.ProposalDetail({\\\\n nonce: _createVotingRound(chainId),\\\\n chainId: chainId,\\\\n expiryTimestamp: expiryTimestamp,\\\\n executor: executor,\\\\n targets: targets,\\\\n values: values,\\\\n calldatas: calldatas,\\\\n gasAmounts: gasAmounts\\\\n }),\\\\n msg.sender\\\\n );\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_proposeProposalStructAndCastVotes`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n * - The proposal is for the current network.\\\\n *\\\\n */\\\\n function proposeProposalStructAndCastVotes(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures\\\\n ) external onlyGovernor {\\\\n _proposeProposalStructAndCastVotes(_proposal, _supports, _signatures, msg.sender);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes and casts vote for a proposal on the current network.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n * - The proposal is for the current network.\\\\n *\\\\n */\\\\n function proposeProposalForCurrentNetwork(\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n address[] calldata targets,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts,\\\\n Ballot.VoteType support\\\\n ) external onlyGovernor {\\\\n Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({\\\\n nonce: _createVotingRound(block.chainid),\\\\n chainId: block.chainid,\\\\n expiryTimestamp: expiryTimestamp,\\\\n executor: executor,\\\\n targets: targets,\\\\n values: values,\\\\n calldatas: calldatas,\\\\n gasAmounts: gasAmounts\\\\n });\\\\n _proposeProposalStruct(proposal, msg.sender);\\\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for a proposal on the current network.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function castProposalVoteForCurrentNetwork(Proposal.ProposalDetail calldata proposal, Ballot.VoteType support) external onlyGovernor {\\\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_castProposalBySignatures`.\\\\n */\\\\n function castProposalBySignatures(Proposal.ProposalDetail calldata proposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures) external {\\\\n _castProposalBySignatures(proposal, supports_, signatures);\\\\n }\\\\n\\\\n /**\\\\n * GLOBAL NETWORK\\\\n */\\\\n\\\\n /**\\\\n * @dev See `CoreGovernance-_proposeGlobal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts\\\\n ) external onlyGovernor {\\\\n _proposeGlobal({\\\\n expiryTimestamp: expiryTimestamp,\\\\n executor: executor,\\\\n targetOptions: targetOptions,\\\\n values: values,\\\\n calldatas: calldatas,\\\\n gasAmounts: gasAmounts,\\\\n creator: msg.sender\\\\n });\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function proposeGlobalProposalStructAndCastVotes(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor {\\\\n _proposeGlobalProposalStructAndCastVotes({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender });\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_castGlobalProposalBySignatures`.\\\\n */\\\\n function castGlobalProposalBySignatures(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external {\\\\n _castGlobalProposalBySignatures({ globalProposal: globalProposal, supports_: supports_, signatures: signatures });\\\\n }\\\\n\\\\n /**\\\\n * COMMON METHODS\\\\n */\\\\n\\\\n /**\\\\n * @dev See {CoreGovernance-_executeWithCaller}.\\\\n */\\\\n function execute(Proposal.ProposalDetail calldata proposal) external {\\\\n _executeWithCaller(proposal, msg.sender);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {GlobalCoreGovernance-_executeWithCaller}.\\\\n */\\\\n function executeGlobal(GlobalProposal.GlobalProposalDetail calldata globalProposal) external {\\\\n _executeWithCaller({\\\\n proposal: globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })),\\\\n caller: msg.sender\\\\n });\\\\n }\\\\n\\\\n /**\\\\n * @dev Deletes the expired proposal by its chainId and nonce, without creating a new proposal.\\\\n *\\\\n * Requirements:\\\\n * - The proposal is already created.\\\\n *\\\\n */\\\\n function deleteExpired(uint256 _chainId, uint256 _round) external {\\\\n ProposalVote storage _vote = vote[_chainId][_round];\\\\n if (_vote.hash == 0) revert ErrQueryForEmptyVote();\\\\n\\\\n _tryDeleteExpiredVotingRound(_vote);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the expiry duration for a new proposal.\\\\n */\\\\n function getProposalExpiryDuration() external view returns (uint256) {\\\\n return _proposalExpiryDuration;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the chain type of the contract.\\\\n * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain).\\\\n */\\\\n function _getChainType() internal pure override returns (ChainType) {\\\\n return ChainType.RoninChain;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the total weights of all governors.\\\\n * @return The total weights of all governors combined.\\\\n */\\\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\\\n return getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the minimum vote weight required for governance actions.\\\\n * @return The minimum vote weight required for governance actions.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\\\\n return minimumVoteWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weight of a specific governor.\\\\n * @param _governor The address of the governor to get the vote weight for.\\\\n * @return The vote weight of the specified governor.\\\\n */\\\\n function _getWeight(address _governor) internal view virtual override returns (uint256) {\\\\n return _getGovernorWeight(_governor);\\\\n }\\\\n\\\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\\\n return DOMAIN_SEPARATOR;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x012d5f995b9225da312c6175f03c6f25c6a70168428106bee495108f0ee8ec99\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/Types.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { LibTUint256Slot } from \\\\\\\"./operations/LibTUint256Slot.sol\\\\\\\";\\\\n\\\\ntype TUint256Slot is bytes32;\\\\n\\\\nusing {\\\\n LibTUint256Slot.add,\\\\n LibTUint256Slot.sub,\\\\n LibTUint256Slot.mul,\\\\n LibTUint256Slot.div,\\\\n LibTUint256Slot.load,\\\\n LibTUint256Slot.store,\\\\n LibTUint256Slot.addAssign,\\\\n LibTUint256Slot.subAssign,\\\\n LibTUint256Slot.preDecrement,\\\\n LibTUint256Slot.postDecrement,\\\\n LibTUint256Slot.preIncrement,\\\\n LibTUint256Slot.postIncrement\\\\n} for TUint256Slot global;\\\\n\\\",\\\"keccak256\\\":\\\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/operations/LibTUint256Slot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { TUint256Slot } from \\\\\\\"../Types.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title LibTUint256Slot\\\\n * @dev Library for handling unsigned 256-bit integers.\\\\n */\\\\nlibrary LibTUint256Slot {\\\\n /// @dev value is equal to bytes4(keccak256(\\\\\\\"Panic(uint256)\\\\\\\"))\\\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\\\n /// @dev error code for {Arithmetic over/underflow} error\\\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\\\n /// @dev error code for {Division or modulo by 0} error\\\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\\\n\\\\n /**\\\\n * @dev Loads the value of the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @return val The loaded value.\\\\n */\\\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\\\n assembly {\\\\n val := sload(self)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a value into the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to be stored.\\\\n */\\\\n function store(TUint256Slot self, uint256 other) internal {\\\\n assembly {\\\\n sstore(self, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Multiplies the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to multiply by.\\\\n * @return res The resulting value after multiplication.\\\\n */\\\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n if iszero(iszero(storedVal)) {\\\\n res := mul(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if iszero(eq(other, div(res, storedVal))) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Divides the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to divide by.\\\\n * @return res The resulting value after division.\\\\n */\\\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n // revert if divide by zero\\\\n if iszero(other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, DIVISION_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n res := div(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction.\\\\n */\\\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n\\\\n // Underflow check\\\\n if lt(storedVal, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n\\\\n res := sub(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition.\\\\n */\\\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n res := add(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if lt(res, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after incrementing.\\\\n */\\\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = addAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The original value before incrementing.\\\\n */\\\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res + 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after decrementing.\\\\n */\\\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = subAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value before decrementing.\\\\n */\\\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res - 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition and storage.\\\\n */\\\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = add(self, other));\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction and storage.\\\\n */\\\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = sub(self, other));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "storageLayout": { + "storage": [ + { + "astId": 52029, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 52032, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 67500, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "DOMAIN_SEPARATOR", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 69549, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "round", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 69557, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "vote", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)69487_storage))" + }, + { + "astId": 69559, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "_proposalExpiryDuration", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 70281, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "_targetOptionsMap", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_enum(TargetOption)74353,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32", + "base": "t_address" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(TargetOption)74353": { + "encoding": "inplace", + "label": "enum GlobalProposal.TargetOption", + "numberOfBytes": "1" + }, + "t_enum(VoteStatus)73297": { + "encoding": "inplace", + "label": "enum VoteStatusConsumer.VoteStatus", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(Signature)73288_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SignatureConsumer.Signature)", + "numberOfBytes": "32", + "value": "t_struct(Signature)73288_storage" + }, + "t_mapping(t_enum(TargetOption)74353,t_address)": { + "encoding": "mapping", + "key": "t_enum(TargetOption)74353", + "label": "mapping(enum GlobalProposal.TargetOption => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)69487_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(ProposalVote)69487_storage)" + }, + "t_mapping(t_uint256,t_struct(ProposalVote)69487_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVote)69487_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(ProposalVote)69487_storage": { + "encoding": "inplace", + "label": "struct CoreGovernance.ProposalVote", + "numberOfBytes": "288", + "members": [ + { + "astId": 69463, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(VoteStatus)73297" + }, + { + "astId": 69465, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "hash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 69467, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "againstVoteWeight", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 69469, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "forVoteWeight", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 69472, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "forVoteds", + "offset": 0, + "slot": "4", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 69475, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "againstVoteds", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 69477, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "expiryTimestamp", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 69482, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "sig", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Signature)73288_storage)" + }, + { + "astId": 69486, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "voted", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ] + }, + "t_struct(Signature)73288_storage": { + "encoding": "inplace", + "label": "struct SignatureConsumer.Signature", + "numberOfBytes": "96", + "members": [ + { + "astId": 73283, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "v", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 73285, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "r", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 73287, + "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", + "label": "s", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1722328222, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "round(uint256)": { + "notice": "chain id = 0 for global proposal" + } + }, + "errors": { + "ErrBelowMinRequiredGovernors()": [ + { + "notice": "Error indicating that the governors list will go below minimum number of required governor." + } + ], + "ErrGovernorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying governor" + } + ], + "ErrGovernorNotMatch(address,address)": [ + { + "notice": "Error indicating that the msg.sender is not match the required governor" + } + ], + "ErrInvalidInput()": [ + { + "notice": "Common invalid input error" + } + ], + "ErrOperatorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying operator" + } + ] + } + } +} \ No newline at end of file From 9d3c7483690371d3c226bf23e22c22b9c50d4eba Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 31 Jul 2024 10:04:40 +0700 Subject: [PATCH 261/305] script: finalize script --- ...0240716-deploy-bridge-manager-helper.s.sol | 6 +-- ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 9 +++- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 44 ++++++++++++------- .../verify-script.s.sol | 7 ++- script/Migration.s.sol | 11 ++++- script/PostChecker.sol | 5 +++ .../PostCheck_BridgeManager_Proposal.s.sol | 38 ++++++++-------- ...PostCheck_Gateway_DepositAndWithdraw.s.sol | 28 ++++++------ script/shared/libraries/LibProposal.sol | 9 +++- 9 files changed, 97 insertions(+), 60 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol index 4a456e33..7b40e6ba 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-deploy-bridge-manager-helper.s.sol @@ -97,9 +97,9 @@ abstract contract Migration__20240716_DeployRoninBridgeManagerHelper is Migratio console.log("Finish deploy Ronin Bridge Manager"); - // transfer admin to self - vm.broadcast(proxyAdmin); - TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_newRoninBridgeManager)); + // // transfer admin to self + // vm.broadcast(proxyAdmin); + // TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_newRoninBridgeManager)); return _newRoninBridgeManager; } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index c5fa8979..e2a9e76a 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -42,11 +42,12 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is function setUp() public virtual override { super.setUp(); } - function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { + console.log("=== Starting migration Roninchain".bold().cyan()); _currRoninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); - _newRoninBridgeManager = _deployRoninBridgeManager(); + // _newRoninBridgeManager = _deployRoninBridgeManager(); + _newRoninBridgeManager = IRoninBridgeManager(0x2ae89936FC398AeA23c63dB2404018fE361A8628); _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor (address[] memory currGovernors,,) = _currRoninBridgeManager.getFullBridgeOperatorInfos(); @@ -54,6 +55,10 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is _voters.push(currGovernors[i]); } + vm.startPrank(0x08295771719b138a241F45023B13CC868D72827D); + TransparentUpgradeableProxy(payable(address(_newRoninBridgeManager))).changeAdmin(address(_currRoninBridgeManager)); + vm.stopPrank(); + _upgradeBridgeRoninchain(); config.setAddress(network(), Contract.RoninBridgeManager.key(), address(_newRoninBridgeManager)); diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index edd14f18..e3c62dd0 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -51,6 +51,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ } function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { + console.log("=== Starting migration Mainchain".bold().cyan()); + _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); // _currMainchainBridgeManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); @@ -63,11 +65,10 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ _currMainchainBridgeManager = IMainchainBridgeManager(0xa71456fA88a5f6a4696D0446E690Db4a5913fab0); // _currMainchainBridgeManager = IMainchainBridgeManager(companionManager); // TODO: resolve later } - console.log("Switch back"); + console.log("@@@ Switch to Ronin"); console.log("Current network:", vm.toString(TNetwork.unwrap(_currentNetwork))); console.log("Prev network:", vm.toString(TNetwork.unwrap(prevNetwork))); switchBack(_currentNetwork, prevForkId); - // switchBack(prevNetwork, prevForkId); _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; @@ -75,8 +76,11 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ _upgradeBridgeMainchain(); } + /** + * @dev Deploy Mainchain Bridge Manager and transfer proxy admin to current BM + */ function _deployMainchainBridgeManager() internal returns (address mainchainBM) { - console.log("Switch to companion"); + console.log("@@@ Switch to companion"); (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); ISharedArgument.SharedParameter memory param; @@ -84,14 +88,14 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ { (address[] memory currGovernors, address[] memory currOperators, uint96[] memory currWeights) = _currMainchainBridgeManager.getFullBridgeOperatorInfos(); uint totalCurrGovernors = currGovernors.length; - param.roninBridgeManager.bridgeOperators = new address[](totalCurrGovernors); - param.roninBridgeManager.governors = new address[](totalCurrGovernors); - param.roninBridgeManager.voteWeights = new uint96[](totalCurrGovernors); + param.mainchainBridgeManager.bridgeOperators = new address[](totalCurrGovernors); + param.mainchainBridgeManager.governors = new address[](totalCurrGovernors); + param.mainchainBridgeManager.voteWeights = new uint96[](totalCurrGovernors); for (uint i = 0; i < totalCurrGovernors; i++) { - param.roninBridgeManager.bridgeOperators[i] = currOperators[i]; - param.roninBridgeManager.governors[i] = currGovernors[i]; - param.roninBridgeManager.voteWeights[i] = currWeights[i]; + param.mainchainBridgeManager.bridgeOperators[i] = currOperators[i]; + param.mainchainBridgeManager.governors[i] = currGovernors[i]; + param.mainchainBridgeManager.voteWeights[i] = currWeights[i]; } } @@ -131,12 +135,16 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ address proxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); vm.broadcast(proxyAdmin); - // TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); - TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_newMainchainBridgeManager)); + TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); + // TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_newMainchainBridgeManager)); switchBack(prevNetwork, prevForkId); } + /** + * @dev Create proposal on mainchain + * + */ function _upgradeBridgeMainchain() internal { (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); @@ -158,12 +166,6 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ uint256[] memory gasAmounts = new uint256[](N); targets[0] = mainchainGatewayV3Proxy; - targets[1] = mainchainGatewayV3Proxy; - targets[2] = mainchainGatewayV3Proxy; - targets[3] = mainchainGatewayV3Proxy; - targets[4] = address(_newMainchainBridgeManager); - targets[5] = address(_newMainchainBridgeManager); - // Mapping WBTC calldata { address[] memory mainchainTokens = new address[](1); @@ -192,17 +194,25 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ ); } + targets[1] = mainchainGatewayV3Proxy; calldatas[1] = abi.encodeWithSignature( "upgradeToAndCall(address,bytes)", mainchainGatewayV3Logic, abi.encodeWithSelector(MainchainGatewayV3.initializeV4.selector, wethUnwrapper) ); + + targets[2] = mainchainGatewayV3Proxy; calldatas[2] = abi.encodeWithSignature("functionDelegateCall(bytes)", (abi.encodeWithSignature("setContract(uint8,address)", 11, address(_newMainchainBridgeManager)))); // Do all setting steps before migrating to change admin + targets[3] = mainchainGatewayV3Proxy; calldatas[3] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); + + targets[4] = address(_newMainchainBridgeManager); calldatas[4] = abi.encodeWithSignature( "functionDelegateCall(bytes)", (abi.encodeWithSignature("registerCallbacks(address[])", param.mainchainBridgeManager.callbackRegisters)) ); + + targets[5] = address(_newMainchainBridgeManager); calldatas[5] = abi.encodeWithSignature("changeAdmin(address)", address(_newMainchainBridgeManager)); for (uint i; i < N; ++i) { diff --git a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol index a6368a88..e0d6a0d3 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol @@ -16,21 +16,20 @@ contract Verify_Script_20240716 is Migration__20240716_P2_UpgradeBridgeRoninchai TNetwork currentNetwork = network(); TNetwork companionNetwork = config.getCompanionNetwork(currentNetwork); - console.log("*** Verify proposal Ronin chain".bold().cyan()); + console.log("*** Verify proposal Ronin chain ***".bold().cyan()); Migration__20240716_P2_UpgradeBridgeRoninchain.run(); - console.log("*** Verify proposal Main chain".bold().cyan()); + console.log("*** Verify proposal Main chain ***".bold().cyan()); Migration__20240716_P3_UpgradeBridgeMainchain.run(); // switchBack(prevNetwork, prevForkId); } function _postCheck() internal virtual override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { - console.log("Starting post-check".bold().cyan()); + console.log("*********** Starting post-check ************".bold().cyan()); _helperVoteForCurrentNetwork(_roninProposal); _simulateProposal(_mainchainProposal); Migration._postCheck(); - // super._postCheck(); } } diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 9c0f840e..09541afe 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -31,7 +31,15 @@ contract Migration is BaseMigration, Utils { ISharedArgument internal constant config = ISharedArgument(address(CONFIG)); function _postCheck() internal virtual override { - address postChecker = _deployImmutable(Contract.PostChecker.key()); + address postChecker = _deployImmutable( + Contract.PostChecker.key(), + "PostChecker.sol:PostChecker",//string memory artifactName, + makeAddr("PostCheckerDeployer"), + 0, + EMPTY_ARGS + ); + + // address postChecker = _deployImmutable(Contract.PostChecker.key()); vm.allowCheatcodes(postChecker); vm.makePersistent(postChecker); IPostCheck(postChecker).run(); @@ -246,6 +254,7 @@ contract Migration is BaseMigration, Utils { revert("BridgeMigration(_getProxyAdmin): Unhandled case"); } + // @dev Called by `Migration._upgradeProxy()` function upgradeCallback( address proxy, address logic, diff --git a/script/PostChecker.sol b/script/PostChecker.sol index 44613279..13dbda8d 100644 --- a/script/PostChecker.sol +++ b/script/PostChecker.sol @@ -13,11 +13,16 @@ import { PostCheck_Gateway } from "./post-check/gateway/PostCheck_Gateway.s.sol" import { Migration } from "./Migration.s.sol"; import { ScriptExtended } from "@fdk/extensions/ScriptExtended.s.sol"; import { ProxyInterface } from "@fdk/libraries/LibDeploy.sol"; +import { IRuntimeConfig } from "@fdk/interfaces/configs/IRuntimeConfig.sol"; contract PostChecker is Migration, PostCheck_BridgeManager, PostCheck_Gateway { using LibCompanionNetwork for *; function run() external { + IRuntimeConfig.Option memory opt; + opt = CONFIG.getRuntimeConfig(); + _originForkBlockNumber = opt.forkBlockNumber; + _loadSysContract(); _validate_BridgeManager(); _validate_Gateway(); diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 5dc3659e..00b7bc40 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -14,6 +14,7 @@ import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork import { Ballot, SignatureConsumer, Proposal, GlobalProposal, LibProposal } from "script/shared/libraries/LibProposal.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { IRuntimeConfig } from "@fdk/interfaces/configs/IRuntimeConfig.sol"; abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { using LibArray for *; @@ -103,7 +104,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { bool reverted = vm.revertTo(snapshotId); assertTrue(reverted, "Cannot revert to snapshot id"); - switchBack(prevNetwork, prevForkId); + _switchBackToRoninFork(currentNetwork); } } @@ -112,7 +113,6 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); - IMainchainBridgeManager mainchainManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); uint256 snapshotId = vm.snapshot(); @@ -121,27 +121,23 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { { cheatAddOverWeightedGovernor(address(mainchainManager)); - address[] memory targets = new address[](3); - uint256[] memory values = new uint256[](3); - uint256[] memory gasAmounts = new uint256[](3); - bytes[] memory calldatas = new bytes[](3); - address[] memory logics = new address[](3); + address[] memory targets = new address[](2); + uint256[] memory values = new uint256[](2); + uint256[] memory gasAmounts = new uint256[](2); + bytes[] memory calldatas = new bytes[](2); + address[] memory logics = new address[](2); targets[0] = address(mainchainManager); targets[1] = loadContract(Contract.MainchainGatewayV3.key()); - targets[2] = loadContract(Contract.MainchainPauseEnforcer.key()); logics[0] = _deployLogic(Contract.MainchainBridgeManager.key()); logics[1] = _deployLogic(Contract.MainchainGatewayV3.key()); - logics[2] = _deployLogic(Contract.MainchainPauseEnforcer.key()); calldatas[0] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[0])); calldatas[1] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[1])); - calldatas[2] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[2])); gasAmounts[0] = 1_000_000; gasAmounts[1] = 1_000_000; - gasAmounts[2] = 1_000_000; Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ manager: address(mainchainManager), @@ -166,12 +162,11 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { assertEq(payable(address(mainchainManager)).getProxyImplementation(), logics[0], "MainchainBridgeManager logic is not upgraded"); assertEq(loadContract(Contract.MainchainGatewayV3.key()).getProxyImplementation(), logics[1], "MainchainGatewayV3 logic is not upgraded"); - assertEq(loadContract(Contract.MainchainPauseEnforcer.key()).getProxyImplementation(), logics[2], "MainchainPauseEnforcer logic is not upgraded"); } bool reverted = vm.revertTo(snapshotId); assertTrue(reverted, "Cannot revert to snapshot id"); - switchBack(prevNetwork, prevForkId); + _switchBackToRoninFork(currentNetwork); } function validate_ProposeGlobalProposalAndRelay_addBridgeOperator() @@ -218,7 +213,6 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { (, TNetwork companionNetwork) = currentNetwork.companionNetworkData(); (TNetwork prevNetwork, uint256 prevForkId) = switchTo(companionNetwork); - IMainchainBridgeManager mainchainManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); uint256 snapshotId = vm.snapshot(); @@ -234,7 +228,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { bool reverted = vm.revertTo(snapshotId); assertTrue(reverted, "Cannot revert to snapshot id"); - switchBack(prevNetwork, prevForkId); + _switchBackToRoninFork(currentNetwork); } } @@ -256,14 +250,13 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { } } - function validate_canExcuteUpgradeAllOneProposal() private onlyOnRoninNetworkOrLocal onPostCheck("validate_canExcuteUpgradeAllOneProposal") { + function validate_canExcuteUpgradeAllOneProposal() private onlyOnRoninNetworkOrLocal onPostCheck("validate_canExecuteUpgradeAllOneProposal") { IRoninBridgeManager manager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); - TContract[] memory contractTypes = new TContract[](5); + TContract[] memory contractTypes = new TContract[](4); contractTypes[0] = Contract.BridgeSlash.key(); contractTypes[1] = Contract.BridgeReward.key(); contractTypes[2] = Contract.BridgeTracking.key(); contractTypes[3] = Contract.RoninGatewayV3.key(); - contractTypes[4] = Contract.RoninPauseEnforcer.key(); address[] memory targets = new address[](contractTypes.length); for (uint256 i; i < contractTypes.length; ++i) { @@ -294,4 +287,13 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { manager.executeProposal(proposal); } + + function _switchBackToRoninFork(TNetwork roninNetwork) internal { + IRuntimeConfig.Option memory config; + config = CONFIG.getRuntimeConfig(); + + uint originForkBlockNumber = config.forkBlockNumber; + uint roninForkId = CONFIG.getForkId(roninNetwork, originForkBlockNumber); + CONFIG.switchTo(roninForkId); + } } diff --git a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol index 2d0b3687..4db1fd0a 100644 --- a/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol +++ b/script/post-check/gateway/deposit-withdraw/PostCheck_Gateway_DepositAndWithdraw.s.sol @@ -43,8 +43,8 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu MockERC20 private roninERC20; MockERC20 private mainchainERC20; - address[] private roninTokens; - address[] private mainchainTokens; + address[] private roninTokens = new address[](1); + address[] private mainchainTokens = new address[](1); TokenStandard[] private standards = [TokenStandard.ERC20]; uint256 private roninChainId; @@ -70,7 +70,8 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu uint256[] memory chainIds = new uint256[](1); chainIds[0] = network().companionChainId(); address admin = roninGateway.getProxyAdmin(); - console.log("Admin", admin); + console.log("Admin for ronin gateway", admin); + vm.prank(address(admin)); TransparentUpgradeableProxyV2(payable(address(roninGateway))).functionDelegateCall( abi.encodeCall(RoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)) @@ -106,7 +107,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu function _setUpOnRonin() private { roninERC20 = new MockERC20("RoninERC20", "RERC20"); // roninERC20.initialize("RoninERC20", "RERC20", 18); - roninTokens.push(address(roninERC20)); + roninTokens[0] = address(roninERC20); roninChainId = block.chainid; currentNetwork = network(); @@ -126,8 +127,7 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu cheatAddOverWeightedGovernor(address(mainchainBridgeManager)); mainchainERC20 = new MockERC20("MainchainERC20", "MERC20"); - // mainchainERC20.initialize("MainchainERC20", "MERC20", 18); - mainchainTokens.push(address(mainchainERC20)); + mainchainTokens[0] = address(mainchainERC20); vm.deal(user, 10 ether); deal(address(mainchainERC20), user, 1000 ether); @@ -174,12 +174,12 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu vm.recordLogs(); MainchainGatewayV3(mainchainGateway).requestDepositFor(depositRequest); - VmSafe.Log[] memory logs = vm.getRecordedLogs(); + VmSafe.Log[] memory logs_ = vm.getRecordedLogs(); LibTransfer.Receipt memory receipt; bytes32 receiptHash; - for (uint256 i; i < logs.length; ++i) { - if (logs[i].emitter == address(mainchainGateway) && logs[i].topics[0] == IMainchainGatewayV3.DepositRequested.selector) { - (receiptHash, receipt) = abi.decode(logs[i].data, (bytes32, LibTransfer.Receipt)); + for (uint256 i; i < logs_.length; ++i) { + if (logs_[i].emitter == address(mainchainGateway) && logs_[i].topics[0] == IMainchainGatewayV3.DepositRequested.selector) { + (receiptHash, receipt) = abi.decode(logs_[i].data, (bytes32, LibTransfer.Receipt)); } } @@ -205,12 +205,12 @@ abstract contract PostCheck_Gateway_DepositAndWithdraw is BasePostCheck, Signatu vm.recordLogs(); RoninGatewayV3(payable(address(roninGateway))).requestWithdrawalFor(withdrawRequest, mainchainChainId); - VmSafe.Log[] memory logs = vm.getRecordedLogs(); + VmSafe.Log[] memory logs_ = vm.getRecordedLogs(); LibTransfer.Receipt memory receipt; bytes32 receiptHash; - for (uint256 i; i < logs.length; ++i) { - if (logs[i].emitter == address(roninGateway) && logs[i].topics[0] == IRoninGatewayV3.WithdrawalRequested.selector) { - (receiptHash, receipt) = abi.decode(logs[i].data, (bytes32, LibTransfer.Receipt)); + for (uint256 i; i < logs_.length; ++i) { + if (logs_[i].emitter == address(roninGateway) && logs_[i].topics[0] == IRoninGatewayV3.WithdrawalRequested.selector) { + (receiptHash, receipt) = abi.decode(logs_[i].data, (bytes32, LibTransfer.Receipt)); } } diff --git a/script/shared/libraries/LibProposal.sol b/script/shared/libraries/LibProposal.sol index 8db4199a..0aef2e1b 100644 --- a/script/shared/libraries/LibProposal.sol +++ b/script/shared/libraries/LibProposal.sol @@ -19,6 +19,7 @@ import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { LibCompanionNetwork } from "./LibCompanionNetwork.sol"; import { LibErrorHandler } from "@fdk/libraries/LibErrorHandler.sol"; import { VoteStatusConsumer } from "@ronin/contracts/interfaces/consumers/VoteStatusConsumer.sol"; +import { IRuntimeConfig } from "@fdk/interfaces/configs/IRuntimeConfig.sol"; library LibProposal { using LibArray for *; @@ -218,7 +219,13 @@ library LibProposal { bool reverted = vm.revertTo(snapshotId); require(reverted, string.concat("Cannot revert to snapshot id: ", vm.toString(snapshotId))); - config.switchTo(currentForkId); + + IRuntimeConfig.Option memory opt; + opt = config.getRuntimeConfig(); + + uint originForkBlockNumber = opt.forkBlockNumber; + uint roninForkId = config.getForkId(currentNetwork, originForkBlockNumber); + config.switchTo(roninForkId); } function verifyProposalGasAmount( From 57437233d7f522098226ea7885b2271524399231 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 31 Jul 2024 10:54:39 +0700 Subject: [PATCH 262/305] script: fix ronin BM address in mainchain script --- .../20240716-p3-upgrade-bridge-main-chain.s.sol | 17 +++++++++-------- .../verify-script.s.sol | 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index e3c62dd0..3f4a2569 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -35,6 +35,7 @@ import { Migration } from "../Migration.s.sol"; contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__20240716_GovernorsKey, Migration__MapToken_WBTC_Threshold { using StdStyle for *; + IRoninBridgeManager _oldRoninBridgeManager; IRoninBridgeManager _roninBridgeManager; IMainchainBridgeManager _currMainchainBridgeManager; IMainchainBridgeManager _newMainchainBridgeManager; @@ -44,7 +45,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ LegacyProposalDetail _mainchainProposal; - address private _governor; + address private _proposer; function setUp() public virtual override { super.setUp(); @@ -70,7 +71,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ console.log("Prev network:", vm.toString(TNetwork.unwrap(prevNetwork))); switchBack(_currentNetwork, prevForkId); - _governor = 0xd24D87DDc1917165435b306aAC68D99e0F49A3Fa; + _oldRoninBridgeManager = IRoninBridgeManager(0x5FA49E6CA54a9daa8eCa4F403ADBDE5ee075D84a); + _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor _deployMainchainBridgeManager(); _upgradeBridgeMainchain(); @@ -229,18 +231,17 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ switchBack(prevNetwork, prevForkId); - vm.broadcast(_governor); - address(_roninBridgeManager).call( - abi.encodeWithSignature( - "propose(uint256,uint256,address[],uint256,bytes[],uint256[])", + vm.startBroadcast(_proposer); + address(_oldRoninBridgeManager).call(abi.encodeWithSignature( + "propose(uint256,uint256,address[],uint256[],bytes[],uint256[])", _mainchainProposal.chainId, _mainchainProposal.expiryTimestamp, _mainchainProposal.targets, _mainchainProposal.values, _mainchainProposal.calldatas, _mainchainProposal.gasAmounts - ) - ); + )); + vm.stopBroadcast(); } function _postCheck() internal virtual override { diff --git a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol index e0d6a0d3..eb9426ad 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/verify-script.s.sol @@ -27,7 +27,10 @@ contract Verify_Script_20240716 is Migration__20240716_P2_UpgradeBridgeRoninchai function _postCheck() internal virtual override(Migration__20240716_P2_UpgradeBridgeRoninchain, Migration__20240716_P3_UpgradeBridgeMainchain) { console.log("*********** Starting post-check ************".bold().cyan()); + console.log("****** Finalize proposal Ronin chain ******".bold().cyan()); _helperVoteForCurrentNetwork(_roninProposal); + + console.log("****** Finalize proposal Main chain ******".bold().cyan()); _simulateProposal(_mainchainProposal); Migration._postCheck(); From 6854d000ccf0b6aad79618ffd7de046b2418fc22 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 31 Jul 2024 14:10:15 +0700 Subject: [PATCH 263/305] chore: add WBTC artifact --- deployments/ronin-mainnet/WBTC.json | 330 ++++++++++++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 deployments/ronin-mainnet/WBTC.json diff --git a/deployments/ronin-mainnet/WBTC.json b/deployments/ronin-mainnet/WBTC.json new file mode 100644 index 00000000..e50aa994 --- /dev/null +++ b/deployments/ronin-mainnet/WBTC.json @@ -0,0 +1,330 @@ +{ + "abi": "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"gateway\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pauser\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GATEWAY_ADDRESS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MINTER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PAUSER_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\":\"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\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"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\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"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\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"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\":\"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\":\"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},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false}]", + "absolutePath": "WBTC.sol", + "address": "0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB", + "ast": "", + "blockNumber": 36858178, + "bytecode": "\"0x60a06040523480156200001157600080fd5b5060405162001fe538038062001fe58339810160408190526200003491620004ad565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c91906200058b565b5060066200009b82826200058b565b50506007805460ff1916905550620000b560003362000189565b620000d060008051602062001fc58339815191523362000189565b620000eb60008051602062001fa58339815191523362000189565b50620000fb905060008262000189565b6200011660008051602062001fa58339815191528262000189565b6001600160a01b0382166080526200013e60008051602062001fc58339815191528362000189565b6200014b60003362000199565b6200016660008051602062001fc58339815191523362000199565b6200018160008051602062001fa58339815191523362000199565b5050620006a5565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf908262000252565b505050565b620001d0828262000272565b6000828152600160205260409020620001bf9082620002fa565b620001f6828262000311565b1562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000269836001600160a01b0384166200033a565b90505b92915050565b6200027e828262000311565b62000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002b63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000269836001600160a01b0384166200043e565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008181526001830160205260408120548015620004335760006200036160018362000657565b8554909150600090620003779060019062000657565b9050818114620003e35760008660000182815481106200039b576200039b62000679565b9060005260206000200154905080876000018481548110620003c157620003c162000679565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003f757620003f76200068f565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506200026c565b60009150506200026c565b600081815260018301602052604081205462000487575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200026c565b5060006200026c565b80516001600160a01b0381168114620004a857600080fd5b919050565b60008060408385031215620004c157600080fd5b620004cc8362000490565b9150620004dc6020840162000490565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051057607f821691505b6020821081036200053157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005625750805b601f850160051c820191505b8181101562000583578281556001016200056e565b505050505050565b81516001600160401b03811115620005a757620005a7620004e5565b620005bf81620005b88454620004fb565b8462000537565b602080601f831160018114620005f75760008415620005de5750858301515b600019600386901b1c1916600185901b17855562000583565b600085815260208120601f198616915b82811015620006285788860151825594840194600190910190840162000607565b5085821015620006475787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200026c57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516118dd620006c8600039600081816103840152610f0601526118dd6000f3fe608060405234801561001057600080fd5b506004361061015f5760003560e01c806301ffc9a71461016457806306fdde031461018c578063095ea7b3146101a157806318160ddd146101b457806323b872dd146101c6578063248a9ca3146101d95780632f2ff15d146101ec578063313ce5671461020157806336568abe1461021057806339509351146102235780633f4ba83a1461023657806340c10f191461023e57806342966c68146102515780635c975abb1461026457806370a082311461026f57806379cc6790146102985780638456cb59146102ab5780639010d07c146102b357806391d14854146102d357806395d89b41146102e6578063a217fddf146102ee578063a457c2d7146102f6578063a9059cbb14610309578063ca15c8731461031c578063d53913931461032f578063d547741f14610344578063dd62ed3e14610357578063e63ab1e91461036a578063f56c84e51461037f575b600080fd5b61017761017236600461150f565b6103a6565b60405190151581526020015b60405180910390f35b6101946103d1565b604051610183919061155d565b6101776101af3660046115ac565b610463565b6004545b604051908152602001610183565b6101776101d43660046115d6565b61047b565b6101b86101e7366004611612565b61049f565b6101ff6101fa36600461162b565b6104b4565b005b60405160128152602001610183565b6101ff61021e36600461162b565b6104d5565b6101776102313660046115ac565b610558565b6101ff61057a565b6101ff61024c3660046115ac565b6105f8565b6101ff61025f366004611612565b610673565b60075460ff16610177565b6101b861027d366004611657565b6001600160a01b031660009081526002602052604090205490565b6101ff6102a63660046115ac565b610680565b6101ff610695565b6102c66102c1366004611672565b61070f565b6040516101839190611694565b6101776102e136600461162b565b61072e565b610194610757565b6101b8600081565b6101776103043660046115ac565b610766565b6101776103173660046115ac565b6107e1565b6101b861032a366004611612565b6107ef565b6101b860008051602061186883398151915281565b6101ff61035236600461162b565b610806565b6101b86103653660046116a8565b610822565b6101b860008051602061184883398151915281565b6102c67f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b14806103cb57506103cb8261084d565b92915050565b6060600580546103e0906116d2565b80601f016020809104026020016040519081016040528092919081815260200182805461040c906116d2565b80156104595780601f1061042e57610100808354040283529160200191610459565b820191906000526020600020905b81548152906001019060200180831161043c57829003601f168201915b5050505050905090565b600033610471818585610882565b5060019392505050565b6000336104898582856109a6565b610494858585610a20565b506001949350505050565b60009081526020819052604090206001015490565b6104bd8261049f565b6104c681610be7565b6104d08383610bf1565b505050565b6001600160a01b038116331461054a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105548282610c13565b5050565b60003361047181858561056b8383610822565b6105759190611722565b610882565b6105926000805160206118488339815191523361072e565b6105ee5760405162461bcd60e51b8152602060048201526039602482015260008051602061182883398151915260448201527876652070617573657220726f6c6520746f20756e706175736560381b6064820152608401610541565b6105f6610c35565b565b6106106000805160206118688339815191523361072e565b6106695760405162461bcd60e51b815260206004820152603660248201526000805160206118288339815191526044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b6064820152608401610541565b6105548282610c81565b61067d3382610d5a565b50565b61068b8233836109a6565b6105548282610d5a565b6106ad6000805160206118488339815191523361072e565b6107075760405162461bcd60e51b8152602060048201526037602482015260008051602061182883398151915260448201527676652070617573657220726f6c6520746f20706175736560481b6064820152608401610541565b6105f6610ea2565b60008281526001602052604081206107279083610edf565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600680546103e0906116d2565b600033816107748286610822565b9050838110156107d45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610541565b6104948286868403610882565b600033610471818585610a20565b60008181526001602052604081206103cb90610eeb565b61080f8261049f565b61081881610be7565b6104d08383610c13565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b14806103cb57506301ffc9a760e01b6001600160e01b03198316146103cb565b6001600160a01b0383166108e45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610541565b6001600160a01b0382166109455760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610541565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006109b28484610822565b90506000198114610a1a5781811015610a0d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610541565b610a1a8484848403610882565b50505050565b6001600160a01b038316610a845760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610541565b6001600160a01b038216610ae65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610541565b610af1838383610ef5565b6001600160a01b03831660009081526002602052604090205481811015610b695760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610541565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610ba0908490611722565b92505081905550826001600160a01b0316846001600160a01b031660008051602061188883398151915284604051610bda91815260200190565b60405180910390a3610a1a565b61067d8133610f91565b610bfb8282610ff5565b60008281526001602052604090206104d09082611079565b610c1d828261108e565b60008281526001602052604090206104d090826110f3565b610c3d611108565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051610c779190611694565b60405180910390a1565b6001600160a01b038216610cd75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610541565b610ce360008383610ef5565b8060046000828254610cf59190611722565b90915550506001600160a01b03821660009081526002602052604081208054839290610d22908490611722565b90915550506040518181526001600160a01b038316906000906000805160206118888339815191529060200160405180910390a35050565b6001600160a01b038216610dba5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610541565b610dc682600083610ef5565b6001600160a01b03821660009081526002602052604090205481811015610e3a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610541565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610e69908490611735565b90915550506040518281526000906001600160a01b038516906000805160206118888339815191529060200160405180910390a3505050565b610eaa611151565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c6a3390565b60006107278383611197565b60006103cb825490565b6001600160a01b038216610f8657337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f865760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b6064820152608401610541565b6104d08383836111c1565b610f9b828261072e565b61055457610fb3816001600160a01b031660146111cc565b610fbe8360206111cc565b604051602001610fcf929190611748565b60408051601f198184030181529082905262461bcd60e51b82526105419160040161155d565b610fff828261072e565b610554576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556110353390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610727836001600160a01b038416611367565b611098828261072e565b15610554576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610727836001600160a01b0384166113b6565b60075460ff166105f65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610541565b60075460ff16156105f65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610541565b60008260000182815481106111ae576111ae6117b7565b9060005260206000200154905092915050565b6104d08383836114a9565b606060006111db8360026117cd565b6111e6906002611722565b6001600160401b038111156111fd576111fd6117e4565b6040519080825280601f01601f191660200182016040528015611227576020820181803683370190505b509050600360fc1b81600081518110611242576112426117b7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611271576112716117b7565b60200101906001600160f81b031916908160001a90535060006112958460026117cd565b6112a0906001611722565b90505b6001811115611318576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106112d4576112d46117b7565b1a60f81b8282815181106112ea576112ea6117b7565b60200101906001600160f81b031916908160001a90535060049490941c93611311816117fa565b90506112a3565b5083156107275760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610541565b60008181526001830160205260408120546113ae575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103cb565b5060006103cb565b6000818152600183016020526040812054801561149f5760006113da600183611735565b85549091506000906113ee90600190611735565b905081811461145357600086600001828154811061140e5761140e6117b7565b9060005260206000200154905080876000018481548110611431576114316117b7565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061146457611464611811565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103cb565b60009150506103cb565b60075460ff16156104d05760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b6064820152608401610541565b60006020828403121561152157600080fd5b81356001600160e01b03198116811461072757600080fd5b60005b8381101561155457818101518382015260200161153c565b50506000910152565b602081526000825180602084015261157c816040850160208701611539565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146115a757600080fd5b919050565b600080604083850312156115bf57600080fd5b6115c883611590565b946020939093013593505050565b6000806000606084860312156115eb57600080fd5b6115f484611590565b925061160260208501611590565b9150604084013590509250925092565b60006020828403121561162457600080fd5b5035919050565b6000806040838503121561163e57600080fd5b8235915061164e60208401611590565b90509250929050565b60006020828403121561166957600080fd5b61072782611590565b6000806040838503121561168557600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b600080604083850312156116bb57600080fd5b6116c483611590565b915061164e60208401611590565b600181811c908216806116e657607f821691505b60208210810361170657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103cb576103cb61170c565b818103818111156103cb576103cb61170c565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81526000835161177a816017850160208801611539565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117ab816028840160208801611539565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176103cb576103cb61170c565b634e487b7160e01b600052604160045260246000fd5b6000816118095761180961170c565b506000190190565b634e487b7160e01b600052603160045260246000fdfe45524332305072657365744d696e7465725061757365723a206d75737420686165d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ebf8281f24fe4ea122a9b78ed2027e004bc0f4efe28625b5860ee519b3dea7c564736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6\"", + "callValue": 0, + "chainId": 2020, + "constructorArgs": "0x0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "contractName": "WBTC", + "deployedBytecode": "\"0x608060405234801561001057600080fd5b506004361061015f5760003560e01c806301ffc9a71461016457806306fdde031461018c578063095ea7b3146101a157806318160ddd146101b457806323b872dd146101c6578063248a9ca3146101d95780632f2ff15d146101ec578063313ce5671461020157806336568abe1461021057806339509351146102235780633f4ba83a1461023657806340c10f191461023e57806342966c68146102515780635c975abb1461026457806370a082311461026f57806379cc6790146102985780638456cb59146102ab5780639010d07c146102b357806391d14854146102d357806395d89b41146102e6578063a217fddf146102ee578063a457c2d7146102f6578063a9059cbb14610309578063ca15c8731461031c578063d53913931461032f578063d547741f14610344578063dd62ed3e14610357578063e63ab1e91461036a578063f56c84e51461037f575b600080fd5b61017761017236600461150f565b6103a6565b60405190151581526020015b60405180910390f35b6101946103d1565b604051610183919061155d565b6101776101af3660046115ac565b610463565b6004545b604051908152602001610183565b6101776101d43660046115d6565b61047b565b6101b86101e7366004611612565b61049f565b6101ff6101fa36600461162b565b6104b4565b005b60405160128152602001610183565b6101ff61021e36600461162b565b6104d5565b6101776102313660046115ac565b610558565b6101ff61057a565b6101ff61024c3660046115ac565b6105f8565b6101ff61025f366004611612565b610673565b60075460ff16610177565b6101b861027d366004611657565b6001600160a01b031660009081526002602052604090205490565b6101ff6102a63660046115ac565b610680565b6101ff610695565b6102c66102c1366004611672565b61070f565b6040516101839190611694565b6101776102e136600461162b565b61072e565b610194610757565b6101b8600081565b6101776103043660046115ac565b610766565b6101776103173660046115ac565b6107e1565b6101b861032a366004611612565b6107ef565b6101b860008051602061186883398151915281565b6101ff61035236600461162b565b610806565b6101b86103653660046116a8565b610822565b6101b860008051602061184883398151915281565b6102c67f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b14806103cb57506103cb8261084d565b92915050565b6060600580546103e0906116d2565b80601f016020809104026020016040519081016040528092919081815260200182805461040c906116d2565b80156104595780601f1061042e57610100808354040283529160200191610459565b820191906000526020600020905b81548152906001019060200180831161043c57829003601f168201915b5050505050905090565b600033610471818585610882565b5060019392505050565b6000336104898582856109a6565b610494858585610a20565b506001949350505050565b60009081526020819052604090206001015490565b6104bd8261049f565b6104c681610be7565b6104d08383610bf1565b505050565b6001600160a01b038116331461054a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105548282610c13565b5050565b60003361047181858561056b8383610822565b6105759190611722565b610882565b6105926000805160206118488339815191523361072e565b6105ee5760405162461bcd60e51b8152602060048201526039602482015260008051602061182883398151915260448201527876652070617573657220726f6c6520746f20756e706175736560381b6064820152608401610541565b6105f6610c35565b565b6106106000805160206118688339815191523361072e565b6106695760405162461bcd60e51b815260206004820152603660248201526000805160206118288339815191526044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b6064820152608401610541565b6105548282610c81565b61067d3382610d5a565b50565b61068b8233836109a6565b6105548282610d5a565b6106ad6000805160206118488339815191523361072e565b6107075760405162461bcd60e51b8152602060048201526037602482015260008051602061182883398151915260448201527676652070617573657220726f6c6520746f20706175736560481b6064820152608401610541565b6105f6610ea2565b60008281526001602052604081206107279083610edf565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600680546103e0906116d2565b600033816107748286610822565b9050838110156107d45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610541565b6104948286868403610882565b600033610471818585610a20565b60008181526001602052604081206103cb90610eeb565b61080f8261049f565b61081881610be7565b6104d08383610c13565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b14806103cb57506301ffc9a760e01b6001600160e01b03198316146103cb565b6001600160a01b0383166108e45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610541565b6001600160a01b0382166109455760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610541565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006109b28484610822565b90506000198114610a1a5781811015610a0d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610541565b610a1a8484848403610882565b50505050565b6001600160a01b038316610a845760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610541565b6001600160a01b038216610ae65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610541565b610af1838383610ef5565b6001600160a01b03831660009081526002602052604090205481811015610b695760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610541565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610ba0908490611722565b92505081905550826001600160a01b0316846001600160a01b031660008051602061188883398151915284604051610bda91815260200190565b60405180910390a3610a1a565b61067d8133610f91565b610bfb8282610ff5565b60008281526001602052604090206104d09082611079565b610c1d828261108e565b60008281526001602052604090206104d090826110f3565b610c3d611108565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051610c779190611694565b60405180910390a1565b6001600160a01b038216610cd75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610541565b610ce360008383610ef5565b8060046000828254610cf59190611722565b90915550506001600160a01b03821660009081526002602052604081208054839290610d22908490611722565b90915550506040518181526001600160a01b038316906000906000805160206118888339815191529060200160405180910390a35050565b6001600160a01b038216610dba5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610541565b610dc682600083610ef5565b6001600160a01b03821660009081526002602052604090205481811015610e3a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610541565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610e69908490611735565b90915550506040518281526000906001600160a01b038516906000805160206118888339815191529060200160405180910390a3505050565b610eaa611151565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c6a3390565b60006107278383611197565b60006103cb825490565b6001600160a01b038216610f8657337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f865760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b6064820152608401610541565b6104d08383836111c1565b610f9b828261072e565b61055457610fb3816001600160a01b031660146111cc565b610fbe8360206111cc565b604051602001610fcf929190611748565b60408051601f198184030181529082905262461bcd60e51b82526105419160040161155d565b610fff828261072e565b610554576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556110353390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610727836001600160a01b038416611367565b611098828261072e565b15610554576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610727836001600160a01b0384166113b6565b60075460ff166105f65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610541565b60075460ff16156105f65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610541565b60008260000182815481106111ae576111ae6117b7565b9060005260206000200154905092915050565b6104d08383836114a9565b606060006111db8360026117cd565b6111e6906002611722565b6001600160401b038111156111fd576111fd6117e4565b6040519080825280601f01601f191660200182016040528015611227576020820181803683370190505b509050600360fc1b81600081518110611242576112426117b7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611271576112716117b7565b60200101906001600160f81b031916908160001a90535060006112958460026117cd565b6112a0906001611722565b90505b6001811115611318576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106112d4576112d46117b7565b1a60f81b8282815181106112ea576112ea6117b7565b60200101906001600160f81b031916908160001a90535060049490941c93611311816117fa565b90506112a3565b5083156107275760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610541565b60008181526001830160205260408120546113ae575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103cb565b5060006103cb565b6000818152600183016020526040812054801561149f5760006113da600183611735565b85549091506000906113ee90600190611735565b905081811461145357600086600001828154811061140e5761140e6117b7565b9060005260206000200154905080876000018481548110611431576114316117b7565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061146457611464611811565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103cb565b60009150506103cb565b60075460ff16156104d05760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b6064820152608401610541565b60006020828403121561152157600080fd5b81356001600160e01b03198116811461072757600080fd5b60005b8381101561155457818101518382015260200161153c565b50506000910152565b602081526000825180602084015261157c816040850160208701611539565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146115a757600080fd5b919050565b600080604083850312156115bf57600080fd5b6115c883611590565b946020939093013593505050565b6000806000606084860312156115eb57600080fd5b6115f484611590565b925061160260208501611590565b9150604084013590509250925092565b60006020828403121561162457600080fd5b5035919050565b6000806040838503121561163e57600080fd5b8235915061164e60208401611590565b90509250929050565b60006020828403121561166957600080fd5b61072782611590565b6000806040838503121561168557600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b600080604083850312156116bb57600080fd5b6116c483611590565b915061164e60208401611590565b600181811c908216806116e657607f821691505b60208210810361170657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103cb576103cb61170c565b818103818111156103cb576103cb61170c565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81526000835161177a816017850160208801611539565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117ab816028840160208801611539565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176103cb576103cb61170c565b634e487b7160e01b600052604160045260246000fd5b6000816118095761180961170c565b506000190190565b634e487b7160e01b600052603160045260246000fdfe45524332305072657365744d696e7465725061757365723a206d75737420686165d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ebf8281f24fe4ea122a9b78ed2027e004bc0f4efe28625b5860ee519b3dea7c564736f6c63430008170033\"", + "deployer": "0xA62DddCC58E769bCFd2f9A7A61CDF331f18c2650", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "burn(uint256)": { + "details": "Destroys `amount` tokens from the caller. See {ERC20-_burn}." + }, + "burnFrom(address,uint256)": { + "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "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. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "mint(address,uint256)": { + "details": "Creates `amount` new tokens for `to`. See {ERC20-_mint}. Requirements: - the caller must have the `MINTER_ROLE`." + }, + "name()": { + "details": "Returns the name of the token." + }, + "pause()": { + "details": "Pauses all token transfers. See {ERC20Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "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. May emit a {RoleRevoked} event." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "unpause()": { + "details": "Unpauses all token transfers. See {ERC20Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`." + } + }, + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + } + }, + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"gateway\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"pauser\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Approval\\\",\\\"type\\\":\\\"event\\\"},{\\\"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\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Transfer\\\",\\\"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\\\":\\\"GATEWAY_ADDRESS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"MINTER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"PAUSER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"allowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"approve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"balanceOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burn\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burnFrom\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"decimals\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"subtractedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"decreaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"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\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"addedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"increaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"mint\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"name\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"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\\\":\\\"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\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"supportsInterface\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"symbol\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalSupply\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transferFrom\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"events\\\":{\\\"Approval(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\\\"},\\\"Paused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is triggered by `account`.\\\"},\\\"RoleAdminChanged(bytes32,bytes32,bytes32)\\\":{\\\"details\\\":\\\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\\\"},\\\"RoleGranted(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\\\"},\\\"RoleRevoked(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\\\"},\\\"Transfer(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\\\"},\\\"Unpaused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is lifted by `account`.\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"allowance(address,address)\\\":{\\\"details\\\":\\\"See {IERC20-allowance}.\\\"},\\\"approve(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\\\"},\\\"balanceOf(address)\\\":{\\\"details\\\":\\\"See {IERC20-balanceOf}.\\\"},\\\"burn(uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\\\"},\\\"burnFrom(address,uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\\\"},\\\"decimals()\\\":{\\\"details\\\":\\\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\\\"},\\\"decreaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\\\"},\\\"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. May emit a {RoleGranted} event.\\\"},\\\"hasRole(bytes32,address)\\\":{\\\"details\\\":\\\"Returns `true` if `account` has been granted `role`.\\\"},\\\"increaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\\\"},\\\"mint(address,uint256)\\\":{\\\"details\\\":\\\"Creates `amount` new tokens for `to`. See {ERC20-_mint}. Requirements: - the caller must have the `MINTER_ROLE`.\\\"},\\\"name()\\\":{\\\"details\\\":\\\"Returns the name of the token.\\\"},\\\"pause()\\\":{\\\"details\\\":\\\"Pauses all token transfers. See {ERC20Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"},\\\"paused()\\\":{\\\"details\\\":\\\"Returns true if the contract is paused, and false otherwise.\\\"},\\\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\\\"},\\\"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. May emit a {RoleRevoked} event.\\\"},\\\"supportsInterface(bytes4)\\\":{\\\"details\\\":\\\"See {IERC165-supportsInterface}.\\\"},\\\"symbol()\\\":{\\\"details\\\":\\\"Returns the symbol of the token, usually a shorter version of the name.\\\"},\\\"totalSupply()\\\":{\\\"details\\\":\\\"See {IERC20-totalSupply}.\\\"},\\\"transfer(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\\\"},\\\"transferFrom(address,address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\\\"},\\\"unpause()\\\":{\\\"details\\\":\\\"Unpauses all token transfers. See {ERC20Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/tokens/erc20/WBTC.sol\\\":\\\"WBTC\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":1},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC20Metadata.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.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 Contracts guidelines: functions revert\\\\n * instead returning `false` on failure. This behavior is nonetheless\\\\n * conventional and does not conflict with the expectations of ERC20\\\\n * 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, IERC20Metadata {\\\\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\\\\n /**\\\\n * @dev Sets the values for {name} and {symbol}.\\\\n *\\\\n * The default value of {decimals} is 18. To select a different value for\\\\n * {decimals} you should overload it.\\\\n *\\\\n * All two of these values are immutable: they can only be set once during\\\\n * construction.\\\\n */\\\\n constructor(string memory name_, string memory symbol_) {\\\\n _name = name_;\\\\n _symbol = symbol_;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() public view virtual override 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 override 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 this function is\\\\n * overridden;\\\\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 override returns (uint8) {\\\\n return 18;\\\\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 * - `to` cannot be the zero address.\\\\n * - the caller must have a balance of at least `amount`.\\\\n */\\\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\\\n address owner = _msgSender();\\\\n _transfer(owner, to, 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 * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\\\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 address owner = _msgSender();\\\\n _approve(owner, 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 * NOTE: Does not update the allowance if the current allowance\\\\n * is the maximum `uint256`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` and `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n * - the caller must have allowance for ``from``'s tokens of at least\\\\n * `amount`.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) public virtual override returns (bool) {\\\\n address spender = _msgSender();\\\\n _spendAllowance(from, spender, amount);\\\\n _transfer(from, to, amount);\\\\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 address owner = _msgSender();\\\\n _approve(owner, spender, allowance(owner, spender) + 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 address owner = _msgSender();\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n require(currentAllowance >= subtractedValue, \\\\\\\"ERC20: decreased allowance below zero\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - subtractedValue);\\\\n }\\\\n\\\\n return true;\\\\n }\\\\n\\\\n /**\\\\n * @dev Moves `amount` of tokens from `from` to `to`.\\\\n *\\\\n * This 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 * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n */\\\\n function _transfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC20: transfer from the zero address\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC20: transfer to the zero address\\\\\\\");\\\\n\\\\n _beforeTokenTransfer(from, to, amount);\\\\n\\\\n uint256 fromBalance = _balances[from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC20: transfer amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[from] = fromBalance - amount;\\\\n }\\\\n _balances[to] += amount;\\\\n\\\\n emit Transfer(from, to, amount);\\\\n\\\\n _afterTokenTransfer(from, to, 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 * - `account` 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 += amount;\\\\n _balances[account] += amount;\\\\n emit Transfer(address(0), account, amount);\\\\n\\\\n _afterTokenTransfer(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 uint256 accountBalance = _balances[account];\\\\n require(accountBalance >= amount, \\\\\\\"ERC20: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[account] = accountBalance - amount;\\\\n }\\\\n _totalSupply -= amount;\\\\n\\\\n emit Transfer(account, address(0), amount);\\\\n\\\\n _afterTokenTransfer(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(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) 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 Updates `owner` s allowance for `spender` based on spent `amount`.\\\\n *\\\\n * Does not update the allowance amount in case of infinite allowance.\\\\n * Revert if not enough allowance is available.\\\\n *\\\\n * Might emit an {Approval} event.\\\\n */\\\\n function _spendAllowance(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n if (currentAllowance != type(uint256).max) {\\\\n require(currentAllowance >= amount, \\\\\\\"ERC20: insufficient allowance\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - amount);\\\\n }\\\\n }\\\\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 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(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after 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 * has been transferred to `to`.\\\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.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 /**\\\\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 _spendAllowance(account, _msgSender(), amount);\\\\n _burn(account, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n */\\\\nabstract contract ERC20Pausable is ERC20, Pausable {\\\\n /**\\\\n * @dev See {ERC20-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n\\\\n require(!paused(), \\\\\\\"ERC20Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x978847fbff92d66d27d8767402a90ba996970b1936b372406aa17f5492bd8dc5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC20.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\ninterface IERC20Metadata is IERC20 {\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the symbol of the token.\\\\n */\\\\n function symbol() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the decimals places of the token.\\\\n */\\\\n function decimals() external view returns (uint8);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC20} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\\\n * account that deploys the contract.\\\\n *\\\\n * See {ERC20-constructor}.\\\\n */\\\\n constructor(string memory name, string memory symbol) ERC20(name, symbol) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`.\\\\n *\\\\n * See {ERC20-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(address to, uint256 amount) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n _mint(to, amount);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override(ERC20, ERC20Pausable) {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2cd54808b851c4db22f459065af0b7a952262741a85a73923e7a660767cd7baa\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/tokens/erc20/WBTC.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\\\\\";\\\\n\\\\ncontract WBTC is ERC20PresetMinterPauser {\\\\n address public immutable GATEWAY_ADDRESS;\\\\n\\\\n constructor(address gateway, address pauser) ERC20PresetMinterPauser(\\\\\\\"Wrapped Bitcoin\\\\\\\", \\\\\\\"WBTC\\\\\\\") {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, pauser);\\\\n _setupRole(PAUSER_ROLE, pauser);\\\\n\\\\n GATEWAY_ADDRESS = gateway;\\\\n _setupRole(MINTER_ROLE, gateway);\\\\n\\\\n _revokeRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n _revokeRole(MINTER_ROLE, _msgSender());\\\\n _revokeRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20PresetMinterPauser) {\\\\n if (to == address(0)) {\\\\n if (_msgSender() != GATEWAY_ADDRESS) {\\\\n revert(\\\\\\\"WBTC: only gateway can burn tokens\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdf20641f881e86dc6203e8664ee6735dd9f1edddae147e1919de695c2bc15a01\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 1, + "storageLayout": { + "storage": [ + { + "astId": 50680, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)50675_storage)" + }, + { + "astId": 50994, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_roleMembers", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)57395_storage)" + }, + { + "astId": 54138, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_balances", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 54144, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_allowances", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 54146, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_totalSupply", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 54148, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_name", + "offset": 0, + "slot": "5", + "type": "t_string_storage" + }, + { + "astId": 54150, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_symbol", + "offset": 0, + "slot": "6", + "type": "t_string_storage" + }, + { + "astId": 52191, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_paused", + "offset": 0, + "slot": "7", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32", + "base": "t_bytes32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "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_struct(AddressSet)57395_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)57395_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)50675_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)50675_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)57395_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.AddressSet", + "numberOfBytes": "64", + "members": [ + { + "astId": 57394, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)57094_storage" + } + ] + }, + "t_struct(RoleData)50675_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", + "members": [ + { + "astId": 50672, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 50674, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ] + }, + "t_struct(Set)57094_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "numberOfBytes": "64", + "members": [ + { + "astId": 57089, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 57093, + "contract": "src/tokens/erc20/WBTC.sol:WBTC", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1722409484, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file From dd8755b047058daa8fbbfc40fed3785e78bf07e7 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 31 Jul 2024 15:53:56 +0700 Subject: [PATCH 264/305] chore: add artifacts Ethereum --- .../ethereum/MainchainBridgeManagerLogic.json | 677 ++++ .../ethereum/MainchainBridgeManagerProxy.json | 54 + .../ethereum/MainchainGatewayV3Logic.json | 2804 +++-------------- deployments/ethereum/WethUnwrapper.json | 45 + 4 files changed, 1157 insertions(+), 2423 deletions(-) create mode 100644 deployments/ethereum/MainchainBridgeManagerLogic.json create mode 100644 deployments/ethereum/MainchainBridgeManagerProxy.json create mode 100644 deployments/ethereum/WethUnwrapper.json diff --git a/deployments/ethereum/MainchainBridgeManagerLogic.json b/deployments/ethereum/MainchainBridgeManagerLogic.json new file mode 100644 index 00000000..ee0e0450 --- /dev/null +++ b/deployments/ethereum/MainchainBridgeManagerLogic.json @@ -0,0 +1,677 @@ +{ + "abi": "[{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addBridgeOperators\",\"inputs\":[{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperatorWeight\",\"inputs\":[{\"name\":\"bridgeOperator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperators\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCallbackRegisters\",\"inputs\":[],\"outputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFullBridgeOperatorInfos\",\"inputs\":[],\"outputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorOf\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeight\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeights\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernors\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorOf\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalExpiryDuration\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalProposalRelayed\",\"inputs\":[{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"roninChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bridgeContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"callbackRegisters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isBridgeOperator\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"relayGlobalProposal\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"relayProposal\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeBridgeOperators\",\"inputs\":[{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolveTargets\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"}],\"outputs\":[{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"round\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinRequiredGovernor\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sumGovernorsWeight\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"sum\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalBridgeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unregisterCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateManyTargetOption\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"vote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"againstVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"forVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BridgeOperatorAddingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorRemovingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorUpdated\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsAdded\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"indexed\":false,\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsRemoved\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallbackRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalProposalCreated\",\"inputs\":[{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"globalProposalHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"globalProposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinRequiredGovernorUpdated\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Notified\",\"inputs\":[{\"name\":\"callData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"registers\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalApproved\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalCreated\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExecuted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"successCalls\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpired\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpiryDurationChanged\",\"inputs\":[{\"name\":\"duration\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalRejected\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalVoted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"voter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"support\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TargetOptionUpdated\",\"inputs\":[{\"name\":\"targetOption\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrBelowMinRequiredGovernors\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrCurrentProposalIsNotCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrDuplicated\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrExistOneInternalCallFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"callData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotFound\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotMatch\",\"inputs\":[{\"name\":\"required\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrInsufficientGas\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidArguments\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidChainId\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidExpiryTimestamp\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidInput\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidOrder\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidProposalNonce\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidVoteWeight\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLooseProposalInternallyRevert\",\"inputs\":[{\"name\":\"callIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"revertMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrNonExecutorCannotRelay\",\"inputs\":[{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrOnlySelfCall\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOperatorNotFound\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrRelayFailed\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedVoteType\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrVoteIsFinalized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroAddress\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + "absolutePath": "MainchainBridgeManager.sol", + "address": "0x0ac26945032143f6196d4bb5Ae03592BfAf822FD", + "ast": "", + "blockNumber": 20425324, + "bytecode": "\"0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61519e80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212209b8f259545122f66d7b909c338372302f448cabc8b0563521692a408e8f2a0a064736f6c63430008170033\"", + "callValue": 0, + "chainId": 1, + "constructorArgs": "0x", + "contractName": "MainchainBridgeManager", + "deployedBytecode": "\"0x608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212209b8f259545122f66d7b909c338372302f448cabc8b0563521692a408e8f2a0a064736f6c63430008170033\"", + "deployer": "0xA62DddCC58E769bCFd2f9A7A61CDF331f18c2650", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "addBridgeOperators(uint96[],address[],address[])": { + "details": "Adds multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to add.", + "governors": "An array of addresses of hot/cold wallets for bridge operator to update their node address." + } + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "getBridgeOperatorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific bridge operator.", + "params": { + "bridgeOperator": "The address of the bridge operator to get the vote weight for." + }, + "returns": { + "weight": "The vote weight of the specified bridge operator." + } + }, + "getBridgeOperators()": { + "details": "Returns an array of all bridge operators.", + "returns": { + "_0": "An array containing the addresses of all bridge operators." + } + }, + "getCallbackRegisters()": { + "details": "Retrieves the addresses of registered callbacks.", + "returns": { + "registers": "An array containing the addresses of registered callbacks." + } + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." + }, + "returns": { + "contract_": "The address of the contract with the specified role." + } + }, + "getFullBridgeOperatorInfos()": { + "details": "Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.", + "returns": { + "bridgeOperators": "An array of addresses representing the registered bridge operators.", + "governors": "An array of addresses representing the governors of each bridge operator.", + "weights": "An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```" + } + }, + "getGovernorOf(address)": { + "details": "Returns the corresponding `governor` of a `operator`." + }, + "getGovernorWeight(address)": { + "details": "External function to retrieve the vote weight of a specific governor.", + "params": { + "governor": "The address of the governor to get the vote weight for." + }, + "returns": { + "weight": "voteWeight The vote weight of the specified governor." + } + }, + "getGovernorWeights(address[])": { + "details": "Returns the weights of a list of governor addresses." + }, + "getGovernors()": { + "details": "Returns an array of all governors.", + "returns": { + "_0": "An array containing the addresses of all governors." + } + }, + "getOperatorOf(address)": { + "details": "Returns the corresponding `operator` of a `governor`." + }, + "getProposalExpiryDuration()": { + "details": "Returns the expiry duration for a new proposal." + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTotalWeight()": { + "details": "Returns total weights." + }, + "globalProposalRelayed(uint256)": { + "details": "Returns whether the voter `_voter` casted vote for the proposal." + }, + "isBridgeOperator(address)": { + "details": "Checks if the given address is a bridge operator.", + "params": { + "addr": "The address to check." + }, + "returns": { + "_0": "A boolean indicating whether the address is a bridge operator." + } + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "registerCallbacks(address[])": { + "details": "Registers multiple callbacks with the bridge.", + "params": { + "registers": "The array of callback addresses to register." + } + }, + "relayGlobalProposal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor." + }, + "relayProposal((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { + "details": "See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor." + }, + "removeBridgeOperators(address[])": { + "details": "Removes multiple bridge operators.", + "params": { + "bridgeOperators": "An array of addresses representing the bridge operators to remove." + } + }, + "resolveTargets(uint8[])": { + "details": "Returns corresponding address of target options. Return address(0) on non-existent target." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." + } + }, + "setMinRequiredGovernor(uint256)": { + "details": "Self-call to update the minimum required governor.", + "params": { + "min": "The minimum number, this must not less than 3." + } + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "sumGovernorsWeight(address[])": { + "details": "Returns total weights of the governor list." + }, + "totalBridgeOperator()": { + "details": "Returns the total number of bridge operators.", + "returns": { + "_0": "The total number of bridge operators." + } + }, + "unregisterCallbacks(address[])": { + "details": "Unregisters multiple callbacks from the bridge.", + "params": { + "registers": "The array of callback addresses to unregister." + } + }, + "updateManyTargetOption(uint8[],address[])": { + "details": "Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal." + } + }, + "events": { + "BridgeOperatorAddingFailed(address)": { + "details": "Emitted when a bridge operator is failed to add." + }, + "BridgeOperatorRemovingFailed(address)": { + "details": "Emitted when a bridge operator is failed to remove." + }, + "BridgeOperatorUpdated(address,address,address)": { + "details": "Emitted when a bridge operator is updated." + }, + "BridgeOperatorsAdded(bool[],uint96[],address[],address[])": { + "details": "Emitted when new bridge operators are added." + }, + "BridgeOperatorsRemoved(bool[],address[])": { + "details": "Emitted when bridge operators are removed." + }, + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MinRequiredGovernorUpdated(uint256)": { + "details": "Emitted when the minimum number of required governors is updated." + }, + "Notified(bytes,address[],bool[],bytes[])": { + "details": "Emitted when the contract notifies multiple registers with statuses and return data." + }, + "ProposalApproved(bytes32)": { + "details": "Emitted when the proposal is approved" + }, + "ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)": { + "details": "Emitted when a proposal is created" + }, + "ProposalExecuted(bytes32,bool[],bytes[])": { + "details": "Emitted when the proposal is executed" + }, + "ProposalExpired(bytes32)": { + "details": "Emitted when the vote is expired" + }, + "ProposalExpiryDurationChanged(uint256)": { + "details": "Emitted when the proposal expiry duration is changed." + }, + "ProposalRejected(bytes32)": { + "details": "Emitted when the vote is reject" + }, + "ProposalVoted(bytes32,address,uint8,uint256)": { + "details": "Emitted when the proposal is voted" + }, + "TargetOptionUpdated(uint8,address)": { + "details": "Emitted when the target options are updated" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + } + }, + "errors": { + "ErrContractTypeNotFound(uint8)": [ + { + "details": "Error of invalid role." + } + ], + "ErrCurrentProposalIsNotCompleted()": [ + { + "details": "Error thrown when the current proposal is not completed." + } + ], + "ErrDuplicated(bytes4)": [ + { + "details": "Error thrown when a duplicated element is detected in an array.", + "params": { + "msgSig": "The function signature that invoke the error." + } + } + ], + "ErrInsufficientGas(bytes32)": [ + { + "details": "Error thrown when there is insufficient gas to execute a function." + } + ], + "ErrInvalidArguments(bytes4)": [ + { + "details": "Error indicating that arguments are invalid." + } + ], + "ErrInvalidChainId(bytes4,uint256,uint256)": [ + { + "details": "Error indicating that the chain ID is invalid.", + "params": { + "actual": "Current chain ID that executing function.", + "expected": "Expected chain ID required for the tx to success.", + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." + } + } + ], + "ErrInvalidExpiryTimestamp()": [ + { + "details": "Error thrown when an invalid expiry timestamp is provided." + } + ], + "ErrInvalidOrder(bytes4)": [ + { + "details": "Error indicating that an order is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." + } + } + ], + "ErrInvalidProposalNonce(bytes4)": [ + { + "details": "Error indicating that the proposal nonce is invalid.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an invalid proposal nonce." + } + } + ], + "ErrInvalidThreshold(bytes4)": [ + { + "details": "Error indicating that the provided threshold is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that the invalid threshold applies to." + } + } + ], + "ErrInvalidVoteWeight(bytes4)": [ + { + "details": "Error indicating that a vote weight is invalid for a specific function signature.", + "params": { + "msgSig": "The function signature (bytes4) that encountered an invalid vote weight." + } + } + ], + "ErrLengthMismatch(bytes4)": [ + { + "details": "Error indicating a mismatch in the length of input parameters or arrays for a specific function.", + "params": { + "msgSig": "The function signature (bytes4) that has a length mismatch." + } + } + ], + "ErrLooseProposalInternallyRevert(uint256,bytes)": [ + { + "details": "Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`." + } + ], + "ErrNonExecutorCannotRelay(address,address)": [ + { + "details": "Error of the `caller` to relay is not the specified `executor`." + } + ], + "ErrOnlySelfCall(bytes4)": [ + { + "details": "Error indicating that a function can only be called by the contract itself.", + "params": { + "msgSig": "The function signature (bytes4) that can only be called by the contract itself." + } + } + ], + "ErrRelayFailed(bytes4)": [ + { + "details": "Error indicating that a relay call has failed.", + "params": { + "msgSig": "The function signature (bytes4) of the relay call that failed." + } + } + ], + "ErrUnauthorized(bytes4,uint8)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "expectedRole": "The role required to perform the function.", + "msgSig": "The function signature (bytes4) that the caller is unauthorized to perform." + } + } + ], + "ErrUnsupportedInterface(bytes4,address)": [ + { + "details": "The error indicating an unsupported interface.", + "params": { + "addr": "The address where the unsupported interface was encountered.", + "interfaceId": "The bytes4 interface identifier that is not supported." + } + } + ], + "ErrUnsupportedVoteType(bytes4)": [ + { + "details": "Error indicating that a vote type is not supported.", + "params": { + "msgSig": "The function signature (bytes4) of the operation that encountered an unsupported vote type." + } + } + ], + "ErrVoteIsFinalized()": [ + { + "details": "Error thrown when attempting to interact with a finalized vote." + } + ], + "ErrZeroAddress(bytes4)": [ + { + "details": "Error indicating that given address is null when it should not." + } + ], + "ErrZeroCodeContract(address)": [ + { + "details": "Error of set to non-contract." + } + ] + } + }, + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrBelowMinRequiredGovernors\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrCurrentProposalIsNotCompleted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrDuplicated\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrExistOneInternalCallFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"required\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotMatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ErrInsufficientGas\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidArguments\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ErrInvalidChainId\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidExpiryTimestamp\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInput\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidOrder\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidProposalNonce\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidVoteWeight\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"callIndex\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"revertMsg\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrLooseProposalInternallyRevert\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"caller\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrNonExecutorCannotRelay\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrOnlySelfCall\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrOperatorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrRelayFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrUnsupportedInterface\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrUnsupportedVoteType\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrVoteIsFinalized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrZeroAddress\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorAddingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorRemovingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"fromBridgeOperator\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"toBridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"CallbackRegistered\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"globalProposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GlobalProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"MinRequiredGovernorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"Notified\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalApproved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"successCalls\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"ProposalExecuted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalExpired\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"duration\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalExpiryDurationChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalRejected\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalVoted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption\\\",\\\"name\\\":\\\"targetOption\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"TargetOptionUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DOMAIN_SEPARATOR\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"addBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getBridgeOperatorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getBridgeOperators\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getCallbackRegisters\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getFullBridgeOperatorInfos\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"getGovernorWeights\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getGovernors\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getOperatorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getProposalExpiryDuration\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getTotalWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"globalProposalRelayed\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"roninChainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeContract\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"callbackRegisters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"initialize\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"relayGlobalProposal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"relayProposal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"removeBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"resolveTargets\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"round\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setMinRequiredGovernor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"sumGovernorsWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"sum\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"unregisterCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"updateManyTargetOption\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"vote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"hash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"againstVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"forVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrCurrentProposalIsNotCompleted()\\\":[{\\\"details\\\":\\\"Error thrown when the current proposal is not completed.\\\"}],\\\"ErrDuplicated(bytes4)\\\":[{\\\"details\\\":\\\"Error thrown when a duplicated element is detected in an array.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature that invoke the error.\\\"}}],\\\"ErrInsufficientGas(bytes32)\\\":[{\\\"details\\\":\\\"Error thrown when there is insufficient gas to execute a function.\\\"}],\\\"ErrInvalidArguments(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that arguments are invalid.\\\"}],\\\"ErrInvalidChainId(bytes4,uint256,uint256)\\\":[{\\\"details\\\":\\\"Error indicating that the chain ID is invalid.\\\",\\\"params\\\":{\\\"actual\\\":\\\"Current chain ID that executing function.\\\",\\\"expected\\\":\\\"Expected chain ID required for the tx to success.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\"}}],\\\"ErrInvalidExpiryTimestamp()\\\":[{\\\"details\\\":\\\"Error thrown when an invalid expiry timestamp is provided.\\\"}],\\\"ErrInvalidOrder(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that an order is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid order.\\\"}}],\\\"ErrInvalidProposalNonce(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the proposal nonce is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\"}}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidVoteWeight(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote weight is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid vote weight.\\\"}}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrLooseProposalInternallyRevert(uint256,bytes)\\\":[{\\\"details\\\":\\\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\"}],\\\"ErrNonExecutorCannotRelay(address,address)\\\":[{\\\"details\\\":\\\"Error of the `caller` to relay is not the specified `executor`.\\\"}],\\\"ErrOnlySelfCall(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a function can only be called by the contract itself.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that can only be called by the contract itself.\\\"}}],\\\"ErrRelayFailed(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a relay call has failed.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the relay call that failed.\\\"}}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnsupportedInterface(bytes4,address)\\\":[{\\\"details\\\":\\\"The error indicating an unsupported interface.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address where the unsupported interface was encountered.\\\",\\\"interfaceId\\\":\\\"The bytes4 interface identifier that is not supported.\\\"}}],\\\"ErrUnsupportedVoteType(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote type is not supported.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\"}}],\\\"ErrVoteIsFinalized()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to interact with a finalized vote.\\\"}],\\\"ErrZeroAddress(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that given address is null when it should not.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"BridgeOperatorAddingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to add.\\\"},\\\"BridgeOperatorRemovingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to remove.\\\"},\\\"BridgeOperatorUpdated(address,address,address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is updated.\\\"},\\\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Emitted when new bridge operators are added.\\\"},\\\"BridgeOperatorsRemoved(bool[],address[])\\\":{\\\"details\\\":\\\"Emitted when bridge operators are removed.\\\"},\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"MinRequiredGovernorUpdated(uint256)\\\":{\\\"details\\\":\\\"Emitted when the minimum number of required governors is updated.\\\"},\\\"Notified(bytes,address[],bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the contract notifies multiple registers with statuses and return data.\\\"},\\\"ProposalApproved(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the proposal is approved\\\"},\\\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"ProposalExecuted(bytes32,bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the proposal is executed\\\"},\\\"ProposalExpired(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is expired\\\"},\\\"ProposalExpiryDurationChanged(uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal expiry duration is changed.\\\"},\\\"ProposalRejected(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is reject\\\"},\\\"ProposalVoted(bytes32,address,uint8,uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal is voted\\\"},\\\"TargetOptionUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when the target options are updated\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addBridgeOperators(uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Adds multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to add.\\\",\\\"governors\\\":\\\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\"}},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"getBridgeOperatorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific bridge operator.\\\",\\\"params\\\":{\\\"bridgeOperator\\\":\\\"The address of the bridge operator to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"The vote weight of the specified bridge operator.\\\"}},\\\"getBridgeOperators()\\\":{\\\"details\\\":\\\"Returns an array of all bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all bridge operators.\\\"}},\\\"getCallbackRegisters()\\\":{\\\"details\\\":\\\"Retrieves the addresses of registered callbacks.\\\",\\\"returns\\\":{\\\"registers\\\":\\\"An array containing the addresses of registered callbacks.\\\"}},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getFullBridgeOperatorInfos()\\\":{\\\"details\\\":\\\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\",\\\"returns\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the registered bridge operators.\\\",\\\"governors\\\":\\\"An array of addresses representing the governors of each bridge operator.\\\",\\\"weights\\\":\\\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\\\"}},\\\"getGovernorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `governor` of a `operator`.\\\"},\\\"getGovernorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific governor.\\\",\\\"params\\\":{\\\"governor\\\":\\\"The address of the governor to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"voteWeight The vote weight of the specified governor.\\\"}},\\\"getGovernorWeights(address[])\\\":{\\\"details\\\":\\\"Returns the weights of a list of governor addresses.\\\"},\\\"getGovernors()\\\":{\\\"details\\\":\\\"Returns an array of all governors.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all governors.\\\"}},\\\"getOperatorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `operator` of a `governor`.\\\"},\\\"getProposalExpiryDuration()\\\":{\\\"details\\\":\\\"Returns the expiry duration for a new proposal.\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"getTotalWeight()\\\":{\\\"details\\\":\\\"Returns total weights.\\\"},\\\"globalProposalRelayed(uint256)\\\":{\\\"details\\\":\\\"Returns whether the voter `_voter` casted vote for the proposal.\\\"},\\\"isBridgeOperator(address)\\\":{\\\"details\\\":\\\"Checks if the given address is a bridge operator.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address to check.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"A boolean indicating whether the address is a bridge operator.\\\"}},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"registerCallbacks(address[])\\\":{\\\"details\\\":\\\"Registers multiple callbacks with the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to register.\\\"}},\\\"relayGlobalProposal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor.\\\"},\\\"relayProposal((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor.\\\"},\\\"removeBridgeOperators(address[])\\\":{\\\"details\\\":\\\"Removes multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to remove.\\\"}},\\\"resolveTargets(uint8[])\\\":{\\\"details\\\":\\\"Returns corresponding address of target options. Return address(0) on non-existent target.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setMinRequiredGovernor(uint256)\\\":{\\\"details\\\":\\\"Self-call to update the minimum required governor.\\\",\\\"params\\\":{\\\"min\\\":\\\"The minimum number, this must not less than 3.\\\"}},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\\\"},\\\"sumGovernorsWeight(address[])\\\":{\\\"details\\\":\\\"Returns total weights of the governor list.\\\"},\\\"totalBridgeOperator()\\\":{\\\"details\\\":\\\"Returns the total number of bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"The total number of bridge operators.\\\"}},\\\"unregisterCallbacks(address[])\\\":{\\\"details\\\":\\\"Unregisters multiple callbacks from the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to unregister.\\\"}},\\\"updateManyTargetOption(uint8[],address[])\\\":{\\\"details\\\":\\\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"errors\\\":{\\\"ErrBelowMinRequiredGovernors()\\\":[{\\\"notice\\\":\\\"Error indicating that the governors list will go below minimum number of required governor.\\\"}],\\\"ErrGovernorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying governor\\\"}],\\\"ErrGovernorNotMatch(address,address)\\\":[{\\\"notice\\\":\\\"Error indicating that the msg.sender is not match the required governor\\\"}],\\\"ErrInvalidInput()\\\":[{\\\"notice\\\":\\\"Common invalid input error\\\"}],\\\"ErrOperatorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying operator\\\"}]},\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"round(uint256)\\\":{\\\"notice\\\":\\\"chain id = 0 for global proposal\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/mainchain/MainchainBridgeManager.sol\\\":\\\"MainchainBridgeManager\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\\\\\"./BridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IHasContracts, HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\n\\\\nimport { IBridgeManager } from \\\\\\\"../../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\nimport { AddressArrayUtils } from \\\\\\\"../../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"../../utils/RoleAccess.sol\\\\\\\";\\\\nimport { TUint256Slot } from \\\\\\\"../../types/Types.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"./BridgeManagerQuorum.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n struct BridgeManagerStorage {\\\\n /// @notice List of the governors.\\\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\\\n address[] _governors;\\\\n address[] _operators;\\\\n /// @dev Mapping from address to the governor weight\\\\n mapping(address governor => uint96 weight) _governorWeight;\\\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\\\n mapping(address operator => uint96 weight) _operatorWeight;\\\\n /// @dev Total weight of all governors / operators.\\\\n uint256 _totalWeight;\\\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\\\n uint256 _minRequiredGovernor;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerStorageLocation\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n bytes32 public DOMAIN_SEPARATOR;\\\\n\\\\n modifier onlyGovernor() virtual {\\\\n _requireGovernor(msg.sender);\\\\n _;\\\\n }\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n function __BridgeManager_init(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n __BridgeManagerQuorum_init_unchained(num, denom);\\\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n function __BridgeManager_init_unchained(\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n _setContract(ContractType.BRIDGE, bridgeContract);\\\\n\\\\n DOMAIN_SEPARATOR = keccak256(\\\\n abi.encode(\\\\n keccak256(\\\\\\\"EIP712Domain(string name,string version,bytes32 salt)\\\\\\\"),\\\\n keccak256(\\\\\\\"BridgeManager\\\\\\\"), // name hash\\\\n keccak256(\\\\\\\"3\\\\\\\"), // version hash\\\\n keccak256(abi.encode(\\\\\\\"BRIDGE_MANAGER\\\\\\\", roninChainId)) // salt\\\\n )\\\\n );\\\\n\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n _setMinRequiredGovernor(3);\\\\n }\\\\n\\\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerStorageLocation\\\\n }\\\\n }\\\\n\\\\n // ===================== CONFIG ========================\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\\\n _setMinRequiredGovernor(min);\\\\n }\\\\n\\\\n function _setMinRequiredGovernor(uint min) internal {\\\\n if (min < 3) revert ErrInvalidInput();\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n $._minRequiredGovernor = min;\\\\n emit MinRequiredGovernorUpdated(min);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the caller has governor role access.\\\\n */\\\\n function _requireGovernor(address addr) internal view {\\\\n if (_getGovernorWeight(addr) == 0) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\\\n }\\\\n }\\\\n\\\\n // ===================== WEIGHTS METHOD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getTotalWeight() public view returns (uint256) {\\\\n return _totalWeight();\\\\n }\\\\n\\\\n function _totalWeight() internal view override returns (uint256) {\\\\n return _getBridgeManagerStorage()._totalWeight;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weights of a given array of governors.\\\\n */\\\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n weights = new uint96[](governors.length);\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n weights[i] = $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\\\n weight = _getGovernorWeight(governor);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\\\n */\\\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\\\n return _getBridgeManagerStorage()._governorWeight[governor];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\\\n sum = _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\\\n * @param governors The non-duplicated input.\\\\n */\\\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n sum += $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n return $._operatorWeight[bridgeOperator];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n (uint256 numerator, uint256 denominator) = getThreshold();\\\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\\\n }\\\\n\\\\n // ===================== MANAGER CRUD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _removeBridgeOperators(bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to add bridge operators.\\\\n *\\\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to add bridge operators.\\\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\\\n *\\\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\\\n */\\\\n function _addBridgeOperators(\\\\n uint96[] memory voteWeights,\\\\n address[] memory newGovernors,\\\\n address[] memory newOperators\\\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = newOperators.length;\\\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\\\n addeds = new bool[](length);\\\\n\\\\n // simply skip add operations if inputs are empty.\\\\n if (length == 0) return addeds;\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint96 iVoteWeight;\\\\n uint256 accumulatedWeight;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iGovernor = newGovernors[i];\\\\n iOperator = newOperators[i];\\\\n iVoteWeight = voteWeights[i];\\\\n\\\\n // Check non-zero inputs\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n\\\\n // Check not yet added operators\\\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\\\n\\\\n // Only add the valid operator\\\\n if (addeds[i]) {\\\\n // Add governor to list, update governor weight\\\\n $._governors.push(iGovernor);\\\\n $._governorWeight[iGovernor] = iVoteWeight;\\\\n\\\\n // Add operator to list, update governor weight\\\\n $._operators.push(iOperator);\\\\n $._operatorWeight[iOperator] = iVoteWeight;\\\\n\\\\n accumulatedWeight += iVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight += accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\\\n\\\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to remove bridge operators.\\\\n *\\\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to remove bridge operators.\\\\n *\\\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\\\n */\\\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = removingOperators.length;\\\\n removeds = new bool[](length);\\\\n\\\\n // simply skip remove operations if inputs are empty.\\\\n if (length == 0) return removeds;\\\\n if ($._governors.length - length < $._minRequiredGovernor) {\\\\n revert ErrBelowMinRequiredGovernors();\\\\n }\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint256 accumulatedWeight;\\\\n uint idx;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iOperator = removingOperators[i];\\\\n\\\\n // Check non-zero inputs\\\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n\\\\n // Check existing operators\\\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\\\n\\\\n // Only remove the valid operator\\\\n if (removeds[i]) {\\\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\\\n\\\\n // Remove governor from list, update governor weight\\\\n uint lastIdx = $._governors.length - 1;\\\\n $._governors[idx] = $._governors[lastIdx];\\\\n $._governors.pop();\\\\n delete $._governorWeight[iGovernor];\\\\n\\\\n // Remove operator from list, update operator weight\\\\n $._operators[idx] = $._operators[lastIdx];\\\\n $._operators.pop();\\\\n delete $._operatorWeight[iOperator];\\\\n\\\\n accumulatedWeight += removingVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight -= accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\\\n\\\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\\\n }\\\\n\\\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\\\n for (uint i; i < $_array.length; i++) {\\\\n if (addr == $_array[i]) {\\\\n return (true, i);\\\\n }\\\\n }\\\\n\\\\n return (false, type(uint256).max);\\\\n }\\\\n\\\\n // ================= MANAGER VIEW METHODS =============\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256) {\\\\n return _getBridgeManagerStorage()._operators.length;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n return $._operatorWeight[addr] > 0;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._operators;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernors() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._governors;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator) {\\\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\\\n if (!found) revert ErrGovernorNotFound(governor);\\\\n\\\\n return _getBridgeManagerStorage()._operators[idx];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor) {\\\\n (governor,) = _getGovernorOf(operator);\\\\n }\\\\n\\\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\\\n if (!found) revert ErrOperatorNotFound(operator);\\\\n\\\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n governors = $._governors;\\\\n bridgeOperators = $._operators;\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { EnumerableSet } from \\\\\\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\\\\\";\\\\nimport { IBridgeManagerCallbackRegister } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title BridgeManagerCallbackRegister\\\\n * @dev A contract that manages callback registrations and execution for a bridge.\\\\n */\\\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n /**\\\\n * @dev Storage slot for the address set of callback registers.\\\\n * @dev Value is equal to keccak256(\\\\\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\\\\\") - 1.\\\\n */\\\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\\\n\\\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\\\n _registerCallbacks(callbackRegisters);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\\\n _registerCallbacks(registers);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n _callbackRegisters.remove(registers[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\\\n registers = _getCallbackRegisters().values();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to register multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n address register;\\\\n bool regSuccess;\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n register = registers[i];\\\\n\\\\n _requireHasCode(register);\\\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\\\n\\\\n regSuccess = _callbackRegisters.add(register);\\\\n\\\\n emit CallbackRegistered(register, regSuccess);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\\\n */\\\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\\\n * @param callbackFnSig The function signature of the callback method.\\\\n * @param inputs The data to pass to the callback method.\\\\n * @return allSuccess Return true if all internal calls are success\\\\n */\\\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\\\n allSuccess = true;\\\\n\\\\n address[] memory registers = _getCallbackRegisters().values();\\\\n uint256 length = registers.length;\\\\n if (length == 0) return allSuccess;\\\\n\\\\n bool[] memory successes = new bool[](length);\\\\n bytes[] memory returnDatas = new bytes[](length);\\\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n // First, attempt to call normally\\\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\\\n\\\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\\\n if (!successes[i]) {\\\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\\\n allSuccess = allSuccess && successes[i];\\\\n }\\\\n }\\\\n\\\\n emit Notified(callData, registers, successes, returnDatas);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the address set of callback registers.\\\\n * @return callbackRegisters The storage reference to the callback registers.\\\\n */\\\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IQuorum } from \\\\\\\"../../interfaces/IQuorum.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\\\n struct BridgeManagerQuorumStorage {\\\\n uint256 _nonce;\\\\n uint256 _numerator;\\\\n uint256 _denominator;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerQuorumStorage\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\\\n\\\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n $._nonce = 1;\\\\n\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerQuorumStorage\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n return ($._numerator, $._denominator);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\\\n\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n uint256 prevNum = $._numerator;\\\\n uint256 prevDenom = $._denominator;\\\\n\\\\n $._numerator = num;\\\\n $._denominator = denom;\\\\n\\\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n\\\\n function _totalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/CoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Ballot.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\n\\\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to interact with a finalized vote.\\\\n */\\\\n error ErrVoteIsFinalized();\\\\n\\\\n /**\\\\n * @dev Error thrown when the current proposal is not completed.\\\\n */\\\\n error ErrCurrentProposalIsNotCompleted();\\\\n\\\\n struct ProposalVote {\\\\n VoteStatus status;\\\\n bytes32 hash;\\\\n uint256 againstVoteWeight; // Total weight of against votes\\\\n uint256 forVoteWeight; // Total weight of for votes\\\\n address[] forVoteds; // Array of addresses voting for\\\\n address[] againstVoteds; // Array of addresses voting against\\\\n uint256 expiryTimestamp;\\\\n mapping(address => Signature) sig;\\\\n mapping(address => bool) voted;\\\\n }\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\\\n /// @dev Emitted when the proposal is voted\\\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\\\n /// @dev Emitted when the proposal is approved\\\\n event ProposalApproved(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is reject\\\\n event ProposalRejected(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is expired\\\\n event ProposalExpired(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the proposal is executed\\\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\\\n /// @dev Emitted when the proposal expiry duration is changed.\\\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\\\n\\\\n /// @dev Mapping from chain id => vote round\\\\n /// @notice chain id = 0 for global proposal\\\\n mapping(uint256 => uint256) public round;\\\\n /// @dev Mapping from chain id => vote round => proposal vote\\\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\\\n\\\\n uint256 internal _proposalExpiryDuration;\\\\n\\\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\\\n __CoreGovernance_init_unchained(expiryDuration);\\\\n }\\\\n\\\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\\\n _setProposalExpiryDuration(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\\\n * if it is expired and not increase the `_round`.\\\\n */\\\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\\\n _round = round[_chainId];\\\\n // Skip checking for the first ever round\\\\n if (_round == 0) {\\\\n _round = round[_chainId] = 1;\\\\n } else {\\\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\\\n if (!_isExpired) {\\\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\\\n unchecked {\\\\n _round = ++round[_chainId];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\\\n */\\\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\\\n _vote.hash = _proposalHash;\\\\n _vote.expiryTimestamp = _expiryTimestamp;\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The chain id is not equal to 0.\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `ProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\\\n uint256 chainId = proposal.chainId;\\\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n round_ = _createVotingRound(chainId);\\\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the round.\\\\n * - The vote is not finalized.\\\\n * - The voter has not voted for the round.\\\\n *\\\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\\\n * proposal is approved, executed or rejected.\\\\n *\\\\n */\\\\n function _castVote(\\\\n Proposal.ProposalDetail memory proposal,\\\\n Ballot.VoteType support,\\\\n uint256 minimumForVoteWeight,\\\\n uint256 minimumAgainstVoteWeight,\\\\n address voter,\\\\n Signature memory signature,\\\\n uint256 voterWeight\\\\n ) internal virtual returns (bool done) {\\\\n uint256 chainId = proposal.chainId;\\\\n uint256 round_ = proposal.nonce;\\\\n ProposalVote storage _vote = vote[chainId][round_];\\\\n\\\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\\\n return true;\\\\n }\\\\n\\\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\\\n\\\\n _vote.voted[voter] = true;\\\\n // Stores the signature if it is not empty\\\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\\\n _vote.sig[voter] = signature;\\\\n }\\\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\\\n\\\\n uint256 _forVoteWeight;\\\\n uint256 _againstVoteWeight;\\\\n if (support == Ballot.VoteType.For) {\\\\n _vote.forVoteds.push(voter);\\\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\\\n } else if (support == Ballot.VoteType.Against) {\\\\n _vote.againstVoteds.push(voter);\\\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_forVoteWeight >= minimumForVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n if (proposal.isAutoExecute()) {\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev The specified executor executes the proposal on an approved proposal.\\\\n */\\\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\\\n bytes32 proposalHash = proposal.hash();\\\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\\\n\\\\n if (_vote.hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\\\n }\\\\n\\\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\\\n\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n\\\\n /**\\\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\\\n *\\\\n * Emits the event `ProposalExpired` if the vote is expired.\\\\n *\\\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\\\n * before or it will emit an unexpected event of `ProposalExpired`.\\\\n */\\\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\\\n\\\\n if (isExpired) {\\\\n emit ProposalExpired(proposalVote.hash);\\\\n\\\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n delete proposalVote.status;\\\\n delete proposalVote.hash;\\\\n delete proposalVote.againstVoteWeight;\\\\n delete proposalVote.forVoteWeight;\\\\n delete proposalVote.forVoteds;\\\\n delete proposalVote.againstVoteds;\\\\n delete proposalVote.expiryTimestamp;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\\\n */\\\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\\\n if (proposal.executable()) {\\\\n vote_.status = VoteStatus.Executed;\\\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the expiry duration for a new proposal.\\\\n */\\\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\\\n _proposalExpiryDuration = expiryDuration;\\\\n emit ProposalExpiryDurationChanged(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter casted for the proposal.\\\\n */\\\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\\\n return vote_.voted[voter];\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns total weight from validators.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns minimum vote to pass a proposal.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\\\n */\\\\n function _getChainType() internal view virtual returns (ChainType);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"./CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event GlobalProposalCreated(\\\\n uint256 indexed round,\\\\n bytes32 indexed proposalHash,\\\\n Proposal.ProposalDetail proposal,\\\\n bytes32 globalProposalHash,\\\\n GlobalProposal.GlobalProposalDetail globalProposal,\\\\n address creator\\\\n );\\\\n\\\\n /// @dev Emitted when the target options are updated\\\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\\\n\\\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\\\n }\\\\n\\\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\\\n _updateManyTargetOption(targetOptions, addrs);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes for a global proposal.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n address executor,\\\\n uint256[] memory values,\\\\n bytes[] memory calldatas,\\\\n uint256[] memory gasAmounts,\\\\n address creator\\\\n ) internal virtual {\\\\n uint256 round_ = _createVotingRound(0);\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes global proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobalStruct(\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\\\n address creator\\\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n uint256 round_ = _createVotingRound(0);\\\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\\\n\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\\\n */\\\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal helper of {resolveTargets}.\\\\n *\\\\n * @param strict When the param is set to `true`, revert on non-existent target.\\\\n */\\\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\\\n targets = new address[](targetOptions.length);\\\\n\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n *\\\\n * Requirement:\\\\n * - Only allow self-call through proposal.\\\\n *\\\\n */\\\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\\\n // HACK: Cannot reuse the existing library due to too deep stack\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n _updateManyTargetOption(targetOptions, targets);\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n */\\\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\\\n _updateTargetOption(targetOptions[i], targets[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates `targetOption` to `target`.\\\\n *\\\\n * Requirement:\\\\n * - Emit a `TargetOptionUpdated` event.\\\\n */\\\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\\\n _targetOptionsMap[targetOption] = target;\\\\n emit TargetOptionUpdated(targetOption, target);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract CommonGovernanceRelay is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Relays votes by signatures.\\\\n *\\\\n * @notice Does not store the voter signature into storage.\\\\n *\\\\n */\\\\n function _relayVotesBySignatures(\\\\n Proposal.ProposalDetail memory _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n bytes32 proposalHash\\\\n ) internal {\\\\n if (!(_supports.length > 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\\\n\\\\n address[] memory _forVoteSigners = new address[](_signatures.length);\\\\n address[] memory _againstVoteSigners = new address[](_signatures.length);\\\\n\\\\n {\\\\n uint256 _forVoteCount;\\\\n uint256 _againstVoteCount;\\\\n\\\\n {\\\\n address _signer;\\\\n address _lastSigner;\\\\n Ballot.VoteType _support;\\\\n Signature calldata _sig;\\\\n\\\\n for (uint256 _i; _i < _signatures.length;) {\\\\n _sig = _signatures[_i];\\\\n _support = _supports[_i];\\\\n\\\\n if (_support == Ballot.VoteType.For) {\\\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\\\n _forVoteSigners[_forVoteCount++] = _signer;\\\\n } else if (_support == Ballot.VoteType.Against) {\\\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\\\n _againstVoteSigners[_againstVoteCount++] = _signer;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\\\n _lastSigner = _signer;\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n assembly {\\\\n mstore(_forVoteSigners, _forVoteCount)\\\\n mstore(_againstVoteSigners, _againstVoteCount)\\\\n }\\\\n }\\\\n\\\\n ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce];\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _totalForVoteWeight = _sumWeight(_forVoteSigners);\\\\n if (_totalForVoteWeight >= _minimumForVoteWeight) {\\\\n if (_totalForVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n _tryExecute(_vote, _proposal);\\\\n return;\\\\n }\\\\n\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n uint256 _totalAgainstVoteWeight = _sumWeight(_againstVoteSigners);\\\\n if (_totalAgainstVoteWeight >= _minimumAgainstVoteWeight) {\\\\n if (_totalAgainstVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n return;\\\\n }\\\\n\\\\n revert ErrRelayFailed(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the weight of the governor list.\\\\n */\\\\n function _sumWeight(address[] memory _governors) internal view virtual returns (uint256);\\\\n\\\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x48b03ea86a3e312de4242115554d2188891719bcd3a20d8e4504b03319ba6993\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../GlobalCoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceRelay.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGovernance {\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\\\n */\\\\n function globalProposalRelayed(uint256 _round) external view returns (bool) {\\\\n return vote[0][_round].status != VoteStatus.Pending;\\\\n }\\\\n\\\\n /**\\\\n * @dev Relays voted global proposal.\\\\n *\\\\n * Requirements:\\\\n * - The relay proposal is finalized.\\\\n *\\\\n */\\\\n function _relayGlobalProposal(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures,\\\\n address creator\\\\n ) internal {\\\\n Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator);\\\\n _relayVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d168ae3300e07f3b6312c61ea3d6021a12722c7122d9f2f3f782909d47e05d4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceRelay.sol\\\\\\\";\\\\n\\\\nabstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Relays voted proposal.\\\\n *\\\\n * Requirements:\\\\n * - The relay proposal is finalized.\\\\n *\\\\n */\\\\n function _relayProposal(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n address _creator\\\\n ) internal {\\\\n _proposeProposalStruct(_proposal, _creator);\\\\n _relayVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x050da96d4079cfb515a09ee8a61d5b6c782adf4559b2c66b618bd51f41ca1cd4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallback.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManagerCallback\\\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\\\n */\\\\ninterface IBridgeManagerCallback is IERC165 {\\\\n /**\\\\n * @dev Handles the event when bridge operators are added.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\\\n\\\\n /**\\\\n * @dev Handles the event when bridge operators are removed.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerCallbackRegister {\\\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\\\n\\\\n event CallbackRegistered(address, bool);\\\\n /**\\\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\\\n */\\\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\\\n\\\\n /**\\\\n * @dev Retrieves the addresses of registered callbacks.\\\\n * @return registers An array containing the addresses of registered callbacks.\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers);\\\\n\\\\n /**\\\\n * @dev Registers multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external;\\\\n\\\\n /**\\\\n * @dev Unregisters multiple callbacks from the bridge.\\\\n * @param registers The array of callback addresses to unregister.\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/ChainTypeConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface ChainTypeConsumer {\\\\n enum ChainType {\\\\n RoninChain,\\\\n Mainchain\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/SignatureConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface SignatureConsumer {\\\\n struct Signature {\\\\n uint8 v;\\\\n bytes32 r;\\\\n bytes32 s;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/VoteStatusConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface VoteStatusConsumer {\\\\n enum VoteStatus {\\\\n Pending,\\\\n Approved,\\\\n Executed,\\\\n Rejected,\\\\n Expired\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/Ballot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\n\\\\nlibrary Ballot {\\\\n using ECDSA for bytes32;\\\\n\\\\n enum VoteType {\\\\n For,\\\\n Against\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Ballot(bytes32 proposalHash,uint8 support)\\\\\\\");\\\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\\\n\\\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, BALLOT_TYPEHASH)\\\\n mstore(add(ptr, 0x20), _proposalHash)\\\\n mstore(add(ptr, 0x40), _support)\\\\n digest := keccak256(ptr, 0x60)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/GlobalProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./Proposal.sol\\\\\\\";\\\\n\\\\nlibrary GlobalProposal {\\\\n /**\\\\n * @dev Error thrown when attempting to interact with an unsupported target.\\\\n */\\\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\\\n\\\\n enum TargetOption {\\\\n BridgeManager, // 0\\\\n GatewayContract, // 1\\\\n BridgeReward, // 2\\\\n BridgeSlash, // 3\\\\n BridgeTracking, // 4\\\\n PauseEnforcer // 5\\\\n\\\\n }\\\\n\\\\n struct GlobalProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n uint256 expiryTimestamp;\\\\n address executor;\\\\n TargetOption[] targetOptions;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = self.values;\\\\n TargetOption[] memory targets = self.targetOptions;\\\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\\\n uint256[] memory gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length;) {\\\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\\\n\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * proposal.nonce,\\\\n * proposal.expiryTimestamp,\\\\n * proposal.executor,\\\\n * targetsHash,\\\\n * valuesHash,\\\\n * calldatasHash,\\\\n * gasAmountsHash\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0x80), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x100)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts into the normal proposal.\\\\n */\\\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\\\n detail_.nonce = self.nonce;\\\\n detail_.chainId = 0;\\\\n detail_.expiryTimestamp = self.expiryTimestamp;\\\\n detail_.executor = self.executor;\\\\n\\\\n detail_.targets = new address[](self.targetOptions.length);\\\\n detail_.values = self.values;\\\\n detail_.calldatas = self.calldatas;\\\\n detail_.gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\\\n detail_.targets[i] = targets[i];\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Proposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nlibrary Proposal {\\\\n /**\\\\n * @dev Error thrown when there is insufficient gas to execute a function.\\\\n */\\\\n error ErrInsufficientGas(bytes32 proposalHash);\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\\\n */\\\\n error ErrInvalidExpiryTimestamp();\\\\n\\\\n /**\\\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\\n */\\\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\\\n\\\\n struct ProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n // Value 0: all chain should run this proposal\\\\n // Other values: only specific chain has to execute\\\\n uint256 chainId;\\\\n uint256 expiryTimestamp;\\\\n // The address that execute the proposal after the proposal passes.\\\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\\\n address executor;\\\\n address[] targets;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\\\n\\\\n /**\\\\n * @dev Validates the proposal.\\\\n */\\\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\\\n if (\\\\n !(\\\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\\\n && proposal.targets.length == proposal.gasAmounts.length\\\\n )\\\\n ) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\\\n revert ErrInvalidExpiryTimestamp();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = proposal.values;\\\\n address[] memory targets = proposal.targets;\\\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length; ++i) {\\\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\\\n }\\\\n\\\\n // return\\\\n // keccak256(\\\\n // abi.encode(\\\\n // TYPE_HASH,\\\\n // proposal.nonce,\\\\n // proposal.chainId,\\\\n // proposal.expiryTimestamp\\\\n // proposal.executor\\\\n // targetsHash,\\\\n // valuesHash,\\\\n // calldatasHash,\\\\n // gasAmountsHash\\\\n // )\\\\n // );\\\\n // /\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0x100), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x120)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\\\n */\\\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\\\n return proposal.executor == address(0);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is executable for the current chain.\\\\n *\\\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\\\n *\\\\n */\\\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal.\\\\n */\\\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\\\n\\\\n successCalls = new bool[](proposal.targets.length);\\\\n returnDatas = new bytes[](proposal.targets.length);\\\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\\\n\\\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\\\n\\\\n if (!successCalls[i]) {\\\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/mainchain/MainchainBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { CoreGovernance } from \\\\\\\"../extensions/sequential-governance/CoreGovernance.sol\\\\\\\";\\\\nimport { GlobalCoreGovernance, GlobalGovernanceRelay } from \\\\\\\"../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\\\\\";\\\\nimport { GovernanceRelay } from \\\\\\\"../extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\\\\\";\\\\nimport { ContractType, BridgeManager } from \\\\\\\"../extensions/bridge-operator-governance/BridgeManager.sol\\\\\\\";\\\\nimport { Ballot } from \\\\\\\"../libraries/Ballot.sol\\\\\\\";\\\\nimport { Proposal } from \\\\\\\"../libraries/Proposal.sol\\\\\\\";\\\\nimport { GlobalProposal } from \\\\\\\"../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\ncontract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGovernanceRelay {\\\\n uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255;\\\\n\\\\n function initialize(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights,\\\\n GlobalProposal.TargetOption[] memory targetOptions,\\\\n address[] memory targets\\\\n ) external initializer {\\\\n __CoreGovernance_init(DEFAULT_EXPIRY_DURATION);\\\\n __GlobalCoreGovernance_init(targetOptions, targets);\\\\n __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceRelay-_relayProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n */\\\\n function relayProposal(\\\\n Proposal.ProposalDetail calldata proposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor {\\\\n _requireExecutor(proposal.executor, msg.sender);\\\\n _relayProposal(proposal, supports_, signatures, msg.sender);\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceRelay-_relayGlobalProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n */\\\\n function relayGlobalProposal(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor {\\\\n _requireExecutor(globalProposal.executor, msg.sender);\\\\n _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender });\\\\n }\\\\n\\\\n function _requireExecutor(address executor, address caller) internal pure {\\\\n if (executor != address(0) && caller != executor) {\\\\n revert ErrNonExecutorCannotRelay(executor, caller);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the minimum vote weight required for governance actions.\\\\n * @return minimumVoteWeight The minimum vote weight required for governance actions.\\\\n */\\\\n function _getMinimumVoteWeight() internal view override returns (uint256) {\\\\n return minimumVoteWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the expiry duration for a new proposal.\\\\n */\\\\n function getProposalExpiryDuration() external view returns (uint256) {\\\\n return _proposalExpiryDuration;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the total weights of all governors.\\\\n * @return totalWeights The total weights of all governors combined.\\\\n */\\\\n function _getTotalWeight() internal view override returns (uint256) {\\\\n return getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of weights for a given array of governors.\\\\n * @param governors An array containing the addresses of governors to calculate the sum of weights.\\\\n * @return sumWeights The sum of weights for the provided governors.\\\\n */\\\\n function _sumWeight(address[] memory governors) internal view override returns (uint256) {\\\\n return _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the chain type of the contract.\\\\n * @return chainType The chain type, indicating the type of the chain the contract operates on (e.g., Mainchain).\\\\n */\\\\n function _getChainType() internal pure override returns (ChainType) {\\\\n return ChainType.Mainchain;\\\\n }\\\\n\\\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\\\n return DOMAIN_SEPARATOR;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xea177997b7100f310369b8fd530ea48ab823b06a53424c14f150cef723584c02\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/Types.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { LibTUint256Slot } from \\\\\\\"./operations/LibTUint256Slot.sol\\\\\\\";\\\\n\\\\ntype TUint256Slot is bytes32;\\\\n\\\\nusing {\\\\n LibTUint256Slot.add,\\\\n LibTUint256Slot.sub,\\\\n LibTUint256Slot.mul,\\\\n LibTUint256Slot.div,\\\\n LibTUint256Slot.load,\\\\n LibTUint256Slot.store,\\\\n LibTUint256Slot.addAssign,\\\\n LibTUint256Slot.subAssign,\\\\n LibTUint256Slot.preDecrement,\\\\n LibTUint256Slot.postDecrement,\\\\n LibTUint256Slot.preIncrement,\\\\n LibTUint256Slot.postIncrement\\\\n} for TUint256Slot global;\\\\n\\\",\\\"keccak256\\\":\\\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/operations/LibTUint256Slot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { TUint256Slot } from \\\\\\\"../Types.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title LibTUint256Slot\\\\n * @dev Library for handling unsigned 256-bit integers.\\\\n */\\\\nlibrary LibTUint256Slot {\\\\n /// @dev value is equal to bytes4(keccak256(\\\\\\\"Panic(uint256)\\\\\\\"))\\\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\\\n /// @dev error code for {Arithmetic over/underflow} error\\\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\\\n /// @dev error code for {Division or modulo by 0} error\\\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\\\n\\\\n /**\\\\n * @dev Loads the value of the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @return val The loaded value.\\\\n */\\\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\\\n assembly {\\\\n val := sload(self)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a value into the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to be stored.\\\\n */\\\\n function store(TUint256Slot self, uint256 other) internal {\\\\n assembly {\\\\n sstore(self, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Multiplies the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to multiply by.\\\\n * @return res The resulting value after multiplication.\\\\n */\\\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n if iszero(iszero(storedVal)) {\\\\n res := mul(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if iszero(eq(other, div(res, storedVal))) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Divides the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to divide by.\\\\n * @return res The resulting value after division.\\\\n */\\\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n // revert if divide by zero\\\\n if iszero(other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, DIVISION_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n res := div(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction.\\\\n */\\\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n\\\\n // Underflow check\\\\n if lt(storedVal, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n\\\\n res := sub(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition.\\\\n */\\\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n res := add(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if lt(res, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after incrementing.\\\\n */\\\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = addAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The original value before incrementing.\\\\n */\\\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res + 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after decrementing.\\\\n */\\\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = subAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value before decrementing.\\\\n */\\\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res - 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition and storage.\\\\n */\\\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = add(self, other));\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction and storage.\\\\n */\\\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = sub(self, other));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 0, + "storageLayout": { + "storage": [ + { + "astId": 52029, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 52032, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 69551, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "DOMAIN_SEPARATOR", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 71600, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "round", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 71608, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "vote", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)71538_storage))" + }, + { + "astId": 71610, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_proposalExpiryDuration", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 72332, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "_targetOptionsMap", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_enum(TargetOption)76404,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32", + "base": "t_address" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(TargetOption)76404": { + "encoding": "inplace", + "label": "enum GlobalProposal.TargetOption", + "numberOfBytes": "1" + }, + "t_enum(VoteStatus)75348": { + "encoding": "inplace", + "label": "enum VoteStatusConsumer.VoteStatus", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(Signature)75339_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SignatureConsumer.Signature)", + "numberOfBytes": "32", + "value": "t_struct(Signature)75339_storage" + }, + "t_mapping(t_enum(TargetOption)76404,t_address)": { + "encoding": "mapping", + "key": "t_enum(TargetOption)76404", + "label": "mapping(enum GlobalProposal.TargetOption => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)71538_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(ProposalVote)71538_storage)" + }, + "t_mapping(t_uint256,t_struct(ProposalVote)71538_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", + "numberOfBytes": "32", + "value": "t_struct(ProposalVote)71538_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(ProposalVote)71538_storage": { + "encoding": "inplace", + "label": "struct CoreGovernance.ProposalVote", + "numberOfBytes": "288", + "members": [ + { + "astId": 71514, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(VoteStatus)75348" + }, + { + "astId": 71516, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "hash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 71518, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "againstVoteWeight", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 71520, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "forVoteWeight", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 71523, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "forVoteds", + "offset": 0, + "slot": "4", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 71526, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "againstVoteds", + "offset": 0, + "slot": "5", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 71528, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "expiryTimestamp", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 71533, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "sig", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Signature)75339_storage)" + }, + { + "astId": 71537, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "voted", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ] + }, + "t_struct(Signature)75339_storage": { + "encoding": "inplace", + "label": "struct SignatureConsumer.Signature", + "numberOfBytes": "96", + "members": [ + { + "astId": 75334, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "v", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 75336, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "r", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 75338, + "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", + "label": "s", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + } + ] + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "timestamp": 1722414311, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "round(uint256)": { + "notice": "chain id = 0 for global proposal" + } + }, + "errors": { + "ErrBelowMinRequiredGovernors()": [ + { + "notice": "Error indicating that the governors list will go below minimum number of required governor." + } + ], + "ErrGovernorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying governor" + } + ], + "ErrGovernorNotMatch(address,address)": [ + { + "notice": "Error indicating that the msg.sender is not match the required governor" + } + ], + "ErrInvalidInput()": [ + { + "notice": "Common invalid input error" + } + ], + "ErrOperatorNotFound(address)": [ + { + "notice": "Error indicating that cannot find the querying operator" + } + ] + } + } +} \ No newline at end of file diff --git a/deployments/ethereum/MainchainBridgeManagerProxy.json b/deployments/ethereum/MainchainBridgeManagerProxy.json new file mode 100644 index 00000000..638a79c8 --- /dev/null +++ b/deployments/ethereum/MainchainBridgeManagerProxy.json @@ -0,0 +1,54 @@ +{ + "abi": "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"logic\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"payable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"functionDelegateCall\",\"inputs\":[{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", + "absolutePath": "TransparentProxyV2.sol:TransparentProxyV2", + "address": "0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB", + "ast": "", + "blockNumber": 20425324, + "bytecode": "\"0x608060405260405162000f0b38038062000f0b83398101604081905262000026916200042a565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200055d565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000ec4833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000ee4602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000ec48339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b6060600080856001600160a01b031685604051620002bc91906200050a565b600060405180830381855af49150503d8060008114620002f9576040519150601f19603f3d011682016040523d82523d6000602084013e620002fe565b606091505b50909250905062000312868383876200031c565b9695505050505050565b606083156200039057825160000362000388576001600160a01b0385163b620003885760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001ca565b50816200039c565b6200039c8383620003a4565b949350505050565b815115620003b55781518083602001fd5b8060405162461bcd60e51b8152600401620001ca919062000528565b80516001600160a01b0381168114620003e957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200042157818101518382015260200162000407565b50506000910152565b6000806000606084860312156200044057600080fd5b6200044b84620003d1565b92506200045b60208501620003d1565b60408501519092506001600160401b03808211156200047957600080fd5b818601915086601f8301126200048e57600080fd5b815181811115620004a357620004a3620003ee565b604051601f8201601f19908116603f01168101908382118183101715620004ce57620004ce620003ee565b81604052828152896020848701011115620004e857600080fd5b620004fb83602083016020880162000404565b80955050505050509250925092565b600082516200051e81846020870162000404565b9190910192915050565b60208152600082518060208401526200054981604085016020870162000404565b601f01601f19169190910160400192915050565b610957806200056d6000396000f3fe6080604052600436106100225760003560e01c80634bb5274a1461003957610031565b366100315761002f61004c565b005b61002f61004c565b61002f6100473660046107a3565b61019e565b6100546101ee565b6001600160a01b031633036101945760606001600160e01b0319600035166364d3180d60e11b810161008f57610088610221565b915061018c565b63587086bd60e11b6001600160e01b03198216016100af57610088610278565b63070d7c6960e41b6001600160e01b03198216016100cf576100886102be565b621eb96f60e61b6001600160e01b03198216016100ee576100886102ef565b63a39f25e560e01b6001600160e01b031982160161010e5761008861032f565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b61019c610343565b565b6101a66101ee565b6001600160a01b031633036101e35760006101bf610353565b9050600080835160208501845af43d6000803e8080156101de573d6000f35b3d6000fd5b6101eb61004c565b50565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b606061022b610362565b600061023a36600481846107d8565b810190610247919061081e565b90506102648160405180602001604052806000815250600061036d565b505060408051602081019091526000815290565b606060008061028a36600481846107d8565b8101906102979190610839565b915091506102a78282600161036d565b604051806020016040528060008152509250505090565b60606102c8610362565b60006102d736600481846107d8565b8101906102e4919061081e565b905061026481610399565b60606102f9610362565b60006103036101ee565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b6060610339610362565b6000610303610353565b61019c61034e610353565b6103ed565b600061035d61040c565b905090565b341561019c57600080fd5b61037683610434565b6000825111806103835750805b15610394576103928383610474565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c26101ee565b604080516001600160a01b03928316815291841660208301520160405180910390a16101eb816104a0565b3660008037600080366000845af43d6000803e8080156101de573d6000f35b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610212565b61043d81610549565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061049983836040518060600160405280602781526020016108fb602791396105dd565b9392505050565b6001600160a01b0381166105055760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610183565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105b65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610183565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610528565b6060600080856001600160a01b0316856040516105fa91906108ab565b600060405180830381855af49150503d8060008114610635576040519150601f19603f3d011682016040523d82523d6000602084013e61063a565b606091505b509150915061064b86838387610655565b9695505050505050565b606083156106c45782516000036106bd576001600160a01b0385163b6106bd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610183565b50816106ce565b6106ce83836106d6565b949350505050565b8151156106e65781518083602001fd5b8060405162461bcd60e51b815260040161018391906108c7565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261072757600080fd5b813567ffffffffffffffff8082111561074257610742610700565b604051601f8301601f19908116603f0116810190828211818310171561076a5761076a610700565b8160405283815286602085880101111561078357600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000602082840312156107b557600080fd5b813567ffffffffffffffff8111156107cc57600080fd5b6106ce84828501610716565b600080858511156107e857600080fd5b838611156107f557600080fd5b5050820193919092039150565b80356001600160a01b038116811461081957600080fd5b919050565b60006020828403121561083057600080fd5b61049982610802565b6000806040838503121561084c57600080fd5b61085583610802565b9150602083013567ffffffffffffffff81111561087157600080fd5b61087d85828601610716565b9150509250929050565b60005b838110156108a257818101518382015260200161088a565b50506000910152565b600082516108bd818460208701610887565b9190910192915050565b60208152600082518060208401526108e6816040850160208701610887565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bac44553846a59211d3bcd5b5983efcf23446ca8bb47d116eaffacae77fd75ef64736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564\"", + "callValue": 0, + "chainId": 1, + "constructorArgs": "0x0000000000000000000000000ac26945032143f6196d4bb5ae03592bfaf822fd000000000000000000000000a62dddcc58e769bcfd2f9a7a61cdf331f18c265000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ac4f896f0700000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007e400000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000007200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000c23f2907bc11848b5d5cedbb835e915d7b760d990000000000000000000000004b3844a29cfa5824f53e2137edb6dc2b54501bea0000000000000000000000004a4217d8751a027d853785824ef40522c512a3fe00000000000000000000000032cb6da260726bb2192c4085b857afd945a215cb000000000000000000000000a91d05b7c6e684f43e8fe0c25b3c4bb1747a2a9e000000000000000000000000e38afbe7738b6ec4280a6bca1176c1c1a928a19c000000000000000000000000e795f18f2f5df5a666994e839b98263dba86c902000000000000000000000000f4682b9263d1ba9bd9db09da125708607d1edd3a000000000000000000000000f0c48b7f020bb61e6a3500abc4b4954bde7a2039000000000000000000000000063105d0e7215b703909a7274fe38393302f3134000000000000000000000000d9d5b3e58fa693b468a20c716793b18a1195380a000000000000000000000000ff30ed09e3ae60d39bce1727ee3292fd76a6face0000000000000000000000008c4ad2dc12adb9ad115e37ee9ad2e00e343edf8500000000000000000000000073f5b22312b7b2b3b1cd179fc62269ab369c82060000000000000000000000005e04dc8156ce222289d52487dbadcb01c8c990f9000000000000000000000000772112c7e5dd4ed663e844e79d77c1569a2e88ce000000000000000000000000ec5c90401f95f8c49b1e133e94f09d85b21d96a4000000000000000000000000332253265e36689d9830e57112cd1aadb1a773f9000000000000000000000000236af2ffdb611b14e3042a982d13eda1627d9c9600000000000000000000000054c8c42f07007d43c3049bef6f10ea68687d43ef00000000000000000000000066225acc78be789c57a11c9a18f051c779d678b5000000000000000000000000564dcb855eb360826f27d1eb9c57cbbe6c76f50f0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000ed3805fb65ff51a99fef4676bdbc97abeca93d11000000000000000000000000e880802580a1fbdef67ace39d1b21c5b2c74f0590000000000000000000000004b18cebeb9797ea594b5977109cc07b21c37e8c3000000000000000000000000a441f1399c8c023798586fbbbcf35f27279638a100000000000000000000000072a69b04b59c36fced19ac54209bef878e84fcbf000000000000000000000000e258f9996723b910712d6e67ada4eafc15f7f101000000000000000000000000020dd9a5e318695a61dda88db7ad077ec306e3e900000000000000000000000060c4b72fc62b3e3a74e283aa9ba20d61dd4d8f1b0000000000000000000000009b0612e43855ef9a7c329ee89653ba45273b550e00000000000000000000000047cfcb64f8ea44d6ea7fab32f13efa2f8e65eec1000000000000000000000000ad23e87306aa3c7b95ee760e86f40f3021e5fa18000000000000000000000000bacb04ea617b3e5eee0e3f6e8fcb5ba886b8395800000000000000000000000077ab649caa7b4b673c9f2cf069900df48114d79d0000000000000000000000000dca20728c8bb7173d3452559f40e95c609157990000000000000000000000000d48adbdc523681c0dee736dbdc4497e02bec2100000000000000000000000005832c3219c1da998e828e1a2406b73dbfc02a70c000000000000000000000000ed448901cc62be10c5525ba19645ddca1fd9da1d0000000000000000000000008d4f4e4ba313c4332e720445d8268e087d5c19b800000000000000000000000058abcbcab52dee942491700cd0db67826bbaa8c60000000000000000000000004620fb95eabdab4bf681d987e116e0aaef1adef2000000000000000000000000c092fa0c772b3c850e676c57d8737bb39084b9ac0000000000000000000000003c583c0c97646a73843ae57b93f33e1995c8dc8000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000200000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af08000000000000000000000000e514d9deb7966c8be0ca922de8a064264ea6bcd400000000000000000000000000000000000000000000000000000000", + "contractName": "TransparentProxyV2", + "deployedBytecode": "\"0x6080604052600436106100225760003560e01c80634bb5274a1461003957610031565b366100315761002f61004c565b005b61002f61004c565b61002f6100473660046107a3565b61019e565b6100546101ee565b6001600160a01b031633036101945760606001600160e01b0319600035166364d3180d60e11b810161008f57610088610221565b915061018c565b63587086bd60e11b6001600160e01b03198216016100af57610088610278565b63070d7c6960e41b6001600160e01b03198216016100cf576100886102be565b621eb96f60e61b6001600160e01b03198216016100ee576100886102ef565b63a39f25e560e01b6001600160e01b031982160161010e5761008861032f565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b61019c610343565b565b6101a66101ee565b6001600160a01b031633036101e35760006101bf610353565b9050600080835160208501845af43d6000803e8080156101de573d6000f35b3d6000fd5b6101eb61004c565b50565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b606061022b610362565b600061023a36600481846107d8565b810190610247919061081e565b90506102648160405180602001604052806000815250600061036d565b505060408051602081019091526000815290565b606060008061028a36600481846107d8565b8101906102979190610839565b915091506102a78282600161036d565b604051806020016040528060008152509250505090565b60606102c8610362565b60006102d736600481846107d8565b8101906102e4919061081e565b905061026481610399565b60606102f9610362565b60006103036101ee565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b6060610339610362565b6000610303610353565b61019c61034e610353565b6103ed565b600061035d61040c565b905090565b341561019c57600080fd5b61037683610434565b6000825111806103835750805b15610394576103928383610474565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103c26101ee565b604080516001600160a01b03928316815291841660208301520160405180910390a16101eb816104a0565b3660008037600080366000845af43d6000803e8080156101de573d6000f35b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610212565b61043d81610549565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061049983836040518060600160405280602781526020016108fb602791396105dd565b9392505050565b6001600160a01b0381166105055760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610183565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6105b65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610183565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610528565b6060600080856001600160a01b0316856040516105fa91906108ab565b600060405180830381855af49150503d8060008114610635576040519150601f19603f3d011682016040523d82523d6000602084013e61063a565b606091505b509150915061064b86838387610655565b9695505050505050565b606083156106c45782516000036106bd576001600160a01b0385163b6106bd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610183565b50816106ce565b6106ce83836106d6565b949350505050565b8151156106e65781518083602001fd5b8060405162461bcd60e51b815260040161018391906108c7565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261072757600080fd5b813567ffffffffffffffff8082111561074257610742610700565b604051601f8301601f19908116603f0116810190828211818310171561076a5761076a610700565b8160405283815286602085880101111561078357600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000602082840312156107b557600080fd5b813567ffffffffffffffff8111156107cc57600080fd5b6106ce84828501610716565b600080858511156107e857600080fd5b838611156107f557600080fd5b5050820193919092039150565b80356001600160a01b038116811461081957600080fd5b919050565b60006020828403121561083057600080fd5b61049982610802565b6000806040838503121561084c57600080fd5b61085583610802565b9150602083013567ffffffffffffffff81111561087157600080fd5b61087d85828601610716565b9150509250929050565b60005b838110156108a257818101518382015260200161088a565b50506000910152565b600082516108bd818460208701610887565b9190910192915050565b60208152600082518060208401526108e6816040850160208701610887565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bac44553846a59211d3bcd5b5983efcf23446ca8bb47d116eaffacae77fd75ef64736f6c63430008170033\"", + "deployer": "0xA62DddCC58E769bCFd2f9A7A61CDF331f18c2650", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the Proxy contract.", + "params": { + "admin": "The address of the admin contract.", + "data": "The initialization data.", + "logic": "The address of the logic contract." + } + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + } + }, + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is changed." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + } + }, + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"logic\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"admin\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"previousAdmin\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newAdmin\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"AdminChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"beacon\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BeaconUpgraded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"implementation\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"Upgraded\\\",\\\"type\\\":\\\"event\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"fallback\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"functionDelegateCall\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"function\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"receive\\\"}],\\\"devdoc\\\":{\\\"events\\\":{\\\"AdminChanged(address,address)\\\":{\\\"details\\\":\\\"Emitted when the admin account has changed.\\\"},\\\"BeaconUpgraded(address)\\\":{\\\"details\\\":\\\"Emitted when the beacon is changed.\\\"},\\\"Upgraded(address)\\\":{\\\"details\\\":\\\"Emitted when the implementation is upgraded.\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"constructor\\\":{\\\"details\\\":\\\"Initializes the Proxy contract.\\\",\\\"params\\\":{\\\"admin\\\":\\\"The address of the admin contract.\\\",\\\"data\\\":\\\"The initialization data.\\\",\\\"logic\\\":\\\"The address of the logic contract.\\\"}},\\\"functionDelegateCall(bytes)\\\":{\\\"details\\\":\\\"Calls a function from the current implementation as specified by `data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"dependencies/@fdk-0.3.1-beta/src/TransparentProxyV2.sol\\\":\\\"TransparentProxyV2\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/interfaces/IERC1967.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\\\n *\\\\n * _Available since v4.8.3._\\\\n */\\\\ninterface IERC1967 {\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is changed.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/IERC1967.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\nabstract contract ERC1967Upgrade is IERC1967 {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\\\n * include them in the ABI so this interface must be used to interact with it.\\\\n */\\\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\\\n function admin() external view returns (address);\\\\n\\\\n function implementation() external view returns (address);\\\\n\\\\n function changeAdmin(address) external;\\\\n\\\\n function upgradeTo(address) external;\\\\n\\\\n function upgradeToAndCall(address, bytes memory) external payable;\\\\n}\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n *\\\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\\\n * implementation.\\\\n *\\\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n *\\\\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\\\n * implementation provides a function with the same selector.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\\\n */\\\\n function _fallback() internal virtual override {\\\\n if (msg.sender == _getAdmin()) {\\\\n bytes memory ret;\\\\n bytes4 selector = msg.sig;\\\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\\\n ret = _dispatchUpgradeTo();\\\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\\\n ret = _dispatchUpgradeToAndCall();\\\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\\\n ret = _dispatchChangeAdmin();\\\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\\\n ret = _dispatchAdmin();\\\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\\\n ret = _dispatchImplementation();\\\\n } else {\\\\n revert(\\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n }\\\\n assembly {\\\\n return(add(ret, 0x20), mload(ret))\\\\n }\\\\n } else {\\\\n super._fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function _dispatchAdmin() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address admin = _getAdmin();\\\\n return abi.encode(admin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function _dispatchImplementation() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address implementation = _implementation();\\\\n return abi.encode(implementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address newAdmin = abi.decode(msg.data[4:], (address));\\\\n _changeAdmin(newAdmin);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n */\\\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address newImplementation = abi.decode(msg.data[4:], (address));\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n */\\\\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\\\n */\\\\n function _requireZeroValue() private {\\\\n require(msg.value == 0);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * Furthermore, `isContract` will also return true if the target contract within\\\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\\\n * which only has an effect at the end of a transaction.\\\\n * ====\\\\n *\\\\n * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(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(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\\\n *\\\\n * _Available since v4.8._\\\\n */\\\\n function verifyCallResultFromTarget(\\\\n address target,\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n if (success) {\\\\n if (returndata.length == 0) {\\\\n // only check isContract if the call was successful and the return data is empty\\\\n // otherwise we already know that it was a contract\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n }\\\\n return returndata;\\\\n } else {\\\\n _revert(returndata, errorMessage);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason or using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n _revert(returndata, errorMessage);\\\\n }\\\\n }\\\\n\\\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\\\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 /// @solidity memory-safe-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\\\",\\\"keccak256\\\":\\\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```solidity\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\\\\n * _Available since v4.9 for `string`, `bytes`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n struct StringSlot {\\\\n string value;\\\\n }\\\\n\\\\n struct BytesSlot {\\\\n bytes value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\\\n */\\\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\\\n */\\\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := store.slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\\\n */\\\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := store.slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/src/TransparentProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { TransparentUpgradeableProxy } from\\\\n \\\\\\\"../dependencies/@openzeppelin-4.9.3/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentProxyV2 is TransparentUpgradeableProxy {\\\\n /**\\\\n * @dev Initializes the Proxy contract.\\\\n * @param logic The address of the logic contract.\\\\n * @param admin The address of the admin contract.\\\\n * @param data The initialization data.\\\\n */\\\\n constructor(address logic, address admin, bytes memory data) payable TransparentUpgradeableProxy(logic, admin, data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory data) public payable ifAdmin {\\\\n address addr = _implementation();\\\\n\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let result := delegatecall(gas(), addr, add(data, 32), mload(data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1a3bc632cc0a6406551f4f5582bb236e702d906411a56cb412e92a785ab911ac\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 1, + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1722414311, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file diff --git a/deployments/ethereum/MainchainGatewayV3Logic.json b/deployments/ethereum/MainchainGatewayV3Logic.json index 24f09fe2..e3459d29 100644 --- a/deployments/ethereum/MainchainGatewayV3Logic.json +++ b/deployments/ethereum/MainchainGatewayV3Logic.json @@ -1,2172 +1,229 @@ { - "address": "0x72E28A9009Ad12dE019BFF418CD210D4bbc3D403", - "abi": [ - { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "ErrContractTypeNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "ErrERC20MintingFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ErrERC721MintingFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ErrEmptyArray", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "uint256", - "name": "actual", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - } - ], - "name": "ErrInvalidChainId", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidInfo", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidOrder", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidPercentage", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidReceipt", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidReceiptKind", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidRequest", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidThreshold", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidTokenStandard", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrLengthMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "ErrQueryForApprovedWithdrawal", - "type": "error" - }, - { - "inputs": [], - "name": "ErrQueryForInsufficientVoteWeight", - "type": "error" - }, - { - "inputs": [], - "name": "ErrQueryForProcessedWithdrawal", - "type": "error" - }, - { - "inputs": [], - "name": "ErrReachedDailyWithdrawalLimit", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "tokenInfo", - "type": "tuple" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "ErrTokenCouldNotTransfer", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "tokenInfo", - "type": "tuple" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "ErrTokenCouldNotTransferFrom", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "enum RoleAccess", - "name": "expectedRole", - "type": "uint8" - } - ], - "name": "ErrUnauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "ErrUnsupportedStandard", - "type": "error" - }, - { - "inputs": [], - "name": "ErrUnsupportedToken", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ErrZeroCodeContract", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "limits", - "type": "uint256[]" - } - ], - "name": "DailyWithdrawalLimitsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "DepositRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "thresholds", - "type": "uint256[]" - } - ], - "name": "HighTierThresholdsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousDenominator", - "type": "uint256" - } - ], - "name": "HighTierVoteWeightThresholdUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "thresholds", - "type": "uint256[]" - } - ], - "name": "LockedThresholdsUpdated", - "type": "event" - }, - { - "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": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousDenominator", - "type": "uint256" - } - ], - "name": "ThresholdUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "mainchainTokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "roninTokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "enum Token.Standard[]", - "name": "standards", - "type": "uint8[]" - } - ], - "name": "TokenMapped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "percentages", - "type": "uint256[]" - } - ], - "name": "UnlockFeePercentagesUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "WithdrawalLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "WithdrawalUnlocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "Withdrew", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IWETH", - "name": "weth", - "type": "address" - } - ], - "name": "WrappedNativeTokenContractUpdated", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WITHDRAWAL_UNLOCKER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_MAX_PERCENTAGE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_voteWeight", - "type": "uint256" - } - ], - "name": "checkHighTierVoteWeightThreshold", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_voteWeight", - "type": "uint256" - } - ], - "name": "checkThreshold", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "dailyWithdrawalLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "depositCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "emergencyPauser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "getContract", - "outputs": [ - { - "internalType": "address", - "name": "contract_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getHighTierVoteWeightThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "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": "address", - "name": "_mainchainToken", - "type": "address" - } - ], - "name": "getRoninToken", - "outputs": [ - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - } - ], - "internalType": "struct MappedTokenConsumer.MappedToken", - "name": "_token", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "num_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "denom_", - "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": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "highTierThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_roleSetter", - "type": "address" - }, - { - "internalType": "contract IWETH", - "name": "_wrappedToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_roninChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_highTierVWNumerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - }, - { - "internalType": "address[][3]", - "name": "_addresses", - "type": "address[][3]" - }, - { - "internalType": "uint256[][4]", - "name": "_thresholds", - "type": "uint256[][4]" - }, - { - "internalType": "enum Token.Standard[]", - "name": "_standards", - "type": "uint8[]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "bridgeManagerContract", - "type": "address" - } - ], - "name": "initializeV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "lastDateSynced", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "lastSyncedWithdrawal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "lockedThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_mainchainTokens", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "_roninTokens", - "type": "address[]" - }, - { - "internalType": "enum Token.Standard[]", - "name": "_standards", - "type": "uint8[]" - } - ], - "name": "mapTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_mainchainTokens", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "_roninTokens", - "type": "address[]" - }, - { - "internalType": "enum Token.Standard[]", - "name": "_standards", - "type": "uint8[]" - }, - { - "internalType": "uint256[][4]", - "name": "_thresholds", - "type": "uint256[][4]" - } - ], - "name": "mapTokensAndThresholds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "minimumVoteWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_quantity", - "type": "uint256" - } - ], - "name": "reachedWithdrawalLimit", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "receiveEther", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "recipientAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Request", - "name": "_request", - "type": "tuple" - } - ], - "name": "requestDepositFor", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roninChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "setContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_limits", - "type": "uint256[]" - } - ], - "name": "setDailyWithdrawalLimits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "setEmergencyPauser", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_thresholds", - "type": "uint256[]" - } - ], - "name": "setHighTierThresholds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - } - ], - "name": "setHighTierVoteWeightThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "_previousNum", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_previousDenom", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_thresholds", - "type": "uint256[]" - } - ], - "name": "setLockedThresholds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - } - ], - "name": "setThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "_previousNum", - "type": "uint256" + "abi": "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"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\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"_MAX_PERCENTAGE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkHighTierVoteWeightThreshold\",\"inputs\":[{\"name\":\"_voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"_voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"dailyWithdrawalLimit\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"emergencyPauser\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getHighTierVoteWeightThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"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\":\"getRoninToken\",\"inputs\":[{\"name\":\"mainchainToken\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"token\",\"type\":\"tuple\",\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num_\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom_\",\"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\":\"highTierThreshold\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_roleSetter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_wrappedToken\",\"type\":\"address\",\"internalType\":\"contract IWETH\"},{\"name\":\"_roninChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_numerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_denominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_addresses\",\"type\":\"address[][3]\",\"internalType\":\"address[][3]\"},{\"name\":\"_thresholds\",\"type\":\"uint256[][4]\",\"internalType\":\"uint256[][4]\"},{\"name\":\"_standards\",\"type\":\"uint8[]\",\"internalType\":\"enum TokenStandard[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"initializeV2\",\"inputs\":[{\"name\":\"bridgeManagerContract\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeV3\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeV4\",\"inputs\":[{\"name\":\"wethUnwrapper_\",\"type\":\"address\",\"internalType\":\"address payable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lastDateSynced\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"lastSyncedWithdrawal\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"lockedThreshold\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mapTokens\",\"inputs\":[{\"name\":\"_mainchainTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_roninTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_standards\",\"type\":\"uint8[]\",\"internalType\":\"enum TokenStandard[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mapTokensAndThresholds\",\"inputs\":[{\"name\":\"_mainchainTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_roninTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_standards\",\"type\":\"uint8[]\",\"internalType\":\"enum TokenStandard[]\"},{\"name\":\"_thresholds\",\"type\":\"uint256[][4]\",\"internalType\":\"uint256[][4]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonce\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onBridgeOperatorsAdded\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"addeds\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onBridgeOperatorsRemoved\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"removeds\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onERC1155BatchReceived\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onERC1155Received\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"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\":\"reachedWithdrawalLimit\",\"inputs\":[{\"name\":\"_token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"receiveEther\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"renounceRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"requestDepositFor\",\"inputs\":[{\"name\":\"_request\",\"type\":\"tuple\",\"internalType\":\"struct Transfer.Request\",\"components\":[{\"name\":\"recipientAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestDepositForBatch\",\"inputs\":[{\"name\":\"_requests\",\"type\":\"tuple[]\",\"internalType\":\"struct Transfer.Request[]\",\"components\":[{\"name\":\"recipientAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"revokeRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"roninChainId\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setDailyWithdrawalLimits\",\"inputs\":[{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_limits\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setEmergencyPauser\",\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setHighTierThresholds\",\"inputs\":[{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_thresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setHighTierVoteWeightThreshold\",\"inputs\":[{\"name\":\"_numerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_denominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"_previousNum\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_previousDenom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setLockedThresholds\",\"inputs\":[{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_thresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnlockFeePercentages\",\"inputs\":[{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_percentages\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWrappedNativeTokenContract\",\"inputs\":[{\"name\":\"_wrappedToken\",\"type\":\"address\",\"internalType\":\"contract IWETH\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"submitWithdrawal\",\"inputs\":[{\"name\":\"_receipt\",\"type\":\"tuple\",\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"_signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[{\"name\":\"_locked\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unlockFeePercentages\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unlockWithdrawal\",\"inputs\":[{\"name\":\"receipt\",\"type\":\"tuple\",\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"wethUnwrapper\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contract WethUnwrapper\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalHash\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalLocked\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"wrappedNativeToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contract IWETH\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DailyWithdrawalLimitsUpdated\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"limits\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DepositRequested\",\"inputs\":[{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"receipt\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"HighTierThresholdsUpdated\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"thresholds\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"HighTierVoteWeightThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"LockedThresholdsUpdated\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"thresholds\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"}],\"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\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TokenMapped\",\"inputs\":[{\"name\":\"mainchainTokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"roninTokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"standards\",\"type\":\"uint8[]\",\"indexed\":false,\"internalType\":\"enum TokenStandard[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnlockFeePercentagesUpdated\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"percentages\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalLocked\",\"inputs\":[{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"receipt\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalUnlocked\",\"inputs\":[{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"receipt\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdrew\",\"inputs\":[{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"receipt\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WrappedNativeTokenContractUpdated\",\"inputs\":[{\"name\":\"weth\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contract IWETH\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrERC1155MintingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrERC20MintingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrERC721MintingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrEmptyArray\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidChainId\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidInfo\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidOrder\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidPercentage\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidReceipt\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidReceiptKind\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidTokenStandard\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrQueryForApprovedWithdrawal\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrQueryForInsufficientVoteWeight\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrQueryForProcessedWithdrawal\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrReachedDailyWithdrawalLimit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrTokenCouldNotTransfer\",\"inputs\":[{\"name\":\"tokenInfo\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrTokenCouldNotTransferFrom\",\"inputs\":[{\"name\":\"tokenInfo\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnexpectedInternalCall\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedContractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"actual\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedStandard\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrUnsupportedToken\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + "absolutePath": "MainchainGatewayV3.sol", + "address": "0xfc274EC92bBb1A1472884558d1B5CaaC6F8220Ee", + "ast": "", + "blockNumber": 20425324, + "bytecode": "\"0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b607154610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60715460ff9081161015620000ec576071805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61563b80620000fe6000396000f3fe6080604052600436106103a65760003560e01c80638f34e347116101e7578063b9c362091161010d578063d64af2a6116100a0578063e400327c1161006f578063e400327c14610b2f578063e6a4561814610b4f578063e75235b814610b62578063f23a6e6114610b7a576103b5565b8063d64af2a614610aaf578063dafae40814610acf578063de981f1b14610aef578063dff525e114610b0f576103b5565b8063cdb67444116100dc578063cdb6744414610a1d578063d19773d214610a35578063d547741f14610a62578063d55ed10314610a82576103b5565b8063b9c3620914610991578063bc197c81146109b1578063c48549de146109dd578063ca15c873146109fd576103b5565b8063a217fddf11610185578063affed0e011610154578063affed0e014610901578063b1a2567e14610917578063b1d08a0314610937578063b297579414610964576103b5565b8063a217fddf1461089f578063a3912ec8146103b3578063ab796566146108b4578063ac78dfe8146108e1576103b5565b80639157921c116101c15780639157921c1461080a57806391d148541461082a57806393c5678f1461084a5780639dcc4da31461086a576103b5565b80638f34e347146107895780638f851d8a146107bd5780639010d07c146107ea576103b5565b806338e454b1116102cc578063504af48c1161026a5780636c1ce670116102395780636c1ce6701461071f5780637de5dedd1461073f5780638456cb5914610754578063865e6fd314610769576103b5565b8063504af48c1461069a57806359122f6b146106ad5780635c975abb146106da5780636932be98146106f2576103b5565b80634b14557e116102a65780634b14557e146106175780634d0d66731461062a5780634d493f4e1461064a5780634f4247a11461067a576103b5565b806338e454b1146105cd5780633e70838b146105e25780633f4ba83a14610602576103b5565b80631d4a7210116103445780632f2ff15d116103135780632f2ff15d14610561578063302d12db146105815780633644e5151461059857806336568abe146105ad576103b5565b80631d4a7210146104ce578063248a9ca3146104fb57806329b6eca91461052b5780632dfdf0b51461054b576103b5565b806317ce2dd41161038057806317ce2dd41461044a57806317fcb39b1461046e5780631a8e55b01461048e5780631b6e7594146104ae576103b5565b806301ffc9a7146103bd578063065b3adf146103f2578063110a83081461042a576103b5565b366103b5576103b3610ba6565b005b6103b3610ba6565b3480156103c957600080fd5b506103dd6103d83660046141d4565b610bda565b60405190151581526020015b60405180910390f35b3480156103fe57600080fd5b50600554610412906001600160a01b031681565b6040516001600160a01b0390911681526020016103e9565b34801561043657600080fd5b506103b3610445366004614213565b610c20565b34801561045657600080fd5b5061046060755481565b6040519081526020016103e9565b34801561047a57600080fd5b50607454610412906001600160a01b031681565b34801561049a57600080fd5b506103b36104a9366004614274565b610cc5565b3480156104ba57600080fd5b506103b36104c93660046142df565b610d01565b3480156104da57600080fd5b506104606104e9366004614213565b603e6020526000908152604090205481565b34801561050757600080fd5b50610460610516366004614383565b60009081526072602052604090206001015490565b34801561053757600080fd5b506103b3610546366004614213565b610d41565b34801561055757600080fd5b5061046060765481565b34801561056d57600080fd5b506103b361057c36600461439c565b610dca565b34801561058d57600080fd5b50610460620f424081565b3480156105a457600080fd5b50607754610460565b3480156105b957600080fd5b506103b36105c836600461439c565b610df4565b3480156105d957600080fd5b506103b3610e72565b3480156105ee57600080fd5b506103b36105fd366004614213565b61104f565b34801561060e57600080fd5b506103b3611079565b6103b36106253660046143cc565b611089565b34801561063657600080fd5b506103dd6106453660046143f7565b6110ac565b34801561065657600080fd5b506103dd610665366004614383565b607a6020526000908152604090205460ff1681565b34801561068657600080fd5b50607f54610412906001600160a01b031681565b6103b36106a83660046144a1565b61111c565b3480156106b957600080fd5b506104606106c8366004614213565b603a6020526000908152604090205481565b3480156106e657600080fd5b5060005460ff166103dd565b3480156106fe57600080fd5b5061046061070d366004614383565b60796020526000908152604090205481565b34801561072b57600080fd5b506103dd61073a36600461457b565b6113e2565b34801561074b57600080fd5b506104606113ee565b34801561076057600080fd5b506103b361140f565b34801561077557600080fd5b506103b36107843660046145b6565b61141f565b34801561079557600080fd5b506104607f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107c957600080fd5b506107dd6107d8366004614681565b61143a565b6040516103e99190614778565b3480156107f657600080fd5b5061041261080536600461478d565b6115bc565b34801561081657600080fd5b506103b36108253660046147af565b6115d4565b34801561083657600080fd5b506103dd61084536600461439c565b611858565b34801561085657600080fd5b506103b3610865366004614274565b611883565b34801561087657600080fd5b5061088a61088536600461478d565b6118b9565b604080519283526020830191909152016103e9565b3480156108ab57600080fd5b50610460600081565b3480156108c057600080fd5b506104606108cf366004614213565b603c6020526000908152604090205481565b3480156108ed57600080fd5b506103dd6108fc366004614383565b6118e2565b34801561090d57600080fd5b5061046060045481565b34801561092357600080fd5b506103b3610932366004614274565b611918565b34801561094357600080fd5b50610460610952366004614213565b60396020526000908152604090205481565b34801561097057600080fd5b5061098461097f366004614213565b61194e565b6040516103e991906147f6565b34801561099d57600080fd5b506103b36109ac36600461478d565b6119f1565b3480156109bd57600080fd5b506107dd6109cc3660046148f9565b63bc197c8160e01b95945050505050565b3480156109e957600080fd5b506107dd6109f8366004614274565b611a0b565b348015610a0957600080fd5b50610460610a18366004614383565b611b9f565b348015610a2957600080fd5b5060375460385461088a565b348015610a4157600080fd5b50610460610a50366004614213565b603b6020526000908152604090205481565b348015610a6e57600080fd5b506103b3610a7d36600461439c565b611bb6565b348015610a8e57600080fd5b50610460610a9d366004614213565b603d6020526000908152604090205481565b348015610abb57600080fd5b506103b3610aca366004614213565b611bdb565b348015610adb57600080fd5b506103dd610aea366004614383565b611bec565b348015610afb57600080fd5b50610412610b0a3660046149a6565b611c1a565b348015610b1b57600080fd5b506103b3610b2a3660046149c1565b611c90565b348015610b3b57600080fd5b506103b3610b4a366004614274565b611d05565b6103b3610b5d366004614a7e565b611d3b565b348015610b6e57600080fd5b5060015460025461088a565b348015610b8657600080fd5b506107dd610b95366004614af2565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bc95750607f546001600160a01b031633145b15610bd057565b610bd8611d82565b565b60006001600160e01b03198216631dcdd2c760e31b1480610c0b57506001600160e01b031982166312c0151560e21b145b80610c1a5750610c1a82611dac565b92915050565b607154600490610100900460ff16158015610c42575060715460ff8083169116105b610c675760405162461bcd60e51b8152600401610c5e90614b5a565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff19909316831717169091556040519081526000805160206155e6833981519152906020015b60405180910390a15050565b610ccd611dd1565b6000839003610cef576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484611e2b565b50505050565b610d09611dd1565b6000859003610d2b576040516316ee9d3b60e11b815260040160405180910390fd5b610d39868686868686611f00565b505050505050565b607154600290610100900460ff16158015610d63575060715460ff8083169116105b610d7f5760405162461bcd60e51b8152600401610c5e90614b5a565b6071805461ffff191660ff831617610100179055610d9e600b836120a8565b6071805461ff001916905560405160ff821681526000805160206155e683398151915290602001610cb9565b600082815260726020526040902060010154610de58161214c565b610def8383612156565b505050565b6001600160a01b0381163314610e645760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c5e565b610e6e8282612178565b5050565b607154600390610100900460ff16158015610e94575060715460ff8083169116105b610eb05760405162461bcd60e51b8152600401610c5e90614b5a565b6071805461ffff191660ff8316176101001790556000610ed0600b611c1a565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610f13573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f3b9190810190614c25565b92509250506000805b8351811015610ff857828181518110610f5f57610f5f614d0b565b6020026020010151607e6000868481518110610f7d57610f7d614d0b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fdb57610fdb614d0b565b602002602001015182610fee9190614d37565b9150600101610f44565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff821681526000805160206155e6833981519152906020015b60405180910390a150565b611057611dd1565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61108161219a565b610bd8612209565b61109161225b565b6110a96110a336839003830183614da7565b336122a1565b50565b60006110b661225b565b611112848484808060200260200160405190810160405280939291908181526020016000905b82821015611108576110f960608302860136819003810190614dfa565b815260200190600101906110dc565b505050505061257c565b90505b9392505050565b607154610100900460ff161580801561113c5750607154600160ff909116105b806111565750303b158015611156575060715460ff166001145b6111725760405162461bcd60e51b8152600401610c5e90614b5a565b6071805460ff191660011790558015611195576071805461ff0019166101001790555b6111a060008c612a10565b60758990556111ae8a612a1a565b6112396040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112438887612a68565b61124d8787612af8565b5050611257612b8f565b60006112638680614e44565b905011156113245761128c6112788680614e44565b6112856020890189614e44565b8787611f00565b6112b26112998680614e44565b8660005b6020028101906112ad9190614e44565b612bdc565b6112d86112bf8680614e44565b8660015b6020028101906112d39190614e44565b611e2b565b6112fe6112e58680614e44565b8660025b6020028101906112f99190614e44565b612cb1565b61132461130b8680614e44565b8660035b60200281019061131f9190614e44565b612dc2565b60005b6113346040870187614e44565b90508110156113a0576113987f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461136e6040890189614e44565b8481811061137e5761137e614d0b565b90506020020160208101906113939190614213565b612156565b600101611327565b5080156113d5576071805461ff0019169055604051600181526000805160206155e68339815191529060200160405180910390a15b5050505050505050505050565b60006111158383612e97565b600061140a611405607d546001600160601b031690565b612f62565b905090565b61141761219a565b610bd8612f98565b611427611dd1565b61143081612fd5565b610e6e82826120a8565b6000600b6114478161300b565b82518690811415806114595750808514155b15611485576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b8060000361149d57506347c28ec560e11b91506115b2565b60005b818110156115a5578481815181106114ba576114ba614d0b565b60200260200101511561159d578686828181106114d9576114d9614d0b565b90506020020160208101906114ee9190614e8d565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061152557611525614d0b565b905060200201602081019061153a9190614e8d565b607e60008b8b8581811061155057611550614d0b565b90506020020160208101906115659190614213565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b6001016114a0565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206111159083613057565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115fe8161214c565b600061161761161236859003850185614f07565b613063565b905061162b61161236859003850185614f07565b83356000908152607960205260409020541461165a5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661168b5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116d59083908690614fda565b60405180910390a160006116ef6080850160608601614213565b9050600061170561012086016101008701615060565b6002811115611716576117166147cc565b036117dd576000611730368690038601610100870161507b565b6001600160a01b0383166000908152603b602052604090205490915061175c906101408701359061312d565b60408201526000611776368790038701610100880161507b565b604083015190915061178d90610140880135615097565b60408201526074546117ad908390339086906001600160a01b0316613147565b6117d66117c06060880160408901614213565b60745483919086906001600160a01b0316613147565b5050611819565b6118196117f06060860160408701614213565b60745483906001600160a01b03166118113689900389016101008a0161507b565b929190613147565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161184a929190614fda565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61188b611dd1565b60008390036118ad576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612bdc565b6000806118c4611dd1565b6118ce8484612af8565b90925090506118db612b8f565b9250929050565b60006118f6607d546001600160601b031690565b60375461190391906150aa565b60385461191090846150aa565b101592915050565b611920611dd1565b6000839003611942576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612cb1565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561199c5761199c6147cc565b60028111156119ad576119ad6147cc565b815290546001600160a01b03610100909104811660209283015290820151919250166119ec57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119f9611dd1565b611a038282612a68565b610e6e612b8f565b6000600b611a188161300b565b84838114611a47576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b80600003611a5f5750636242a4ef60e11b9150611b96565b6000805b82811015611b4657868682818110611a7d57611a7d614d0b565b9050602002016020810190611a9291906150c1565b15611b3e57607e60008a8a84818110611aad57611aad614d0b565b9050602002016020810190611ac29190614213565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611b0157611b01614d0b565b9050602002016020810190611b169190614213565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a63565b50607d8054829190600090611b659084906001600160601b03166150de565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610c1a90613379565b600082815260726020526040902060010154611bd18161214c565b610def8383612178565b611be3611dd1565b6110a981612a1a565b6000611c00607d546001600160601b031690565b600154611c0d91906150aa565b60025461191090846150aa565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c5157611c516147cc565b60ff1681526020810191909152604001600020546001600160a01b03169050806119ec578160405163409140df60e11b8152600401610c5e919061510e565b611c98611dd1565b6000869003611cba576040516316ee9d3b60e11b815260040160405180910390fd5b611cc8878787878787611f00565b611cd5878783600061129d565b611ce287878360016112c3565b611cef87878360026112e9565b611cfc878783600361130f565b50505050505050565b611d0d611dd1565b6000839003611d2f576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612dc2565b611d4361225b565b8060005b81811015610cfb57611d7a848483818110611d6457611d64614d0b565b905060a002018036038101906110a39190614da7565b600101611d47565b611d8a61225b565b611d92614193565b3381526040808201513491015280516110a99082906122a1565b60006001600160e01b03198216630271189760e51b1480610c1a5750610c1a82613383565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bd8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c5e92919061511c565b828114611e59576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015611eca57828282818110611e7657611e76614d0b565b90506020020135603a6000878785818110611e9357611e93614d0b565b9050602002016020810190611ea89190614213565b6001600160a01b03168152602081019190915260400160002055600101611e5c565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161184a9493929190615193565b8483148015611f0e57508481145b611f39576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b8581101561205e57848482818110611f5657611f56614d0b565b9050602002016020810190611f6b9190614213565b60786000898985818110611f8157611f81614d0b565b9050602002016020810190611f969190614213565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611fde57611fde614d0b565b9050602002016020810190611ff39190615060565b6078600089898581811061200957612009614d0b565b905060200201602081019061201e9190614213565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115612051576120516147cc565b0217905550600101611f3c565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444868686868686604051612098969594939291906151df565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156120de576120de6147cc565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561211f5761211f6147cc565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6110a981336133a8565b612160828261340c565b6000828152607360205260409020610def9082613492565b61218282826134a7565b6000828152607360205260409020610def908261350e565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806121dc57506005546001600160a01b031633145b610bd8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c5e92919061511c565b612211613523565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bd85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c5e565b604080518082018252600080825260208201526074549184015190916001600160a01b0316906122d09061356c565b60208401516001600160a01b031661237157348460400151604001511461230a5760405163129c2ce160e31b815260040160405180910390fd5b6123138161194e565b604085015151909250600281111561232d5761232d6147cc565b82516002811115612340576123406147cc565b1461235d5760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152612509565b34156123905760405163129c2ce160e31b815260040160405180910390fd5b61239d846020015161194e565b60408501515190925060028111156123b7576123b76147cc565b825160028111156123ca576123ca6147cc565b146123e75760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516123fc9185906135b0565b83602001516001600160a01b0316816001600160a01b03160361250957607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249b9190615250565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124d69160040190815260200190565b600060405180830381600087803b1580156124f057600080fd5b505af1158015612504573d6000803e3d6000fd5b505050505b607680546000918261251a8361526d565b9190505590506000612541858386602001516075548a61372990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61256d82613063565b826040516120989291906152a6565b60008235610140840135826125976080870160608801614213565b90506125b46125af368890038801610100890161507b565b61356c565b60016125c66040880160208901615342565b60018111156125d7576125d76147cc565b146125f55760405163182f3d8760e11b815260040160405180910390fd5b608086013546146126375760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c5e565b600061264c61097f6080890160608a01614213565b905061266061012088016101008901615060565b6002811115612671576126716147cc565b81516002811115612684576126846147cc565b1480156126b5575061269c60e0880160c08901614213565b6001600160a01b031681602001516001600160a01b0316145b80156126c6575060755460e0880135145b6126e35760405163f4b8742f60e01b815260040160405180910390fd5b6000848152607960205260409020541561271057604051634f13df6160e01b815260040160405180910390fd5b600161272461012089016101008a01615060565b6002811115612735576127356147cc565b148061274857506127468284612e97565b155b6127655760405163c51297b760e01b815260040160405180910390fd5b6000612779611612368a90038a018a614f07565b90506000612789607754836137fe565b905060006127a96127a26101208c016101008d01615060565b868861383f565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156128e7578e81815181106127ee576127ee614d0b565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa158015612852573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061289e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c5e9190614778565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128cd908361535d565b91508682106128df57600195506128e7565b6001016127d3565b508461290657604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612981576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc9061296d9085908d90614fda565b60405180910390a150505050505050610c1a565b61298b85876138cf565b6129ca61299e60608c0160408d01614213565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611811919061507b565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516129fb929190614fda565b60405180910390a15050505050505092915050565b610e6e8282612156565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611044565b80821115612a97576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612b2a576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b9f91906150aa565b603854600154612baf91906150aa565b1115610bd8576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b828114612c0a576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612c7b57828282818110612c2757612c27614d0b565b9050602002013560396000878785818110612c4457612c44614d0b565b9050602002016020810190612c599190614213565b6001600160a01b03168152602081019190915260400160002055600101612c0d565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161184a9493929190615193565b828114612cdf576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612d8c57620f4240838383818110612d0057612d00614d0b565b905060200201351115612d265760405163572d3bd360e11b815260040160405180910390fd5b828282818110612d3857612d38614d0b565b90506020020135603b6000878785818110612d5557612d55614d0b565b9050602002016020810190612d6a9190614213565b6001600160a01b03168152602081019190915260400160002055600101612ce2565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161184a9493929190615193565b828114612df0576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612e6157828282818110612e0d57612e0d614d0b565b90506020020135603c6000878785818110612e2a57612e2a614d0b565b9050602002016020810190612e3f9190614213565b6001600160a01b03168152602081019190915260400160002055600101612df3565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161184a9493929190615193565b6001600160a01b0382166000908152603a60205260408120548210612ebe57506000610c1a565b6000612ecd6201518042615370565b6001600160a01b0385166000908152603e6020526040902054909150811115612f135750506001600160a01b0382166000908152603c6020526040902054811015610c1a565b6001600160a01b0384166000908152603d6020526040902054612f3790849061535d565b6001600160a01b0385166000908152603c602052604090205411159150610c1a9050565b5092915050565b6000600254600160025484600154612f7a91906150aa565b612f84919061535d565b612f8e9190615097565b610c1a9190615370565b612fa061225b565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861223e3390565b806001600160a01b03163b6000036110a957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c5e565b61301481611c1a565b6001600160a01b0316336001600160a01b0316146110a9576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c5e93929190615392565b6000611115838361395f565b6000806130738360400151613989565b905060006130848460600151613989565b905060006130d88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061313d83856150aa565b6111159190615370565b806001600160a01b0316826001600160a01b0316036131f45760408085015190516001600160a01b0385169180156108fc02916000818181858888f193505050506131ef57806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156131cb57600080fd5b505af11580156131df573d6000803e3d6000fd5b50505050506131ef8484846139d1565b610cfb565b600084516002811115613209576132096147cc565b036132cf576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015613255573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327991906153c9565b905084604001518110156132be576132a1833083886040015161329c9190615097565b613a50565b6132be57604051632f739fff60e11b815260040160405180910390fd5b6132c98585856139d1565b50610cfb565b6001845160028111156132e4576132e46147cc565b03613315576132f882848660200151613af5565b6131ef5760405163c8e3a09f60e01b815260040160405180910390fd5b60028451600281111561332a5761332a6147cc565b0361336057613343828486602001518760400151613b1c565b6131ef576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610c1a825490565b60006001600160e01b03198216635a05180f60e01b1480610c1a5750610c1a82613b49565b6133b28282611858565b610e6e576133ca816001600160a01b03166014613b7e565b6133d5836020613b7e565b6040516020016133e6929190615406565b60408051601f198184030181529082905262461bcd60e51b8252610c5e916004016154a7565b6134168282611858565b610e6e5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561344e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611115836001600160a01b038416613d19565b6134b18282611858565b15610e6e5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611115836001600160a01b038416613d68565b60005460ff16610bd85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c5e565b61357581613e5b565b80613584575061358481613e92565b80613593575061359381613eba565b6110a95760405163034992a760e51b815260040160405180910390fd5b6000606081855160028111156135c8576135c86147cc565b036136a35760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b17905291519185169161362f91906154ba565b6000604051808303816000865af19150503d806000811461366c576040519150601f19603f3d011682016040523d82523d6000602084013e613671565b606091505b50909250905081801561369c57508051158061369c57508080602001905181019061369c9190615250565b91506136fc565b6001855160028111156136b8576136b86147cc565b036136cd5761369c8385308860200151613ee3565b6002855160028111156136e2576136e26147cc565b036133605761369c83853088602001518960400151613f91565b816137225784843085604051639d2e4c6760e01b8152600401610c5e94939291906154d6565b5050505050565b6137996040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090611115565b6000806000613856607d546001600160601b031690565b905061386181612f62565b92506000866002811115613877576138776147cc565b036138c6576001600160a01b03851660009081526039602052604090205484106138a7576138a481614045565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138de6201518042615370565b6001600160a01b0384166000908152603e602052604090205490915081111561392d576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061395590849061535d565b9091555050505050565b600082600001828154811061397657613976614d0b565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160028111156139e7576139e76147cc565b03613a02576139fb8284866040015161405d565b9050613a2c565b600184516002811115613a1757613a176147cc565b03613360576139fb8230858760200151613ee3565b80610cfb578383836040516341bd7d9160e11b8152600401610c5e9392919061550c565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613aa8916154ba565b6000604051808303816000865af19150503d8060008114613ae5576040519150601f19603f3d011682016040523d82523d6000602084013e613aea565b606091505b509095945050505050565b6000613b0384308585613ee3565b90508061111557613b15848484613a50565b9050611115565b6000613b2b8530868686613f91565b905080613b4157613b3e85858585614130565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610c1a57506301ffc9a760e01b6001600160e01b0319831614610c1a565b60606000613b8d8360026150aa565b613b9890600261535d565b6001600160401b03811115613baf57613baf6145e2565b6040519080825280601f01601f191660200182016040528015613bd9576020820181803683370190505b509050600360fc1b81600081518110613bf457613bf4614d0b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613c2357613c23614d0b565b60200101906001600160f81b031916908160001a9053506000613c478460026150aa565b613c5290600161535d565b90505b6001811115613cca576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c8657613c86614d0b565b1a60f81b828281518110613c9c57613c9c614d0b565b60200101906001600160f81b031916908160001a90535060049490941c93613cc38161553c565b9050613c55565b5083156111155760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c5e565b6000818152600183016020526040812054613d6057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c1a565b506000610c1a565b60008181526001830160205260408120548015613e51576000613d8c600183615097565b8554909150600090613da090600190615097565b9050818114613e05576000866000018281548110613dc057613dc0614d0b565b9060005260206000200154905080876000018481548110613de357613de3614d0b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e1657613e16615553565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c1a565b6000915050610c1a565b60008082516002811115613e7157613e716147cc565b148015613e82575060008260400151115b8015610c1a575050602001511590565b6000600182516002811115613ea957613ea96147cc565b148015610c1a575050604001511590565b6000600282516002811115613ed157613ed16147cc565b148015610c1a57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613f43916154ba565b6000604051808303816000865af19150503d8060008114613f80576040519150601f19603f3d011682016040523d82523d6000602084013e613f85565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613fc190879087908790879060448101615569565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613ff691906154ba565b6000604051808303816000865af19150503d8060008114614033576040519150601f19603f3d011682016040523d82523d6000602084013e614038565b606091505b5090979650505050505050565b6000603854600160385484603754612f7a91906150aa565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916140ba91906154ba565b6000604051808303816000865af19150503d80600081146140f7576040519150601f19603f3d011682016040523d82523d6000602084013e6140fc565b606091505b5090925090508180156141275750805115806141275750808060200190518101906141279190615250565b95945050505050565b604080516000808252602082019092526001600160a01b0386169061415e90869086908690604481016155ae565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613f4391906154ba565b60408051606081018252600080825260208201529081016141cf6040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156141e657600080fd5b81356001600160e01b03198116811461111557600080fd5b6001600160a01b03811681146110a957600080fd5b60006020828403121561422557600080fd5b8135611115816141fe565b60008083601f84011261424257600080fd5b5081356001600160401b0381111561425957600080fd5b6020830191508360208260051b85010111156118db57600080fd5b6000806000806040858703121561428a57600080fd5b84356001600160401b03808211156142a157600080fd5b6142ad88838901614230565b909650945060208701359150808211156142c657600080fd5b506142d387828801614230565b95989497509550505050565b600080600080600080606087890312156142f857600080fd5b86356001600160401b038082111561430f57600080fd5b61431b8a838b01614230565b9098509650602089013591508082111561433457600080fd5b6143408a838b01614230565b9096509450604089013591508082111561435957600080fd5b5061436689828a01614230565b979a9699509497509295939492505050565b80356119ec816141fe565b60006020828403121561439557600080fd5b5035919050565b600080604083850312156143af57600080fd5b8235915060208301356143c1816141fe565b809150509250929050565b600060a082840312156143de57600080fd5b50919050565b600061016082840312156143de57600080fd5b6000806000610180848603121561440d57600080fd5b61441785856143e4565b92506101608401356001600160401b038082111561443457600080fd5b818601915086601f83011261444857600080fd5b81358181111561445757600080fd5b87602060608302850101111561446c57600080fd5b6020830194508093505050509250925092565b8060608101831015610c1a57600080fd5b8060808101831015610c1a57600080fd5b6000806000806000806000806000806101208b8d0312156144c157600080fd5b6144ca8b614378565b99506144d860208c01614378565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b038082111561451057600080fd5b61451c8e838f0161447f565b955060e08d013591508082111561453257600080fd5b61453e8e838f01614490565b94506101008d013591508082111561455557600080fd5b506145628d828e01614230565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561458e57600080fd5b8235614599816141fe565b946020939093013593505050565b8035601081106119ec57600080fd5b600080604083850312156145c957600080fd5b6145d2836145a7565b915060208301356143c1816141fe565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171561461a5761461a6145e2565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614648576146486145e2565b604052919050565b60006001600160401b03821115614669576146696145e2565b5060051b60200190565b80151581146110a957600080fd5b60008060008060006060868803121561469957600080fd5b85356001600160401b03808211156146b057600080fd5b6146bc89838a01614230565b90975095506020915087820135818111156146d657600080fd5b6146e28a828b01614230565b9096509450506040880135818111156146fa57600080fd5b88019050601f8101891361470d57600080fd5b803561472061471b82614650565b614620565b81815260059190911b8201830190838101908b83111561473f57600080fd5b928401925b8284101561476657833561475781614673565b82529284019290840190614744565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b600080604083850312156147a057600080fd5b50508035926020909101359150565b600061016082840312156147c257600080fd5b61111583836143e4565b634e487b7160e01b600052602160045260246000fd5b600381106147f2576147f26147cc565b9052565b60006040820190506148098284516147e2565b6020928301516001600160a01b0316919092015290565b600082601f83011261483157600080fd5b8135602061484161471b83614650565b8083825260208201915060208460051b87010193508684111561486357600080fd5b602086015b8481101561487f5780358352918301918301614868565b509695505050505050565b600082601f83011261489b57600080fd5b81356001600160401b038111156148b4576148b46145e2565b6148c7601f8201601f1916602001614620565b8181528460208386010111156148dc57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561491157600080fd5b853561491c816141fe565b9450602086013561492c816141fe565b935060408601356001600160401b038082111561494857600080fd5b61495489838a01614820565b9450606088013591508082111561496a57600080fd5b61497689838a01614820565b9350608088013591508082111561498c57600080fd5b506149998882890161488a565b9150509295509295909350565b6000602082840312156149b857600080fd5b611115826145a7565b60008060008060008060006080888a0312156149dc57600080fd5b87356001600160401b03808211156149f357600080fd5b6149ff8b838c01614230565b909950975060208a0135915080821115614a1857600080fd5b614a248b838c01614230565b909750955060408a0135915080821115614a3d57600080fd5b614a498b838c01614230565b909550935060608a0135915080821115614a6257600080fd5b50614a6f8a828b01614490565b91505092959891949750929550565b60008060208385031215614a9157600080fd5b82356001600160401b0380821115614aa857600080fd5b818501915085601f830112614abc57600080fd5b813581811115614acb57600080fd5b86602060a083028501011115614ae057600080fd5b60209290920196919550909350505050565b600080600080600060a08688031215614b0a57600080fd5b8535614b15816141fe565b94506020860135614b25816141fe565b9350604086013592506060860135915060808601356001600160401b03811115614b4e57600080fd5b6149998882890161488a565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614bb957600080fd5b81516020614bc961471b83614650565b8083825260208201915060208460051b870101935086841115614beb57600080fd5b602086015b8481101561487f578051614c03816141fe565b8352918301918301614bf0565b6001600160601b03811681146110a957600080fd5b600080600060608486031215614c3a57600080fd5b83516001600160401b0380821115614c5157600080fd5b614c5d87838801614ba8565b9450602091508186015181811115614c7457600080fd5b614c8088828901614ba8565b945050604086015181811115614c9557600080fd5b86019050601f81018713614ca857600080fd5b8051614cb661471b82614650565b81815260059190911b82018301908381019089831115614cd557600080fd5b928401925b82841015614cfc578351614ced81614c10565b82529284019290840190614cda565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612f5b57612f5b614d21565b8035600381106119ec57600080fd5b600060608284031215614d7857600080fd5b614d806145f8565b9050614d8b82614d57565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614db957600080fd5b614dc16145f8565b8235614dcc816141fe565b81526020830135614ddc816141fe565b6020820152614dee8460408501614d66565b60408201529392505050565b600060608284031215614e0c57600080fd5b614e146145f8565b823560ff81168114614e2557600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614e5b57600080fd5b8301803591506001600160401b03821115614e7557600080fd5b6020019150600581901b36038213156118db57600080fd5b600060208284031215614e9f57600080fd5b813561111581614c10565b8035600281106119ec57600080fd5b600060608284031215614ecb57600080fd5b614ed36145f8565b90508135614ee0816141fe565b81526020820135614ef0816141fe565b806020830152506040820135604082015292915050565b60006101608284031215614f1a57600080fd5b60405160a081018181106001600160401b0382111715614f3c57614f3c6145e2565b60405282358152614f4f60208401614eaa565b6020820152614f618460408501614eb9565b6040820152614f738460a08501614eb9565b6060820152614f86846101008501614d66565b60808201529392505050565b600281106147f2576147f26147cc565b8035614fad816141fe565b6001600160a01b039081168352602082013590614fc9826141fe565b166020830152604090810135910152565b60006101808201905083825282356020830152614ff960208401614eaa565b6150066040840182614f92565b506150176060830160408501614fa2565b61502760c0830160a08501614fa2565b61012061504281840161503d6101008701614d57565b6147e2565b61014081850135818501528085013561016085015250509392505050565b60006020828403121561507257600080fd5b61111582614d57565b60006060828403121561508d57600080fd5b6111158383614d66565b81810381811115610c1a57610c1a614d21565b8082028115828204841417610c1a57610c1a614d21565b6000602082840312156150d357600080fd5b813561111581614673565b6001600160601b03828116828216039080821115612f5b57612f5b614d21565b601081106147f2576147f26147cc565b60208101610c1a82846150fe565b6001600160e01b03198316815260408101600b831061513d5761513d6147cc565b8260208301529392505050565b8183526000602080850194508260005b8581101561518857813561516d816141fe565b6001600160a01b03168752958201959082019060010161515a565b509495945050505050565b6040815260006151a760408301868861514a565b82810360208401528381526001600160fb1b038411156151c657600080fd5b8360051b80866020840137016020019695505050505050565b6060815260006151f360608301888a61514a565b6020838203602085015261520882888a61514a565b848103604086015285815286925060200160005b86811015615241576152318261503d86614d57565b928201929082019060010161521c565b509a9950505050505050505050565b60006020828403121561526257600080fd5b815161111581614673565b60006001820161527f5761527f614d21565b5060010190565b6152918282516147e2565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516152cb6040840182614f92565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e0840152604081015161010084015250608083015161533a610120840182615286565b509392505050565b60006020828403121561535457600080fd5b61111582614eaa565b80820180821115610c1a57610c1a614d21565b60008261538d57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016153b060208301856150fe565b6001600160a01b03929092166040919091015292915050565b6000602082840312156153db57600080fd5b5051919050565b60005b838110156153fd5781810151838201526020016153e5565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161543e8160178501602088016153e2565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161546f8160288401602088016153e2565b01602801949350505050565b600081518084526154938160208601602086016153e2565b601f01601f19169290920160200192915050565b602081526000611115602083018461547b565b600082516154cc8184602087016153e2565b9190910192915050565b60c081016154e48287615286565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161551a8286615286565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161554b5761554b614d21565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906155a39083018461547b565b979650505050505050565b60018060a01b03851681528360208201528260408201526080606082015260006155db608083018461547b565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a2646970667358221220adc544fca693cfd23fbe440435aafb94a2ad08c9840546710b0fb29a782fcc0e64736f6c63430008170033\"", + "callValue": 0, + "chainId": 1, + "constructorArgs": "0x", + "contractName": "MainchainGatewayV3", + "deployedBytecode": "\"0x6080604052600436106103a65760003560e01c80638f34e347116101e7578063b9c362091161010d578063d64af2a6116100a0578063e400327c1161006f578063e400327c14610b2f578063e6a4561814610b4f578063e75235b814610b62578063f23a6e6114610b7a576103b5565b8063d64af2a614610aaf578063dafae40814610acf578063de981f1b14610aef578063dff525e114610b0f576103b5565b8063cdb67444116100dc578063cdb6744414610a1d578063d19773d214610a35578063d547741f14610a62578063d55ed10314610a82576103b5565b8063b9c3620914610991578063bc197c81146109b1578063c48549de146109dd578063ca15c873146109fd576103b5565b8063a217fddf11610185578063affed0e011610154578063affed0e014610901578063b1a2567e14610917578063b1d08a0314610937578063b297579414610964576103b5565b8063a217fddf1461089f578063a3912ec8146103b3578063ab796566146108b4578063ac78dfe8146108e1576103b5565b80639157921c116101c15780639157921c1461080a57806391d148541461082a57806393c5678f1461084a5780639dcc4da31461086a576103b5565b80638f34e347146107895780638f851d8a146107bd5780639010d07c146107ea576103b5565b806338e454b1116102cc578063504af48c1161026a5780636c1ce670116102395780636c1ce6701461071f5780637de5dedd1461073f5780638456cb5914610754578063865e6fd314610769576103b5565b8063504af48c1461069a57806359122f6b146106ad5780635c975abb146106da5780636932be98146106f2576103b5565b80634b14557e116102a65780634b14557e146106175780634d0d66731461062a5780634d493f4e1461064a5780634f4247a11461067a576103b5565b806338e454b1146105cd5780633e70838b146105e25780633f4ba83a14610602576103b5565b80631d4a7210116103445780632f2ff15d116103135780632f2ff15d14610561578063302d12db146105815780633644e5151461059857806336568abe146105ad576103b5565b80631d4a7210146104ce578063248a9ca3146104fb57806329b6eca91461052b5780632dfdf0b51461054b576103b5565b806317ce2dd41161038057806317ce2dd41461044a57806317fcb39b1461046e5780631a8e55b01461048e5780631b6e7594146104ae576103b5565b806301ffc9a7146103bd578063065b3adf146103f2578063110a83081461042a576103b5565b366103b5576103b3610ba6565b005b6103b3610ba6565b3480156103c957600080fd5b506103dd6103d83660046141d4565b610bda565b60405190151581526020015b60405180910390f35b3480156103fe57600080fd5b50600554610412906001600160a01b031681565b6040516001600160a01b0390911681526020016103e9565b34801561043657600080fd5b506103b3610445366004614213565b610c20565b34801561045657600080fd5b5061046060755481565b6040519081526020016103e9565b34801561047a57600080fd5b50607454610412906001600160a01b031681565b34801561049a57600080fd5b506103b36104a9366004614274565b610cc5565b3480156104ba57600080fd5b506103b36104c93660046142df565b610d01565b3480156104da57600080fd5b506104606104e9366004614213565b603e6020526000908152604090205481565b34801561050757600080fd5b50610460610516366004614383565b60009081526072602052604090206001015490565b34801561053757600080fd5b506103b3610546366004614213565b610d41565b34801561055757600080fd5b5061046060765481565b34801561056d57600080fd5b506103b361057c36600461439c565b610dca565b34801561058d57600080fd5b50610460620f424081565b3480156105a457600080fd5b50607754610460565b3480156105b957600080fd5b506103b36105c836600461439c565b610df4565b3480156105d957600080fd5b506103b3610e72565b3480156105ee57600080fd5b506103b36105fd366004614213565b61104f565b34801561060e57600080fd5b506103b3611079565b6103b36106253660046143cc565b611089565b34801561063657600080fd5b506103dd6106453660046143f7565b6110ac565b34801561065657600080fd5b506103dd610665366004614383565b607a6020526000908152604090205460ff1681565b34801561068657600080fd5b50607f54610412906001600160a01b031681565b6103b36106a83660046144a1565b61111c565b3480156106b957600080fd5b506104606106c8366004614213565b603a6020526000908152604090205481565b3480156106e657600080fd5b5060005460ff166103dd565b3480156106fe57600080fd5b5061046061070d366004614383565b60796020526000908152604090205481565b34801561072b57600080fd5b506103dd61073a36600461457b565b6113e2565b34801561074b57600080fd5b506104606113ee565b34801561076057600080fd5b506103b361140f565b34801561077557600080fd5b506103b36107843660046145b6565b61141f565b34801561079557600080fd5b506104607f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156107c957600080fd5b506107dd6107d8366004614681565b61143a565b6040516103e99190614778565b3480156107f657600080fd5b5061041261080536600461478d565b6115bc565b34801561081657600080fd5b506103b36108253660046147af565b6115d4565b34801561083657600080fd5b506103dd61084536600461439c565b611858565b34801561085657600080fd5b506103b3610865366004614274565b611883565b34801561087657600080fd5b5061088a61088536600461478d565b6118b9565b604080519283526020830191909152016103e9565b3480156108ab57600080fd5b50610460600081565b3480156108c057600080fd5b506104606108cf366004614213565b603c6020526000908152604090205481565b3480156108ed57600080fd5b506103dd6108fc366004614383565b6118e2565b34801561090d57600080fd5b5061046060045481565b34801561092357600080fd5b506103b3610932366004614274565b611918565b34801561094357600080fd5b50610460610952366004614213565b60396020526000908152604090205481565b34801561097057600080fd5b5061098461097f366004614213565b61194e565b6040516103e991906147f6565b34801561099d57600080fd5b506103b36109ac36600461478d565b6119f1565b3480156109bd57600080fd5b506107dd6109cc3660046148f9565b63bc197c8160e01b95945050505050565b3480156109e957600080fd5b506107dd6109f8366004614274565b611a0b565b348015610a0957600080fd5b50610460610a18366004614383565b611b9f565b348015610a2957600080fd5b5060375460385461088a565b348015610a4157600080fd5b50610460610a50366004614213565b603b6020526000908152604090205481565b348015610a6e57600080fd5b506103b3610a7d36600461439c565b611bb6565b348015610a8e57600080fd5b50610460610a9d366004614213565b603d6020526000908152604090205481565b348015610abb57600080fd5b506103b3610aca366004614213565b611bdb565b348015610adb57600080fd5b506103dd610aea366004614383565b611bec565b348015610afb57600080fd5b50610412610b0a3660046149a6565b611c1a565b348015610b1b57600080fd5b506103b3610b2a3660046149c1565b611c90565b348015610b3b57600080fd5b506103b3610b4a366004614274565b611d05565b6103b3610b5d366004614a7e565b611d3b565b348015610b6e57600080fd5b5060015460025461088a565b348015610b8657600080fd5b506107dd610b95366004614af2565b63f23a6e6160e01b95945050505050565b6074546001600160a01b0316331480610bc95750607f546001600160a01b031633145b15610bd057565b610bd8611d82565b565b60006001600160e01b03198216631dcdd2c760e31b1480610c0b57506001600160e01b031982166312c0151560e21b145b80610c1a5750610c1a82611dac565b92915050565b607154600490610100900460ff16158015610c42575060715460ff8083169116105b610c675760405162461bcd60e51b8152600401610c5e90614b5a565b60405180910390fd5b60718054607f80546001600160a01b0319166001600160a01b03861617905561ff001961010060ff851661ffff19909316831717169091556040519081526000805160206155e6833981519152906020015b60405180910390a15050565b610ccd611dd1565b6000839003610cef576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484611e2b565b50505050565b610d09611dd1565b6000859003610d2b576040516316ee9d3b60e11b815260040160405180910390fd5b610d39868686868686611f00565b505050505050565b607154600290610100900460ff16158015610d63575060715460ff8083169116105b610d7f5760405162461bcd60e51b8152600401610c5e90614b5a565b6071805461ffff191660ff831617610100179055610d9e600b836120a8565b6071805461ff001916905560405160ff821681526000805160206155e683398151915290602001610cb9565b600082815260726020526040902060010154610de58161214c565b610def8383612156565b505050565b6001600160a01b0381163314610e645760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c5e565b610e6e8282612178565b5050565b607154600390610100900460ff16158015610e94575060715460ff8083169116105b610eb05760405162461bcd60e51b8152600401610c5e90614b5a565b6071805461ffff191660ff8316176101001790556000610ed0600b611c1a565b9050600080826001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015610f13573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f3b9190810190614c25565b92509250506000805b8351811015610ff857828181518110610f5f57610f5f614d0b565b6020026020010151607e6000868481518110610f7d57610f7d614d0b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b03160217905550828181518110610fdb57610fdb614d0b565b602002602001015182610fee9190614d37565b9150600101610f44565b50607d80546001600160601b0319166001600160601b039290921691909117905550506071805461ff00191690555060405160ff821681526000805160206155e6833981519152906020015b60405180910390a150565b611057611dd1565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61108161219a565b610bd8612209565b61109161225b565b6110a96110a336839003830183614da7565b336122a1565b50565b60006110b661225b565b611112848484808060200260200160405190810160405280939291908181526020016000905b82821015611108576110f960608302860136819003810190614dfa565b815260200190600101906110dc565b505050505061257c565b90505b9392505050565b607154610100900460ff161580801561113c5750607154600160ff909116105b806111565750303b158015611156575060715460ff166001145b6111725760405162461bcd60e51b8152600401610c5e90614b5a565b6071805460ff191660011790558015611195576071805461ff0019166101001790555b6111a060008c612a10565b60758990556111ae8a612a1a565b6112396040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b6112438887612a68565b61124d8787612af8565b5050611257612b8f565b60006112638680614e44565b905011156113245761128c6112788680614e44565b6112856020890189614e44565b8787611f00565b6112b26112998680614e44565b8660005b6020028101906112ad9190614e44565b612bdc565b6112d86112bf8680614e44565b8660015b6020028101906112d39190614e44565b611e2b565b6112fe6112e58680614e44565b8660025b6020028101906112f99190614e44565b612cb1565b61132461130b8680614e44565b8660035b60200281019061131f9190614e44565b612dc2565b60005b6113346040870187614e44565b90508110156113a0576113987f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461136e6040890189614e44565b8481811061137e5761137e614d0b565b90506020020160208101906113939190614213565b612156565b600101611327565b5080156113d5576071805461ff0019169055604051600181526000805160206155e68339815191529060200160405180910390a15b5050505050505050505050565b60006111158383612e97565b600061140a611405607d546001600160601b031690565b612f62565b905090565b61141761219a565b610bd8612f98565b611427611dd1565b61143081612fd5565b610e6e82826120a8565b6000600b6114478161300b565b82518690811415806114595750808514155b15611485576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b8060000361149d57506347c28ec560e11b91506115b2565b60005b818110156115a5578481815181106114ba576114ba614d0b565b60200260200101511561159d578686828181106114d9576114d9614d0b565b90506020020160208101906114ee9190614e8d565b607d80546001600160601b031981166001600160601b03918216939093011691909117905586868281811061152557611525614d0b565b905060200201602081019061153a9190614e8d565b607e60008b8b8581811061155057611550614d0b565b90506020020160208101906115659190614213565b6001600160a01b03168152602081019190915260400160002080546001600160601b0319166001600160601b03929092169190911790555b6001016114a0565b506347c28ec560e11b9250505b5095945050505050565b60008281526073602052604081206111159083613057565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e46115fe8161214c565b600061161761161236859003850185614f07565b613063565b905061162b61161236859003850185614f07565b83356000908152607960205260409020541461165a5760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff1661168b5760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906116d59083908690614fda565b60405180910390a160006116ef6080850160608601614213565b9050600061170561012086016101008701615060565b6002811115611716576117166147cc565b036117dd576000611730368690038601610100870161507b565b6001600160a01b0383166000908152603b602052604090205490915061175c906101408701359061312d565b60408201526000611776368790038701610100880161507b565b604083015190915061178d90610140880135615097565b60408201526074546117ad908390339086906001600160a01b0316613147565b6117d66117c06060880160408901614213565b60745483919086906001600160a01b0316613147565b5050611819565b6118196117f06060860160408701614213565b60745483906001600160a01b03166118113689900389016101008a0161507b565b929190613147565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161184a929190614fda565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61188b611dd1565b60008390036118ad576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612bdc565b6000806118c4611dd1565b6118ce8484612af8565b90925090506118db612b8f565b9250929050565b60006118f6607d546001600160601b031690565b60375461190391906150aa565b60385461191090846150aa565b101592915050565b611920611dd1565b6000839003611942576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612cb1565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600281111561199c5761199c6147cc565b60028111156119ad576119ad6147cc565b815290546001600160a01b03610100909104811660209283015290820151919250166119ec57604051631b79f53b60e21b815260040160405180910390fd5b919050565b6119f9611dd1565b611a038282612a68565b610e6e612b8f565b6000600b611a188161300b565b84838114611a47576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b80600003611a5f5750636242a4ef60e11b9150611b96565b6000805b82811015611b4657868682818110611a7d57611a7d614d0b565b9050602002016020810190611a9291906150c1565b15611b3e57607e60008a8a84818110611aad57611aad614d0b565b9050602002016020810190611ac29190614213565b6001600160a01b0316815260208101919091526040016000908120546001600160601b03169290920191607e908a8a84818110611b0157611b01614d0b565b9050602002016020810190611b169190614213565b6001600160a01b03168152602081019190915260400160002080546001600160601b03191690555b600101611a63565b50607d8054829190600090611b659084906001600160601b03166150de565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555063c48549de60e01b935050505b50949350505050565b6000818152607360205260408120610c1a90613379565b600082815260726020526040902060010154611bd18161214c565b610def8383612178565b611be3611dd1565b6110a981612a1a565b6000611c00607d546001600160601b031690565b600154611c0d91906150aa565b60025461191090846150aa565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115611c5157611c516147cc565b60ff1681526020810191909152604001600020546001600160a01b03169050806119ec578160405163409140df60e11b8152600401610c5e919061510e565b611c98611dd1565b6000869003611cba576040516316ee9d3b60e11b815260040160405180910390fd5b611cc8878787878787611f00565b611cd5878783600061129d565b611ce287878360016112c3565b611cef87878360026112e9565b611cfc878783600361130f565b50505050505050565b611d0d611dd1565b6000839003611d2f576040516316ee9d3b60e11b815260040160405180910390fd5b610cfb84848484612dc2565b611d4361225b565b8060005b81811015610cfb57611d7a848483818110611d6457611d64614d0b565b905060a002018036038101906110a39190614da7565b600101611d47565b611d8a61225b565b611d92614193565b3381526040808201513491015280516110a99082906122a1565b60006001600160e01b03198216630271189760e51b1480610c1a5750610c1a82613383565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610bd8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c5e92919061511c565b828114611e59576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015611eca57828282818110611e7657611e76614d0b565b90506020020135603a6000878785818110611e9357611e93614d0b565b9050602002016020810190611ea89190614213565b6001600160a01b03168152602081019190915260400160002055600101611e5c565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b58484848460405161184a9493929190615193565b8483148015611f0e57508481145b611f39576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b8581101561205e57848482818110611f5657611f56614d0b565b9050602002016020810190611f6b9190614213565b60786000898985818110611f8157611f81614d0b565b9050602002016020810190611f969190614213565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611fde57611fde614d0b565b9050602002016020810190611ff39190615060565b6078600089898581811061200957612009614d0b565b905060200201602081019061201e9190614213565b6001600160a01b031681526020810191909152604001600020805460ff19166001836002811115612051576120516147cc565b0217905550600101611f3c565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444868686868686604051612098969594939291906151df565b60405180910390a1505050505050565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156120de576120de6147cc565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f81111561211f5761211f6147cc565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6110a981336133a8565b612160828261340c565b6000828152607360205260409020610def9082613492565b61218282826134a7565b6000828152607360205260409020610def908261350e565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806121dc57506005546001600160a01b031633145b610bd8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610c5e92919061511c565b612211613523565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005460ff1615610bd85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c5e565b604080518082018252600080825260208201526074549184015190916001600160a01b0316906122d09061356c565b60208401516001600160a01b031661237157348460400151604001511461230a5760405163129c2ce160e31b815260040160405180910390fd5b6123138161194e565b604085015151909250600281111561232d5761232d6147cc565b82516002811115612340576123406147cc565b1461235d5760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152612509565b34156123905760405163129c2ce160e31b815260040160405180910390fd5b61239d846020015161194e565b60408501515190925060028111156123b7576123b76147cc565b825160028111156123ca576123ca6147cc565b146123e75760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516123fc9185906135b0565b83602001516001600160a01b0316816001600160a01b03160361250957607454607f54604086810151810151905163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b3906044016020604051808303816000875af1158015612477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249b9190615250565b50607f546040808601518101519051636f074d1f60e11b81526001600160a01b039092169163de0e9a3e916124d69160040190815260200190565b600060405180830381600087803b1580156124f057600080fd5b505af1158015612504573d6000803e3d6000fd5b505050505b607680546000918261251a8361526d565b9190505590506000612541858386602001516075548a61372990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61256d82613063565b826040516120989291906152a6565b60008235610140840135826125976080870160608801614213565b90506125b46125af368890038801610100890161507b565b61356c565b60016125c66040880160208901615342565b60018111156125d7576125d76147cc565b146125f55760405163182f3d8760e11b815260040160405180910390fd5b608086013546146126375760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610c5e565b600061264c61097f6080890160608a01614213565b905061266061012088016101008901615060565b6002811115612671576126716147cc565b81516002811115612684576126846147cc565b1480156126b5575061269c60e0880160c08901614213565b6001600160a01b031681602001516001600160a01b0316145b80156126c6575060755460e0880135145b6126e35760405163f4b8742f60e01b815260040160405180910390fd5b6000848152607960205260409020541561271057604051634f13df6160e01b815260040160405180910390fd5b600161272461012089016101008a01615060565b6002811115612735576127356147cc565b148061274857506127468284612e97565b155b6127655760405163c51297b760e01b815260040160405180910390fd5b6000612779611612368a90038a018a614f07565b90506000612789607754836137fe565b905060006127a96127a26101208c016101008d01615060565b868861383f565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156128e7578e81815181106127ee576127ee614d0b565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa158015612852573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061289e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610c5e9190614778565b6001600160a01b0385166000908152607e60205260409020548594506001600160601b03166128cd908361535d565b91508682106128df57600195506128e7565b6001016127d3565b508461290657604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612981576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc9061296d9085908d90614fda565b60405180910390a150505050505050610c1a565b61298b85876138cf565b6129ca61299e60608c0160408d01614213565b86607460009054906101000a90046001600160a01b03168d61010001803603810190611811919061507b565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516129fb929190614fda565b60405180910390a15050505050505092915050565b610e6e8282612156565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf90602001611044565b80821115612a97576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b60008082841115612b2a576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1910160405180910390a49250929050565b600254603754612b9f91906150aa565b603854600154612baf91906150aa565b1115610bd8576000356001600160e01b0319166040516387f6f09560e01b8152600401610c5e9190614778565b828114612c0a576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612c7b57828282818110612c2757612c27614d0b565b9050602002013560396000878785818110612c4457612c44614d0b565b9050602002016020810190612c599190614213565b6001600160a01b03168152602081019190915260400160002055600101612c0d565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc08484848460405161184a9493929190615193565b828114612cdf576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612d8c57620f4240838383818110612d0057612d00614d0b565b905060200201351115612d265760405163572d3bd360e11b815260040160405180910390fd5b828282818110612d3857612d38614d0b565b90506020020135603b6000878785818110612d5557612d55614d0b565b9050602002016020810190612d6a9190614213565b6001600160a01b03168152602081019190915260400160002055600101612ce2565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea508484848460405161184a9493929190615193565b828114612df0576000356001600160e01b0319166040516306b5667560e21b8152600401610c5e9190614778565b60005b83811015612e6157828282818110612e0d57612e0d614d0b565b90506020020135603c6000878785818110612e2a57612e2a614d0b565b9050602002016020810190612e3f9190614213565b6001600160a01b03168152602081019190915260400160002055600101612df3565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb738484848460405161184a9493929190615193565b6001600160a01b0382166000908152603a60205260408120548210612ebe57506000610c1a565b6000612ecd6201518042615370565b6001600160a01b0385166000908152603e6020526040902054909150811115612f135750506001600160a01b0382166000908152603c6020526040902054811015610c1a565b6001600160a01b0384166000908152603d6020526040902054612f3790849061535d565b6001600160a01b0385166000908152603c602052604090205411159150610c1a9050565b5092915050565b6000600254600160025484600154612f7a91906150aa565b612f84919061535d565b612f8e9190615097565b610c1a9190615370565b612fa061225b565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861223e3390565b806001600160a01b03163b6000036110a957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610c5e565b61301481611c1a565b6001600160a01b0316336001600160a01b0316146110a9576000356001600160e01b03191681336040516320e0f98d60e21b8152600401610c5e93929190615392565b6000611115838361395f565b6000806130738360400151613989565b905060006130848460600151613989565b905060006130d88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061313d83856150aa565b6111159190615370565b806001600160a01b0316826001600160a01b0316036131f45760408085015190516001600160a01b0385169180156108fc02916000818181858888f193505050506131ef57806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156131cb57600080fd5b505af11580156131df573d6000803e3d6000fd5b50505050506131ef8484846139d1565b610cfb565b600084516002811115613209576132096147cc565b036132cf576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015613255573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327991906153c9565b905084604001518110156132be576132a1833083886040015161329c9190615097565b613a50565b6132be57604051632f739fff60e11b815260040160405180910390fd5b6132c98585856139d1565b50610cfb565b6001845160028111156132e4576132e46147cc565b03613315576132f882848660200151613af5565b6131ef5760405163c8e3a09f60e01b815260040160405180910390fd5b60028451600281111561332a5761332a6147cc565b0361336057613343828486602001518760400151613b1c565b6131ef576040516334b471a760e21b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b6000610c1a825490565b60006001600160e01b03198216635a05180f60e01b1480610c1a5750610c1a82613b49565b6133b28282611858565b610e6e576133ca816001600160a01b03166014613b7e565b6133d5836020613b7e565b6040516020016133e6929190615406565b60408051601f198184030181529082905262461bcd60e51b8252610c5e916004016154a7565b6134168282611858565b610e6e5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561344e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611115836001600160a01b038416613d19565b6134b18282611858565b15610e6e5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611115836001600160a01b038416613d68565b60005460ff16610bd85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c5e565b61357581613e5b565b80613584575061358481613e92565b80613593575061359381613eba565b6110a95760405163034992a760e51b815260040160405180910390fd5b6000606081855160028111156135c8576135c86147cc565b036136a35760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b17905291519185169161362f91906154ba565b6000604051808303816000865af19150503d806000811461366c576040519150601f19603f3d011682016040523d82523d6000602084013e613671565b606091505b50909250905081801561369c57508051158061369c57508080602001905181019061369c9190615250565b91506136fc565b6001855160028111156136b8576136b86147cc565b036136cd5761369c8385308860200151613ee3565b6002855160028111156136e2576136e26147cc565b036133605761369c83853088602001518960400151613f91565b816137225784843085604051639d2e4c6760e01b8152600401610c5e94939291906154d6565b5050505050565b6137996040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090611115565b6000806000613856607d546001600160601b031690565b905061386181612f62565b92506000866002811115613877576138776147cc565b036138c6576001600160a01b03851660009081526039602052604090205484106138a7576138a481614045565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b60006138de6201518042615370565b6001600160a01b0384166000908152603e602052604090205490915081111561392d576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061395590849061535d565b9091555050505050565b600082600001828154811061397657613976614d0b565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160028111156139e7576139e76147cc565b03613a02576139fb8284866040015161405d565b9050613a2c565b600184516002811115613a1757613a176147cc565b03613360576139fb8230858760200151613ee3565b80610cfb578383836040516341bd7d9160e11b8152600401610c5e9392919061550c565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b1790529151600092861691613aa8916154ba565b6000604051808303816000865af19150503d8060008114613ae5576040519150601f19603f3d011682016040523d82523d6000602084013e613aea565b606091505b509095945050505050565b6000613b0384308585613ee3565b90508061111557613b15848484613a50565b9050611115565b6000613b2b8530868686613f91565b905080613b4157613b3e85858585614130565b90505b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610c1a57506301ffc9a760e01b6001600160e01b0319831614610c1a565b60606000613b8d8360026150aa565b613b9890600261535d565b6001600160401b03811115613baf57613baf6145e2565b6040519080825280601f01601f191660200182016040528015613bd9576020820181803683370190505b509050600360fc1b81600081518110613bf457613bf4614d0b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613c2357613c23614d0b565b60200101906001600160f81b031916908160001a9053506000613c478460026150aa565b613c5290600161535d565b90505b6001811115613cca576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c8657613c86614d0b565b1a60f81b828281518110613c9c57613c9c614d0b565b60200101906001600160f81b031916908160001a90535060049490941c93613cc38161553c565b9050613c55565b5083156111155760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c5e565b6000818152600183016020526040812054613d6057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c1a565b506000610c1a565b60008181526001830160205260408120548015613e51576000613d8c600183615097565b8554909150600090613da090600190615097565b9050818114613e05576000866000018281548110613dc057613dc0614d0b565b9060005260206000200154905080876000018481548110613de357613de3614d0b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e1657613e16615553565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c1a565b6000915050610c1a565b60008082516002811115613e7157613e716147cc565b148015613e82575060008260400151115b8015610c1a575050602001511590565b6000600182516002811115613ea957613ea96147cc565b148015610c1a575050604001511590565b6000600282516002811115613ed157613ed16147cc565b148015610c1a57505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092871691613f43916154ba565b6000604051808303816000865af19150503d8060008114613f80576040519150601f19603f3d011682016040523d82523d6000602084013e613f85565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613fc190879087908790879060448101615569565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b17905251613ff691906154ba565b6000604051808303816000865af19150503d8060008114614033576040519150601f19603f3d011682016040523d82523d6000602084013e614038565b606091505b5090979650505050505050565b6000603854600160385484603754612f7a91906150aa565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092606092908716916140ba91906154ba565b6000604051808303816000865af19150503d80600081146140f7576040519150601f19603f3d011682016040523d82523d6000602084013e6140fc565b606091505b5090925090508180156141275750805115806141275750808060200190518101906141279190615250565b95945050505050565b604080516000808252602082019092526001600160a01b0386169061415e90869086908690604481016155ae565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b17905251613f4391906154ba565b60408051606081018252600080825260208201529081016141cf6040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156141e657600080fd5b81356001600160e01b03198116811461111557600080fd5b6001600160a01b03811681146110a957600080fd5b60006020828403121561422557600080fd5b8135611115816141fe565b60008083601f84011261424257600080fd5b5081356001600160401b0381111561425957600080fd5b6020830191508360208260051b85010111156118db57600080fd5b6000806000806040858703121561428a57600080fd5b84356001600160401b03808211156142a157600080fd5b6142ad88838901614230565b909650945060208701359150808211156142c657600080fd5b506142d387828801614230565b95989497509550505050565b600080600080600080606087890312156142f857600080fd5b86356001600160401b038082111561430f57600080fd5b61431b8a838b01614230565b9098509650602089013591508082111561433457600080fd5b6143408a838b01614230565b9096509450604089013591508082111561435957600080fd5b5061436689828a01614230565b979a9699509497509295939492505050565b80356119ec816141fe565b60006020828403121561439557600080fd5b5035919050565b600080604083850312156143af57600080fd5b8235915060208301356143c1816141fe565b809150509250929050565b600060a082840312156143de57600080fd5b50919050565b600061016082840312156143de57600080fd5b6000806000610180848603121561440d57600080fd5b61441785856143e4565b92506101608401356001600160401b038082111561443457600080fd5b818601915086601f83011261444857600080fd5b81358181111561445757600080fd5b87602060608302850101111561446c57600080fd5b6020830194508093505050509250925092565b8060608101831015610c1a57600080fd5b8060808101831015610c1a57600080fd5b6000806000806000806000806000806101208b8d0312156144c157600080fd5b6144ca8b614378565b99506144d860208c01614378565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01356001600160401b038082111561451057600080fd5b61451c8e838f0161447f565b955060e08d013591508082111561453257600080fd5b61453e8e838f01614490565b94506101008d013591508082111561455557600080fd5b506145628d828e01614230565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561458e57600080fd5b8235614599816141fe565b946020939093013593505050565b8035601081106119ec57600080fd5b600080604083850312156145c957600080fd5b6145d2836145a7565b915060208301356143c1816141fe565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171561461a5761461a6145e2565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614648576146486145e2565b604052919050565b60006001600160401b03821115614669576146696145e2565b5060051b60200190565b80151581146110a957600080fd5b60008060008060006060868803121561469957600080fd5b85356001600160401b03808211156146b057600080fd5b6146bc89838a01614230565b90975095506020915087820135818111156146d657600080fd5b6146e28a828b01614230565b9096509450506040880135818111156146fa57600080fd5b88019050601f8101891361470d57600080fd5b803561472061471b82614650565b614620565b81815260059190911b8201830190838101908b83111561473f57600080fd5b928401925b8284101561476657833561475781614673565b82529284019290840190614744565b80955050505050509295509295909350565b6001600160e01b031991909116815260200190565b600080604083850312156147a057600080fd5b50508035926020909101359150565b600061016082840312156147c257600080fd5b61111583836143e4565b634e487b7160e01b600052602160045260246000fd5b600381106147f2576147f26147cc565b9052565b60006040820190506148098284516147e2565b6020928301516001600160a01b0316919092015290565b600082601f83011261483157600080fd5b8135602061484161471b83614650565b8083825260208201915060208460051b87010193508684111561486357600080fd5b602086015b8481101561487f5780358352918301918301614868565b509695505050505050565b600082601f83011261489b57600080fd5b81356001600160401b038111156148b4576148b46145e2565b6148c7601f8201601f1916602001614620565b8181528460208386010111156148dc57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561491157600080fd5b853561491c816141fe565b9450602086013561492c816141fe565b935060408601356001600160401b038082111561494857600080fd5b61495489838a01614820565b9450606088013591508082111561496a57600080fd5b61497689838a01614820565b9350608088013591508082111561498c57600080fd5b506149998882890161488a565b9150509295509295909350565b6000602082840312156149b857600080fd5b611115826145a7565b60008060008060008060006080888a0312156149dc57600080fd5b87356001600160401b03808211156149f357600080fd5b6149ff8b838c01614230565b909950975060208a0135915080821115614a1857600080fd5b614a248b838c01614230565b909750955060408a0135915080821115614a3d57600080fd5b614a498b838c01614230565b909550935060608a0135915080821115614a6257600080fd5b50614a6f8a828b01614490565b91505092959891949750929550565b60008060208385031215614a9157600080fd5b82356001600160401b0380821115614aa857600080fd5b818501915085601f830112614abc57600080fd5b813581811115614acb57600080fd5b86602060a083028501011115614ae057600080fd5b60209290920196919550909350505050565b600080600080600060a08688031215614b0a57600080fd5b8535614b15816141fe565b94506020860135614b25816141fe565b9350604086013592506060860135915060808601356001600160401b03811115614b4e57600080fd5b6149998882890161488a565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082601f830112614bb957600080fd5b81516020614bc961471b83614650565b8083825260208201915060208460051b870101935086841115614beb57600080fd5b602086015b8481101561487f578051614c03816141fe565b8352918301918301614bf0565b6001600160601b03811681146110a957600080fd5b600080600060608486031215614c3a57600080fd5b83516001600160401b0380821115614c5157600080fd5b614c5d87838801614ba8565b9450602091508186015181811115614c7457600080fd5b614c8088828901614ba8565b945050604086015181811115614c9557600080fd5b86019050601f81018713614ca857600080fd5b8051614cb661471b82614650565b81815260059190911b82018301908381019089831115614cd557600080fd5b928401925b82841015614cfc578351614ced81614c10565b82529284019290840190614cda565b80955050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6001600160601b03818116838216019080821115612f5b57612f5b614d21565b8035600381106119ec57600080fd5b600060608284031215614d7857600080fd5b614d806145f8565b9050614d8b82614d57565b8152602082013560208201526040820135604082015292915050565b600060a08284031215614db957600080fd5b614dc16145f8565b8235614dcc816141fe565b81526020830135614ddc816141fe565b6020820152614dee8460408501614d66565b60408201529392505050565b600060608284031215614e0c57600080fd5b614e146145f8565b823560ff81168114614e2557600080fd5b8152602083810135908201526040928301359281019290925250919050565b6000808335601e19843603018112614e5b57600080fd5b8301803591506001600160401b03821115614e7557600080fd5b6020019150600581901b36038213156118db57600080fd5b600060208284031215614e9f57600080fd5b813561111581614c10565b8035600281106119ec57600080fd5b600060608284031215614ecb57600080fd5b614ed36145f8565b90508135614ee0816141fe565b81526020820135614ef0816141fe565b806020830152506040820135604082015292915050565b60006101608284031215614f1a57600080fd5b60405160a081018181106001600160401b0382111715614f3c57614f3c6145e2565b60405282358152614f4f60208401614eaa565b6020820152614f618460408501614eb9565b6040820152614f738460a08501614eb9565b6060820152614f86846101008501614d66565b60808201529392505050565b600281106147f2576147f26147cc565b8035614fad816141fe565b6001600160a01b039081168352602082013590614fc9826141fe565b166020830152604090810135910152565b60006101808201905083825282356020830152614ff960208401614eaa565b6150066040840182614f92565b506150176060830160408501614fa2565b61502760c0830160a08501614fa2565b61012061504281840161503d6101008701614d57565b6147e2565b61014081850135818501528085013561016085015250509392505050565b60006020828403121561507257600080fd5b61111582614d57565b60006060828403121561508d57600080fd5b6111158383614d66565b81810381811115610c1a57610c1a614d21565b8082028115828204841417610c1a57610c1a614d21565b6000602082840312156150d357600080fd5b813561111581614673565b6001600160601b03828116828216039080821115612f5b57612f5b614d21565b601081106147f2576147f26147cc565b60208101610c1a82846150fe565b6001600160e01b03198316815260408101600b831061513d5761513d6147cc565b8260208301529392505050565b8183526000602080850194508260005b8581101561518857813561516d816141fe565b6001600160a01b03168752958201959082019060010161515a565b509495945050505050565b6040815260006151a760408301868861514a565b82810360208401528381526001600160fb1b038411156151c657600080fd5b8360051b80866020840137016020019695505050505050565b6060815260006151f360608301888a61514a565b6020838203602085015261520882888a61514a565b848103604086015285815286925060200160005b86811015615241576152318261503d86614d57565b928201929082019060010161521c565b509a9950505050505050505050565b60006020828403121561526257600080fd5b815161111581614673565b60006001820161527f5761527f614d21565b5060010190565b6152918282516147e2565b60208181015190830152604090810151910152565b6000610180820190508382528251602083015260208301516152cb6040840182614f92565b5060408381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e0840152604081015161010084015250608083015161533a610120840182615286565b509392505050565b60006020828403121561535457600080fd5b61111582614eaa565b80820180821115610c1a57610c1a614d21565b60008261538d57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031984168152606081016153b060208301856150fe565b6001600160a01b03929092166040919091015292915050565b6000602082840312156153db57600080fd5b5051919050565b60005b838110156153fd5781810151838201526020016153e5565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161543e8160178501602088016153e2565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161546f8160288401602088016153e2565b01602801949350505050565b600081518084526154938160208601602086016153e2565b601f01601f19169290920160200192915050565b602081526000611115602083018461547b565b600082516154cc8184602087016153e2565b9190910192915050565b60c081016154e48287615286565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60a0810161551a8286615286565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161554b5761554b614d21565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906155a39083018461547b565b979650505050505050565b60018060a01b03851681528360208201528260408201526080606082015260006155db608083018461547b565b969550505050505056fe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a2646970667358221220adc544fca693cfd23fbe440435aafb94a2ad08c9840546710b0fb29a782fcc0e64736f6c63430008170033\"", + "deployer": "0xA62DddCC58E769bCFd2f9A7A61CDF331f18c2650", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "Returns the domain seperator." + }, + "checkHighTierVoteWeightThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the high-tier vote weight threshold." + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." }, - { - "internalType": "uint256", - "name": "_previousDenom", - "type": "uint256" + "returns": { + "contract_": "The address of the contract with the specified role." } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" + }, + "getHighTierVoteWeightThreshold()": { + "details": "Returns the high-tier vote weight threshold." + }, + "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." + }, + "getRoninToken(address)": { + "details": "Returns token address on Ronin network. Note: Reverts for unsupported token." + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "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. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])": { + "details": "Initializes contract storage." + }, + "mapTokens(address[],address[],uint8[])": { + "details": "Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." + }, + "mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])": { + "details": "Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "onBridgeOperatorsAdded(address[],uint96[],bool[])": { + "details": "Handles the event when bridge operators are added.", + "params": { + "addeds": "The corresponding boolean values indicating whether the operators were added or not.", + "bridgeOperators": "The addresses of the bridge operators." }, - { - "internalType": "uint256[]", - "name": "_percentages", - "type": "uint256[]" - } - ], - "name": "setUnlockFeePercentages", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IWETH", - "name": "_wrappedToken", - "type": "address" + "returns": { + "_0": "The selector of the function being called." } - ], - "name": "setWrappedNativeTokenContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Receipt", - "name": "_receipt", - "type": "tuple" + }, + "onBridgeOperatorsRemoved(address[],bool[])": { + "details": "Handles the event when bridge operators are removed.", + "params": { + "bridgeOperators": "The addresses of the bridge operators.", + "removeds": "The corresponding boolean values indicating whether the operators were removed or not." }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "_signatures", - "type": "tuple[]" - } - ], - "name": "submitWithdrawal", - "outputs": [ - { - "internalType": "bool", - "name": "_locked", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "unlockFeePercentages", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Receipt", - "name": "_receipt", - "type": "tuple" - } - ], - "name": "unlockWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "withdrawalHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "returns": { + "_0": "The selector of the function being called." } - ], - "name": "withdrawalLocked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + }, + "pause()": { + "details": "Triggers paused state." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "reachedWithdrawalLimit(address,uint256)": { + "details": "Checks whether the withdrawal reaches the limitation." + }, + "receiveEther()": { + "details": "Receives ether without doing anything. Use this function to topup native token." + }, + "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "requestDepositFor((address,address,(uint8,uint256,uint256)))": { + "details": "Locks the assets and request deposit." + }, + "requestDepositForBatch((address,address,(uint8,uint256,uint256))[])": { + "details": "Locks the assets and request deposit for batch." + }, + "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. May emit a {RoleRevoked} event." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." } - ], - "stateMutability": "view", - "type": "function" + }, + "setDailyWithdrawalLimits(address[],uint256[])": { + "details": "Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event." + }, + "setEmergencyPauser(address)": { + "details": "Grant emergency pauser role for `_addr`." + }, + "setHighTierThresholds(address[],uint256[])": { + "details": "Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event." + }, + "setHighTierVoteWeightThreshold(uint256,uint256)": { + "details": "Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event." + }, + "setLockedThresholds(address[],uint256[])": { + "details": "Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event." + }, + "setThreshold(uint256,uint256)": { + "details": "Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold." + }, + "setUnlockFeePercentages(address[],uint256[])": { + "details": "Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event." + }, + "setWrappedNativeTokenContract(address)": { + "details": "Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event." + }, + "submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])": { + "details": "Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released." + }, + "unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released." + }, + "unpause()": { + "details": "Triggers unpaused state." + } }, - { - "inputs": [], - "name": "wrappedNativeToken", - "outputs": [ - { - "internalType": "contract IWETH", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + "events": { + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "DailyWithdrawalLimitsUpdated(address[],uint256[])": { + "details": "Emitted when the daily limit thresholds are updated" + }, + "DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the deposit is requested" + }, + "HighTierThresholdsUpdated(address[],uint256[])": { + "details": "Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated" + }, + "HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the high-tier vote weight threshold is updated" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "LockedThresholdsUpdated(address[],uint256[])": { + "details": "Emitted when the thresholds for locked withdrawals are updated" + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + }, + "TokenMapped(address[],address[],uint8[])": { + "details": "Emitted when the tokens are mapped" + }, + "UnlockFeePercentagesUpdated(address[],uint256[])": { + "details": "Emitted when the fee percentages to unlock withdraw are updated" + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + }, + "WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the withdrawal is locked" + }, + "WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the withdrawal is unlocked" + }, + "Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the assets are withdrawn" + }, + "WrappedNativeTokenContractUpdated(address)": { + "details": "Emitted when the wrapped native token contract is updated" + } }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x5280f78ad6f9662655f644e84e5a35c39c969786127fd62dd1dccf6c545b3c84", - "receipt": { - "to": null, - "from": "0xba0000a467FA5d2BCbB78209728dbD2753b41f25", - "contractAddress": "0x72E28A9009Ad12dE019BFF418CD210D4bbc3D403", - "transactionIndex": 98, - "gasUsed": "3993491", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc25401cfdea24b1ac9bec0830c2ceca037edab77300ed815a5b8ce31387d65c7", - "transactionHash": "0x5280f78ad6f9662655f644e84e5a35c39c969786127fd62dd1dccf6c545b3c84", - "logs": [], - "blockNumber": 18376297, - "cumulativeGasUsed": "15059425", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "f9f5036294d35a88da21dae55fc8b26c", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForApprovedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForInsufficientVoteWeight\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForProcessedWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrReachedDailyWithdrawalLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum Token.Standard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"_mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"_token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeManagerContract\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidOrder(bytes4)\":[{\"details\":\"Error indicating that an order is invalid.\",\"params\":{\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid order.\"}}],\"ErrInvalidPercentage()\":[{\"details\":\"Error of invalid percentage.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForApprovedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for an approved withdrawal.\"}],\"ErrQueryForInsufficientVoteWeight()\":[{\"details\":\"Error indicating that a query was made for insufficient vote weight.\"}],\"ErrQueryForProcessedWithdrawal()\":[{\"details\":\"Error indicating that a query was made for a processed withdrawal.\"}],\"ErrReachedDailyWithdrawalLimit()\":[{\"details\":\"Error indicating that the daily withdrawal limit has been reached.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `transferFrom` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"______deprecatedBridgeOperatorAddedBlock\":{\"custom:deprecated\":\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\"},\"______deprecatedBridgeOperators\":{\"custom:deprecated\":\"Previously `_bridgeOperators` (uint256[])\"},\"_domainSeparator\":{\"details\":\"Domain seperator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/mainchain/MainchainGatewayV3.sol\":\"MainchainGatewayV3\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"contracts/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyAdmin returns (uint256, uint256) {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) internal virtual returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n _previousNum = _num;\\n _previousDenom = _denom;\\n _num = _numerator;\\n _denom = _denominator;\\n unchecked {\\n emit ThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0xfcb8d4fa4358387c477a40da4d8a5108c298f23333c4161ce939c1b27a09ffde\",\"license\":\"MIT\"},\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\"},\"contracts/extensions/WithdrawalLimitation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./GatewayV3.sol\\\";\\n\\nabstract contract WithdrawalLimitation is GatewayV3 {\\n /// @dev Error of invalid percentage.\\n error ErrInvalidPercentage();\\n\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\n event HighTierVoteWeightThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\n /// @dev Emitted when the daily limit thresholds are updated\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\n\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\n\\n uint256 internal _highTierVWNum;\\n uint256 internal _highTierVWDenom;\\n\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\n mapping(address => uint256) public highTierThreshold;\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\n mapping(address => uint256) public lockedThreshold;\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\n /// @notice Values 0-1,000,000 map to 0%-100%\\n mapping(address => uint256) public unlockFeePercentages;\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\n mapping(address => uint256) public dailyWithdrawalLimit;\\n /// @dev Mapping from token address => today withdrawal amount\\n mapping(address => uint256) public lastSyncedWithdrawal;\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\n mapping(address => uint256) public lastDateSynced;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `GatewayV3-setThreshold`.\\n *\\n * Requirements:\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n */\\n function setThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual override onlyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\n (_previousNum, _previousDenom) = _setThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Returns the high-tier vote weight threshold.\\n */\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\n return (_highTierVWNum, _highTierVWDenom);\\n }\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\n */\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function setHighTierVoteWeightThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function setHighTierThresholds(\\n address[] calldata _tokens,\\n uint256[] calldata _thresholds\\n ) external virtual onlyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setHighTierThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setLockedThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function setUnlockFeePercentages(\\n address[] calldata _tokens,\\n uint256[] calldata _percentages\\n ) external virtual onlyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setUnlockFeePercentages(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setDailyWithdrawalLimits(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the limitation.\\n */\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\n return _reachedWithdrawalLimit(_token, _quantity);\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function _setHighTierVoteWeightThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) internal returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n\\n _previousNum = _highTierVWNum;\\n _previousDenom = _highTierVWDenom;\\n _highTierVWNum = _numerator;\\n _highTierVWDenom = _denominator;\\n\\n unchecked {\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length; ) {\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length; ) {\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n * - The percentage is equal to or less than 100_000.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\n if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length; ) {\\n if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage();\\n\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\n if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length; ) {\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\n *\\n * Requirements:\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\n *\\n */\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\n return false;\\n }\\n\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n return dailyWithdrawalLimit[_token] <= _quantity;\\n } else {\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\n }\\n }\\n\\n /**\\n * @dev Record withdrawal token.\\n */\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n lastDateSynced[_token] = _currentDate;\\n lastSyncedWithdrawal[_token] = _quantity;\\n } else {\\n lastSyncedWithdrawal[_token] += _quantity;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the withdrawal request is locked or not.\\n */\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n return lockedThreshold[_token] <= _quantity;\\n }\\n\\n /**\\n * @dev Computes fee percentage.\\n */\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\n }\\n\\n /**\\n * @dev Returns high-tier vote weight.\\n */\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\n }\\n\\n /**\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\n */\\n function _verifyThresholds() internal view {\\n if (_num * _highTierVWDenom > _highTierVWNum * _denom) revert ErrInvalidThreshold(msg.sig);\\n }\\n}\\n\",\"keccak256\":\"0xb574848e6c3fa2ceeb7f5e907bc76dc096ef577315dbf78452f9640bd92d8a32\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n _requireAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireAdmin() internal view {\\n if (msg.sender != _getAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0x0916021d04ea0c93c54978dc2fd46575fd2bd867369fbf9ce49f316939ddaf25\",\"license\":\"MIT\"},\"contracts/interfaces/IMainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./consumers/SignatureConsumer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\n /**\\n * @dev Error indicating that a query was made for an approved withdrawal.\\n */\\n error ErrQueryForApprovedWithdrawal();\\n\\n /**\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\n */\\n error ErrReachedDailyWithdrawalLimit();\\n\\n /**\\n * @dev Error indicating that a query was made for a processed withdrawal.\\n */\\n error ErrQueryForProcessedWithdrawal();\\n\\n /**\\n * @dev Error indicating that a query was made for insufficient vote weight.\\n */\\n error ErrQueryForInsufficientVoteWeight();\\n\\n /// @dev Emitted when the deposit is requested\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the assets are withdrawn\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, Token.Standard[] standards);\\n /// @dev Emitted when the wrapped native token contract is updated\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\n /// @dev Emitted when the withdrawal is locked\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is unlocked\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n\\n /**\\n * @dev Returns the domain seperator.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns deposit count.\\n */\\n function depositCount() external view returns (uint256);\\n\\n /**\\n * @dev Sets the wrapped native token contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\n\\n /**\\n * @dev Returns whether the withdrawal is locked.\\n */\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns the withdrawal hash.\\n */\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\n\\n /**\\n * @dev Locks the assets and request deposit.\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\n\\n /**\\n * @dev Withdraws based on the receipt and the validator signatures.\\n * Returns whether the withdrawal is locked.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function submitWithdrawal(\\n Transfer.Receipt memory _receipt,\\n Signature[] memory _signatures\\n ) external returns (bool _locked);\\n\\n /**\\n * @dev Approves a specific withdrawal.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards\\n ) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards,\\n uint256[][4] calldata _thresholds\\n ) external;\\n\\n /**\\n * @dev Returns token address on Ronin network.\\n * Note: Reverts for unsupported token.\\n */\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0xa82b8172f40ec733e5a03b019a8a7d597af284779c872c620ecc91a28af55461\",\"license\":\"MIT\"},\"contracts/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external returns (uint256 _previousNum, uint256 _previousDenom);\\n}\\n\",\"keccak256\":\"0x6b7920b04a73a0e1ff7404aa1a3b5fc738fc0b6154839480f666fd69b55123f0\",\"license\":\"MIT\"},\"contracts/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n function deposit() external payable;\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8acead2ae4364dee80c9bc76d52cc04d3763105e1743728e67d237f816155142\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos()\\n external\\n view\\n returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns an array of bridge operators correspoding to governor addresses.\\n * @return bridgeOperators_ An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_);\\n\\n /**\\n * @dev Retrieves the governors corresponding to a given array of bridge operators.\\n * This external function allows external callers to obtain the governors associated with a given array of bridge operators.\\n * The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.\\n * @param bridgeOperators An array of bridge operator addresses for which governors are to be retrieved.\\n * @return governors An array of addresses representing the governors corresponding to the provided bridge operators.\\n */\\n function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n * @return addeds An array of booleans indicating whether each bridge operator was added successfully.\\n *\\n * Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators(\\n * voteWeights,\\n * governors,\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]);\\n * const filteredWeights = weights.filter((_, index) => addeds[index]);\\n * const filteredGovernors = governors.filter((_, index) => addeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function addBridgeOperators(\\n uint96[] calldata voteWeights,\\n address[] calldata governors,\\n address[] calldata bridgeOperators\\n ) external returns (bool[] memory addeds);\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n * @return removeds An array of booleans indicating whether each bridge operator was removed successfully.\\n *\\n * * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators(\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds);\\n\\n /**\\n * @dev Governor updates their corresponding governor and/or operator address.\\n * Requirements:\\n * - The caller must the governor of the operator that is requested changes.\\n * @param bridgeOperator The address of the bridge operator to update.\\n */\\n function updateBridgeOperator(address bridgeOperator) external;\\n}\\n\",\"keccak256\":\"0x9339ce2f14bc1e4d0e368a351506ff5735bcbc0a2e41aa633149198bbed76a60\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManagerCallback.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @title IBridgeManagerCallback\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\n */\\ninterface IBridgeManagerCallback is IERC165 {\\n /**\\n * @dev Handles the event when bridge operators are added.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsAdded(\\n address[] memory bridgeOperators,\\n bool[] memory addeds\\n ) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when bridge operators are removed.\\n * @param bridgeOperators The addresses of the bridge operators.\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorsRemoved(\\n address[] memory bridgeOperators,\\n bool[] memory removeds\\n ) external returns (bytes4 selector);\\n\\n /**\\n * @dev Handles the event when a bridge operator is updated.\\n * @param currentBridgeOperator The address of the current bridge operator.\\n * @param newbridgeOperator The new address of the bridge operator.\\n * @return selector The selector of the function being called.\\n */\\n function onBridgeOperatorUpdated(\\n address currentBridgeOperator,\\n address newbridgeOperator\\n ) external returns (bytes4 selector);\\n}\\n\",\"keccak256\":\"0xfd6868a1041577a463b6c96713edcb18063dc817154d09710abfd5783e4629ee\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev The structure representing information about a bridge operator.\\n * @param addr The address of the bridge operator.\\n * @param voteWeight The vote weight assigned to the bridge operator.\\n */\\n struct BridgeOperatorInfo {\\n address addr;\\n uint96 voteWeight;\\n }\\n\\n /**\\n * @dev Emitted when new bridge operators are added.\\n * @param statuses The array of boolean values represents whether the corresponding bridge operator is added successfully.\\n * @param voteWeights The array of vote weights assigned to the added bridge operators.\\n * @param governors The array of addresses representing the governors associated with the added bridge operators.\\n * @param bridgeOperators The array of addresses representing the added bridge operators.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n * @param statuses The array of boolean values representing the statuses of the removed bridge operators.\\n * @param bridgeOperators The array of addresses representing the removed bridge operators.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n * @param governor The address of the governor initiating the update.\\n * @param fromBridgeOperator The address of the bridge operator being updated.\\n * @param toBridgeOperator The updated address of the bridge operator.\\n */\\n event BridgeOperatorUpdated(\\n address indexed governor,\\n address indexed fromBridgeOperator,\\n address indexed toBridgeOperator\\n );\\n}\\n\",\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Token.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n Token.Standard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xfa220e968221af9b789e6c1dc4133631e90600c4a2bd63b7f01e96cb01f13e9b\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"contracts/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA; ) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB; ) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\"},\"contracts/libraries/Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nlibrary Token {\\n /// @dev Error indicating that the provided information is invalid.\\n error ErrInvalidInfo();\\n\\n /// @dev Error indicating that the minting of ERC20 tokens has failed.\\n error ErrERC20MintingFailed();\\n\\n /// @dev Error indicating that the minting of ERC721 tokens has failed.\\n error ErrERC721MintingFailed();\\n\\n /// @dev Error indicating that an unsupported standard is encountered.\\n error ErrUnsupportedStandard();\\n\\n /**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\n error ErrTokenCouldNotTransfer(Info tokenInfo, address to, address token);\\n\\n /**\\n * @dev Error indicating that the `transferFrom` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\n error ErrTokenCouldNotTransferFrom(Info tokenInfo, address from, address to, address token);\\n\\n enum Standard {\\n ERC20,\\n ERC721\\n }\\n\\n struct Info {\\n Standard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n }\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Info memory _info) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH, _info.erc, _info.id, _info.quantity))\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_info)) // _info.erc\\n mstore(add(ptr, 0x40), mload(add(_info, 0x20))) // _info.id\\n mstore(add(ptr, 0x60), mload(add(_info, 0x40))) // _info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(Info memory _info) internal pure {\\n if (\\n !((_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) ||\\n (_info.erc == Standard.ERC721 && _info.quantity == 0))\\n ) revert ErrInvalidInfo();\\n }\\n\\n /**\\n * @dev Transfer asset from.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function transferFrom(Info memory _info, address _from, address _to, address _token) internal {\\n bool _success;\\n bytes memory _data;\\n if (_info.erc == Standard.ERC20) {\\n (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, _from, _to, _info.quantity));\\n _success = _success && (_data.length == 0 || abi.decode(_data, (bool)));\\n } else if (_info.erc == Standard.ERC721) {\\n // bytes4(keccak256(\\\"transferFrom(address,address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id));\\n } else revert ErrUnsupportedStandard();\\n\\n if (!_success) revert ErrTokenCouldNotTransferFrom(_info, _from, _to, _token);\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function tryTransferERC721(address _token, address _to, uint256 _id) internal returns (bool _success) {\\n (_success, ) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id));\\n }\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function tryTransferERC20(address _token, address _to, uint256 _quantity) internal returns (bool _success) {\\n bytes memory _data;\\n (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transfer.selector, _to, _quantity));\\n _success = _success && (_data.length == 0 || abi.decode(_data, (bool)));\\n }\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function transfer(Info memory _info, address _to, address _token) internal {\\n bool _success;\\n if (_info.erc == Standard.ERC20) {\\n _success = tryTransferERC20(_token, _to, _info.quantity);\\n } else if (_info.erc == Standard.ERC721) {\\n _success = tryTransferERC721(_token, _to, _info.id);\\n } else revert ErrUnsupportedStandard();\\n\\n if (!_success) revert ErrTokenCouldNotTransfer(_info, _to, _token);\\n }\\n\\n /**\\n * @dev Tries minting and transfering assets.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetTransfer(\\n Info memory _info,\\n address payable _to,\\n address _token,\\n IWETH _wrappedNativeToken\\n ) internal {\\n bool _success;\\n if (_token == address(_wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!_to.send(_info.quantity)) {\\n _wrappedNativeToken.deposit{ value: _info.quantity }();\\n transfer(_info, _to, _token);\\n }\\n } else if (_info.erc == Token.Standard.ERC20) {\\n uint256 _balance = IERC20(_token).balanceOf(address(this));\\n\\n if (_balance < _info.quantity) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance));\\n if (!_success) revert ErrERC20MintingFailed();\\n }\\n\\n transfer(_info, _to, _token);\\n } else if (_info.erc == Token.Standard.ERC721) {\\n if (!tryTransferERC721(_token, _to, _info.id)) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id));\\n if (!_success) revert ErrERC721MintingFailed();\\n }\\n } else revert ErrUnsupportedStandard();\\n }\\n\\n struct Owner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n }\\n\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(Owner memory _owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, _owner.addr, _owner.tokenAddr, _owner.chainId))\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_owner)) // _owner.addr\\n mstore(add(ptr, 0x40), mload(add(_owner, 0x20))) // _owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(_owner, 0x40))) // _owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8d11e48d878ba37ea2ca7395dceaa5591bb9ba2d4e5fdac1565760456e104991\",\"license\":\"MIT\"},\"contracts/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./Token.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n Token.Info info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n Token.Owner mainchain;\\n Token.Owner ronin;\\n Token.Info info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = Token.hash(_receipt.mainchain);\\n bytes32 hashedReceiptRonin = Token.hash(_receipt.ronin);\\n bytes32 hashedReceiptInfo = Token.hash(_receipt.info);\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0xe73e11942bcae9034abc2058e9976a583e3518bdfeefa863e97cb6e51edf4522\",\"license\":\"MIT\"},\"contracts/mainchain/MainchainGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport { IBridgeManager } from \\\"../interfaces/bridge/IBridgeManager.sol\\\";\\nimport { IBridgeManagerCallback } from \\\"../interfaces/bridge/IBridgeManagerCallback.sol\\\";\\nimport { HasContracts, ContractType } from \\\"../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../extensions/WithdrawalLimitation.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"../interfaces/IMainchainGatewayV3.sol\\\";\\n\\ncontract MainchainGatewayV3 is\\n WithdrawalLimitation,\\n Initializable,\\n AccessControlEnumerable,\\n IMainchainGatewayV3,\\n HasContracts\\n{\\n using Token for Token.Info;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n\\n /// @dev Withdrawal unlocker role hash\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\"WITHDRAWAL_UNLOCKER_ROLE\\\");\\n\\n /// @dev Wrapped native token address\\n IWETH public wrappedNativeToken;\\n /// @dev Ronin network id\\n uint256 public roninChainId;\\n /// @dev Total deposit\\n uint256 public depositCount;\\n /// @dev Domain seperator\\n bytes32 internal _domainSeparator;\\n /// @dev Mapping from mainchain token => token address on Ronin network\\n mapping(address => MappedToken) internal _roninToken;\\n /// @dev Mapping from withdrawal id => withdrawal hash\\n mapping(uint256 => bytes32) public withdrawalHash;\\n /// @dev Mapping from withdrawal id => locked\\n mapping(uint256 => bool) public withdrawalLocked;\\n\\n /// @custom:deprecated Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\n uint256 private ______deprecatedBridgeOperatorAddedBlock;\\n /// @custom:deprecated Previously `_bridgeOperators` (uint256[])\\n uint256 private ______deprecatedBridgeOperators;\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n IWETH _wrappedToken,\\n uint256 _roninChainId,\\n uint256 _numerator,\\n uint256 _highTierVWNumerator,\\n uint256 _denominator,\\n // _addresses[0]: mainchainTokens\\n // _addresses[1]: roninTokens\\n // _addresses[2]: withdrawalUnlockers\\n address[][3] calldata _addresses,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds,\\n Token.Standard[] calldata _standards\\n ) external payable virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n roninChainId = _roninChainId;\\n\\n _setWrappedNativeTokenContract(_wrappedToken);\\n _updateDomainSeparator();\\n _setThreshold(_numerator, _denominator);\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\n _verifyThresholds();\\n\\n if (_addresses[0].length > 0) {\\n // Map mainchain tokens to ronin tokens\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\n // Sets thresholds based on the mainchain tokens\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\n }\\n\\n // Grant role for withdrawal unlocker\\n for (uint256 _i; _i < _addresses[2].length; ) {\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][_i]);\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n function initializeV2(address bridgeManagerContract) external reinitializer(2) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\n }\\n\\n /**\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\n */\\n function receiveEther() external payable {}\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparator;\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyAdmin {\\n _setWrappedNativeTokenContract(_wrappedToken);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\n _requestDepositFor(_request, msg.sender);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function submitWithdrawal(\\n Transfer.Receipt calldata _receipt,\\n Signature[] calldata _signatures\\n ) external virtual whenNotPaused returns (bool _locked) {\\n return _submitWithdrawal(_receipt, _signatures);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\n bytes32 _receiptHash = _receipt.hash();\\n if (withdrawalHash[_receipt.id] != _receipt.hash()) {\\n revert ErrInvalidReceipt();\\n }\\n if (!withdrawalLocked[_receipt.id]) {\\n revert ErrQueryForApprovedWithdrawal();\\n }\\n delete withdrawalLocked[_receipt.id];\\n emit WithdrawalUnlocked(_receiptHash, _receipt);\\n\\n address _token = _receipt.mainchain.tokenAddr;\\n if (_receipt.info.erc == Token.Standard.ERC20) {\\n Token.Info memory _feeInfo = _receipt.info;\\n _feeInfo.quantity = _computeFeePercentage(_receipt.info.quantity, unlockFeePercentages[_token]);\\n Token.Info memory _withdrawInfo = _receipt.info;\\n _withdrawInfo.quantity = _receipt.info.quantity - _feeInfo.quantity;\\n\\n _feeInfo.handleAssetTransfer(payable(msg.sender), _token, wrappedNativeToken);\\n _withdrawInfo.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken);\\n } else {\\n _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken);\\n }\\n\\n emit Withdrew(_receiptHash, _receipt);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokens(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards\\n ) external virtual onlyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds\\n ) external virtual onlyAdmin {\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV3\\n */\\n function getRoninToken(address _mainchainToken) public view returns (MappedToken memory _token) {\\n _token = _roninToken[_mainchainToken];\\n if (_token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards\\n ) internal virtual {\\n if (!(_mainchainTokens.length == _roninTokens.length && _mainchainTokens.length == _standards.length))\\n revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _mainchainTokens.length; ) {\\n _roninToken[_mainchainTokens[_i]].tokenAddr = _roninTokens[_i];\\n _roninToken[_mainchainTokens[_i]].erc = _standards[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n\\n emit TokenMapped(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @dev Submits withdrawal receipt.\\n *\\n * Requirements:\\n * - The receipt kind is withdrawal.\\n * - The receipt is to withdraw on this chain.\\n * - The receipt is not used to withdraw before.\\n * - The withdrawal is not reached the limit threshold.\\n * - The signer weight total is larger than or equal to the minimum threshold.\\n * - The signature signers are in order.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function _submitWithdrawal(\\n Transfer.Receipt calldata _receipt,\\n Signature[] memory _signatures\\n ) internal virtual returns (bool _locked) {\\n uint256 _id = _receipt.id;\\n uint256 _quantity = _receipt.info.quantity;\\n address _tokenAddr = _receipt.mainchain.tokenAddr;\\n\\n _receipt.info.validate();\\n if (_receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind();\\n\\n if (_receipt.mainchain.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, _receipt.mainchain.chainId, block.chainid);\\n }\\n\\n MappedToken memory _token = getRoninToken(_receipt.mainchain.tokenAddr);\\n\\n if (!(_token.erc == _receipt.info.erc && _token.tokenAddr == _receipt.ronin.tokenAddr)) revert ErrInvalidReceipt();\\n\\n if (withdrawalHash[_id] != 0) revert ErrQueryForProcessedWithdrawal();\\n\\n if (!(_receipt.info.erc == Token.Standard.ERC721 || !_reachedWithdrawalLimit(_tokenAddr, _quantity))) {\\n revert ErrReachedDailyWithdrawalLimit();\\n }\\n\\n bytes32 _receiptHash = _receipt.hash();\\n bytes32 _receiptDigest = Transfer.receiptDigest(_domainSeparator, _receiptHash);\\n\\n uint256 _minimumVoteWeight;\\n (_minimumVoteWeight, _locked) = _computeMinVoteWeight(_receipt.info.erc, _tokenAddr, _quantity);\\n\\n {\\n bool _passed;\\n address _signer;\\n address _lastSigner;\\n Signature memory _sig;\\n uint256 _weight;\\n for (uint256 _i; _i < _signatures.length; ) {\\n _sig = _signatures[_i];\\n _signer = ecrecover(_receiptDigest, _sig.v, _sig.r, _sig.s);\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\n\\n _lastSigner = _signer;\\n\\n _weight += _getWeight(_signer);\\n if (_weight >= _minimumVoteWeight) {\\n _passed = true;\\n break;\\n }\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n\\n if (!_passed) revert ErrQueryForInsufficientVoteWeight();\\n withdrawalHash[_id] = _receiptHash;\\n }\\n\\n if (_locked) {\\n withdrawalLocked[_id] = true;\\n emit WithdrawalLocked(_receiptHash, _receipt);\\n return _locked;\\n }\\n\\n _recordWithdrawal(_tokenAddr, _quantity);\\n _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _tokenAddr, wrappedNativeToken);\\n emit Withdrew(_receiptHash, _receipt);\\n }\\n\\n /**\\n * @dev Requests deposit made by `_requester` address.\\n *\\n * Requirements:\\n * - The token info is valid.\\n * - The `msg.value` is 0 while depositing ERC20 token.\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\n *\\n * Emits the `DepositRequested` event.\\n *\\n */\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\n MappedToken memory _token;\\n address _weth = address(wrappedNativeToken);\\n\\n _request.info.validate();\\n if (_request.tokenAddr == address(0)) {\\n if (_request.info.quantity != msg.value) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_weth);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.tokenAddr = _weth;\\n } else {\\n if (msg.value != 0) revert ErrInvalidRequest();\\n\\n _token = getRoninToken(_request.tokenAddr);\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.transferFrom(_requester, address(this), _request.tokenAddr);\\n // Withdraw if token is WETH\\n if (_weth == _request.tokenAddr) {\\n IWETH(_weth).withdraw(_request.info.quantity);\\n }\\n }\\n\\n uint256 _depositId = depositCount++;\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(\\n _requester,\\n _depositId,\\n _token.tokenAddr,\\n roninChainId\\n );\\n\\n emit DepositRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Returns the minimum vote weight for the token.\\n */\\n function _computeMinVoteWeight(\\n Token.Standard _erc,\\n address _token,\\n uint256 _quantity\\n ) internal virtual returns (uint256 _weight, bool _locked) {\\n uint256 _totalWeight = _getTotalWeight();\\n _weight = _minimumVoteWeight(_totalWeight);\\n if (_erc == Token.Standard.ERC20) {\\n if (highTierThreshold[_token] <= _quantity) {\\n _weight = _highTierVoteWeight(_totalWeight);\\n }\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\n }\\n }\\n\\n /**\\n * @dev Update domain seperator.\\n */\\n function _updateDomainSeparator() internal {\\n /*\\n * _domainSeparator = keccak256(\\n * abi.encode(\\n * keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n * keccak256(\\\"MainchainGatewayV2\\\"),\\n * keccak256(\\\"2\\\"),\\n * block.chainid,\\n * address(this)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n // keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\")\\n mstore(ptr, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)\\n // keccak256(\\\"MainchainGatewayV2\\\")\\n mstore(add(ptr, 0x20), 0x159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b)\\n // keccak256(\\\"2\\\")\\n mstore(add(ptr, 0x40), 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5)\\n mstore(add(ptr, 0x60), chainid())\\n mstore(add(ptr, 0x80), address())\\n sstore(_domainSeparator.slot, keccak256(ptr, 0xa0))\\n }\\n }\\n\\n /**\\n * @dev Sets the WETH contract.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\n wrappedNativeToken = _wrapedToken;\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\n }\\n\\n /**\\n * @dev Receives ETH from WETH or creates deposit request.\\n */\\n function _fallback() internal virtual whenNotPaused {\\n if (msg.sender != address(wrappedNativeToken)) {\\n Transfer.Request memory _request;\\n _request.recipientAddr = msg.sender;\\n _request.info.quantity = msg.value;\\n _requestDepositFor(_request, _request.recipientAddr);\\n }\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getTotalWeight();\\n }\\n\\n /**\\n * @dev Returns the weight of an address.\\n */\\n function _getWeight(address _addr) internal view returns (uint256) {\\n return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getBridgeOperatorWeight(_addr);\\n }\\n}\\n\",\"keccak256\":\"0x5081ea8d3ae575c55c344ea48edebbd5726fb459bfbcd27914e9a4bf6da57896\",\"license\":\"MIT\"},\"contracts/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\",\"keccak256\":\"0x22942c8fea2d1ca863ac1f9c1662d714b8ac0856684e36f8aaf19508648c1053\",\"license\":\"MIT\"},\"contracts/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n /* 0 */ UNKNOWN,\\n /* 1 */ PAUSE_ENFORCER,\\n /* 2 */ BRIDGE,\\n /* 3 */ BRIDGE_TRACKING,\\n /* 4 */ GOVERNANCE_ADMIN,\\n /* 5 */ MAINTENANCE,\\n /* 6 */ SLASH_INDICATOR,\\n /* 7 */ STAKING_VESTING,\\n /* 8 */ VALIDATOR,\\n /* 9 */ STAKING,\\n /* 10 */ RONIN_TRUSTED_ORGANIZATION,\\n /* 11 */ BRIDGE_MANAGER,\\n /* 12 */ BRIDGE_SLASH,\\n /* 13 */ BRIDGE_REWARD,\\n /* 14 */ FAST_FINALITY_TRACKING,\\n /* 15 */ PROFILE\\n}\\n\",\"keccak256\":\"0x7f547a44265f4c4b03d8971f7fc5eaa2e6064ea8cd509c1b761108f9800dab68\",\"license\":\"MIT\"},\"contracts/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(\\n abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams))\\n );\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x2d0dfcef3636945bc1785c1fa5a05f5203c79cbb81b2eee92a3ac6a2378c2ce5\",\"license\":\"MIT\"},\"contracts/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n /* 0 */ UNKNOWN,\\n /* 1 */ ADMIN,\\n /* 2 */ COINBASE,\\n /* 3 */ GOVERNOR,\\n /* 4 */ CANDIDATE_ADMIN,\\n /* 5 */ WITHDRAWAL_MIGRATOR,\\n /* 6 */ __DEPRECATED_BRIDGE_OPERATOR,\\n /* 7 */ BLOCK_PRODUCER,\\n /* 8 */ VALIDATOR_CANDIDATE,\\n /* 9 */ CONSENSUS,\\n /* 10 */ TREASURY\\n}\\n\",\"keccak256\":\"0x7da4631824b53be17e246102ad59458f91f2395710561ac9bface18d35fb2502\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506000805460ff191690556147378061002a6000396000f3fe60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614033565b90501115610f1d57610e85610e718680614033565b610e7e6020890189614033565b8787611a1f565b610eab610e928680614033565b8660005b602002810190610ea69190614033565b6123a2565b610ed1610eb88680614033565b8660015b602002810190610ecc9190614033565b61194a565b610ef7610ede8680614033565b8660025b602002810190610ef29190614033565b612477565b610f1d610f048680614033565b8660035b602002810190610f189190614033565b612588565b60005b610f2d6040870187614033565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614033565b84818110610f7757610f7761401d565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d611098368590038501856140cb565b612843565b90506110b1611098368590038501856140cb565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b908390869061419f565b60405180910390a160006111756080850160608601613a7f565b9050600061118b6101208601610100870161422c565b600181111561119c5761119c613d3c565b036112635760006111b63686900386016101008701614249565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc3687900387016101008801614249565b60408301519091506112139061014088013561427b565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a01614249565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d092919061419f565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f919061428e565b60385461138c908461428e565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e6919061428e565b60025461138c908461428e565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b3691906142a5565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b6076805460009182611849836142bf565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142fa565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b36929190614398565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b838110156119e9578282828181106119955761199561401d565b90506020020135603a60008787858181106119b2576119b261401d565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d09493929190614424565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b85811015611b7c57848482818110611a7557611a7561401d565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa061401d565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd61401d565b9050602002016020810190611b12919061422c565b60786000898985818110611b2857611b2861401d565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614470565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b36929190614398565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c3688900388016101008901614249565b612c6d565b6001611db3604088016020890161422c565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d6101208801610100890161422c565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a0161422c565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a6140cb565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d0161422c565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca61401d565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b3691906143c6565b84935061208685613229565b61209090836144e8565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d9061419f565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d610100018036038101906112979190614249565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be92919061419f565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b3691906143c6565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b3691906143c6565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b600254603754612365919061428e565b603854600154612375919061428e565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b3691906143c6565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b83811015612441578282828181106123ed576123ed61401d565b905060200201356039600087878581811061240a5761240a61401d565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d09493929190614424565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b8381101561255257620f42408383838181106124c6576124c661401d565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe61401d565b90506020020135603b600087878581811061251b5761251b61401d565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d09493929190614424565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b83811015612627578282828181106125d3576125d361401d565b90506020020135603c60008787858181106125f0576125f061401d565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d09493929190614424565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144fb565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144e8565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611012919061451d565b60006002546001600254846001546127a6919061428e565b6127b091906144e8565b6127ba919061427b565b610a7691906144fb565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d838561428e565b610ff991906144fb565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b919061451d565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061427b565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add919061455a565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd919061455a565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d69919061455a565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd69190614576565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b919061455a565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b369493929190614598565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145ce565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614643565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a19190614676565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144fb565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144e8565b9091555050505050565b600082600001828154811061335c5761335c61401d565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b36939291906146a4565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928616916134939161455a565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef83600261428e565b6134fa9060026144e8565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b816000815181106135575761355761401d565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106135865761358661401d565b60200101906001600160f81b031916908160001a90535060006135aa84600261428e565b6135b59060016144e8565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e961401d565b1a60f81b8282815181106135ff576135ff61401d565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146d4565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361427b565b85549091506000906137039060019061427b565b90508181146137685760008660000182815481106137235761372361401d565b90600052602060002001549050808760000184815481106137465761374661401d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146eb565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a6919061428e565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613833919061455a565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a09190614576565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b6040516060810181811067ffffffffffffffff82111715613fea57634e487b7160e01b600052604160045260246000fd5b604052823560ff81168114613ffe57600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261404a57600080fd5b83018035915067ffffffffffffffff82111561406557600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561408f57600080fd5b614097613ecb565b905081356140a481613a5f565b815260208201356140b481613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140de57600080fd5b60405160a0810181811067ffffffffffffffff8211171561410f57634e487b7160e01b600052604160045260246000fd5b60405282358152602083013561412481613f02565b6020820152614136846040850161407d565b60408201526141488460a0850161407d565b606082015261415b846101008501613f0f565b60808201529392505050565b803561417281613a5f565b6001600160a01b03908116835260208201359061418e82613a5f565b166020830152604090810135910152565b6000610180820190508382528235602083015260208301356141c081613f02565b6141c981613d52565b806040840152506141e06060830160408501614167565b6141f060c0830160a08501614167565b61012061010084013561420281613f02565b61420b81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561423e57600080fd5b8135610ff981613f02565b60006060828403121561425b57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614265565b8082028115828204841417610a7657610a76614265565b60208101601083106142b9576142b9613d3c565b91905290565b6000600182016142d1576142d1614265565b5060010190565b80516142e381613d52565b825260208181015190830152604090810151910152565b60006101808201905083825282516020830152602083015161431b81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143906101208401826142d8565b509392505050565b6001600160e01b03198316815260408101600b83106143b9576143b9613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156144195781356143fe81613a5f565b6001600160a01b0316875295820195908201906001016143eb565b509495945050505050565b6040815260006144386040830186886143db565b82810360208401528381526001600160fb1b0384111561445757600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061448460608301888a6143db565b60208382038185015261449882888a6143db565b8481036040860152858152869250810160005b868110156144d95783356144be81613f02565b6144c781613d52565b825292820192908201906001016144ab565b509a9950505050505050505050565b80820180821115610a7657610a76614265565b60008261451857634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561452f57600080fd5b5051919050565b60005b83811015614551578181015183820152602001614539565b50506000910152565b6000825161456c818460208701614536565b9190910192915050565b60006020828403121561458857600080fd5b81518015158114610ff957600080fd5b60c081016145a682876142d8565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614606816017850160208801614536565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614637816028840160208801614536565b01602801949350505050565b6020815260008251806020840152614662816040850160208701614536565b601f01601f19169190910160400192915050565b60006020828403121561468857600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a081016146b282866142d8565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146e3576146e3614265565b506000190190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122067a7e41e0d11cc4f13027848a796f28bc789f50aade1ce98bb6b3473be92478464736f6c63430008110033", - "deployedBytecode": "0x60806040526004361061031e5760003560e01c8063865e6fd3116101ab578063b1d08a03116100f7578063d55ed10311610095578063de981f1b1161006f578063de981f1b14610999578063dff525e1146109b9578063e400327c146109d9578063e75235b8146109f95761032d565b8063d55ed1031461092c578063d64af2a614610959578063dafae408146109795761032d565b8063ca15c873116100d1578063ca15c873146108a7578063cdb67444146108c7578063d19773d2146108df578063d547741f1461090c5761032d565b8063b1d08a031461082d578063b29757941461085a578063b9c36209146108875761032d565b80639dcc4da311610164578063ab7965661161013e578063ab796566146107aa578063ac78dfe8146107d7578063affed0e0146107f7578063b1a2567e1461080d5761032d565b80639dcc4da314610760578063a217fddf14610795578063a3912ec81461032b5761032d565b8063865e6fd31461068c5780638f34e347146106ac5780639010d07c146106e05780639157921c1461070057806391d148541461072057806393c5678f146107405761032d565b806336568abe1161026a578063504af48c116102235780636932be98116101fd5780636932be98146106155780636c1ce670146106425780637de5dedd146106625780638456cb59146106775761032d565b8063504af48c146105bd57806359122f6b146105d05780635c975abb146105fd5761032d565b806336568abe146105055780633e70838b146105255780633f4ba83a146105455780634b14557e1461055a5780634d0d66731461056d5780634d493f4e1461058d5761032d565b80631d4a7210116102d75780632dfdf0b5116102b15780632dfdf0b5146104a35780632f2ff15d146104b9578063302d12db146104d95780633644e515146104f05761032d565b80631d4a721014610426578063248a9ca31461045357806329b6eca9146104835761032d565b806301ffc9a714610335578063065b3adf1461036a57806317ce2dd4146103a257806317fcb39b146103c65780631a8e55b0146103e65780631b6e7594146104065761032d565b3661032d5761032b610a11565b005b61032b610a11565b34801561034157600080fd5b506103556103503660046138ea565b610a51565b60405190151581526020015b60405180910390f35b34801561037657600080fd5b5060055461038a906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b3480156103ae57600080fd5b506103b860755481565b604051908152602001610361565b3480156103d257600080fd5b5060745461038a906001600160a01b031681565b3480156103f257600080fd5b5061032b610401366004613959565b610a7c565b34801561041257600080fd5b5061032b6104213660046139c5565b610ab8565b34801561043257600080fd5b506103b8610441366004613a7f565b603e6020526000908152604090205481565b34801561045f57600080fd5b506103b861046e366004613a9c565b60009081526072602052604090206001015490565b34801561048f57600080fd5b5061032b61049e366004613a7f565b610af8565b3480156104af57600080fd5b506103b860765481565b3480156104c557600080fd5b5061032b6104d4366004613ab5565b610ba3565b3480156104e557600080fd5b506103b8620f424081565b3480156104fc57600080fd5b506077546103b8565b34801561051157600080fd5b5061032b610520366004613ab5565b610bcd565b34801561053157600080fd5b5061032b610540366004613a7f565b610c4b565b34801561055157600080fd5b5061032b610c75565b61032b610568366004613ae5565b610c85565b34801561057957600080fd5b50610355610588366004613b10565b610ca5565b34801561059957600080fd5b506103556105a8366004613a9c565b607a6020526000908152604090205460ff1681565b61032b6105cb366004613bbb565b610d13565b3480156105dc57600080fd5b506103b86105eb366004613a7f565b603a6020526000908152604090205481565b34801561060957600080fd5b5060005460ff16610355565b34801561062157600080fd5b506103b8610630366004613a9c565b60796020526000908152604090205481565b34801561064e57600080fd5b5061035561065d366004613c96565b610fed565b34801561066e57600080fd5b506103b8611000565b34801561068357600080fd5b5061032b611017565b34801561069857600080fd5b5061032b6106a7366004613cd1565b611027565b3480156106b857600080fd5b506103b87f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b3480156106ec57600080fd5b5061038a6106fb366004613cfd565b611042565b34801561070c57600080fd5b5061032b61071b366004613d1f565b61105a565b34801561072c57600080fd5b5061035561073b366004613ab5565b6112de565b34801561074c57600080fd5b5061032b61075b366004613959565b611309565b34801561076c57600080fd5b5061078061077b366004613cfd565b61133f565b60408051928352602083019190915201610361565b3480156107a157600080fd5b506103b8600081565b3480156107b657600080fd5b506103b86107c5366004613a7f565b603c6020526000908152604090205481565b3480156107e357600080fd5b506103556107f2366004613a9c565b611368565b34801561080357600080fd5b506103b860045481565b34801561081957600080fd5b5061032b610828366004613959565b611394565b34801561083957600080fd5b506103b8610848366004613a7f565b60396020526000908152604090205481565b34801561086657600080fd5b5061087a610875366004613a7f565b6113ca565b6040516103619190613d62565b34801561089357600080fd5b506107806108a2366004613cfd565b61146d565b3480156108b357600080fd5b506103b86108c2366004613a9c565b611482565b3480156108d357600080fd5b50603754603854610780565b3480156108eb57600080fd5b506103b86108fa366004613a7f565b603b6020526000908152604090205481565b34801561091857600080fd5b5061032b610927366004613ab5565b611499565b34801561093857600080fd5b506103b8610947366004613a7f565b603d6020526000908152604090205481565b34801561096557600080fd5b5061032b610974366004613a7f565b6114be565b34801561098557600080fd5b50610355610994366004613a9c565b6114cf565b3480156109a557600080fd5b5061038a6109b4366004613d8e565b6114f3565b3480156109c557600080fd5b5061032b6109d4366004613da9565b611569565b3480156109e557600080fd5b5061032b6109f4366004613959565b6115de565b348015610a0557600080fd5b50600154600254610780565b610a19611614565b6074546001600160a01b03163314610a4f57610a336138a9565b338152604080820151349101528051610a4d90829061165a565b505b565b60006001600160e01b03198216635a05180f60e01b1480610a765750610a76826118bb565b92915050565b610a846118f0565b6000839003610aa6576040516316ee9d3b60e11b815260040160405180910390fd5b610ab28484848461194a565b50505050565b610ac06118f0565b6000859003610ae2576040516316ee9d3b60e11b815260040160405180910390fd5b610af0868686868686611a1f565b505050505050565b607154600290610100900460ff16158015610b1a575060715460ff8083169116105b610b3f5760405162461bcd60e51b8152600401610b3690613e67565b60405180910390fd5b6071805461ffff191660ff831617610100179055610b5e600b83611bb6565b6071805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600082815260726020526040902060010154610bbe81611c5a565b610bc88383611c64565b505050565b6001600160a01b0381163314610c3d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b36565b610c478282611c86565b5050565b610c536118f0565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610c7d611ca8565b610a4f611d17565b610c8d611614565b610a4d610c9f36839003830183613f54565b3361165a565b6000610caf611614565b610d0b848484808060200260200160405190810160405280939291908181526020016000905b82821015610d0157610cf260608302860136819003810190613fa7565b81526020019060010190610cd5565b5050505050611d69565b949350505050565b607154610100900460ff1615808015610d335750607154600160ff909116105b80610d4d5750303b158015610d4d575060715460ff166001145b610d695760405162461bcd60e51b8152600401610b3690613e67565b6071805460ff191660011790558015610d8c576071805461ff0019166101001790555b610d9760008c6121d3565b6075899055610da58a6121dd565b610e306040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b60208201527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5604082015246606082015230608082015260a0812060775550565b610e3a8887612231565b5050610e4687876122c8565b5050610e50612355565b6000610e5c8680614033565b90501115610f1d57610e85610e718680614033565b610e7e6020890189614033565b8787611a1f565b610eab610e928680614033565b8660005b602002810190610ea69190614033565b6123a2565b610ed1610eb88680614033565b8660015b602002810190610ecc9190614033565b61194a565b610ef7610ede8680614033565b8660025b602002810190610ef29190614033565b612477565b610f1d610f048680614033565b8660035b602002810190610f189190614033565b612588565b60005b610f2d6040870187614033565b9050811015610f9957610f917f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610f676040890189614033565b84818110610f7757610f7761401d565b9050602002016020810190610f8c9190613a7f565b611c64565b600101610f20565b508015610fe0576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610ff9838361265d565b9392505050565b600061101261100d612721565b61278e565b905090565b61101f611ca8565b610a4f6127c4565b61102f6118f0565b61103881612801565b610c478282611bb6565b6000828152607360205260408120610ff99083612837565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461108481611c5a565b600061109d611098368590038501856140cb565b612843565b90506110b1611098368590038501856140cb565b8335600090815260796020526040902054146110e05760405163f4b8742f60e01b815260040160405180910390fd5b82356000908152607a602052604090205460ff166111115760405163147bfe0760e01b815260040160405180910390fd5b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b26309061115b908390869061419f565b60405180910390a160006111756080850160608601613a7f565b9050600061118b6101208601610100870161422c565b600181111561119c5761119c613d3c565b036112635760006111b63686900386016101008701614249565b6001600160a01b0383166000908152603b60205260409020549091506111e2906101408701359061290d565b604082015260006111fc3687900387016101008801614249565b60408301519091506112139061014088013561427b565b6040820152607454611233908390339086906001600160a01b0316612927565b61125c6112466060880160408901613a7f565b60745483919086906001600160a01b0316612927565b505061129f565b61129f6112766060860160408701613a7f565b60745483906001600160a01b03166112973689900389016101008a01614249565b929190612927565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d82856040516112d092919061419f565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6113116118f0565b6000839003611333576040516316ee9d3b60e11b815260040160405180910390fd5b610ab2848484846123a2565b60008061134a6118f0565b61135484846122c8565b9092509050611361612355565b9250929050565b6000611372612721565b60375461137f919061428e565b60385461138c908461428e565b101592915050565b61139c6118f0565b60008390036113be576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612477565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561141857611418613d3c565b600181111561142957611429613d3c565b815290546001600160a01b036101009091048116602092830152908201519192501661146857604051631b79f53b60e21b815260040160405180910390fd5b919050565b6000806114786118f0565b6113548484612231565b6000818152607360205260408120610a7690612c63565b6000828152607260205260409020600101546114b481611c5a565b610bc88383611c86565b6114c66118f0565b610a4d816121dd565b60006114d9612721565b6001546114e6919061428e565b60025461138c908461428e565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561152a5761152a613d3c565b60ff1681526020810191909152604001600020546001600160a01b0316905080611468578160405163409140df60e11b8152600401610b3691906142a5565b6115716118f0565b6000869003611593576040516316ee9d3b60e11b815260040160405180910390fd5b6115a1878787878787611a1f565b6115ae8787836000610e96565b6115bb8787836001610ebc565b6115c88787836002610ee2565b6115d58787836003610f08565b50505050505050565b6115e66118f0565b6000839003611608576040516316ee9d3b60e11b815260040160405180910390fd5b610ab284848484612588565b60005460ff1615610a4f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b36565b604080518082018252600080825260208201526074549184015190916001600160a01b03169061168990612c6d565b60208401516001600160a01b031661172a5734846040015160400151146116c35760405163129c2ce160e31b815260040160405180910390fd5b6116cc816113ca565b60408501515190925060018111156116e6576116e6613d3c565b825160018111156116f9576116f9613d3c565b146117165760405162035e2b60ea1b815260040160405180910390fd5b6001600160a01b0381166020850152611838565b34156117495760405163129c2ce160e31b815260040160405180910390fd5b61175684602001516113ca565b604085015151909250600181111561177057611770613d3c565b8251600181111561178357611783613d3c565b146117a05760405162035e2b60ea1b815260040160405180910390fd5b602084015160408501516117b79185903090612ce8565b83602001516001600160a01b0316816001600160a01b031603611838576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b15801561181f57600080fd5b505af1158015611833573d6000803e3d6000fd5b505050505b6076805460009182611849836142bf565b9190505590506000611870858386602001516075548a612ec990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b61189c82612843565b826040516118ab9291906142fa565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b1480610a7657506301ffc9a760e01b6001600160e01b0319831614610a76565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b36929190614398565b828114611978576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b838110156119e9578282828181106119955761199561401d565b90506020020135603a60008787858181106119b2576119b261401d565b90506020020160208101906119c79190613a7f565b6001600160a01b0316815260208101919091526040016000205560010161197b565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516112d09493929190614424565b8483148015611a2d57508481145b611a58576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b85811015611b7c57848482818110611a7557611a7561401d565b9050602002016020810190611a8a9190613a7f565b60786000898985818110611aa057611aa061401d565b9050602002016020810190611ab59190613a7f565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611afd57611afd61401d565b9050602002016020810190611b12919061422c565b60786000898985818110611b2857611b2861401d565b9050602002016020810190611b3d9190613a7f565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611b6f57611b6f613d3c565b0217905550600101611a5b565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be704448686868686866040516118ab96959493929190614470565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611bec57611bec613d3c565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611c2d57611c2d613d3c565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b610a4d8133612f9e565b611c6e8282613002565b6000828152607360205260409020610bc89082613088565b611c90828261309d565b6000828152607360205260409020610bc89082613104565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316331480611cea57506005546001600160a01b031633145b610a4f576000356001600160e01b0319166001604051620f948f60ea1b8152600401610b36929190614398565b611d1f613119565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000823561014084013582611d846080870160608801613a7f565b9050611da1611d9c3688900388016101008901614249565b612c6d565b6001611db3604088016020890161422c565b6001811115611dc457611dc4613d3c565b14611de25760405163182f3d8760e11b815260040160405180910390fd5b60808601354614611e245760405163092048d160e11b81526000356001600160e01b031916600482015260808701356024820152466044820152606401610b36565b6000611e396108756080890160608a01613a7f565b9050611e4d6101208801610100890161422c565b6001811115611e5e57611e5e613d3c565b81516001811115611e7157611e71613d3c565b148015611ea25750611e8960e0880160c08901613a7f565b6001600160a01b031681602001516001600160a01b0316145b611ebf5760405163f4b8742f60e01b815260040160405180910390fd5b60008481526079602052604090205415611eec57604051634f13df6160e01b815260040160405180910390fd5b6001611f0061012089016101008a0161422c565b6001811115611f1157611f11613d3c565b1480611f245750611f22828461265d565b155b611f415760405163c51297b760e01b815260040160405180910390fd5b6000611f55611098368a90038a018a6140cb565b90506000611f6560775483613162565b90506000611f85611f7e6101208c016101008d0161422c565b86886131a3565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e518110156120aa578e8181518110611fca57611fca61401d565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa15801561202e573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b03161061207a576000356001600160e01b031916604051635d3dcd3160e01b8152600401610b3691906143c6565b84935061208685613229565b61209090836144e8565b91508682106120a257600195506120aa565b600101611faf565b50846120c957604051639e8f5f6360e01b815260040160405180910390fd5b505050600089815260796020526040902085905550508715612144576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906121309085908d9061419f565b60405180910390a150505050505050610a76565b61214e85876132b5565b61218d61216160608c0160408d01613a7f565b86607460009054906101000a90046001600160a01b03168d610100018036038101906112979190614249565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516121be92919061419f565b60405180910390a15050505050505092915050565b610c478282611c64565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b60008082841115612263576000356001600160e01b0319166040516387f6f09560e01b8152600401610b3691906143c6565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b600080828411156122fa576000356001600160e01b0319166040516387f6f09560e01b8152600401610b3691906143c6565b5050603780546038805492859055839055600480546001810190915560408051838152602081018590529293928592879290917f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016122b9565b600254603754612365919061428e565b603854600154612375919061428e565b1115610a4f576000356001600160e01b0319166040516387f6f09560e01b8152600401610b3691906143c6565b8281146123d0576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b83811015612441578282828181106123ed576123ed61401d565b905060200201356039600087878581811061240a5761240a61401d565b905060200201602081019061241f9190613a7f565b6001600160a01b031681526020810191909152604001600020556001016123d3565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516112d09493929190614424565b8281146124a5576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b8381101561255257620f42408383838181106124c6576124c661401d565b9050602002013511156124ec5760405163572d3bd360e11b815260040160405180910390fd5b8282828181106124fe576124fe61401d565b90506020020135603b600087878581811061251b5761251b61401d565b90506020020160208101906125309190613a7f565b6001600160a01b031681526020810191909152604001600020556001016124a8565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516112d09493929190614424565b8281146125b6576000356001600160e01b0319166040516306b5667560e21b8152600401610b3691906143c6565b60005b83811015612627578282828181106125d3576125d361401d565b90506020020135603c60008787858181106125f0576125f061401d565b90506020020160208101906126059190613a7f565b6001600160a01b031681526020810191909152604001600020556001016125b9565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516112d09493929190614424565b6001600160a01b0382166000908152603a6020526040812054821061268457506000610a76565b600061269362015180426144fb565b6001600160a01b0385166000908152603e60205260409020549091508111156126d95750506001600160a01b0382166000908152603c6020526040902054811015610a76565b6001600160a01b0384166000908152603d60205260409020546126fd9084906144e8565b6001600160a01b0385166000908152603c602052604090205411159150610a769050565b600061272d600b6114f3565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa15801561276a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611012919061451d565b60006002546001600254846001546127a6919061428e565b6127b091906144e8565b6127ba919061427b565b610a7691906144fb565b6127cc611614565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d4c3390565b806001600160a01b03163b600003610a4d57604051630bfc64a360e21b81526001600160a01b0382166004820152602401610b36565b6000610ff98383613345565b600080612853836040015161336f565b90506000612864846060015161336f565b905060006128b88560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000620f424061291d838561428e565b610ff991906144fb565b6000816001600160a01b0316836001600160a01b0316036129d65760408086015190516001600160a01b0386169180156108fc02916000818181858888f193505050506129d157816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156129ad57600080fd5b505af11580156129c1573d6000803e3d6000fd5b50505050506129d18585856133b7565b612c5c565b6000855160018111156129eb576129eb613d3c565b03612b54576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5b919061451d565b90508560400151811015612b4357836001600160a01b03166340c10f1930838960400151612a89919061427b565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612add919061455a565b6000604051808303816000865af19150503d8060008114612b1a576040519150601f19603f3d011682016040523d82523d6000602084013e612b1f565b606091505b50508092505081612b4357604051632f739fff60e11b815260040160405180910390fd5b612b4e8686866133b7565b50612c5c565b600185516001811115612b6957612b69613d3c565b03612c4357612b7d83858760200151613435565b6129d157602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b1790525191851691612bdd919061455a565b6000604051808303816000865af19150503d8060008114612c1a576040519150601f19603f3d011682016040523d82523d6000602084013e612c1f565b606091505b505080915050806129d15760405163c8e3a09f60e01b815260040160405180910390fd5b6040516361e411a760e11b815260040160405180910390fd5b5050505050565b6000610a76825490565b600081516001811115612c8257612c82613d3c565b148015612c93575060008160400151115b8015612ca157506020810151155b80612ccb5750600181516001811115612cbc57612cbc613d3c565b148015612ccb57506040810151155b610a4d5760405163034992a760e51b815260040160405180910390fd5b600060608186516001811115612d0057612d00613d3c565b03612ddd5760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d69919061455a565b6000604051808303816000865af19150503d8060008114612da6576040519150601f19603f3d011682016040523d82523d6000602084013e612dab565b606091505b509092509050818015612dd6575080511580612dd6575080806020019051810190612dd69190614576565b9150612ea3565b600186516001811115612df257612df2613d3c565b03612c4357602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612e5b919061455a565b6000604051808303816000865af19150503d8060008114612e98576040519150601f19603f3d011682016040523d82523d6000602084013e612e9d565b606091505b50909250505b81610af05785858585604051639d2e4c6760e01b8152600401610b369493929190614598565b612f396040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b612fa882826112de565b610c4757612fc0816001600160a01b031660146134e0565b612fcb8360206134e0565b604051602001612fdc9291906145ce565b60408051601f198184030181529082905262461bcd60e51b8252610b3691600401614643565b61300c82826112de565b610c475760008281526072602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610ff9836001600160a01b03841661367c565b6130a782826112de565b15610c475760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610ff9836001600160a01b0384166136cb565b60005460ff16610a4f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b36565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610ff9565b60008060006131b0612721565b90506131bb8161278e565b925060008660018111156131d1576131d1613d3c565b03613220576001600160a01b0385166000908152603960205260409020548410613201576131fe816137be565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6000613235600b6114f3565b60405163901979d560e01b81526001600160a01b038481166004830152919091169063901979d590602401602060405180830381865afa15801561327d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a19190614676565b6bffffffffffffffffffffffff1692915050565b60006132c462015180426144fb565b6001600160a01b0384166000908152603e6020526040902054909150811115613313576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d60205260408120805484929061333b9084906144e8565b9091555050505050565b600082600001828154811061335c5761335c61401d565b9060005260206000200154905092915050565b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b600080845160018111156133cd576133cd613d3c565b036133e8576133e1828486604001516137d6565b9050613411565b6001845160018111156133fd576133fd613d3c565b03612c43576133e182848660200151613435565b80610ab2578383836040516341bd7d9160e11b8152600401610b36939291906146a4565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928616916134939161455a565b6000604051808303816000865af19150503d80600081146134d0576040519150601f19603f3d011682016040523d82523d6000602084013e6134d5565b606091505b509095945050505050565b606060006134ef83600261428e565b6134fa9060026144e8565b67ffffffffffffffff81111561351257613512613eb5565b6040519080825280601f01601f19166020018201604052801561353c576020820181803683370190505b509050600360fc1b816000815181106135575761355761401d565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106135865761358661401d565b60200101906001600160f81b031916908160001a90535060006135aa84600261428e565b6135b59060016144e8565b90505b600181111561362d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106135e9576135e961401d565b1a60f81b8282815181106135ff576135ff61401d565b60200101906001600160f81b031916908160001a90535060049490941c93613626816146d4565b90506135b8565b508315610ff95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b36565b60008181526001830160205260408120546136c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a76565b506000610a76565b600081815260018301602052604081205480156137b45760006136ef60018361427b565b85549091506000906137039060019061427b565b90508181146137685760008660000182815481106137235761372361401d565b90600052602060002001549050808760000184815481106137465761374661401d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613779576137796146eb565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a76565b6000915050610a76565b60006038546001603854846037546127a6919061428e565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613833919061455a565b6000604051808303816000865af19150503d8060008114613870576040519150601f19603f3d011682016040523d82523d6000602084013e613875565b606091505b5090925090508180156138a05750805115806138a05750808060200190518101906138a09190614576565b95945050505050565b60408051606081018252600080825260208201529081016138e56040805160608101909152806000815260200160008152602001600081525090565b905290565b6000602082840312156138fc57600080fd5b81356001600160e01b031981168114610ff957600080fd5b60008083601f84011261392657600080fd5b50813567ffffffffffffffff81111561393e57600080fd5b6020830191508360208260051b850101111561136157600080fd5b6000806000806040858703121561396f57600080fd5b843567ffffffffffffffff8082111561398757600080fd5b61399388838901613914565b909650945060208701359150808211156139ac57600080fd5b506139b987828801613914565b95989497509550505050565b600080600080600080606087890312156139de57600080fd5b863567ffffffffffffffff808211156139f657600080fd5b613a028a838b01613914565b90985096506020890135915080821115613a1b57600080fd5b613a278a838b01613914565b90965094506040890135915080821115613a4057600080fd5b50613a4d89828a01613914565b979a9699509497509295939492505050565b6001600160a01b0381168114610a4d57600080fd5b803561146881613a5f565b600060208284031215613a9157600080fd5b8135610ff981613a5f565b600060208284031215613aae57600080fd5b5035919050565b60008060408385031215613ac857600080fd5b823591506020830135613ada81613a5f565b809150509250929050565b600060a08284031215613af757600080fd5b50919050565b60006101608284031215613af757600080fd5b60008060006101808486031215613b2657600080fd5b613b308585613afd565b925061016084013567ffffffffffffffff80821115613b4e57600080fd5b818601915086601f830112613b6257600080fd5b813581811115613b7157600080fd5b876020606083028501011115613b8657600080fd5b6020830194508093505050509250925092565b8060608101831015610a7657600080fd5b8060808101831015610a7657600080fd5b6000806000806000806000806000806101208b8d031215613bdb57600080fd5b613be48b613a74565b9950613bf260208c01613a74565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff80821115613c2b57600080fd5b613c378e838f01613b99565b955060e08d0135915080821115613c4d57600080fd5b613c598e838f01613baa565b94506101008d0135915080821115613c7057600080fd5b50613c7d8d828e01613914565b915080935050809150509295989b9194979a5092959850565b60008060408385031215613ca957600080fd5b8235613cb481613a5f565b946020939093013593505050565b80356010811061146857600080fd5b60008060408385031215613ce457600080fd5b613ced83613cc2565b91506020830135613ada81613a5f565b60008060408385031215613d1057600080fd5b50508035926020909101359150565b60006101608284031215613d3257600080fd5b610ff98383613afd565b634e487b7160e01b600052602160045260246000fd5b60028110610a4d57610a4d613d3c565b81516040820190613d7281613d52565b82526020928301516001600160a01b0316929091019190915290565b600060208284031215613da057600080fd5b610ff982613cc2565b60008060008060008060006080888a031215613dc457600080fd5b873567ffffffffffffffff80821115613ddc57600080fd5b613de88b838c01613914565b909950975060208a0135915080821115613e0157600080fd5b613e0d8b838c01613914565b909750955060408a0135915080821115613e2657600080fd5b613e328b838c01613914565b909550935060608a0135915080821115613e4b57600080fd5b50613e588a828b01613baa565b91505092959891949750929550565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715613efc57634e487b7160e01b600052604160045260246000fd5b60405290565b60028110610a4d57600080fd5b600060608284031215613f2157600080fd5b613f29613ecb565b90508135613f3681613f02565b80825250602082013560208201526040820135604082015292915050565b600060a08284031215613f6657600080fd5b613f6e613ecb565b8235613f7981613a5f565b81526020830135613f8981613a5f565b6020820152613f9b8460408501613f0f565b60408201529392505050565b600060608284031215613fb957600080fd5b6040516060810181811067ffffffffffffffff82111715613fea57634e487b7160e01b600052604160045260246000fd5b604052823560ff81168114613ffe57600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261404a57600080fd5b83018035915067ffffffffffffffff82111561406557600080fd5b6020019150600581901b360382131561136157600080fd5b60006060828403121561408f57600080fd5b614097613ecb565b905081356140a481613a5f565b815260208201356140b481613a5f565b806020830152506040820135604082015292915050565b600061016082840312156140de57600080fd5b60405160a0810181811067ffffffffffffffff8211171561410f57634e487b7160e01b600052604160045260246000fd5b60405282358152602083013561412481613f02565b6020820152614136846040850161407d565b60408201526141488460a0850161407d565b606082015261415b846101008501613f0f565b60808201529392505050565b803561417281613a5f565b6001600160a01b03908116835260208201359061418e82613a5f565b166020830152604090810135910152565b6000610180820190508382528235602083015260208301356141c081613f02565b6141c981613d52565b806040840152506141e06060830160408501614167565b6141f060c0830160a08501614167565b61012061010084013561420281613f02565b61420b81613d52565b81840152830135610140808401919091529092013561016090910152919050565b60006020828403121561423e57600080fd5b8135610ff981613f02565b60006060828403121561425b57600080fd5b610ff98383613f0f565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a7657610a76614265565b8082028115828204841417610a7657610a76614265565b60208101601083106142b9576142b9613d3c565b91905290565b6000600182016142d1576142d1614265565b5060010190565b80516142e381613d52565b825260208181015190830152604090810151910152565b60006101808201905083825282516020830152602083015161431b81613d52565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301516143906101208401826142d8565b509392505050565b6001600160e01b03198316815260408101600b83106143b9576143b9613d3c565b8260208301529392505050565b6001600160e01b031991909116815260200190565b8183526000602080850194508260005b858110156144195781356143fe81613a5f565b6001600160a01b0316875295820195908201906001016143eb565b509495945050505050565b6040815260006144386040830186886143db565b82810360208401528381526001600160fb1b0384111561445757600080fd5b8360051b80866020840137016020019695505050505050565b60608152600061448460608301888a6143db565b60208382038185015261449882888a6143db565b8481036040860152858152869250810160005b868110156144d95783356144be81613f02565b6144c781613d52565b825292820192908201906001016144ab565b509a9950505050505050505050565b80820180821115610a7657610a76614265565b60008261451857634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561452f57600080fd5b5051919050565b60005b83811015614551578181015183820152602001614539565b50506000910152565b6000825161456c818460208701614536565b9190910192915050565b60006020828403121561458857600080fd5b81518015158114610ff957600080fd5b60c081016145a682876142d8565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614606816017850160208801614536565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614637816028840160208801614536565b01602801949350505050565b6020815260008251806020840152614662816040850160208701614536565b601f01601f19169190910160400192915050565b60006020828403121561468857600080fd5b81516bffffffffffffffffffffffff81168114610ff957600080fd5b60a081016146b282866142d8565b6001600160a01b03938416606083015291909216608090920191909152919050565b6000816146e3576146e3614265565b506000190190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122067a7e41e0d11cc4f13027848a796f28bc789f50aade1ce98bb6b3473be92478464736f6c63430008110033", - "devdoc": { "errors": { "ErrContractTypeNotFound(uint8)": [ { "details": "Error of invalid role." } ], + "ErrERC1155MintingFailed()": [ + { + "details": "Error indicating that the mint of ERC1155 tokens has failed." + } + ], "ErrERC20MintingFailed()": [ { "details": "Error indicating that the minting of ERC20 tokens has failed." @@ -2278,7 +335,7 @@ ], "ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)": [ { - "details": "Error indicating that the `transferFrom` has failed.", + "details": "Error indicating that the `handleAssetIn` has failed.", "params": { "from": "Owner of the token value.", "to": "Receiver of the token value.", @@ -2296,6 +353,16 @@ } } ], + "ErrUnexpectedInternalCall(bytes4,uint8,address)": [ + { + "details": "Error indicating that the caller is unauthorized to perform a specific function.", + "params": { + "actual": "The actual address that called to the function.", + "expectedContractType": "The contract type required to perform the function.", + "msgSig": "The function signature (bytes4)." + } + } + ], "ErrUnsupportedStandard()": [ { "details": "Error indicating that an unsupported standard is encountered." @@ -2311,404 +378,268 @@ "details": "Error of set to non-contract." } ] - }, - "kind": "dev", - "methods": { - "DOMAIN_SEPARATOR()": { - "details": "Returns the domain seperator." - }, - "checkHighTierVoteWeightThreshold(uint256)": { - "details": "Checks whether the `_voteWeight` passes the high-tier vote weight threshold." - }, - "checkThreshold(uint256)": { - "details": "Checks whether the `_voteWeight` passes the threshold." - }, - "getContract(uint8)": { - "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", - "params": { - "contractType": "The role of the contract to retrieve." - }, - "returns": { - "contract_": "The address of the contract with the specified role." - } - }, - "getHighTierVoteWeightThreshold()": { - "details": "Returns the high-tier vote weight threshold." - }, - "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." - }, - "getRoninToken(address)": { - "details": "Returns token address on Ronin network. Note: Reverts for unsupported token." - }, - "getThreshold()": { - "details": "Returns the threshold." - }, - "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. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])": { - "details": "Initializes contract storage." - }, - "mapTokens(address[],address[],uint8[])": { - "details": "Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." - }, - "mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])": { - "details": "Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." - }, - "minimumVoteWeight()": { - "details": "Returns the minimum vote weight to pass the threshold." - }, - "pause()": { - "details": "Triggers paused state." - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "reachedWithdrawalLimit(address,uint256)": { - "details": "Checks whether the withdrawal reaches the limitation." - }, - "receiveEther()": { - "details": "Receives ether without doing anything. Use this function to topup native token." - }, - "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "requestDepositFor((address,address,(uint8,uint256,uint256)))": { - "details": "Locks the assets and request deposit." - }, - "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. May emit a {RoleRevoked} event." - }, - "setContract(uint8,address)": { - "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", - "params": { - "addr": "The address of the contract to set.", - "contractType": "The role of the contract to set." - } - }, - "setDailyWithdrawalLimits(address[],uint256[])": { - "details": "Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event." - }, - "setEmergencyPauser(address)": { - "details": "Grant emergency pauser role for `_addr`." - }, - "setHighTierThresholds(address[],uint256[])": { - "details": "Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event." - }, - "setHighTierVoteWeightThreshold(uint256,uint256)": { - "details": "Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event." - }, - "setLockedThresholds(address[],uint256[])": { - "details": "Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event." - }, - "setThreshold(uint256,uint256)": { - "details": "Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold." - }, - "setUnlockFeePercentages(address[],uint256[])": { - "details": "Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event." - }, - "setWrappedNativeTokenContract(address)": { - "details": "Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event." - }, - "submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])": { - "details": "Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released." - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { - "details": "Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released." - }, - "unpause()": { - "details": "Triggers unpaused state." - } - }, - "stateVariables": { - "WITHDRAWAL_UNLOCKER_ROLE": { - "details": "Withdrawal unlocker role hash" - }, - "______deprecatedBridgeOperatorAddedBlock": { - "custom:deprecated": "Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))" - }, - "______deprecatedBridgeOperators": { - "custom:deprecated": "Previously `_bridgeOperators` (uint256[])" - }, - "_domainSeparator": { - "details": "Domain seperator" - }, - "_roninToken": { - "details": "Mapping from mainchain token => token address on Ronin network" - }, - "depositCount": { - "details": "Total deposit" - }, - "roninChainId": { - "details": "Ronin network id" - }, - "withdrawalHash": { - "details": "Mapping from withdrawal id => withdrawal hash" - }, - "withdrawalLocked": { - "details": "Mapping from withdrawal id => locked" - }, - "wrappedNativeToken": { - "details": "Wrapped native token address" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "unlockFeePercentages(address)": { - "notice": "Values 0-1,000,000 map to 0%-100%" - } - }, - "version": 1 + } }, + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrERC1155MintingFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrERC20MintingFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrERC721MintingFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrEmptyArray\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ErrInvalidChainId\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInfo\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidOrder\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidPercentage\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidReceipt\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidReceiptKind\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidRequest\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidTokenStandard\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrQueryForApprovedWithdrawal\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrQueryForInsufficientVoteWeight\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrQueryForProcessedWithdrawal\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrReachedDailyWithdrawalLimit\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"tokenInfo\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"token\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrTokenCouldNotTransfer\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"tokenInfo\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"token\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrTokenCouldNotTransferFrom\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"expectedContractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrUnexpectedInternalCall\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrUnsupportedStandard\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrUnsupportedToken\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"limits\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"DailyWithdrawalLimitsUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"receipt\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"DepositRequested\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"thresholds\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"HighTierThresholdsUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"HighTierVoteWeightThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"thresholds\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"LockedThresholdsUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"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\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"mainchainTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"roninTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum TokenStandard[]\\\",\\\"name\\\":\\\"standards\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"TokenMapped\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"percentages\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"UnlockFeePercentagesUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"Unpaused\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"receipt\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"WithdrawalLocked\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"receipt\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"WithdrawalUnlocked\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"receipt\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"Withdrew\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"contract IWETH\\\",\\\"name\\\":\\\"weth\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"WrappedNativeTokenContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"fallback\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DEFAULT_ADMIN_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DOMAIN_SEPARATOR\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"WITHDRAWAL_UNLOCKER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"_MAX_PERCENTAGE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkHighTierVoteWeightThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"dailyWithdrawalLimit\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"depositCount\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"emergencyPauser\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getHighTierVoteWeightThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"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\\\":\\\"address\\\",\\\"name\\\":\\\"mainchainToken\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getRoninToken\\\",\\\"outputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"}],\\\"internalType\\\":\\\"struct MappedTokenConsumer.MappedToken\\\",\\\"name\\\":\\\"token\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num_\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom_\\\",\\\"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\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"highTierThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_roleSetter\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract IWETH\\\",\\\"name\\\":\\\"_wrappedToken\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_roninChainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_highTierVWNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address[][3]\\\",\\\"name\\\":\\\"_addresses\\\",\\\"type\\\":\\\"address[][3]\\\"},{\\\"internalType\\\":\\\"uint256[][4]\\\",\\\"name\\\":\\\"_thresholds\\\",\\\"type\\\":\\\"uint256[][4]\\\"},{\\\"internalType\\\":\\\"enum TokenStandard[]\\\",\\\"name\\\":\\\"_standards\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"initialize\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeManagerContract\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"initializeV2\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"initializeV3\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address payable\\\",\\\"name\\\":\\\"wethUnwrapper_\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"initializeV4\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"lastDateSynced\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"lastSyncedWithdrawal\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"lockedThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_mainchainTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_roninTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum TokenStandard[]\\\",\\\"name\\\":\\\"_standards\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"mapTokens\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_mainchainTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_roninTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum TokenStandard[]\\\",\\\"name\\\":\\\"_standards\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[][4]\\\",\\\"name\\\":\\\"_thresholds\\\",\\\"type\\\":\\\"uint256[][4]\\\"}],\\\"name\\\":\\\"mapTokensAndThresholds\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"nonce\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"operators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"addeds\\\",\\\"type\\\":\\\"bool[]\\\"}],\\\"name\\\":\\\"onBridgeOperatorsAdded\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"operators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"removeds\\\",\\\"type\\\":\\\"bool[]\\\"}],\\\"name\\\":\\\"onBridgeOperatorsRemoved\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"onERC1155BatchReceived\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"onERC1155Received\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"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\\\":\\\"_token\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"reachedWithdrawalLimit\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"receiveEther\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"role\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"renounceRole\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"recipientAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct Transfer.Request\\\",\\\"name\\\":\\\"_request\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"requestDepositFor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"recipientAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct Transfer.Request[]\\\",\\\"name\\\":\\\"_requests\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"requestDepositForBatch\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"role\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"revokeRole\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"roninChainId\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"_limits\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"setDailyWithdrawalLimits\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setEmergencyPauser\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"_thresholds\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"setHighTierThresholds\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_denominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setHighTierVoteWeightThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_previousNum\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_previousDenom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"_thresholds\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"setLockedThresholds\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"_percentages\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"setUnlockFeePercentages\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"contract IWETH\\\",\\\"name\\\":\\\"_wrappedToken\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setWrappedNativeTokenContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"_receipt\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"submitWithdrawal\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"_locked\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"supportsInterface\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"unlockFeePercentages\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"receipt\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"unlockWithdrawal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"wethUnwrapper\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract WethUnwrapper\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"withdrawalHash\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"withdrawalLocked\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"wrappedNativeToken\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract IWETH\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"receive\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrERC1155MintingFailed()\\\":[{\\\"details\\\":\\\"Error indicating that the mint of ERC1155 tokens has failed.\\\"}],\\\"ErrERC20MintingFailed()\\\":[{\\\"details\\\":\\\"Error indicating that the minting of ERC20 tokens has failed.\\\"}],\\\"ErrERC721MintingFailed()\\\":[{\\\"details\\\":\\\"Error indicating that the minting of ERC721 tokens has failed.\\\"}],\\\"ErrEmptyArray()\\\":[{\\\"details\\\":\\\"Error indicating that an array is empty when it should contain elements.\\\"}],\\\"ErrInvalidChainId(bytes4,uint256,uint256)\\\":[{\\\"details\\\":\\\"Error indicating that the chain ID is invalid.\\\",\\\"params\\\":{\\\"actual\\\":\\\"Current chain ID that executing function.\\\",\\\"expected\\\":\\\"Expected chain ID required for the tx to success.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\"}}],\\\"ErrInvalidInfo()\\\":[{\\\"details\\\":\\\"Error indicating that the provided information is invalid.\\\"}],\\\"ErrInvalidOrder(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that an order is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid order.\\\"}}],\\\"ErrInvalidPercentage()\\\":[{\\\"details\\\":\\\"Error of invalid percentage.\\\"}],\\\"ErrInvalidReceipt()\\\":[{\\\"details\\\":\\\"Error indicating that a receipt is invalid.\\\"}],\\\"ErrInvalidReceiptKind()\\\":[{\\\"details\\\":\\\"Error indicating that a receipt kind is invalid.\\\"}],\\\"ErrInvalidRequest()\\\":[{\\\"details\\\":\\\"Error indicating that a request is invalid.\\\"}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidTokenStandard()\\\":[{\\\"details\\\":\\\"Error indicating that a token standard is invalid.\\\"}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrQueryForApprovedWithdrawal()\\\":[{\\\"details\\\":\\\"Error indicating that a query was made for an approved withdrawal.\\\"}],\\\"ErrQueryForInsufficientVoteWeight()\\\":[{\\\"details\\\":\\\"Error indicating that a query was made for insufficient vote weight.\\\"}],\\\"ErrQueryForProcessedWithdrawal()\\\":[{\\\"details\\\":\\\"Error indicating that a query was made for a processed withdrawal.\\\"}],\\\"ErrReachedDailyWithdrawalLimit()\\\":[{\\\"details\\\":\\\"Error indicating that the daily withdrawal limit has been reached.\\\"}],\\\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\\\":[{\\\"details\\\":\\\"Error indicating that the `transfer` has failed.\\\",\\\"params\\\":{\\\"to\\\":\\\"Receiver of the token value.\\\",\\\"token\\\":\\\"Address of the token.\\\",\\\"tokenInfo\\\":\\\"Info of the token including ERC standard, id or quantity.\\\"}}],\\\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\\\":[{\\\"details\\\":\\\"Error indicating that the `handleAssetIn` has failed.\\\",\\\"params\\\":{\\\"from\\\":\\\"Owner of the token value.\\\",\\\"to\\\":\\\"Receiver of the token value.\\\",\\\"token\\\":\\\"Address of the token.\\\",\\\"tokenInfo\\\":\\\"Info of the token including ERC standard, id or quantity.\\\"}}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnexpectedInternalCall(bytes4,uint8,address)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"actual\\\":\\\"The actual address that called to the function.\\\",\\\"expectedContractType\\\":\\\"The contract type required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4).\\\"}}],\\\"ErrUnsupportedStandard()\\\":[{\\\"details\\\":\\\"Error indicating that an unsupported standard is encountered.\\\"}],\\\"ErrUnsupportedToken()\\\":[{\\\"details\\\":\\\"Error indicating that a token is not supported.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"DailyWithdrawalLimitsUpdated(address[],uint256[])\\\":{\\\"details\\\":\\\"Emitted when the daily limit thresholds are updated\\\"},\\\"DepositRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Emitted when the deposit is requested\\\"},\\\"HighTierThresholdsUpdated(address[],uint256[])\\\":{\\\"details\\\":\\\"Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\\"},\\\"HighTierVoteWeightThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the high-tier vote weight threshold is updated\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"LockedThresholdsUpdated(address[],uint256[])\\\":{\\\"details\\\":\\\"Emitted when the thresholds for locked withdrawals are updated\\\"},\\\"Paused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is triggered by `account`.\\\"},\\\"RoleAdminChanged(bytes32,bytes32,bytes32)\\\":{\\\"details\\\":\\\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\\\"},\\\"RoleGranted(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\\\"},\\\"RoleRevoked(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"},\\\"TokenMapped(address[],address[],uint8[])\\\":{\\\"details\\\":\\\"Emitted when the tokens are mapped\\\"},\\\"UnlockFeePercentagesUpdated(address[],uint256[])\\\":{\\\"details\\\":\\\"Emitted when the fee percentages to unlock withdraw are updated\\\"},\\\"Unpaused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is lifted by `account`.\\\"},\\\"WithdrawalLocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Emitted when the withdrawal is locked\\\"},\\\"WithdrawalUnlocked(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Emitted when the withdrawal is unlocked\\\"},\\\"Withdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Emitted when the assets are withdrawn\\\"},\\\"WrappedNativeTokenContractUpdated(address)\\\":{\\\"details\\\":\\\"Emitted when the wrapped native token contract is updated\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"DOMAIN_SEPARATOR()\\\":{\\\"details\\\":\\\"Returns the domain seperator.\\\"},\\\"checkHighTierVoteWeightThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\\"},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getHighTierVoteWeightThreshold()\\\":{\\\"details\\\":\\\"Returns the high-tier vote weight threshold.\\\"},\\\"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.\\\"},\\\"getRoninToken(address)\\\":{\\\"details\\\":\\\"Returns token address on Ronin network. Note: Reverts for unsupported token.\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"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. May emit a {RoleGranted} event.\\\"},\\\"hasRole(bytes32,address)\\\":{\\\"details\\\":\\\"Returns `true` if `account` has been granted `role`.\\\"},\\\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\\\":{\\\"details\\\":\\\"Initializes contract storage.\\\"},\\\"mapTokens(address[],address[],uint8[])\\\":{\\\"details\\\":\\\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\\\"},\\\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\\\":{\\\"details\\\":\\\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\\\"},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"onBridgeOperatorsAdded(address[],uint96[],bool[])\\\":{\\\"details\\\":\\\"Handles the event when bridge operators are added.\\\",\\\"params\\\":{\\\"addeds\\\":\\\"The corresponding boolean values indicating whether the operators were added or not.\\\",\\\"bridgeOperators\\\":\\\"The addresses of the bridge operators.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"The selector of the function being called.\\\"}},\\\"onBridgeOperatorsRemoved(address[],bool[])\\\":{\\\"details\\\":\\\"Handles the event when bridge operators are removed.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"The addresses of the bridge operators.\\\",\\\"removeds\\\":\\\"The corresponding boolean values indicating whether the operators were removed or not.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"The selector of the function being called.\\\"}},\\\"pause()\\\":{\\\"details\\\":\\\"Triggers paused state.\\\"},\\\"paused()\\\":{\\\"details\\\":\\\"Returns true if the contract is paused, and false otherwise.\\\"},\\\"reachedWithdrawalLimit(address,uint256)\\\":{\\\"details\\\":\\\"Checks whether the withdrawal reaches the limitation.\\\"},\\\"receiveEther()\\\":{\\\"details\\\":\\\"Receives ether without doing anything. Use this function to topup native token.\\\"},\\\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\\\"},\\\"requestDepositFor((address,address,(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Locks the assets and request deposit.\\\"},\\\"requestDepositForBatch((address,address,(uint8,uint256,uint256))[])\\\":{\\\"details\\\":\\\"Locks the assets and request deposit for batch.\\\"},\\\"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. May emit a {RoleRevoked} event.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setDailyWithdrawalLimits(address[],uint256[])\\\":{\\\"details\\\":\\\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\\\"},\\\"setEmergencyPauser(address)\\\":{\\\"details\\\":\\\"Grant emergency pauser role for `_addr`.\\\"},\\\"setHighTierThresholds(address[],uint256[])\\\":{\\\"details\\\":\\\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\\\"},\\\"setHighTierVoteWeightThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\\\"},\\\"setLockedThresholds(address[],uint256[])\\\":{\\\"details\\\":\\\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\\\"},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Override `GatewayV3-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\\"},\\\"setUnlockFeePercentages(address[],uint256[])\\\":{\\\"details\\\":\\\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\\\"},\\\"setWrappedNativeTokenContract(address)\\\":{\\\"details\\\":\\\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\\\"},\\\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\\\"},\\\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\\\"},\\\"unpause()\\\":{\\\"details\\\":\\\"Triggers unpaused state.\\\"}},\\\"stateVariables\\\":{\\\"WITHDRAWAL_UNLOCKER_ROLE\\\":{\\\"details\\\":\\\"Withdrawal unlocker role hash\\\"},\\\"______deprecatedBridgeOperatorAddedBlock\\\":{\\\"custom:deprecated\\\":\\\"Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\\"},\\\"______deprecatedBridgeOperators\\\":{\\\"custom:deprecated\\\":\\\"Previously `_bridgeOperators` (uint256[])\\\"},\\\"_domainSeparator\\\":{\\\"details\\\":\\\"Domain separator\\\"},\\\"_roninToken\\\":{\\\"details\\\":\\\"Mapping from mainchain token => token address on Ronin network\\\"},\\\"depositCount\\\":{\\\"details\\\":\\\"Total deposit\\\"},\\\"roninChainId\\\":{\\\"details\\\":\\\"Ronin network id\\\"},\\\"withdrawalHash\\\":{\\\"details\\\":\\\"Mapping from withdrawal id => withdrawal hash\\\"},\\\"withdrawalLocked\\\":{\\\"details\\\":\\\"Mapping from withdrawal id => locked\\\"},\\\"wrappedNativeToken\\\":{\\\"details\\\":\\\"Wrapped native token address\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"unlockFeePercentages(address)\\\":{\\\"notice\\\":\\\"Values 0-1,000,000 map to 0%-100%\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/mainchain/MainchainGatewayV3.sol\\\":\\\"MainchainGatewayV3\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\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 ReentrancyGuard {\\\\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 constructor() {\\\\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 making 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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"./IERC1155Receiver.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC1155MetadataURI.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the basic standard multi-token.\\\\n * See https://eips.ethereum.org/EIPS/eip-1155\\\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\\\n using Address for address;\\\\n\\\\n // Mapping from token ID to account balances\\\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\\\n\\\\n // Mapping from account to operator approvals\\\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\\\n\\\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\\\n string private _uri;\\\\n\\\\n /**\\\\n * @dev See {_setURI}.\\\\n */\\\\n constructor(string memory uri_) {\\\\n _setURI(uri_);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\\\n return\\\\n interfaceId == type(IERC1155).interfaceId ||\\\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\\\n super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155MetadataURI-uri}.\\\\n *\\\\n * This implementation returns the same URI for *all* token types. It relies\\\\n * on the token type ID substitution mechanism\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\\\n *\\\\n * Clients calling this function must replace the `\\\\\\\\{id\\\\\\\\}` substring with the\\\\n * actual token type ID.\\\\n */\\\\n function uri(uint256) public view virtual override returns (string memory) {\\\\n return _uri;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-balanceOf}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `account` cannot be the zero address.\\\\n */\\\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\\\n require(account != address(0), \\\\\\\"ERC1155: address zero is not a valid owner\\\\\\\");\\\\n return _balances[id][account];\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-balanceOfBatch}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `accounts` and `ids` must have the same length.\\\\n */\\\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\\\n public\\\\n view\\\\n virtual\\\\n override\\\\n returns (uint256[] memory)\\\\n {\\\\n require(accounts.length == ids.length, \\\\\\\"ERC1155: accounts and ids length mismatch\\\\\\\");\\\\n\\\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\\\n\\\\n for (uint256 i = 0; i < accounts.length; ++i) {\\\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\\\n }\\\\n\\\\n return batchBalances;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-setApprovalForAll}.\\\\n */\\\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\\\n _setApprovalForAll(_msgSender(), operator, approved);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-isApprovedForAll}.\\\\n */\\\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\\\n return _operatorApprovals[account][operator];\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-safeTransferFrom}.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) public virtual override {\\\\n require(\\\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n _safeTransferFrom(from, to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\\\n */\\\\n function safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) public virtual override {\\\\n require(\\\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: transfer to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: insufficient balance for transfer\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n _balances[id][to] += amount;\\\\n\\\\n emit TransferSingle(operator, from, to, id, amount);\\\\n\\\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC1155: transfer to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n for (uint256 i = 0; i < ids.length; ++i) {\\\\n uint256 id = ids[i];\\\\n uint256 amount = amounts[i];\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: insufficient balance for transfer\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n _balances[id][to] += amount;\\\\n }\\\\n\\\\n emit TransferBatch(operator, from, to, ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\\\n * substitution mechanism\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\\\n *\\\\n * By this mechanism, any occurrence of the `\\\\\\\\{id\\\\\\\\}` substring in either the\\\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\\\n * clients with the token type ID.\\\\n *\\\\n * For example, the `https://token-cdn-domain/\\\\\\\\{id\\\\\\\\}.json` URI would be\\\\n * interpreted by clients as\\\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\\\n * for token type ID 0x4cce0.\\\\n *\\\\n * See {uri}.\\\\n *\\\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\\\n * this function emits no events.\\\\n */\\\\n function _setURI(string memory newuri) internal virtual {\\\\n _uri = newuri;\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _mint(\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: mint to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _balances[id][to] += amount;\\\\n emit TransferSingle(operator, address(0), to, id, amount);\\\\n\\\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _mintBatch(\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: mint to the zero address\\\\\\\");\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n for (uint256 i = 0; i < ids.length; i++) {\\\\n _balances[ids[i]][to] += amounts[i];\\\\n }\\\\n\\\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `from` must have at least `amount` tokens of token type `id`.\\\\n */\\\\n function _burn(\\\\n address from,\\\\n uint256 id,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC1155: burn from the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n\\\\n emit TransferSingle(operator, from, address(0), id, amount);\\\\n\\\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n */\\\\n function _burnBatch(\\\\n address from,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC1155: burn from the zero address\\\\\\\");\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n\\\\n for (uint256 i = 0; i < ids.length; i++) {\\\\n uint256 id = ids[i];\\\\n uint256 amount = amounts[i];\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n }\\\\n\\\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Approve `operator` to operate on all of `owner` tokens\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n */\\\\n function _setApprovalForAll(\\\\n address owner,\\\\n address operator,\\\\n bool approved\\\\n ) internal virtual {\\\\n require(owner != operator, \\\\\\\"ERC1155: setting approval status for self\\\\\\\");\\\\n _operatorApprovals[owner][operator] = approved;\\\\n emit ApprovalForAll(owner, operator, approved);\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before any token transfer. This includes minting\\\\n * and burning, as well as batched variants.\\\\n *\\\\n * The same hook is called on both single and batched variants. For single\\\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\\\n *\\\\n * Calling conditions (for each `id` and `amount` pair):\\\\n *\\\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\\\n * of token type `id` will be transferred to `to`.\\\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\\\n * for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\\\n * will be burned.\\\\n * - `from` and `to` are never both zero.\\\\n * - `ids` and `amounts` have the same, non-zero length.\\\\n *\\\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after any token transfer. This includes minting\\\\n * and burning, as well as batched variants.\\\\n *\\\\n * The same hook is called on both single and batched variants. For single\\\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\\\n *\\\\n * Calling conditions (for each `id` and `amount` pair):\\\\n *\\\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\\\n * of token type `id` will be transferred to `to`.\\\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\\\n * for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\\\n * will be burned.\\\\n * - `from` and `to` are never both zero.\\\\n * - `ids` and `amounts` have the same, non-zero length.\\\\n *\\\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\\\n */\\\\n function _afterTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {}\\\\n\\\\n function _doSafeTransferAcceptanceCheck(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) private {\\\\n if (to.isContract()) {\\\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\\\n revert(\\\\\\\"ERC1155: ERC1155Receiver rejected tokens\\\\\\\");\\\\n }\\\\n } catch Error(string memory reason) {\\\\n revert(reason);\\\\n } catch {\\\\n revert(\\\\\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\\\\\");\\\\n }\\\\n }\\\\n }\\\\n\\\\n function _doSafeBatchTransferAcceptanceCheck(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) private {\\\\n if (to.isContract()) {\\\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\\\n bytes4 response\\\\n ) {\\\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\\\n revert(\\\\\\\"ERC1155: ERC1155Receiver rejected tokens\\\\\\\");\\\\n }\\\\n } catch Error(string memory reason) {\\\\n revert(reason);\\\\n } catch {\\\\n revert(\\\\\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\\\\\");\\\\n }\\\\n }\\\\n }\\\\n\\\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\\\n uint256[] memory array = new uint256[](1);\\\\n array[0] = element;\\\\n\\\\n return array;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ninterface IERC1155 is IERC165 {\\\\n /**\\\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\\\n */\\\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\\\n\\\\n /**\\\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\\\n * transfers.\\\\n */\\\\n event TransferBatch(\\\\n address indexed operator,\\\\n address indexed from,\\\\n address indexed to,\\\\n uint256[] ids,\\\\n uint256[] values\\\\n );\\\\n\\\\n /**\\\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\\\n * `approved`.\\\\n */\\\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\\\n\\\\n /**\\\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\\\n *\\\\n * If an {URI} event was emitted for `id`, the standard\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\\\n * returned by {IERC1155MetadataURI-uri}.\\\\n */\\\\n event URI(string value, uint256 indexed id);\\\\n\\\\n /**\\\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `account` cannot be the zero address.\\\\n */\\\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `accounts` and `ids` must have the same length.\\\\n */\\\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\\\n external\\\\n view\\\\n returns (uint256[] memory);\\\\n\\\\n /**\\\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `operator` cannot be the caller.\\\\n */\\\\n function setApprovalForAll(address operator, bool approved) external;\\\\n\\\\n /**\\\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\\\n *\\\\n * See {setApprovalForAll}.\\\\n */\\\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes calldata data\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] calldata ids,\\\\n uint256[] calldata amounts,\\\\n bytes calldata data\\\\n ) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev _Available since v3.1._\\\\n */\\\\ninterface IERC1155Receiver is IERC165 {\\\\n /**\\\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\\\n *\\\\n * NOTE: To accept the transfer, this must return\\\\n * `bytes4(keccak256(\\\\\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\\\\\"))`\\\\n * (i.e. 0xf23a6e61, or its own function selector).\\\\n *\\\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\\\n * @param from The address which previously owned the token\\\\n * @param id The ID of the token being transferred\\\\n * @param value The amount of tokens being transferred\\\\n * @param data Additional data with no specified format\\\\n * @return `bytes4(keccak256(\\\\\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\\\\\"))` if transfer is allowed\\\\n */\\\\n function onERC1155Received(\\\\n address operator,\\\\n address from,\\\\n uint256 id,\\\\n uint256 value,\\\\n bytes calldata data\\\\n ) external returns (bytes4);\\\\n\\\\n /**\\\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\\\n * been updated.\\\\n *\\\\n * NOTE: To accept the transfer(s), this must return\\\\n * `bytes4(keccak256(\\\\\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\\\\\"))`\\\\n * (i.e. 0xbc197c81, or its own function selector).\\\\n *\\\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\\\n * @param from The address which previously owned the token\\\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\\\n * @param data Additional data with no specified format\\\\n * @return `bytes4(keccak256(\\\\\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\\\\\"))` if transfer is allowed\\\\n */\\\\n function onERC1155BatchReceived(\\\\n address operator,\\\\n address from,\\\\n uint256[] calldata ids,\\\\n uint256[] calldata values,\\\\n bytes calldata data\\\\n ) external returns (bytes4);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\\\n * own tokens and those that they have been approved to use.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Burnable is ERC1155 {\\\\n function burn(\\\\n address account,\\\\n uint256 id,\\\\n uint256 value\\\\n ) public virtual {\\\\n require(\\\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n\\\\n _burn(account, id, value);\\\\n }\\\\n\\\\n function burnBatch(\\\\n address account,\\\\n uint256[] memory ids,\\\\n uint256[] memory values\\\\n ) public virtual {\\\\n require(\\\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n\\\\n _burnBatch(account, ids, values);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\\\n /**\\\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n require(!paused(), \\\\\\\"ERC1155Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC1155.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ninterface IERC1155MetadataURI is IERC1155 {\\\\n /**\\\\n * @dev Returns the URI for token type `id`.\\\\n *\\\\n * If the `\\\\\\\\{id\\\\\\\\}` substring is present in the URI, it must be replaced by\\\\n * clients with the actual token type ID.\\\\n */\\\\n function uri(uint256 id) external view returns (string memory);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC1155Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC1155Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC1155} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\\\n * deploys the contract.\\\\n */\\\\n constructor(string memory uri) ERC1155(uri) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\\\n *\\\\n * See {ERC1155-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n\\\\n _mint(to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\\\n */\\\\n function mintBatch(\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n\\\\n _mintBatch(to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId)\\\\n public\\\\n view\\\\n virtual\\\\n override(AccessControlEnumerable, ERC1155)\\\\n returns (bool)\\\\n {\\\\n return super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./ERC1155Receiver.sol\\\\\\\";\\\\n\\\\n/**\\\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\\\n *\\\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\\\n * stuck.\\\\n *\\\\n * @dev _Available since v3.1._\\\\n */\\\\ncontract ERC1155Holder is ERC1155Receiver {\\\\n function onERC1155Received(\\\\n address,\\\\n address,\\\\n uint256,\\\\n uint256,\\\\n bytes memory\\\\n ) public virtual override returns (bytes4) {\\\\n return this.onERC1155Received.selector;\\\\n }\\\\n\\\\n function onERC1155BatchReceived(\\\\n address,\\\\n address,\\\\n uint256[] memory,\\\\n uint256[] memory,\\\\n bytes memory\\\\n ) public virtual override returns (bytes4) {\\\\n return this.onERC1155BatchReceived.selector;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC1155Receiver.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Required interface of an ERC721 compliant contract.\\\\n */\\\\ninterface IERC721 is IERC165 {\\\\n /**\\\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\\\n */\\\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\\\n\\\\n /**\\\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\\\n */\\\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\\\n\\\\n /**\\\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\\\n */\\\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\\\n\\\\n /**\\\\n * @dev Returns the number of tokens in ``owner``'s account.\\\\n */\\\\n function balanceOf(address owner) external view returns (uint256 balance);\\\\n\\\\n /**\\\\n * @dev Returns the owner of the `tokenId` token.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `tokenId` must exist.\\\\n */\\\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\\\n\\\\n /**\\\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must exist and be owned by `from`.\\\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId,\\\\n bytes calldata data\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must exist and be owned by `from`.\\\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Transfers `tokenId` token from `from` to `to`.\\\\n *\\\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must be owned by `from`.\\\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\\\n * The approval is cleared when the token is transferred.\\\\n *\\\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The caller must own the token or be an approved operator.\\\\n * - `tokenId` must exist.\\\\n *\\\\n * Emits an {Approval} event.\\\\n */\\\\n function approve(address to, uint256 tokenId) external;\\\\n\\\\n /**\\\\n * @dev Approve or remove `operator` as an operator for the caller.\\\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The `operator` cannot be the caller.\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n */\\\\n function setApprovalForAll(address operator, bool _approved) external;\\\\n\\\\n /**\\\\n * @dev Returns the account approved for `tokenId` token.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `tokenId` must exist.\\\\n */\\\\n function getApproved(uint256 tokenId) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\\\n *\\\\n * See {setApprovalForAll}\\\\n */\\\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/GatewayV3.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/security/Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IQuorum.sol\\\\\\\";\\\\nimport \\\\\\\"./collections/HasProxyAdmin.sol\\\\\\\";\\\\n\\\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\\\n uint256 internal _num;\\\\n uint256 internal _denom;\\\\n\\\\n address private ______deprecated;\\\\n uint256 public nonce;\\\\n\\\\n address public emergencyPauser;\\\\n\\\\n /**\\\\n * @dev This empty reserved space is put in place to allow future versions to add new\\\\n * variables without shifting down storage in the inheritance chain.\\\\n */\\\\n uint256[49] private ______gap;\\\\n\\\\n /**\\\\n * @dev Grant emergency pauser role for `_addr`.\\\\n */\\\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\\\n emergencyPauser = _addr;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\\\n return (_num, _denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\\\n return _setThreshold(_numerator, _denominator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Triggers paused state.\\\\n */\\\\n function pause() external {\\\\n _requireAuth();\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Triggers unpaused state.\\\\n */\\\\n function unpause() external {\\\\n _requireAuth();\\\\n _unpause();\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n return _minimumVoteWeight(_getTotalWeight());\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\\\n uint256 prevNum = _num;\\\\n uint256 prevDenom = _denom;\\\\n _num = num;\\\\n _denom = denom;\\\\n unchecked {\\\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns minimum vote weight.\\\\n */\\\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\\\n return (_num * _totalWeight + _denom - 1) / _denom;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check method caller.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The method caller must be admin or pauser.\\\\n *\\\\n */\\\\n function _requireAuth() private view {\\\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the total weight.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/WethUnwrapper.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IWETH.sol\\\\\\\";\\\\n\\\\ncontract WethUnwrapper is ReentrancyGuard {\\\\n IWETH public immutable weth;\\\\n\\\\n error ErrCannotTransferFrom();\\\\n error ErrNotWrappedContract();\\\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\\\n\\\\n constructor(address weth_) {\\\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\\\n weth = IWETH(weth_);\\\\n }\\\\n\\\\n fallback() external payable {\\\\n _fallback();\\\\n }\\\\n\\\\n receive() external payable {\\\\n _fallback();\\\\n }\\\\n\\\\n function unwrap(uint256 amount) external nonReentrant {\\\\n _deductWrappedAndWithdraw(amount);\\\\n _sendNativeTo(payable(msg.sender), amount);\\\\n }\\\\n\\\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\\\n _deductWrappedAndWithdraw(amount);\\\\n _sendNativeTo(payable(to), amount);\\\\n }\\\\n\\\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\\\n if (!success) revert ErrCannotTransferFrom();\\\\n\\\\n weth.withdraw(amount);\\\\n }\\\\n\\\\n function _sendNativeTo(address payable to, uint256 val) internal {\\\\n (bool success,) = to.call{ value: val }(\\\\\\\"\\\\\\\");\\\\n if (!success) {\\\\n revert ErrExternalCallFailed(to, msg.sig);\\\\n }\\\\n }\\\\n\\\\n function _fallback() internal view {\\\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/WithdrawalLimitation.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./GatewayV3.sol\\\\\\\";\\\\n\\\\nabstract contract WithdrawalLimitation is GatewayV3 {\\\\n /// @dev Error of invalid percentage.\\\\n error ErrInvalidPercentage();\\\\n\\\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\\\n event HighTierVoteWeightThresholdUpdated(\\\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\\\n );\\\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\\\n /// @dev Emitted when the daily limit thresholds are updated\\\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\\\n\\\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\\\n\\\\n uint256 internal _highTierVWNum;\\\\n uint256 internal _highTierVWDenom;\\\\n\\\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\\\n mapping(address => uint256) public highTierThreshold;\\\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\\\n mapping(address => uint256) public lockedThreshold;\\\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\\\n /// @notice Values 0-1,000,000 map to 0%-100%\\\\n mapping(address => uint256) public unlockFeePercentages;\\\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\\\n mapping(address => uint256) public dailyWithdrawalLimit;\\\\n /// @dev Mapping from token address => today withdrawal amount\\\\n mapping(address => uint256) public lastSyncedWithdrawal;\\\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\\\n mapping(address => uint256) public lastDateSynced;\\\\n\\\\n /**\\\\n * @dev This empty reserved space is put in place to allow future versions to add new\\\\n * variables without shifting down storage in the inheritance chain.\\\\n */\\\\n uint256[50] private ______gap;\\\\n\\\\n /**\\\\n * @dev Override `GatewayV3-setThreshold`.\\\\n *\\\\n * Requirements:\\\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\\\n *\\\\n */\\\\n function setThreshold(uint256 num, uint256 denom) external virtual override onlyProxyAdmin {\\\\n _setThreshold(num, denom);\\\\n _verifyThresholds();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the high-tier vote weight threshold.\\\\n */\\\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\\\n return (_highTierVWNum, _highTierVWDenom);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\\\n */\\\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\\\n *\\\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setHighTierVoteWeightThreshold(\\\\n uint256 _numerator,\\\\n uint256 _denominator\\\\n ) external virtual onlyProxyAdmin returns (uint256 _previousNum, uint256 _previousDenom) {\\\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\\\n _verifyThresholds();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `HighTierThresholdsUpdated` event.\\\\n *\\\\n */\\\\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\\\n if (_tokens.length == 0) revert ErrEmptyArray();\\\\n _setHighTierThresholds(_tokens, _thresholds);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the amount thresholds to lock withdrawal.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `LockedThresholdsUpdated` event.\\\\n *\\\\n */\\\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin {\\\\n if (_tokens.length == 0) revert ErrEmptyArray();\\\\n _setLockedThresholds(_tokens, _thresholds);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets fee percentages to unlock withdrawal.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `UnlockFeePercentagesUpdated` event.\\\\n *\\\\n */\\\\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) external virtual onlyProxyAdmin {\\\\n if (_tokens.length == 0) revert ErrEmptyArray();\\\\n _setUnlockFeePercentages(_tokens, _percentages);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets daily limit amounts for the withdrawals.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\\\n *\\\\n */\\\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyProxyAdmin {\\\\n if (_tokens.length == 0) revert ErrEmptyArray();\\\\n _setDailyWithdrawalLimits(_tokens, _limits);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks whether the withdrawal reaches the limitation.\\\\n */\\\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\\\n return _reachedWithdrawalLimit(_token, _quantity);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\\\n *\\\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator) internal returns (uint256 _previousNum, uint256 _previousDenom) {\\\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\\\n\\\\n _previousNum = _highTierVWNum;\\\\n _previousDenom = _highTierVWDenom;\\\\n _highTierVWNum = _numerator;\\\\n _highTierVWDenom = _denominator;\\\\n\\\\n unchecked {\\\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\\\n *\\\\n * Requirements:\\\\n * - The array lengths are equal.\\\\n *\\\\n * Emits the `HighTierThresholdsUpdated` event.\\\\n *\\\\n */\\\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n for (uint256 _i; _i < _tokens.length;) {\\\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the amount thresholds to lock withdrawal.\\\\n *\\\\n * Requirements:\\\\n * - The array lengths are equal.\\\\n *\\\\n * Emits the `LockedThresholdsUpdated` event.\\\\n *\\\\n */\\\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n for (uint256 _i; _i < _tokens.length;) {\\\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets fee percentages to unlock withdrawal.\\\\n *\\\\n * Requirements:\\\\n * - The array lengths are equal.\\\\n * - The percentage is equal to or less than 100_000.\\\\n *\\\\n * Emits the `UnlockFeePercentagesUpdated` event.\\\\n *\\\\n */\\\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\\\n if (_tokens.length != _percentages.length) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n for (uint256 _i; _i < _tokens.length;) {\\\\n if (_percentages[_i] > _MAX_PERCENTAGE) revert ErrInvalidPercentage();\\\\n\\\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets daily limit amounts for the withdrawals.\\\\n *\\\\n * Requirements:\\\\n * - The array lengths are equal.\\\\n *\\\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\\\n *\\\\n */\\\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\\\n if (_tokens.length != _limits.length) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n for (uint256 _i; _i < _tokens.length;) {\\\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\\\n *\\\\n * Requirements:\\\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\\\n *\\\\n */\\\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\\\n return false;\\\\n }\\\\n\\\\n uint256 _currentDate = block.timestamp / 1 days;\\\\n if (_currentDate > lastDateSynced[_token]) {\\\\n return dailyWithdrawalLimit[_token] <= _quantity;\\\\n } else {\\\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Record withdrawal token.\\\\n */\\\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\\\n uint256 _currentDate = block.timestamp / 1 days;\\\\n if (_currentDate > lastDateSynced[_token]) {\\\\n lastDateSynced[_token] = _currentDate;\\\\n lastSyncedWithdrawal[_token] = _quantity;\\\\n } else {\\\\n lastSyncedWithdrawal[_token] += _quantity;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the withdrawal request is locked or not.\\\\n */\\\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\\\n return lockedThreshold[_token] <= _quantity;\\\\n }\\\\n\\\\n /**\\\\n * @dev Computes fee percentage.\\\\n */\\\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns high-tier vote weight.\\\\n */\\\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\\\n }\\\\n\\\\n /**\\\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\\\n */\\\\n function _verifyThresholds() internal view {\\\\n if (_num * _highTierVWDenom > _highTierVWNum * _denom) revert ErrInvalidThreshold(msg.sig);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x4b7d559d4b1f53239b8690776318db8d63f578f72fb269d8024570aa70c2c2a6\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IMainchainGatewayV3.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IWETH.sol\\\\\\\";\\\\nimport \\\\\\\"./consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"./consumers/MappedTokenConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../libraries/Transfer.sol\\\\\\\";\\\\n\\\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\\\n /**\\\\n * @dev Error indicating that a query was made for an approved withdrawal.\\\\n */\\\\n error ErrQueryForApprovedWithdrawal();\\\\n\\\\n /**\\\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\\\n */\\\\n error ErrReachedDailyWithdrawalLimit();\\\\n\\\\n /**\\\\n * @dev Error indicating that a query was made for a processed withdrawal.\\\\n */\\\\n error ErrQueryForProcessedWithdrawal();\\\\n\\\\n /**\\\\n * @dev Error indicating that a query was made for insufficient vote weight.\\\\n */\\\\n error ErrQueryForInsufficientVoteWeight();\\\\n\\\\n /// @dev Emitted when the deposit is requested\\\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the assets are withdrawn\\\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the tokens are mapped\\\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards);\\\\n /// @dev Emitted when the wrapped native token contract is updated\\\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\\\n /// @dev Emitted when the withdrawal is locked\\\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the withdrawal is unlocked\\\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n\\\\n /**\\\\n * @dev Returns the domain seperator.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns deposit count.\\\\n */\\\\n function depositCount() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the wrapped native token contract.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\\\n *\\\\n */\\\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\\\n\\\\n /**\\\\n * @dev Returns whether the withdrawal is locked.\\\\n */\\\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the withdrawal hash.\\\\n */\\\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Locks the assets and request deposit.\\\\n */\\\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\\\n\\\\n /**\\\\n * @dev Locks the assets and request deposit for batch.\\\\n */\\\\n function requestDepositForBatch(Transfer.Request[] calldata requests) external payable;\\\\n\\\\n /**\\\\n * @dev Withdraws based on the receipt and the validator signatures.\\\\n * Returns whether the withdrawal is locked.\\\\n *\\\\n * Emits the `Withdrew` once the assets are released.\\\\n *\\\\n */\\\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked);\\\\n\\\\n /**\\\\n * @dev Approves a specific withdrawal.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n * Emits the `Withdrew` once the assets are released.\\\\n *\\\\n */\\\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\\\n\\\\n /**\\\\n * @dev Maps mainchain tokens to Ronin network.\\\\n *\\\\n * Requirement:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `TokenMapped` event.\\\\n *\\\\n */\\\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external;\\\\n\\\\n /**\\\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\\\n *\\\\n * Requirement:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `TokenMapped` event.\\\\n *\\\\n */\\\\n function mapTokensAndThresholds(\\\\n address[] calldata _mainchainTokens,\\\\n address[] calldata _roninTokens,\\\\n TokenStandard[] calldata _standards,\\\\n uint256[][4] calldata _thresholds\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Returns token address on Ronin network.\\\\n * Note: Reverts for unsupported token.\\\\n */\\\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x77b52c1dce7c096d298e0ae14d19d79cb1d506248e947fdee27f295b33743d46\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IWETH.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IWETH {\\\\n event Transfer(address indexed src, address indexed dst, uint wad);\\\\n\\\\n function deposit() external payable;\\\\n\\\\n function transfer(address dst, uint wad) external returns (bool);\\\\n\\\\n function approve(address guy, uint wad) external returns (bool);\\\\n\\\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\\\n\\\\n function withdraw(uint256 _wad) external;\\\\n\\\\n function balanceOf(address) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallback.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManagerCallback\\\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\\\n */\\\\ninterface IBridgeManagerCallback is IERC165 {\\\\n /**\\\\n * @dev Handles the event when bridge operators are added.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\\\n\\\\n /**\\\\n * @dev Handles the event when bridge operators are removed.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/MappedTokenConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/LibTokenInfo.sol\\\\\\\";\\\\n\\\\ninterface MappedTokenConsumer {\\\\n struct MappedToken {\\\\n TokenStandard erc;\\\\n address tokenAddr;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/SignatureConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface SignatureConsumer {\\\\n struct Signature {\\\\n uint8 v;\\\\n bytes32 r;\\\\n bytes32 s;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/LibTokenInfo.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IWETH.sol\\\\\\\";\\\\n\\\\nenum TokenStandard {\\\\n ERC20,\\\\n ERC721,\\\\n ERC1155\\\\n}\\\\n\\\\nstruct TokenInfo {\\\\n TokenStandard erc;\\\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\\\n // For ERC721: the quantity must be 0.\\\\n uint256 id;\\\\n uint256 quantity;\\\\n}\\\\n\\\\n/**\\\\n * @dev Error indicating that the `transfer` has failed.\\\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\\\n * @param to Receiver of the token value.\\\\n * @param token Address of the token.\\\\n */\\\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\\\n\\\\n/**\\\\n * @dev Error indicating that the `handleAssetIn` has failed.\\\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\\\n * @param from Owner of the token value.\\\\n * @param to Receiver of the token value.\\\\n * @param token Address of the token.\\\\n */\\\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\\\n\\\\n/// @dev Error indicating that the provided information is invalid.\\\\nerror ErrInvalidInfo();\\\\n\\\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\\\nerror ErrERC20MintingFailed();\\\\n\\\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\\\nerror ErrERC721MintingFailed();\\\\n\\\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\\\nerror ErrERC1155TransferFailed();\\\\n\\\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\\\nerror ErrERC1155MintingFailed();\\\\n\\\\n/// @dev Error indicating that an unsupported standard is encountered.\\\\nerror ErrUnsupportedStandard();\\\\n\\\\nlibrary LibTokenInfo {\\\\n /**\\\\n *\\\\n * HASH\\\\n *\\\\n */\\\\n\\\\n // keccak256(\\\\\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\\\\\");\\\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\\\n\\\\n /**\\\\n * @dev Returns token info struct hash.\\\\n */\\\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\\\n digest := keccak256(ptr, 0x80)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * VALIDATE\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Validates the token info.\\\\n */\\\\n function validate(TokenInfo memory self) internal pure {\\\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\\\n revert ErrInvalidInfo();\\\\n }\\\\n }\\\\n\\\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\\\n }\\\\n\\\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\\\n }\\\\n\\\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * TRANSFER IN/OUT METHOD\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfer asset in.\\\\n *\\\\n * Requirements:\\\\n * - The `_from` address must approve for the contract using this library.\\\\n *\\\\n */\\\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\\\n bool success;\\\\n bytes memory data;\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\\\n } else if (self.erc == TokenStandard.ERC721) {\\\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\\\n } else if (self.erc == TokenStandard.ERC1155) {\\\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\\\n } else {\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\\\n *\\\\n * @notice Prioritizes transfer native token if the token is wrapped.\\\\n *\\\\n */\\\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\\\n if (token == address(wrappedNativeToken)) {\\\\n // Try sending the native token before transferring the wrapped token\\\\n if (!to.send(self.quantity)) {\\\\n wrappedNativeToken.deposit{ value: self.quantity }();\\\\n _transferTokenOut(self, to, token);\\\\n }\\\\n\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n uint256 balance = IERC20(token).balanceOf(address(this));\\\\n if (balance < self.quantity) {\\\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\\\n }\\\\n\\\\n _transferTokenOut(self, to, token);\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC721) {\\\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\\\n revert ErrERC721MintingFailed();\\\\n }\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC1155) {\\\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\\\n revert ErrERC1155MintingFailed();\\\\n }\\\\n return;\\\\n }\\\\n\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * TRANSFER HELPERS\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfer assets from current address to `_to` address.\\\\n */\\\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\\\n bool success;\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n success = _tryTransferERC20(token, to, self.quantity);\\\\n } else if (self.erc == TokenStandard.ERC721) {\\\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\\\n } else {\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-20\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers ERC20 token and returns the result.\\\\n */\\\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\\\n bytes memory data;\\\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC20 token and returns the result.\\\\n */\\\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\\\n // bytes4(keccak256(\\\\\\\"mint(address,uint256)\\\\\\\"))\\\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-721\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\\\n * @return success Returns `false` if both transfer and mint are failed.\\\\n */\\\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\\\n success = _tryTransferFromERC721(token, address(this), to, id);\\\\n if (!success) {\\\\n return _tryMintERC721(token, to, id);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers ERC721 token and returns the result.\\\\n */\\\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC721 token and returns the result.\\\\n */\\\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\\\n // bytes4(keccak256(\\\\\\\"mint(address,uint256)\\\\\\\"))\\\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-1155\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\\\n * @return success Returns `false` if both transfer and mint are failed.\\\\n */\\\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\\\n if (!success) {\\\\n return _tryMintERC1155(token, to, id, amount);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers ERC1155 token and returns the result.\\\\n */\\\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC1155 token and returns the result.\\\\n */\\\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/LibTokenOwner.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nstruct TokenOwner {\\\\n address addr;\\\\n address tokenAddr;\\\\n uint256 chainId;\\\\n}\\\\n\\\\nlibrary LibTokenOwner {\\\\n // keccak256(\\\\\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\\\\\");\\\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\\\n\\\\n /**\\\\n * @dev Returns ownership struct hash.\\\\n */\\\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, OWNER_TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\\\n digest := keccak256(ptr, 0x80)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Transfer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./LibTokenInfo.sol\\\\\\\";\\\\nimport \\\\\\\"./LibTokenOwner.sol\\\\\\\";\\\\n\\\\nlibrary Transfer {\\\\n using ECDSA for bytes32;\\\\n using LibTokenOwner for TokenOwner;\\\\n using LibTokenInfo for TokenInfo;\\\\n\\\\n enum Kind {\\\\n Deposit,\\\\n Withdrawal\\\\n }\\\\n\\\\n struct Request {\\\\n // For deposit request: Recipient address on Ronin network\\\\n // For withdrawal request: Recipient address on mainchain network\\\\n address recipientAddr;\\\\n // Token address to deposit/withdraw\\\\n // Value 0: native token\\\\n address tokenAddr;\\\\n TokenInfo info;\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts the transfer request into the deposit receipt.\\\\n */\\\\n function into_deposit_receipt(\\\\n Request memory _request,\\\\n address _requester,\\\\n uint256 _id,\\\\n address _roninTokenAddr,\\\\n uint256 _roninChainId\\\\n ) internal view returns (Receipt memory _receipt) {\\\\n _receipt.id = _id;\\\\n _receipt.kind = Kind.Deposit;\\\\n _receipt.mainchain.addr = _requester;\\\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\\\n _receipt.mainchain.chainId = block.chainid;\\\\n _receipt.ronin.addr = _request.recipientAddr;\\\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\\\n _receipt.ronin.chainId = _roninChainId;\\\\n _receipt.info = _request.info;\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts the transfer request into the withdrawal receipt.\\\\n */\\\\n function into_withdrawal_receipt(\\\\n Request memory _request,\\\\n address _requester,\\\\n uint256 _id,\\\\n address _mainchainTokenAddr,\\\\n uint256 _mainchainId\\\\n ) internal view returns (Receipt memory _receipt) {\\\\n _receipt.id = _id;\\\\n _receipt.kind = Kind.Withdrawal;\\\\n _receipt.ronin.addr = _requester;\\\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\\\n _receipt.ronin.chainId = block.chainid;\\\\n _receipt.mainchain.addr = _request.recipientAddr;\\\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\\\n _receipt.mainchain.chainId = _mainchainId;\\\\n _receipt.info = _request.info;\\\\n }\\\\n\\\\n struct Receipt {\\\\n uint256 id;\\\\n Kind kind;\\\\n TokenOwner mainchain;\\\\n TokenOwner ronin;\\\\n TokenInfo info;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\\\\\");\\\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\\\n\\\\n /**\\\\n * @dev Returns token info struct hash.\\\\n */\\\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * _receipt.id,\\\\n * _receipt.kind,\\\\n * Token.hash(_receipt.mainchain),\\\\n * Token.hash(_receipt.ronin),\\\\n * Token.hash(_receipt.info)\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\\\n digest := keccak256(ptr, 0xc0)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the receipt digest.\\\\n */\\\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/mainchain/MainchainGatewayV3.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\\\\\";\\\\nimport { IBridgeManager } from \\\\\\\"../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback } from \\\\\\\"../interfaces/bridge/IBridgeManagerCallback.sol\\\\\\\";\\\\nimport { HasContracts, ContractType } from \\\\\\\"../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/WethUnwrapper.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/WithdrawalLimitation.sol\\\\\\\";\\\\nimport \\\\\\\"../libraries/Transfer.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IMainchainGatewayV3.sol\\\\\\\";\\\\n\\\\ncontract MainchainGatewayV3 is\\\\n WithdrawalLimitation,\\\\n Initializable,\\\\n AccessControlEnumerable,\\\\n ERC1155Holder,\\\\n IMainchainGatewayV3,\\\\n HasContracts,\\\\n IBridgeManagerCallback\\\\n{\\\\n using LibTokenInfo for TokenInfo;\\\\n using Transfer for Transfer.Request;\\\\n using Transfer for Transfer.Receipt;\\\\n\\\\n /// @dev Withdrawal unlocker role hash\\\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\\\\\"WITHDRAWAL_UNLOCKER_ROLE\\\\\\\");\\\\n\\\\n /// @dev Wrapped native token address\\\\n IWETH public wrappedNativeToken;\\\\n /// @dev Ronin network id\\\\n uint256 public roninChainId;\\\\n /// @dev Total deposit\\\\n uint256 public depositCount;\\\\n /// @dev Domain separator\\\\n bytes32 internal _domainSeparator;\\\\n /// @dev Mapping from mainchain token => token address on Ronin network\\\\n mapping(address => MappedToken) internal _roninToken;\\\\n /// @dev Mapping from withdrawal id => withdrawal hash\\\\n mapping(uint256 => bytes32) public withdrawalHash;\\\\n /// @dev Mapping from withdrawal id => locked\\\\n mapping(uint256 => bool) public withdrawalLocked;\\\\n\\\\n /// @custom:deprecated Previously `_bridgeOperatorAddedBlock` (mapping(address => uint256))\\\\n uint256 private ______deprecatedBridgeOperatorAddedBlock;\\\\n /// @custom:deprecated Previously `_bridgeOperators` (uint256[])\\\\n uint256 private ______deprecatedBridgeOperators;\\\\n\\\\n uint96 private _totalOperatorWeight;\\\\n mapping(address operator => uint96 weight) private _operatorWeight;\\\\n WethUnwrapper public wethUnwrapper;\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n fallback() external payable {\\\\n _fallback();\\\\n }\\\\n\\\\n receive() external payable {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Initializes contract storage.\\\\n */\\\\n function initialize(\\\\n address _roleSetter,\\\\n IWETH _wrappedToken,\\\\n uint256 _roninChainId,\\\\n uint256 _numerator,\\\\n uint256 _highTierVWNumerator,\\\\n uint256 _denominator,\\\\n // _addresses[0]: mainchainTokens\\\\n // _addresses[1]: roninTokens\\\\n // _addresses[2]: withdrawalUnlockers\\\\n address[][3] calldata _addresses,\\\\n // _thresholds[0]: highTierThreshold\\\\n // _thresholds[1]: lockedThreshold\\\\n // _thresholds[2]: unlockFeePercentages\\\\n // _thresholds[3]: dailyWithdrawalLimit\\\\n uint256[][4] calldata _thresholds,\\\\n TokenStandard[] calldata _standards\\\\n ) external payable virtual initializer {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\\\n roninChainId = _roninChainId;\\\\n\\\\n _setWrappedNativeTokenContract(_wrappedToken);\\\\n _updateDomainSeparator();\\\\n _setThreshold(_numerator, _denominator);\\\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\\\n _verifyThresholds();\\\\n\\\\n if (_addresses[0].length > 0) {\\\\n // Map mainchain tokens to ronin tokens\\\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\\\n // Sets thresholds based on the mainchain tokens\\\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\\\n }\\\\n\\\\n // Grant role for withdrawal unlocker\\\\n for (uint256 i; i < _addresses[2].length; i++) {\\\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][i]);\\\\n }\\\\n }\\\\n\\\\n function initializeV2(address bridgeManagerContract) external reinitializer(2) {\\\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeManagerContract);\\\\n }\\\\n\\\\n function initializeV3() external reinitializer(3) {\\\\n IBridgeManager mainchainBridgeManager = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER));\\\\n (, address[] memory operators, uint96[] memory weights) = mainchainBridgeManager.getFullBridgeOperatorInfos();\\\\n\\\\n uint96 totalWeight;\\\\n for (uint i; i < operators.length; i++) {\\\\n _operatorWeight[operators[i]] = weights[i];\\\\n totalWeight += weights[i];\\\\n }\\\\n _totalOperatorWeight = totalWeight;\\\\n }\\\\n\\\\n function initializeV4(address payable wethUnwrapper_) external reinitializer(4) {\\\\n wethUnwrapper = WethUnwrapper(wethUnwrapper_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\\\n */\\\\n function receiveEther() external payable { }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\\\n return _domainSeparator;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyProxyAdmin {\\\\n _setWrappedNativeTokenContract(_wrappedToken);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\\\n _requestDepositFor(_request, msg.sender);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function requestDepositForBatch(Transfer.Request[] calldata _requests) external payable virtual whenNotPaused {\\\\n uint length = _requests.length;\\\\n for (uint256 i; i < length; ++i) {\\\\n _requestDepositFor(_requests[i], msg.sender);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures) external virtual whenNotPaused returns (bool _locked) {\\\\n return _submitWithdrawal(_receipt, _signatures);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function unlockWithdrawal(Transfer.Receipt calldata receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\\\n bytes32 _receiptHash = receipt.hash();\\\\n if (withdrawalHash[receipt.id] != receipt.hash()) {\\\\n revert ErrInvalidReceipt();\\\\n }\\\\n if (!withdrawalLocked[receipt.id]) {\\\\n revert ErrQueryForApprovedWithdrawal();\\\\n }\\\\n delete withdrawalLocked[receipt.id];\\\\n emit WithdrawalUnlocked(_receiptHash, receipt);\\\\n\\\\n address token = receipt.mainchain.tokenAddr;\\\\n if (receipt.info.erc == TokenStandard.ERC20) {\\\\n TokenInfo memory feeInfo = receipt.info;\\\\n feeInfo.quantity = _computeFeePercentage(receipt.info.quantity, unlockFeePercentages[token]);\\\\n TokenInfo memory withdrawInfo = receipt.info;\\\\n withdrawInfo.quantity = receipt.info.quantity - feeInfo.quantity;\\\\n\\\\n feeInfo.handleAssetOut(payable(msg.sender), token, wrappedNativeToken);\\\\n withdrawInfo.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\\\n } else {\\\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), token, wrappedNativeToken);\\\\n }\\\\n\\\\n emit Withdrew(_receiptHash, receipt);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external virtual onlyProxyAdmin {\\\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function mapTokensAndThresholds(\\\\n address[] calldata _mainchainTokens,\\\\n address[] calldata _roninTokens,\\\\n TokenStandard[] calldata _standards,\\\\n // _thresholds[0]: highTierThreshold\\\\n // _thresholds[1]: lockedThreshold\\\\n // _thresholds[2]: unlockFeePercentages\\\\n // _thresholds[3]: dailyWithdrawalLimit\\\\n uint256[][4] calldata _thresholds\\\\n ) external virtual onlyProxyAdmin {\\\\n if (_mainchainTokens.length == 0) revert ErrEmptyArray();\\\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IMainchainGatewayV3\\\\n */\\\\n function getRoninToken(address mainchainToken) public view returns (MappedToken memory token) {\\\\n token = _roninToken[mainchainToken];\\\\n if (token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\\\n }\\\\n\\\\n /**\\\\n * @dev Maps mainchain tokens to Ronin network.\\\\n *\\\\n * Requirement:\\\\n * - The arrays have the same length.\\\\n *\\\\n * Emits the `TokenMapped` event.\\\\n *\\\\n */\\\\n function _mapTokens(address[] calldata mainchainTokens, address[] calldata roninTokens, TokenStandard[] calldata standards) internal virtual {\\\\n if (!(mainchainTokens.length == roninTokens.length && mainchainTokens.length == standards.length)) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n for (uint256 i; i < mainchainTokens.length; ++i) {\\\\n _roninToken[mainchainTokens[i]].tokenAddr = roninTokens[i];\\\\n _roninToken[mainchainTokens[i]].erc = standards[i];\\\\n }\\\\n\\\\n emit TokenMapped(mainchainTokens, roninTokens, standards);\\\\n }\\\\n\\\\n /**\\\\n * @dev Submits withdrawal receipt.\\\\n *\\\\n * Requirements:\\\\n * - The receipt kind is withdrawal.\\\\n * - The receipt is to withdraw on this chain.\\\\n * - The receipt is not used to withdraw before.\\\\n * - The withdrawal is not reached the limit threshold.\\\\n * - The signer weight total is larger than or equal to the minimum threshold.\\\\n * - The signature signers are in order.\\\\n *\\\\n * Emits the `Withdrew` once the assets are released.\\\\n *\\\\n */\\\\n function _submitWithdrawal(Transfer.Receipt calldata receipt, Signature[] memory signatures) internal virtual returns (bool locked) {\\\\n uint256 id = receipt.id;\\\\n uint256 quantity = receipt.info.quantity;\\\\n address tokenAddr = receipt.mainchain.tokenAddr;\\\\n\\\\n receipt.info.validate();\\\\n if (receipt.kind != Transfer.Kind.Withdrawal) revert ErrInvalidReceiptKind();\\\\n\\\\n if (receipt.mainchain.chainId != block.chainid) {\\\\n revert ErrInvalidChainId(msg.sig, receipt.mainchain.chainId, block.chainid);\\\\n }\\\\n\\\\n MappedToken memory token = getRoninToken(receipt.mainchain.tokenAddr);\\\\n\\\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.ronin.tokenAddr && receipt.ronin.chainId == roninChainId)) {\\\\n revert ErrInvalidReceipt();\\\\n }\\\\n\\\\n if (withdrawalHash[id] != 0) revert ErrQueryForProcessedWithdrawal();\\\\n\\\\n if (!(receipt.info.erc == TokenStandard.ERC721 || !_reachedWithdrawalLimit(tokenAddr, quantity))) {\\\\n revert ErrReachedDailyWithdrawalLimit();\\\\n }\\\\n\\\\n bytes32 receiptHash = receipt.hash();\\\\n bytes32 receiptDigest = Transfer.receiptDigest(_domainSeparator, receiptHash);\\\\n\\\\n uint256 minimumWeight;\\\\n (minimumWeight, locked) = _computeMinVoteWeight(receipt.info.erc, tokenAddr, quantity);\\\\n\\\\n {\\\\n bool passed;\\\\n address signer;\\\\n address lastSigner;\\\\n Signature memory sig;\\\\n uint256 weight;\\\\n for (uint256 i; i < signatures.length; i++) {\\\\n sig = signatures[i];\\\\n signer = ecrecover(receiptDigest, sig.v, sig.r, sig.s);\\\\n if (lastSigner >= signer) revert ErrInvalidOrder(msg.sig);\\\\n\\\\n lastSigner = signer;\\\\n\\\\n weight += _getWeight(signer);\\\\n if (weight >= minimumWeight) {\\\\n passed = true;\\\\n break;\\\\n }\\\\n }\\\\n\\\\n if (!passed) revert ErrQueryForInsufficientVoteWeight();\\\\n withdrawalHash[id] = receiptHash;\\\\n }\\\\n\\\\n if (locked) {\\\\n withdrawalLocked[id] = true;\\\\n emit WithdrawalLocked(receiptHash, receipt);\\\\n return locked;\\\\n }\\\\n\\\\n _recordWithdrawal(tokenAddr, quantity);\\\\n receipt.info.handleAssetOut(payable(receipt.mainchain.addr), tokenAddr, wrappedNativeToken);\\\\n emit Withdrew(receiptHash, receipt);\\\\n }\\\\n\\\\n /**\\\\n * @dev Requests deposit made by `_requester` address.\\\\n *\\\\n * Requirements:\\\\n * - The token info is valid.\\\\n * - The `msg.value` is 0 while depositing ERC20 token.\\\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\\\n *\\\\n * Emits the `DepositRequested` event.\\\\n *\\\\n */\\\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\\\n MappedToken memory _token;\\\\n address _roninWeth = address(wrappedNativeToken);\\\\n\\\\n _request.info.validate();\\\\n if (_request.tokenAddr == address(0)) {\\\\n if (_request.info.quantity != msg.value) revert ErrInvalidRequest();\\\\n\\\\n _token = getRoninToken(_roninWeth);\\\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\\\n\\\\n _request.tokenAddr = _roninWeth;\\\\n } else {\\\\n if (msg.value != 0) revert ErrInvalidRequest();\\\\n\\\\n _token = getRoninToken(_request.tokenAddr);\\\\n if (_token.erc != _request.info.erc) revert ErrInvalidTokenStandard();\\\\n\\\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\\\n // Withdraw if token is WETH\\\\n // The withdraw of WETH must go via `WethUnwrapper`, because `WETH.withdraw` only sends 2300 gas, which is insufficient when recipient is a proxy.\\\\n if (_roninWeth == _request.tokenAddr) {\\\\n wrappedNativeToken.approve(address(wethUnwrapper), _request.info.quantity);\\\\n wethUnwrapper.unwrap(_request.info.quantity);\\\\n }\\\\n }\\\\n\\\\n uint256 _depositId = depositCount++;\\\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(_requester, _depositId, _token.tokenAddr, roninChainId);\\\\n\\\\n emit DepositRequested(_receipt.hash(), _receipt);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight for the token.\\\\n */\\\\n function _computeMinVoteWeight(TokenStandard _erc, address _token, uint256 _quantity) internal virtual returns (uint256 _weight, bool _locked) {\\\\n uint256 _totalWeight = _getTotalWeight();\\\\n _weight = _minimumVoteWeight(_totalWeight);\\\\n if (_erc == TokenStandard.ERC20) {\\\\n if (highTierThreshold[_token] <= _quantity) {\\\\n _weight = _highTierVoteWeight(_totalWeight);\\\\n }\\\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Update domain seperator.\\\\n */\\\\n function _updateDomainSeparator() internal {\\\\n /*\\\\n * _domainSeparator = keccak256(\\\\n * abi.encode(\\\\n * keccak256(\\\\\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\\\\\"),\\\\n * keccak256(\\\\\\\"MainchainGatewayV2\\\\\\\"),\\\\n * keccak256(\\\\\\\"2\\\\\\\"),\\\\n * block.chainid,\\\\n * address(this)\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n // keccak256(\\\\\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\\\\\")\\\\n mstore(ptr, 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f)\\\\n // keccak256(\\\\\\\"MainchainGatewayV2\\\\\\\")\\\\n mstore(add(ptr, 0x20), 0x159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b)\\\\n // keccak256(\\\\\\\"2\\\\\\\")\\\\n mstore(add(ptr, 0x40), 0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5)\\\\n mstore(add(ptr, 0x60), chainid())\\\\n mstore(add(ptr, 0x80), address())\\\\n sstore(_domainSeparator.slot, keccak256(ptr, 0xa0))\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the WETH contract.\\\\n *\\\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\\\n *\\\\n */\\\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\\\n wrappedNativeToken = _wrapedToken;\\\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\\\n }\\\\n\\\\n /**\\\\n * @dev Receives ETH from WETH or creates deposit request if sender is not WETH or WETHUnwrapper.\\\\n */\\\\n function _fallback() internal virtual {\\\\n if (msg.sender == address(wrappedNativeToken) || msg.sender == address(wethUnwrapper)) {\\\\n return;\\\\n }\\\\n\\\\n _createDepositOnFallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates deposit request.\\\\n */\\\\n function _createDepositOnFallback() internal virtual whenNotPaused {\\\\n Transfer.Request memory _request;\\\\n _request.recipientAddr = msg.sender;\\\\n _request.info.quantity = msg.value;\\\\n _requestDepositFor(_request, _request.recipientAddr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc GatewayV3\\\\n */\\\\n function _getTotalWeight() internal view override returns (uint256) {\\\\n return _totalOperatorWeight;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the weight of an address.\\\\n */\\\\n function _getWeight(address addr) internal view returns (uint256) {\\\\n return _operatorWeight[addr];\\\\n }\\\\n\\\\n ///////////////////////////////////////////////\\\\n // CALLBACKS\\\\n ///////////////////////////////////////////////\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallback\\\\n */\\\\n function onBridgeOperatorsAdded(\\\\n address[] calldata operators,\\\\n uint96[] calldata weights,\\\\n bool[] memory addeds\\\\n ) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\\\n uint256 length = operators.length;\\\\n if (length != addeds.length || length != weights.length) revert ErrLengthMismatch(msg.sig);\\\\n if (length == 0) {\\\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\\\n }\\\\n\\\\n for (uint256 i; i < length; ++i) {\\\\n unchecked {\\\\n if (addeds[i]) {\\\\n _totalOperatorWeight += weights[i];\\\\n _operatorWeight[operators[i]] = weights[i];\\\\n }\\\\n }\\\\n }\\\\n\\\\n return IBridgeManagerCallback.onBridgeOperatorsAdded.selector;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallback\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] calldata operators, bool[] calldata removeds) external onlyContract(ContractType.BRIDGE_MANAGER) returns (bytes4) {\\\\n uint length = operators.length;\\\\n if (length != removeds.length) revert ErrLengthMismatch(msg.sig);\\\\n if (length == 0) {\\\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\\\n }\\\\n\\\\n uint96 totalRemovingWeight;\\\\n for (uint i; i < length; ++i) {\\\\n unchecked {\\\\n if (removeds[i]) {\\\\n totalRemovingWeight += _operatorWeight[operators[i]];\\\\n delete _operatorWeight[operators[i]];\\\\n }\\\\n }\\\\n }\\\\n\\\\n _totalOperatorWeight -= totalRemovingWeight;\\\\n\\\\n return IBridgeManagerCallback.onBridgeOperatorsRemoved.selector;\\\\n }\\\\n\\\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, IERC165, ERC1155Receiver) returns (bool) {\\\\n return\\\\n interfaceId == type(IMainchainGatewayV3).interfaceId || interfaceId == type(IBridgeManagerCallback).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xcb718591e95d9de1f4b07a6a12d9e6bee4c16822e8dd8885b1d6affeda2cc0f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 3, "storageLayout": { "storage": [ { - "astId": 1535, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 52191, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_paused", "offset": 0, "slot": "0", "type": "t_bool" }, { - "astId": 4326, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68096, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_num", "offset": 0, "slot": "1", "type": "t_uint256" }, { - "astId": 4328, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68098, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_denom", "offset": 0, "slot": "2", "type": "t_uint256" }, { - "astId": 4330, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68100, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecated", "offset": 0, "slot": "3", "type": "t_address" }, { - "astId": 4332, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68102, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "nonce", "offset": 0, "slot": "4", "type": "t_uint256" }, { - "astId": 4334, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68104, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "emergencyPauser", "offset": 0, "slot": "5", "type": "t_address" }, { - "astId": 4339, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68109, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______gap", "offset": 0, "slot": "6", "type": "t_array(t_uint256)49_storage" }, { - "astId": 5194, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68831, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_highTierVWNum", "offset": 0, "slot": "55", "type": "t_uint256" }, { - "astId": 5196, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68833, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_highTierVWDenom", "offset": 0, "slot": "56", "type": "t_uint256" }, { - "astId": 5201, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68838, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "highTierThreshold", "offset": 0, "slot": "57", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 5206, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68843, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lockedThreshold", "offset": 0, "slot": "58", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 5211, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68848, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "unlockFeePercentages", "offset": 0, "slot": "59", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 5216, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68853, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "dailyWithdrawalLimit", "offset": 0, "slot": "60", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 5221, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68858, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lastSyncedWithdrawal", "offset": 0, "slot": "61", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 5226, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68863, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "lastDateSynced", "offset": 0, "slot": "62", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 5231, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 68868, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______gap", "offset": 0, "slot": "63", "type": "t_array(t_uint256)50_storage" }, { - "astId": 1373, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 52029, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_initialized", "offset": 0, "slot": "113", "type": "t_uint8" }, { - "astId": 1376, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 52032, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_initializing", "offset": 1, "slot": "113", "type": "t_bool" }, { - "astId": 24, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 50680, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roles", "offset": 0, "slot": "114", - "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)50675_storage)" }, { - "astId": 338, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 50994, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roleMembers", "offset": 0, "slot": "115", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)4026_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)57395_storage)" }, { - "astId": 17280, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79449, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "wrappedNativeToken", "offset": 0, "slot": "116", - "type": "t_contract(IWETH)12355" + "type": "t_contract(IWETH)74614" }, { - "astId": 17283, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79452, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "roninChainId", "offset": 0, "slot": "117", "type": "t_uint256" }, { - "astId": 17286, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79455, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "depositCount", "offset": 0, "slot": "118", "type": "t_uint256" }, { - "astId": 17289, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79458, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_domainSeparator", "offset": 0, "slot": "119", "type": "t_bytes32" }, { - "astId": 17295, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79464, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_roninToken", "offset": 0, "slot": "120", - "type": "t_mapping(t_address,t_struct(MappedToken)13003_storage)" + "type": "t_mapping(t_address,t_struct(MappedToken)75329_storage)" }, { - "astId": 17300, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79469, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "withdrawalHash", "offset": 0, "slot": "121", "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 17305, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79474, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "withdrawalLocked", "offset": 0, "slot": "122", "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 17308, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79477, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecatedBridgeOperatorAddedBlock", "offset": 0, "slot": "123", "type": "t_uint256" }, { - "astId": 17311, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 79480, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "______deprecatedBridgeOperators", "offset": 0, "slot": "124", "type": "t_uint256" + }, + { + "astId": 79482, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_totalOperatorWeight", + "offset": 0, + "slot": "125", + "type": "t_uint96" + }, + { + "astId": 79486, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "_operatorWeight", + "offset": 0, + "slot": "126", + "type": "t_mapping(t_address,t_uint96)" + }, + { + "astId": 79489, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "label": "wethUnwrapper", + "offset": 0, + "slot": "127", + "type": "t_contract(WethUnwrapper)68769" } ], "types": { @@ -2718,22 +649,22 @@ "numberOfBytes": "20" }, "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", "encoding": "dynamic_array", "label": "bytes32[]", - "numberOfBytes": "32" + "numberOfBytes": "32", + "base": "t_bytes32" }, "t_array(t_uint256)49_storage": { - "base": "t_uint256", "encoding": "inplace", "label": "uint256[49]", - "numberOfBytes": "1568" + "numberOfBytes": "1568", + "base": "t_uint256" }, "t_array(t_uint256)50_storage": { - "base": "t_uint256", "encoding": "inplace", "label": "uint256[50]", - "numberOfBytes": "1600" + "numberOfBytes": "1600", + "base": "t_uint256" }, "t_bool": { "encoding": "inplace", @@ -2745,14 +676,19 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IWETH)12355": { + "t_contract(IWETH)74614": { "encoding": "inplace", "label": "contract IWETH", "numberOfBytes": "20" }, - "t_enum(Standard)16303": { + "t_contract(WethUnwrapper)68769": { + "encoding": "inplace", + "label": "contract WethUnwrapper", + "numberOfBytes": "20" + }, + "t_enum(TokenStandard)76941": { "encoding": "inplace", - "label": "enum Token.Standard", + "label": "enum TokenStandard", "numberOfBytes": "1" }, "t_mapping(t_address,t_bool)": { @@ -2762,12 +698,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_address,t_struct(MappedToken)13003_storage)": { + "t_mapping(t_address,t_struct(MappedToken)75329_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct MappedTokenConsumer.MappedToken)", "numberOfBytes": "32", - "value": "t_struct(MappedToken)13003_storage" + "value": "t_struct(MappedToken)75329_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -2776,19 +712,26 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_bytes32,t_struct(AddressSet)4026_storage)": { + "t_mapping(t_address,t_uint96)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint96)", + "numberOfBytes": "32", + "value": "t_uint96" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)57395_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)4026_storage" + "value": "t_struct(AddressSet)57395_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)19_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)50675_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)19_storage" + "value": "t_struct(RoleData)50675_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -2811,89 +754,89 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(AddressSet)4026_storage": { + "t_struct(AddressSet)57395_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", + "numberOfBytes": "64", "members": [ { - "astId": 4025, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 57394, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)3725_storage" + "type": "t_struct(Set)57094_storage" } - ], - "numberOfBytes": "64" + ] }, - "t_struct(MappedToken)13003_storage": { + "t_struct(MappedToken)75329_storage": { "encoding": "inplace", "label": "struct MappedTokenConsumer.MappedToken", + "numberOfBytes": "32", "members": [ { - "astId": 13000, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 75326, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "erc", "offset": 0, "slot": "0", - "type": "t_enum(Standard)16303" + "type": "t_enum(TokenStandard)76941" }, { - "astId": 13002, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 75328, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "tokenAddr", "offset": 1, "slot": "0", "type": "t_address" } - ], - "numberOfBytes": "32" + ] }, - "t_struct(RoleData)19_storage": { + "t_struct(RoleData)50675_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", "members": [ { - "astId": 16, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 50672, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "members", "offset": 0, "slot": "0", "type": "t_mapping(t_address,t_bool)" }, { - "astId": 18, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 50674, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "adminRole", "offset": 0, "slot": "1", "type": "t_bytes32" } - ], - "numberOfBytes": "64" + ] }, - "t_struct(Set)3725_storage": { + "t_struct(Set)57094_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", + "numberOfBytes": "64", "members": [ { - "astId": 3720, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 57089, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_values", "offset": 0, "slot": "0", "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 3724, - "contract": "contracts/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", + "astId": 57093, + "contract": "src/mainchain/MainchainGatewayV3.sol:MainchainGatewayV3", "label": "_indexes", "offset": 0, "slot": "1", "type": "t_mapping(t_bytes32,t_uint256)" } - ], - "numberOfBytes": "64" + ] }, "t_uint256": { "encoding": "inplace", @@ -2904,6 +847,21 @@ "encoding": "inplace", "label": "uint8", "numberOfBytes": "1" + }, + "t_uint96": { + "encoding": "inplace", + "label": "uint96", + "numberOfBytes": "12" + } + } + }, + "timestamp": 1722414311, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "unlockFeePercentages(address)": { + "notice": "Values 0-1,000,000 map to 0%-100%" } } } diff --git a/deployments/ethereum/WethUnwrapper.json b/deployments/ethereum/WethUnwrapper.json new file mode 100644 index 00000000..be6477d8 --- /dev/null +++ b/deployments/ethereum/WethUnwrapper.json @@ -0,0 +1,45 @@ +{ + "abi": "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"weth_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"unwrap\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unwrapTo\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address payable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"weth\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contract IWETH\"}],\"stateMutability\":\"view\"},{\"type\":\"error\",\"name\":\"ErrCannotTransferFrom\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrExternalCallFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrNotWrappedContract\",\"inputs\":[]}]", + "absolutePath": "WethUnwrapper.sol", + "address": "0x8048b12511d9BE6e4e094089b12f54923C4E2F83", + "ast": "", + "blockNumber": 20425324, + "bytecode": "\"0x60a060405234801561001057600080fd5b5060405161059138038061059183398101604081905261002f91610071565b600160009081556001600160a01b0382163b90036100605760405163155634d360e31b815260040160405180910390fd5b6001600160a01b03166080526100a1565b60006020828403121561008357600080fd5b81516001600160a01b038116811461009a57600080fd5b9392505050565b6080516104c26100cf6000396000818160610152818160ea01528181610237015261030a01526104c26000f3fe6080604052600436106100385760003560e01c80633fc8cef31461004f5780635dbd60591461009f578063de0e9a3e146100bf57610047565b36610047576100456100df565b005b6100456100df565b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ab57600080fd5b506100456100ba366004610408565b61012a565b3480156100cb57600080fd5b506100456100da366004610444565b6101a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101285760405163155634d360e31b815260040160405180910390fd5b565b6002600054036101815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005561018f82610214565b6101998183610372565b50506001600055565b6002600054036101f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610178565b600260005561020281610214565b61020c3382610372565b506001600055565b604051336024820152306044820152606481018290526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610290919061045d565b6000604051808303816000865af19150503d80600081146102cd576040519150601f19603f3d011682016040523d82523d6000602084013e6102d2565b606091505b50509050806102f4576040516302805e0360e11b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561035657600080fd5b505af115801561036a573d6000803e3d6000fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103bf576040519150601f19603f3d011682016040523d82523d6000602084013e6103c4565b606091505b50509050806104035760405163094b984760e21b81526001600160a01b03841660048201526001600160e01b0319600035166024820152604401610178565b505050565b6000806040838503121561041b57600080fd5b8235915060208301356001600160a01b038116811461043957600080fd5b809150509250929050565b60006020828403121561045657600080fd5b5035919050565b6000825160005b8181101561047e5760208186018101518583015201610464565b50600092019182525091905056fea26469706673582212201afbae239d45162cd9779b75dbe52548ce0d15382c2f1a9c1956354d077fd2ef64736f6c63430008170033\"", + "callValue": 0, + "chainId": 1, + "constructorArgs": "0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "contractName": "WethUnwrapper", + "deployedBytecode": "\"0x6080604052600436106100385760003560e01c80633fc8cef31461004f5780635dbd60591461009f578063de0e9a3e146100bf57610047565b36610047576100456100df565b005b6100456100df565b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100ab57600080fd5b506100456100ba366004610408565b61012a565b3480156100cb57600080fd5b506100456100da366004610444565b6101a2565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101285760405163155634d360e31b815260040160405180910390fd5b565b6002600054036101815760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005561018f82610214565b6101998183610372565b50506001600055565b6002600054036101f45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610178565b600260005561020281610214565b61020c3382610372565b506001600055565b604051336024820152306044820152606481018290526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610290919061045d565b6000604051808303816000865af19150503d80600081146102cd576040519150601f19603f3d011682016040523d82523d6000602084013e6102d2565b606091505b50509050806102f4576040516302805e0360e11b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561035657600080fd5b505af115801561036a573d6000803e3d6000fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103bf576040519150601f19603f3d011682016040523d82523d6000602084013e6103c4565b606091505b50509050806104035760405163094b984760e21b81526001600160a01b03841660048201526001600160e01b0319600035166024820152604401610178565b505050565b6000806040838503121561041b57600080fd5b8235915060208301356001600160a01b038116811461043957600080fd5b809150509250929050565b60006020828403121561045657600080fd5b5035919050565b6000825160005b8181101561047e5760208186018101518583015201610464565b50600092019182525091905056fea26469706673582212201afbae239d45162cd9779b75dbe52548ce0d15382c2f1a9c1956354d077fd2ef64736f6c63430008170033\"", + "deployer": "0xA62DddCC58E769bCFd2f9A7A61CDF331f18c2650", + "devdoc": { + "version": 1, + "kind": "dev" + }, + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"weth_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrCannotTransferFrom\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"sig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrExternalCallFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrNotWrappedContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"fallback\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"unwrap\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address payable\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"unwrapTo\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"weth\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract IWETH\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"receive\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/extensions/WethUnwrapper.sol\\\":\\\"WethUnwrapper\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\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 ReentrancyGuard {\\\\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 constructor() {\\\\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 making 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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/WethUnwrapper.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IWETH.sol\\\\\\\";\\\\n\\\\ncontract WethUnwrapper is ReentrancyGuard {\\\\n IWETH public immutable weth;\\\\n\\\\n error ErrCannotTransferFrom();\\\\n error ErrNotWrappedContract();\\\\n error ErrExternalCallFailed(address sender, bytes4 sig);\\\\n\\\\n constructor(address weth_) {\\\\n if (address(weth_).code.length == 0) revert ErrNotWrappedContract();\\\\n weth = IWETH(weth_);\\\\n }\\\\n\\\\n fallback() external payable {\\\\n _fallback();\\\\n }\\\\n\\\\n receive() external payable {\\\\n _fallback();\\\\n }\\\\n\\\\n function unwrap(uint256 amount) external nonReentrant {\\\\n _deductWrappedAndWithdraw(amount);\\\\n _sendNativeTo(payable(msg.sender), amount);\\\\n }\\\\n\\\\n function unwrapTo(uint256 amount, address payable to) external nonReentrant {\\\\n _deductWrappedAndWithdraw(amount);\\\\n _sendNativeTo(payable(to), amount);\\\\n }\\\\n\\\\n function _deductWrappedAndWithdraw(uint256 amount) internal {\\\\n (bool success,) = address(weth).call(abi.encodeCall(IWETH.transferFrom, (msg.sender, address(this), amount)));\\\\n if (!success) revert ErrCannotTransferFrom();\\\\n\\\\n weth.withdraw(amount);\\\\n }\\\\n\\\\n function _sendNativeTo(address payable to, uint256 val) internal {\\\\n (bool success,) = to.call{ value: val }(\\\\\\\"\\\\\\\");\\\\n if (!success) {\\\\n revert ErrExternalCallFailed(to, msg.sig);\\\\n }\\\\n }\\\\n\\\\n function _fallback() internal view {\\\\n if (msg.sender != address(weth)) revert ErrNotWrappedContract();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5f7b72d9ed8944724d2f228358d565a61ea345cba1883e5424fb801bebc758ff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IWETH.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IWETH {\\\\n event Transfer(address indexed src, address indexed dst, uint wad);\\\\n\\\\n function deposit() external payable;\\\\n\\\\n function transfer(address dst, uint wad) external returns (bool);\\\\n\\\\n function approve(address guy, uint wad) external returns (bool);\\\\n\\\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\\\n\\\\n function withdraw(uint256 _wad) external;\\\\n\\\\n function balanceOf(address) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 2, + "storageLayout": { + "storage": [ + { + "astId": 52292, + "contract": "src/extensions/WethUnwrapper.sol:WethUnwrapper", + "label": "_status", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "types": { + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "timestamp": 1722414311, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file From 759883eb2e6ffa07c320ec9ae1937e87899c68c5 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 31 Jul 2024 15:56:27 +0700 Subject: [PATCH 265/305] chore: rename RoninBM artifact --- .../RoninBridgeManagerProxy.json | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 deployments/ronin-mainnet/RoninBridgeManagerProxy.json diff --git a/deployments/ronin-mainnet/RoninBridgeManagerProxy.json b/deployments/ronin-mainnet/RoninBridgeManagerProxy.json new file mode 100644 index 00000000..922aeb5f --- /dev/null +++ b/deployments/ronin-mainnet/RoninBridgeManagerProxy.json @@ -0,0 +1,46 @@ +{ + "abi": "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"logic\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"admin\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"payable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"functionDelegateCall\",\"inputs\":[{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", + "address": "0x2ae89936FC398AeA23c63dB2404018fE361A8628", + "blockNumber": 36831093, + "bytecode": "\"0x608060405260405162000f1a38038062000f1a833981016040819052620000269162000439565b8282828281620000398282600062000053565b506200004790508262000085565b5050505050506200056c565b6200005e83620000f7565b6000825111806200006c5750805b1562000080576200007e838362000139565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c760008051602062000ed3833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000f48162000168565b50565b620001028162000206565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000161838360405180606001604052806027815260200162000ef3602791396200029d565b9392505050565b6001600160a01b038116620001d35760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000ed38339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b62000211816200031c565b620002755760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001ca565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e5565b6060600080856001600160a01b031685604051620002bc919062000519565b600060405180830381855af49150503d8060008114620002f9576040519150601f19603f3d011682016040523d82523d6000602084013e620002fe565b606091505b50909250905062000312868383876200032b565b9695505050505050565b6001600160a01b03163b151590565b606083156200039f578251600003620003975762000349856200031c565b620003975760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001ca565b5081620003ab565b620003ab8383620003b3565b949350505050565b815115620003c45781518083602001fd5b8060405162461bcd60e51b8152600401620001ca919062000537565b80516001600160a01b0381168114620003f857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200043057818101518382015260200162000416565b50506000910152565b6000806000606084860312156200044f57600080fd5b6200045a84620003e0565b92506200046a60208501620003e0565b60408501519092506001600160401b03808211156200048857600080fd5b818601915086601f8301126200049d57600080fd5b815181811115620004b257620004b2620003fd565b604051601f8201601f19908116603f01168101908382118183101715620004dd57620004dd620003fd565b81604052828152896020848701011115620004f757600080fd5b6200050a83602083016020880162000413565b80955050505050509250925092565b600082516200052d81846020870162000413565b9190910192915050565b60208152600082518060208401526200055881604085016020870162000413565b601f01601f19169190910160400192915050565b610957806200057c6000396000f3fe6080604052600436106100225760003560e01c80634bb5274a1461003957610031565b366100315761002f61004c565b005b61002f61004c565b61002f610047366004610765565b61019e565b6100546101ee565b6001600160a01b031633036101945760606001600160e01b0319600035166364d3180d60e11b810161008f5761008861020f565b915061018c565b63587086bd60e11b6001600160e01b03198216016100af57610088610266565b63070d7c6960e41b6001600160e01b03198216016100cf576100886102ac565b621eb96f60e61b6001600160e01b03198216016100ee576100886102dd565b63a39f25e560e01b6001600160e01b031982160161010e5761008861031d565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b61019c610331565b565b6101a66101ee565b6001600160a01b031633036101e35760006101bf610341565b9050600080835160208501845af43d6000803e8080156101de573d6000f35b3d6000fd5b6101eb61004c565b50565b60006000805160206108bb8339815191525b546001600160a01b0316919050565b6060610219610350565b60006102283660048184610799565b81019061023591906107df565b90506102528160405180602001604052806000815250600061035b565b505060408051602081019091526000815290565b60606000806102783660048184610799565b81019061028591906107fa565b915091506102958282600161035b565b604051806020016040528060008152509250505090565b60606102b6610350565b60006102c53660048184610799565b8101906102d291906107df565b905061025281610387565b60606102e7610350565b60006102f16101ee565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b6060610327610350565b60006102f1610341565b61019c61033c610341565b6103db565b600061034b6103fa565b905090565b341561019c57600080fd5b61036483610410565b6000825111806103715750805b15610382576103808383610450565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b06101ee565b604080516001600160a01b03928316815291841660208301520160405180910390a16101eb8161047c565b3660008037600080366000845af43d6000803e8080156101de573d6000f35b60006000805160206108db833981519152610200565b61041981610513565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061047583836040518060600160405280602781526020016108fb60279139610593565b9392505050565b6001600160a01b0381166104e15760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610183565b806000805160206108bb8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051c8161060b565b61057e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610183565b806000805160206108db8339815191526104f2565b6060600080856001600160a01b0316856040516105b0919061086b565b600060405180830381855af49150503d80600081146105eb576040519150601f19603f3d011682016040523d82523d6000602084013e6105f0565b606091505b50915091506106018683838761061a565b9695505050505050565b6001600160a01b03163b151590565b60608315610687578251600003610680576106348561060b565b6106805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610183565b5081610691565b6106918383610699565b949350505050565b8151156106a95781518083602001fd5b8060405162461bcd60e51b81526004016101839190610887565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126106ea57600080fd5b81356001600160401b0380821115610704576107046106c3565b604051601f8301601f19908116603f0116810190828211818310171561072c5761072c6106c3565b8160405283815286602085880101111561074557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561077757600080fd5b81356001600160401b0381111561078d57600080fd5b610691848285016106d9565b600080858511156107a957600080fd5b838611156107b657600080fd5b5050820193919092039150565b80356001600160a01b03811681146107da57600080fd5b919050565b6000602082840312156107f157600080fd5b610475826107c3565b6000806040838503121561080d57600080fd5b610816836107c3565b915060208301356001600160401b0381111561083157600080fd5b61083d858286016106d9565b9150509250929050565b60005b8381101561086257818101518382015260200161084a565b50506000910152565b6000825161087d818460208701610847565b9190910192915050565b60208152600082518060208401526108a6816040850160208701610847565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200edc2e26cd2f089d2440222c204925f8d9a021cedddb62009458361437a857ce64736f6c63430008170033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564\"", + "contractName": "TransparentProxyV2", + "deployedBytecode": "\"0x6080604052600436106100225760003560e01c80634bb5274a1461003957610031565b366100315761002f61004c565b005b61002f61004c565b61002f610047366004610765565b61019e565b6100546101ee565b6001600160a01b031633036101945760606001600160e01b0319600035166364d3180d60e11b810161008f5761008861020f565b915061018c565b63587086bd60e11b6001600160e01b03198216016100af57610088610266565b63070d7c6960e41b6001600160e01b03198216016100cf576100886102ac565b621eb96f60e61b6001600160e01b03198216016100ee576100886102dd565b63a39f25e560e01b6001600160e01b031982160161010e5761008861031d565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b61019c610331565b565b6101a66101ee565b6001600160a01b031633036101e35760006101bf610341565b9050600080835160208501845af43d6000803e8080156101de573d6000f35b3d6000fd5b6101eb61004c565b50565b60006000805160206108bb8339815191525b546001600160a01b0316919050565b6060610219610350565b60006102283660048184610799565b81019061023591906107df565b90506102528160405180602001604052806000815250600061035b565b505060408051602081019091526000815290565b60606000806102783660048184610799565b81019061028591906107fa565b915091506102958282600161035b565b604051806020016040528060008152509250505090565b60606102b6610350565b60006102c53660048184610799565b8101906102d291906107df565b905061025281610387565b60606102e7610350565b60006102f16101ee565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b6060610327610350565b60006102f1610341565b61019c61033c610341565b6103db565b600061034b6103fa565b905090565b341561019c57600080fd5b61036483610410565b6000825111806103715750805b15610382576103808383610450565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b06101ee565b604080516001600160a01b03928316815291841660208301520160405180910390a16101eb8161047c565b3660008037600080366000845af43d6000803e8080156101de573d6000f35b60006000805160206108db833981519152610200565b61041981610513565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061047583836040518060600160405280602781526020016108fb60279139610593565b9392505050565b6001600160a01b0381166104e15760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610183565b806000805160206108bb8339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b61051c8161060b565b61057e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610183565b806000805160206108db8339815191526104f2565b6060600080856001600160a01b0316856040516105b0919061086b565b600060405180830381855af49150503d80600081146105eb576040519150601f19603f3d011682016040523d82523d6000602084013e6105f0565b606091505b50915091506106018683838761061a565b9695505050505050565b6001600160a01b03163b151590565b60608315610687578251600003610680576106348561060b565b6106805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610183565b5081610691565b6106918383610699565b949350505050565b8151156106a95781518083602001fd5b8060405162461bcd60e51b81526004016101839190610887565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126106ea57600080fd5b81356001600160401b0380821115610704576107046106c3565b604051601f8301601f19908116603f0116810190828211818310171561072c5761072c6106c3565b8160405283815286602085880101111561074557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561077757600080fd5b81356001600160401b0381111561078d57600080fd5b610691848285016106d9565b600080858511156107a957600080fd5b838611156107b657600080fd5b5050820193919092039150565b80356001600160a01b03811681146107da57600080fd5b919050565b6000602082840312156107f157600080fd5b610475826107c3565b6000806040838503121561080d57600080fd5b610816836107c3565b915060208301356001600160401b0381111561083157600080fd5b61083d858286016106d9565b9150509250929050565b60005b8381101561086257818101518382015260200161084a565b50506000910152565b6000825161087d818460208701610847565b9190910192915050565b60208152600082518060208401526108a6816040850160208701610847565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200edc2e26cd2f089d2440222c204925f8d9a021cedddb62009458361437a857ce64736f6c63430008170033\"", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the Proxy contract.", + "params": { + "admin": "The address of the admin contract.", + "data": "The initialization data.", + "logic": "The address of the logic contract." + } + }, + "functionDelegateCall(bytes)": { + "details": "Calls a function from the current implementation as specified by `data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." + } + }, + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is changed." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + } + }, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"logic\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"admin\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"previousAdmin\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newAdmin\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"AdminChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"beacon\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BeaconUpgraded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"implementation\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"Upgraded\\\",\\\"type\\\":\\\"event\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"fallback\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"functionDelegateCall\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"function\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"receive\\\"}],\\\"devdoc\\\":{\\\"events\\\":{\\\"AdminChanged(address,address)\\\":{\\\"details\\\":\\\"Emitted when the admin account has changed.\\\"},\\\"BeaconUpgraded(address)\\\":{\\\"details\\\":\\\"Emitted when the beacon is changed.\\\"},\\\"Upgraded(address)\\\":{\\\"details\\\":\\\"Emitted when the implementation is upgraded.\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"constructor\\\":{\\\"details\\\":\\\"Initializes the Proxy contract.\\\",\\\"params\\\":{\\\"admin\\\":\\\"The address of the admin contract.\\\",\\\"data\\\":\\\"The initialization data.\\\",\\\"logic\\\":\\\"The address of the logic contract.\\\"}},\\\"functionDelegateCall(bytes)\\\":{\\\"details\\\":\\\"Calls a function from the current implementation as specified by `data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"dependencies/@fdk-0.3.1-beta/src/TransparentProxyV2.sol\\\":\\\"TransparentProxyV2\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":1},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/interfaces/IERC1967.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\\\n *\\\\n * _Available since v4.8.3._\\\\n */\\\\ninterface IERC1967 {\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is changed.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/IERC1967.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\nabstract contract ERC1967Upgrade is IERC1967 {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\\\\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\\\\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\\\\n * include them in the ABI so this interface must be used to interact with it.\\\\n */\\\\ninterface ITransparentUpgradeableProxy is IERC1967 {\\\\n function admin() external view returns (address);\\\\n\\\\n function implementation() external view returns (address);\\\\n\\\\n function changeAdmin(address) external;\\\\n\\\\n function upgradeTo(address) external;\\\\n\\\\n function upgradeToAndCall(address, bytes memory) external payable;\\\\n}\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n *\\\\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\\\\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\\\\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\\\\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\\\\n * implementation.\\\\n *\\\\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\\\\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\\\\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\\\\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n *\\\\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\\\\n * implementation provides a function with the same selector.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\\\\n */\\\\n function _fallback() internal virtual override {\\\\n if (msg.sender == _getAdmin()) {\\\\n bytes memory ret;\\\\n bytes4 selector = msg.sig;\\\\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\\\\n ret = _dispatchUpgradeTo();\\\\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\\\\n ret = _dispatchUpgradeToAndCall();\\\\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\\\\n ret = _dispatchChangeAdmin();\\\\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\\\\n ret = _dispatchAdmin();\\\\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\\\\n ret = _dispatchImplementation();\\\\n } else {\\\\n revert(\\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n }\\\\n assembly {\\\\n return(add(ret, 0x20), mload(ret))\\\\n }\\\\n } else {\\\\n super._fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function _dispatchAdmin() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address admin = _getAdmin();\\\\n return abi.encode(admin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function _dispatchImplementation() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address implementation = _implementation();\\\\n return abi.encode(implementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _dispatchChangeAdmin() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address newAdmin = abi.decode(msg.data[4:], (address));\\\\n _changeAdmin(newAdmin);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n */\\\\n function _dispatchUpgradeTo() private returns (bytes memory) {\\\\n _requireZeroValue();\\\\n\\\\n address newImplementation = abi.decode(msg.data[4:], (address));\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n */\\\\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\\\\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n\\\\n return \\\\\\\"\\\\\\\";\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\\\\n * emulate some proxy functions being non-payable while still allowing value to pass through.\\\\n */\\\\n function _requireZeroValue() private {\\\\n require(msg.value == 0);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x168e36d7e616bd41f6abab4a83009da64513ae9e638aa6d5980066e2a92db689\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * Furthermore, `isContract` will also return true if the target contract within\\\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\\\n * which only has an effect at the end of a transaction.\\\\n * ====\\\\n *\\\\n * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(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(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\\\n *\\\\n * _Available since v4.8._\\\\n */\\\\n function verifyCallResultFromTarget(\\\\n address target,\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n if (success) {\\\\n if (returndata.length == 0) {\\\\n // only check isContract if the call was successful and the return data is empty\\\\n // otherwise we already know that it was a contract\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n }\\\\n return returndata;\\\\n } else {\\\\n _revert(returndata, errorMessage);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason or using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n _revert(returndata, errorMessage);\\\\n }\\\\n }\\\\n\\\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\\\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 /// @solidity memory-safe-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\\\",\\\"keccak256\\\":\\\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/dependencies/@openzeppelin-4.9.3/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```solidity\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\\\\n * _Available since v4.9 for `string`, `bytes`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n struct StringSlot {\\\\n string value;\\\\n }\\\\n\\\\n struct BytesSlot {\\\\n bytes value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\\\n */\\\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\\\n */\\\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := store.slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\\\n */\\\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := store.slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\\\",\\\"license\\\":\\\"MIT\\\"},\\\"dependencies/@fdk-0.3.1-beta/src/TransparentProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { TransparentUpgradeableProxy } from\\\\n \\\\\\\"../dependencies/@openzeppelin-4.9.3/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentProxyV2 is TransparentUpgradeableProxy {\\\\n /**\\\\n * @dev Initializes the Proxy contract.\\\\n * @param logic The address of the logic contract.\\\\n * @param admin The address of the admin contract.\\\\n * @param data The initialization data.\\\\n */\\\\n constructor(address logic, address admin, bytes memory data) payable TransparentUpgradeableProxy(logic, admin, data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory data) public payable ifAdmin {\\\\n address addr = _implementation();\\\\n\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let result := delegatecall(gas(), addr, add(data, 32), mload(data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1a3bc632cc0a6406551f4f5582bb236e702d906411a56cb412e92a785ab911ac\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "storageLayout": { + "storage": [], + "types": {} + }, + "timestamp": 1722328222, + "userdoc": { + "version": 1, + "kind": "user" + } +} \ No newline at end of file From 73ca15911210edb3ff734b7e1fc6e068419be6aa Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 31 Jul 2024 16:11:07 +0700 Subject: [PATCH 266/305] script: stage script after deploying contracts --- .../20240716-p1-2-deploy-wbtc.s.sol | 2 + ...16-p1-3-deploy-all-contract-roninchain.sol | 19 ++++ ...16-p1-4-deploy-all-contract-roninchain.sol | 88 +++++++++++++++++++ ...240716-p2-upgrade-bridge-ronin-chain.s.sol | 11 +-- ...0240716-p3-upgrade-bridge-main-chain.s.sol | 12 +-- .../wbtc-threshold.s.sol | 4 +- .../MainchainBridgeManagerDeploy.s.sol | 5 +- 7 files changed, 125 insertions(+), 16 deletions(-) create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-3-deploy-all-contract-roninchain.sol create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-4-deploy-all-contract-roninchain.sol diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol index 4f6baf13..6d55b5ca 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-2-deploy-wbtc.s.sol @@ -11,6 +11,8 @@ import "./20240716-deploy-wbtc-helper.s.sol"; contract Migration__20240716_P1_1_DeployWBTC is Migration__20240716_DeployWBTC_Helper { function _defaultArguments() internal virtual override returns (bytes memory) { ISharedArgument.WBTCParam memory param = config.sharedArguments().wbtc; + param.gateway = loadContract(Contract.RoninGatewayV3.key()); + param.pauser = 0x8417AC6838be147Ab0e201496B2E5eDf90A48cC5; return abi.encode(param.gateway, param.pauser); } diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-3-deploy-all-contract-roninchain.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-3-deploy-all-contract-roninchain.sol new file mode 100644 index 00000000..88f35e66 --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-3-deploy-all-contract-roninchain.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; +import { Contract } from "../utils/Contract.sol"; +import { WBTC } from "src/tokens/erc20/WBTC.sol"; + +import "./20240716-deploy-wbtc-helper.s.sol"; + +contract Migration__20240716_P1_3_DeployAllContract_RoninChain is Migration { + function run() public returns (WBTC instance) { + address bridgeRewardLogic = _deployLogic(Contract.BridgeReward.key()); + address bridgeSlashLogic = _deployLogic(Contract.BridgeSlash.key()); + address bridgeTrackingLogic = _deployLogic(Contract.BridgeTracking.key()); + address pauseEnforcerLogic = _deployLogic(Contract.RoninPauseEnforcer.key()); + address roninGatewayV3Logic = _deployLogic(Contract.RoninGatewayV3.key()); + } +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-4-deploy-all-contract-roninchain.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-4-deploy-all-contract-roninchain.sol new file mode 100644 index 00000000..b01489bd --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p1-4-deploy-all-contract-roninchain.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import { Migration } from "../Migration.s.sol"; +import { Contract } from "../utils/Contract.sol"; +import { WBTC } from "src/tokens/erc20/WBTC.sol"; + +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; +import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; +import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; + +import "./20240716-deploy-wbtc-helper.s.sol"; + +contract Migration__20240716_P1_4_DeployAllContract_Mainchain is Migration { + IMainchainBridgeManager _newMainchainBridgeManager; + IMainchainBridgeManager _currMainchainBridgeManager; + + function run() public returns (WBTC instance) { + _scrDeployMainchainBridgeManager(); + _scrDeployWeth(); + _scrDeployMainchainGatewayLogic(); + } + + function _scrDeployMainchainBridgeManager() internal { + _currMainchainBridgeManager = IMainchainBridgeManager(0xa71456fA88a5f6a4696D0446E690Db4a5913fab0); + + ISharedArgument.SharedParameter memory param; + + { + (address[] memory currGovernors, address[] memory currOperators, uint96[] memory currWeights) = _currMainchainBridgeManager.getFullBridgeOperatorInfos(); + uint totalCurrGovernors = currGovernors.length; + param.mainchainBridgeManager.bridgeOperators = new address[](totalCurrGovernors); + param.mainchainBridgeManager.governors = new address[](totalCurrGovernors); + param.mainchainBridgeManager.voteWeights = new uint96[](totalCurrGovernors); + + for (uint i = 0; i < totalCurrGovernors; i++) { + param.mainchainBridgeManager.bridgeOperators[i] = currOperators[i]; + param.mainchainBridgeManager.governors[i] = currGovernors[i]; + param.mainchainBridgeManager.voteWeights[i] = currWeights[i]; + } + } + + param.mainchainBridgeManager.num = 7; + param.mainchainBridgeManager.denom = 10; + param.mainchainBridgeManager.roninChainId = 2020; + param.mainchainBridgeManager.expiryDuration = 60 * 60 * 24 * 14; // 14 days + param.mainchainBridgeManager.bridgeContract = loadContract(Contract.MainchainGatewayV3.key()); + + param.mainchainBridgeManager.targetOptions = new GlobalProposal.TargetOption[](2); + param.mainchainBridgeManager.targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + param.mainchainBridgeManager.targetOptions[1] = GlobalProposal.TargetOption.PauseEnforcer; + + param.mainchainBridgeManager.targets = new address[](2); + param.mainchainBridgeManager.targets[0] = loadContract(Contract.MainchainGatewayV3.key()); + param.mainchainBridgeManager.targets[1] = loadContract(Contract.MainchainPauseEnforcer.key()); + + _newMainchainBridgeManager = IMainchainBridgeManager( + new MainchainBridgeManagerDeploy().overrideArgs( + abi.encodeCall( + _newMainchainBridgeManager.initialize, + ( + param.mainchainBridgeManager.num, + param.mainchainBridgeManager.denom, + param.mainchainBridgeManager.roninChainId, + param.mainchainBridgeManager.bridgeContract, + new address[](0), + param.mainchainBridgeManager.bridgeOperators, + param.mainchainBridgeManager.governors, + param.mainchainBridgeManager.voteWeights, + param.mainchainBridgeManager.targetOptions, + param.mainchainBridgeManager.targets + ) + ) + ).run() + ); + } + + function _scrDeployWeth() internal { + address weth = loadContract(Contract.WETH.key()); + address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); + } + + function _scrDeployMainchainGatewayLogic() internal { + address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); + } +} diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index e2a9e76a..09ecd21c 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -45,8 +45,6 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { console.log("=== Starting migration Roninchain".bold().cyan()); _currRoninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); - // _newRoninBridgeManager = _deployRoninBridgeManager(); - _newRoninBridgeManager = IRoninBridgeManager(0x2ae89936FC398AeA23c63dB2404018fE361A8628); _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor @@ -65,11 +63,10 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is } function _upgradeBridgeRoninchain() private { - address bridgeRewardLogic = _deployLogic(Contract.BridgeReward.key()); - address bridgeSlashLogic = _deployLogic(Contract.BridgeSlash.key()); - address bridgeTrackingLogic = _deployLogic(Contract.BridgeTracking.key()); - address pauseEnforcerLogic = _deployLogic(Contract.RoninPauseEnforcer.key()); - address roninGatewayV3Logic = _deployLogic(Contract.RoninGatewayV3.key()); + address bridgeRewardLogic = 0x8048b12511d9BE6e4e094089b12f54923C4E2F83; + address bridgeSlashLogic = 0xfc274EC92bBb1A1472884558d1B5CaaC6F8220Ee; + address bridgeTrackingLogic = 0x9521dBE27803f5d31da86d5846e7fE011d235018; + address roninGatewayV3Logic = 0x5C530fe5920A2991eA6e9FB99028E1B09384D7f4; address bridgeRewardProxy = loadContract(Contract.BridgeReward.key()); address bridgeSlashProxy = loadContract(Contract.BridgeSlash.key()); diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 3f4a2569..de1b9aa9 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -19,8 +19,6 @@ import "@ronin/contracts/libraries/Ballot.sol"; import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; -import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; -import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; import "@ronin/script/contracts/MainchainBridgeManagerDeploy.s.sol"; import "@ronin/script/contracts/MainchainWethUnwrapperDeploy.s.sol"; @@ -74,7 +72,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ _oldRoninBridgeManager = IRoninBridgeManager(0x5FA49E6CA54a9daa8eCa4F403ADBDE5ee075D84a); _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor - _deployMainchainBridgeManager(); + // _deployMainchainBridgeManager(); + _newMainchainBridgeManager = IMainchainBridgeManager(0x2387b3383E89c164781d173B7Aa14d9c46eD2642); _upgradeBridgeMainchain(); } @@ -150,10 +149,11 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ function _upgradeBridgeMainchain() internal { (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); - address weth = loadContract(Contract.WETH.key()); - address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); + // address weth = loadContract(Contract.WETH.key()); + // address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); + address wethUnwrapper = 0x22bc2df58D96CBc5f2599f2C25D1E565974749EE; - address mainchainGatewayV3Logic = _deployLogic(Contract.MainchainGatewayV3.key()); + address mainchainGatewayV3Logic = 0x7bBCFa8c109B0a6888d3329a6B762Ad4782e0B26; address mainchainGatewayV3Proxy = loadContract(Contract.MainchainGatewayV3.key()); ISharedArgument.SharedParameter memory param; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol index 9adcaa0b..86a3aed6 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol @@ -2,8 +2,8 @@ pragma solidity ^0.8.19; contract Migration__MapToken_WBTC_Threshold { - address _wbtcRoninToken = address(0xdeadbeef); // TODO: replace by real WBTC token address - address _wbtcMainchainToken = address(0x3429d03c6F7521AeC737a0BBF2E5ddcef2C3Ae31); + address _wbtcRoninToken = address(0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB); // https://app.roninchain.com/address/0x2cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb + address _wbtcMainchainToken = address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); // https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 // The decimal of WBTC token is 18 uint256 _wbtcHighTierThreshold = 17 ether; diff --git a/script/contracts/MainchainBridgeManagerDeploy.s.sol b/script/contracts/MainchainBridgeManagerDeploy.s.sol index 9968b361..a626be8e 100644 --- a/script/contracts/MainchainBridgeManagerDeploy.s.sol +++ b/script/contracts/MainchainBridgeManagerDeploy.s.sol @@ -13,9 +13,12 @@ import { MainchainGatewayV3Deploy } from "./MainchainGatewayV3Deploy.s.sol"; contract MainchainBridgeManagerDeploy is Migration { using LibProxy for *; + function _getProxyAdmin() internal virtual override returns (address payable) { + return payable(0xA62DddCC58E769bCFd2f9A7A61CDF331f18c2650); + } + function run() public virtual returns (IMainchainBridgeManager instance) { instance = IMainchainBridgeManager(_deployProxy(Contract.MainchainBridgeManager.key(), sender())); - address proxyAdmin = payable(address(instance)).getProxyAdmin(); // if (proxyAdmin != address(instance)) { // vm.broadcast(proxyAdmin); From 4fe04d7881e65e9c9f383e385143f146fceadf93 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Wed, 31 Jul 2024 16:23:09 +0700 Subject: [PATCH 267/305] chore: add WBTC ronin-mainnet artifact --- .../2020/run-1722417735.json | 194 ++++++++++++++++++ .../2020/run-latest.json | 194 ++++++++++++++++++ deployments/ronin-mainnet/WBTC.json | 46 ++--- 3 files changed, 411 insertions(+), 23 deletions(-) create mode 100644 broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722417735.json create mode 100644 broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-latest.json diff --git a/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722417735.json b/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722417735.json new file mode 100644 index 00000000..98f91c53 --- /dev/null +++ b/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722417735.json @@ -0,0 +1,194 @@ +{ + "transactions": [ + { + "hash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionType": "CREATE", + "contractName": "WBTC", + "contractAddress": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "function": null, + "arguments": [ + "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "0x8417AC6838be147Ab0e201496B2E5eDf90A48cC5" + ], + "transaction": { + "from": "0x08295771719b138a241f45023b13cc868d72827d", + "gas": "0x3953b6", + "value": "0x0", + "input": "0x60a06040523480156200001157600080fd5b50604051620020bd380380620020bd8339810160408190526200003491620004b4565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c919062000592565b5060066200009b828262000592565b50506007805460ff1916905550620000b560003362000189565b620000d06000805160206200209d8339815191523362000189565b620000eb6000805160206200207d8339815191523362000189565b50620000fb905060008262000189565b620001166000805160206200207d8339815191528262000189565b6001600160a01b0382166080526200013e6000805160206200209d8339815191528362000189565b6200014b60003362000199565b620001666000805160206200209d8339815191523362000199565b620001816000805160206200207d8339815191523362000199565b5050620006ac565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf90826200026a565b505050565b620001d082826200028a565b6000828152600160205260409020620001bf90826200032a565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000281836001600160a01b03841662000341565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000281836001600160a01b03841662000445565b600081815260018301602052604081205480156200043a576000620003686001836200065e565b85549091506000906200037e906001906200065e565b9050818114620003ea576000866000018281548110620003a257620003a262000680565b9060005260206000200154905080876000018481548110620003c857620003c862000680565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003fe57620003fe62000696565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000284565b600091505062000284565b60008181526001830160205260408120546200048e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000284565b50600062000284565b80516001600160a01b0381168114620004af57600080fd5b919050565b60008060408385031215620004c857600080fd5b620004d38362000497565b9150620004e36020840162000497565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051757607f821691505b6020821081036200053857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005695750805b601f850160051c820191505b818110156200058a5782815560010162000575565b505050505050565b81516001600160401b03811115620005ae57620005ae620004ec565b620005c681620005bf845462000502565b846200053e565b602080601f831160018114620005fe5760008415620005e55750858301515b600019600386901b1c1916600185901b1785556200058a565b600085815260208120601f198616915b828110156200062f578886015182559484019460019091019084016200060e565b50858210156200064e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200028457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516119ae620006cf60003960008181610433015261106401526119ae6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051601281526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220a3425f4a72f112ea886f5fb148825fd09155665a3039ab7125839e61b456a38364736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a60000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "nonce": "0x24", + "chainId": "0x7e4" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x3f2067", + "logs": [ + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3b", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3c", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3d", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3e", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3f", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x40", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x41", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x42", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x43", + "removed": false + } + ], + "logsBloom": "0x0000000400000002000000000000000000000000000000000000000000000004000000000000000000000000000000400020000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000004000000802000000000000000000080000000000000000000000000000100000000000004000000000000000000000800000000000010000000004000000000100000000000000000000000000000000002000000000000020100000000000000000000000000000000000008000000000120000000000010000a000000020000000000000000000000000000000000000000400000000000000000000000000", + "type": "0x0", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "gasUsed": "0x1c7713", + "effectiveGasPrice": "0x4a817c800", + "from": "0x08295771719b138a241f45023b13cc868d72827d", + "to": null, + "contractAddress": "0xc13948b5325c11279f5b6cba67957581d374e0f0" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1722417735, + "chain": 2020, + "commit": "73ca159" +} \ No newline at end of file diff --git a/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-latest.json b/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-latest.json new file mode 100644 index 00000000..98f91c53 --- /dev/null +++ b/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-latest.json @@ -0,0 +1,194 @@ +{ + "transactions": [ + { + "hash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionType": "CREATE", + "contractName": "WBTC", + "contractAddress": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "function": null, + "arguments": [ + "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "0x8417AC6838be147Ab0e201496B2E5eDf90A48cC5" + ], + "transaction": { + "from": "0x08295771719b138a241f45023b13cc868d72827d", + "gas": "0x3953b6", + "value": "0x0", + "input": "0x60a06040523480156200001157600080fd5b50604051620020bd380380620020bd8339810160408190526200003491620004b4565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c919062000592565b5060066200009b828262000592565b50506007805460ff1916905550620000b560003362000189565b620000d06000805160206200209d8339815191523362000189565b620000eb6000805160206200207d8339815191523362000189565b50620000fb905060008262000189565b620001166000805160206200207d8339815191528262000189565b6001600160a01b0382166080526200013e6000805160206200209d8339815191528362000189565b6200014b60003362000199565b620001666000805160206200209d8339815191523362000199565b620001816000805160206200207d8339815191523362000199565b5050620006ac565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf90826200026a565b505050565b620001d082826200028a565b6000828152600160205260409020620001bf90826200032a565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000281836001600160a01b03841662000341565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000281836001600160a01b03841662000445565b600081815260018301602052604081205480156200043a576000620003686001836200065e565b85549091506000906200037e906001906200065e565b9050818114620003ea576000866000018281548110620003a257620003a262000680565b9060005260206000200154905080876000018481548110620003c857620003c862000680565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003fe57620003fe62000696565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000284565b600091505062000284565b60008181526001830160205260408120546200048e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000284565b50600062000284565b80516001600160a01b0381168114620004af57600080fd5b919050565b60008060408385031215620004c857600080fd5b620004d38362000497565b9150620004e36020840162000497565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051757607f821691505b6020821081036200053857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005695750805b601f850160051c820191505b818110156200058a5782815560010162000575565b505050505050565b81516001600160401b03811115620005ae57620005ae620004ec565b620005c681620005bf845462000502565b846200053e565b602080601f831160018114620005fe5760008415620005e55750858301515b600019600386901b1c1916600185901b1785556200058a565b600085815260208120601f198616915b828110156200062f578886015182559484019460019091019084016200060e565b50858210156200064e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200028457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516119ae620006cf60003960008181610433015261106401526119ae6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051601281526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220a3425f4a72f112ea886f5fb148825fd09155665a3039ab7125839e61b456a38364736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a60000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "nonce": "0x24", + "chainId": "0x7e4" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x3f2067", + "logs": [ + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3b", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3c", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3d", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3e", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x3f", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x40", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x41", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x42", + "removed": false + }, + { + "address": "0xc13948b5325c11279f5b6cba67957581d374e0f0", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "logIndex": "0x43", + "removed": false + } + ], + "logsBloom": "0x0000000400000002000000000000000000000000000000000000000000000004000000000000000000000000000000400020000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000004000000802000000000000000000080000000000000000000000000000100000000000004000000000000000000000800000000000010000000004000000000100000000000000000000000000000000002000000000000020100000000000000000000000000000000000008000000000120000000000010000a000000020000000000000000000000000000000000000000400000000000000000000000000", + "type": "0x0", + "transactionHash": "0x43fd25839ecca0ccd2f0fb7a9fa5f9aedb55609fccb1e80dd363b3bf3bace93a", + "transactionIndex": "0xf", + "blockHash": "0x4781fb60438db4a506564b647470276df0dfae23131ecfddc8decd065ed540f5", + "blockNumber": "0x23273fd", + "gasUsed": "0x1c7713", + "effectiveGasPrice": "0x4a817c800", + "from": "0x08295771719b138a241f45023b13cc868d72827d", + "to": null, + "contractAddress": "0xc13948b5325c11279f5b6cba67957581d374e0f0" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1722417735, + "chain": 2020, + "commit": "73ca159" +} \ No newline at end of file diff --git a/deployments/ronin-mainnet/WBTC.json b/deployments/ronin-mainnet/WBTC.json index e50aa994..3480f99a 100644 --- a/deployments/ronin-mainnet/WBTC.json +++ b/deployments/ronin-mainnet/WBTC.json @@ -1,16 +1,16 @@ { "abi": "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"gateway\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pauser\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GATEWAY_ADDRESS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MINTER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PAUSER_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\":\"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\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"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\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"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\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"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\":\"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\":\"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},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false}]", "absolutePath": "WBTC.sol", - "address": "0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB", + "address": "0xC13948b5325c11279F5B6cBA67957581d374E0F0", "ast": "", - "blockNumber": 36858178, - "bytecode": "\"0x60a06040523480156200001157600080fd5b5060405162001fe538038062001fe58339810160408190526200003491620004ad565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c91906200058b565b5060066200009b82826200058b565b50506007805460ff1916905550620000b560003362000189565b620000d060008051602062001fc58339815191523362000189565b620000eb60008051602062001fa58339815191523362000189565b50620000fb905060008262000189565b6200011660008051602062001fa58339815191528262000189565b6001600160a01b0382166080526200013e60008051602062001fc58339815191528362000189565b6200014b60003362000199565b6200016660008051602062001fc58339815191523362000199565b6200018160008051602062001fa58339815191523362000199565b5050620006a5565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf908262000252565b505050565b620001d0828262000272565b6000828152600160205260409020620001bf9082620002fa565b620001f6828262000311565b1562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000269836001600160a01b0384166200033a565b90505b92915050565b6200027e828262000311565b62000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002b63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000269836001600160a01b0384166200043e565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008181526001830160205260408120548015620004335760006200036160018362000657565b8554909150600090620003779060019062000657565b9050818114620003e35760008660000182815481106200039b576200039b62000679565b9060005260206000200154905080876000018481548110620003c157620003c162000679565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003f757620003f76200068f565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506200026c565b60009150506200026c565b600081815260018301602052604081205462000487575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200026c565b5060006200026c565b80516001600160a01b0381168114620004a857600080fd5b919050565b60008060408385031215620004c157600080fd5b620004cc8362000490565b9150620004dc6020840162000490565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051057607f821691505b6020821081036200053157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005625750805b601f850160051c820191505b8181101562000583578281556001016200056e565b505050505050565b81516001600160401b03811115620005a757620005a7620004e5565b620005bf81620005b88454620004fb565b8462000537565b602080601f831160018114620005f75760008415620005de5750858301515b600019600386901b1c1916600185901b17855562000583565b600085815260208120601f198616915b82811015620006285788860151825594840194600190910190840162000607565b5085821015620006475787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200026c57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516118dd620006c8600039600081816103840152610f0601526118dd6000f3fe608060405234801561001057600080fd5b506004361061015f5760003560e01c806301ffc9a71461016457806306fdde031461018c578063095ea7b3146101a157806318160ddd146101b457806323b872dd146101c6578063248a9ca3146101d95780632f2ff15d146101ec578063313ce5671461020157806336568abe1461021057806339509351146102235780633f4ba83a1461023657806340c10f191461023e57806342966c68146102515780635c975abb1461026457806370a082311461026f57806379cc6790146102985780638456cb59146102ab5780639010d07c146102b357806391d14854146102d357806395d89b41146102e6578063a217fddf146102ee578063a457c2d7146102f6578063a9059cbb14610309578063ca15c8731461031c578063d53913931461032f578063d547741f14610344578063dd62ed3e14610357578063e63ab1e91461036a578063f56c84e51461037f575b600080fd5b61017761017236600461150f565b6103a6565b60405190151581526020015b60405180910390f35b6101946103d1565b604051610183919061155d565b6101776101af3660046115ac565b610463565b6004545b604051908152602001610183565b6101776101d43660046115d6565b61047b565b6101b86101e7366004611612565b61049f565b6101ff6101fa36600461162b565b6104b4565b005b60405160128152602001610183565b6101ff61021e36600461162b565b6104d5565b6101776102313660046115ac565b610558565b6101ff61057a565b6101ff61024c3660046115ac565b6105f8565b6101ff61025f366004611612565b610673565b60075460ff16610177565b6101b861027d366004611657565b6001600160a01b031660009081526002602052604090205490565b6101ff6102a63660046115ac565b610680565b6101ff610695565b6102c66102c1366004611672565b61070f565b6040516101839190611694565b6101776102e136600461162b565b61072e565b610194610757565b6101b8600081565b6101776103043660046115ac565b610766565b6101776103173660046115ac565b6107e1565b6101b861032a366004611612565b6107ef565b6101b860008051602061186883398151915281565b6101ff61035236600461162b565b610806565b6101b86103653660046116a8565b610822565b6101b860008051602061184883398151915281565b6102c67f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b14806103cb57506103cb8261084d565b92915050565b6060600580546103e0906116d2565b80601f016020809104026020016040519081016040528092919081815260200182805461040c906116d2565b80156104595780601f1061042e57610100808354040283529160200191610459565b820191906000526020600020905b81548152906001019060200180831161043c57829003601f168201915b5050505050905090565b600033610471818585610882565b5060019392505050565b6000336104898582856109a6565b610494858585610a20565b506001949350505050565b60009081526020819052604090206001015490565b6104bd8261049f565b6104c681610be7565b6104d08383610bf1565b505050565b6001600160a01b038116331461054a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105548282610c13565b5050565b60003361047181858561056b8383610822565b6105759190611722565b610882565b6105926000805160206118488339815191523361072e565b6105ee5760405162461bcd60e51b8152602060048201526039602482015260008051602061182883398151915260448201527876652070617573657220726f6c6520746f20756e706175736560381b6064820152608401610541565b6105f6610c35565b565b6106106000805160206118688339815191523361072e565b6106695760405162461bcd60e51b815260206004820152603660248201526000805160206118288339815191526044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b6064820152608401610541565b6105548282610c81565b61067d3382610d5a565b50565b61068b8233836109a6565b6105548282610d5a565b6106ad6000805160206118488339815191523361072e565b6107075760405162461bcd60e51b8152602060048201526037602482015260008051602061182883398151915260448201527676652070617573657220726f6c6520746f20706175736560481b6064820152608401610541565b6105f6610ea2565b60008281526001602052604081206107279083610edf565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600680546103e0906116d2565b600033816107748286610822565b9050838110156107d45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610541565b6104948286868403610882565b600033610471818585610a20565b60008181526001602052604081206103cb90610eeb565b61080f8261049f565b61081881610be7565b6104d08383610c13565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b14806103cb57506301ffc9a760e01b6001600160e01b03198316146103cb565b6001600160a01b0383166108e45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610541565b6001600160a01b0382166109455760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610541565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006109b28484610822565b90506000198114610a1a5781811015610a0d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610541565b610a1a8484848403610882565b50505050565b6001600160a01b038316610a845760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610541565b6001600160a01b038216610ae65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610541565b610af1838383610ef5565b6001600160a01b03831660009081526002602052604090205481811015610b695760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610541565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610ba0908490611722565b92505081905550826001600160a01b0316846001600160a01b031660008051602061188883398151915284604051610bda91815260200190565b60405180910390a3610a1a565b61067d8133610f91565b610bfb8282610ff5565b60008281526001602052604090206104d09082611079565b610c1d828261108e565b60008281526001602052604090206104d090826110f3565b610c3d611108565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051610c779190611694565b60405180910390a1565b6001600160a01b038216610cd75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610541565b610ce360008383610ef5565b8060046000828254610cf59190611722565b90915550506001600160a01b03821660009081526002602052604081208054839290610d22908490611722565b90915550506040518181526001600160a01b038316906000906000805160206118888339815191529060200160405180910390a35050565b6001600160a01b038216610dba5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610541565b610dc682600083610ef5565b6001600160a01b03821660009081526002602052604090205481811015610e3a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610541565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610e69908490611735565b90915550506040518281526000906001600160a01b038516906000805160206118888339815191529060200160405180910390a3505050565b610eaa611151565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c6a3390565b60006107278383611197565b60006103cb825490565b6001600160a01b038216610f8657337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f865760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b6064820152608401610541565b6104d08383836111c1565b610f9b828261072e565b61055457610fb3816001600160a01b031660146111cc565b610fbe8360206111cc565b604051602001610fcf929190611748565b60408051601f198184030181529082905262461bcd60e51b82526105419160040161155d565b610fff828261072e565b610554576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556110353390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610727836001600160a01b038416611367565b611098828261072e565b15610554576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610727836001600160a01b0384166113b6565b60075460ff166105f65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610541565b60075460ff16156105f65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610541565b60008260000182815481106111ae576111ae6117b7565b9060005260206000200154905092915050565b6104d08383836114a9565b606060006111db8360026117cd565b6111e6906002611722565b6001600160401b038111156111fd576111fd6117e4565b6040519080825280601f01601f191660200182016040528015611227576020820181803683370190505b509050600360fc1b81600081518110611242576112426117b7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611271576112716117b7565b60200101906001600160f81b031916908160001a90535060006112958460026117cd565b6112a0906001611722565b90505b6001811115611318576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106112d4576112d46117b7565b1a60f81b8282815181106112ea576112ea6117b7565b60200101906001600160f81b031916908160001a90535060049490941c93611311816117fa565b90506112a3565b5083156107275760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610541565b60008181526001830160205260408120546113ae575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103cb565b5060006103cb565b6000818152600183016020526040812054801561149f5760006113da600183611735565b85549091506000906113ee90600190611735565b905081811461145357600086600001828154811061140e5761140e6117b7565b9060005260206000200154905080876000018481548110611431576114316117b7565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061146457611464611811565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103cb565b60009150506103cb565b60075460ff16156104d05760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b6064820152608401610541565b60006020828403121561152157600080fd5b81356001600160e01b03198116811461072757600080fd5b60005b8381101561155457818101518382015260200161153c565b50506000910152565b602081526000825180602084015261157c816040850160208701611539565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146115a757600080fd5b919050565b600080604083850312156115bf57600080fd5b6115c883611590565b946020939093013593505050565b6000806000606084860312156115eb57600080fd5b6115f484611590565b925061160260208501611590565b9150604084013590509250925092565b60006020828403121561162457600080fd5b5035919050565b6000806040838503121561163e57600080fd5b8235915061164e60208401611590565b90509250929050565b60006020828403121561166957600080fd5b61072782611590565b6000806040838503121561168557600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b600080604083850312156116bb57600080fd5b6116c483611590565b915061164e60208401611590565b600181811c908216806116e657607f821691505b60208210810361170657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103cb576103cb61170c565b818103818111156103cb576103cb61170c565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81526000835161177a816017850160208801611539565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117ab816028840160208801611539565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176103cb576103cb61170c565b634e487b7160e01b600052604160045260246000fd5b6000816118095761180961170c565b506000190190565b634e487b7160e01b600052603160045260246000fdfe45524332305072657365744d696e7465725061757365723a206d75737420686165d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ebf8281f24fe4ea122a9b78ed2027e004bc0f4efe28625b5860ee519b3dea7c564736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6\"", + "blockNumber": 36860867, + "bytecode": "\"0x60a06040523480156200001157600080fd5b50604051620020bd380380620020bd8339810160408190526200003491620004b4565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c919062000592565b5060066200009b828262000592565b50506007805460ff1916905550620000b560003362000189565b620000d06000805160206200209d8339815191523362000189565b620000eb6000805160206200207d8339815191523362000189565b50620000fb905060008262000189565b620001166000805160206200207d8339815191528262000189565b6001600160a01b0382166080526200013e6000805160206200209d8339815191528362000189565b6200014b60003362000199565b620001666000805160206200209d8339815191523362000199565b620001816000805160206200207d8339815191523362000199565b5050620006ac565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf90826200026a565b505050565b620001d082826200028a565b6000828152600160205260409020620001bf90826200032a565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000281836001600160a01b03841662000341565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000281836001600160a01b03841662000445565b600081815260018301602052604081205480156200043a576000620003686001836200065e565b85549091506000906200037e906001906200065e565b9050818114620003ea576000866000018281548110620003a257620003a262000680565b9060005260206000200154905080876000018481548110620003c857620003c862000680565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003fe57620003fe62000696565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000284565b600091505062000284565b60008181526001830160205260408120546200048e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000284565b50600062000284565b80516001600160a01b0381168114620004af57600080fd5b919050565b60008060408385031215620004c857600080fd5b620004d38362000497565b9150620004e36020840162000497565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051757607f821691505b6020821081036200053857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005695750805b601f850160051c820191505b818110156200058a5782815560010162000575565b505050505050565b81516001600160401b03811115620005ae57620005ae620004ec565b620005c681620005bf845462000502565b846200053e565b602080601f831160018114620005fe5760008415620005e55750858301515b600019600386901b1c1916600185901b1785556200058a565b600085815260208120601f198616915b828110156200062f578886015182559484019460019091019084016200060e565b50858210156200064e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200028457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516119ae620006cf60003960008181610433015261106401526119ae6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051601281526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220a3425f4a72f112ea886f5fb148825fd09155665a3039ab7125839e61b456a38364736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6\"", "callValue": 0, "chainId": 2020, "constructorArgs": "0x0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", "contractName": "WBTC", - "deployedBytecode": "\"0x608060405234801561001057600080fd5b506004361061015f5760003560e01c806301ffc9a71461016457806306fdde031461018c578063095ea7b3146101a157806318160ddd146101b457806323b872dd146101c6578063248a9ca3146101d95780632f2ff15d146101ec578063313ce5671461020157806336568abe1461021057806339509351146102235780633f4ba83a1461023657806340c10f191461023e57806342966c68146102515780635c975abb1461026457806370a082311461026f57806379cc6790146102985780638456cb59146102ab5780639010d07c146102b357806391d14854146102d357806395d89b41146102e6578063a217fddf146102ee578063a457c2d7146102f6578063a9059cbb14610309578063ca15c8731461031c578063d53913931461032f578063d547741f14610344578063dd62ed3e14610357578063e63ab1e91461036a578063f56c84e51461037f575b600080fd5b61017761017236600461150f565b6103a6565b60405190151581526020015b60405180910390f35b6101946103d1565b604051610183919061155d565b6101776101af3660046115ac565b610463565b6004545b604051908152602001610183565b6101776101d43660046115d6565b61047b565b6101b86101e7366004611612565b61049f565b6101ff6101fa36600461162b565b6104b4565b005b60405160128152602001610183565b6101ff61021e36600461162b565b6104d5565b6101776102313660046115ac565b610558565b6101ff61057a565b6101ff61024c3660046115ac565b6105f8565b6101ff61025f366004611612565b610673565b60075460ff16610177565b6101b861027d366004611657565b6001600160a01b031660009081526002602052604090205490565b6101ff6102a63660046115ac565b610680565b6101ff610695565b6102c66102c1366004611672565b61070f565b6040516101839190611694565b6101776102e136600461162b565b61072e565b610194610757565b6101b8600081565b6101776103043660046115ac565b610766565b6101776103173660046115ac565b6107e1565b6101b861032a366004611612565b6107ef565b6101b860008051602061186883398151915281565b6101ff61035236600461162b565b610806565b6101b86103653660046116a8565b610822565b6101b860008051602061184883398151915281565b6102c67f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b14806103cb57506103cb8261084d565b92915050565b6060600580546103e0906116d2565b80601f016020809104026020016040519081016040528092919081815260200182805461040c906116d2565b80156104595780601f1061042e57610100808354040283529160200191610459565b820191906000526020600020905b81548152906001019060200180831161043c57829003601f168201915b5050505050905090565b600033610471818585610882565b5060019392505050565b6000336104898582856109a6565b610494858585610a20565b506001949350505050565b60009081526020819052604090206001015490565b6104bd8261049f565b6104c681610be7565b6104d08383610bf1565b505050565b6001600160a01b038116331461054a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105548282610c13565b5050565b60003361047181858561056b8383610822565b6105759190611722565b610882565b6105926000805160206118488339815191523361072e565b6105ee5760405162461bcd60e51b8152602060048201526039602482015260008051602061182883398151915260448201527876652070617573657220726f6c6520746f20756e706175736560381b6064820152608401610541565b6105f6610c35565b565b6106106000805160206118688339815191523361072e565b6106695760405162461bcd60e51b815260206004820152603660248201526000805160206118288339815191526044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b6064820152608401610541565b6105548282610c81565b61067d3382610d5a565b50565b61068b8233836109a6565b6105548282610d5a565b6106ad6000805160206118488339815191523361072e565b6107075760405162461bcd60e51b8152602060048201526037602482015260008051602061182883398151915260448201527676652070617573657220726f6c6520746f20706175736560481b6064820152608401610541565b6105f6610ea2565b60008281526001602052604081206107279083610edf565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600680546103e0906116d2565b600033816107748286610822565b9050838110156107d45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610541565b6104948286868403610882565b600033610471818585610a20565b60008181526001602052604081206103cb90610eeb565b61080f8261049f565b61081881610be7565b6104d08383610c13565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b14806103cb57506301ffc9a760e01b6001600160e01b03198316146103cb565b6001600160a01b0383166108e45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610541565b6001600160a01b0382166109455760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610541565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006109b28484610822565b90506000198114610a1a5781811015610a0d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610541565b610a1a8484848403610882565b50505050565b6001600160a01b038316610a845760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610541565b6001600160a01b038216610ae65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610541565b610af1838383610ef5565b6001600160a01b03831660009081526002602052604090205481811015610b695760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610541565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610ba0908490611722565b92505081905550826001600160a01b0316846001600160a01b031660008051602061188883398151915284604051610bda91815260200190565b60405180910390a3610a1a565b61067d8133610f91565b610bfb8282610ff5565b60008281526001602052604090206104d09082611079565b610c1d828261108e565b60008281526001602052604090206104d090826110f3565b610c3d611108565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051610c779190611694565b60405180910390a1565b6001600160a01b038216610cd75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610541565b610ce360008383610ef5565b8060046000828254610cf59190611722565b90915550506001600160a01b03821660009081526002602052604081208054839290610d22908490611722565b90915550506040518181526001600160a01b038316906000906000805160206118888339815191529060200160405180910390a35050565b6001600160a01b038216610dba5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610541565b610dc682600083610ef5565b6001600160a01b03821660009081526002602052604090205481811015610e3a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610541565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610e69908490611735565b90915550506040518281526000906001600160a01b038516906000805160206118888339815191529060200160405180910390a3505050565b610eaa611151565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c6a3390565b60006107278383611197565b60006103cb825490565b6001600160a01b038216610f8657337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f865760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b6064820152608401610541565b6104d08383836111c1565b610f9b828261072e565b61055457610fb3816001600160a01b031660146111cc565b610fbe8360206111cc565b604051602001610fcf929190611748565b60408051601f198184030181529082905262461bcd60e51b82526105419160040161155d565b610fff828261072e565b610554576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556110353390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610727836001600160a01b038416611367565b611098828261072e565b15610554576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610727836001600160a01b0384166113b6565b60075460ff166105f65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610541565b60075460ff16156105f65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610541565b60008260000182815481106111ae576111ae6117b7565b9060005260206000200154905092915050565b6104d08383836114a9565b606060006111db8360026117cd565b6111e6906002611722565b6001600160401b038111156111fd576111fd6117e4565b6040519080825280601f01601f191660200182016040528015611227576020820181803683370190505b509050600360fc1b81600081518110611242576112426117b7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611271576112716117b7565b60200101906001600160f81b031916908160001a90535060006112958460026117cd565b6112a0906001611722565b90505b6001811115611318576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106112d4576112d46117b7565b1a60f81b8282815181106112ea576112ea6117b7565b60200101906001600160f81b031916908160001a90535060049490941c93611311816117fa565b90506112a3565b5083156107275760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610541565b60008181526001830160205260408120546113ae575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103cb565b5060006103cb565b6000818152600183016020526040812054801561149f5760006113da600183611735565b85549091506000906113ee90600190611735565b905081811461145357600086600001828154811061140e5761140e6117b7565b9060005260206000200154905080876000018481548110611431576114316117b7565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061146457611464611811565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103cb565b60009150506103cb565b60075460ff16156104d05760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b6064820152608401610541565b60006020828403121561152157600080fd5b81356001600160e01b03198116811461072757600080fd5b60005b8381101561155457818101518382015260200161153c565b50506000910152565b602081526000825180602084015261157c816040850160208701611539565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146115a757600080fd5b919050565b600080604083850312156115bf57600080fd5b6115c883611590565b946020939093013593505050565b6000806000606084860312156115eb57600080fd5b6115f484611590565b925061160260208501611590565b9150604084013590509250925092565b60006020828403121561162457600080fd5b5035919050565b6000806040838503121561163e57600080fd5b8235915061164e60208401611590565b90509250929050565b60006020828403121561166957600080fd5b61072782611590565b6000806040838503121561168557600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b600080604083850312156116bb57600080fd5b6116c483611590565b915061164e60208401611590565b600181811c908216806116e657607f821691505b60208210810361170657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103cb576103cb61170c565b818103818111156103cb576103cb61170c565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b81526000835161177a816017850160208801611539565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117ab816028840160208801611539565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176103cb576103cb61170c565b634e487b7160e01b600052604160045260246000fd5b6000816118095761180961170c565b506000190190565b634e487b7160e01b600052603160045260246000fdfe45524332305072657365744d696e7465725061757365723a206d75737420686165d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ebf8281f24fe4ea122a9b78ed2027e004bc0f4efe28625b5860ee519b3dea7c564736f6c63430008170033\"", - "deployer": "0xA62DddCC58E769bCFd2f9A7A61CDF331f18c2650", + "deployedBytecode": "\"0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051601281526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220a3425f4a72f112ea886f5fb148825fd09155665a3039ab7125839e61b456a38364736f6c63430008170033\"", + "deployer": "0x08295771719b138a241F45023B13CC868D72827D", "devdoc": { "version": 1, "kind": "dev", @@ -116,8 +116,8 @@ } }, "isFoundry": true, - "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"gateway\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"pauser\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Approval\\\",\\\"type\\\":\\\"event\\\"},{\\\"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\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Transfer\\\",\\\"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\\\":\\\"GATEWAY_ADDRESS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"MINTER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"PAUSER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"allowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"approve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"balanceOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burn\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burnFrom\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"decimals\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"subtractedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"decreaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"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\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"addedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"increaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"mint\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"name\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"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\\\":\\\"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\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"supportsInterface\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"symbol\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalSupply\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transferFrom\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"events\\\":{\\\"Approval(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\\\"},\\\"Paused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is triggered by `account`.\\\"},\\\"RoleAdminChanged(bytes32,bytes32,bytes32)\\\":{\\\"details\\\":\\\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\\\"},\\\"RoleGranted(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\\\"},\\\"RoleRevoked(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\\\"},\\\"Transfer(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\\\"},\\\"Unpaused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is lifted by `account`.\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"allowance(address,address)\\\":{\\\"details\\\":\\\"See {IERC20-allowance}.\\\"},\\\"approve(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\\\"},\\\"balanceOf(address)\\\":{\\\"details\\\":\\\"See {IERC20-balanceOf}.\\\"},\\\"burn(uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\\\"},\\\"burnFrom(address,uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\\\"},\\\"decimals()\\\":{\\\"details\\\":\\\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\\\"},\\\"decreaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\\\"},\\\"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. May emit a {RoleGranted} event.\\\"},\\\"hasRole(bytes32,address)\\\":{\\\"details\\\":\\\"Returns `true` if `account` has been granted `role`.\\\"},\\\"increaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\\\"},\\\"mint(address,uint256)\\\":{\\\"details\\\":\\\"Creates `amount` new tokens for `to`. See {ERC20-_mint}. Requirements: - the caller must have the `MINTER_ROLE`.\\\"},\\\"name()\\\":{\\\"details\\\":\\\"Returns the name of the token.\\\"},\\\"pause()\\\":{\\\"details\\\":\\\"Pauses all token transfers. See {ERC20Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"},\\\"paused()\\\":{\\\"details\\\":\\\"Returns true if the contract is paused, and false otherwise.\\\"},\\\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\\\"},\\\"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. May emit a {RoleRevoked} event.\\\"},\\\"supportsInterface(bytes4)\\\":{\\\"details\\\":\\\"See {IERC165-supportsInterface}.\\\"},\\\"symbol()\\\":{\\\"details\\\":\\\"Returns the symbol of the token, usually a shorter version of the name.\\\"},\\\"totalSupply()\\\":{\\\"details\\\":\\\"See {IERC20-totalSupply}.\\\"},\\\"transfer(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\\\"},\\\"transferFrom(address,address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\\\"},\\\"unpause()\\\":{\\\"details\\\":\\\"Unpauses all token transfers. See {ERC20Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/tokens/erc20/WBTC.sol\\\":\\\"WBTC\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":1},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC20Metadata.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.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 Contracts guidelines: functions revert\\\\n * instead returning `false` on failure. This behavior is nonetheless\\\\n * conventional and does not conflict with the expectations of ERC20\\\\n * 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, IERC20Metadata {\\\\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\\\\n /**\\\\n * @dev Sets the values for {name} and {symbol}.\\\\n *\\\\n * The default value of {decimals} is 18. To select a different value for\\\\n * {decimals} you should overload it.\\\\n *\\\\n * All two of these values are immutable: they can only be set once during\\\\n * construction.\\\\n */\\\\n constructor(string memory name_, string memory symbol_) {\\\\n _name = name_;\\\\n _symbol = symbol_;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() public view virtual override 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 override 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 this function is\\\\n * overridden;\\\\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 override returns (uint8) {\\\\n return 18;\\\\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 * - `to` cannot be the zero address.\\\\n * - the caller must have a balance of at least `amount`.\\\\n */\\\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\\\n address owner = _msgSender();\\\\n _transfer(owner, to, 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 * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\\\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 address owner = _msgSender();\\\\n _approve(owner, 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 * NOTE: Does not update the allowance if the current allowance\\\\n * is the maximum `uint256`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` and `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n * - the caller must have allowance for ``from``'s tokens of at least\\\\n * `amount`.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) public virtual override returns (bool) {\\\\n address spender = _msgSender();\\\\n _spendAllowance(from, spender, amount);\\\\n _transfer(from, to, amount);\\\\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 address owner = _msgSender();\\\\n _approve(owner, spender, allowance(owner, spender) + 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 address owner = _msgSender();\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n require(currentAllowance >= subtractedValue, \\\\\\\"ERC20: decreased allowance below zero\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - subtractedValue);\\\\n }\\\\n\\\\n return true;\\\\n }\\\\n\\\\n /**\\\\n * @dev Moves `amount` of tokens from `from` to `to`.\\\\n *\\\\n * This 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 * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n */\\\\n function _transfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC20: transfer from the zero address\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC20: transfer to the zero address\\\\\\\");\\\\n\\\\n _beforeTokenTransfer(from, to, amount);\\\\n\\\\n uint256 fromBalance = _balances[from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC20: transfer amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[from] = fromBalance - amount;\\\\n }\\\\n _balances[to] += amount;\\\\n\\\\n emit Transfer(from, to, amount);\\\\n\\\\n _afterTokenTransfer(from, to, 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 * - `account` 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 += amount;\\\\n _balances[account] += amount;\\\\n emit Transfer(address(0), account, amount);\\\\n\\\\n _afterTokenTransfer(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 uint256 accountBalance = _balances[account];\\\\n require(accountBalance >= amount, \\\\\\\"ERC20: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[account] = accountBalance - amount;\\\\n }\\\\n _totalSupply -= amount;\\\\n\\\\n emit Transfer(account, address(0), amount);\\\\n\\\\n _afterTokenTransfer(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(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) 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 Updates `owner` s allowance for `spender` based on spent `amount`.\\\\n *\\\\n * Does not update the allowance amount in case of infinite allowance.\\\\n * Revert if not enough allowance is available.\\\\n *\\\\n * Might emit an {Approval} event.\\\\n */\\\\n function _spendAllowance(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n if (currentAllowance != type(uint256).max) {\\\\n require(currentAllowance >= amount, \\\\\\\"ERC20: insufficient allowance\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - amount);\\\\n }\\\\n }\\\\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 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(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after 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 * has been transferred to `to`.\\\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.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 /**\\\\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 _spendAllowance(account, _msgSender(), amount);\\\\n _burn(account, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n */\\\\nabstract contract ERC20Pausable is ERC20, Pausable {\\\\n /**\\\\n * @dev See {ERC20-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n\\\\n require(!paused(), \\\\\\\"ERC20Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x978847fbff92d66d27d8767402a90ba996970b1936b372406aa17f5492bd8dc5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC20.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\ninterface IERC20Metadata is IERC20 {\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the symbol of the token.\\\\n */\\\\n function symbol() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the decimals places of the token.\\\\n */\\\\n function decimals() external view returns (uint8);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC20} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\\\n * account that deploys the contract.\\\\n *\\\\n * See {ERC20-constructor}.\\\\n */\\\\n constructor(string memory name, string memory symbol) ERC20(name, symbol) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`.\\\\n *\\\\n * See {ERC20-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(address to, uint256 amount) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n _mint(to, amount);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override(ERC20, ERC20Pausable) {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2cd54808b851c4db22f459065af0b7a952262741a85a73923e7a660767cd7baa\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/tokens/erc20/WBTC.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\\\\\";\\\\n\\\\ncontract WBTC is ERC20PresetMinterPauser {\\\\n address public immutable GATEWAY_ADDRESS;\\\\n\\\\n constructor(address gateway, address pauser) ERC20PresetMinterPauser(\\\\\\\"Wrapped Bitcoin\\\\\\\", \\\\\\\"WBTC\\\\\\\") {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, pauser);\\\\n _setupRole(PAUSER_ROLE, pauser);\\\\n\\\\n GATEWAY_ADDRESS = gateway;\\\\n _setupRole(MINTER_ROLE, gateway);\\\\n\\\\n _revokeRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n _revokeRole(MINTER_ROLE, _msgSender());\\\\n _revokeRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20PresetMinterPauser) {\\\\n if (to == address(0)) {\\\\n if (_msgSender() != GATEWAY_ADDRESS) {\\\\n revert(\\\\\\\"WBTC: only gateway can burn tokens\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdf20641f881e86dc6203e8664ee6735dd9f1edddae147e1919de695c2bc15a01\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", - "nonce": 1, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"gateway\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"pauser\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Approval\\\",\\\"type\\\":\\\"event\\\"},{\\\"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\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Transfer\\\",\\\"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\\\":\\\"GATEWAY_ADDRESS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"MINTER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"PAUSER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"allowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"approve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"balanceOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burn\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burnFrom\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"decimals\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"subtractedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"decreaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"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\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"addedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"increaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"mint\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"name\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"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\\\":\\\"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\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"supportsInterface\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"symbol\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalSupply\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transferFrom\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"events\\\":{\\\"Approval(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\\\"},\\\"Paused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is triggered by `account`.\\\"},\\\"RoleAdminChanged(bytes32,bytes32,bytes32)\\\":{\\\"details\\\":\\\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\\\"},\\\"RoleGranted(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\\\"},\\\"RoleRevoked(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\\\"},\\\"Transfer(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\\\"},\\\"Unpaused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is lifted by `account`.\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"allowance(address,address)\\\":{\\\"details\\\":\\\"See {IERC20-allowance}.\\\"},\\\"approve(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\\\"},\\\"balanceOf(address)\\\":{\\\"details\\\":\\\"See {IERC20-balanceOf}.\\\"},\\\"burn(uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\\\"},\\\"burnFrom(address,uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\\\"},\\\"decimals()\\\":{\\\"details\\\":\\\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\\\"},\\\"decreaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\\\"},\\\"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. May emit a {RoleGranted} event.\\\"},\\\"hasRole(bytes32,address)\\\":{\\\"details\\\":\\\"Returns `true` if `account` has been granted `role`.\\\"},\\\"increaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\\\"},\\\"mint(address,uint256)\\\":{\\\"details\\\":\\\"Creates `amount` new tokens for `to`. See {ERC20-_mint}. Requirements: - the caller must have the `MINTER_ROLE`.\\\"},\\\"name()\\\":{\\\"details\\\":\\\"Returns the name of the token.\\\"},\\\"pause()\\\":{\\\"details\\\":\\\"Pauses all token transfers. See {ERC20Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"},\\\"paused()\\\":{\\\"details\\\":\\\"Returns true if the contract is paused, and false otherwise.\\\"},\\\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\\\"},\\\"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. May emit a {RoleRevoked} event.\\\"},\\\"supportsInterface(bytes4)\\\":{\\\"details\\\":\\\"See {IERC165-supportsInterface}.\\\"},\\\"symbol()\\\":{\\\"details\\\":\\\"Returns the symbol of the token, usually a shorter version of the name.\\\"},\\\"totalSupply()\\\":{\\\"details\\\":\\\"See {IERC20-totalSupply}.\\\"},\\\"transfer(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\\\"},\\\"transferFrom(address,address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\\\"},\\\"unpause()\\\":{\\\"details\\\":\\\"Unpauses all token transfers. See {ERC20Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/tokens/erc20/WBTC.sol\\\":\\\"WBTC\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC20Metadata.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.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 Contracts guidelines: functions revert\\\\n * instead returning `false` on failure. This behavior is nonetheless\\\\n * conventional and does not conflict with the expectations of ERC20\\\\n * 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, IERC20Metadata {\\\\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\\\\n /**\\\\n * @dev Sets the values for {name} and {symbol}.\\\\n *\\\\n * The default value of {decimals} is 18. To select a different value for\\\\n * {decimals} you should overload it.\\\\n *\\\\n * All two of these values are immutable: they can only be set once during\\\\n * construction.\\\\n */\\\\n constructor(string memory name_, string memory symbol_) {\\\\n _name = name_;\\\\n _symbol = symbol_;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() public view virtual override 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 override 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 this function is\\\\n * overridden;\\\\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 override returns (uint8) {\\\\n return 18;\\\\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 * - `to` cannot be the zero address.\\\\n * - the caller must have a balance of at least `amount`.\\\\n */\\\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\\\n address owner = _msgSender();\\\\n _transfer(owner, to, 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 * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\\\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 address owner = _msgSender();\\\\n _approve(owner, 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 * NOTE: Does not update the allowance if the current allowance\\\\n * is the maximum `uint256`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` and `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n * - the caller must have allowance for ``from``'s tokens of at least\\\\n * `amount`.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) public virtual override returns (bool) {\\\\n address spender = _msgSender();\\\\n _spendAllowance(from, spender, amount);\\\\n _transfer(from, to, amount);\\\\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 address owner = _msgSender();\\\\n _approve(owner, spender, allowance(owner, spender) + 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 address owner = _msgSender();\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n require(currentAllowance >= subtractedValue, \\\\\\\"ERC20: decreased allowance below zero\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - subtractedValue);\\\\n }\\\\n\\\\n return true;\\\\n }\\\\n\\\\n /**\\\\n * @dev Moves `amount` of tokens from `from` to `to`.\\\\n *\\\\n * This 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 * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n */\\\\n function _transfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC20: transfer from the zero address\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC20: transfer to the zero address\\\\\\\");\\\\n\\\\n _beforeTokenTransfer(from, to, amount);\\\\n\\\\n uint256 fromBalance = _balances[from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC20: transfer amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[from] = fromBalance - amount;\\\\n }\\\\n _balances[to] += amount;\\\\n\\\\n emit Transfer(from, to, amount);\\\\n\\\\n _afterTokenTransfer(from, to, 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 * - `account` 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 += amount;\\\\n _balances[account] += amount;\\\\n emit Transfer(address(0), account, amount);\\\\n\\\\n _afterTokenTransfer(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 uint256 accountBalance = _balances[account];\\\\n require(accountBalance >= amount, \\\\\\\"ERC20: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[account] = accountBalance - amount;\\\\n }\\\\n _totalSupply -= amount;\\\\n\\\\n emit Transfer(account, address(0), amount);\\\\n\\\\n _afterTokenTransfer(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(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) 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 Updates `owner` s allowance for `spender` based on spent `amount`.\\\\n *\\\\n * Does not update the allowance amount in case of infinite allowance.\\\\n * Revert if not enough allowance is available.\\\\n *\\\\n * Might emit an {Approval} event.\\\\n */\\\\n function _spendAllowance(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n if (currentAllowance != type(uint256).max) {\\\\n require(currentAllowance >= amount, \\\\\\\"ERC20: insufficient allowance\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - amount);\\\\n }\\\\n }\\\\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 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(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after 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 * has been transferred to `to`.\\\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.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 /**\\\\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 _spendAllowance(account, _msgSender(), amount);\\\\n _burn(account, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n */\\\\nabstract contract ERC20Pausable is ERC20, Pausable {\\\\n /**\\\\n * @dev See {ERC20-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n\\\\n require(!paused(), \\\\\\\"ERC20Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x978847fbff92d66d27d8767402a90ba996970b1936b372406aa17f5492bd8dc5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC20.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\ninterface IERC20Metadata is IERC20 {\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the symbol of the token.\\\\n */\\\\n function symbol() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the decimals places of the token.\\\\n */\\\\n function decimals() external view returns (uint8);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC20} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\\\n * account that deploys the contract.\\\\n *\\\\n * See {ERC20-constructor}.\\\\n */\\\\n constructor(string memory name, string memory symbol) ERC20(name, symbol) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`.\\\\n *\\\\n * See {ERC20-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(address to, uint256 amount) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n _mint(to, amount);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override(ERC20, ERC20Pausable) {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2cd54808b851c4db22f459065af0b7a952262741a85a73923e7a660767cd7baa\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/tokens/erc20/WBTC.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\\\\\";\\\\n\\\\ncontract WBTC is ERC20PresetMinterPauser {\\\\n address public immutable GATEWAY_ADDRESS;\\\\n\\\\n constructor(address gateway, address pauser) ERC20PresetMinterPauser(\\\\\\\"Wrapped Bitcoin\\\\\\\", \\\\\\\"WBTC\\\\\\\") {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, pauser);\\\\n _setupRole(PAUSER_ROLE, pauser);\\\\n\\\\n GATEWAY_ADDRESS = gateway;\\\\n _setupRole(MINTER_ROLE, gateway);\\\\n\\\\n _revokeRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n _revokeRole(MINTER_ROLE, _msgSender());\\\\n _revokeRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20PresetMinterPauser) {\\\\n if (to == address(0)) {\\\\n if (_msgSender() != GATEWAY_ADDRESS) {\\\\n revert(\\\\\\\"WBTC: only gateway can burn tokens\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdf20641f881e86dc6203e8664ee6735dd9f1edddae147e1919de695c2bc15a01\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 36, "storageLayout": { "storage": [ { @@ -134,10 +134,10 @@ "label": "_roleMembers", "offset": 0, "slot": "1", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)57395_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)57146_storage)" }, { - "astId": 54138, + "astId": 53889, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_balances", "offset": 0, @@ -145,7 +145,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 54144, + "astId": 53895, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_allowances", "offset": 0, @@ -153,7 +153,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 54146, + "astId": 53897, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_totalSupply", "offset": 0, @@ -161,7 +161,7 @@ "type": "t_uint256" }, { - "astId": 54148, + "astId": 53899, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_name", "offset": 0, @@ -169,7 +169,7 @@ "type": "t_string_storage" }, { - "astId": 54150, + "astId": 53901, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_symbol", "offset": 0, @@ -177,7 +177,7 @@ "type": "t_string_storage" }, { - "astId": 52191, + "astId": 51942, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_paused", "offset": 0, @@ -228,12 +228,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_bytes32,t_struct(AddressSet)57395_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)57146_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)57395_storage" + "value": "t_struct(AddressSet)57146_storage" }, "t_mapping(t_bytes32,t_struct(RoleData)50675_storage)": { "encoding": "mapping", @@ -254,18 +254,18 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(AddressSet)57395_storage": { + "t_struct(AddressSet)57146_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 57394, + "astId": 57145, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)57094_storage" + "type": "t_struct(Set)56845_storage" } ] }, @@ -292,13 +292,13 @@ } ] }, - "t_struct(Set)57094_storage": { + "t_struct(Set)56845_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 57089, + "astId": 56840, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_values", "offset": 0, @@ -306,7 +306,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 57093, + "astId": 56844, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_indexes", "offset": 0, @@ -322,7 +322,7 @@ } } }, - "timestamp": 1722409484, + "timestamp": 1722417551, "userdoc": { "version": 1, "kind": "user" From 037a750dfcebb6aab4f06adb4a5caae977cb0997 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 31 Jul 2024 16:32:05 +0700 Subject: [PATCH 268/305] script: fix address MainchainBM --- .../20240716-p3-upgrade-bridge-main-chain.s.sol | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index de1b9aa9..539ffc54 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -73,7 +73,12 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor // _deployMainchainBridgeManager(); - _newMainchainBridgeManager = IMainchainBridgeManager(0x2387b3383E89c164781d173B7Aa14d9c46eD2642); + _newMainchainBridgeManager = IMainchainBridgeManager(0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB); + + address bmProxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); + vm.prank(bmProxyAdmin); + TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); + _upgradeBridgeMainchain(); } From 9e1bbbfbb189f110a34b8aaeaeff42aecaa1ede0 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Wed, 31 Jul 2024 17:21:47 +0700 Subject: [PATCH 269/305] script: hardcode address of wbtc and ronin bridge manager --- ...0240716-p2-upgrade-bridge-ronin-chain.s.sol | 2 +- ...20240716-p3-upgrade-bridge-main-chain.s.sol | 18 +++++++++++++----- .../wbtc-threshold.s.sol | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index 09ecd21c..706c4f19 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -44,7 +44,7 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is } function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { console.log("=== Starting migration Roninchain".bold().cyan()); - _currRoninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _currRoninBridgeManager = IRoninBridgeManager(0x5FA49E6CA54a9daa8eCa4F403ADBDE5ee075D84a); _newRoninBridgeManager = IRoninBridgeManager(0x2ae89936FC398AeA23c63dB2404018fE361A8628); _proposer = 0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059; // SM Governor diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index 539ffc54..a6f825e2 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -34,7 +34,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ using StdStyle for *; IRoninBridgeManager _oldRoninBridgeManager; - IRoninBridgeManager _roninBridgeManager; + IRoninBridgeManager _newwRoninBridgeManager; IMainchainBridgeManager _currMainchainBridgeManager; IMainchainBridgeManager _newMainchainBridgeManager; @@ -52,7 +52,7 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ function run() public virtual onlyOn(DefaultNetwork.RoninMainnet.key()) { console.log("=== Starting migration Mainchain".bold().cyan()); - _roninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + _newwRoninBridgeManager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); // _currMainchainBridgeManager = IMainchainBridgeManager(loadContract(Contract.MainchainBridgeManager.key())); _currentNetwork = network(); @@ -75,11 +75,19 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ // _deployMainchainBridgeManager(); _newMainchainBridgeManager = IMainchainBridgeManager(0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB); + _prankChangeAdminMainchainBM(); + _upgradeBridgeMainchain(); + } + + function _prankChangeAdminMainchainBM() internal { + console.log("@@@ Switch to companion"); + (TNetwork prevNetwork, uint256 prevForkId) = switchTo(_companionNetwork); + address bmProxyAdmin = LibProxy.getProxyAdmin(payable(address(_newMainchainBridgeManager))); vm.prank(bmProxyAdmin); TransparentUpgradeableProxy(payable(address(_newMainchainBridgeManager))).changeAdmin(address(_currMainchainBridgeManager)); - _upgradeBridgeMainchain(); + switchBack(prevNetwork, prevForkId); } /** @@ -156,9 +164,9 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ // address weth = loadContract(Contract.WETH.key()); // address wethUnwrapper = new MainchainWethUnwrapperDeploy().overrideArgs(abi.encode(weth)).run(); - address wethUnwrapper = 0x22bc2df58D96CBc5f2599f2C25D1E565974749EE; + address wethUnwrapper = 0x8048b12511d9BE6e4e094089b12f54923C4E2F83; - address mainchainGatewayV3Logic = 0x7bBCFa8c109B0a6888d3329a6B762Ad4782e0B26; + address mainchainGatewayV3Logic = 0xfc274EC92bBb1A1472884558d1B5CaaC6F8220Ee; address mainchainGatewayV3Proxy = loadContract(Contract.MainchainGatewayV3.key()); ISharedArgument.SharedParameter memory param; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol index 86a3aed6..e5244e18 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; contract Migration__MapToken_WBTC_Threshold { - address _wbtcRoninToken = address(0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB); // https://app.roninchain.com/address/0x2cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb + address _wbtcRoninToken = address(0xC13948b5325c11279F5B6cBA67957581d374E0F0); // https://app.roninchain.com/address/0xC13948b5325c11279F5B6cBA67957581d374E0F0 address _wbtcMainchainToken = address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); // https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 // The decimal of WBTC token is 18 From 8db78f118195b4a048354f2b6963097e25994dde Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 1 Aug 2024 11:35:50 +0700 Subject: [PATCH 270/305] script: fixed proposal timestamp --- .../20240716-p2-upgrade-bridge-ronin-chain.s.sol | 2 +- .../20240716-p3-upgrade-bridge-main-chain.s.sol | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol index 706c4f19..9a49c7fe 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p2-upgrade-bridge-ronin-chain.s.sol @@ -168,7 +168,7 @@ contract Migration__20240716_P2_UpgradeBridgeRoninchain is _roninProposal.nonce = _currRoninBridgeManager.round(block.chainid) + 1; _roninProposal.chainId = block.chainid; - _roninProposal.expiryTimestamp = block.timestamp + 14 days; + _roninProposal.expiryTimestamp = 1723481999; // Wed Aug 12 2024 23:59:59 GMT+0700 (Indochina Time) _roninProposal.targets = targets; _roninProposal.values = values; _roninProposal.calldatas = calldatas; diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol index a6f825e2..46054f23 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240716-p3-upgrade-bridge-main-chain.s.sol @@ -173,7 +173,8 @@ contract Migration__20240716_P3_UpgradeBridgeMainchain is Migration, Migration__ param.mainchainBridgeManager.callbackRegisters = new address[](1); param.mainchainBridgeManager.callbackRegisters[0] = loadContract(Contract.MainchainGatewayV3.key()); - uint256 expiredTime = block.timestamp + 14 days; + uint256 expiredTime = 1723481999; // Wed Aug 12 2024 23:59:59 GMT+0700 (Indochina Time) + // uint256 expiredTime = block.timestamp + 14 days; uint N = 6; address[] memory targets = new address[](N); uint256[] memory values = new uint256[](N); From 2af69aad58ac2811c466707644fa591a4be6f5d3 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 1 Aug 2024 14:27:53 +0700 Subject: [PATCH 271/305] chore: add broadcast log --- .../2020/run-1722495351.json | 131 ++++++++++++++++++ .../PostCheck_BridgeManager_Proposal.s.sol | 36 +++++ 2 files changed, 167 insertions(+) create mode 100644 broadcast/verify-script.s.sol/2020/run-1722495351.json diff --git a/broadcast/verify-script.s.sol/2020/run-1722495351.json b/broadcast/verify-script.s.sol/2020/run-1722495351.json new file mode 100644 index 00000000..938d2c64 --- /dev/null +++ b/broadcast/verify-script.s.sol/2020/run-1722495351.json @@ -0,0 +1,131 @@ +{ + "transactions": [ + { + "hash": "0xf621da2b000ef3d59d04fe494e6f40b23fe4c2fc29ff32bb9cc9d61eaf28a8a3", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "function": null, + "arguments": null, + "transaction": { + "from": "0xe880802580a1fbdef67ace39d1b21c5b2c74f059", + "to": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "gas": "0x65ebf", + "value": "0x0", + "input": "0x663ac0110000000000000000000000000000000000000000000000000000000066ba3f8f00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000012e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000796a163a21e9a659fc9773166e0afdc1eb01aad1000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b240000000000000000000000003fb325b251ee80945d3fc8c7692f5affca1b8bc20000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df000000000000000000000000796a163a21e9a659fc9773166e0afdc1eb01aad1000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b240000000000000000000000003fb325b251ee80945d3fc8c7692f5affca1b8bc20000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df000000000000000000000000796a163a21e9a659fc9773166e0afdc1eb01aad1000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b240000000000000000000000003fb325b251ee80945d3fc8c7692f5affca1b8bc20000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000680000000000000000000000000000000000000000000000000000000000000076000000000000000000000000000000000000000000000000000000000000009800000000000000000000000000000000000000000000000000000000000000ae00000000000000000000000000000000000000000000000000000000000000b400000000000000000000000000000000000000000000000000000000000000ba00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000c600000000000000000000000000000000000000000000000000000000000000d6000000000000000000000000000000000000000000000000000000000000000844f1ef2860000000000000000000000008048b12511d9be6e4e094089b12f54923c4e2f83000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000fc274ec92bbb1a1472884558d1b5caac6f8220ee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000009521dbe27803f5d31da86d5846e7fe011d2350180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000005c530fe5920a2991ea6e9fb99028e1b09384d7f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184dbd2ef6c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c13948b5325c11279f5b6cba67957581d374e0f000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001244bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c464363f780000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000097e2b7ad7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da812100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b24000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a862800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x2f", + "chainId": "0x7e4" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0xd9e926f03876a286cad87f21015127f7b2b949323d4b4db273c285990a9d336b", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "function": null, + "arguments": null, + "transaction": { + "from": "0xe880802580a1fbdef67ace39d1b21c5b2c74f059", + "to": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "gas": "0x2c08c", + "value": "0x0", + "input": "0xa1819f9a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000066ba3f8f00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000a40000000000000000000000000000000000000000000000000000000000000000600000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af080000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb0000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005e00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000003244bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c13948b5325c11279f5b6cba67957581d374e0f000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000ebec21ee1da400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001d7d843dc3b4800000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000246ddf97976680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44f1ef286000000000000000000000000fc274ec92bbb1a1472884558d1b5caac6f8220ee00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024110a83080000000000000000000000008048b12511d9be6e4e094089b12f54923c4e2f83000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da81210000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af08000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "nonce": "0x30", + "chainId": "0x7e4" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x89f1e7", + "logs": [ + { + "address": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x00000000000000000000000000000000000000000000000000000000000007e4", + "0x0000000000000000000000000000000000000000000000000000000000000005", + "0xcc6c2c2c80382c0f1a5f0b84ae151d43685556bf2e9ee7335dfb0073ec265015" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000e880802580a1fbdef67ace39d1b21c5b2c74f059000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000007e40000000000000000000000000000000000000000000000000000000066ba3f8f00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000013000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000796a163a21e9a659fc9773166e0afdc1eb01aad1000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b240000000000000000000000003fb325b251ee80945d3fc8c7692f5affca1b8bc20000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df000000000000000000000000796a163a21e9a659fc9773166e0afdc1eb01aad1000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b240000000000000000000000003fb325b251ee80945d3fc8c7692f5affca1b8bc20000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df000000000000000000000000796a163a21e9a659fc9773166e0afdc1eb01aad1000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b240000000000000000000000003fb325b251ee80945d3fc8c7692f5affca1b8bc20000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000680000000000000000000000000000000000000000000000000000000000000076000000000000000000000000000000000000000000000000000000000000009800000000000000000000000000000000000000000000000000000000000000ae00000000000000000000000000000000000000000000000000000000000000b400000000000000000000000000000000000000000000000000000000000000ba00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000c600000000000000000000000000000000000000000000000000000000000000d6000000000000000000000000000000000000000000000000000000000000000844f1ef2860000000000000000000000008048b12511d9be6e4e094089b12f54923c4e2f83000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045cd8a76b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000fc274ec92bbb1a1472884558d1b5caac6f8220ee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000009521dbe27803f5d31da86d5846e7fe011d2350180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000243659cfe60000000000000000000000005c530fe5920a2991ea6e9fb99028e1b09384d7f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002ae89936fc398aea23c63db2404018fe361a8628000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184dbd2ef6c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c13948b5325c11279f5b6cba67957581d374e0f000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001244bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c464363f780000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000097e2b7ad7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a86280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da812100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000273cda3afe17eb7bcb028b058382a9010ae82b24000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002ae89936fc398aea23c63db2404018fe361a862800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0x1983686b464e0dd3459ae8434966aa72a09652d6a51539721fd5f383180cc37b", + "blockNumber": "0x232d90c", + "transactionHash": "0xf621da2b000ef3d59d04fe494e6f40b23fe4c2fc29ff32bb9cc9d61eaf28a8a3", + "transactionIndex": "0x6c", + "logIndex": "0x6f", + "removed": false + }, + { + "address": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "topics": [ + "0x1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a23", + "0xcc6c2c2c80382c0f1a5f0b84ae151d43685556bf2e9ee7335dfb0073ec265015", + "0x000000000000000000000000e880802580a1fbdef67ace39d1b21c5b2c74f059" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064", + "blockHash": "0x1983686b464e0dd3459ae8434966aa72a09652d6a51539721fd5f383180cc37b", + "blockNumber": "0x232d90c", + "transactionHash": "0xf621da2b000ef3d59d04fe494e6f40b23fe4c2fc29ff32bb9cc9d61eaf28a8a3", + "transactionIndex": "0x6c", + "logIndex": "0x70", + "removed": false + } + ], + "logsBloom": "0x00000000000000010000000000000000000080000000000000004000000000000000000002000000000000000000004020000000000000000000000000000000000010000004000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001800000000000000000000000000000000000000000000000000000000000400000400000000000000000002000000000000000000000000000800000008080000000000000000000000000000100080000000004000000000000000000000000000000000000000000000000000", + "type": "0x0", + "transactionHash": "0xf621da2b000ef3d59d04fe494e6f40b23fe4c2fc29ff32bb9cc9d61eaf28a8a3", + "transactionIndex": "0x6c", + "blockHash": "0x1983686b464e0dd3459ae8434966aa72a09652d6a51539721fd5f383180cc37b", + "blockNumber": "0x232d90c", + "gasUsed": "0x4821b", + "effectiveGasPrice": "0x4a817c800", + "from": "0xe880802580a1fbdef67ace39d1b21c5b2c74f059", + "to": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "contractAddress": null + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x1ef789", + "logs": [ + { + "address": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "topics": [ + "0xa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd9", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000005", + "0xc2015960fe3f3e5877c94e3f429bb56d305b64b4b6f36fcf98009db4dac6c6a7" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000e880802580a1fbdef67ace39d1b21c5b2c74f059000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000066ba3f8f00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000a60000000000000000000000000000000000000000000000000000000000000000600000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af080000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb0000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005e00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000003244bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c13948b5325c11279f5b6cba67957581d374e0f000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000ebec21ee1da400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001d7d843dc3b4800000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000246ddf97976680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44f1ef286000000000000000000000000fc274ec92bbb1a1472884558d1b5caac6f8220ee00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024110a83080000000000000000000000008048b12511d9be6e4e094089b12f54923c4e2f83000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c44bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da81210000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af08000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248f2839700000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000f4240", + "blockHash": "0x3a1f995b06f056ac2c71b4f8027a4e322427c75fb340252426cdff9f019f9e83", + "blockNumber": "0x232d90d", + "transactionHash": "0xd9e926f03876a286cad87f21015127f7b2b949323d4b4db273c285990a9d336b", + "transactionIndex": "0x29", + "logIndex": "0x13", + "removed": false + } + ], + "logsBloom": "0x00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000040000000010000000000000000000000000000000000000040004000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000800000000080000000000000000000000000040000080000000000000000000000000000000000000400000000000000000000000", + "type": "0x0", + "transactionHash": "0xd9e926f03876a286cad87f21015127f7b2b949323d4b4db273c285990a9d336b", + "transactionIndex": "0x29", + "blockHash": "0x3a1f995b06f056ac2c71b4f8027a4e322427c75fb340252426cdff9f019f9e83", + "blockNumber": "0x232d90d", + "gasUsed": "0x21521", + "effectiveGasPrice": "0x4a817c800", + "from": "0xe880802580a1fbdef67ace39d1b21c5b2c74f059", + "to": "0x5fa49e6ca54a9daa8eca4f403adbde5ee075d84a", + "contractAddress": null + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1722495351, + "chain": 2020, + "commit": "8db78f1" +} \ No newline at end of file diff --git a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol index 00b7bc40..d34ef315 100644 --- a/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol +++ b/script/post-check/bridge-manager/proposal/PostCheck_BridgeManager_Proposal.s.sol @@ -27,6 +27,7 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { address[] private _addingOperators = [makeAddr("operator-1"), makeAddr("operator-2")]; function _validate_BridgeManager_Proposal() internal { + validate_canExecuteUpgradeItself(); validate_relayUpgradeProposal(); validate_ProposeGlobalProposalAndRelay_addBridgeOperator(); validate_proposeAndRelay_addBridgeOperator(); @@ -288,6 +289,41 @@ abstract contract PostCheck_BridgeManager_Proposal is BasePostCheck { manager.executeProposal(proposal); } + function validate_canExecuteUpgradeItself() private onlyOnRoninNetworkOrLocal onPostCheck("validate_canExecuteUpgradeItself") { + IRoninBridgeManager manager = IRoninBridgeManager(loadContract(Contract.RoninBridgeManager.key())); + TContract[] memory contractTypes = new TContract[](1); + contractTypes[0] = Contract.RoninBridgeManager.key(); + + address[] memory targets = new address[](contractTypes.length); + for (uint256 i; i < contractTypes.length; ++i) { + targets[i] = loadContract(contractTypes[i]); + } + + address[] memory logics = new address[](targets.length); + for (uint256 i; i < targets.length; ++i) { + console.log("Deploy contract logic:", vm.getLabel(targets[i])); + logics[i] = _deployLogic(contractTypes[i]); + } + + // Upgrade all contracts with proposal + bytes[] memory calldatas = new bytes[](targets.length); + for (uint256 i; i < targets.length; ++i) { + calldatas[i] = abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (logics[i])); + } + + Proposal.ProposalDetail memory proposal = LibProposal.createProposal({ + manager: address(manager), + expiryTimestamp: block.timestamp + 20 minutes, + targets: targets, + values: uint256(0).repeat(targets.length), + calldatas: calldatas, + gasAmounts: uint256(1_000_000).repeat(targets.length), + nonce: manager.round(block.chainid) + 1 + }); + + manager.executeProposal(proposal); + } + function _switchBackToRoninFork(TNetwork roninNetwork) internal { IRuntimeConfig.Option memory config; config = CONFIG.getRuntimeConfig(); From e7676f70b85e0b8972692d1d8d8ccaa1d7e81522 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 1 Aug 2024 14:28:10 +0700 Subject: [PATCH 272/305] chore: remove goerli devnet artifacts --- deployments/goerli-for-devnet/.chainId | 1 - .../MainchainGatewayV2Logic.json | 2439 ----------------- .../MainchainGatewayV2Proxy.json | 391 --- .../MainchainGovernanceAdmin.json | 1786 ------------ ...ainchainRoninTrustedOrganizationProxy.json | 286 -- .../RoninTrustedOrganizationLogic.json | 967 ------- .../a595501ecf8849639d4423c21e560992.json | 506 ---- 7 files changed, 6376 deletions(-) delete mode 100644 deployments/goerli-for-devnet/.chainId delete mode 100644 deployments/goerli-for-devnet/MainchainGatewayV2Logic.json delete mode 100644 deployments/goerli-for-devnet/MainchainGatewayV2Proxy.json delete mode 100644 deployments/goerli-for-devnet/MainchainGovernanceAdmin.json delete mode 100644 deployments/goerli-for-devnet/MainchainRoninTrustedOrganizationProxy.json delete mode 100644 deployments/goerli-for-devnet/RoninTrustedOrganizationLogic.json delete mode 100644 deployments/goerli-for-devnet/solcInputs/a595501ecf8849639d4423c21e560992.json diff --git a/deployments/goerli-for-devnet/.chainId b/deployments/goerli-for-devnet/.chainId deleted file mode 100644 index 7813681f..00000000 --- a/deployments/goerli-for-devnet/.chainId +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/deployments/goerli-for-devnet/MainchainGatewayV2Logic.json b/deployments/goerli-for-devnet/MainchainGatewayV2Logic.json deleted file mode 100644 index ce65b3f9..00000000 --- a/deployments/goerli-for-devnet/MainchainGatewayV2Logic.json +++ /dev/null @@ -1,2439 +0,0 @@ -{ - "address": "0xF54513B9C15857b4562893D3b2cBa5486ca67D55", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "operators", - "type": "address[]" - } - ], - "name": "BridgeOperatorsReplaced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "limits", - "type": "uint256[]" - } - ], - "name": "DailyWithdrawalLimitsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "DepositRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "thresholds", - "type": "uint256[]" - } - ], - "name": "HighTierThresholdsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousDenominator", - "type": "uint256" - } - ], - "name": "HighTierVoteWeightThresholdUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "thresholds", - "type": "uint256[]" - } - ], - "name": "LockedThresholdsUpdated", - "type": "event" - }, - { - "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": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousDenominator", - "type": "uint256" - } - ], - "name": "ThresholdUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "mainchainTokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "roninTokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "enum Token.Standard[]", - "name": "standards", - "type": "uint8[]" - } - ], - "name": "TokenMapped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "percentages", - "type": "uint256[]" - } - ], - "name": "UnlockFeePercentagesUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "WithdrawalLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "WithdrawalUnlocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "Withdrew", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IWETH", - "name": "weth", - "type": "address" - } - ], - "name": "WrappedNativeTokenContractUpdated", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WITHDRAWAL_UNLOCKER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_MAX_PERCENTAGE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_voteWeight", - "type": "uint256" - } - ], - "name": "checkHighTierVoteWeightThreshold", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_voteWeight", - "type": "uint256" - } - ], - "name": "checkThreshold", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "dailyWithdrawalLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "depositCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBridgeOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getHighTierVoteWeightThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "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": "address", - "name": "_mainchainToken", - "type": "address" - } - ], - "name": "getRoninToken", - "outputs": [ - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - } - ], - "internalType": "struct MappedTokenConsumer.MappedToken", - "name": "_token", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "num_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "denom_", - "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": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "highTierThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_roleSetter", - "type": "address" - }, - { - "internalType": "contract IWETH", - "name": "_wrappedToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_roninChainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_highTierVWNumerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - }, - { - "internalType": "address[][3]", - "name": "_addresses", - "type": "address[][3]" - }, - { - "internalType": "uint256[][4]", - "name": "_thresholds", - "type": "uint256[][4]" - }, - { - "internalType": "enum Token.Standard[]", - "name": "_standards", - "type": "uint8[]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "lastDateSynced", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "lastSyncedWithdrawal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "lockedThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_mainchainTokens", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "_roninTokens", - "type": "address[]" - }, - { - "internalType": "enum Token.Standard[]", - "name": "_standards", - "type": "uint8[]" - } - ], - "name": "mapTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_mainchainTokens", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "_roninTokens", - "type": "address[]" - }, - { - "internalType": "enum Token.Standard[]", - "name": "_standards", - "type": "uint8[]" - }, - { - "internalType": "uint256[][4]", - "name": "_thresholds", - "type": "uint256[][4]" - } - ], - "name": "mapTokensAndThresholds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "minimumVoteWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_quantity", - "type": "uint256" - } - ], - "name": "reachedWithdrawalLimit", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "receiveEther", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_list", - "type": "address[]" - } - ], - "name": "replaceBridgeOperators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "recipientAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Request", - "name": "_request", - "type": "tuple" - } - ], - "name": "requestDepositFor", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "roninChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_limits", - "type": "uint256[]" - } - ], - "name": "setDailyWithdrawalLimits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_thresholds", - "type": "uint256[]" - } - ], - "name": "setHighTierThresholds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - } - ], - "name": "setHighTierVoteWeightThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "_previousNum", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_previousDenom", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_thresholds", - "type": "uint256[]" - } - ], - "name": "setLockedThresholds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - } - ], - "name": "setThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "_previousNum", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_previousDenom", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_percentages", - "type": "uint256[]" - } - ], - "name": "setUnlockFeePercentages", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IWETH", - "name": "_wrappedToken", - "type": "address" - } - ], - "name": "setWrappedNativeTokenContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Receipt", - "name": "_receipt", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "_signatures", - "type": "tuple[]" - } - ], - "name": "submitWithdrawal", - "outputs": [ - { - "internalType": "bool", - "name": "_locked", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "unlockFeePercentages", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Receipt", - "name": "_receipt", - "type": "tuple" - } - ], - "name": "unlockWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "withdrawalHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "withdrawalLocked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wrappedNativeToken", - "outputs": [ - { - "internalType": "contract IWETH", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xd6534760207696c708c2f9c685bc0cd301a7989fa4fd44b69b171ffb192dc584", - "receipt": { - "to": null, - "from": "0xba0000a467FA5d2BCbB78209728dbD2753b41f25", - "contractAddress": "0xF54513B9C15857b4562893D3b2cBa5486ca67D55", - "transactionIndex": 49, - "gasUsed": "4475429", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x02e0c7c8d277c696240f818e2b2a51e8e8022db1297f1962c43800a08ea39f6a", - "transactionHash": "0xd6534760207696c708c2f9c685bc0cd301a7989fa4fd44b69b171ffb192dc584", - "logs": [], - "blockNumber": 8495210, - "cumulativeGasUsed": "23304881", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a595501ecf8849639d4423c21e560992", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"BridgeOperatorsReplaced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"limits\",\"type\":\"uint256[]\"}],\"name\":\"DailyWithdrawalLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"DepositRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"HighTierThresholdsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"HighTierVoteWeightThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"thresholds\",\"type\":\"uint256[]\"}],\"name\":\"LockedThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"enum Token.Standard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"percentages\",\"type\":\"uint256[]\"}],\"name\":\"UnlockFeePercentagesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"WithdrawalUnlocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Withdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"WrappedNativeTokenContractUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWAL_UNLOCKER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_MAX_PERCENTAGE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"dailyWithdrawalLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBridgeOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"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\":\"address\",\"name\":\"_mainchainToken\",\"type\":\"address\"}],\"name\":\"getRoninToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"_token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"highTierThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_highTierVWNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"address[][3]\",\"name\":\"_addresses\",\"type\":\"address[][3]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastDateSynced\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastSyncedWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lockedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[][4]\",\"name\":\"_thresholds\",\"type\":\"uint256[][4]\"}],\"name\":\"mapTokensAndThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"reachedWithdrawalLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_list\",\"type\":\"address[]\"}],\"name\":\"replaceBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"}],\"name\":\"requestDepositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_limits\",\"type\":\"uint256[]\"}],\"name\":\"setDailyWithdrawalLimits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setHighTierThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setHighTierVoteWeightThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setLockedThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_previousNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_previousDenom\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_percentages\",\"type\":\"uint256[]\"}],\"name\":\"setUnlockFeePercentages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"_wrappedToken\",\"type\":\"address\"}],\"name\":\"setWrappedNativeTokenContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"submitWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_locked\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unlockFeePercentages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"}],\"name\":\"unlockWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedNativeToken\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"BridgeOperatorsReplaced(address[])\":{\"details\":\"Emitted when the bridge operators are replaced\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain seperator.\"},\"checkHighTierVoteWeightThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"getBridgeOperators()\":{\"details\":\"Returns the bridge operator list.\"},\"getHighTierVoteWeightThreshold()\":{\"details\":\"Returns the high-tier vote weight threshold.\"},\"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.\"},\"getRoninToken(address)\":{\"details\":\"Returns token address on Ronin network. Note: Reverts for unsupported token.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mapTokens(address[],address[],uint8[])\":{\"details\":\"Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])\":{\"details\":\"Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"reachedWithdrawalLimit(address,uint256)\":{\"details\":\"Checks whether the withdrawal reaches the limitation.\"},\"receiveEther()\":{\"details\":\"Receives ether without doing anything. Use this function to topup native token.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"replaceBridgeOperators(address[])\":{\"details\":\"Replaces the old bridge operator list by the new one. Requirements: - The method caller is admin. Emitted the event `BridgeOperatorsReplaced`.\"},\"requestDepositFor((address,address,(uint8,uint256,uint256)))\":{\"details\":\"Locks the assets and request deposit.\"},\"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. May emit a {RoleRevoked} event.\"},\"setDailyWithdrawalLimits(address[],uint256[])\":{\"details\":\"Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event.\"},\"setHighTierThresholds(address[],uint256[])\":{\"details\":\"Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event.\"},\"setHighTierVoteWeightThreshold(uint256,uint256)\":{\"details\":\"Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event.\"},\"setLockedThresholds(address[],uint256[])\":{\"details\":\"Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Override `GatewayV2-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold.\"},\"setUnlockFeePercentages(address[],uint256[])\":{\"details\":\"Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event.\"},\"setWrappedNativeTokenContract(address)\":{\"details\":\"Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event.\"},\"submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])\":{\"details\":\"Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"WITHDRAWAL_UNLOCKER_ROLE\":{\"details\":\"Withdrawal unlocker role hash\"},\"_bridgeOperatorAddedBlock\":{\"details\":\"Mapping from validator address => last block that the bridge operator is added\"},\"_bridgeOperators\":{\"details\":\"Bridge operators array\"},\"_domainSeparator\":{\"details\":\"Domain seperator\"},\"_roninToken\":{\"details\":\"Mapping from mainchain token => token address on Ronin network\"},\"depositCount\":{\"details\":\"Total deposit\"},\"roninChainId\":{\"details\":\"Ronin network id\"},\"withdrawalHash\":{\"details\":\"Mapping from withdrawal id => withdrawal hash\"},\"withdrawalLocked\":{\"details\":\"Mapping from withdrawal id => locked\"},\"wrappedNativeToken\":{\"details\":\"Wrapped native token address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"unlockFeePercentages(address)\":{\"notice\":\"Values 0-1,000,000 map to 0%-100%\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/mainchain/MainchainGatewayV2.sol\":\"MainchainGatewayV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"contracts/extensions/GatewayV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV2 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator)\\n external\\n virtual\\n onlyAdmin\\n returns (uint256, uint256)\\n {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external onlyAdmin {\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external onlyAdmin {\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 _numerator, uint256 _denominator)\\n internal\\n virtual\\n returns (uint256 _previousNum, uint256 _previousDenom)\\n {\\n require(_numerator <= _denominator, \\\"GatewayV2: invalid threshold\\\");\\n _previousNum = _num;\\n _previousDenom = _denom;\\n _num = _numerator;\\n _denom = _denominator;\\n emit ThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x037268c79f8e9bcd1f0b0b2b1a112c95f84247d92aeab302f10ea22e5ff5fb4f\",\"license\":\"MIT\"},\"contracts/extensions/WithdrawalLimitation.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./GatewayV2.sol\\\";\\n\\nabstract contract WithdrawalLimitation is GatewayV2 {\\n /// @dev Emitted when the high-tier vote weight threshold is updated\\n event HighTierVoteWeightThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the thresholds for locked withdrawals are updated\\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\\n /// @dev Emitted when the daily limit thresholds are updated\\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\\n\\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\\n\\n uint256 internal _highTierVWNum;\\n uint256 internal _highTierVWDenom;\\n\\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\\n mapping(address => uint256) public highTierThreshold;\\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\\n mapping(address => uint256) public lockedThreshold;\\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\\n /// @notice Values 0-1,000,000 map to 0%-100%\\n mapping(address => uint256) public unlockFeePercentages;\\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\\n mapping(address => uint256) public dailyWithdrawalLimit;\\n /// @dev Mapping from token address => today withdrawal amount\\n mapping(address => uint256) public lastSyncedWithdrawal;\\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\\n mapping(address => uint256) public lastDateSynced;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Override `GatewayV2-setThreshold`.\\n *\\n * Requirements:\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator)\\n external\\n virtual\\n override\\n onlyAdmin\\n returns (uint256 _previousNum, uint256 _previousDenom)\\n {\\n (_previousNum, _previousDenom) = _setThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Returns the high-tier vote weight threshold.\\n */\\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\\n return (_highTierVWNum, _highTierVWDenom);\\n }\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\\n */\\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator)\\n external\\n virtual\\n onlyAdmin\\n returns (uint256 _previousNum, uint256 _previousDenom)\\n {\\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\\n _verifyThresholds();\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds)\\n external\\n virtual\\n onlyAdmin\\n {\\n require(_tokens.length > 0, \\\"WithdrawalLimitation: invalid array length\\\");\\n _setHighTierThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin {\\n require(_tokens.length > 0, \\\"WithdrawalLimitation: invalid array length\\\");\\n _setLockedThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages)\\n external\\n virtual\\n onlyAdmin\\n {\\n require(_tokens.length > 0, \\\"WithdrawalLimitation: invalid array length\\\");\\n _setUnlockFeePercentages(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyAdmin {\\n require(_tokens.length > 0, \\\"WithdrawalLimitation: invalid array length\\\");\\n _setDailyWithdrawalLimits(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the limitation.\\n */\\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\\n return _reachedWithdrawalLimit(_token, _quantity);\\n }\\n\\n /**\\n * @dev Sets high-tier vote weight threshold and returns the old one.\\n *\\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\\n *\\n */\\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator)\\n internal\\n returns (uint256 _previousNum, uint256 _previousDenom)\\n {\\n require(_numerator <= _denominator, \\\"WithdrawalLimitation: invalid threshold\\\");\\n _previousNum = _highTierVWNum;\\n _previousDenom = _highTierVWDenom;\\n _highTierVWNum = _numerator;\\n _highTierVWDenom = _denominator;\\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n\\n /**\\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `HighTierThresholdsUpdated` event.\\n *\\n */\\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n require(_tokens.length == _thresholds.length, \\\"WithdrawalLimitation: invalid array length\\\");\\n for (uint256 _i; _i < _tokens.length; _i++) {\\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\\n }\\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets the amount thresholds to lock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `LockedThresholdsUpdated` event.\\n *\\n */\\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n require(_tokens.length == _thresholds.length, \\\"WithdrawalLimitation: invalid array length\\\");\\n for (uint256 _i; _i < _tokens.length; _i++) {\\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\\n }\\n emit LockedThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets fee percentages to unlock withdrawal.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n * - The percentage is equal to or less than 100_000.\\n *\\n * Emits the `UnlockFeePercentagesUpdated` event.\\n *\\n */\\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\\n require(_tokens.length == _percentages.length, \\\"WithdrawalLimitation: invalid array length\\\");\\n for (uint256 _i; _i < _tokens.length; _i++) {\\n require(_percentages[_i] <= _MAX_PERCENTAGE, \\\"WithdrawalLimitation: invalid percentage\\\");\\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\\n }\\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\\n }\\n\\n /**\\n * @dev Sets daily limit amounts for the withdrawals.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `DailyWithdrawalLimitsUpdated` event.\\n *\\n */\\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\\n require(_tokens.length == _limits.length, \\\"WithdrawalLimitation: invalid array length\\\");\\n for (uint256 _i; _i < _tokens.length; _i++) {\\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\\n }\\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\\n }\\n\\n /**\\n * @dev Checks whether the withdrawal reaches the daily limitation.\\n *\\n * Requirements:\\n * - The daily withdrawal threshold should not apply for locked withdrawals.\\n *\\n */\\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n if (_lockedWithdrawalRequest(_token, _quantity)) {\\n return false;\\n }\\n\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n return dailyWithdrawalLimit[_token] <= _quantity;\\n } else {\\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\\n }\\n }\\n\\n /**\\n * @dev Record withdrawal token.\\n */\\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\\n uint256 _currentDate = block.timestamp / 1 days;\\n if (_currentDate > lastDateSynced[_token]) {\\n lastDateSynced[_token] = _currentDate;\\n lastSyncedWithdrawal[_token] = _quantity;\\n } else {\\n lastSyncedWithdrawal[_token] += _quantity;\\n }\\n }\\n\\n /**\\n * @dev Returns whether the withdrawal request is locked or not.\\n */\\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\\n return lockedThreshold[_token] <= _quantity;\\n }\\n\\n /**\\n * @dev Computes fee percentage.\\n */\\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\\n return (_amount * _percentage) / _MAX_PERCENTAGE;\\n }\\n\\n /**\\n * @dev Returns high-tier vote weight.\\n */\\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\\n }\\n\\n /**\\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\\n */\\n function _verifyThresholds() internal view {\\n require(_num * _highTierVWDenom <= _highTierVWNum * _denom, \\\"WithdrawalLimitation: invalid thresholds\\\");\\n }\\n}\\n\",\"keccak256\":\"0x1a9abfcc966d59e8a04cc40b9a4802140999d7e147877d0a1538f34f87f8f03c\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == _getAdmin(), \\\"HasProxyAdmin: unauthorized sender\\\");\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x0c2fcf25290180e8cd733691b113464cdde671dc019e6c343e9eb3e16c6ca24a\",\"license\":\"MIT\"},\"contracts/interfaces/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridge {\\n /**\\n * @dev Replaces the old bridge operator list by the new one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emitted the event `BridgeOperatorsReplaced`.\\n *\\n */\\n function replaceBridgeOperators(address[] calldata) external;\\n\\n /**\\n * @dev Returns the bridge operator list.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n}\\n\",\"keccak256\":\"0x614db701e54383b7d0a749bc9b0d2da95d42652cd673499bf71e25096548b96e\",\"license\":\"MIT\"},\"contracts/interfaces/IMainchainGatewayV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IBridge.sol\\\";\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./consumers/SignatureConsumer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\ninterface IMainchainGatewayV2 is SignatureConsumer, MappedTokenConsumer, IBridge {\\n /// @dev Emitted when the deposit is requested\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the assets are withdrawn\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, Token.Standard[] standards);\\n /// @dev Emitted when the wrapped native token contract is updated\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\n /// @dev Emitted when the withdrawal is locked\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is unlocked\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\n\\n /**\\n * @dev Returns the domain seperator.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns deposit count.\\n */\\n function depositCount() external view returns (uint256);\\n\\n /**\\n * @dev Sets the wrapped native token contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\n\\n /**\\n * @dev Returns whether the withdrawal is locked.\\n */\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns the withdrawal hash.\\n */\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\n\\n /**\\n * @dev Locks the assets and request deposit.\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\n\\n /**\\n * @dev Withdraws based on the receipt and the validator signatures.\\n * Returns whether the withdrawal is locked.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures)\\n external\\n returns (bool _locked);\\n\\n /**\\n * @dev Approves a specific withdrawal.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards\\n ) external;\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards,\\n uint256[][4] calldata _thresholds\\n ) external;\\n\\n /**\\n * @dev Returns token address on Ronin network.\\n * Note: Reverts for unsupported token.\\n */\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x785e21897dd07ff3d2f9486ecd03f96c7d41af075f78a663f0a5520b964c247d\",\"license\":\"MIT\"},\"contracts/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator)\\n external\\n returns (uint256 _previousNum, uint256 _previousDenom);\\n}\\n\",\"keccak256\":\"0x10f3b360430e6d03773c9959f54cbed6fb0346069645c05b05ef50cfb19f3753\",\"license\":\"MIT\"},\"contracts/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n function deposit() external payable;\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8acead2ae4364dee80c9bc76d52cc04d3763105e1743728e67d237f816155142\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Token.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n Token.Standard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xfa220e968221af9b789e6c1dc4133631e90600c4a2bd63b7f01e96cb01f13e9b\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"contracts/libraries/Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nlibrary Token {\\n enum Standard {\\n ERC20,\\n ERC721\\n }\\n struct Info {\\n Standard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n }\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Info memory _info) internal pure returns (bytes32) {\\n return keccak256(abi.encode(INFO_TYPE_HASH, _info.erc, _info.id, _info.quantity));\\n }\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(Info memory _info) internal pure {\\n require(\\n (_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) ||\\n (_info.erc == Standard.ERC721 && _info.quantity == 0),\\n \\\"Token: invalid info\\\"\\n );\\n }\\n\\n /**\\n * @dev Transfer asset from.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function transferFrom(\\n Info memory _info,\\n address _from,\\n address _to,\\n address _token\\n ) internal {\\n bool _success;\\n bytes memory _data;\\n if (_info.erc == Standard.ERC20) {\\n (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, _from, _to, _info.quantity));\\n _success = _success && (_data.length == 0 || abi.decode(_data, (bool)));\\n } else if (_info.erc == Standard.ERC721) {\\n // bytes4(keccak256(\\\"transferFrom(address,address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id));\\n } else {\\n revert(\\\"Token: unsupported token standard\\\");\\n }\\n\\n if (!_success) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"Token: could not transfer \\\",\\n toString(_info),\\n \\\" from \\\",\\n Strings.toHexString(uint160(_from), 20),\\n \\\" to \\\",\\n Strings.toHexString(uint160(_to), 20),\\n \\\" token \\\",\\n Strings.toHexString(uint160(_token), 20)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function tryTransferERC721(\\n address _token,\\n address _to,\\n uint256 _id\\n ) internal returns (bool _success) {\\n (_success, ) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id));\\n }\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function tryTransferERC20(\\n address _token,\\n address _to,\\n uint256 _quantity\\n ) internal returns (bool _success) {\\n bytes memory _data;\\n (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transfer.selector, _to, _quantity));\\n _success = _success && (_data.length == 0 || abi.decode(_data, (bool)));\\n }\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function transfer(\\n Info memory _info,\\n address _to,\\n address _token\\n ) internal {\\n bool _success;\\n if (_info.erc == Standard.ERC20) {\\n _success = tryTransferERC20(_token, _to, _info.quantity);\\n } else if (_info.erc == Standard.ERC721) {\\n _success = tryTransferERC721(_token, _to, _info.id);\\n } else {\\n revert(\\\"Token: unsupported token standard\\\");\\n }\\n\\n if (!_success) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"Token: could not transfer \\\",\\n toString(_info),\\n \\\" to \\\",\\n Strings.toHexString(uint160(_to), 20),\\n \\\" token \\\",\\n Strings.toHexString(uint160(_token), 20)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Tries minting and transfering assets.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetTransfer(\\n Info memory _info,\\n address payable _to,\\n address _token,\\n IWETH _wrappedNativeToken\\n ) internal {\\n bool _success;\\n if (_token == address(_wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!_to.send(_info.quantity)) {\\n _wrappedNativeToken.deposit{ value: _info.quantity }();\\n transfer(_info, _to, _token);\\n }\\n } else if (_info.erc == Token.Standard.ERC20) {\\n uint256 _balance = IERC20(_token).balanceOf(address(this));\\n\\n if (_balance < _info.quantity) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance));\\n require(_success, \\\"Token: ERC20 minting failed\\\");\\n }\\n\\n transfer(_info, _to, _token);\\n } else if (_info.erc == Token.Standard.ERC721) {\\n if (!tryTransferERC721(_token, _to, _info.id)) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id));\\n require(_success, \\\"Token: ERC721 minting failed\\\");\\n }\\n } else {\\n revert(\\\"Token: unsupported token standard\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns readable string.\\n */\\n function toString(Info memory _info) internal pure returns (string memory) {\\n return\\n string(\\n abi.encodePacked(\\n \\\"TokenInfo(\\\",\\n Strings.toHexString(uint160(_info.erc), 1),\\n \\\",\\\",\\n Strings.toHexString(_info.id),\\n \\\",\\\",\\n Strings.toHexString(_info.quantity),\\n \\\")\\\"\\n )\\n );\\n }\\n\\n struct Owner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n }\\n\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(Owner memory _owner) internal pure returns (bytes32) {\\n return keccak256(abi.encode(OWNER_TYPE_HASH, _owner.addr, _owner.tokenAddr, _owner.chainId));\\n }\\n}\\n\",\"keccak256\":\"0xea68c5ccbd75695a7fb43bdbbec5636f63d1d3aabf36801b36a5ef0c43118c76\",\"license\":\"MIT\"},\"contracts/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"./Token.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n Token.Info info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n Token.Owner mainchain;\\n Token.Owner ronin;\\n Token.Info info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n TYPE_HASH,\\n _receipt.id,\\n _receipt.kind,\\n Token.hash(_receipt.mainchain),\\n Token.hash(_receipt.ronin),\\n Token.hash(_receipt.info)\\n )\\n );\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0x377ec9931ffb0bc1a9b958aceb28c6afb735c5c04f961ee424ac7da5f2c30402\",\"license\":\"MIT\"},\"contracts/mainchain/MainchainGatewayV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../extensions/GatewayV2.sol\\\";\\nimport \\\"../extensions/WithdrawalLimitation.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"../interfaces/IMainchainGatewayV2.sol\\\";\\n\\ncontract MainchainGatewayV2 is WithdrawalLimitation, Initializable, AccessControlEnumerable, IMainchainGatewayV2 {\\n using Token for Token.Info;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n\\n /// @dev Emitted when the bridge operators are replaced\\n event BridgeOperatorsReplaced(address[] operators);\\n\\n /// @dev Withdrawal unlocker role hash\\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\\\"WITHDRAWAL_UNLOCKER_ROLE\\\");\\n\\n /// @dev Wrapped native token address\\n IWETH public wrappedNativeToken;\\n /// @dev Ronin network id\\n uint256 public roninChainId;\\n /// @dev Total deposit\\n uint256 public depositCount;\\n /// @dev Domain seperator\\n bytes32 internal _domainSeparator;\\n /// @dev Mapping from mainchain token => token address on Ronin network\\n mapping(address => MappedToken) internal _roninToken;\\n /// @dev Mapping from withdrawal id => withdrawal hash\\n mapping(uint256 => bytes32) public withdrawalHash;\\n /// @dev Mapping from withdrawal id => locked\\n mapping(uint256 => bool) public withdrawalLocked;\\n\\n /// @dev Mapping from validator address => last block that the bridge operator is added\\n mapping(address => uint256) internal _bridgeOperatorAddedBlock;\\n /// @dev Bridge operators array\\n address[] internal _bridgeOperators;\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n IWETH _wrappedToken,\\n uint256 _roninChainId,\\n uint256 _numerator,\\n uint256 _highTierVWNumerator,\\n uint256 _denominator,\\n // _addresses[0]: mainchainTokens\\n // _addresses[1]: roninTokens\\n // _addresses[2]: withdrawalUnlockers\\n address[][3] calldata _addresses,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds,\\n Token.Standard[] calldata _standards\\n ) external payable virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n roninChainId = _roninChainId;\\n\\n _setWrappedNativeTokenContract(_wrappedToken);\\n _updateDomainSeparator();\\n _setThreshold(_numerator, _denominator);\\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\\n _verifyThresholds();\\n\\n if (_addresses[0].length > 0) {\\n // Map mainchain tokens to ronin tokens\\n _mapTokens(_addresses[0], _addresses[1], _standards);\\n // Sets thresholds based on the mainchain tokens\\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\\n _setLockedThresholds(_addresses[0], _thresholds[1]);\\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\\n }\\n\\n // Grant role for withdrawal unlocker\\n for (uint256 _i; _i < _addresses[2].length; _i++) {\\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][_i]);\\n }\\n }\\n\\n /**\\n * @inheritdoc IBridge\\n */\\n function replaceBridgeOperators(address[] calldata _list) external onlyAdmin {\\n address _addr;\\n for (uint256 _i = 0; _i < _list.length; _i++) {\\n _addr = _list[_i];\\n if (_bridgeOperatorAddedBlock[_addr] == 0) {\\n _bridgeOperators.push(_addr);\\n }\\n _bridgeOperatorAddedBlock[_addr] = block.number;\\n }\\n\\n {\\n uint256 _i;\\n while (_i < _bridgeOperators.length) {\\n _addr = _bridgeOperators[_i];\\n if (_bridgeOperatorAddedBlock[_addr] < block.number) {\\n delete _bridgeOperatorAddedBlock[_addr];\\n _bridgeOperators[_i] = _bridgeOperators[_bridgeOperators.length - 1];\\n _bridgeOperators.pop();\\n continue;\\n }\\n _i++;\\n }\\n }\\n\\n emit BridgeOperatorsReplaced(_list);\\n }\\n\\n /**\\n * @inheritdoc IBridge\\n */\\n function getBridgeOperators() external view returns (address[] memory) {\\n return _bridgeOperators;\\n }\\n\\n /**\\n * @dev Receives ether without doing anything. Use this function to topup native token.\\n */\\n function receiveEther() external payable {}\\n\\n /**\\n * @inheritdoc IMainchainGatewayV2\\n */\\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\\n return _domainSeparator;\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV2\\n */\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyAdmin {\\n _setWrappedNativeTokenContract(_wrappedToken);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV2\\n */\\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\\n _requestDepositFor(_request, msg.sender);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV2\\n */\\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures)\\n external\\n virtual\\n whenNotPaused\\n returns (bool _locked)\\n {\\n return _submitWithdrawal(_receipt, _signatures);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV2\\n */\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\\n bytes32 _receiptHash = _receipt.hash();\\n require(withdrawalHash[_receipt.id] == _receipt.hash(), \\\"MainchainGatewayV2: invalid receipt\\\");\\n require(withdrawalLocked[_receipt.id], \\\"MainchainGatewayV2: query for approved withdrawal\\\");\\n delete withdrawalLocked[_receipt.id];\\n emit WithdrawalUnlocked(_receiptHash, _receipt);\\n\\n address _token = _receipt.mainchain.tokenAddr;\\n if (_receipt.info.erc == Token.Standard.ERC20) {\\n Token.Info memory _feeInfo = _receipt.info;\\n _feeInfo.quantity = _computeFeePercentage(_receipt.info.quantity, unlockFeePercentages[_token]);\\n Token.Info memory _withdrawInfo = _receipt.info;\\n _withdrawInfo.quantity = _receipt.info.quantity - _feeInfo.quantity;\\n\\n _feeInfo.handleAssetTransfer(payable(msg.sender), _token, wrappedNativeToken);\\n _withdrawInfo.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken);\\n } else {\\n _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken);\\n }\\n\\n emit Withdrew(_receiptHash, _receipt);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV2\\n */\\n function mapTokens(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards\\n ) external virtual onlyAdmin {\\n require(_mainchainTokens.length > 0, \\\"MainchainGatewayV2: query for empty array\\\");\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV2\\n */\\n function mapTokensAndThresholds(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards,\\n // _thresholds[0]: highTierThreshold\\n // _thresholds[1]: lockedThreshold\\n // _thresholds[2]: unlockFeePercentages\\n // _thresholds[3]: dailyWithdrawalLimit\\n uint256[][4] calldata _thresholds\\n ) external virtual onlyAdmin {\\n require(_mainchainTokens.length > 0, \\\"MainchainGatewayV2: query for empty array\\\");\\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\\n }\\n\\n /**\\n * @inheritdoc IMainchainGatewayV2\\n */\\n function getRoninToken(address _mainchainToken) public view returns (MappedToken memory _token) {\\n _token = _roninToken[_mainchainToken];\\n require(_token.tokenAddr != address(0), \\\"MainchainGatewayV2: unsupported token\\\");\\n }\\n\\n /**\\n * @dev Maps mainchain tokens to Ronin network.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(\\n address[] calldata _mainchainTokens,\\n address[] calldata _roninTokens,\\n Token.Standard[] calldata _standards\\n ) internal virtual {\\n require(\\n _mainchainTokens.length == _roninTokens.length && _mainchainTokens.length == _standards.length,\\n \\\"MainchainGatewayV2: invalid array length\\\"\\n );\\n\\n for (uint256 _i; _i < _mainchainTokens.length; _i++) {\\n _roninToken[_mainchainTokens[_i]].tokenAddr = _roninTokens[_i];\\n _roninToken[_mainchainTokens[_i]].erc = _standards[_i];\\n }\\n\\n emit TokenMapped(_mainchainTokens, _roninTokens, _standards);\\n }\\n\\n /**\\n * @dev Submits withdrawal receipt.\\n *\\n * Requirements:\\n * - The receipt kind is withdrawal.\\n * - The receipt is to withdraw on this chain.\\n * - The receipt is not used to withdraw before.\\n * - The withdrawal is not reached the limit threshold.\\n * - The signer weight total is larger than or equal to the minimum threshold.\\n * - The signature signers are in order.\\n *\\n * Emits the `Withdrew` once the assets are released.\\n *\\n */\\n function _submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] memory _signatures)\\n internal\\n virtual\\n returns (bool _locked)\\n {\\n uint256 _id = _receipt.id;\\n uint256 _quantity = _receipt.info.quantity;\\n address _tokenAddr = _receipt.mainchain.tokenAddr;\\n\\n _receipt.info.validate();\\n require(_receipt.kind == Transfer.Kind.Withdrawal, \\\"MainchainGatewayV2: invalid receipt kind\\\");\\n require(_receipt.mainchain.chainId == block.chainid, \\\"MainchainGatewayV2: invalid chain id\\\");\\n MappedToken memory _token = getRoninToken(_receipt.mainchain.tokenAddr);\\n require(\\n _token.erc == _receipt.info.erc && _token.tokenAddr == _receipt.ronin.tokenAddr,\\n \\\"MainchainGatewayV2: invalid receipt\\\"\\n );\\n require(withdrawalHash[_id] == bytes32(0), \\\"MainchainGatewayV2: query for processed withdrawal\\\");\\n require(\\n _receipt.info.erc == Token.Standard.ERC721 || !_reachedWithdrawalLimit(_tokenAddr, _quantity),\\n \\\"MainchainGatewayV2: reached daily withdrawal limit\\\"\\n );\\n\\n bytes32 _receiptHash = _receipt.hash();\\n bytes32 _receiptDigest = Transfer.receiptDigest(_domainSeparator, _receiptHash);\\n\\n uint256 _minimumVoteWeight;\\n (_minimumVoteWeight, _locked) = _computeMinVoteWeight(_receipt.info.erc, _tokenAddr, _quantity);\\n\\n {\\n bool _passed;\\n address _signer;\\n address _lastSigner;\\n Signature memory _sig;\\n uint256 _weight;\\n for (uint256 _i; _i < _signatures.length; _i++) {\\n _sig = _signatures[_i];\\n _signer = ecrecover(_receiptDigest, _sig.v, _sig.r, _sig.s);\\n require(_lastSigner < _signer, \\\"MainchainGatewayV2: invalid order\\\");\\n _lastSigner = _signer;\\n\\n _weight += _getWeight(_signer);\\n if (_weight >= _minimumVoteWeight) {\\n _passed = true;\\n break;\\n }\\n }\\n require(_passed, \\\"MainchainGatewayV2: query for insufficient vote weight\\\");\\n withdrawalHash[_id] = _receiptHash;\\n }\\n\\n if (_locked) {\\n withdrawalLocked[_id] = true;\\n emit WithdrawalLocked(_receiptHash, _receipt);\\n return _locked;\\n }\\n\\n _recordWithdrawal(_tokenAddr, _quantity);\\n _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _tokenAddr, wrappedNativeToken);\\n emit Withdrew(_receiptHash, _receipt);\\n }\\n\\n /**\\n * @dev Requests deposit made by `_requester` address.\\n *\\n * Requirements:\\n * - The token info is valid.\\n * - The `msg.value` is 0 while depositing ERC20 token.\\n * - The `msg.value` is equal to deposit quantity while depositing native token.\\n *\\n * Emits the `DepositRequested` event.\\n *\\n */\\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\\n MappedToken memory _token;\\n address _weth = address(wrappedNativeToken);\\n\\n _request.info.validate();\\n if (_request.tokenAddr == address(0)) {\\n require(_request.info.quantity == msg.value, \\\"MainchainGatewayV2: invalid request\\\");\\n _token = getRoninToken(_weth);\\n require(_token.erc == _request.info.erc, \\\"MainchainGatewayV2: invalid token standard\\\");\\n _request.tokenAddr = _weth;\\n } else {\\n require(msg.value == 0, \\\"MainchainGatewayV2: invalid request\\\");\\n _token = getRoninToken(_request.tokenAddr);\\n require(_token.erc == _request.info.erc, \\\"MainchainGatewayV2: invalid token standard\\\");\\n _request.info.transferFrom(_requester, address(this), _request.tokenAddr);\\n // Withdraw if token is WETH\\n if (_weth == _request.tokenAddr) {\\n IWETH(_weth).withdraw(_request.info.quantity);\\n }\\n }\\n\\n uint256 _depositId = depositCount++;\\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(\\n _requester,\\n _depositId,\\n _token.tokenAddr,\\n roninChainId\\n );\\n\\n emit DepositRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Returns the minimum vote weight for the token.\\n */\\n function _computeMinVoteWeight(\\n Token.Standard _erc,\\n address _token,\\n uint256 _quantity\\n ) internal virtual returns (uint256 _weight, bool _locked) {\\n uint256 _totalWeight = _getTotalWeight();\\n _weight = _minimumVoteWeight(_totalWeight);\\n if (_erc == Token.Standard.ERC20) {\\n if (highTierThreshold[_token] <= _quantity) {\\n _weight = _highTierVoteWeight(_totalWeight);\\n }\\n _locked = _lockedWithdrawalRequest(_token, _quantity);\\n }\\n }\\n\\n /**\\n * @dev Update domain seperator.\\n */\\n function _updateDomainSeparator() internal {\\n _domainSeparator = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(\\\"MainchainGatewayV2\\\"),\\n keccak256(\\\"2\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /**\\n * @dev Sets the WETH contract.\\n *\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\n *\\n */\\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\\n wrappedNativeToken = _wrapedToken;\\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\\n }\\n\\n /**\\n * @dev Receives ETH from WETH or creates deposit request.\\n */\\n function _fallback() internal virtual whenNotPaused {\\n if (msg.sender != address(wrappedNativeToken)) {\\n Transfer.Request memory _request;\\n _request.recipientAddr = msg.sender;\\n _request.info.quantity = msg.value;\\n _requestDepositFor(_request, _request.recipientAddr);\\n }\\n }\\n\\n /**\\n * @inheritdoc GatewayV2\\n */\\n function _getTotalWeight() internal view override returns (uint256) {\\n return _bridgeOperators.length;\\n }\\n\\n /**\\n * @dev Returns the weight of an address.\\n */\\n function _getWeight(address _addr) internal view returns (uint256) {\\n return _bridgeOperatorAddedBlock[_addr] > 0 ? 1 : 0;\\n }\\n}\\n\",\"keccak256\":\"0x5ee2eab821731fc334298aece7ab5e250eb49f04ec7a1c9cd84e776e296ec0e0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506000805460ff19169055614ff28061002a6000396000f3fe6080604052600436106102cd5760003560e01c8063901d627711610175578063b1d08a03116100dc578063d547741f11610095578063dafae4081161006f578063dafae408146108ea578063dff525e11461090a578063e400327c1461092a578063e75235b81461094a576102dc565b8063d547741f1461087d578063d55ed1031461089d578063d64af2a6146108ca576102dc565b8063b1d08a031461079e578063b2975794146107cb578063b9c36209146107f8578063ca15c87314610818578063cdb6744414610838578063d19773d214610850576102dc565b8063a217fddf1161012e578063a217fddf14610706578063a3912ec8146102da578063ab7965661461071b578063ac78dfe814610748578063affed0e014610768578063b1a2567e1461077e576102dc565b8063901d62771461062f5780639157921c1461064f57806391d148541461066f57806393c5678f1461068f5780639b19dbfd146106af5780639dcc4da3146106d1576102dc565b80633f4ba83a116102345780635c975abb116101ed5780637de5dedd116101c75780637de5dedd146105b15780638456cb59146105c65780638f34e347146105db5780639010d07c1461060f576102dc565b80635c975abb1461054c5780636932be98146105645780636c1ce67014610591576102dc565b80633f4ba83a146104945780634b14557e146104a95780634d0d6673146104bc5780634d493f4e146104dc578063504af48c1461050c57806359122f6b1461051f576102dc565b8063248a9ca311610286578063248a9ca3146103e25780632dfdf0b5146104125780632f2ff15d14610428578063302d12db146104485780633644e5151461045f57806336568abe14610474576102dc565b806301ffc9a7146102e457806317ce2dd41461031957806317fcb39b1461033d5780631a8e55b0146103755780631b6e7594146103955780631d4a7210146103b5576102dc565b366102dc576102da610962565b005b6102da610962565b3480156102f057600080fd5b506103046102ff366004613ebf565b6109a2565b60405190151581526020015b60405180910390f35b34801561032557600080fd5b5061032f60755481565b604051908152602001610310565b34801561034957600080fd5b5060745461035d906001600160a01b031681565b6040516001600160a01b039091168152602001610310565b34801561038157600080fd5b506102da610390366004613f2e565b6109cd565b3480156103a157600080fd5b506102da6103b0366004613f9a565b610a3d565b3480156103c157600080fd5b5061032f6103d0366004614054565b603e6020526000908152604090205481565b3480156103ee57600080fd5b5061032f6103fd366004614071565b60009081526072602052604090206001015490565b34801561041e57600080fd5b5061032f60765481565b34801561043457600080fd5b506102da61044336600461408a565b610aa8565b34801561045457600080fd5b5061032f620f424081565b34801561046b57600080fd5b5060775461032f565b34801561048057600080fd5b506102da61048f36600461408a565b610ad2565b3480156104a057600080fd5b506102da610b50565b6102da6104b73660046140ba565b610b90565b3480156104c857600080fd5b506103046104d73660046140e5565b610bb0565b3480156104e857600080fd5b506103046104f7366004614071565b607a6020526000908152604090205460ff1681565b6102da61051a366004614190565b610c1e565b34801561052b57600080fd5b5061032f61053a366004614054565b603a6020526000908152604090205481565b34801561055857600080fd5b5060005460ff16610304565b34801561057057600080fd5b5061032f61057f366004614071565b60796020526000908152604090205481565b34801561059d57600080fd5b506103046105ac36600461426b565b610f65565b3480156105bd57600080fd5b5061032f610f78565b3480156105d257600080fd5b506102da610f90565b3480156105e757600080fd5b5061032f7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b34801561061b57600080fd5b5061035d61062a366004614297565b610fd0565b34801561063b57600080fd5b506102da61064a3660046142b9565b610fe8565b34801561065b57600080fd5b506102da61066a3660046142fb565b611259565b34801561067b57600080fd5b5061030461068a36600461408a565b611525565b34801561069b57600080fd5b506102da6106aa366004613f2e565b611550565b3480156106bb57600080fd5b506106c46115b1565b6040516103109190614318565b3480156106dd57600080fd5b506106f16106ec366004614297565b611613565b60408051928352602083019190915201610310565b34801561071257600080fd5b5061032f600081565b34801561072757600080fd5b5061032f610736366004614054565b603c6020526000908152604090205481565b34801561075457600080fd5b50610304610763366004614071565b61166c565b34801561077457600080fd5b5061032f60045481565b34801561078a57600080fd5b506102da610799366004613f2e565b611699565b3480156107aa57600080fd5b5061032f6107b9366004614054565b60396020526000908152604090205481565b3480156107d757600080fd5b506107eb6107e6366004614054565b6116fa565b6040516103109190614399565b34801561080457600080fd5b506106f1610813366004614297565b6117da565b34801561082457600080fd5b5061032f610833366004614071565b61181f565b34801561084457600080fd5b506037546038546106f1565b34801561085c57600080fd5b5061032f61086b366004614054565b603b6020526000908152604090205481565b34801561088957600080fd5b506102da61089836600461408a565b611836565b3480156108a957600080fd5b5061032f6108b8366004614054565b603d6020526000908152604090205481565b3480156108d657600080fd5b506102da6108e5366004614054565b61185b565b3480156108f657600080fd5b50610304610905366004614071565b61189c565b34801561091657600080fd5b506102da6109253660046143c5565b6118c1565b34801561093657600080fd5b506102da610945366004613f2e565b611961565b34801561095657600080fd5b506001546002546106f1565b61096a6119c2565b6074546001600160a01b031633146109a057610984613e7e565b33815260408082015134910152805161099e908290611a08565b505b565b60006001600160e01b03198216635a05180f60e01b14806109c757506109c782611c67565b92915050565b6109d5611c9c565b6001600160a01b0316336001600160a01b031614610a0e5760405162461bcd60e51b8152600401610a0590614483565b60405180910390fd5b82610a2b5760405162461bcd60e51b8152600401610a05906144c5565b610a3784848484611cca565b50505050565b610a45611c9c565b6001600160a01b0316336001600160a01b031614610a755760405162461bcd60e51b8152600401610a0590614483565b84610a925760405162461bcd60e51b8152600401610a059061450f565b610aa0868686868686611d9a565b505050505050565b600082815260726020526040902060010154610ac381611f6d565b610acd8383611f77565b505050565b6001600160a01b0381163314610b425760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a05565b610b4c8282611f99565b5050565b610b58611c9c565b6001600160a01b0316336001600160a01b031614610b885760405162461bcd60e51b8152600401610a0590614483565b6109a0611fbb565b610b986119c2565b61099e610baa368390038301836145f7565b33611a08565b6000610bba6119c2565b610c16848484808060200260200160405190810160405280939291908181526020016000905b82821015610c0c57610bfd6060830286013681900381019061464a565b81526020019060010190610be0565b505050505061200d565b949350505050565b607154610100900460ff1615808015610c3e5750607154600160ff909116105b80610c585750303b158015610c58575060715460ff166001145b610cbb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a05565b6071805460ff191660011790558015610cde576071805461ff0019166101001790555b610ce960008c6125ea565b6075899055610cf78a6125f4565b610d9e604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b918101919091527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a560608201524660808201523060a082015260c00160408051601f198184030181529190528051602090910120607755565b610da88887612648565b5050610db48787612708565b5050610dbe6127cd565b6000610dca86806146d6565b90501115610e8b57610df3610ddf86806146d6565b610dec60208901896146d6565b8787611d9a565b610e19610e0086806146d6565b8660005b602002810190610e1491906146d6565b61284c565b610e3f610e2686806146d6565b8660015b602002810190610e3a91906146d6565b611cca565b610e65610e4c86806146d6565b8660025b602002810190610e6091906146d6565b61291c565b610e8b610e7286806146d6565b8660035b602002810190610e8691906146d6565b612a68565b60005b610e9b60408701876146d6565b9050811015610f1157610eff7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610ed560408901896146d6565b84818110610ee557610ee56146c0565b9050602002016020810190610efa9190614054565b611f77565b80610f0981614736565b915050610e8e565b508015610f58576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610f718383612b38565b9392505050565b6000610f8b610f86607c5490565b612bfc565b905090565b610f98611c9c565b6001600160a01b0316336001600160a01b031614610fc85760405162461bcd60e51b8152600401610a0590614483565b6109a0612c32565b6000828152607360205260408120610f719083612c6f565b610ff0611c9c565b6001600160a01b0316336001600160a01b0316146110205760405162461bcd60e51b8152600401610a0590614483565b6000805b828110156110ed5783838281811061103e5761103e6146c0565b90506020020160208101906110539190614054565b6001600160a01b0381166000908152607b6020526040812054919350036110c057607c80546001810182556000919091527f9222cbf5d0ddc505a6f2f04716e22c226cee16a955fef88c618922096dae2fd00180546001600160a01b0319166001600160a01b0384161790555b6001600160a01b0382166000908152607b60205260409020439055806110e581614736565b915050611024565b5060005b607c5481101561121a57607c818154811061110e5761110e6146c0565b60009182526020808320909101546001600160a01b0316808352607b909152604090912054909250431115611208576001600160a01b0382166000908152607b6020526040812055607c80546111669060019061474f565b81548110611176576111766146c0565b600091825260209091200154607c80546001600160a01b0390921691839081106111a2576111a26146c0565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550607c8054806111e1576111e1614762565b600082815260209020810160001990810180546001600160a01b03191690550190556110f1565b8061121281614736565b9150506110f1565b507f13d4eff010663e07d8228b8c8d1c4788eb5d5d58be5cce74fd3eca72402d86dc838360405161124c9291906147c1565b60405180910390a1505050565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461128381611f6d565b600061129c61129736859003850185614823565b612c7b565b90506112b061129736859003850185614823565b8335600090815260796020526040902054146112de5760405162461bcd60e51b8152600401610a05906148bf565b82356000908152607a602052604090205460ff166113585760405162461bcd60e51b815260206004820152603160248201527f4d61696e636861696e4761746577617956323a20717565727920666f722061706044820152701c1c9bdd9959081dda5d1a191c985dd85b607a1b6064820152608401610a05565b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906113a2908390869061493a565b60405180910390a160006113bc6080850160608601614054565b905060006113d2610120860161010087016149c7565b60018111156113e3576113e3614365565b036114aa5760006113fd36869003860161010087016149e4565b6001600160a01b0383166000908152603b60205260409020549091506114299061014087013590612d04565b6040820152600061144336879003870161010088016149e4565b604083015190915061145a9061014088013561474f565b604082015260745461147a908390339086906001600160a01b0316612d1e565b6114a361148d6060880160408901614054565b60745483919086906001600160a01b0316612d1e565b50506114e6565b6114e66114bd6060860160408701614054565b60745483906001600160a01b03166114de3689900389016101008a016149e4565b929190612d1e565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161151792919061493a565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b611558611c9c565b6001600160a01b0316336001600160a01b0316146115885760405162461bcd60e51b8152600401610a0590614483565b826115a55760405162461bcd60e51b8152600401610a05906144c5565b610a378484848461284c565b6060607c80548060200260200160405190810160405280929190818152602001828054801561160957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115eb575b5050505050905090565b60008061161e611c9c565b6001600160a01b0316336001600160a01b03161461164e5760405162461bcd60e51b8152600401610a0590614483565b6116588484612708565b90925090506116656127cd565b9250929050565b6000611677607c5490565b6037546116849190614a00565b6038546116919084614a00565b101592915050565b6116a1611c9c565b6001600160a01b0316336001600160a01b0316146116d15760405162461bcd60e51b8152600401610a0590614483565b826116ee5760405162461bcd60e51b8152600401610a05906144c5565b610a378484848461291c565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561174857611748614365565b600181111561175957611759614365565b815290546001600160a01b03610100909104811660209283015290820151919250166117d55760405162461bcd60e51b815260206004820152602560248201527f4d61696e636861696e4761746577617956323a20756e737570706f72746564206044820152643a37b5b2b760d91b6064820152608401610a05565b919050565b6000806117e5611c9c565b6001600160a01b0316336001600160a01b0316146118155760405162461bcd60e51b8152600401610a0590614483565b6116588484612648565b60008181526073602052604081206109c7906130f1565b60008281526072602052604090206001015461185181611f6d565b610acd8383611f99565b611863611c9c565b6001600160a01b0316336001600160a01b0316146118935760405162461bcd60e51b8152600401610a0590614483565b61099e816125f4565b60006118a7607c5490565b6001546118b49190614a00565b6002546116919084614a00565b6118c9611c9c565b6001600160a01b0316336001600160a01b0316146118f95760405162461bcd60e51b8152600401610a0590614483565b856119165760405162461bcd60e51b8152600401610a059061450f565b611924878787878787611d9a565b6119318787836000610e04565b61193e8787836001610e2a565b61194b8787836002610e50565b6119588787836003610e76565b50505050505050565b611969611c9c565b6001600160a01b0316336001600160a01b0316146119995760405162461bcd60e51b8152600401610a0590614483565b826119b65760405162461bcd60e51b8152600401610a05906144c5565b610a3784848484612a68565b60005460ff16156109a05760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a05565b604080518082018252600080825260208201526074549184015190916001600160a01b031690611a37906130fb565b60208401516001600160a01b0316611ad7573484604001516040015114611a705760405162461bcd60e51b8152600401610a0590614a17565b611a79816116fa565b6040850151519092506001811115611a9357611a93614365565b82516001811115611aa657611aa6614365565b14611ac35760405162461bcd60e51b8152600401610a0590614a5a565b6001600160a01b0381166020850152611be4565b3415611af55760405162461bcd60e51b8152600401610a0590614a17565b611b0284602001516116fa565b6040850151519092506001811115611b1c57611b1c614365565b82516001811115611b2f57611b2f614365565b14611b4c5760405162461bcd60e51b8152600401610a0590614a5a565b60208401516040850151611b63918590309061319b565b83602001516001600160a01b0316816001600160a01b031603611be4576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b158015611bcb57600080fd5b505af1158015611bdf573d6000803e3d6000fd5b505050505b6076805460009182611bf583614736565b9190505590506000611c1c858386602001516075548a6133d990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b611c4882612c7b565b82604051611c57929190614aa4565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b14806109c757506301ffc9a760e01b6001600160e01b03198316146109c7565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031690565b828114611ce95760405162461bcd60e51b8152600401610a05906144c5565b60005b83811015611d6457828282818110611d0657611d066146c0565b90506020020135603a6000878785818110611d2357611d236146c0565b9050602002016020810190611d389190614054565b6001600160a01b0316815260208101919091526040016000205580611d5c81614736565b915050611cec565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516115179493929190614b5c565b8483148015611da857508481145b611e055760405162461bcd60e51b815260206004820152602860248201527f4d61696e636861696e4761746577617956323a20696e76616c696420617272616044820152670f240d8cadccee8d60c31b6064820152608401610a05565b60005b85811015611f3357848482818110611e2257611e226146c0565b9050602002016020810190611e379190614054565b60786000898985818110611e4d57611e4d6146c0565b9050602002016020810190611e629190614054565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611eaa57611eaa6146c0565b9050602002016020810190611ebf91906149c7565b60786000898985818110611ed557611ed56146c0565b9050602002016020810190611eea9190614054565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611f1c57611f1c614365565b021790555080611f2b81614736565b915050611e08565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444868686868686604051611c5796959493929190614ba8565b61099e81336134ae565b611f8182826134ec565b6000828152607360205260409020610acd9082613572565b611fa38282613587565b6000828152607360205260409020610acd90826135ee565b611fc3613603565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60008235610140840135826120286080870160608801614054565b905061204561204036889003880161010089016149e4565b6130fb565b600161205760408801602089016149c7565b600181111561206857612068614365565b146120c65760405162461bcd60e51b815260206004820152602860248201527f4d61696e636861696e4761746577617956323a20696e76616c696420726563656044820152671a5c1d081ada5b9960c21b6064820152608401610a05565b608086013546146121255760405162461bcd60e51b8152602060048201526024808201527f4d61696e636861696e4761746577617956323a20696e76616c696420636861696044820152631b881a5960e21b6064820152608401610a05565b600061213a6107e66080890160608a01614054565b905061214e610120880161010089016149c7565b600181111561215f5761215f614365565b8151600181111561217257612172614365565b1480156121a3575061218a60e0880160c08901614054565b6001600160a01b031681602001516001600160a01b0316145b6121bf5760405162461bcd60e51b8152600401610a05906148bf565b600084815260796020526040902054156122365760405162461bcd60e51b815260206004820152603260248201527f4d61696e636861696e4761746577617956323a20717565727920666f722070726044820152711bd8d95cdcd959081dda5d1a191c985dd85b60721b6064820152608401610a05565b600161224a61012089016101008a016149c7565b600181111561225b5761225b614365565b148061226e575061226c8284612b38565b155b6122d55760405162461bcd60e51b815260206004820152603260248201527f4d61696e636861696e4761746577617956323a2072656163686564206461696c6044820152711e481dda5d1a191c985dd85b081b1a5b5a5d60721b6064820152608401610a05565b60006122e9611297368a90038a018a614823565b905060006122f96077548361364c565b905060006123196123126101208c016101008d016149c7565b868861368d565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612473578e818151811061235e5761235e6146c0565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156123c2573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b0316106124395760405162461bcd60e51b815260206004820152602160248201527f4d61696e636861696e4761746577617956323a20696e76616c6964206f7264656044820152603960f91b6064820152608401610a05565b84935061244585613714565b61244f9083614c20565b91508682106124615760019550612473565b8061246b81614736565b915050612343565b50846124e05760405162461bcd60e51b815260206004820152603660248201527f4d61696e636861696e4761746577617956323a20717565727920666f7220696e6044820152751cdd59999a58da595b9d081d9bdd19481dd95a59da1d60521b6064820152608401610a05565b50505060008981526079602052604090208590555050871561255b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906125479085908d9061493a565b60405180910390a1505050505050506109c7565b6125658587613744565b6125a461257860608c0160408d01614054565b86607460009054906101000a90046001600160a01b03168d610100018036038101906114de91906149e4565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516125d592919061493a565b60405180910390a15050505050505092915050565b610b4c8282611f77565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b6000808284111561269b5760405162461bcd60e51b815260206004820152601c60248201527f4761746577617956323a20696e76616c6964207468726573686f6c64000000006044820152606401610a05565b505060018054600280549285905583905560048054919291849186919060006126c383614736565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b6000808284111561276b5760405162461bcd60e51b815260206004820152602760248201527f5769746864726177616c4c696d69746174696f6e3a20696e76616c69642074686044820152661c995cda1bdb1960ca1b6064820152608401610a05565b5050603780546038805492859055839055600480549192918491869190600061279383614736565b9091555060408051868152602081018690527f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016126f9565b6002546037546127dd9190614a00565b6038546001546127ed9190614a00565b11156109a05760405162461bcd60e51b815260206004820152602860248201527f5769746864726177616c4c696d69746174696f6e3a20696e76616c6964207468604482015267726573686f6c647360c01b6064820152608401610a05565b82811461286b5760405162461bcd60e51b8152600401610a05906144c5565b60005b838110156128e657828282818110612888576128886146c0565b90506020020135603960008787858181106128a5576128a56146c0565b90506020020160208101906128ba9190614054565b6001600160a01b03168152602081019190915260400160002055806128de81614736565b91505061286e565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516115179493929190614b5c565b82811461293b5760405162461bcd60e51b8152600401610a05906144c5565b60005b83811015612a3257620f424083838381811061295c5761295c6146c0565b9050602002013511156129c25760405162461bcd60e51b815260206004820152602860248201527f5769746864726177616c4c696d69746174696f6e3a20696e76616c69642070656044820152677263656e7461676560c01b6064820152608401610a05565b8282828181106129d4576129d46146c0565b90506020020135603b60008787858181106129f1576129f16146c0565b9050602002016020810190612a069190614054565b6001600160a01b0316815260208101919091526040016000205580612a2a81614736565b91505061293e565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516115179493929190614b5c565b828114612a875760405162461bcd60e51b8152600401610a05906144c5565b60005b83811015612b0257828282818110612aa457612aa46146c0565b90506020020135603c6000878785818110612ac157612ac16146c0565b9050602002016020810190612ad69190614054565b6001600160a01b0316815260208101919091526040016000205580612afa81614736565b915050612a8a565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516115179493929190614b5c565b6001600160a01b0382166000908152603a60205260408120548210612b5f575060006109c7565b6000612b6e6201518042614c33565b6001600160a01b0385166000908152603e6020526040902054909150811115612bb45750506001600160a01b0382166000908152603c60205260409020548110156109c7565b6001600160a01b0384166000908152603d6020526040902054612bd8908490614c20565b6001600160a01b0385166000908152603c6020526040902054111591506109c79050565b6000600254600160025484600154612c149190614a00565b612c1e9190614c20565b612c28919061474f565b6109c79190614c33565b612c3a6119c2565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ff03390565b6000610f7183836137d4565b60007fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea60001b82600001518360200151612cb885604001516137fe565b612cc586606001516137fe565b612cd28760800151613861565b604051602001612ce796959493929190614c55565b604051602081830303815290604052805190602001209050919050565b6000620f4240612d148385614a00565b610f719190614c33565b6000816001600160a01b0316836001600160a01b031603612dcd5760408086015190516001600160a01b0386169180156108fc02916000818181858888f19350505050612dc857816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612da457600080fd5b505af1158015612db8573d6000803e3d6000fd5b5050505050612dc88585856138a4565b6130ea565b600085516001811115612de257612de2614365565b03612f7a576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e529190614c8f565b90508560400151811015612f6957836001600160a01b03166340c10f1930838960400151612e80919061474f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612ed49190614ccc565b6000604051808303816000865af19150503d8060008114612f11576040519150601f19603f3d011682016040523d82523d6000602084013e612f16565b606091505b50508092505081612f695760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e3a204552433230206d696e74696e67206661696c656400000000006044820152606401610a05565b612f748686866138a4565b506130ea565b600185516001811115612f8f57612f8f614365565b0361309857612fa383858760200151613946565b612dc857602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b17905251918516916130039190614ccc565b6000604051808303816000865af19150503d8060008114613040576040519150601f19603f3d011682016040523d82523d6000602084013e613045565b606091505b50508091505080612dc85760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e3a20455243373231206d696e74696e67206661696c6564000000006044820152606401610a05565b60405162461bcd60e51b815260206004820152602160248201527f546f6b656e3a20756e737570706f7274656420746f6b656e207374616e6461726044820152601960fa1b6064820152608401610a05565b5050505050565b60006109c7825490565b60008151600181111561311057613110614365565b148015613121575060008160400151115b801561312f57506020810151155b80613159575060018151600181111561314a5761314a614365565b14801561315957506040810151155b61099e5760405162461bcd60e51b8152602060048201526013602482015272546f6b656e3a20696e76616c696420696e666f60681b6044820152606401610a05565b6000606081865160018111156131b3576131b3614365565b036132905760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b17905291519185169161321c9190614ccc565b6000604051808303816000865af19150503d8060008114613259576040519150601f19603f3d011682016040523d82523d6000602084013e61325e565b606091505b5090925090508180156132895750805115806132895750808060200190518101906132899190614ce8565b9150613356565b6001865160018111156132a5576132a5614365565b0361309857602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b179052519185169161330e9190614ccc565b6000604051808303816000865af19150503d806000811461334b576040519150601f19603f3d011682016040523d82523d6000602084013e613350565b606091505b50909250505b81610aa057613364866139f1565b613378866001600160a01b03166014613a5e565b61338c866001600160a01b03166014613a5e565b6133a0866001600160a01b03166014613a5e565b6040516020016133b39493929190614d0a565b60408051601f198184030181529082905262461bcd60e51b8252610a0591600401614dc3565b6134496040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6134b88282611525565b610b4c576134d0816001600160a01b03166014613a5e565b6134db836020613a5e565b6040516020016133b3929190614df6565b6134f68282611525565b610b4c5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561352e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f71836001600160a01b038416613bfa565b6135918282611525565b15610b4c5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f71836001600160a01b038416613c49565b60005460ff166109a05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a05565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610f71565b600080600061369b607c5490565b90506136a681612bfc565b925060008660018111156136bc576136bc614365565b0361370b576001600160a01b03851660009081526039602052604090205484106136ec576136e981613d3c565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6001600160a01b0381166000908152607b602052604081205461373857600061373b565b60015b60ff1692915050565b60006137536201518042614c33565b6001600160a01b0384166000908152603e60205260409020549091508111156137a2576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906137ca908490614c20565b9091555050505050565b60008260000182815481106137eb576137eb6146c0565b9060005260206000200154905092915050565b80516020808301516040808501519051600094612ce7947f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e87649491939192019384526001600160a01b03928316602085015291166040830152606082015260800190565b80516020808301516040808501519051600094612ce7947f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d949193919201614e6b565b600080845160018111156138ba576138ba614365565b036138d5576138ce82848660400151613d54565b90506138fe565b6001845160018111156138ea576138ea614365565b03613098576138ce82848660200151613946565b80610a375761390c846139f1565b613920846001600160a01b03166014613a5e565b613934846001600160a01b03166014613a5e565b6040516020016133b393929190614e96565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928616916139a491614ccc565b6000604051808303816000865af19150503d80600081146139e1576040519150601f19603f3d011682016040523d82523d6000602084013e6139e6565b606091505b509095945050505050565b6060613a1c82600001516001811115613a0c57613a0c614365565b6001600160a01b03166001613a5e565b613a298360200151613e27565b613a368460400151613e27565b604051602001613a4893929190614f27565b6040516020818303038152906040529050919050565b60606000613a6d836002614a00565b613a78906002614c20565b67ffffffffffffffff811115613a9057613a90614558565b6040519080825280601f01601f191660200182016040528015613aba576020820181803683370190505b509050600360fc1b81600081518110613ad557613ad56146c0565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b0457613b046146c0565b60200101906001600160f81b031916908160001a9053506000613b28846002614a00565b613b33906001614c20565b90505b6001811115613bab576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613b6757613b676146c0565b1a60f81b828281518110613b7d57613b7d6146c0565b60200101906001600160f81b031916908160001a90535060049490941c93613ba481614fa5565b9050613b36565b508315610f715760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a05565b6000818152600183016020526040812054613c41575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109c7565b5060006109c7565b60008181526001830160205260408120548015613d32576000613c6d60018361474f565b8554909150600090613c819060019061474f565b9050818114613ce6576000866000018281548110613ca157613ca16146c0565b9060005260206000200154905080876000018481548110613cc457613cc46146c0565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613cf757613cf7614762565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109c7565b60009150506109c7565b6000603854600160385484603754612c149190614a00565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613db19190614ccc565b6000604051808303816000865af19150503d8060008114613dee576040519150601f19603f3d011682016040523d82523d6000602084013e613df3565b606091505b509092509050818015613e1e575080511580613e1e575080806020019051810190613e1e9190614ce8565b95945050505050565b606081600003613e515750506040805180820190915260048152630307830360e41b602082015290565b8160005b8115613e745780613e6581614736565b915050600882901c9150613e55565b610c168482613a5e565b6040805160608101825260008082526020820152908101613eba6040805160608101909152806000815260200160008152602001600081525090565b905290565b600060208284031215613ed157600080fd5b81356001600160e01b031981168114610f7157600080fd5b60008083601f840112613efb57600080fd5b50813567ffffffffffffffff811115613f1357600080fd5b6020830191508360208260051b850101111561166557600080fd5b60008060008060408587031215613f4457600080fd5b843567ffffffffffffffff80821115613f5c57600080fd5b613f6888838901613ee9565b90965094506020870135915080821115613f8157600080fd5b50613f8e87828801613ee9565b95989497509550505050565b60008060008060008060608789031215613fb357600080fd5b863567ffffffffffffffff80821115613fcb57600080fd5b613fd78a838b01613ee9565b90985096506020890135915080821115613ff057600080fd5b613ffc8a838b01613ee9565b9096509450604089013591508082111561401557600080fd5b5061402289828a01613ee9565b979a9699509497509295939492505050565b6001600160a01b038116811461099e57600080fd5b80356117d581614034565b60006020828403121561406657600080fd5b8135610f7181614034565b60006020828403121561408357600080fd5b5035919050565b6000806040838503121561409d57600080fd5b8235915060208301356140af81614034565b809150509250929050565b600060a082840312156140cc57600080fd5b50919050565b600061016082840312156140cc57600080fd5b600080600061018084860312156140fb57600080fd5b61410585856140d2565b925061016084013567ffffffffffffffff8082111561412357600080fd5b818601915086601f83011261413757600080fd5b81358181111561414657600080fd5b87602060608302850101111561415b57600080fd5b6020830194508093505050509250925092565b80606081018310156109c757600080fd5b80608081018310156109c757600080fd5b6000806000806000806000806000806101208b8d0312156141b057600080fd5b6141b98b614049565b99506141c760208c01614049565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff8082111561420057600080fd5b61420c8e838f0161416e565b955060e08d013591508082111561422257600080fd5b61422e8e838f0161417f565b94506101008d013591508082111561424557600080fd5b506142528d828e01613ee9565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561427e57600080fd5b823561428981614034565b946020939093013593505050565b600080604083850312156142aa57600080fd5b50508035926020909101359150565b600080602083850312156142cc57600080fd5b823567ffffffffffffffff8111156142e357600080fd5b6142ef85828601613ee9565b90969095509350505050565b6000610160828403121561430e57600080fd5b610f7183836140d2565b6020808252825182820181905260009190848201906040850190845b818110156143595783516001600160a01b031683529284019291840191600101614334565b50909695505050505050565b634e487b7160e01b600052602160045260246000fd5b6002811061099e57634e487b7160e01b600052602160045260246000fd5b815160408201906143a98161437b565b82526020928301516001600160a01b0316929091019190915290565b60008060008060008060006080888a0312156143e057600080fd5b873567ffffffffffffffff808211156143f857600080fd5b6144048b838c01613ee9565b909950975060208a013591508082111561441d57600080fd5b6144298b838c01613ee9565b909750955060408a013591508082111561444257600080fd5b61444e8b838c01613ee9565b909550935060608a013591508082111561446757600080fd5b506144748a828b0161417f565b91505092959891949750929550565b60208082526022908201527f48617350726f787941646d696e3a20756e617574686f72697a65642073656e6460408201526132b960f11b606082015260800190565b6020808252602a908201527f5769746864726177616c4c696d69746174696f6e3a20696e76616c69642061726040820152690e4c2f240d8cadccee8d60b31b606082015260800190565b60208082526029908201527f4d61696e636861696e4761746577617956323a20717565727920666f7220656d60408201526870747920617272617960b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561459f57634e487b7160e01b600052604160045260246000fd5b60405290565b6002811061099e57600080fd5b6000606082840312156145c457600080fd5b6145cc61456e565b905081356145d9816145a5565b80825250602082013560208201526040820135604082015292915050565b600060a0828403121561460957600080fd5b61461161456e565b823561461c81614034565b8152602083013561462c81614034565b602082015261463e84604085016145b2565b60408201529392505050565b60006060828403121561465c57600080fd5b6040516060810181811067ffffffffffffffff8211171561468d57634e487b7160e01b600052604160045260246000fd5b604052823560ff811681146146a157600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126146ed57600080fd5b83018035915067ffffffffffffffff82111561470857600080fd5b6020019150600581901b360382131561166557600080fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161474857614748614720565b5060010190565b818103818111156109c7576109c7614720565b634e487b7160e01b600052603160045260246000fd5b8183526000602080850194508260005b858110156147b657813561479b81614034565b6001600160a01b031687529582019590820190600101614788565b509495945050505050565b602081526000610c16602083018486614778565b6000606082840312156147e757600080fd5b6147ef61456e565b905081356147fc81614034565b8152602082013561480c81614034565b806020830152506040820135604082015292915050565b6000610160828403121561483657600080fd5b60405160a0810181811067ffffffffffffffff8211171561486757634e487b7160e01b600052604160045260246000fd5b60405282358152602083013561487c816145a5565b602082015261488e84604085016147d5565b60408201526148a08460a085016147d5565b60608201526148b38461010085016145b2565b60808201529392505050565b60208082526023908201527f4d61696e636861696e4761746577617956323a20696e76616c696420726563656040820152621a5c1d60ea1b606082015260800190565b803561490d81614034565b6001600160a01b03908116835260208201359061492982614034565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561495b816145a5565b6149648161437b565b8060408401525061497b6060830160408501614902565b61498b60c0830160a08501614902565b61012061010084013561499d816145a5565b6149a68161437b565b81840152830135610140808401919091529092013561016090910152919050565b6000602082840312156149d957600080fd5b8135610f71816145a5565b6000606082840312156149f657600080fd5b610f7183836145b2565b80820281158282048414176109c7576109c7614720565b60208082526023908201527f4d61696e636861696e4761746577617956323a20696e76616c69642072657175604082015262195cdd60ea1b606082015260800190565b6020808252602a908201527f4d61696e636861696e4761746577617956323a20696e76616c696420746f6b656040820152691b881cdd185b99185c9960b21b606082015260800190565b600061018082019050838252825160208301526020830151614ac58161437b565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301518051614b378161437b565b6101208401526020810151610140840152604001516101609092019190915292915050565b604081526000614b70604083018688614778565b82810360208401528381526001600160fb1b03841115614b8f57600080fd5b8360051b80866020840137016020019695505050505050565b606081526000614bbc60608301888a614778565b602083820381850152614bd082888a614778565b8481036040860152858152869250810160005b86811015614c11578335614bf6816145a5565b614bff8161437b565b82529282019290820190600101614be3565b509a9950505050505050505050565b808201808211156109c7576109c7614720565b600082614c5057634e487b7160e01b600052601260045260246000fd5b500490565b8681526020810186905260c08101614c6c8661437b565b8560408301528460608301528360808301528260a0830152979650505050505050565b600060208284031215614ca157600080fd5b5051919050565b60005b83811015614cc3578181015183820152602001614cab565b50506000910152565b60008251614cde818460208701614ca8565b9190910192915050565b600060208284031215614cfa57600080fd5b81518015158114610f7157600080fd5b7f546f6b656e3a20636f756c64206e6f74207472616e73666572200000000000008152600085516020614d4382601a8601838b01614ca8565b65010333937b6960d51b601a928501928301528651614d6781838501848b01614ca8565b630103a37960e51b9201818101929092528551614d8a8160248501898501614ca8565b660103a37b5b2b7160cd1b602493909101928301528451614db181602b8501848901614ca8565b91909101602b01979650505050505050565b6020815260008251806020840152614de2816040850160208701614ca8565b601f01601f19169190910160400192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614e2e816017850160208801614ca8565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614e5f816028840160208801614ca8565b01602801949350505050565b84815260808101614e7b8561437b565b84602083015283604083015282606083015295945050505050565b7f546f6b656e3a20636f756c64206e6f74207472616e7366657220000000000000815260008451614ece81601a850160208901614ca8565b630103a37960e51b601a918401918201528451614ef281601e840160208901614ca8565b660103a37b5b2b7160cd1b601e92909101918201528351614f1a816025840160208801614ca8565b0160250195945050505050565b690a8ded6cadc92dcccde560b31b815260008451614f4c81600a850160208901614ca8565b8083019050600b60fa1b80600a8301528551614f6f81600b850160208a01614ca8565b600b9201918201528351614f8a81600c840160208801614ca8565b602960f81b600c9290910191820152600d0195945050505050565b600081614fb457614fb4614720565b50600019019056fea2646970667358221220343b8f6ec981675474498057ee728a0a9b22a69d10c3ac4717e498a59c7fa8d764736f6c63430008110033", - "deployedBytecode": "0x6080604052600436106102cd5760003560e01c8063901d627711610175578063b1d08a03116100dc578063d547741f11610095578063dafae4081161006f578063dafae408146108ea578063dff525e11461090a578063e400327c1461092a578063e75235b81461094a576102dc565b8063d547741f1461087d578063d55ed1031461089d578063d64af2a6146108ca576102dc565b8063b1d08a031461079e578063b2975794146107cb578063b9c36209146107f8578063ca15c87314610818578063cdb6744414610838578063d19773d214610850576102dc565b8063a217fddf1161012e578063a217fddf14610706578063a3912ec8146102da578063ab7965661461071b578063ac78dfe814610748578063affed0e014610768578063b1a2567e1461077e576102dc565b8063901d62771461062f5780639157921c1461064f57806391d148541461066f57806393c5678f1461068f5780639b19dbfd146106af5780639dcc4da3146106d1576102dc565b80633f4ba83a116102345780635c975abb116101ed5780637de5dedd116101c75780637de5dedd146105b15780638456cb59146105c65780638f34e347146105db5780639010d07c1461060f576102dc565b80635c975abb1461054c5780636932be98146105645780636c1ce67014610591576102dc565b80633f4ba83a146104945780634b14557e146104a95780634d0d6673146104bc5780634d493f4e146104dc578063504af48c1461050c57806359122f6b1461051f576102dc565b8063248a9ca311610286578063248a9ca3146103e25780632dfdf0b5146104125780632f2ff15d14610428578063302d12db146104485780633644e5151461045f57806336568abe14610474576102dc565b806301ffc9a7146102e457806317ce2dd41461031957806317fcb39b1461033d5780631a8e55b0146103755780631b6e7594146103955780631d4a7210146103b5576102dc565b366102dc576102da610962565b005b6102da610962565b3480156102f057600080fd5b506103046102ff366004613ebf565b6109a2565b60405190151581526020015b60405180910390f35b34801561032557600080fd5b5061032f60755481565b604051908152602001610310565b34801561034957600080fd5b5060745461035d906001600160a01b031681565b6040516001600160a01b039091168152602001610310565b34801561038157600080fd5b506102da610390366004613f2e565b6109cd565b3480156103a157600080fd5b506102da6103b0366004613f9a565b610a3d565b3480156103c157600080fd5b5061032f6103d0366004614054565b603e6020526000908152604090205481565b3480156103ee57600080fd5b5061032f6103fd366004614071565b60009081526072602052604090206001015490565b34801561041e57600080fd5b5061032f60765481565b34801561043457600080fd5b506102da61044336600461408a565b610aa8565b34801561045457600080fd5b5061032f620f424081565b34801561046b57600080fd5b5060775461032f565b34801561048057600080fd5b506102da61048f36600461408a565b610ad2565b3480156104a057600080fd5b506102da610b50565b6102da6104b73660046140ba565b610b90565b3480156104c857600080fd5b506103046104d73660046140e5565b610bb0565b3480156104e857600080fd5b506103046104f7366004614071565b607a6020526000908152604090205460ff1681565b6102da61051a366004614190565b610c1e565b34801561052b57600080fd5b5061032f61053a366004614054565b603a6020526000908152604090205481565b34801561055857600080fd5b5060005460ff16610304565b34801561057057600080fd5b5061032f61057f366004614071565b60796020526000908152604090205481565b34801561059d57600080fd5b506103046105ac36600461426b565b610f65565b3480156105bd57600080fd5b5061032f610f78565b3480156105d257600080fd5b506102da610f90565b3480156105e757600080fd5b5061032f7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e481565b34801561061b57600080fd5b5061035d61062a366004614297565b610fd0565b34801561063b57600080fd5b506102da61064a3660046142b9565b610fe8565b34801561065b57600080fd5b506102da61066a3660046142fb565b611259565b34801561067b57600080fd5b5061030461068a36600461408a565b611525565b34801561069b57600080fd5b506102da6106aa366004613f2e565b611550565b3480156106bb57600080fd5b506106c46115b1565b6040516103109190614318565b3480156106dd57600080fd5b506106f16106ec366004614297565b611613565b60408051928352602083019190915201610310565b34801561071257600080fd5b5061032f600081565b34801561072757600080fd5b5061032f610736366004614054565b603c6020526000908152604090205481565b34801561075457600080fd5b50610304610763366004614071565b61166c565b34801561077457600080fd5b5061032f60045481565b34801561078a57600080fd5b506102da610799366004613f2e565b611699565b3480156107aa57600080fd5b5061032f6107b9366004614054565b60396020526000908152604090205481565b3480156107d757600080fd5b506107eb6107e6366004614054565b6116fa565b6040516103109190614399565b34801561080457600080fd5b506106f1610813366004614297565b6117da565b34801561082457600080fd5b5061032f610833366004614071565b61181f565b34801561084457600080fd5b506037546038546106f1565b34801561085c57600080fd5b5061032f61086b366004614054565b603b6020526000908152604090205481565b34801561088957600080fd5b506102da61089836600461408a565b611836565b3480156108a957600080fd5b5061032f6108b8366004614054565b603d6020526000908152604090205481565b3480156108d657600080fd5b506102da6108e5366004614054565b61185b565b3480156108f657600080fd5b50610304610905366004614071565b61189c565b34801561091657600080fd5b506102da6109253660046143c5565b6118c1565b34801561093657600080fd5b506102da610945366004613f2e565b611961565b34801561095657600080fd5b506001546002546106f1565b61096a6119c2565b6074546001600160a01b031633146109a057610984613e7e565b33815260408082015134910152805161099e908290611a08565b505b565b60006001600160e01b03198216635a05180f60e01b14806109c757506109c782611c67565b92915050565b6109d5611c9c565b6001600160a01b0316336001600160a01b031614610a0e5760405162461bcd60e51b8152600401610a0590614483565b60405180910390fd5b82610a2b5760405162461bcd60e51b8152600401610a05906144c5565b610a3784848484611cca565b50505050565b610a45611c9c565b6001600160a01b0316336001600160a01b031614610a755760405162461bcd60e51b8152600401610a0590614483565b84610a925760405162461bcd60e51b8152600401610a059061450f565b610aa0868686868686611d9a565b505050505050565b600082815260726020526040902060010154610ac381611f6d565b610acd8383611f77565b505050565b6001600160a01b0381163314610b425760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a05565b610b4c8282611f99565b5050565b610b58611c9c565b6001600160a01b0316336001600160a01b031614610b885760405162461bcd60e51b8152600401610a0590614483565b6109a0611fbb565b610b986119c2565b61099e610baa368390038301836145f7565b33611a08565b6000610bba6119c2565b610c16848484808060200260200160405190810160405280939291908181526020016000905b82821015610c0c57610bfd6060830286013681900381019061464a565b81526020019060010190610be0565b505050505061200d565b949350505050565b607154610100900460ff1615808015610c3e5750607154600160ff909116105b80610c585750303b158015610c58575060715460ff166001145b610cbb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a05565b6071805460ff191660011790558015610cde576071805461ff0019166101001790555b610ce960008c6125ea565b6075899055610cf78a6125f4565b610d9e604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f159f52c1e3a2b6a6aad3950adf713516211484e0516dad685ea662a094b7c43b918101919091527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a560608201524660808201523060a082015260c00160408051601f198184030181529190528051602090910120607755565b610da88887612648565b5050610db48787612708565b5050610dbe6127cd565b6000610dca86806146d6565b90501115610e8b57610df3610ddf86806146d6565b610dec60208901896146d6565b8787611d9a565b610e19610e0086806146d6565b8660005b602002810190610e1491906146d6565b61284c565b610e3f610e2686806146d6565b8660015b602002810190610e3a91906146d6565b611cca565b610e65610e4c86806146d6565b8660025b602002810190610e6091906146d6565b61291c565b610e8b610e7286806146d6565b8660035b602002810190610e8691906146d6565b612a68565b60005b610e9b60408701876146d6565b9050811015610f1157610eff7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4610ed560408901896146d6565b84818110610ee557610ee56146c0565b9050602002016020810190610efa9190614054565b611f77565b80610f0981614736565b915050610e8e565b508015610f58576071805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000610f718383612b38565b9392505050565b6000610f8b610f86607c5490565b612bfc565b905090565b610f98611c9c565b6001600160a01b0316336001600160a01b031614610fc85760405162461bcd60e51b8152600401610a0590614483565b6109a0612c32565b6000828152607360205260408120610f719083612c6f565b610ff0611c9c565b6001600160a01b0316336001600160a01b0316146110205760405162461bcd60e51b8152600401610a0590614483565b6000805b828110156110ed5783838281811061103e5761103e6146c0565b90506020020160208101906110539190614054565b6001600160a01b0381166000908152607b6020526040812054919350036110c057607c80546001810182556000919091527f9222cbf5d0ddc505a6f2f04716e22c226cee16a955fef88c618922096dae2fd00180546001600160a01b0319166001600160a01b0384161790555b6001600160a01b0382166000908152607b60205260409020439055806110e581614736565b915050611024565b5060005b607c5481101561121a57607c818154811061110e5761110e6146c0565b60009182526020808320909101546001600160a01b0316808352607b909152604090912054909250431115611208576001600160a01b0382166000908152607b6020526040812055607c80546111669060019061474f565b81548110611176576111766146c0565b600091825260209091200154607c80546001600160a01b0390921691839081106111a2576111a26146c0565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550607c8054806111e1576111e1614762565b600082815260209020810160001990810180546001600160a01b03191690550190556110f1565b8061121281614736565b9150506110f1565b507f13d4eff010663e07d8228b8c8d1c4788eb5d5d58be5cce74fd3eca72402d86dc838360405161124c9291906147c1565b60405180910390a1505050565b7f5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e461128381611f6d565b600061129c61129736859003850185614823565b612c7b565b90506112b061129736859003850185614823565b8335600090815260796020526040902054146112de5760405162461bcd60e51b8152600401610a05906148bf565b82356000908152607a602052604090205460ff166113585760405162461bcd60e51b815260206004820152603160248201527f4d61696e636861696e4761746577617956323a20717565727920666f722061706044820152701c1c9bdd9959081dda5d1a191c985dd85b607a1b6064820152608401610a05565b82356000908152607a602052604090819020805460ff19169055517fd639511b37b3b002cca6cfe6bca0d833945a5af5a045578a0627fc43b79b2630906113a2908390869061493a565b60405180910390a160006113bc6080850160608601614054565b905060006113d2610120860161010087016149c7565b60018111156113e3576113e3614365565b036114aa5760006113fd36869003860161010087016149e4565b6001600160a01b0383166000908152603b60205260409020549091506114299061014087013590612d04565b6040820152600061144336879003870161010088016149e4565b604083015190915061145a9061014088013561474f565b604082015260745461147a908390339086906001600160a01b0316612d1e565b6114a361148d6060880160408901614054565b60745483919086906001600160a01b0316612d1e565b50506114e6565b6114e66114bd6060860160408701614054565b60745483906001600160a01b03166114de3689900389016101008a016149e4565b929190612d1e565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d828560405161151792919061493a565b60405180910390a150505050565b60009182526072602090815260408084206001600160a01b0393909316845291905290205460ff1690565b611558611c9c565b6001600160a01b0316336001600160a01b0316146115885760405162461bcd60e51b8152600401610a0590614483565b826115a55760405162461bcd60e51b8152600401610a05906144c5565b610a378484848461284c565b6060607c80548060200260200160405190810160405280929190818152602001828054801561160957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115eb575b5050505050905090565b60008061161e611c9c565b6001600160a01b0316336001600160a01b03161461164e5760405162461bcd60e51b8152600401610a0590614483565b6116588484612708565b90925090506116656127cd565b9250929050565b6000611677607c5490565b6037546116849190614a00565b6038546116919084614a00565b101592915050565b6116a1611c9c565b6001600160a01b0316336001600160a01b0316146116d15760405162461bcd60e51b8152600401610a0590614483565b826116ee5760405162461bcd60e51b8152600401610a05906144c5565b610a378484848461291c565b60408051808201909152600080825260208201526001600160a01b0382166000908152607860205260409081902081518083019092528054829060ff16600181111561174857611748614365565b600181111561175957611759614365565b815290546001600160a01b03610100909104811660209283015290820151919250166117d55760405162461bcd60e51b815260206004820152602560248201527f4d61696e636861696e4761746577617956323a20756e737570706f72746564206044820152643a37b5b2b760d91b6064820152608401610a05565b919050565b6000806117e5611c9c565b6001600160a01b0316336001600160a01b0316146118155760405162461bcd60e51b8152600401610a0590614483565b6116588484612648565b60008181526073602052604081206109c7906130f1565b60008281526072602052604090206001015461185181611f6d565b610acd8383611f99565b611863611c9c565b6001600160a01b0316336001600160a01b0316146118935760405162461bcd60e51b8152600401610a0590614483565b61099e816125f4565b60006118a7607c5490565b6001546118b49190614a00565b6002546116919084614a00565b6118c9611c9c565b6001600160a01b0316336001600160a01b0316146118f95760405162461bcd60e51b8152600401610a0590614483565b856119165760405162461bcd60e51b8152600401610a059061450f565b611924878787878787611d9a565b6119318787836000610e04565b61193e8787836001610e2a565b61194b8787836002610e50565b6119588787836003610e76565b50505050505050565b611969611c9c565b6001600160a01b0316336001600160a01b0316146119995760405162461bcd60e51b8152600401610a0590614483565b826119b65760405162461bcd60e51b8152600401610a05906144c5565b610a3784848484612a68565b60005460ff16156109a05760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a05565b604080518082018252600080825260208201526074549184015190916001600160a01b031690611a37906130fb565b60208401516001600160a01b0316611ad7573484604001516040015114611a705760405162461bcd60e51b8152600401610a0590614a17565b611a79816116fa565b6040850151519092506001811115611a9357611a93614365565b82516001811115611aa657611aa6614365565b14611ac35760405162461bcd60e51b8152600401610a0590614a5a565b6001600160a01b0381166020850152611be4565b3415611af55760405162461bcd60e51b8152600401610a0590614a17565b611b0284602001516116fa565b6040850151519092506001811115611b1c57611b1c614365565b82516001811115611b2f57611b2f614365565b14611b4c5760405162461bcd60e51b8152600401610a0590614a5a565b60208401516040850151611b63918590309061319b565b83602001516001600160a01b0316816001600160a01b031603611be4576040848101518101519051632e1a7d4d60e01b815260048101919091526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b158015611bcb57600080fd5b505af1158015611bdf573d6000803e3d6000fd5b505050505b6076805460009182611bf583614736565b9190505590506000611c1c858386602001516075548a6133d990949392919063ffffffff16565b90507fd7b25068d9dc8d00765254cfb7f5070f98d263c8d68931d937c7362fa738048b611c4882612c7b565b82604051611c57929190614aa4565b60405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b14806109c757506301ffc9a760e01b6001600160e01b03198316146109c7565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031690565b828114611ce95760405162461bcd60e51b8152600401610a05906144c5565b60005b83811015611d6457828282818110611d0657611d066146c0565b90506020020135603a6000878785818110611d2357611d236146c0565b9050602002016020810190611d389190614054565b6001600160a01b0316815260208101919091526040016000205580611d5c81614736565b915050611cec565b507f64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5848484846040516115179493929190614b5c565b8483148015611da857508481145b611e055760405162461bcd60e51b815260206004820152602860248201527f4d61696e636861696e4761746577617956323a20696e76616c696420617272616044820152670f240d8cadccee8d60c31b6064820152608401610a05565b60005b85811015611f3357848482818110611e2257611e226146c0565b9050602002016020810190611e379190614054565b60786000898985818110611e4d57611e4d6146c0565b9050602002016020810190611e629190614054565b6001600160a01b03908116825260208201929092526040016000208054610100600160a81b0319166101009390921692909202179055828282818110611eaa57611eaa6146c0565b9050602002016020810190611ebf91906149c7565b60786000898985818110611ed557611ed56146c0565b9050602002016020810190611eea9190614054565b6001600160a01b031681526020810191909152604001600020805460ff191660018381811115611f1c57611f1c614365565b021790555080611f2b81614736565b915050611e08565b507fa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444868686868686604051611c5796959493929190614ba8565b61099e81336134ae565b611f8182826134ec565b6000828152607360205260409020610acd9082613572565b611fa38282613587565b6000828152607360205260409020610acd90826135ee565b611fc3613603565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60008235610140840135826120286080870160608801614054565b905061204561204036889003880161010089016149e4565b6130fb565b600161205760408801602089016149c7565b600181111561206857612068614365565b146120c65760405162461bcd60e51b815260206004820152602860248201527f4d61696e636861696e4761746577617956323a20696e76616c696420726563656044820152671a5c1d081ada5b9960c21b6064820152608401610a05565b608086013546146121255760405162461bcd60e51b8152602060048201526024808201527f4d61696e636861696e4761746577617956323a20696e76616c696420636861696044820152631b881a5960e21b6064820152608401610a05565b600061213a6107e66080890160608a01614054565b905061214e610120880161010089016149c7565b600181111561215f5761215f614365565b8151600181111561217257612172614365565b1480156121a3575061218a60e0880160c08901614054565b6001600160a01b031681602001516001600160a01b0316145b6121bf5760405162461bcd60e51b8152600401610a05906148bf565b600084815260796020526040902054156122365760405162461bcd60e51b815260206004820152603260248201527f4d61696e636861696e4761746577617956323a20717565727920666f722070726044820152711bd8d95cdcd959081dda5d1a191c985dd85b60721b6064820152608401610a05565b600161224a61012089016101008a016149c7565b600181111561225b5761225b614365565b148061226e575061226c8284612b38565b155b6122d55760405162461bcd60e51b815260206004820152603260248201527f4d61696e636861696e4761746577617956323a2072656163686564206461696c6044820152711e481dda5d1a191c985dd85b081b1a5b5a5d60721b6064820152608401610a05565b60006122e9611297368a90038a018a614823565b905060006122f96077548361364c565b905060006123196123126101208c016101008d016149c7565b868861368d565b60408051606081018252600080825260208201819052918101829052919a50919250819081906000805b8e51811015612473578e818151811061235e5761235e6146c0565b6020908102919091018101518051818301516040808401518151600081529586018083528e905260ff9093169085015260608401526080830152935060019060a0016020604051602081039080840390855afa1580156123c2573d6000803e3d6000fd5b505050602060405103519450846001600160a01b0316846001600160a01b0316106124395760405162461bcd60e51b815260206004820152602160248201527f4d61696e636861696e4761746577617956323a20696e76616c6964206f7264656044820152603960f91b6064820152608401610a05565b84935061244585613714565b61244f9083614c20565b91508682106124615760019550612473565b8061246b81614736565b915050612343565b50846124e05760405162461bcd60e51b815260206004820152603660248201527f4d61696e636861696e4761746577617956323a20717565727920666f7220696e6044820152751cdd59999a58da595b9d081d9bdd19481dd95a59da1d60521b6064820152608401610a05565b50505060008981526079602052604090208590555050871561255b576000878152607a602052604090819020805460ff19166001179055517f89e52969465b1f1866fc5d46fd62de953962e9cb33552443cd999eba05bd20dc906125479085908d9061493a565b60405180910390a1505050505050506109c7565b6125658587613744565b6125a461257860608c0160408d01614054565b86607460009054906101000a90046001600160a01b03168d610100018036038101906114de91906149e4565b7f21e88e956aa3e086f6388e899965cef814688f99ad8bb29b08d396571016372d838b6040516125d592919061493a565b60405180910390a15050505050505092915050565b610b4c8282611f77565b607480546001600160a01b0319166001600160a01b0383169081179091556040519081527f9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf9060200160405180910390a150565b6000808284111561269b5760405162461bcd60e51b815260206004820152601c60248201527f4761746577617956323a20696e76616c6964207468726573686f6c64000000006044820152606401610a05565b505060018054600280549285905583905560048054919291849186919060006126c383614736565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f891015b60405180910390a49250929050565b6000808284111561276b5760405162461bcd60e51b815260206004820152602760248201527f5769746864726177616c4c696d69746174696f6e3a20696e76616c69642074686044820152661c995cda1bdb1960ca1b6064820152608401610a05565b5050603780546038805492859055839055600480549192918491869190600061279383614736565b9091555060408051868152602081018690527f31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee191016126f9565b6002546037546127dd9190614a00565b6038546001546127ed9190614a00565b11156109a05760405162461bcd60e51b815260206004820152602860248201527f5769746864726177616c4c696d69746174696f6e3a20696e76616c6964207468604482015267726573686f6c647360c01b6064820152608401610a05565b82811461286b5760405162461bcd60e51b8152600401610a05906144c5565b60005b838110156128e657828282818110612888576128886146c0565b90506020020135603960008787858181106128a5576128a56146c0565b90506020020160208101906128ba9190614054565b6001600160a01b03168152602081019190915260400160002055806128de81614736565b91505061286e565b507f80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0848484846040516115179493929190614b5c565b82811461293b5760405162461bcd60e51b8152600401610a05906144c5565b60005b83811015612a3257620f424083838381811061295c5761295c6146c0565b9050602002013511156129c25760405162461bcd60e51b815260206004820152602860248201527f5769746864726177616c4c696d69746174696f6e3a20696e76616c69642070656044820152677263656e7461676560c01b6064820152608401610a05565b8282828181106129d4576129d46146c0565b90506020020135603b60008787858181106129f1576129f16146c0565b9050602002016020810190612a069190614054565b6001600160a01b0316815260208101919091526040016000205580612a2a81614736565b91505061293e565b507fb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50848484846040516115179493929190614b5c565b828114612a875760405162461bcd60e51b8152600401610a05906144c5565b60005b83811015612b0257828282818110612aa457612aa46146c0565b90506020020135603c6000878785818110612ac157612ac16146c0565b9050602002016020810190612ad69190614054565b6001600160a01b0316815260208101919091526040016000205580612afa81614736565b915050612a8a565b507fb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73848484846040516115179493929190614b5c565b6001600160a01b0382166000908152603a60205260408120548210612b5f575060006109c7565b6000612b6e6201518042614c33565b6001600160a01b0385166000908152603e6020526040902054909150811115612bb45750506001600160a01b0382166000908152603c60205260409020548110156109c7565b6001600160a01b0384166000908152603d6020526040902054612bd8908490614c20565b6001600160a01b0385166000908152603c6020526040902054111591506109c79050565b6000600254600160025484600154612c149190614a00565b612c1e9190614c20565b612c28919061474f565b6109c79190614c33565b612c3a6119c2565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ff03390565b6000610f7183836137d4565b60007fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea60001b82600001518360200151612cb885604001516137fe565b612cc586606001516137fe565b612cd28760800151613861565b604051602001612ce796959493929190614c55565b604051602081830303815290604052805190602001209050919050565b6000620f4240612d148385614a00565b610f719190614c33565b6000816001600160a01b0316836001600160a01b031603612dcd5760408086015190516001600160a01b0386169180156108fc02916000818181858888f19350505050612dc857816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612da457600080fd5b505af1158015612db8573d6000803e3d6000fd5b5050505050612dc88585856138a4565b6130ea565b600085516001811115612de257612de2614365565b03612f7a576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e529190614c8f565b90508560400151811015612f6957836001600160a01b03166340c10f1930838960400151612e80919061474f565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612ed49190614ccc565b6000604051808303816000865af19150503d8060008114612f11576040519150601f19603f3d011682016040523d82523d6000602084013e612f16565b606091505b50508092505081612f695760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e3a204552433230206d696e74696e67206661696c656400000000006044820152606401610a05565b612f748686866138a4565b506130ea565b600185516001811115612f8f57612f8f614365565b0361309857612fa383858760200151613946565b612dc857602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b17905251918516916130039190614ccc565b6000604051808303816000865af19150503d8060008114613040576040519150601f19603f3d011682016040523d82523d6000602084013e613045565b606091505b50508091505080612dc85760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e3a20455243373231206d696e74696e67206661696c6564000000006044820152606401610a05565b60405162461bcd60e51b815260206004820152602160248201527f546f6b656e3a20756e737570706f7274656420746f6b656e207374616e6461726044820152601960fa1b6064820152608401610a05565b5050505050565b60006109c7825490565b60008151600181111561311057613110614365565b148015613121575060008160400151115b801561312f57506020810151155b80613159575060018151600181111561314a5761314a614365565b14801561315957506040810151155b61099e5760405162461bcd60e51b8152602060048201526013602482015272546f6b656e3a20696e76616c696420696e666f60681b6044820152606401610a05565b6000606081865160018111156131b3576131b3614365565b036132905760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b17905291519185169161321c9190614ccc565b6000604051808303816000865af19150503d8060008114613259576040519150601f19603f3d011682016040523d82523d6000602084013e61325e565b606091505b5090925090508180156132895750805115806132895750808060200190518101906132899190614ce8565b9150613356565b6001865160018111156132a5576132a5614365565b0361309857602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b179052519185169161330e9190614ccc565b6000604051808303816000865af19150503d806000811461334b576040519150601f19603f3d011682016040523d82523d6000602084013e613350565b606091505b50909250505b81610aa057613364866139f1565b613378866001600160a01b03166014613a5e565b61338c866001600160a01b03166014613a5e565b6133a0866001600160a01b03166014613a5e565b6040516020016133b39493929190614d0a565b60408051601f198184030181529082905262461bcd60e51b8252610a0591600401614dc3565b6134496040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b83815260006020820181905250604080820180516001600160a01b039788169052602080890151825190891690820152905146908301528751606084018051918916909152805195909716940193909352935182015292909201516080820152919050565b6134b88282611525565b610b4c576134d0816001600160a01b03166014613a5e565b6134db836020613a5e565b6040516020016133b3929190614df6565b6134f68282611525565b610b4c5760008281526072602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561352e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f71836001600160a01b038416613bfa565b6135918282611525565b15610b4c5760008281526072602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f71836001600160a01b038416613c49565b60005460ff166109a05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a05565b6040805161190160f01b6020808301919091526022820185905260428083018590528351808403909101815260629092019092528051910120600090610f71565b600080600061369b607c5490565b90506136a681612bfc565b925060008660018111156136bc576136bc614365565b0361370b576001600160a01b03851660009081526039602052604090205484106136ec576136e981613d3c565b92505b6001600160a01b0385166000908152603a602052604090205484101591505b50935093915050565b6001600160a01b0381166000908152607b602052604081205461373857600061373b565b60015b60ff1692915050565b60006137536201518042614c33565b6001600160a01b0384166000908152603e60205260409020549091508111156137a2576001600160a01b03929092166000908152603e6020908152604080832094909455603d90529190912055565b6001600160a01b0383166000908152603d6020526040812080548492906137ca908490614c20565b9091555050505050565b60008260000182815481106137eb576137eb6146c0565b9060005260206000200154905092915050565b80516020808301516040808501519051600094612ce7947f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e87649491939192019384526001600160a01b03928316602085015291166040830152606082015260800190565b80516020808301516040808501519051600094612ce7947f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d949193919201614e6b565b600080845160018111156138ba576138ba614365565b036138d5576138ce82848660400151613d54565b90506138fe565b6001845160018111156138ea576138ea614365565b03613098576138ce82848660200151613946565b80610a375761390c846139f1565b613920846001600160a01b03166014613a5e565b613934846001600160a01b03166014613a5e565b6040516020016133b393929190614e96565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928616916139a491614ccc565b6000604051808303816000865af19150503d80600081146139e1576040519150601f19603f3d011682016040523d82523d6000602084013e6139e6565b606091505b509095945050505050565b6060613a1c82600001516001811115613a0c57613a0c614365565b6001600160a01b03166001613a5e565b613a298360200151613e27565b613a368460400151613e27565b604051602001613a4893929190614f27565b6040516020818303038152906040529050919050565b60606000613a6d836002614a00565b613a78906002614c20565b67ffffffffffffffff811115613a9057613a90614558565b6040519080825280601f01601f191660200182016040528015613aba576020820181803683370190505b509050600360fc1b81600081518110613ad557613ad56146c0565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b0457613b046146c0565b60200101906001600160f81b031916908160001a9053506000613b28846002614a00565b613b33906001614c20565b90505b6001811115613bab576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613b6757613b676146c0565b1a60f81b828281518110613b7d57613b7d6146c0565b60200101906001600160f81b031916908160001a90535060049490941c93613ba481614fa5565b9050613b36565b508315610f715760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a05565b6000818152600183016020526040812054613c41575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109c7565b5060006109c7565b60008181526001830160205260408120548015613d32576000613c6d60018361474f565b8554909150600090613c819060019061474f565b9050818114613ce6576000866000018281548110613ca157613ca16146c0565b9060005260206000200154905080876000018481548110613cc457613cc46146c0565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613cf757613cf7614762565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109c7565b60009150506109c7565b6000603854600160385484603754612c149190614a00565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613db19190614ccc565b6000604051808303816000865af19150503d8060008114613dee576040519150601f19603f3d011682016040523d82523d6000602084013e613df3565b606091505b509092509050818015613e1e575080511580613e1e575080806020019051810190613e1e9190614ce8565b95945050505050565b606081600003613e515750506040805180820190915260048152630307830360e41b602082015290565b8160005b8115613e745780613e6581614736565b915050600882901c9150613e55565b610c168482613a5e565b6040805160608101825260008082526020820152908101613eba6040805160608101909152806000815260200160008152602001600081525090565b905290565b600060208284031215613ed157600080fd5b81356001600160e01b031981168114610f7157600080fd5b60008083601f840112613efb57600080fd5b50813567ffffffffffffffff811115613f1357600080fd5b6020830191508360208260051b850101111561166557600080fd5b60008060008060408587031215613f4457600080fd5b843567ffffffffffffffff80821115613f5c57600080fd5b613f6888838901613ee9565b90965094506020870135915080821115613f8157600080fd5b50613f8e87828801613ee9565b95989497509550505050565b60008060008060008060608789031215613fb357600080fd5b863567ffffffffffffffff80821115613fcb57600080fd5b613fd78a838b01613ee9565b90985096506020890135915080821115613ff057600080fd5b613ffc8a838b01613ee9565b9096509450604089013591508082111561401557600080fd5b5061402289828a01613ee9565b979a9699509497509295939492505050565b6001600160a01b038116811461099e57600080fd5b80356117d581614034565b60006020828403121561406657600080fd5b8135610f7181614034565b60006020828403121561408357600080fd5b5035919050565b6000806040838503121561409d57600080fd5b8235915060208301356140af81614034565b809150509250929050565b600060a082840312156140cc57600080fd5b50919050565b600061016082840312156140cc57600080fd5b600080600061018084860312156140fb57600080fd5b61410585856140d2565b925061016084013567ffffffffffffffff8082111561412357600080fd5b818601915086601f83011261413757600080fd5b81358181111561414657600080fd5b87602060608302850101111561415b57600080fd5b6020830194508093505050509250925092565b80606081018310156109c757600080fd5b80608081018310156109c757600080fd5b6000806000806000806000806000806101208b8d0312156141b057600080fd5b6141b98b614049565b99506141c760208c01614049565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b013567ffffffffffffffff8082111561420057600080fd5b61420c8e838f0161416e565b955060e08d013591508082111561422257600080fd5b61422e8e838f0161417f565b94506101008d013591508082111561424557600080fd5b506142528d828e01613ee9565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561427e57600080fd5b823561428981614034565b946020939093013593505050565b600080604083850312156142aa57600080fd5b50508035926020909101359150565b600080602083850312156142cc57600080fd5b823567ffffffffffffffff8111156142e357600080fd5b6142ef85828601613ee9565b90969095509350505050565b6000610160828403121561430e57600080fd5b610f7183836140d2565b6020808252825182820181905260009190848201906040850190845b818110156143595783516001600160a01b031683529284019291840191600101614334565b50909695505050505050565b634e487b7160e01b600052602160045260246000fd5b6002811061099e57634e487b7160e01b600052602160045260246000fd5b815160408201906143a98161437b565b82526020928301516001600160a01b0316929091019190915290565b60008060008060008060006080888a0312156143e057600080fd5b873567ffffffffffffffff808211156143f857600080fd5b6144048b838c01613ee9565b909950975060208a013591508082111561441d57600080fd5b6144298b838c01613ee9565b909750955060408a013591508082111561444257600080fd5b61444e8b838c01613ee9565b909550935060608a013591508082111561446757600080fd5b506144748a828b0161417f565b91505092959891949750929550565b60208082526022908201527f48617350726f787941646d696e3a20756e617574686f72697a65642073656e6460408201526132b960f11b606082015260800190565b6020808252602a908201527f5769746864726177616c4c696d69746174696f6e3a20696e76616c69642061726040820152690e4c2f240d8cadccee8d60b31b606082015260800190565b60208082526029908201527f4d61696e636861696e4761746577617956323a20717565727920666f7220656d60408201526870747920617272617960b81b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561459f57634e487b7160e01b600052604160045260246000fd5b60405290565b6002811061099e57600080fd5b6000606082840312156145c457600080fd5b6145cc61456e565b905081356145d9816145a5565b80825250602082013560208201526040820135604082015292915050565b600060a0828403121561460957600080fd5b61461161456e565b823561461c81614034565b8152602083013561462c81614034565b602082015261463e84604085016145b2565b60408201529392505050565b60006060828403121561465c57600080fd5b6040516060810181811067ffffffffffffffff8211171561468d57634e487b7160e01b600052604160045260246000fd5b604052823560ff811681146146a157600080fd5b8152602083810135908201526040928301359281019290925250919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126146ed57600080fd5b83018035915067ffffffffffffffff82111561470857600080fd5b6020019150600581901b360382131561166557600080fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161474857614748614720565b5060010190565b818103818111156109c7576109c7614720565b634e487b7160e01b600052603160045260246000fd5b8183526000602080850194508260005b858110156147b657813561479b81614034565b6001600160a01b031687529582019590820190600101614788565b509495945050505050565b602081526000610c16602083018486614778565b6000606082840312156147e757600080fd5b6147ef61456e565b905081356147fc81614034565b8152602082013561480c81614034565b806020830152506040820135604082015292915050565b6000610160828403121561483657600080fd5b60405160a0810181811067ffffffffffffffff8211171561486757634e487b7160e01b600052604160045260246000fd5b60405282358152602083013561487c816145a5565b602082015261488e84604085016147d5565b60408201526148a08460a085016147d5565b60608201526148b38461010085016145b2565b60808201529392505050565b60208082526023908201527f4d61696e636861696e4761746577617956323a20696e76616c696420726563656040820152621a5c1d60ea1b606082015260800190565b803561490d81614034565b6001600160a01b03908116835260208201359061492982614034565b166020830152604090810135910152565b60006101808201905083825282356020830152602083013561495b816145a5565b6149648161437b565b8060408401525061497b6060830160408501614902565b61498b60c0830160a08501614902565b61012061010084013561499d816145a5565b6149a68161437b565b81840152830135610140808401919091529092013561016090910152919050565b6000602082840312156149d957600080fd5b8135610f71816145a5565b6000606082840312156149f657600080fd5b610f7183836145b2565b80820281158282048414176109c7576109c7614720565b60208082526023908201527f4d61696e636861696e4761746577617956323a20696e76616c69642072657175604082015262195cdd60ea1b606082015260800190565b6020808252602a908201527f4d61696e636861696e4761746577617956323a20696e76616c696420746f6b656040820152691b881cdd185b99185c9960b21b606082015260800190565b600061018082019050838252825160208301526020830151614ac58161437b565b6040838101919091528381015180516001600160a01b03908116606086015260208201511660808501529081015160a084015250606083015180516001600160a01b0390811660c085015260208201511660e084015260408101516101008401525060808301518051614b378161437b565b6101208401526020810151610140840152604001516101609092019190915292915050565b604081526000614b70604083018688614778565b82810360208401528381526001600160fb1b03841115614b8f57600080fd5b8360051b80866020840137016020019695505050505050565b606081526000614bbc60608301888a614778565b602083820381850152614bd082888a614778565b8481036040860152858152869250810160005b86811015614c11578335614bf6816145a5565b614bff8161437b565b82529282019290820190600101614be3565b509a9950505050505050505050565b808201808211156109c7576109c7614720565b600082614c5057634e487b7160e01b600052601260045260246000fd5b500490565b8681526020810186905260c08101614c6c8661437b565b8560408301528460608301528360808301528260a0830152979650505050505050565b600060208284031215614ca157600080fd5b5051919050565b60005b83811015614cc3578181015183820152602001614cab565b50506000910152565b60008251614cde818460208701614ca8565b9190910192915050565b600060208284031215614cfa57600080fd5b81518015158114610f7157600080fd5b7f546f6b656e3a20636f756c64206e6f74207472616e73666572200000000000008152600085516020614d4382601a8601838b01614ca8565b65010333937b6960d51b601a928501928301528651614d6781838501848b01614ca8565b630103a37960e51b9201818101929092528551614d8a8160248501898501614ca8565b660103a37b5b2b7160cd1b602493909101928301528451614db181602b8501848901614ca8565b91909101602b01979650505050505050565b6020815260008251806020840152614de2816040850160208701614ca8565b601f01601f19169190910160400192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614e2e816017850160208801614ca8565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614e5f816028840160208801614ca8565b01602801949350505050565b84815260808101614e7b8561437b565b84602083015283604083015282606083015295945050505050565b7f546f6b656e3a20636f756c64206e6f74207472616e7366657220000000000000815260008451614ece81601a850160208901614ca8565b630103a37960e51b601a918401918201528451614ef281601e840160208901614ca8565b660103a37b5b2b7160cd1b601e92909101918201528351614f1a816025840160208801614ca8565b0160250195945050505050565b690a8ded6cadc92dcccde560b31b815260008451614f4c81600a850160208901614ca8565b8083019050600b60fa1b80600a8301528551614f6f81600b850160208a01614ca8565b600b9201918201528351614f8a81600c840160208801614ca8565b602960f81b600c9290910191820152600d0195945050505050565b600081614fb457614fb4614720565b50600019019056fea2646970667358221220343b8f6ec981675474498057ee728a0a9b22a69d10c3ac4717e498a59c7fa8d764736f6c63430008110033", - "devdoc": { - "events": { - "BridgeOperatorsReplaced(address[])": { - "details": "Emitted when the bridge operators are replaced" - } - }, - "kind": "dev", - "methods": { - "DOMAIN_SEPARATOR()": { - "details": "Returns the domain seperator." - }, - "checkHighTierVoteWeightThreshold(uint256)": { - "details": "Checks whether the `_voteWeight` passes the high-tier vote weight threshold." - }, - "checkThreshold(uint256)": { - "details": "Checks whether the `_voteWeight` passes the threshold." - }, - "getBridgeOperators()": { - "details": "Returns the bridge operator list." - }, - "getHighTierVoteWeightThreshold()": { - "details": "Returns the high-tier vote weight threshold." - }, - "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." - }, - "getRoninToken(address)": { - "details": "Returns token address on Ronin network. Note: Reverts for unsupported token." - }, - "getThreshold()": { - "details": "Returns the threshold." - }, - "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. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize(address,address,uint256,uint256,uint256,uint256,address[][3],uint256[][4],uint8[])": { - "details": "Initializes contract storage." - }, - "mapTokens(address[],address[],uint8[])": { - "details": "Maps mainchain tokens to Ronin network. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." - }, - "mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])": { - "details": "Maps mainchain tokens to Ronin network and sets thresholds. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." - }, - "minimumVoteWeight()": { - "details": "Returns the minimum vote weight to pass the threshold." - }, - "pause()": { - "details": "Triggers paused state." - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "reachedWithdrawalLimit(address,uint256)": { - "details": "Checks whether the withdrawal reaches the limitation." - }, - "receiveEther()": { - "details": "Receives ether without doing anything. Use this function to topup native token." - }, - "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "replaceBridgeOperators(address[])": { - "details": "Replaces the old bridge operator list by the new one. Requirements: - The method caller is admin. Emitted the event `BridgeOperatorsReplaced`." - }, - "requestDepositFor((address,address,(uint8,uint256,uint256)))": { - "details": "Locks the assets and request deposit." - }, - "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. May emit a {RoleRevoked} event." - }, - "setDailyWithdrawalLimits(address[],uint256[])": { - "details": "Sets daily limit amounts for the withdrawals. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `DailyWithdrawalLimitsUpdated` event." - }, - "setHighTierThresholds(address[],uint256[])": { - "details": "Sets the thresholds for high-tier withdrawals that requires high-tier vote weights. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `HighTierThresholdsUpdated` event." - }, - "setHighTierVoteWeightThreshold(uint256,uint256)": { - "details": "Sets high-tier vote weight threshold and returns the old one. Requirements: - The method caller is admin. - The high-tier vote weight threshold must equal to or larger than the normal threshold. Emits the `HighTierVoteWeightThresholdUpdated` event." - }, - "setLockedThresholds(address[],uint256[])": { - "details": "Sets the amount thresholds to lock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `LockedThresholdsUpdated` event." - }, - "setThreshold(uint256,uint256)": { - "details": "Override `GatewayV2-setThreshold`. Requirements: - The high-tier vote weight threshold must equal to or larger than the normal threshold." - }, - "setUnlockFeePercentages(address[],uint256[])": { - "details": "Sets fee percentages to unlock withdrawal. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `UnlockFeePercentagesUpdated` event." - }, - "setWrappedNativeTokenContract(address)": { - "details": "Sets the wrapped native token contract. Requirements: - The method caller is admin. Emits the `WrappedNativeTokenContractUpdated` event." - }, - "submitWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)),(uint8,bytes32,bytes32)[])": { - "details": "Withdraws based on the receipt and the validator signatures. Returns whether the withdrawal is locked. Emits the `Withdrew` once the assets are released." - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "unlockWithdrawal((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { - "details": "Approves a specific withdrawal. Requirements: - The method caller is a validator. Emits the `Withdrew` once the assets are released." - }, - "unpause()": { - "details": "Triggers unpaused state." - } - }, - "stateVariables": { - "WITHDRAWAL_UNLOCKER_ROLE": { - "details": "Withdrawal unlocker role hash" - }, - "_bridgeOperatorAddedBlock": { - "details": "Mapping from validator address => last block that the bridge operator is added" - }, - "_bridgeOperators": { - "details": "Bridge operators array" - }, - "_domainSeparator": { - "details": "Domain seperator" - }, - "_roninToken": { - "details": "Mapping from mainchain token => token address on Ronin network" - }, - "depositCount": { - "details": "Total deposit" - }, - "roninChainId": { - "details": "Ronin network id" - }, - "withdrawalHash": { - "details": "Mapping from withdrawal id => withdrawal hash" - }, - "withdrawalLocked": { - "details": "Mapping from withdrawal id => locked" - }, - "wrappedNativeToken": { - "details": "Wrapped native token address" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "unlockFeePercentages(address)": { - "notice": "Values 0-1,000,000 map to 0%-100%" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1535, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_paused", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 4326, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_num", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 4328, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_denom", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 4330, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "______deprecated", - "offset": 0, - "slot": "3", - "type": "t_address" - }, - { - "astId": 4332, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "nonce", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 4337, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "______gap", - "offset": 0, - "slot": "5", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 5136, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_highTierVWNum", - "offset": 0, - "slot": "55", - "type": "t_uint256" - }, - { - "astId": 5138, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_highTierVWDenom", - "offset": 0, - "slot": "56", - "type": "t_uint256" - }, - { - "astId": 5143, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "highTierThreshold", - "offset": 0, - "slot": "57", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 5148, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "lockedThreshold", - "offset": 0, - "slot": "58", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 5153, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "unlockFeePercentages", - "offset": 0, - "slot": "59", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 5158, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "dailyWithdrawalLimit", - "offset": 0, - "slot": "60", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 5163, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "lastSyncedWithdrawal", - "offset": 0, - "slot": "61", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 5168, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "lastDateSynced", - "offset": 0, - "slot": "62", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 5173, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "______gap", - "offset": 0, - "slot": "63", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 1373, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_initialized", - "offset": 0, - "slot": "113", - "type": "t_uint8" - }, - { - "astId": 1376, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_initializing", - "offset": 1, - "slot": "113", - "type": "t_bool" - }, - { - "astId": 24, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_roles", - "offset": 0, - "slot": "114", - "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" - }, - { - "astId": 338, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_roleMembers", - "offset": 0, - "slot": "115", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)4026_storage)" - }, - { - "astId": 14214, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "wrappedNativeToken", - "offset": 0, - "slot": "116", - "type": "t_contract(IWETH)10284" - }, - { - "astId": 14217, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "roninChainId", - "offset": 0, - "slot": "117", - "type": "t_uint256" - }, - { - "astId": 14220, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "depositCount", - "offset": 0, - "slot": "118", - "type": "t_uint256" - }, - { - "astId": 14223, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_domainSeparator", - "offset": 0, - "slot": "119", - "type": "t_bytes32" - }, - { - "astId": 14229, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_roninToken", - "offset": 0, - "slot": "120", - "type": "t_mapping(t_address,t_struct(MappedToken)10539_storage)" - }, - { - "astId": 14234, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "withdrawalHash", - "offset": 0, - "slot": "121", - "type": "t_mapping(t_uint256,t_bytes32)" - }, - { - "astId": 14239, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "withdrawalLocked", - "offset": 0, - "slot": "122", - "type": "t_mapping(t_uint256,t_bool)" - }, - { - "astId": 14244, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_bridgeOperatorAddedBlock", - "offset": 0, - "slot": "123", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 14248, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_bridgeOperators", - "offset": 0, - "slot": "124", - "type": "t_array(t_address)dyn_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "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_contract(IWETH)10284": { - "encoding": "inplace", - "label": "contract IWETH", - "numberOfBytes": "20" - }, - "t_enum(Standard)13303": { - "encoding": "inplace", - "label": "enum Token.Standard", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_struct(MappedToken)10539_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct MappedTokenConsumer.MappedToken)", - "numberOfBytes": "32", - "value": "t_struct(MappedToken)10539_storage" - }, - "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_struct(AddressSet)4026_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)4026_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)19_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)19_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_bool)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_uint256,t_bytes32)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => bytes32)", - "numberOfBytes": "32", - "value": "t_bytes32" - }, - "t_struct(AddressSet)4026_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.AddressSet", - "members": [ - { - "astId": 4025, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3725_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(MappedToken)10539_storage": { - "encoding": "inplace", - "label": "struct MappedTokenConsumer.MappedToken", - "members": [ - { - "astId": 10536, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "erc", - "offset": 0, - "slot": "0", - "type": "t_enum(Standard)13303" - }, - { - "astId": 10538, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "tokenAddr", - "offset": 1, - "slot": "0", - "type": "t_address" - } - ], - "numberOfBytes": "32" - }, - "t_struct(RoleData)19_storage": { - "encoding": "inplace", - "label": "struct AccessControl.RoleData", - "members": [ - { - "astId": 16, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 18, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)3725_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.Set", - "members": [ - { - "astId": 3720, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 3724, - "contract": "contracts/mainchain/MainchainGatewayV2.sol:MainchainGatewayV2", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/deployments/goerli-for-devnet/MainchainGatewayV2Proxy.json b/deployments/goerli-for-devnet/MainchainGatewayV2Proxy.json deleted file mode 100644 index 3370519d..00000000 --- a/deployments/goerli-for-devnet/MainchainGatewayV2Proxy.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "functionDelegateCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "receipt": { - "to": null, - "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "contractAddress": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "transactionIndex": 35, - "gasUsed": "1539667", - "logsBloom": "0x0020000400020000000000000000400040000000900000001a0000000000000000000000000000000000000022000200000180000000000000000000000c04008000000000100000000000000000020000000000000c0000000400000000000000000000020000000000000000000800000001800000000000000000000000000000000000100000000000000000000020000000000080000000000000800001000000000000041000010000200400480400000000000028001000000000000040200020000020000000000000440000000000000420000106000000000060008000100000000008000008000000000000000000000000008000200000000000", - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2", - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "logs": [ - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000f54513b9c15857b4562893d3b2cba5486ca67d55" - ], - "data": "0x", - "logIndex": 78, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", - "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07" - ], - "data": "0x", - "logIndex": 79, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x9d2334c23be647e994f27a72c5eee42a43d5bdcfe15bb88e939103c2b114cbaf" - ], - "data": "0x000000000000000000000000fe63586e65eccaf7a41b1b6d05384a9ca1b246a8", - "logIndex": 80, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000046", - "0x0000000000000000000000000000000000000000000000000000000000000064" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 81, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x31312c97b89cc751b832d98fd459b967a2c3eef3b49757d1cf5ebaa12bb6eee1", - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000000000000000000000000000000000000000005a", - "0x0000000000000000000000000000000000000000000000000000000000000064" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 82, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0xa4f03cc9c0e0aeb5b71b4ec800702753f65748c2cf3064695ba8e8b46be70444" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe63586e65eccaf7a41b1b6d05384a9ca1b246a80000000000000000000000008816bde63a8a08b90477dc5a5fe24efaf5889cdc00000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000007a2938588c3616bd2fcc46917bd18edfbad69e48000000000000000000000000000000000000000000000000000000000000000400000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000003c4e17b9056272ce1b49f6900d8cfd6171a1869d00000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad2000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f7700000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 83, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x80bc635c452ae67f12f9b6f12ad4daa6dbbc04eeb9ebb87d354ce10c0e210dc0" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe63586e65eccaf7a41b1b6d05384a9ca1b246a80000000000000000000000008816bde63a8a08b90477dc5a5fe24efaf5889cdc00000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000007a2938588c3616bd2fcc46917bd18edfbad69e4800000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000001e87f85809dc00000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000004e2000000000000000000000000000000000000000000000000000000000001e8480", - "logIndex": 84, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x64557254143204d91ba2d95acb9fda1e5fea55f77efd028685765bc1e94dd4b5" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe63586e65eccaf7a41b1b6d05384a9ca1b246a80000000000000000000000008816bde63a8a08b90477dc5a5fe24efaf5889cdc00000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000007a2938588c3616bd2fcc46917bd18edfbad69e4800000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000002dcbf4840eca000000000000000000000000000000000000000000000000000029a2241af62c0000000000000000000000000000000000000000000000000000000000000000753000000000000000000000000000000000000000000000000000000000002dc6c0", - "logIndex": 85, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0xb05f5de88ae0294ebb6f67c5af2fcbbd593cc6bdfe543e2869794a4c8ce3ea50" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe63586e65eccaf7a41b1b6d05384a9ca1b246a80000000000000000000000008816bde63a8a08b90477dc5a5fe24efaf5889cdc00000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000007a2938588c3616bd2fcc46917bd18edfbad69e480000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a", - "logIndex": 86, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0xb5d2963614d72181b4df1f993d45b83edf42fa19710f0204217ba1b3e183bb73" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe63586e65eccaf7a41b1b6d05384a9ca1b246a80000000000000000000000008816bde63a8a08b90477dc5a5fe24efaf5889cdc00000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000007a2938588c3616bd2fcc46917bd18edfbad69e4800000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000009b83e75db609db000000000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000003308081d4000000000000000000000000000000000000000000000000000000003b9aca00", - "logIndex": 87, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x5e5712e902fff5e704bc4d506ad976718319e019e9d2a872528a01a85db433e4", - "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07", - "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07" - ], - "data": "0x", - "logIndex": 88, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 89, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - }, - { - "transactionIndex": 35, - "blockNumber": 8500561, - "transactionHash": "0xb50e4ec9c1ed4f01209767a6326934296b618aff4c14cb601bebf42d4d82768a", - "address": "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b290e3276e86327af217ea0f40fef53f1b34d3ac", - "logIndex": 90, - "blockHash": "0x344671001fda352caacc41f0042c7295115e10982c5c565e94e66bd4ce7f4fb2" - } - ], - "blockNumber": 8500561, - "cumulativeGasUsed": "11467944", - "status": 1, - "byzantium": true - }, - "args": [ - "0xF54513B9C15857b4562893D3b2cBa5486ca67D55", - "0xb290E3276E86327AF217eA0F40fEf53f1b34D3Ac", - "0x504af48c000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07000000000000000000000000fe63586e65eccaf7a41b1b6d05384a9ca1b246a800000000000000000000000000000000000000000000000000000000000007e60000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe63586e65eccaf7a41b1b6d05384a9ca1b246a80000000000000000000000008816bde63a8a08b90477dc5a5fe24efaf5889cdc00000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000007a2938588c3616bd2fcc46917bd18edfbad69e48000000000000000000000000000000000000000000000000000000000000000400000000000000000000000029c6f8349a028e1bdfc68bfa08bdee7bc5d47e160000000000000000000000003c4e17b9056272ce1b49f6900d8cfd6171a1869d00000000000000000000000082f5483623d636bc3deba8ae67e1751b6cf2bad2000000000000000000000000067fbff8990c58ab90bae3c97241c5d736053f770000000000000000000000000000000000000000000000000000000000000001000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c070000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000001e87f85809dc00000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000004e2000000000000000000000000000000000000000000000000000000000001e848000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000002dcbf4840eca000000000000000000000000000000000000000000000000000029a2241af62c0000000000000000000000000000000000000000000000000000000000000000753000000000000000000000000000000000000000000000000000000000002dc6c00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000009b83e75db609db000000000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000003308081d4000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "a595501ecf8849639d4423c21e560992", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405260405162000f5f38038062000f5f83398101604081905262000026916200048d565b8282828281620000398282600062000053565b506200004790508262000090565b505050505050620005c0565b6200005e83620000eb565b6000825111806200006c5750805b156200008b576200008983836200012d60201b620002911760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000bb6200015c565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e88162000195565b50565b620000f6816200024a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000155838360405180606001604052806027815260200162000f3860279139620002fe565b9392505050565b60006200018660008051602062000f1883398151915260001b620003e460201b6200024d1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002005760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200022960008051602062000f1883398151915260001b620003e460201b6200024d1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200026081620003e760201b620002bd1760201c565b620002c45760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001f7565b80620002297f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b620003e460201b6200024d1760201c565b60606001600160a01b0384163b620003685760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001f7565b600080856001600160a01b0316856040516200038591906200056d565b600060405180830381855af49150503d8060008114620003c2576040519150601f19603f3d011682016040523d82523d6000602084013e620003c7565b606091505b509092509050620003da828286620003f6565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200040757508162000155565b825115620004185782518084602001fd5b8160405162461bcd60e51b8152600401620001f791906200058b565b80516001600160a01b03811681146200044c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004845781810151838201526020016200046a565b50506000910152565b600080600060608486031215620004a357600080fd5b620004ae8462000434565b9250620004be6020850162000434565b60408501519092506001600160401b0380821115620004dc57600080fd5b818601915086601f830112620004f157600080fd5b81518181111562000506576200050662000451565b604051601f8201601f19908116603f0116810190838211818310171562000531576200053162000451565b816040528281528960208487010111156200054b57600080fd5b6200055e83602083016020880162000467565b80955050505050509250925092565b600082516200058181846020870162000467565b9190910192915050565b6020815260008251806020840152620005ac81604085016020870162000467565b601f01601f19169190910160400192915050565b61094880620005d06000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610713565b610136565b61006661009e366004610744565b610173565b6100666100b13660046107f5565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610713565b610250565b34801561011357600080fd5b506100cb610270565b6101246102cc565b61013461012f610361565b61036b565b565b61013e61038a565b6001600160a01b0316330361016b57610168816040518060200160405280600081525060006103bd565b50565b61016861011c565b61017b61038a565b6001600160a01b0316330361016b576000610194610361565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061038a565b6001600160a01b03163303610217576102128383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103bd915050565b505050565b61021261011c565b600061022961038a565b6001600160a01b0316330361024557610240610361565b905090565b61024d61011c565b90565b61025861038a565b6001600160a01b0316330361016b57610168816103e8565b600061027a61038a565b6001600160a01b031633036102455761024061038a565b60606102b683836040518060600160405280602781526020016108ec6027913961043c565b9392505050565b6001600160a01b03163b151590565b6102d461038a565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610519565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103c683610541565b6000825111806103d35750805b15610212576103e28383610291565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61041161038a565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610581565b60606001600160a01b0384163b6104a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610358565b600080856001600160a01b0316856040516104bf919061089c565b600060405180830381855af49150503d80600081146104fa576040519150601f19603f3d011682016040523d82523d6000602084013e6104ff565b606091505b509150915061050f82828661062a565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103ae565b61054a81610663565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105e65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610358565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156106395750816102b6565b8251156106495782518084602001fd5b8160405162461bcd60e51b815260040161035891906108b8565b6001600160a01b0381163b6106d05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610358565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610609565b80356001600160a01b038116811461070e57600080fd5b919050565b60006020828403121561072557600080fd5b6102b6826106f7565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561075657600080fd5b813567ffffffffffffffff8082111561076e57600080fd5b818401915084601f83011261078257600080fd5b8135818111156107945761079461072e565b604051601f8201601f19908116603f011681019083821181831017156107bc576107bc61072e565b816040528281528760208487010111156107d557600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060006040848603121561080a57600080fd5b610813846106f7565b9250602084013567ffffffffffffffff8082111561083057600080fd5b818601915086601f83011261084457600080fd5b81358181111561085357600080fd5b87602082850101111561086557600080fd5b6020830194508093505050509250925092565b60005b8381101561089357818101518382015260200161087b565b50506000910152565b600082516108ae818460208701610878565b9190910192915050565b60208152600082518060208401526108d7816040850160208701610878565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bebb3300d99b476bd2f64bbccc422fc4bd31a9389ff1c675d867f0aac8101a5664736f6c63430008110033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610713565b610136565b61006661009e366004610744565b610173565b6100666100b13660046107f5565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610713565b610250565b34801561011357600080fd5b506100cb610270565b6101246102cc565b61013461012f610361565b61036b565b565b61013e61038a565b6001600160a01b0316330361016b57610168816040518060200160405280600081525060006103bd565b50565b61016861011c565b61017b61038a565b6001600160a01b0316330361016b576000610194610361565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061038a565b6001600160a01b03163303610217576102128383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103bd915050565b505050565b61021261011c565b600061022961038a565b6001600160a01b0316330361024557610240610361565b905090565b61024d61011c565b90565b61025861038a565b6001600160a01b0316330361016b57610168816103e8565b600061027a61038a565b6001600160a01b031633036102455761024061038a565b60606102b683836040518060600160405280602781526020016108ec6027913961043c565b9392505050565b6001600160a01b03163b151590565b6102d461038a565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610519565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103c683610541565b6000825111806103d35750805b15610212576103e28383610291565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61041161038a565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610581565b60606001600160a01b0384163b6104a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610358565b600080856001600160a01b0316856040516104bf919061089c565b600060405180830381855af49150503d80600081146104fa576040519150601f19603f3d011682016040523d82523d6000602084013e6104ff565b606091505b509150915061050f82828661062a565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103ae565b61054a81610663565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105e65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610358565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156106395750816102b6565b8251156106495782518084602001fd5b8160405162461bcd60e51b815260040161035891906108b8565b6001600160a01b0381163b6106d05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610358565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610609565b80356001600160a01b038116811461070e57600080fd5b919050565b60006020828403121561072557600080fd5b6102b6826106f7565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561075657600080fd5b813567ffffffffffffffff8082111561076e57600080fd5b818401915084601f83011261078257600080fd5b8135818111156107945761079461072e565b604051601f8201601f19908116603f011681019083821181831017156107bc576107bc61072e565b816040528281528760208487010111156107d557600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060006040848603121561080a57600080fd5b610813846106f7565b9250602084013567ffffffffffffffff8082111561083057600080fd5b818601915086601f83011261084457600080fd5b81358181111561085357600080fd5b87602082850101111561086557600080fd5b6020830194508093505050509250925092565b60005b8381101561089357818101518382015260200161087b565b50506000910152565b600082516108ae818460208701610878565b9190910192915050565b60208152600082518060208401526108d7816040850160208701610878565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bebb3300d99b476bd2f64bbccc422fc4bd31a9389ff1c675d867f0aac8101a5664736f6c63430008110033", - "devdoc": { - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "changeAdmin(address)": { - "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." - }, - "functionDelegateCall(bytes)": { - "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/deployments/goerli-for-devnet/MainchainGovernanceAdmin.json b/deployments/goerli-for-devnet/MainchainGovernanceAdmin.json deleted file mode 100644 index ea8c254d..00000000 --- a/deployments/goerli-for-devnet/MainchainGovernanceAdmin.json +++ /dev/null @@ -1,1786 +0,0 @@ -{ - "address": "0xb290E3276E86327AF217eA0F40fEf53f1b34D3Ac", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_roninChainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_roleSetter", - "type": "address" - }, - { - "internalType": "address", - "name": "_roninTrustedOrganizationContract", - "type": "address" - }, - { - "internalType": "address", - "name": "_bridgeContract", - "type": "address" - }, - { - "internalType": "address[]", - "name": "_relayers", - "type": "address[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ErrCallerMustBeBridgeContract", - "type": "error" - }, - { - "inputs": [], - "name": "ErrCallerMustBeRoninTrustedOrgContract", - "type": "error" - }, - { - "inputs": [], - "name": "ErrZeroCodeContract", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "BridgeContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "indexed": false, - "internalType": "struct Proposal.ProposalDetail", - "name": "proposal", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "globalProposalHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "indexed": false, - "internalType": "struct GlobalProposal.GlobalProposalDetail", - "name": "globalProposal", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "address", - "name": "creator", - "type": "address" - } - ], - "name": "GlobalProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - } - ], - "name": "ProposalApproved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "indexed": false, - "internalType": "struct Proposal.ProposalDetail", - "name": "proposal", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "address", - "name": "creator", - "type": "address" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool[]", - "name": "successCalls", - "type": "bool[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "returnDatas", - "type": "bytes[]" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - } - ], - "name": "ProposalExpired", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - } - ], - "name": "ProposalRejected", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "proposalHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum Ballot.VoteType", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - } - ], - "name": "ProposalVoted", - "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": false, - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "RoninTrustedOrganizationContractUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RELAYER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_period", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_epoch", - "type": "uint256" - } - ], - "name": "bridgeOperatorsRelayed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "_newAdmin", - "type": "address" - } - ], - "name": "changeProxyAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getProposalExpiryDuration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_proxy", - "type": "address" - } - ], - "name": "getProxyAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_proxy", - "type": "address" - } - ], - "name": "getProxyImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "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": "lastSyncedBridgeOperatorSetInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "period", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "operators", - "type": "address[]" - } - ], - "internalType": "struct BridgeOperatorsBallot.BridgeOperatorSet", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "proposalRelayed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "period", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "operators", - "type": "address[]" - } - ], - "internalType": "struct BridgeOperatorsBallot.BridgeOperatorSet", - "name": "_ballot", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "_signatures", - "type": "tuple[]" - } - ], - "name": "relayBridgeOperators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "enum GlobalProposal.TargetOption[]", - "name": "targetOptions", - "type": "uint8[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "internalType": "struct GlobalProposal.GlobalProposalDetail", - "name": "_globalProposal", - "type": "tuple" - }, - { - "internalType": "enum Ballot.VoteType[]", - "name": "_supports", - "type": "uint8[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "_signatures", - "type": "tuple[]" - } - ], - "name": "relayGlobalProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "uint256[]", - "name": "gasAmounts", - "type": "uint256[]" - } - ], - "internalType": "struct Proposal.ProposalDetail", - "name": "_proposal", - "type": "tuple" - }, - { - "internalType": "enum Ballot.VoteType[]", - "name": "_supports", - "type": "uint8[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct SignatureConsumer.Signature[]", - "name": "_signatures", - "type": "tuple[]" - } - ], - "name": "relayProposal", - "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": [], - "name": "roninChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "roninTrustedOrganizationContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "round", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "setBridgeContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_expiryDuration", - "type": "uint256" - } - ], - "name": "setProposalExpiryDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "setRoninTrustedOrganizationContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "vote", - "outputs": [ - { - "internalType": "enum VoteStatusConsumer.VoteStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "againstVoteWeight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVoteWeight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x8b1c9e837cca2b387fefa8e9bffe02bb812355398af95c0cb4d2234cd1a1e5bc", - "receipt": { - "to": null, - "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "contractAddress": "0xb290E3276E86327AF217eA0F40fEf53f1b34D3Ac", - "transactionIndex": 89, - "gasUsed": "4203082", - "logsBloom": "0x000000044000000000000100000000000000000000000000000000000000000000000000900000000000000020000000000000000000000000000000000000000004000000000000000000000000000000000000000800000000000000000000000000000200000004000000000008000000000000000000000c0000000000000000000000000000000200000000000000000000000000000000000000001000000000000000000100000000000000080000000000000000001000000000000000000000800000000000000000000000000000000000000100000000002020000000000000000000000000000000000000000000000000000002100000000000", - "blockHash": "0xae30f38abaf28d4f85b41ade352dcb0d0e135f093d058f01a86d6ce5d824c1ca", - "transactionHash": "0x8b1c9e837cca2b387fefa8e9bffe02bb812355398af95c0cb4d2234cd1a1e5bc", - "logs": [ - { - "transactionIndex": 89, - "blockNumber": 8500558, - "transactionHash": "0x8b1c9e837cca2b387fefa8e9bffe02bb812355398af95c0cb4d2234cd1a1e5bc", - "address": "0xb290E3276E86327AF217eA0F40fEf53f1b34D3Ac", - "topics": [ - "0xfd6f5f93d69a07c593a09be0b208bff13ab4ffd6017df3b33433d63bdc59b4d7" - ], - "data": "0x000000000000000000000000a53d0a2dac70d1fd3d9677c40636a7b50da4ab49", - "logIndex": 216, - "blockHash": "0xae30f38abaf28d4f85b41ade352dcb0d0e135f093d058f01a86d6ce5d824c1ca" - }, - { - "transactionIndex": 89, - "blockNumber": 8500558, - "transactionHash": "0x8b1c9e837cca2b387fefa8e9bffe02bb812355398af95c0cb4d2234cd1a1e5bc", - "address": "0xb290E3276E86327AF217eA0F40fEf53f1b34D3Ac", - "topics": [ - "0x5cbd8a0bb00196365d5eb3457c6734e7f06666c3c78e5469b4c9deec7edae048" - ], - "data": "0x00000000000000000000000010bdc48820e0853472a9c6f96e2c0819486ec0de", - "logIndex": 217, - "blockHash": "0xae30f38abaf28d4f85b41ade352dcb0d0e135f093d058f01a86d6ce5d824c1ca" - }, - { - "transactionIndex": 89, - "blockNumber": 8500558, - "transactionHash": "0x8b1c9e837cca2b387fefa8e9bffe02bb812355398af95c0cb4d2234cd1a1e5bc", - "address": "0xb290E3276E86327AF217eA0F40fEf53f1b34D3Ac", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000c37b5d7891d73f2064b0ee044844e053872ef941", - "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07" - ], - "data": "0x", - "logIndex": 218, - "blockHash": "0xae30f38abaf28d4f85b41ade352dcb0d0e135f093d058f01a86d6ce5d824c1ca" - }, - { - "transactionIndex": 89, - "blockNumber": 8500558, - "transactionHash": "0x8b1c9e837cca2b387fefa8e9bffe02bb812355398af95c0cb4d2234cd1a1e5bc", - "address": "0xb290E3276E86327AF217eA0F40fEf53f1b34D3Ac", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0xe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4", - "0x000000000000000000000000c37b5d7891d73f2064b0ee044844e053872ef941", - "0x000000000000000000000000968d0cd7343f711216817e617d3f92a23dc91c07" - ], - "data": "0x", - "logIndex": 219, - "blockHash": "0xae30f38abaf28d4f85b41ade352dcb0d0e135f093d058f01a86d6ce5d824c1ca" - } - ], - "blockNumber": 8500558, - "cumulativeGasUsed": "27345302", - "status": 1, - "byzantium": true - }, - "args": [ - 2022, - "0xC37b5d7891D73F2064B0eE044844e053872Ef941", - "0xA53D0a2dAC70D1fD3D9677c40636A7b50da4aB49", - "0x10bdC48820E0853472A9c6f96e2c0819486ec0de", - [ - "0xC37b5d7891D73F2064B0eE044844e053872Ef941" - ] - ], - "numDeployments": 1, - "solcInputHash": "a595501ecf8849639d4423c21e560992", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_roninChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_roninTrustedOrganizationContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridgeContract\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_relayers\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrCallerMustBeBridgeContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrCallerMustBeRoninTrustedOrgContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"BridgeContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"globalProposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"globalProposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"GlobalProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"proposal\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"ProposalCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool[]\",\"name\":\"successCalls\",\"type\":\"bool[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"returnDatas\",\"type\":\"bytes[]\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalExpired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\",\"name\":\"support\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"name\":\"ProposalVoted\",\"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\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"RoninTrustedOrganizationContractUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RELAYER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_period\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"bridgeOperatorsRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newAdmin\",\"type\":\"address\"}],\"name\":\"changeProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProposalExpiryDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"lastSyncedBridgeOperatorSetInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"internalType\":\"struct BridgeOperatorsBallot.BridgeOperatorSet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"proposalRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"internalType\":\"struct BridgeOperatorsBallot.BridgeOperatorSet\",\"name\":\"_ballot\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayBridgeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"enum GlobalProposal.TargetOption[]\",\"name\":\"targetOptions\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"name\":\"_globalProposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"_supports\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayGlobalProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"gasAmounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct Proposal.ProposalDetail\",\"name\":\"_proposal\",\"type\":\"tuple\"},{\"internalType\":\"enum Ballot.VoteType[]\",\"name\":\"_supports\",\"type\":\"uint8[]\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"struct SignatureConsumer.Signature[]\",\"name\":\"_signatures\",\"type\":\"tuple[]\"}],\"name\":\"relayProposal\",\"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\":[],\"name\":\"roninChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roninTrustedOrganizationContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"round\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setBridgeContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_expiryDuration\",\"type\":\"uint256\"}],\"name\":\"setProposalExpiryDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setRoninTrustedOrganizationContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"againstVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"forVoteWeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiryTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"ErrCallerMustBeBridgeContract()\":[{\"details\":\"Error of method caller must be bridge contract.\"}],\"ErrCallerMustBeRoninTrustedOrgContract()\":[{\"details\":\"Error of method caller must be Ronin trusted org contract.\"}],\"ErrZeroCodeContract()\":[{\"details\":\"Error of set to non-contract.\"}]},\"kind\":\"dev\",\"methods\":{\"bridgeContract()\":{\"details\":\"Returns the bridge contract.\"},\"bridgeOperatorsRelayed(uint256,uint256)\":{\"details\":\"Returns whether the voter `_voter` casted vote for bridge operators at a specific period.\"},\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `_proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `_proxy`.\"},\"getProposalExpiryDuration()\":{\"details\":\"Returns the proposal expiry duration.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `_proxy`. Requirements: - This contract must be the admin of `_proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `_proxy`. Requirements: - This contract must be the admin of `_proxy`.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"lastSyncedBridgeOperatorSetInfo()\":{\"details\":\"Returns the synced bridge operator set info.\"},\"proposalRelayed(uint256,uint256)\":{\"details\":\"Returns whether the voter `_voter` casted vote for the proposal.\"},\"relayBridgeOperators((uint256,uint256,address[]),(uint8,bytes32,bytes32)[])\":{\"details\":\"See `BOsGovernanceRelay-_relayVotesBySignatures`. Requirements: - The method caller is relayer.\"},\"relayGlobalProposal((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is relayer.\"},\"relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\":{\"details\":\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is relayer.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"roninTrustedOrganizationContract()\":{\"details\":\"Returns the ronin trusted organization contract.\"},\"setBridgeContract(address)\":{\"details\":\"Sets the bridge contract. Requirements: - The method caller is admin. - The new address is a contract. Emits the event `BridgeContractUpdated`.\"},\"setProposalExpiryDuration(uint256)\":{\"details\":\"Sets the expiry duration for a new proposal. Requirements: - Only allowing self-call to this method, since this contract does not have admin.\"},\"setRoninTrustedOrganizationContract(address)\":{\"details\":\"Sets the ronin trusted organization contract. Requirements: - The method caller is admin. - The new address is a contract. Emits the event `RoninTrustedOrganizationContractUpdated`.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"round(uint256)\":{\"notice\":\"chain id = 0 for global proposal\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/mainchain/MainchainGovernanceAdmin.sol\":\"MainchainGovernanceAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"contracts/extensions/GovernanceAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../extensions/sequential-governance/CoreGovernance.sol\\\";\\nimport \\\"../extensions/collections/HasRoninTrustedOrganizationContract.sol\\\";\\nimport \\\"../extensions/collections/HasBridgeContract.sol\\\";\\nimport \\\"../interfaces/IRoninTrustedOrganization.sol\\\";\\n\\nabstract contract GovernanceAdmin is CoreGovernance, HasRoninTrustedOrganizationContract, HasBridgeContract {\\n uint256 public roninChainId;\\n /// @dev Domain separator\\n bytes32 public DOMAIN_SEPARATOR;\\n\\n modifier onlySelfCall() {\\n require(msg.sender == address(this), \\\"GovernanceAdmin: only allowed self-call\\\");\\n _;\\n }\\n\\n constructor(\\n uint256 _roninChainId,\\n address _roninTrustedOrganizationContract,\\n address _bridgeContract,\\n uint256 _proposalExpiryDuration\\n ) CoreGovernance(_proposalExpiryDuration) {\\n roninChainId = _roninChainId;\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,bytes32 salt)\\\"),\\n keccak256(\\\"GovernanceAdmin\\\"), // name hash\\n keccak256(\\\"2\\\"), // version hash\\n keccak256(abi.encode(\\\"RONIN_GOVERNANCE_ADMIN\\\", _roninChainId)) // salt\\n )\\n );\\n _setRoninTrustedOrganizationContract(_roninTrustedOrganizationContract);\\n _setBridgeContract(_bridgeContract);\\n }\\n\\n /**\\n * @inheritdoc IHasRoninTrustedOrganizationContract\\n */\\n function setRoninTrustedOrganizationContract(address _addr) external override onlySelfCall {\\n require(_addr.code.length > 0, \\\"GovernanceAdmin: set to non-contract\\\");\\n _setRoninTrustedOrganizationContract(_addr);\\n }\\n\\n /**\\n * @inheritdoc IHasBridgeContract\\n */\\n function setBridgeContract(address _addr) external override onlySelfCall {\\n require(_addr.code.length > 0, \\\"GovernanceAdmin: set to non-contract\\\");\\n _setBridgeContract(_addr);\\n }\\n\\n /**\\n * @dev Sets the expiry duration for a new proposal.\\n *\\n * Requirements:\\n * - Only allowing self-call to this method, since this contract does not have admin.\\n *\\n */\\n function setProposalExpiryDuration(uint256 _expiryDuration) external onlySelfCall {\\n _setProposalExpiryDuration(_expiryDuration);\\n }\\n\\n /**\\n * @dev Returns the current implementation of `_proxy`.\\n *\\n * Requirements:\\n * - This contract must be the admin of `_proxy`.\\n *\\n */\\n function getProxyImplementation(address _proxy) external view returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"implementation()\\\")) == 0x5c60da1b\\n (bool _success, bytes memory _returndata) = _proxy.staticcall(hex\\\"5c60da1b\\\");\\n require(_success, \\\"GovernanceAdmin: proxy call `implementation()` failed\\\");\\n return abi.decode(_returndata, (address));\\n }\\n\\n /**\\n * @dev Returns the proposal expiry duration.\\n */\\n function getProposalExpiryDuration() external view returns (uint256) {\\n return super._getProposalExpiryDuration();\\n }\\n\\n /**\\n * @dev Returns the current admin of `_proxy`.\\n *\\n * Requirements:\\n * - This contract must be the admin of `_proxy`.\\n *\\n */\\n function getProxyAdmin(address _proxy) external view returns (address) {\\n // We need to manually run the static call since the getter cannot be flagged as view\\n // bytes4(keccak256(\\\"admin()\\\")) == 0xf851a440\\n (bool _success, bytes memory _returndata) = _proxy.staticcall(hex\\\"f851a440\\\");\\n require(_success, \\\"GovernanceAdmin: proxy call `admin()` failed\\\");\\n return abi.decode(_returndata, (address));\\n }\\n\\n /**\\n * @dev Changes the admin of `_proxy` to `newAdmin`.\\n *\\n * Requirements:\\n * - This contract must be the current admin of `_proxy`.\\n *\\n */\\n function changeProxyAdmin(address _proxy, address _newAdmin) external onlySelfCall {\\n // bytes4(keccak256(\\\"changeAdmin(address)\\\"))\\n (bool _success, ) = _proxy.call(abi.encodeWithSelector(0x8f283970, _newAdmin));\\n require(_success, \\\"GovernanceAdmin: proxy call `changeAdmin(address)` failed\\\");\\n }\\n\\n /**\\n * @dev Override `CoreGovernance-_getMinimumVoteWeight`.\\n */\\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\\n abi.encodeWithSelector(\\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\\n 0x4bb5274a,\\n abi.encodeWithSelector(IQuorum.minimumVoteWeight.selector)\\n )\\n );\\n require(_success, \\\"GovernanceAdmin: proxy call `minimumVoteWeight()` failed\\\");\\n return abi.decode(_returndata, (uint256));\\n }\\n\\n /**\\n * @dev Override `CoreGovernance-_getTotalWeights`.\\n */\\n function _getTotalWeights() internal view virtual override returns (uint256) {\\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\\n abi.encodeWithSelector(\\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\\n 0x4bb5274a,\\n abi.encodeWithSelector(IRoninTrustedOrganization.totalWeights.selector)\\n )\\n );\\n require(_success, \\\"GovernanceAdmin: proxy call `totalWeights()` failed\\\");\\n return abi.decode(_returndata, (uint256));\\n }\\n}\\n\",\"keccak256\":\"0xe7ff3968824b74d4c49a5861adafde78763992801fe316cbe751198c47654e0b\",\"license\":\"MIT\"},\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasBridgeContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasBridgeContract.sol\\\";\\nimport \\\"../../interfaces/IBridge.sol\\\";\\n\\ncontract HasBridgeContract is IHasBridgeContract, HasProxyAdmin {\\n IBridge internal _bridgeContract;\\n\\n modifier onlyBridgeContract() {\\n if (bridgeContract() != msg.sender) revert ErrCallerMustBeBridgeContract();\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasBridgeContract\\n */\\n function bridgeContract() public view override returns (address) {\\n return address(_bridgeContract);\\n }\\n\\n /**\\n * @inheritdoc IHasBridgeContract\\n */\\n function setBridgeContract(address _addr) external virtual override onlyAdmin {\\n if (_addr.code.length <= 0) revert ErrZeroCodeContract();\\n _setBridgeContract(_addr);\\n }\\n\\n /**\\n * @dev Sets the bridge contract.\\n *\\n * Emits the event `BridgeContractUpdated`.\\n *\\n */\\n function _setBridgeContract(address _addr) internal {\\n _bridgeContract = IBridge(_addr);\\n emit BridgeContractUpdated(_addr);\\n }\\n}\\n\",\"keccak256\":\"0x6fabd1a69eb4391793a28f0d5449f4662b7e7eaf3d9ca87554ccbc77e2b099f9\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == _getAdmin(), \\\"HasProxyAdmin: unauthorized sender\\\");\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x0c2fcf25290180e8cd733691b113464cdde671dc019e6c343e9eb3e16c6ca24a\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasRoninTrustedOrganizationContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasRoninTrustedOrganizationContract.sol\\\";\\nimport \\\"../../interfaces/IRoninTrustedOrganization.sol\\\";\\n\\ncontract HasRoninTrustedOrganizationContract is IHasRoninTrustedOrganizationContract, HasProxyAdmin {\\n IRoninTrustedOrganization internal _roninTrustedOrganizationContract;\\n\\n modifier onlyRoninTrustedOrganizationContract() {\\n if (roninTrustedOrganizationContract() != msg.sender) revert ErrCallerMustBeRoninTrustedOrgContract();\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasRoninTrustedOrganizationContract\\n */\\n function roninTrustedOrganizationContract() public view override returns (address) {\\n return address(_roninTrustedOrganizationContract);\\n }\\n\\n /**\\n * @inheritdoc IHasRoninTrustedOrganizationContract\\n */\\n function setRoninTrustedOrganizationContract(address _addr) external virtual override onlyAdmin {\\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\\n _setRoninTrustedOrganizationContract(_addr);\\n }\\n\\n /**\\n * @dev Sets the ronin trusted organization contract.\\n *\\n * Emits the event `RoninTrustedOrganizationContractUpdated`.\\n *\\n */\\n function _setRoninTrustedOrganizationContract(address _addr) internal {\\n _roninTrustedOrganizationContract = IRoninTrustedOrganization(_addr);\\n emit RoninTrustedOrganizationContractUpdated(_addr);\\n }\\n}\\n\",\"keccak256\":\"0x951fd730f4853d8c932da5484ea093f3094c8186735b603d31fb53035c395751\",\"license\":\"MIT\"},\"contracts/extensions/isolated-governance/IsolatedGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\n\\nabstract contract IsolatedGovernance is VoteStatusConsumer {\\n struct IsolatedVote {\\n VoteStatus status;\\n bytes32 finalHash;\\n /// @dev Mapping from voter => receipt hash\\n mapping(address => bytes32) voteHashOf;\\n /// @dev Mapping from receipt hash => vote weight\\n mapping(bytes32 => uint256) weight;\\n /// @dev The timestamp that voting is expired (no expiration=0)\\n uint256 expiredAt;\\n /// @dev The timestamp that voting is created\\n uint256 createdAt;\\n }\\n\\n /**\\n * @dev Casts vote for the receipt with the receipt hash `_hash`.\\n *\\n * Requirements:\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n */\\n function _castVote(\\n IsolatedVote storage _proposal,\\n address _voter,\\n uint256 _voterWeight,\\n uint256 _minimumVoteWeight,\\n bytes32 _hash\\n ) internal virtual returns (VoteStatus _status) {\\n if (_proposal.expiredAt > 0 && _proposal.expiredAt <= block.timestamp) {\\n _proposal.status = VoteStatus.Expired;\\n return _proposal.status;\\n }\\n\\n if (_voted(_proposal, _voter)) {\\n revert(\\n string(abi.encodePacked(\\\"IsolatedGovernance: \\\", Strings.toHexString(uint160(_voter), 20), \\\" already voted\\\"))\\n );\\n }\\n\\n // Record for voter\\n _proposal.voteHashOf[_voter] = _hash;\\n // Increase vote weight\\n uint256 _weight = _proposal.weight[_hash] += _voterWeight;\\n\\n if (_weight >= _minimumVoteWeight && _proposal.status == VoteStatus.Pending) {\\n _proposal.status = VoteStatus.Approved;\\n _proposal.finalHash = _hash;\\n }\\n\\n _status = _proposal.status;\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function _voted(IsolatedVote storage _proposal, address _voter) internal view virtual returns (bool) {\\n return _proposal.voteHashOf[_voter] != bytes32(0);\\n }\\n}\\n\",\"keccak256\":\"0xe2d3bd6a2dae71c371aca5e6db35dc20cb76621d62a747d445d0da616145866b\",\"license\":\"MIT\"},\"contracts/extensions/isolated-governance/bridge-operator-governance/BOsGovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../extensions/isolated-governance/IsolatedGovernance.sol\\\";\\nimport \\\"../../../interfaces/consumers/SignatureConsumer.sol\\\";\\nimport \\\"../../../libraries/BridgeOperatorsBallot.sol\\\";\\nimport \\\"../../../libraries/AddressArrayUtils.sol\\\";\\n\\nabstract contract BOsGovernanceRelay is SignatureConsumer, IsolatedGovernance {\\n /// @dev The last the brige operator set info.\\n BridgeOperatorsBallot.BridgeOperatorSet internal _lastSyncedBridgeOperatorSetInfo;\\n /// @dev Mapping from period index => epoch index => bridge operators vote\\n mapping(uint256 => mapping(uint256 => IsolatedVote)) internal _vote;\\n\\n /**\\n * @dev Returns the synced bridge operator set info.\\n */\\n function lastSyncedBridgeOperatorSetInfo() external view returns (BridgeOperatorsBallot.BridgeOperatorSet memory) {\\n return _lastSyncedBridgeOperatorSetInfo;\\n }\\n\\n /**\\n * @dev Relays votes by signatures.\\n *\\n * Requirements:\\n * - The period of voting is larger than the last synced period.\\n * - The arrays are not empty.\\n * - The signature signers are in order.\\n *\\n * @notice Does not store the voter signature into storage.\\n *\\n */\\n function _relayVotesBySignatures(\\n BridgeOperatorsBallot.BridgeOperatorSet calldata _ballot,\\n Signature[] calldata _signatures,\\n uint256 _minimumVoteWeight,\\n bytes32 _domainSeperator\\n ) internal {\\n require(\\n (_ballot.period >= _lastSyncedBridgeOperatorSetInfo.period &&\\n _ballot.epoch > _lastSyncedBridgeOperatorSetInfo.epoch),\\n \\\"BOsGovernanceRelay: query for outdated bridge operator set\\\"\\n );\\n BridgeOperatorsBallot.verifyBallot(_ballot);\\n require(\\n !AddressArrayUtils.isEqual(_ballot.operators, _lastSyncedBridgeOperatorSetInfo.operators),\\n \\\"BOsGovernanceRelay: bridge operator set is already voted\\\"\\n );\\n require(_signatures.length > 0, \\\"BOsGovernanceRelay: invalid array length\\\");\\n\\n Signature calldata _sig;\\n address[] memory _signers = new address[](_signatures.length);\\n address _lastSigner;\\n bytes32 _hash = BridgeOperatorsBallot.hash(_ballot);\\n bytes32 _digest = ECDSA.toTypedDataHash(_domainSeperator, _hash);\\n\\n for (uint256 _i = 0; _i < _signatures.length; _i++) {\\n _sig = _signatures[_i];\\n _signers[_i] = ECDSA.recover(_digest, _sig.v, _sig.r, _sig.s);\\n require(_lastSigner < _signers[_i], \\\"BOsGovernanceRelay: invalid order\\\");\\n _lastSigner = _signers[_i];\\n }\\n\\n IsolatedVote storage _v = _vote[_ballot.period][_ballot.epoch];\\n uint256 _totalVoteWeight = _sumBridgeVoterWeights(_signers);\\n if (_totalVoteWeight >= _minimumVoteWeight) {\\n require(_totalVoteWeight > 0, \\\"BOsGovernanceRelay: invalid vote weight\\\");\\n _v.status = VoteStatus.Approved;\\n _lastSyncedBridgeOperatorSetInfo = _ballot;\\n return;\\n }\\n\\n revert(\\\"BOsGovernanceRelay: relay failed\\\");\\n }\\n\\n /**\\n * @dev Returns the weight of the governor list.\\n */\\n function _sumBridgeVoterWeights(address[] memory _bridgeVoters) internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x15a681fb6ab0516e3c4c4d96c99443877e6be738387221cdeb5c45cd7feb98e4\",\"license\":\"MIT\"},\"contracts/extensions/sequential-governance/CoreGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"../../libraries/Proposal.sol\\\";\\nimport \\\"../../libraries/GlobalProposal.sol\\\";\\nimport \\\"../../libraries/Ballot.sol\\\";\\nimport \\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/SignatureConsumer.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\n\\nabstract contract CoreGovernance is SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n struct ProposalVote {\\n VoteStatus status;\\n bytes32 hash;\\n uint256 againstVoteWeight; // Total weight of against votes\\n uint256 forVoteWeight; // Total weight of for votes\\n address[] forVoteds; // Array of addresses voting for\\n address[] againstVoteds; // Array of addresses voting against\\n uint256 expiryTimestamp;\\n mapping(address => Signature) sig;\\n mapping(address => bool) voted;\\n }\\n\\n /// @dev Emitted when a proposal is created\\n event ProposalCreated(\\n uint256 indexed chainId,\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n address creator\\n );\\n /// @dev Emitted when a proposal is created\\n event GlobalProposalCreated(\\n uint256 indexed round,\\n bytes32 indexed proposalHash,\\n Proposal.ProposalDetail proposal,\\n bytes32 globalProposalHash,\\n GlobalProposal.GlobalProposalDetail globalProposal,\\n address creator\\n );\\n /// @dev Emitted when the proposal is voted\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\n /// @dev Emitted when the proposal is approved\\n event ProposalApproved(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is reject\\n event ProposalRejected(bytes32 indexed proposalHash);\\n /// @dev Emitted when the vote is expired\\n event ProposalExpired(bytes32 indexed proposalHash);\\n /// @dev Emitted when the proposal is executed\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\n\\n /// @dev Mapping from chain id => vote round\\n /// @notice chain id = 0 for global proposal\\n mapping(uint256 => uint256) public round;\\n /// @dev Mapping from chain id => vote round => proposal vote\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\n\\n uint256 private _proposalExpiryDuration;\\n\\n constructor(uint256 _expiryDuration) {\\n _setProposalExpiryDuration(_expiryDuration);\\n }\\n\\n /**\\n * @dev Creates new round voting for the proposal `_proposalHash` of chain `_chainId`.\\n */\\n function _createVotingRound(\\n uint256 _chainId,\\n bytes32 _proposalHash,\\n uint256 _expiryTimestamp\\n ) internal returns (uint256 _round) {\\n _round = round[_chainId];\\n\\n // Skip checking for the first ever round\\n if (_round == 0) {\\n _round = round[_chainId] = 1;\\n } else {\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\n // Skip increase round number if the latest round is expired, allow the vote to be overridden\\n if (!_isExpired) {\\n require(_latestProposalVote.status != VoteStatus.Pending, \\\"CoreGovernance: current proposal is not completed\\\");\\n _round = ++round[_chainId];\\n }\\n }\\n\\n vote[_chainId][_round].hash = _proposalHash;\\n vote[_chainId][_round].expiryTimestamp = _expiryTimestamp;\\n }\\n\\n /**\\n * @dev Proposes for a new proposal.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposal(\\n uint256 _chainId,\\n uint256 _expiryTimestamp,\\n address[] memory _targets,\\n uint256[] memory _values,\\n bytes[] memory _calldatas,\\n uint256[] memory _gasAmounts,\\n address _creator\\n ) internal virtual returns (Proposal.ProposalDetail memory _proposal) {\\n require(_chainId != 0, \\\"CoreGovernance: invalid chain id\\\");\\n\\n _proposal = Proposal.ProposalDetail(\\n round[_chainId] + 1,\\n _chainId,\\n _expiryTimestamp,\\n _targets,\\n _values,\\n _calldatas,\\n _gasAmounts\\n );\\n _proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 _proposalHash = _proposal.hash();\\n uint256 _round = _createVotingRound(_chainId, _proposalHash, _expiryTimestamp);\\n emit ProposalCreated(_chainId, _round, _proposalHash, _proposal, _creator);\\n }\\n\\n /**\\n * @dev Proposes proposal struct.\\n *\\n * Requirements:\\n * - The chain id is not equal to 0.\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `ProposalCreated` event.\\n *\\n */\\n function _proposeProposalStruct(Proposal.ProposalDetail memory _proposal, address _creator)\\n internal\\n virtual\\n returns (uint256 _round)\\n {\\n uint256 _chainId = _proposal.chainId;\\n require(_chainId != 0, \\\"CoreGovernance: invalid chain id\\\");\\n _proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 _proposalHash = _proposal.hash();\\n _round = _createVotingRound(_chainId, _proposalHash, _proposal.expiryTimestamp);\\n require(_round == _proposal.nonce, \\\"CoreGovernance: invalid proposal nonce\\\");\\n emit ProposalCreated(_chainId, _round, _proposalHash, _proposal, _creator);\\n }\\n\\n /**\\n * @dev Proposes for a global proposal.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobal(\\n uint256 _expiryTimestamp,\\n GlobalProposal.TargetOption[] calldata _targetOptions,\\n uint256[] memory _values,\\n bytes[] memory _calldatas,\\n uint256[] memory _gasAmounts,\\n address _roninTrustedOrganizationContract,\\n address _gatewayContract,\\n address _creator\\n ) internal virtual returns (uint256 _round) {\\n GlobalProposal.GlobalProposalDetail memory _globalProposal = GlobalProposal.GlobalProposalDetail(\\n round[0] + 1,\\n _expiryTimestamp,\\n _targetOptions,\\n _values,\\n _calldatas,\\n _gasAmounts\\n );\\n Proposal.ProposalDetail memory _proposal = _globalProposal.into_proposal_detail(\\n _roninTrustedOrganizationContract,\\n _gatewayContract\\n );\\n _proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 _proposalHash = _proposal.hash();\\n _round = _createVotingRound(0, _proposalHash, _expiryTimestamp);\\n emit GlobalProposalCreated(_round, _proposalHash, _proposal, _globalProposal.hash(), _globalProposal, _creator);\\n }\\n\\n /**\\n * @dev Proposes global proposal struct.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the new round.\\n *\\n * Emits the `GlobalProposalCreated` event.\\n *\\n */\\n function _proposeGlobalStruct(\\n GlobalProposal.GlobalProposalDetail memory _globalProposal,\\n address _roninTrustedOrganizationContract,\\n address _gatewayContract,\\n address _creator\\n ) internal virtual returns (Proposal.ProposalDetail memory _proposal, uint256 _round) {\\n _proposal = _globalProposal.into_proposal_detail(_roninTrustedOrganizationContract, _gatewayContract);\\n _proposal.validate(_proposalExpiryDuration);\\n\\n bytes32 _proposalHash = _proposal.hash();\\n _round = _createVotingRound(0, _proposalHash, _globalProposal.expiryTimestamp);\\n require(_round == _proposal.nonce, \\\"CoreGovernance: invalid proposal nonce\\\");\\n emit GlobalProposalCreated(_round, _proposalHash, _proposal, _globalProposal.hash(), _globalProposal, _creator);\\n }\\n\\n /**\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\n *\\n * Requirements:\\n * - The proposal nonce is equal to the round.\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\n * proposal is approved, executed or rejected.\\n *\\n */\\n function _castVote(\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType _support,\\n uint256 _minimumForVoteWeight,\\n uint256 _minimumAgainstVoteWeight,\\n address _voter,\\n Signature memory _signature,\\n uint256 _voterWeight\\n ) internal virtual returns (bool _done) {\\n uint256 _chainId = _proposal.chainId;\\n uint256 _round = _proposal.nonce;\\n ProposalVote storage _vote = vote[_chainId][_round];\\n\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\n return true;\\n }\\n\\n require(round[_proposal.chainId] == _round, \\\"CoreGovernance: query for invalid proposal nonce\\\");\\n require(_vote.status == VoteStatus.Pending, \\\"CoreGovernance: the vote is finalized\\\");\\n if (_voted(_vote, _voter)) {\\n revert(string(abi.encodePacked(\\\"CoreGovernance: \\\", Strings.toHexString(uint160(_voter), 20), \\\" already voted\\\")));\\n }\\n\\n _vote.voted[_voter] = true;\\n // Stores the signature if it is not empty\\n if (_signature.r > 0 || _signature.s > 0 || _signature.v > 0) {\\n _vote.sig[_voter] = _signature;\\n }\\n emit ProposalVoted(_vote.hash, _voter, _support, _voterWeight);\\n\\n uint256 _forVoteWeight;\\n uint256 _againstVoteWeight;\\n if (_support == Ballot.VoteType.For) {\\n _vote.forVoteds.push(_voter);\\n _forVoteWeight = _vote.forVoteWeight += _voterWeight;\\n } else if (_support == Ballot.VoteType.Against) {\\n _vote.againstVoteds.push(_voter);\\n _againstVoteWeight = _vote.againstVoteWeight += _voterWeight;\\n } else {\\n revert(\\\"CoreGovernance: unsupported vote type\\\");\\n }\\n\\n if (_forVoteWeight >= _minimumForVoteWeight) {\\n _done = true;\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n _tryExecute(_vote, _proposal);\\n } else if (_againstVoteWeight >= _minimumAgainstVoteWeight) {\\n _done = true;\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n }\\n }\\n\\n /**\\n * @dev Delete the expired proposal by its chainId and nonce, without creating a new proposal.\\n */\\n function _deleteExpiredVotingRound(uint256 _chainId, uint256 _round) internal {\\n ProposalVote storage _vote = vote[_chainId][_round];\\n _tryDeleteExpiredVotingRound(_vote);\\n }\\n\\n /**\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\n */\\n function _tryDeleteExpiredVotingRound(ProposalVote storage _proposalVote) private returns (bool _isExpired) {\\n _isExpired =\\n _getChainType() == ChainType.RoninChain &&\\n _proposalVote.status == VoteStatus.Pending &&\\n _proposalVote.expiryTimestamp <= block.timestamp;\\n\\n if (_isExpired) {\\n emit ProposalExpired(_proposalVote.hash);\\n\\n for (uint256 _i; _i < _proposalVote.forVoteds.length; _i++) {\\n delete _proposalVote.voted[_proposalVote.forVoteds[_i]];\\n delete _proposalVote.sig[_proposalVote.forVoteds[_i]];\\n }\\n for (uint256 _i; _i < _proposalVote.againstVoteds.length; _i++) {\\n delete _proposalVote.voted[_proposalVote.againstVoteds[_i]];\\n delete _proposalVote.sig[_proposalVote.againstVoteds[_i]];\\n }\\n delete _proposalVote.status;\\n delete _proposalVote.hash;\\n delete _proposalVote.againstVoteWeight;\\n delete _proposalVote.forVoteWeight;\\n delete _proposalVote.forVoteds;\\n delete _proposalVote.againstVoteds;\\n delete _proposalVote.expiryTimestamp;\\n }\\n }\\n\\n /**\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\n */\\n function _tryExecute(ProposalVote storage _vote, Proposal.ProposalDetail memory _proposal) internal {\\n if (_proposal.executable()) {\\n _vote.status = VoteStatus.Executed;\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = _proposal.execute();\\n emit ProposalExecuted(_vote.hash, _successCalls, _returnDatas);\\n }\\n }\\n\\n /**\\n * @dev Sets the expiry duration for a new proposal.\\n */\\n function _setProposalExpiryDuration(uint256 _expiryDuration) internal {\\n _proposalExpiryDuration = _expiryDuration;\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function _voted(ProposalVote storage _vote, address _voter) internal view returns (bool) {\\n return _vote.voted[_voter];\\n }\\n\\n /**\\n * @dev Returns the expiry duration for a new proposal.\\n */\\n function _getProposalExpiryDuration() internal view returns (uint256) {\\n return _proposalExpiryDuration;\\n }\\n\\n /**\\n * @dev Returns total weight from validators.\\n */\\n function _getTotalWeights() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns minimum vote to pass a proposal.\\n */\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\n\\n /**\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\n */\\n function _getChainType() internal view virtual returns (ChainType);\\n}\\n\",\"keccak256\":\"0xcb4060c8f5259646d978d77bf3022124e065c12c0d9589739195a2191023f23d\",\"license\":\"MIT\"},\"contracts/extensions/sequential-governance/GovernanceRelay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./CoreGovernance.sol\\\";\\n\\nabstract contract GovernanceRelay is CoreGovernance {\\n using Proposal for Proposal.ProposalDetail;\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\n\\n /**\\n * @dev Relays votes by signatures.\\n *\\n * @notice Does not store the voter signature into storage.\\n *\\n */\\n function _relayVotesBySignatures(\\n Proposal.ProposalDetail memory _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 _forDigest,\\n bytes32 _againstDigest\\n ) internal {\\n require(_supports.length > 0 && _supports.length == _signatures.length, \\\"GovernanceRelay: invalid array length\\\");\\n uint256 _forVoteCount;\\n uint256 _againstVoteCount;\\n address[] memory _forVoteSigners = new address[](_signatures.length);\\n address[] memory _againstVoteSigners = new address[](_signatures.length);\\n\\n {\\n address _signer;\\n address _lastSigner;\\n Ballot.VoteType _support;\\n Signature calldata _sig;\\n\\n for (uint256 _i; _i < _signatures.length; _i++) {\\n _sig = _signatures[_i];\\n _support = _supports[_i];\\n\\n if (_support == Ballot.VoteType.For) {\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\n _forVoteSigners[_forVoteCount++] = _signer;\\n } else if (_support == Ballot.VoteType.Against) {\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\n _againstVoteSigners[_againstVoteCount++] = _signer;\\n } else {\\n revert(\\\"GovernanceRelay: query for unsupported vote type\\\");\\n }\\n\\n require(_lastSigner < _signer, \\\"GovernanceRelay: invalid order\\\");\\n _lastSigner = _signer;\\n }\\n }\\n\\n assembly {\\n mstore(_forVoteSigners, _forVoteCount)\\n mstore(_againstVoteSigners, _againstVoteCount)\\n }\\n\\n ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce];\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\n uint256 _totalForVoteWeight = _sumWeights(_forVoteSigners);\\n if (_totalForVoteWeight >= _minimumForVoteWeight) {\\n require(_totalForVoteWeight > 0, \\\"GovernanceRelay: invalid vote weight\\\");\\n _vote.status = VoteStatus.Approved;\\n emit ProposalApproved(_vote.hash);\\n _tryExecute(_vote, _proposal);\\n return;\\n }\\n\\n uint256 _minimumAgainstVoteWeight = _getTotalWeights() - _minimumForVoteWeight + 1;\\n uint256 _totalAgainstVoteWeight = _sumWeights(_againstVoteSigners);\\n if (_totalAgainstVoteWeight >= _minimumAgainstVoteWeight) {\\n require(_totalAgainstVoteWeight > 0, \\\"GovernanceRelay: invalid vote weight\\\");\\n _vote.status = VoteStatus.Rejected;\\n emit ProposalRejected(_vote.hash);\\n return;\\n }\\n\\n revert(\\\"GovernanceRelay: relay failed\\\");\\n }\\n\\n /**\\n * @dev Relays voted proposal.\\n *\\n * Requirements:\\n * - The relay proposal is finalized.\\n *\\n */\\n function _relayProposal(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 _domainSeparator,\\n address _creator\\n ) internal {\\n _proposeProposalStruct(_proposal, _creator);\\n bytes32 _proposalHash = _proposal.hash();\\n _relayVotesBySignatures(\\n _proposal,\\n _supports,\\n _signatures,\\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)),\\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against))\\n );\\n }\\n\\n /**\\n * @dev Relays voted global proposal.\\n *\\n * Requirements:\\n * - The relay proposal is finalized.\\n *\\n */\\n function _relayGlobalProposal(\\n GlobalProposal.GlobalProposalDetail calldata _globalProposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures,\\n bytes32 _domainSeparator,\\n address _roninTrustedOrganizationContract,\\n address _gatewayContract,\\n address _creator\\n ) internal {\\n (Proposal.ProposalDetail memory _proposal, ) = _proposeGlobalStruct(\\n _globalProposal,\\n _roninTrustedOrganizationContract,\\n _gatewayContract,\\n _creator\\n );\\n bytes32 _globalProposalHash = _globalProposal.hash();\\n _relayVotesBySignatures(\\n _proposal,\\n _supports,\\n _signatures,\\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.For)),\\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.Against))\\n );\\n }\\n\\n /**\\n * @dev Returns the weight of the governor list.\\n */\\n function _sumWeights(address[] memory _governors) internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x31562ec17f48a775337a4e2b710d71112c104ad27363df10e962c4612f458dff\",\"license\":\"MIT\"},\"contracts/interfaces/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridge {\\n /**\\n * @dev Replaces the old bridge operator list by the new one.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emitted the event `BridgeOperatorsReplaced`.\\n *\\n */\\n function replaceBridgeOperators(address[] calldata) external;\\n\\n /**\\n * @dev Returns the bridge operator list.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n}\\n\",\"keccak256\":\"0x614db701e54383b7d0a749bc9b0d2da95d42652cd673499bf71e25096548b96e\",\"license\":\"MIT\"},\"contracts/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator)\\n external\\n returns (uint256 _previousNum, uint256 _previousDenom);\\n}\\n\",\"keccak256\":\"0x10f3b360430e6d03773c9959f54cbed6fb0346069645c05b05ef50cfb19f3753\",\"license\":\"MIT\"},\"contracts/interfaces/IRoninTrustedOrganization.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IQuorum.sol\\\";\\n\\ninterface IRoninTrustedOrganization is IQuorum {\\n struct TrustedOrganization {\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address to voting proposal\\n address governor;\\n // Address to voting bridge operators\\n address bridgeVoter;\\n // Its Weight\\n uint256 weight;\\n // The block that the organization was added\\n uint256 addedBlock;\\n }\\n\\n /// @dev Emitted when the trusted organization is added.\\n event TrustedOrganizationsAdded(TrustedOrganization[] orgs);\\n /// @dev Emitted when the trusted organization is updated.\\n event TrustedOrganizationsUpdated(TrustedOrganization[] orgs);\\n /// @dev Emitted when the trusted organization is removed.\\n event TrustedOrganizationsRemoved(address[] orgs);\\n\\n /**\\n * @dev Adds a list of addresses into the trusted organization.\\n *\\n * Requirements:\\n * - The weights should larger than 0.\\n * - The method caller is admin.\\n * - The field `addedBlock` should be blank.\\n *\\n * Emits the event `TrustedOrganizationAdded` once an organization is added.\\n *\\n */\\n function addTrustedOrganizations(TrustedOrganization[] calldata) external;\\n\\n /**\\n * @dev Updates weights for a list of existent trusted organization.\\n *\\n * Requirements:\\n * - The weights should larger than 0.\\n * - The method caller is admin.\\n *\\n * Emits the `TrustedOrganizationUpdated` event.\\n *\\n */\\n function updateTrustedOrganizations(TrustedOrganization[] calldata _list) external;\\n\\n /**\\n * @dev Removes a list of addresses from the trusted organization.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `TrustedOrganizationRemoved` once an organization is removed.\\n *\\n * @param _consensusAddrs The list of consensus addresses linked to corresponding trusted organization that to be removed.\\n */\\n function removeTrustedOrganizations(address[] calldata _consensusAddrs) external;\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function totalWeights() external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a consensus.\\n */\\n function getConsensusWeight(address _consensusAddr) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a governor.\\n */\\n function getGovernorWeight(address _governor) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a bridge voter.\\n */\\n function getBridgeVoterWeight(address _addr) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weights of a list of consensus addresses.\\n */\\n function getConsensusWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the weights of a list of bridge voter addresses.\\n */\\n function getBridgeVoterWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns total weights of the consensus list.\\n */\\n function sumConsensusWeights(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorWeights(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns total weights of the bridge voter list.\\n */\\n function sumBridgeVoterWeights(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns the trusted organization at `_index`.\\n */\\n function getTrustedOrganizationAt(uint256 _index) external view returns (TrustedOrganization memory);\\n\\n /**\\n * @dev Returns the number of trusted organizations.\\n */\\n function countTrustedOrganizations() external view returns (uint256);\\n\\n /**\\n * @dev Returns all of the trusted organizations.\\n */\\n function getAllTrustedOrganizations() external view returns (TrustedOrganization[] memory);\\n\\n /**\\n * @dev Returns the trusted organization by consensus address.\\n *\\n * Reverts once the consensus address is non-existent.\\n */\\n function getTrustedOrganization(address _consensusAddr) external view returns (TrustedOrganization memory);\\n}\\n\",\"keccak256\":\"0x1edb7a3f5d340e7efc141cb8d94c5499954dec869f026d3998ad92cbc714d604\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasBridgeContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IHasContract.sol\\\";\\n\\ninterface IHasBridgeContract is IHasContract {\\n /// @dev Emitted when the bridge contract is updated.\\n event BridgeContractUpdated(address);\\n\\n /// @dev Error of method caller must be bridge contract.\\n error ErrCallerMustBeBridgeContract();\\n\\n /**\\n * @dev Returns the bridge contract.\\n */\\n function bridgeContract() external view returns (address);\\n\\n /**\\n * @dev Sets the bridge contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The new address is a contract.\\n *\\n * Emits the event `BridgeContractUpdated`.\\n *\\n */\\n function setBridgeContract(address) external;\\n}\\n\",\"keccak256\":\"0xf3ab1830ba7797cb3b8011512af3a5e38a316549f62140b0c10e0b4dcb67f773\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IHasContract {\\n /// @dev Error of set to non-contract.\\n error ErrZeroCodeContract();\\n}\\n\",\"keccak256\":\"0x8a17785d841137fcae5b5d542f1714de0492c85b54ca074f0b9c1c490ad3f342\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasRoninTrustedOrganizationContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IHasContract.sol\\\";\\n\\ninterface IHasRoninTrustedOrganizationContract is IHasContract {\\n /// @dev Emitted when the ronin trusted organization contract is updated.\\n event RoninTrustedOrganizationContractUpdated(address);\\n\\n /// @dev Error of method caller must be Ronin trusted org contract.\\n error ErrCallerMustBeRoninTrustedOrgContract();\\n\\n /**\\n * @dev Returns the ronin trusted organization contract.\\n */\\n function roninTrustedOrganizationContract() external view returns (address);\\n\\n /**\\n * @dev Sets the ronin trusted organization contract.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The new address is a contract.\\n *\\n * Emits the event `RoninTrustedOrganizationContractUpdated`.\\n *\\n */\\n function setRoninTrustedOrganizationContract(address) external;\\n}\\n\",\"keccak256\":\"0x7d0a0b1d658e9cf4d69f4934748e0a5c1d22183024d26927f5d621fc61aff0b2\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/ChainTypeConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface ChainTypeConsumer {\\n enum ChainType {\\n RoninChain,\\n Mainchain\\n }\\n}\\n\",\"keccak256\":\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/SignatureConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface SignatureConsumer {\\n struct Signature {\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n }\\n}\\n\",\"keccak256\":\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"contracts/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool) {\\n bytes32 _thisHash;\\n bytes32 _otherHash;\\n\\n assembly {\\n _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n }\\n\\n return _thisHash == _otherHash;\\n }\\n}\\n\",\"keccak256\":\"0xea4ac2b0783926a0e6ae257bc069fa37ea864ce77bfb25dd327d4727a38ad0ea\",\"license\":\"UNLICENSED\"},\"contracts/libraries/Ballot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\n\\nlibrary Ballot {\\n using ECDSA for bytes32;\\n\\n enum VoteType {\\n For,\\n Against\\n }\\n\\n // keccak256(\\\"Ballot(bytes32 proposalHash,uint8 support)\\\");\\n bytes32 public constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\n\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32) {\\n return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\n }\\n}\\n\",\"keccak256\":\"0x28a0192db886307f30ada203bdb902749ee3f30d42710de4eaf303cba23c32c2\",\"license\":\"MIT\"},\"contracts/libraries/BridgeOperatorsBallot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\n\\nlibrary BridgeOperatorsBallot {\\n struct BridgeOperatorSet {\\n uint256 period;\\n uint256 epoch;\\n address[] operators;\\n }\\n\\n // keccak256(\\\"BridgeOperatorsBallot(uint256 period,uint256 epoch,address[] operators)\\\");\\n bytes32 public constant BRIDGE_OPERATORS_BALLOT_TYPEHASH =\\n 0xd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a;\\n\\n /**\\n * @dev Verifies whether the ballot is valid or not.\\n *\\n * Requirements:\\n * - The ballot is not for an empty operator set.\\n * - The operator address list is in order.\\n *\\n */\\n function verifyBallot(BridgeOperatorSet calldata _ballot) internal pure {\\n require(_ballot.operators.length > 0, \\\"BridgeOperatorsBallot: invalid array length\\\");\\n address _addr = _ballot.operators[0];\\n for (uint _i = 1; _i < _ballot.operators.length; _i++) {\\n require(_addr < _ballot.operators[_i], \\\"BridgeOperatorsBallot: invalid order of bridge operators\\\");\\n _addr = _ballot.operators[_i];\\n }\\n }\\n\\n /**\\n * @dev Returns hash of the ballot.\\n */\\n function hash(BridgeOperatorSet calldata _ballot) internal pure returns (bytes32) {\\n bytes32 _operatorsHash;\\n address[] memory _operators = _ballot.operators;\\n\\n assembly {\\n _operatorsHash := keccak256(add(_operators, 32), mul(mload(_operators), 32))\\n }\\n\\n return keccak256(abi.encode(BRIDGE_OPERATORS_BALLOT_TYPEHASH, _ballot.period, _ballot.epoch, _operatorsHash));\\n }\\n}\\n\",\"keccak256\":\"0x986425ebae2dcfcfa266c9ca825232ff300ec8ce796e8975da6714d87e921793\",\"license\":\"MIT\"},\"contracts/libraries/GlobalProposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proposal.sol\\\";\\n\\nlibrary GlobalProposal {\\n enum TargetOption {\\n RoninTrustedOrganizationContract,\\n GatewayContract\\n }\\n\\n struct GlobalProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n uint256 expiryTimestamp;\\n TargetOption[] targetOptions;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 public constant TYPE_HASH = 0x1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee91141350;\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(GlobalProposalDetail memory _proposal) internal pure returns (bytes32) {\\n bytes32 _targetsHash;\\n bytes32 _valuesHash;\\n bytes32 _calldatasHash;\\n bytes32 _gasAmountsHash;\\n\\n uint256[] memory _values = _proposal.values;\\n TargetOption[] memory _targets = _proposal.targetOptions;\\n bytes32[] memory _calldataHashList = new bytes32[](_proposal.calldatas.length);\\n uint256[] memory _gasAmounts = _proposal.gasAmounts;\\n\\n for (uint256 _i; _i < _calldataHashList.length; _i++) {\\n _calldataHashList[_i] = keccak256(_proposal.calldatas[_i]);\\n }\\n\\n assembly {\\n _targetsHash := keccak256(add(_targets, 32), mul(mload(_targets), 32))\\n _valuesHash := keccak256(add(_values, 32), mul(mload(_values), 32))\\n _calldatasHash := keccak256(add(_calldataHashList, 32), mul(mload(_calldataHashList), 32))\\n _gasAmountsHash := keccak256(add(_gasAmounts, 32), mul(mload(_gasAmounts), 32))\\n }\\n\\n return\\n keccak256(\\n abi.encode(\\n TYPE_HASH,\\n _proposal.nonce,\\n _proposal.expiryTimestamp,\\n _targetsHash,\\n _valuesHash,\\n _calldatasHash,\\n _gasAmountsHash\\n )\\n );\\n }\\n\\n /**\\n * @dev Converts into the normal proposal.\\n */\\n function into_proposal_detail(\\n GlobalProposalDetail memory _proposal,\\n address _roninTrustedOrganizationContract,\\n address _gatewayContract\\n ) internal pure returns (Proposal.ProposalDetail memory _detail) {\\n _detail.nonce = _proposal.nonce;\\n _detail.expiryTimestamp = _proposal.expiryTimestamp;\\n _detail.chainId = 0;\\n _detail.targets = new address[](_proposal.targetOptions.length);\\n _detail.values = _proposal.values;\\n _detail.calldatas = _proposal.calldatas;\\n _detail.gasAmounts = _proposal.gasAmounts;\\n\\n for (uint256 _i; _i < _proposal.targetOptions.length; _i++) {\\n if (_proposal.targetOptions[_i] == TargetOption.GatewayContract) {\\n _detail.targets[_i] = _gatewayContract;\\n } else if (_proposal.targetOptions[_i] == TargetOption.RoninTrustedOrganizationContract) {\\n _detail.targets[_i] = _roninTrustedOrganizationContract;\\n } else {\\n revert(\\\"GlobalProposal: unsupported target\\\");\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4749e811eebe029ac572b48e5c755bc852cc74e8234c5243a57f7536c3ed00e0\",\"license\":\"MIT\"},\"contracts/libraries/Proposal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nlibrary Proposal {\\n struct ProposalDetail {\\n // Nonce to make sure proposals are executed in order\\n uint256 nonce;\\n // Value 0: all chain should run this proposal\\n // Other values: only specifc chain has to execute\\n uint256 chainId;\\n uint256 expiryTimestamp;\\n address[] targets;\\n uint256[] values;\\n bytes[] calldatas;\\n uint256[] gasAmounts;\\n }\\n\\n // keccak256(\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\");\\n bytes32 public constant TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a;\\n\\n /**\\n * @dev Validates the proposal.\\n */\\n function validate(ProposalDetail memory _proposal, uint256 _maxExpiryDuration) internal view {\\n require(\\n _proposal.targets.length > 0 &&\\n _proposal.targets.length == _proposal.values.length &&\\n _proposal.targets.length == _proposal.calldatas.length &&\\n _proposal.targets.length == _proposal.gasAmounts.length,\\n \\\"Proposal: invalid array length\\\"\\n );\\n require(_proposal.expiryTimestamp <= block.timestamp + _maxExpiryDuration, \\\"Proposal: invalid expiry timestamp\\\");\\n }\\n\\n /**\\n * @dev Returns struct hash of the proposal.\\n */\\n function hash(ProposalDetail memory _proposal) internal pure returns (bytes32) {\\n bytes32 _targetsHash;\\n bytes32 _valuesHash;\\n bytes32 _calldatasHash;\\n bytes32 _gasAmountsHash;\\n\\n uint256[] memory _values = _proposal.values;\\n address[] memory _targets = _proposal.targets;\\n bytes32[] memory _calldataHashList = new bytes32[](_proposal.calldatas.length);\\n uint256[] memory _gasAmounts = _proposal.gasAmounts;\\n\\n for (uint256 _i; _i < _calldataHashList.length; _i++) {\\n _calldataHashList[_i] = keccak256(_proposal.calldatas[_i]);\\n }\\n\\n assembly {\\n _targetsHash := keccak256(add(_targets, 32), mul(mload(_targets), 32))\\n _valuesHash := keccak256(add(_values, 32), mul(mload(_values), 32))\\n _calldatasHash := keccak256(add(_calldataHashList, 32), mul(mload(_calldataHashList), 32))\\n _gasAmountsHash := keccak256(add(_gasAmounts, 32), mul(mload(_gasAmounts), 32))\\n }\\n\\n return\\n keccak256(\\n abi.encode(\\n TYPE_HASH,\\n _proposal.nonce,\\n _proposal.chainId,\\n _proposal.expiryTimestamp,\\n _targetsHash,\\n _valuesHash,\\n _calldatasHash,\\n _gasAmountsHash\\n )\\n );\\n }\\n\\n /**\\n * @dev Returns whether the proposal is executable for the current chain.\\n *\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\n *\\n */\\n function executable(ProposalDetail memory _proposal) internal view returns (bool _result) {\\n return _proposal.chainId == 0 || _proposal.chainId == block.chainid;\\n }\\n\\n /**\\n * @dev Executes the proposal.\\n */\\n function execute(ProposalDetail memory _proposal)\\n internal\\n returns (bool[] memory _successCalls, bytes[] memory _returnDatas)\\n {\\n require(executable(_proposal), \\\"Proposal: query for invalid chainId\\\");\\n _successCalls = new bool[](_proposal.targets.length);\\n _returnDatas = new bytes[](_proposal.targets.length);\\n for (uint256 _i = 0; _i < _proposal.targets.length; ++_i) {\\n require(gasleft() > _proposal.gasAmounts[_i], \\\"Proposal: insufficient gas\\\");\\n\\n (_successCalls[_i], _returnDatas[_i]) = _proposal.targets[_i].call{\\n value: _proposal.values[_i],\\n gas: _proposal.gasAmounts[_i]\\n }(_proposal.calldatas[_i]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x96bf9eaea9a87a5eceed026a6eaedc74cf5dde6760f7e969d5b5974dad43ff80\",\"license\":\"MIT\"},\"contracts/mainchain/MainchainGovernanceAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"../extensions/isolated-governance/bridge-operator-governance/BOsGovernanceRelay.sol\\\";\\nimport \\\"../extensions/sequential-governance/GovernanceRelay.sol\\\";\\nimport \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport \\\"../extensions/GovernanceAdmin.sol\\\";\\nimport \\\"../interfaces/IBridge.sol\\\";\\n\\ncontract MainchainGovernanceAdmin is AccessControlEnumerable, GovernanceRelay, GovernanceAdmin, BOsGovernanceRelay {\\n bytes32 public constant RELAYER_ROLE = keccak256(\\\"RELAYER_ROLE\\\");\\n uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255;\\n\\n constructor(\\n uint256 _roninChainId,\\n address _roleSetter,\\n address _roninTrustedOrganizationContract,\\n address _bridgeContract,\\n address[] memory _relayers\\n ) GovernanceAdmin(_roninChainId, _roninTrustedOrganizationContract, _bridgeContract, DEFAULT_EXPIRY_DURATION) {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n for (uint256 _i; _i < _relayers.length; _i++) {\\n _grantRole(RELAYER_ROLE, _relayers[_i]);\\n }\\n }\\n\\n /**\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\n */\\n function proposalRelayed(uint256 _chainId, uint256 _round) external view returns (bool) {\\n return vote[_chainId][_round].status != VoteStatus.Pending;\\n }\\n\\n /**\\n * @dev Returns whether the voter `_voter` casted vote for bridge operators at a specific period.\\n */\\n function bridgeOperatorsRelayed(uint256 _period, uint256 _epoch) external view returns (bool) {\\n return _vote[_period][_epoch].status != VoteStatus.Pending;\\n }\\n\\n /**\\n * @dev See `GovernanceRelay-_relayProposal`.\\n *\\n * Requirements:\\n * - The method caller is relayer.\\n *\\n */\\n function relayProposal(\\n Proposal.ProposalDetail calldata _proposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures\\n ) external onlyRole(RELAYER_ROLE) {\\n _relayProposal(_proposal, _supports, _signatures, DOMAIN_SEPARATOR, msg.sender);\\n }\\n\\n /**\\n * @dev See `GovernanceRelay-_relayGlobalProposal`.\\n *\\n * Requirements:\\n * - The method caller is relayer.\\n *\\n */\\n function relayGlobalProposal(\\n GlobalProposal.GlobalProposalDetail calldata _globalProposal,\\n Ballot.VoteType[] calldata _supports,\\n Signature[] calldata _signatures\\n ) external onlyRole(RELAYER_ROLE) {\\n _relayGlobalProposal(\\n _globalProposal,\\n _supports,\\n _signatures,\\n DOMAIN_SEPARATOR,\\n roninTrustedOrganizationContract(),\\n bridgeContract(),\\n msg.sender\\n );\\n }\\n\\n /**\\n * @dev See `BOsGovernanceRelay-_relayVotesBySignatures`.\\n *\\n * Requirements:\\n * - The method caller is relayer.\\n *\\n */\\n function relayBridgeOperators(\\n BridgeOperatorsBallot.BridgeOperatorSet calldata _ballot,\\n Signature[] calldata _signatures\\n ) external onlyRole(RELAYER_ROLE) {\\n _relayVotesBySignatures(_ballot, _signatures, _getMinimumVoteWeight(), DOMAIN_SEPARATOR);\\n TransparentUpgradeableProxyV2(payable(bridgeContract())).functionDelegateCall(\\n abi.encodeWithSelector(_bridgeContract.replaceBridgeOperators.selector, _ballot.operators)\\n );\\n }\\n\\n /**\\n * @inheritdoc GovernanceRelay\\n */\\n function _sumWeights(address[] memory _governors) internal view virtual override returns (uint256) {\\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\\n abi.encodeWithSelector(\\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\\n 0x4bb5274a,\\n abi.encodeWithSelector(IRoninTrustedOrganization.sumGovernorWeights.selector, _governors)\\n )\\n );\\n require(_success, \\\"MainchainGovernanceAdmin: proxy call `sumGovernorWeights(address[])` failed\\\");\\n return abi.decode(_returndata, (uint256));\\n }\\n\\n /**\\n * @inheritdoc BOsGovernanceRelay\\n */\\n function _sumBridgeVoterWeights(address[] memory _governors) internal view virtual override returns (uint256) {\\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\\n abi.encodeWithSelector(\\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\\n 0x4bb5274a,\\n abi.encodeWithSelector(IRoninTrustedOrganization.sumBridgeVoterWeights.selector, _governors)\\n )\\n );\\n require(_success, \\\"MainchainGovernanceAdmin: proxy call `sumBridgeVoterWeights(address[])` failed\\\");\\n return abi.decode(_returndata, (uint256));\\n }\\n\\n /**\\n * @dev See {CoreGovernance-_getChainType}\\n */\\n function _getChainType() internal pure override returns (ChainType) {\\n return ChainType.Mainchain;\\n }\\n}\\n\",\"keccak256\":\"0x71d9d58983c0257405d85db96d2c0f07e3ef31c0e6fad4f96f15af1844e31a12\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162004acb38038062004acb833981016040819052620000349162000420565b848383600160ff1b806200004781600455565b506007849055604080516020808201839052601660608301527f524f4e494e5f474f5645524e414e43455f41444d494e000000000000000000006080808401919091528284018890528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527f7e7935007966eb860f4a2ee3dcc9fd53fb3205ce2aa86b0126d4893d4d4c14b960e08401527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5610100840152610120808401919091528351808403909101815261014090920190925280519101206008556200014983620001e4565b620001548262000239565b506200016892506000915086905062000288565b60005b8151811015620001d857620001c37fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4838381518110620001af57620001af62000537565b60200260200101516200029860201b60201c565b80620001cf816200054d565b9150506200016b565b50505050505062000575565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527ffd6f5f93d69a07c593a09be0b208bff13ab4ffd6017df3b33433d63bdc59b4d7906020015b60405180910390a150565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f5cbd8a0bb00196365d5eb3457c6734e7f06666c3c78e5469b4c9deec7edae048906020016200022e565b62000294828262000298565b5050565b620002af8282620002db60201b62000c041760201c565b6000828152600160209081526040909120620002d691839062000c886200037b821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000294576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620003373390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000392836001600160a01b0384166200039b565b90505b92915050565b6000818152600183016020526040812054620003e45750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000395565b50600062000395565b80516001600160a01b03811681146200040557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080600060a086880312156200043957600080fd5b8551945060206200044c818801620003ed565b94506200045c60408801620003ed565b93506200046c60608801620003ed565b60808801519093506001600160401b03808211156200048a57600080fd5b818901915089601f8301126200049f57600080fd5b815181811115620004b457620004b46200040a565b8060051b604051601f19603f83011681018181108582111715620004dc57620004dc6200040a565b60405291825284820192508381018501918c831115620004fb57600080fd5b938501935b8285101562000524576200051485620003ed565b8452938501939285019262000500565b8096505050505050509295509295909350565b634e487b7160e01b600052603260045260246000fd5b6000600182016200056e57634e487b7160e01b600052601160045260246000fd5b5060010190565b61454680620005856000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637eff275e11610104578063b5e337de116100a2578063cd59658311610071578063cd59658314610429578063d547741f1461043a578063f3b7dead1461044d578063f589262d1461046057600080fd5b8063b5e337de146103e8578063bc96180b146103fb578063beb3a6a114610403578063ca15c8731461041657600080fd5b806391d14854116100de57806391d148541461035d578063926d7d7f14610370578063a217fddf14610385578063b384abef1461038d57600080fd5b80637eff275e146103245780638fb7ac7c146103375780639010d07c1461034a57600080fd5b806334d5f37b116101715780635511cde11161014b5780635511cde1146102d85780635e05cf9e146102e957806362e52e5f146102fc5780637d465f791461031157600080fd5b806334d5f37b1461029c5780633644e515146102bc57806336568abe146102c557600080fd5b8063204e1c7a116101ad578063204e1c7a14610228578063248a9ca3146102535780632e96a6fb146102765780632f2ff15d1461028957600080fd5b806301ffc9a7146101d45780630b26cf66146101fc57806317ce2dd414610211575b600080fd5b6101e76101e2366004613557565b610473565b60405190151581526020015b60405180910390f35b61020f61020a366004613596565b61049e565b005b61021a60075481565b6040519081526020016101f3565b61023b610236366004613596565b6104fc565b6040516001600160a01b0390911681526020016101f3565b61021a6102613660046135b3565b60009081526020819052604090206001015490565b61020f6102843660046135b3565b6105ee565b61020f6102973660046135cc565b610616565b61021a6102aa3660046135b3565b60026020526000908152604090205481565b61021a60085481565b61020f6102d33660046135cc565b610640565b6005546001600160a01b031661023b565b61020f6102f736600461368b565b6106be565b6103046106ef565b6040516101f3919061376b565b61020f61031f36600461379a565b610791565b61020f6103323660046137dd565b6107d8565b6101e761034536600461380b565b610904565b61023b61035836600461380b565b61093e565b6101e761036b3660046135cc565b61095d565b61021a6000805160206144f183398151915281565b61021a600081565b6103d761039b36600461380b565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101f3959493929190613843565b61020f6103f6366004613596565b610986565b61021a6109d8565b6101e761041136600461380b565b6109e8565b61021a6104243660046135b3565b610a19565b6006546001600160a01b031661023b565b61020f6104483660046135cc565b610a30565b61023b61045b366004613596565b610a55565b61020f61046e366004613878565b610b22565b60006001600160e01b03198216635a05180f60e01b1480610498575061049882610c9d565b92915050565b3330146104c65760405162461bcd60e51b81526004016104bd906138e8565b60405180910390fd5b6000816001600160a01b03163b116104f05760405162461bcd60e51b81526004016104bd9061392f565b6104f981610cd2565b50565b6000806000836001600160a01b031660405161052290635c60da1b60e01b815260040190565b600060405180830381855afa9150503d806000811461055d576040519150601f19603f3d011682016040523d82523d6000602084013e610562565b606091505b5091509150816105d25760405162461bcd60e51b815260206004820152603560248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c2060696d706044820152741b195b595b9d185d1a5bdb8a0a580819985a5b1959605a1b60648201526084016104bd565b808060200190518101906105e69190613973565b949350505050565b33301461060d5760405162461bcd60e51b81526004016104bd906138e8565b6104f981600455565b60008281526020819052604090206001015461063181610d27565b61063b8383610d31565b505050565b6001600160a01b03811633146106b05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104bd565b6106ba8282610d53565b5050565b6000805160206144f18339815191526106d681610d27565b6106e7868686868660085433610d75565b505050505050565b61071360405180606001604052806000815260200160008152602001606081525090565b60408051606081018252600980548252600a54602080840191909152600b8054855181840281018401875281815294959394938601939283018282801561078357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610765575b505050505081525050905090565b6000805160206144f18339815191526107a981610d27565b6106e786868686866008546107c66005546001600160a01b031690565b6006546001600160a01b031633610dd5565b3330146107f75760405162461bcd60e51b81526004016104bd906138e8565b604080516001600160a01b0383811660248084019190915283518084039091018152604490920183526020820180516001600160e01b03166308f2839760e41b179052915160009285169161084b916139b4565b6000604051808303816000865af19150503d8060008114610888576040519150601f19603f3d011682016040523d82523d6000602084013e61088d565b606091505b505090508061063b5760405162461bcd60e51b815260206004820152603960248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c206063686160448201527f6e676541646d696e28616464726573732960206661696c65640000000000000060648201526084016104bd565b600080600084815260036020908152604080832086845290915290205460ff1660048111156109355761093561382d565b14159392505050565b60008281526001602052604081206109569083610e36565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3330146109a55760405162461bcd60e51b81526004016104bd906138e8565b6000816001600160a01b03163b116109cf5760405162461bcd60e51b81526004016104bd9061392f565b6104f981610e42565b60006109e360045490565b905090565b6000806000848152600c6020908152604080832086845290915290205460ff1660048111156109355761093561382d565b600081815260016020526040812061049890610e90565b600082815260208190526040902060010154610a4b81610d27565b61063b8383610d53565b6000806000836001600160a01b0316604051610a7b906303e1469160e61b815260040190565b600060405180830381855afa9150503d8060008114610ab6576040519150601f19603f3d011682016040523d82523d6000602084013e610abb565b606091505b5091509150816105d25760405162461bcd60e51b815260206004820152602c60248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c206061646d60448201526b1a5b8a0a580819985a5b195960a21b60648201526084016104bd565b6000805160206144f1833981519152610b3a81610d27565b610b50848484610b48610e9a565b600854611006565b6006546001600160a01b0316634bb5274a63901d627760e01b610b7660408801886139d0565b604051602401610b87929190613a19565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199485161790525160e084901b9092168252610bcc91600401613a93565b600060405180830381600087803b158015610be657600080fd5b505af1158015610bfa573d6000803e3d6000fd5b5050505050505050565b610c0e828261095d565b6106ba576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610956836001600160a01b0384166114b7565b60006001600160e01b03198216637965db0b60e01b148061049857506301ffc9a760e01b6001600160e01b0319831614610498565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f5cbd8a0bb00196365d5eb3457c6734e7f06666c3c78e5469b4c9deec7edae048906020015b60405180910390a150565b6104f98133611506565b610d3b8282610c04565b600082815260016020526040902061063b9082610c88565b610d5d828261156a565b600082815260016020526040902061063b90826115cf565b610d87610d8188613d00565b826115e4565b506000610d9b610d9689613d00565b6116cc565b9050610bfa610da989613d00565b88888888610dc189610dbc89600061186b565b6118c1565b610dd08a610dbc8a600161186b565b6118e8565b6000610deb610de38b613e45565b858585611d76565b5090506000610e01610dfc8c613e45565b611e6b565b9050610e29828b8b8b8b610e1a8c610dbc89600061186b565b610dd08d610dbc8a600161186b565b5050505050505050505050565b60006109568383611fc5565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527ffd6f5f93d69a07c593a09be0b208bff13ab4ffd6017df3b33433d63bdc59b4d790602001610d1c565b6000610498825490565b6000806000610eb16005546001600160a01b031690565b6040805160048152602480820183526020820180516001600160e01b0316637de5dedd60e01b17905291516001600160a01b039390931692634bb5274a92610efa929101613a93565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610f3391906139b4565b600060405180830381855afa9150503d8060008114610f6e576040519150601f19603f3d011682016040523d82523d6000602084013e610f73565b606091505b509150915081610feb5760405162461bcd60e51b815260206004820152603860248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c20606d696e60448201527f696d756d566f7465576569676874282960206661696c6564000000000000000060648201526084016104bd565b80806020019051810190610fff9190613f0f565b9250505090565b60095485351080159061101e5750600a546020860135115b6110905760405162461bcd60e51b815260206004820152603a60248201527f424f73476f7665726e616e636552656c61793a20717565727920666f72206f7560448201527f74646174656420627269646765206f70657261746f722073657400000000000060648201526084016104bd565b61109985611fef565b61114e6110a960408701876139d0565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b80546040805160208084028201810190925282815294509192509083018282801561112e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611110575b505050505081516020908102928101929092208151830291909201201490565b156111c15760405162461bcd60e51b815260206004820152603860248201527f424f73476f7665726e616e636552656c61793a20627269646765206f7065726160448201527f746f722073657420697320616c726561647920766f746564000000000000000060648201526084016104bd565b8261121f5760405162461bcd60e51b815260206004820152602860248201527f424f73476f7665726e616e636552656c61793a20696e76616c696420617272616044820152670f240d8cadccee8d60c31b60648201526084016104bd565b366000846001600160401b0381111561123a5761123a613aa6565b604051908082528060200260200182016040528015611263578160200160208202803683370190505b509050600080611272896121af565b9050600061128086836118c1565b905060005b888110156113af5789898281811061129f5761129f613f28565b6060029190910196506112ca9050826112bb6020890189613f3e565b88602001358960400135612261565b8582815181106112dc576112dc613f28565b60200260200101906001600160a01b031690816001600160a01b03168152505084818151811061130e5761130e613f28565b60200260200101516001600160a01b0316846001600160a01b0316106113805760405162461bcd60e51b815260206004820152602160248201527f424f73476f7665726e616e636552656c61793a20696e76616c6964206f7264656044820152603960f91b60648201526084016104bd565b84818151811061139257611392613f28565b6020026020010151935080806113a790613f77565b915050611285565b5089356000908152600c60209081526040808320828e013584529091528120906113d886612289565b905088811061146857600081116114415760405162461bcd60e51b815260206004820152602760248201527f424f73476f7665726e616e636552656c61793a20696e76616c696420766f7465604482015266081dd95a59da1d60ca1b60648201526084016104bd565b815460ff191660011782558b60096114598282613fb4565b905050505050505050506114b0565b60405162461bcd60e51b815260206004820181905260248201527f424f73476f7665726e616e636552656c61793a2072656c6179206661696c656460448201526064016104bd565b5050505050565b60008181526001830160205260408120546114fe57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610498565b506000610498565b611510828261095d565b6106ba57611528816001600160a01b03166014612424565b611533836020612424565b604051602001611544929190614087565b60408051601f198184030181529082905262461bcd60e51b82526104bd91600401613a93565b611574828261095d565b156106ba576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610956836001600160a01b0384166125bf565b602082015160009080820361163b5760405162461bcd60e51b815260206004820181905260248201527f436f7265476f7665726e616e63653a20696e76616c696420636861696e20696460448201526064016104bd565b6004546116499085906126b2565b6000611654856116cc565b9050611665828287604001516127ae565b855190935083146116885760405162461bcd60e51b81526004016104bd906140fc565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516116bc929190614250565b60405180910390a4505092915050565b6000806000806000808660800151905060008760600151905060008860a00151516001600160401b0381111561170457611704613aa6565b60405190808252806020026020018201604052801561172d578160200160208202803683370190505b5060c08a015190915060005b8251811015611796578a60a00151818151811061175857611758613f28565b60200260200101518051906020012083828151811061177957611779613f28565b60209081029190910101528061178e81613f77565b915050611739565b506020835102602084012097506020845102602085012096506020825102602083012095506020815102602082012094507fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a60001b8a600001518b602001518c604001518b8b8b8b604051602001611846989796959493929190978852602088019690965260408701949094526060860192909252608085015260a084015260c083015260e08201526101000190565b6040516020818303038152906040528051906020012098505050505050505050919050565b6040516000906118a3907fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2908590859060200161428a565b60405160208183030381529060405280519060200120905092915050565b60405161190160f01b602082015260228101839052604281018290526000906062016118a3565b84158015906118f657508483145b6119505760405162461bcd60e51b815260206004820152602560248201527f476f7665726e616e636552656c61793a20696e76616c6964206172726179206c6044820152640cadccee8d60db1b60648201526084016104bd565b60008080856001600160401b0381111561196c5761196c613aa6565b604051908082528060200260200182016040528015611995578160200160208202803683370190505b5090506000866001600160401b038111156119b2576119b2613aa6565b6040519080825280602002602001820160405280156119db578160200160208202803683370190505b50905060008060003660005b8b811015611bd1578c8c82818110611a0157611a01613f28565b90506060020191508e8e82818110611a1b57611a1b613f28565b9050602002016020810190611a3091906142af565b92506000836001811115611a4657611a4661382d565b03611ab057611a6b8b611a5c6020850185613f3e565b84602001358560400135612261565b945084878a611a7981613f77565b9b5081518110611a8b57611a8b613f28565b60200260200101906001600160a01b031690816001600160a01b031681525050611b5b565b6001836001811115611ac457611ac461382d565b03611afa57611ada8a611a5c6020850185613f3e565b9450848689611ae881613f77565b9a5081518110611a8b57611a8b613f28565b60405162461bcd60e51b815260206004820152603060248201527f476f7665726e616e636552656c61793a20717565727920666f7220756e73757060448201526f706f7274656420766f7465207479706560801b60648201526084016104bd565b846001600160a01b0316846001600160a01b031610611bbc5760405162461bcd60e51b815260206004820152601e60248201527f476f7665726e616e636552656c61793a20696e76616c6964206f72646572000060448201526064016104bd565b84935080611bc981613f77565b9150506119e7565b50505085845250508281526020808c015160009081526003825260408082208e51835290925290812090611c03610e9a565b90506000611c10856128c9565b9050818110611c885760008111611c395760405162461bcd60e51b81526004016104bd906142cc565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2611c7c838f612a4d565b50505050505050611d6d565b600082611c93612aba565b611c9d9190614310565b611ca8906001614323565b90506000611cb5866128c9565b9050818110611d255760008111611cde5760405162461bcd60e51b81526004016104bd906142cc565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611d6d565b60405162461bcd60e51b815260206004820152601d60248201527f476f7665726e616e636552656c61793a2072656c6179206661696c656400000060448201526064016104bd565b50505050505050565b611db66040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b6000611dc3868686612c01565b9150611dda600454836126b290919063ffffffff16565b6000611de5836116cc565b9050611df760008289602001516127ae565b83519092508214611e1a5760405162461bcd60e51b81526004016104bd906140fc565b80827f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85611e478b611e6b565b8b89604051611e599493929190614336565b60405180910390a35094509492505050565b6000806000806000808660600151905060008760400151905060008860800151516001600160401b03811115611ea357611ea3613aa6565b604051908082528060200260200182016040528015611ecc578160200160208202803683370190505b5060a08a015190915060005b8251811015611f35578a608001518181518110611ef757611ef7613f28565b602002602001015180519060200120838281518110611f1857611f18613f28565b602090810291909101015280611f2d81613f77565b915050611ed8565b5082516020908102848201208551820286830120845183028584012084518402858501208e518f860151604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413509881019890985287019190915260608601526080850184905260a0850183905260c0850182905260e08501819052929b509099509750955061010001611846565b6000826000018281548110611fdc57611fdc613f28565b9060005260206000200154905092915050565b6000611ffe60408301836139d0565b9050116120615760405162461bcd60e51b815260206004820152602b60248201527f4272696467654f70657261746f727342616c6c6f743a20696e76616c6964206160448201526a0e4e4c2f240d8cadccee8d60ab1b60648201526084016104bd565b600061207060408301836139d0565b600081811061208157612081613f28565b90506020020160208101906120969190613596565b905060015b6120a860408401846139d0565b905081101561063b576120be60408401846139d0565b828181106120ce576120ce613f28565b90506020020160208101906120e39190613596565b6001600160a01b0316826001600160a01b0316106121695760405162461bcd60e51b815260206004820152603860248201527f4272696467654f70657261746f727342616c6c6f743a20696e76616c6964206f60448201527f72646572206f6620627269646765206f70657261746f7273000000000000000060648201526084016104bd565b61217660408401846139d0565b8281811061218657612186613f28565b905060200201602081019061219b9190613596565b9150806121a781613f77565b91505061209b565b600080806121c060408501856139d0565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250508251602090810293810193909320604080517fd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a818701528935818301529885013560608a01526080808a01929092528051808a03909201825260a0909801909752505084519401939093209392505050565b600080600061227287878787612e07565b9150915061227f81612ef4565b5095945050505050565b60008060006122a06005546001600160a01b031690565b6001600160a01b0316634bb5274a63d9d5dadb60e01b866040516024016122c7919061441d565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516123089190602401613a93565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161234191906139b4565b600060405180830381855afa9150503d806000811461237c576040519150601f19603f3d011682016040523d82523d6000602084013e612381565b606091505b5091509150816124105760405162461bcd60e51b815260206004820152604e60248201527f4d61696e636861696e476f7665726e616e636541646d696e3a2070726f78792060448201527f63616c6c206073756d427269646765566f74657257656967687473286164647260648201526d195cdcd6d74a580819985a5b195960921b608482015260a4016104bd565b808060200190518101906105e69190613f0f565b60606000612433836002613f90565b61243e906002614323565b6001600160401b0381111561245557612455613aa6565b6040519080825280601f01601f19166020018201604052801561247f576020820181803683370190505b509050600360fc1b8160008151811061249a5761249a613f28565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106124c9576124c9613f28565b60200101906001600160f81b031916908160001a90535060006124ed846002613f90565b6124f8906001614323565b90505b6001811115612570576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061252c5761252c613f28565b1a60f81b82828151811061254257612542613f28565b60200101906001600160f81b031916908160001a90535060049490941c936125698161446a565b90506124fb565b5083156109565760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104bd565b600081815260018301602052604081205480156126a85760006125e3600183614310565b85549091506000906125f790600190614310565b905081811461265c57600086600001828154811061261757612617613f28565b906000526020600020015490508087600001848154811061263a5761263a613f28565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061266d5761266d614481565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610498565b6000915050610498565b60008260600151511180156126d05750816080015151826060015151145b80156126e557508160a0015151826060015151145b80156126fa57508160c0015151826060015151145b6127465760405162461bcd60e51b815260206004820152601e60248201527f50726f706f73616c3a20696e76616c6964206172726179206c656e677468000060448201526064016104bd565b6127508142614323565b826040015111156106ba5760405162461bcd60e51b815260206004820152602260248201527f50726f706f73616c3a20696e76616c6964206578706972792074696d6573746160448201526106d760f41b60648201526084016104bd565b600083815260026020526040812054908190036127df5750600083815260026020526040902060019081905561289e565b60008481526003602090815260408083208484529091528120906000825460ff1660048111156128115761281161382d565b036128785760405162461bcd60e51b815260206004820152603160248201527f436f7265476f7665726e616e63653a2063757272656e742070726f706f73616c604482015270081a5cc81b9bdd0818dbdb5c1b195d1959607a1b60648201526084016104bd565b6000868152600260205260408120805490919061289490613f77565b9182905550925050505b6000938452600360209081526040808620838752909152909320600181019290925560069091015590565b60008060006128e06005546001600160a01b031690565b6001600160a01b0316634bb5274a635f14a1c360e01b86604051602401612907919061441d565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516129489190602401613a93565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161298191906139b4565b600060405180830381855afa9150503d80600081146129bc576040519150601f19603f3d011682016040523d82523d6000602084013e6129c1565b606091505b5091509150816124105760405162461bcd60e51b815260206004820152604b60248201527f4d61696e636861696e476f7665726e616e636541646d696e3a2070726f78792060448201527f63616c6c206073756d476f7665726e6f7257656967687473286164647265737360648201526a16d74a580819985a5b195960aa1b608482015260a4016104bd565b612a5681613268565b156106ba57815460ff19166002178255600080612a7283613282565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051612aac929190614497565b60405180910390a250505050565b6000806000612ad16005546001600160a01b031690565b6040805160048152602480820183526020820180516001600160e01b031663926323d560e01b17905291516001600160a01b039390931692634bb5274a92612b1a929101613a93565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612b5391906139b4565b600060405180830381855afa9150503d8060008114612b8e576040519150601f19603f3d011682016040523d82523d6000602084013e612b93565b606091505b509150915081610feb5760405162461bcd60e51b815260206004820152603360248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c2060746f74604482015272185b15d95a59da1d1cca0a580819985a5b1959606a1b60648201526084016104bd565b612c416040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b83518152602080850151604080840191909152600091830191909152840151516001600160401b03811115612c7857612c78613aa6565b604051908082528060200260200182016040528015612ca1578160200160208202803683370190505b5060608083019190915284015160808083019190915284015160a08083019190915284015160c082015260005b846040015151811015612dff57600185604001518281518110612cf357612cf3613f28565b60200260200101516001811115612d0c57612d0c61382d565b03612d4d578282606001518281518110612d2857612d28613f28565b60200260200101906001600160a01b031690816001600160a01b031681525050612ded565b600085604001518281518110612d6557612d65613f28565b60200260200101516001811115612d7e57612d7e61382d565b03612d9a578382606001518281518110612d2857612d28613f28565b60405162461bcd60e51b815260206004820152602260248201527f476c6f62616c50726f706f73616c3a20756e737570706f727465642074617267604482015261195d60f21b60648201526084016104bd565b80612df781613f77565b915050612cce565b509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612e3e5750600090506003612eeb565b8460ff16601b14158015612e5657508460ff16601c14155b15612e675750600090506004612eeb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612ebb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612ee457600060019250925050612eeb565b9150600090505b94509492505050565b6000816004811115612f0857612f0861382d565b03612f105750565b6001816004811115612f2457612f2461382d565b03612f715760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104bd565b6002816004811115612f8557612f8561382d565b03612fd25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104bd565b6003816004811115612fe657612fe661382d565b0361303e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104bd565b60048160048111156130525761305261382d565b036104f95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104bd565b6004830154811015613163578260080160008460040183815481106130d1576130d1613f28565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061311a5761311a613f28565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018101829055600201558061315b81613f77565b9150506130aa565b5060005b60058301548110156132205782600801600084600501838154811061318e5761318e613f28565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106131d7576131d7613f28565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018101829055600201558061321881613f77565b915050613167565b50815460ff19168255600060018301819055600283018190556003830181905561324e906004840190613525565b61325c600583016000613525565b60006006830155919050565b600081602001516000148061049857505060200151461490565b60608061328e83613268565b6132e65760405162461bcd60e51b815260206004820152602360248201527f50726f706f73616c3a20717565727920666f7220696e76616c696420636861696044820152621b925960ea1b60648201526084016104bd565b8260600151516001600160401b0381111561330357613303613aa6565b60405190808252806020026020018201604052801561332c578160200160208202803683370190505b5091508260600151516001600160401b0381111561334c5761334c613aa6565b60405190808252806020026020018201604052801561337f57816020015b606081526020019060019003908161336a5790505b50905060005b83606001515181101561351f578360c0015181815181106133a8576133a8613f28565b60200260200101515a116133fe5760405162461bcd60e51b815260206004820152601a60248201527f50726f706f73616c3a20696e73756666696369656e742067617300000000000060448201526064016104bd565b8360600151818151811061341457613414613f28565b60200260200101516001600160a01b03168460800151828151811061343b5761343b613f28565b60200260200101518560c00151838151811061345957613459613f28565b6020026020010151908660a00151848151811061347857613478613f28565b602002602001015160405161348d91906139b4565b600060405180830381858888f193505050503d80600081146134cb576040519150601f19603f3d011682016040523d82523d6000602084013e6134d0565b606091505b508483815181106134e3576134e3613f28565b602002602001018484815181106134fc576134fc613f28565b6020908102919091010191909152901515905261351881613f77565b9050613385565b50915091565b50805460008255906000526020600020908101906104f991905b80821115613553576000815560010161353f565b5090565b60006020828403121561356957600080fd5b81356001600160e01b03198116811461095657600080fd5b6001600160a01b03811681146104f957600080fd5b6000602082840312156135a857600080fd5b813561095681613581565b6000602082840312156135c557600080fd5b5035919050565b600080604083850312156135df57600080fd5b8235915060208301356135f181613581565b809150509250929050565b60008083601f84011261360e57600080fd5b5081356001600160401b0381111561362557600080fd5b6020830191508360208260051b850101111561364057600080fd5b9250929050565b60008083601f84011261365957600080fd5b5081356001600160401b0381111561367057600080fd5b60208301915083602060608302850101111561364057600080fd5b6000806000806000606086880312156136a357600080fd5b85356001600160401b03808211156136ba57600080fd5b9087019060e0828a0312156136ce57600080fd5b909550602087013590808211156136e457600080fd5b6136f089838a016135fc565b9096509450604088013591508082111561370957600080fd5b5061371688828901613647565b969995985093965092949392505050565b600081518084526020808501945080840160005b838110156137605781516001600160a01b03168752958201959082019060010161373b565b509495945050505050565b602081528151602082015260208201516040820152600060408301516060808401526105e66080840182613727565b6000806000806000606086880312156137b257600080fd5b85356001600160401b03808211156137c957600080fd5b9087019060c0828a0312156136ce57600080fd5b600080604083850312156137f057600080fd5b82356137fb81613581565b915060208301356135f181613581565b6000806040838503121561381e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106138575761385761382d565b95815260208101949094526040840192909252606083015260809091015290565b60008060006040848603121561388d57600080fd5b83356001600160401b03808211156138a457600080fd5b90850190606082880312156138b857600080fd5b909350602085013590808211156138ce57600080fd5b506138db86828701613647565b9497909650939450505050565b60208082526027908201527f476f7665726e616e636541646d696e3a206f6e6c7920616c6c6f7765642073656040820152661b198b58d85b1b60ca1b606082015260800190565b60208082526024908201527f476f7665726e616e636541646d696e3a2073657420746f206e6f6e2d636f6e746040820152631c9858dd60e21b606082015260800190565b60006020828403121561398557600080fd5b815161095681613581565b60005b838110156139ab578181015183820152602001613993565b50506000910152565b600082516139c6818460208701613990565b9190910192915050565b6000808335601e198436030181126139e757600080fd5b8301803591506001600160401b03821115613a0157600080fd5b6020019150600581901b360382131561364057600080fd5b60208082528181018390526000908460408401835b86811015613a5c578235613a4181613581565b6001600160a01b031682529183019190830190600101613a2e565b509695505050505050565b60008151808452613a7f816020860160208601613990565b601f01601f19169290920160200192915050565b6020815260006109566020830184613a67565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613ade57613ade613aa6565b60405290565b60405160c081016001600160401b0381118282101715613ade57613ade613aa6565b604051601f8201601f191681016001600160401b0381118282101715613b2e57613b2e613aa6565b604052919050565b60006001600160401b03821115613b4f57613b4f613aa6565b5060051b60200190565b600082601f830112613b6a57600080fd5b81356020613b7f613b7a83613b36565b613b06565b82815260059290921b84018101918181019086841115613b9e57600080fd5b8286015b84811015613a5c578035613bb581613581565b8352918301918301613ba2565b600082601f830112613bd357600080fd5b81356020613be3613b7a83613b36565b82815260059290921b84018101918181019086841115613c0257600080fd5b8286015b84811015613a5c5780358352918301918301613c06565b6000601f8381840112613c2f57600080fd5b82356020613c3f613b7a83613b36565b82815260059290921b85018101918181019087841115613c5e57600080fd5b8287015b84811015613cf45780356001600160401b0380821115613c825760008081fd5b818a0191508a603f830112613c975760008081fd5b85820135604082821115613cad57613cad613aa6565b613cbe828b01601f19168901613b06565b92508183528c81838601011115613cd55760008081fd5b8181850189850137506000908201870152845250918301918301613c62565b50979650505050505050565b600060e08236031215613d1257600080fd5b613d1a613abc565b82358152602083013560208201526040830135604082015260608301356001600160401b0380821115613d4c57600080fd5b613d5836838701613b59565b60608401526080850135915080821115613d7157600080fd5b613d7d36838701613bc2565b608084015260a0850135915080821115613d9657600080fd5b613da236838701613c1d565b60a084015260c0850135915080821115613dbb57600080fd5b50613dc836828601613bc2565b60c08301525092915050565b600281106104f957600080fd5b600082601f830112613df257600080fd5b81356020613e02613b7a83613b36565b82815260059290921b84018101918181019086841115613e2157600080fd5b8286015b84811015613a5c578035613e3881613dd4565b8352918301918301613e25565b600060c08236031215613e5757600080fd5b613e5f613ae4565b823581526020830135602082015260408301356001600160401b0380821115613e8757600080fd5b613e9336838701613de1565b60408401526060850135915080821115613eac57600080fd5b613eb836838701613bc2565b60608401526080850135915080821115613ed157600080fd5b613edd36838701613c1d565b608084015260a0850135915080821115613ef657600080fd5b50613f0336828601613bc2565b60a08301525092915050565b600060208284031215613f2157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613f5057600080fd5b813560ff8116811461095657600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613f8957613f89613f61565b5060010190565b808202811582820484141761049857610498613f61565b6000813561049881613581565b81358155600160208084013582840155600283016040850135601e19863603018112613fdf57600080fd5b850180356001600160401b03811115613ff757600080fd5b83820191508060051b360382131561400e57600080fd5b6801000000000000000081111561402757614027613aa6565b82548184558082101561405b5760008481528581208381019083015b808210156140575782825590880190614043565b5050505b50600092835260208320925b81811015610bfa5761407883613fa7565b84820155918401918501614067565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516140bf816017850160208801613990565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516140f0816028840160208801613990565b01602801949350505050565b60208082526026908201527f436f7265476f7665726e616e63653a20696e76616c69642070726f706f73616c604082015265206e6f6e636560d01b606082015260800190565b600081518084526020808501945080840160005b8381101561376057815187529582019590820190600101614156565b600081518084526020808501808196508360051b8101915082860160005b858110156141ba5782840389526141a8848351613a67565b98850198935090840190600101614190565b5091979650505050505050565b8051825260208101516020830152604081015160408301526000606082015160e060608501526141fa60e0850182613727565b9050608083015184820360808601526142138282614142565b91505060a083015184820360a086015261422d8282614172565b91505060c083015184820360c08601526142478282614142565b95945050505050565b60408152600061426360408301856141c7565b905060018060a01b03831660208301529392505050565b600281106104f9576104f961382d565b83815260208101839052606081016142a18361427a565b826040830152949350505050565b6000602082840312156142c157600080fd5b813561095681613dd4565b60208082526024908201527f476f7665726e616e636552656c61793a20696e76616c696420766f74652077656040820152631a59da1d60e21b606082015260800190565b8181038181111561049857610498613f61565b8082018082111561049857610498613f61565b60808152600061434960808301876141c7565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156143b357835161439d8161427a565b825292840192600192909201919084019061438a565b506060890151935084810360608601526143cd8185614142565b9350505050608086015182820360808401526143e98282614172565b91505060a086015182820360a08401526144038282614142565b935050505061424760608301846001600160a01b03169052565b6020808252825182820181905260009190848201906040850190845b8181101561445e5783516001600160a01b031683529284019291840191600101614439565b50909695505050505050565b60008161447957614479613f61565b506000190190565b634e487b7160e01b600052603160045260246000fd5b604080825283519082018190526000906020906060840190828701845b828110156144d25781511515845292840192908401906001016144b4565b505050838103828501526144e68186614172565b969550505050505056fee2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4a2646970667358221220a83afd5b06d0413b16b474a7c5329e6e2d39b5511777f91e449ffa60a30c8fdb64736f6c63430008110033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637eff275e11610104578063b5e337de116100a2578063cd59658311610071578063cd59658314610429578063d547741f1461043a578063f3b7dead1461044d578063f589262d1461046057600080fd5b8063b5e337de146103e8578063bc96180b146103fb578063beb3a6a114610403578063ca15c8731461041657600080fd5b806391d14854116100de57806391d148541461035d578063926d7d7f14610370578063a217fddf14610385578063b384abef1461038d57600080fd5b80637eff275e146103245780638fb7ac7c146103375780639010d07c1461034a57600080fd5b806334d5f37b116101715780635511cde11161014b5780635511cde1146102d85780635e05cf9e146102e957806362e52e5f146102fc5780637d465f791461031157600080fd5b806334d5f37b1461029c5780633644e515146102bc57806336568abe146102c557600080fd5b8063204e1c7a116101ad578063204e1c7a14610228578063248a9ca3146102535780632e96a6fb146102765780632f2ff15d1461028957600080fd5b806301ffc9a7146101d45780630b26cf66146101fc57806317ce2dd414610211575b600080fd5b6101e76101e2366004613557565b610473565b60405190151581526020015b60405180910390f35b61020f61020a366004613596565b61049e565b005b61021a60075481565b6040519081526020016101f3565b61023b610236366004613596565b6104fc565b6040516001600160a01b0390911681526020016101f3565b61021a6102613660046135b3565b60009081526020819052604090206001015490565b61020f6102843660046135b3565b6105ee565b61020f6102973660046135cc565b610616565b61021a6102aa3660046135b3565b60026020526000908152604090205481565b61021a60085481565b61020f6102d33660046135cc565b610640565b6005546001600160a01b031661023b565b61020f6102f736600461368b565b6106be565b6103046106ef565b6040516101f3919061376b565b61020f61031f36600461379a565b610791565b61020f6103323660046137dd565b6107d8565b6101e761034536600461380b565b610904565b61023b61035836600461380b565b61093e565b6101e761036b3660046135cc565b61095d565b61021a6000805160206144f183398151915281565b61021a600081565b6103d761039b36600461380b565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516101f3959493929190613843565b61020f6103f6366004613596565b610986565b61021a6109d8565b6101e761041136600461380b565b6109e8565b61021a6104243660046135b3565b610a19565b6006546001600160a01b031661023b565b61020f6104483660046135cc565b610a30565b61023b61045b366004613596565b610a55565b61020f61046e366004613878565b610b22565b60006001600160e01b03198216635a05180f60e01b1480610498575061049882610c9d565b92915050565b3330146104c65760405162461bcd60e51b81526004016104bd906138e8565b60405180910390fd5b6000816001600160a01b03163b116104f05760405162461bcd60e51b81526004016104bd9061392f565b6104f981610cd2565b50565b6000806000836001600160a01b031660405161052290635c60da1b60e01b815260040190565b600060405180830381855afa9150503d806000811461055d576040519150601f19603f3d011682016040523d82523d6000602084013e610562565b606091505b5091509150816105d25760405162461bcd60e51b815260206004820152603560248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c2060696d706044820152741b195b595b9d185d1a5bdb8a0a580819985a5b1959605a1b60648201526084016104bd565b808060200190518101906105e69190613973565b949350505050565b33301461060d5760405162461bcd60e51b81526004016104bd906138e8565b6104f981600455565b60008281526020819052604090206001015461063181610d27565b61063b8383610d31565b505050565b6001600160a01b03811633146106b05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104bd565b6106ba8282610d53565b5050565b6000805160206144f18339815191526106d681610d27565b6106e7868686868660085433610d75565b505050505050565b61071360405180606001604052806000815260200160008152602001606081525090565b60408051606081018252600980548252600a54602080840191909152600b8054855181840281018401875281815294959394938601939283018282801561078357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610765575b505050505081525050905090565b6000805160206144f18339815191526107a981610d27565b6106e786868686866008546107c66005546001600160a01b031690565b6006546001600160a01b031633610dd5565b3330146107f75760405162461bcd60e51b81526004016104bd906138e8565b604080516001600160a01b0383811660248084019190915283518084039091018152604490920183526020820180516001600160e01b03166308f2839760e41b179052915160009285169161084b916139b4565b6000604051808303816000865af19150503d8060008114610888576040519150601f19603f3d011682016040523d82523d6000602084013e61088d565b606091505b505090508061063b5760405162461bcd60e51b815260206004820152603960248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c206063686160448201527f6e676541646d696e28616464726573732960206661696c65640000000000000060648201526084016104bd565b600080600084815260036020908152604080832086845290915290205460ff1660048111156109355761093561382d565b14159392505050565b60008281526001602052604081206109569083610e36565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3330146109a55760405162461bcd60e51b81526004016104bd906138e8565b6000816001600160a01b03163b116109cf5760405162461bcd60e51b81526004016104bd9061392f565b6104f981610e42565b60006109e360045490565b905090565b6000806000848152600c6020908152604080832086845290915290205460ff1660048111156109355761093561382d565b600081815260016020526040812061049890610e90565b600082815260208190526040902060010154610a4b81610d27565b61063b8383610d53565b6000806000836001600160a01b0316604051610a7b906303e1469160e61b815260040190565b600060405180830381855afa9150503d8060008114610ab6576040519150601f19603f3d011682016040523d82523d6000602084013e610abb565b606091505b5091509150816105d25760405162461bcd60e51b815260206004820152602c60248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c206061646d60448201526b1a5b8a0a580819985a5b195960a21b60648201526084016104bd565b6000805160206144f1833981519152610b3a81610d27565b610b50848484610b48610e9a565b600854611006565b6006546001600160a01b0316634bb5274a63901d627760e01b610b7660408801886139d0565b604051602401610b87929190613a19565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199485161790525160e084901b9092168252610bcc91600401613a93565b600060405180830381600087803b158015610be657600080fd5b505af1158015610bfa573d6000803e3d6000fd5b5050505050505050565b610c0e828261095d565b6106ba576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c443390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610956836001600160a01b0384166114b7565b60006001600160e01b03198216637965db0b60e01b148061049857506301ffc9a760e01b6001600160e01b0319831614610498565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f5cbd8a0bb00196365d5eb3457c6734e7f06666c3c78e5469b4c9deec7edae048906020015b60405180910390a150565b6104f98133611506565b610d3b8282610c04565b600082815260016020526040902061063b9082610c88565b610d5d828261156a565b600082815260016020526040902061063b90826115cf565b610d87610d8188613d00565b826115e4565b506000610d9b610d9689613d00565b6116cc565b9050610bfa610da989613d00565b88888888610dc189610dbc89600061186b565b6118c1565b610dd08a610dbc8a600161186b565b6118e8565b6000610deb610de38b613e45565b858585611d76565b5090506000610e01610dfc8c613e45565b611e6b565b9050610e29828b8b8b8b610e1a8c610dbc89600061186b565b610dd08d610dbc8a600161186b565b5050505050505050505050565b60006109568383611fc5565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527ffd6f5f93d69a07c593a09be0b208bff13ab4ffd6017df3b33433d63bdc59b4d790602001610d1c565b6000610498825490565b6000806000610eb16005546001600160a01b031690565b6040805160048152602480820183526020820180516001600160e01b0316637de5dedd60e01b17905291516001600160a01b039390931692634bb5274a92610efa929101613a93565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610f3391906139b4565b600060405180830381855afa9150503d8060008114610f6e576040519150601f19603f3d011682016040523d82523d6000602084013e610f73565b606091505b509150915081610feb5760405162461bcd60e51b815260206004820152603860248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c20606d696e60448201527f696d756d566f7465576569676874282960206661696c6564000000000000000060648201526084016104bd565b80806020019051810190610fff9190613f0f565b9250505090565b60095485351080159061101e5750600a546020860135115b6110905760405162461bcd60e51b815260206004820152603a60248201527f424f73476f7665726e616e636552656c61793a20717565727920666f72206f7560448201527f74646174656420627269646765206f70657261746f722073657400000000000060648201526084016104bd565b61109985611fef565b61114e6110a960408701876139d0565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b80546040805160208084028201810190925282815294509192509083018282801561112e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611110575b505050505081516020908102928101929092208151830291909201201490565b156111c15760405162461bcd60e51b815260206004820152603860248201527f424f73476f7665726e616e636552656c61793a20627269646765206f7065726160448201527f746f722073657420697320616c726561647920766f746564000000000000000060648201526084016104bd565b8261121f5760405162461bcd60e51b815260206004820152602860248201527f424f73476f7665726e616e636552656c61793a20696e76616c696420617272616044820152670f240d8cadccee8d60c31b60648201526084016104bd565b366000846001600160401b0381111561123a5761123a613aa6565b604051908082528060200260200182016040528015611263578160200160208202803683370190505b509050600080611272896121af565b9050600061128086836118c1565b905060005b888110156113af5789898281811061129f5761129f613f28565b6060029190910196506112ca9050826112bb6020890189613f3e565b88602001358960400135612261565b8582815181106112dc576112dc613f28565b60200260200101906001600160a01b031690816001600160a01b03168152505084818151811061130e5761130e613f28565b60200260200101516001600160a01b0316846001600160a01b0316106113805760405162461bcd60e51b815260206004820152602160248201527f424f73476f7665726e616e636552656c61793a20696e76616c6964206f7264656044820152603960f91b60648201526084016104bd565b84818151811061139257611392613f28565b6020026020010151935080806113a790613f77565b915050611285565b5089356000908152600c60209081526040808320828e013584529091528120906113d886612289565b905088811061146857600081116114415760405162461bcd60e51b815260206004820152602760248201527f424f73476f7665726e616e636552656c61793a20696e76616c696420766f7465604482015266081dd95a59da1d60ca1b60648201526084016104bd565b815460ff191660011782558b60096114598282613fb4565b905050505050505050506114b0565b60405162461bcd60e51b815260206004820181905260248201527f424f73476f7665726e616e636552656c61793a2072656c6179206661696c656460448201526064016104bd565b5050505050565b60008181526001830160205260408120546114fe57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610498565b506000610498565b611510828261095d565b6106ba57611528816001600160a01b03166014612424565b611533836020612424565b604051602001611544929190614087565b60408051601f198184030181529082905262461bcd60e51b82526104bd91600401613a93565b611574828261095d565b156106ba576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610956836001600160a01b0384166125bf565b602082015160009080820361163b5760405162461bcd60e51b815260206004820181905260248201527f436f7265476f7665726e616e63653a20696e76616c696420636861696e20696460448201526064016104bd565b6004546116499085906126b2565b6000611654856116cc565b9050611665828287604001516127ae565b855190935083146116885760405162461bcd60e51b81526004016104bd906140fc565b8083837fa57d40f1496988cf60ab7c9d5ba4ff83647f67d3898d441a3aaf21b651678fd988886040516116bc929190614250565b60405180910390a4505092915050565b6000806000806000808660800151905060008760600151905060008860a00151516001600160401b0381111561170457611704613aa6565b60405190808252806020026020018201604052801561172d578160200160208202803683370190505b5060c08a015190915060005b8251811015611796578a60a00151818151811061175857611758613f28565b60200260200101518051906020012083828151811061177957611779613f28565b60209081029190910101528061178e81613f77565b915050611739565b506020835102602084012097506020845102602085012096506020825102602083012095506020815102602082012094507fd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a60001b8a600001518b602001518c604001518b8b8b8b604051602001611846989796959493929190978852602088019690965260408701949094526060860192909252608085015260a084015260c083015260e08201526101000190565b6040516020818303038152906040528051906020012098505050505050505050919050565b6040516000906118a3907fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2908590859060200161428a565b60405160208183030381529060405280519060200120905092915050565b60405161190160f01b602082015260228101839052604281018290526000906062016118a3565b84158015906118f657508483145b6119505760405162461bcd60e51b815260206004820152602560248201527f476f7665726e616e636552656c61793a20696e76616c6964206172726179206c6044820152640cadccee8d60db1b60648201526084016104bd565b60008080856001600160401b0381111561196c5761196c613aa6565b604051908082528060200260200182016040528015611995578160200160208202803683370190505b5090506000866001600160401b038111156119b2576119b2613aa6565b6040519080825280602002602001820160405280156119db578160200160208202803683370190505b50905060008060003660005b8b811015611bd1578c8c82818110611a0157611a01613f28565b90506060020191508e8e82818110611a1b57611a1b613f28565b9050602002016020810190611a3091906142af565b92506000836001811115611a4657611a4661382d565b03611ab057611a6b8b611a5c6020850185613f3e565b84602001358560400135612261565b945084878a611a7981613f77565b9b5081518110611a8b57611a8b613f28565b60200260200101906001600160a01b031690816001600160a01b031681525050611b5b565b6001836001811115611ac457611ac461382d565b03611afa57611ada8a611a5c6020850185613f3e565b9450848689611ae881613f77565b9a5081518110611a8b57611a8b613f28565b60405162461bcd60e51b815260206004820152603060248201527f476f7665726e616e636552656c61793a20717565727920666f7220756e73757060448201526f706f7274656420766f7465207479706560801b60648201526084016104bd565b846001600160a01b0316846001600160a01b031610611bbc5760405162461bcd60e51b815260206004820152601e60248201527f476f7665726e616e636552656c61793a20696e76616c6964206f72646572000060448201526064016104bd565b84935080611bc981613f77565b9150506119e7565b50505085845250508281526020808c015160009081526003825260408082208e51835290925290812090611c03610e9a565b90506000611c10856128c9565b9050818110611c885760008111611c395760405162461bcd60e51b81526004016104bd906142cc565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2611c7c838f612a4d565b50505050505050611d6d565b600082611c93612aba565b611c9d9190614310565b611ca8906001614323565b90506000611cb5866128c9565b9050818110611d255760008111611cde5760405162461bcd60e51b81526004016104bd906142cc565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611d6d565b60405162461bcd60e51b815260206004820152601d60248201527f476f7665726e616e636552656c61793a2072656c6179206661696c656400000060448201526064016104bd565b50505050505050565b611db66040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b6000611dc3868686612c01565b9150611dda600454836126b290919063ffffffff16565b6000611de5836116cc565b9050611df760008289602001516127ae565b83519092508214611e1a5760405162461bcd60e51b81526004016104bd906140fc565b80827f771d78ae9e5fca95a532fb0971d575d0ce9b59d14823c063e08740137e0e0eca85611e478b611e6b565b8b89604051611e599493929190614336565b60405180910390a35094509492505050565b6000806000806000808660600151905060008760400151905060008860800151516001600160401b03811115611ea357611ea3613aa6565b604051908082528060200260200182016040528015611ecc578160200160208202803683370190505b5060a08a015190915060005b8251811015611f35578a608001518181518110611ef757611ef7613f28565b602002602001015180519060200120838281518110611f1857611f18613f28565b602090810291909101015280611f2d81613f77565b915050611ed8565b5082516020908102848201208551820286830120845183028584012084518402858501208e518f860151604080517f1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee911413509881019890985287019190915260608601526080850184905260a0850183905260c0850182905260e08501819052929b509099509750955061010001611846565b6000826000018281548110611fdc57611fdc613f28565b9060005260206000200154905092915050565b6000611ffe60408301836139d0565b9050116120615760405162461bcd60e51b815260206004820152602b60248201527f4272696467654f70657261746f727342616c6c6f743a20696e76616c6964206160448201526a0e4e4c2f240d8cadccee8d60ab1b60648201526084016104bd565b600061207060408301836139d0565b600081811061208157612081613f28565b90506020020160208101906120969190613596565b905060015b6120a860408401846139d0565b905081101561063b576120be60408401846139d0565b828181106120ce576120ce613f28565b90506020020160208101906120e39190613596565b6001600160a01b0316826001600160a01b0316106121695760405162461bcd60e51b815260206004820152603860248201527f4272696467654f70657261746f727342616c6c6f743a20696e76616c6964206f60448201527f72646572206f6620627269646765206f70657261746f7273000000000000000060648201526084016104bd565b61217660408401846139d0565b8281811061218657612186613f28565b905060200201602081019061219b9190613596565b9150806121a781613f77565b91505061209b565b600080806121c060408501856139d0565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250508251602090810293810193909320604080517fd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a818701528935818301529885013560608a01526080808a01929092528051808a03909201825260a0909801909752505084519401939093209392505050565b600080600061227287878787612e07565b9150915061227f81612ef4565b5095945050505050565b60008060006122a06005546001600160a01b031690565b6001600160a01b0316634bb5274a63d9d5dadb60e01b866040516024016122c7919061441d565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516123089190602401613a93565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161234191906139b4565b600060405180830381855afa9150503d806000811461237c576040519150601f19603f3d011682016040523d82523d6000602084013e612381565b606091505b5091509150816124105760405162461bcd60e51b815260206004820152604e60248201527f4d61696e636861696e476f7665726e616e636541646d696e3a2070726f78792060448201527f63616c6c206073756d427269646765566f74657257656967687473286164647260648201526d195cdcd6d74a580819985a5b195960921b608482015260a4016104bd565b808060200190518101906105e69190613f0f565b60606000612433836002613f90565b61243e906002614323565b6001600160401b0381111561245557612455613aa6565b6040519080825280601f01601f19166020018201604052801561247f576020820181803683370190505b509050600360fc1b8160008151811061249a5761249a613f28565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106124c9576124c9613f28565b60200101906001600160f81b031916908160001a90535060006124ed846002613f90565b6124f8906001614323565b90505b6001811115612570576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061252c5761252c613f28565b1a60f81b82828151811061254257612542613f28565b60200101906001600160f81b031916908160001a90535060049490941c936125698161446a565b90506124fb565b5083156109565760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104bd565b600081815260018301602052604081205480156126a85760006125e3600183614310565b85549091506000906125f790600190614310565b905081811461265c57600086600001828154811061261757612617613f28565b906000526020600020015490508087600001848154811061263a5761263a613f28565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061266d5761266d614481565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610498565b6000915050610498565b60008260600151511180156126d05750816080015151826060015151145b80156126e557508160a0015151826060015151145b80156126fa57508160c0015151826060015151145b6127465760405162461bcd60e51b815260206004820152601e60248201527f50726f706f73616c3a20696e76616c6964206172726179206c656e677468000060448201526064016104bd565b6127508142614323565b826040015111156106ba5760405162461bcd60e51b815260206004820152602260248201527f50726f706f73616c3a20696e76616c6964206578706972792074696d6573746160448201526106d760f41b60648201526084016104bd565b600083815260026020526040812054908190036127df5750600083815260026020526040902060019081905561289e565b60008481526003602090815260408083208484529091528120906000825460ff1660048111156128115761281161382d565b036128785760405162461bcd60e51b815260206004820152603160248201527f436f7265476f7665726e616e63653a2063757272656e742070726f706f73616c604482015270081a5cc81b9bdd0818dbdb5c1b195d1959607a1b60648201526084016104bd565b6000868152600260205260408120805490919061289490613f77565b9182905550925050505b6000938452600360209081526040808620838752909152909320600181019290925560069091015590565b60008060006128e06005546001600160a01b031690565b6001600160a01b0316634bb5274a635f14a1c360e01b86604051602401612907919061441d565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516129489190602401613a93565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161298191906139b4565b600060405180830381855afa9150503d80600081146129bc576040519150601f19603f3d011682016040523d82523d6000602084013e6129c1565b606091505b5091509150816124105760405162461bcd60e51b815260206004820152604b60248201527f4d61696e636861696e476f7665726e616e636541646d696e3a2070726f78792060448201527f63616c6c206073756d476f7665726e6f7257656967687473286164647265737360648201526a16d74a580819985a5b195960aa1b608482015260a4016104bd565b612a5681613268565b156106ba57815460ff19166002178255600080612a7283613282565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051612aac929190614497565b60405180910390a250505050565b6000806000612ad16005546001600160a01b031690565b6040805160048152602480820183526020820180516001600160e01b031663926323d560e01b17905291516001600160a01b039390931692634bb5274a92612b1a929101613a93565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612b5391906139b4565b600060405180830381855afa9150503d8060008114612b8e576040519150601f19603f3d011682016040523d82523d6000602084013e612b93565b606091505b509150915081610feb5760405162461bcd60e51b815260206004820152603360248201527f476f7665726e616e636541646d696e3a2070726f78792063616c6c2060746f74604482015272185b15d95a59da1d1cca0a580819985a5b1959606a1b60648201526084016104bd565b612c416040518060e00160405280600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b83518152602080850151604080840191909152600091830191909152840151516001600160401b03811115612c7857612c78613aa6565b604051908082528060200260200182016040528015612ca1578160200160208202803683370190505b5060608083019190915284015160808083019190915284015160a08083019190915284015160c082015260005b846040015151811015612dff57600185604001518281518110612cf357612cf3613f28565b60200260200101516001811115612d0c57612d0c61382d565b03612d4d578282606001518281518110612d2857612d28613f28565b60200260200101906001600160a01b031690816001600160a01b031681525050612ded565b600085604001518281518110612d6557612d65613f28565b60200260200101516001811115612d7e57612d7e61382d565b03612d9a578382606001518281518110612d2857612d28613f28565b60405162461bcd60e51b815260206004820152602260248201527f476c6f62616c50726f706f73616c3a20756e737570706f727465642074617267604482015261195d60f21b60648201526084016104bd565b80612df781613f77565b915050612cce565b509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612e3e5750600090506003612eeb565b8460ff16601b14158015612e5657508460ff16601c14155b15612e675750600090506004612eeb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612ebb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612ee457600060019250925050612eeb565b9150600090505b94509492505050565b6000816004811115612f0857612f0861382d565b03612f105750565b6001816004811115612f2457612f2461382d565b03612f715760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104bd565b6002816004811115612f8557612f8561382d565b03612fd25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104bd565b6003816004811115612fe657612fe661382d565b0361303e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104bd565b60048160048111156130525761305261382d565b036104f95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104bd565b6004830154811015613163578260080160008460040183815481106130d1576130d1613f28565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061311a5761311a613f28565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018101829055600201558061315b81613f77565b9150506130aa565b5060005b60058301548110156132205782600801600084600501838154811061318e5761318e613f28565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106131d7576131d7613f28565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018101829055600201558061321881613f77565b915050613167565b50815460ff19168255600060018301819055600283018190556003830181905561324e906004840190613525565b61325c600583016000613525565b60006006830155919050565b600081602001516000148061049857505060200151461490565b60608061328e83613268565b6132e65760405162461bcd60e51b815260206004820152602360248201527f50726f706f73616c3a20717565727920666f7220696e76616c696420636861696044820152621b925960ea1b60648201526084016104bd565b8260600151516001600160401b0381111561330357613303613aa6565b60405190808252806020026020018201604052801561332c578160200160208202803683370190505b5091508260600151516001600160401b0381111561334c5761334c613aa6565b60405190808252806020026020018201604052801561337f57816020015b606081526020019060019003908161336a5790505b50905060005b83606001515181101561351f578360c0015181815181106133a8576133a8613f28565b60200260200101515a116133fe5760405162461bcd60e51b815260206004820152601a60248201527f50726f706f73616c3a20696e73756666696369656e742067617300000000000060448201526064016104bd565b8360600151818151811061341457613414613f28565b60200260200101516001600160a01b03168460800151828151811061343b5761343b613f28565b60200260200101518560c00151838151811061345957613459613f28565b6020026020010151908660a00151848151811061347857613478613f28565b602002602001015160405161348d91906139b4565b600060405180830381858888f193505050503d80600081146134cb576040519150601f19603f3d011682016040523d82523d6000602084013e6134d0565b606091505b508483815181106134e3576134e3613f28565b602002602001018484815181106134fc576134fc613f28565b6020908102919091010191909152901515905261351881613f77565b9050613385565b50915091565b50805460008255906000526020600020908101906104f991905b80821115613553576000815560010161353f565b5090565b60006020828403121561356957600080fd5b81356001600160e01b03198116811461095657600080fd5b6001600160a01b03811681146104f957600080fd5b6000602082840312156135a857600080fd5b813561095681613581565b6000602082840312156135c557600080fd5b5035919050565b600080604083850312156135df57600080fd5b8235915060208301356135f181613581565b809150509250929050565b60008083601f84011261360e57600080fd5b5081356001600160401b0381111561362557600080fd5b6020830191508360208260051b850101111561364057600080fd5b9250929050565b60008083601f84011261365957600080fd5b5081356001600160401b0381111561367057600080fd5b60208301915083602060608302850101111561364057600080fd5b6000806000806000606086880312156136a357600080fd5b85356001600160401b03808211156136ba57600080fd5b9087019060e0828a0312156136ce57600080fd5b909550602087013590808211156136e457600080fd5b6136f089838a016135fc565b9096509450604088013591508082111561370957600080fd5b5061371688828901613647565b969995985093965092949392505050565b600081518084526020808501945080840160005b838110156137605781516001600160a01b03168752958201959082019060010161373b565b509495945050505050565b602081528151602082015260208201516040820152600060408301516060808401526105e66080840182613727565b6000806000806000606086880312156137b257600080fd5b85356001600160401b03808211156137c957600080fd5b9087019060c0828a0312156136ce57600080fd5b600080604083850312156137f057600080fd5b82356137fb81613581565b915060208301356135f181613581565b6000806040838503121561381e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106138575761385761382d565b95815260208101949094526040840192909252606083015260809091015290565b60008060006040848603121561388d57600080fd5b83356001600160401b03808211156138a457600080fd5b90850190606082880312156138b857600080fd5b909350602085013590808211156138ce57600080fd5b506138db86828701613647565b9497909650939450505050565b60208082526027908201527f476f7665726e616e636541646d696e3a206f6e6c7920616c6c6f7765642073656040820152661b198b58d85b1b60ca1b606082015260800190565b60208082526024908201527f476f7665726e616e636541646d696e3a2073657420746f206e6f6e2d636f6e746040820152631c9858dd60e21b606082015260800190565b60006020828403121561398557600080fd5b815161095681613581565b60005b838110156139ab578181015183820152602001613993565b50506000910152565b600082516139c6818460208701613990565b9190910192915050565b6000808335601e198436030181126139e757600080fd5b8301803591506001600160401b03821115613a0157600080fd5b6020019150600581901b360382131561364057600080fd5b60208082528181018390526000908460408401835b86811015613a5c578235613a4181613581565b6001600160a01b031682529183019190830190600101613a2e565b509695505050505050565b60008151808452613a7f816020860160208601613990565b601f01601f19169290920160200192915050565b6020815260006109566020830184613a67565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715613ade57613ade613aa6565b60405290565b60405160c081016001600160401b0381118282101715613ade57613ade613aa6565b604051601f8201601f191681016001600160401b0381118282101715613b2e57613b2e613aa6565b604052919050565b60006001600160401b03821115613b4f57613b4f613aa6565b5060051b60200190565b600082601f830112613b6a57600080fd5b81356020613b7f613b7a83613b36565b613b06565b82815260059290921b84018101918181019086841115613b9e57600080fd5b8286015b84811015613a5c578035613bb581613581565b8352918301918301613ba2565b600082601f830112613bd357600080fd5b81356020613be3613b7a83613b36565b82815260059290921b84018101918181019086841115613c0257600080fd5b8286015b84811015613a5c5780358352918301918301613c06565b6000601f8381840112613c2f57600080fd5b82356020613c3f613b7a83613b36565b82815260059290921b85018101918181019087841115613c5e57600080fd5b8287015b84811015613cf45780356001600160401b0380821115613c825760008081fd5b818a0191508a603f830112613c975760008081fd5b85820135604082821115613cad57613cad613aa6565b613cbe828b01601f19168901613b06565b92508183528c81838601011115613cd55760008081fd5b8181850189850137506000908201870152845250918301918301613c62565b50979650505050505050565b600060e08236031215613d1257600080fd5b613d1a613abc565b82358152602083013560208201526040830135604082015260608301356001600160401b0380821115613d4c57600080fd5b613d5836838701613b59565b60608401526080850135915080821115613d7157600080fd5b613d7d36838701613bc2565b608084015260a0850135915080821115613d9657600080fd5b613da236838701613c1d565b60a084015260c0850135915080821115613dbb57600080fd5b50613dc836828601613bc2565b60c08301525092915050565b600281106104f957600080fd5b600082601f830112613df257600080fd5b81356020613e02613b7a83613b36565b82815260059290921b84018101918181019086841115613e2157600080fd5b8286015b84811015613a5c578035613e3881613dd4565b8352918301918301613e25565b600060c08236031215613e5757600080fd5b613e5f613ae4565b823581526020830135602082015260408301356001600160401b0380821115613e8757600080fd5b613e9336838701613de1565b60408401526060850135915080821115613eac57600080fd5b613eb836838701613bc2565b60608401526080850135915080821115613ed157600080fd5b613edd36838701613c1d565b608084015260a0850135915080821115613ef657600080fd5b50613f0336828601613bc2565b60a08301525092915050565b600060208284031215613f2157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613f5057600080fd5b813560ff8116811461095657600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613f8957613f89613f61565b5060010190565b808202811582820484141761049857610498613f61565b6000813561049881613581565b81358155600160208084013582840155600283016040850135601e19863603018112613fdf57600080fd5b850180356001600160401b03811115613ff757600080fd5b83820191508060051b360382131561400e57600080fd5b6801000000000000000081111561402757614027613aa6565b82548184558082101561405b5760008481528581208381019083015b808210156140575782825590880190614043565b5050505b50600092835260208320925b81811015610bfa5761407883613fa7565b84820155918401918501614067565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516140bf816017850160208801613990565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516140f0816028840160208801613990565b01602801949350505050565b60208082526026908201527f436f7265476f7665726e616e63653a20696e76616c69642070726f706f73616c604082015265206e6f6e636560d01b606082015260800190565b600081518084526020808501945080840160005b8381101561376057815187529582019590820190600101614156565b600081518084526020808501808196508360051b8101915082860160005b858110156141ba5782840389526141a8848351613a67565b98850198935090840190600101614190565b5091979650505050505050565b8051825260208101516020830152604081015160408301526000606082015160e060608501526141fa60e0850182613727565b9050608083015184820360808601526142138282614142565b91505060a083015184820360a086015261422d8282614172565b91505060c083015184820360c08601526142478282614142565b95945050505050565b60408152600061426360408301856141c7565b905060018060a01b03831660208301529392505050565b600281106104f9576104f961382d565b83815260208101839052606081016142a18361427a565b826040830152949350505050565b6000602082840312156142c157600080fd5b813561095681613dd4565b60208082526024908201527f476f7665726e616e636552656c61793a20696e76616c696420766f74652077656040820152631a59da1d60e21b606082015260800190565b8181038181111561049857610498613f61565b8082018082111561049857610498613f61565b60808152600061434960808301876141c7565b60208681850152838203604085015260c08201865183528187015182840152604087015160c0604085015281815180845260e0860191508483019350600092505b808310156143b357835161439d8161427a565b825292840192600192909201919084019061438a565b506060890151935084810360608601526143cd8185614142565b9350505050608086015182820360808401526143e98282614172565b91505060a086015182820360a08401526144038282614142565b935050505061424760608301846001600160a01b03169052565b6020808252825182820181905260009190848201906040850190845b8181101561445e5783516001600160a01b031683529284019291840191600101614439565b50909695505050505050565b60008161447957614479613f61565b506000190190565b634e487b7160e01b600052603160045260246000fd5b604080825283519082018190526000906020906060840190828701845b828110156144d25781511515845292840192908401906001016144b4565b505050838103828501526144e68186614172565b969550505050505056fee2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4a2646970667358221220a83afd5b06d0413b16b474a7c5329e6e2d39b5511777f91e449ffa60a30c8fdb64736f6c63430008110033", - "devdoc": { - "errors": { - "ErrCallerMustBeBridgeContract()": [ - { - "details": "Error of method caller must be bridge contract." - } - ], - "ErrCallerMustBeRoninTrustedOrgContract()": [ - { - "details": "Error of method caller must be Ronin trusted org contract." - } - ], - "ErrZeroCodeContract()": [ - { - "details": "Error of set to non-contract." - } - ] - }, - "kind": "dev", - "methods": { - "bridgeContract()": { - "details": "Returns the bridge contract." - }, - "bridgeOperatorsRelayed(uint256,uint256)": { - "details": "Returns whether the voter `_voter` casted vote for bridge operators at a specific period." - }, - "changeProxyAdmin(address,address)": { - "details": "Changes the admin of `_proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `_proxy`." - }, - "getProposalExpiryDuration()": { - "details": "Returns the proposal expiry duration." - }, - "getProxyAdmin(address)": { - "details": "Returns the current admin of `_proxy`. Requirements: - This contract must be the admin of `_proxy`." - }, - "getProxyImplementation(address)": { - "details": "Returns the current implementation of `_proxy`. Requirements: - This contract must be the admin of `_proxy`." - }, - "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. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "lastSyncedBridgeOperatorSetInfo()": { - "details": "Returns the synced bridge operator set info." - }, - "proposalRelayed(uint256,uint256)": { - "details": "Returns whether the voter `_voter` casted vote for the proposal." - }, - "relayBridgeOperators((uint256,uint256,address[]),(uint8,bytes32,bytes32)[])": { - "details": "See `BOsGovernanceRelay-_relayVotesBySignatures`. Requirements: - The method caller is relayer." - }, - "relayGlobalProposal((uint256,uint256,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { - "details": "See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is relayer." - }, - "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])": { - "details": "See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is relayer." - }, - "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "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. May emit a {RoleRevoked} event." - }, - "roninTrustedOrganizationContract()": { - "details": "Returns the ronin trusted organization contract." - }, - "setBridgeContract(address)": { - "details": "Sets the bridge contract. Requirements: - The method caller is admin. - The new address is a contract. Emits the event `BridgeContractUpdated`." - }, - "setProposalExpiryDuration(uint256)": { - "details": "Sets the expiry duration for a new proposal. Requirements: - Only allowing self-call to this method, since this contract does not have admin." - }, - "setRoninTrustedOrganizationContract(address)": { - "details": "Sets the ronin trusted organization contract. Requirements: - The method caller is admin. - The new address is a contract. Emits the event `RoninTrustedOrganizationContractUpdated`." - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "round(uint256)": { - "notice": "chain id = 0 for global proposal" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 24, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_roles", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" - }, - { - "astId": 338, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_roleMembers", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)4026_storage)" - }, - { - "astId": 7476, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "round", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_uint256,t_uint256)" - }, - { - "astId": 7484, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "vote", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)7402_storage))" - }, - { - "astId": 7486, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_proposalExpiryDuration", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6146, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_roninTrustedOrganizationContract", - "offset": 0, - "slot": "5", - "type": "t_contract(IRoninTrustedOrganization)10177" - }, - { - "astId": 5797, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_bridgeContract", - "offset": 0, - "slot": "6", - "type": "t_contract(IBridge)9276" - }, - { - "astId": 4506, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "roninChainId", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 4509, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "DOMAIN_SEPARATOR", - "offset": 0, - "slot": "8", - "type": "t_bytes32" - }, - { - "astId": 7138, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_lastSyncedBridgeOperatorSetInfo", - "offset": 0, - "slot": "9", - "type": "t_struct(BridgeOperatorSet)12403_storage" - }, - { - "astId": 7146, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_vote", - "offset": 0, - "slot": "12", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(IsolatedVote)6717_storage))" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBridge)9276": { - "encoding": "inplace", - "label": "contract IBridge", - "numberOfBytes": "20" - }, - "t_contract(IRoninTrustedOrganization)10177": { - "encoding": "inplace", - "label": "contract IRoninTrustedOrganization", - "numberOfBytes": "20" - }, - "t_enum(VoteStatus)10566": { - "encoding": "inplace", - "label": "enum VoteStatusConsumer.VoteStatus", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_bool)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_address,t_bytes32)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => bytes32)", - "numberOfBytes": "32", - "value": "t_bytes32" - }, - "t_mapping(t_address,t_struct(Signature)10557_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct SignatureConsumer.Signature)", - "numberOfBytes": "32", - "value": "t_struct(Signature)10557_storage" - }, - "t_mapping(t_bytes32,t_struct(AddressSet)4026_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", - "numberOfBytes": "32", - "value": "t_struct(AddressSet)4026_storage" - }, - "t_mapping(t_bytes32,t_struct(RoleData)19_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControl.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)19_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(IsolatedVote)6717_storage))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => struct IsolatedGovernance.IsolatedVote))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(IsolatedVote)6717_storage)" - }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)7402_storage))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", - "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(ProposalVote)7402_storage)" - }, - "t_mapping(t_uint256,t_struct(IsolatedVote)6717_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct IsolatedGovernance.IsolatedVote)", - "numberOfBytes": "32", - "value": "t_struct(IsolatedVote)6717_storage" - }, - "t_mapping(t_uint256,t_struct(ProposalVote)7402_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", - "numberOfBytes": "32", - "value": "t_struct(ProposalVote)7402_storage" - }, - "t_mapping(t_uint256,t_uint256)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)4026_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.AddressSet", - "members": [ - { - "astId": 4025, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)3725_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(BridgeOperatorSet)12403_storage": { - "encoding": "inplace", - "label": "struct BridgeOperatorsBallot.BridgeOperatorSet", - "members": [ - { - "astId": 12397, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "period", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 12399, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "epoch", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 12402, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "operators", - "offset": 0, - "slot": "2", - "type": "t_array(t_address)dyn_storage" - } - ], - "numberOfBytes": "96" - }, - "t_struct(IsolatedVote)6717_storage": { - "encoding": "inplace", - "label": "struct IsolatedGovernance.IsolatedVote", - "members": [ - { - "astId": 6698, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "status", - "offset": 0, - "slot": "0", - "type": "t_enum(VoteStatus)10566" - }, - { - "astId": 6700, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "finalHash", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 6705, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "voteHashOf", - "offset": 0, - "slot": "2", - "type": "t_mapping(t_address,t_bytes32)" - }, - { - "astId": 6710, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "weight", - "offset": 0, - "slot": "3", - "type": "t_mapping(t_bytes32,t_uint256)" - }, - { - "astId": 6713, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "expiredAt", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 6716, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "createdAt", - "offset": 0, - "slot": "5", - "type": "t_uint256" - } - ], - "numberOfBytes": "192" - }, - "t_struct(ProposalVote)7402_storage": { - "encoding": "inplace", - "label": "struct CoreGovernance.ProposalVote", - "members": [ - { - "astId": 7378, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "status", - "offset": 0, - "slot": "0", - "type": "t_enum(VoteStatus)10566" - }, - { - "astId": 7380, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "hash", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 7382, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "againstVoteWeight", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 7384, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "forVoteWeight", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 7387, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "forVoteds", - "offset": 0, - "slot": "4", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 7390, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "againstVoteds", - "offset": 0, - "slot": "5", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 7392, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "expiryTimestamp", - "offset": 0, - "slot": "6", - "type": "t_uint256" - }, - { - "astId": 7397, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "sig", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_struct(Signature)10557_storage)" - }, - { - "astId": 7401, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "voted", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_bool)" - } - ], - "numberOfBytes": "288" - }, - "t_struct(RoleData)19_storage": { - "encoding": "inplace", - "label": "struct AccessControl.RoleData", - "members": [ - { - "astId": 16, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 18, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "adminRole", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)3725_storage": { - "encoding": "inplace", - "label": "struct EnumerableSet.Set", - "members": [ - { - "astId": 3720, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 3724, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Signature)10557_storage": { - "encoding": "inplace", - "label": "struct SignatureConsumer.Signature", - "members": [ - { - "astId": 10552, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "v", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 10554, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "r", - "offset": 0, - "slot": "1", - "type": "t_bytes32" - }, - { - "astId": 10556, - "contract": "contracts/mainchain/MainchainGovernanceAdmin.sol:MainchainGovernanceAdmin", - "label": "s", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/deployments/goerli-for-devnet/MainchainRoninTrustedOrganizationProxy.json b/deployments/goerli-for-devnet/MainchainRoninTrustedOrganizationProxy.json deleted file mode 100644 index be8cd705..00000000 --- a/deployments/goerli-for-devnet/MainchainRoninTrustedOrganizationProxy.json +++ /dev/null @@ -1,286 +0,0 @@ -{ - "address": "0xA53D0a2dAC70D1fD3D9677c40636A7b50da4aB49", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "functionDelegateCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x21085f34a244b80c9269c03120f5e217af673f3111c2dc811295b5eaa995f83c", - "receipt": { - "to": null, - "from": "0x968D0Cd7343f711216817E617d3f92a23dC91c07", - "contractAddress": "0xA53D0a2dAC70D1fD3D9677c40636A7b50da4aB49", - "transactionIndex": 32, - "gasUsed": "2622034", - "logsBloom": "0x00000000000000000000004000100400400000000000040000000000000000000000000000000010000000000000000000000000000000000000000000200004000000000000000000000000000002000000000000000000000400100000000000000000020000000000000000000800000000800000000000000000000000000000000000000000000000000000000000001000000080000000000000800000000000000000001000010000000400000000000000000000000000000000000000400020000000000000000000040000002000000400000000000000000020000000000000000000000000000000000000000000000000040000400800800000", - "blockHash": "0x2a1247705ac5ffe8bb94199018d9f91e41fa6f62dfb015b859ffdf61273d09c1", - "transactionHash": "0x21085f34a244b80c9269c03120f5e217af673f3111c2dc811295b5eaa995f83c", - "logs": [ - { - "transactionIndex": 32, - "blockNumber": 8500560, - "transactionHash": "0x21085f34a244b80c9269c03120f5e217af673f3111c2dc811295b5eaa995f83c", - "address": "0xA53D0a2dAC70D1fD3D9677c40636A7b50da4aB49", - "topics": [ - "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000a71456fa88a5f6a4696d0446e690db4a5913fab0" - ], - "data": "0x", - "logIndex": 88, - "blockHash": "0x2a1247705ac5ffe8bb94199018d9f91e41fa6f62dfb015b859ffdf61273d09c1" - }, - { - "transactionIndex": 32, - "blockNumber": 8500560, - "transactionHash": "0x21085f34a244b80c9269c03120f5e217af673f3111c2dc811295b5eaa995f83c", - "address": "0xA53D0a2dAC70D1fD3D9677c40636A7b50da4aB49", - "topics": [ - "0xc753dbf7952c70ff6b9fa7b626403aa1d2230d97136b635bd5e85bec72bcca6c" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000b6bc5bc0410773a3f86b1537ce7495c52e38f88b0000000000000000000000006e61779a5aff6f3400480981100d8f297be98db7000000000000000000000000b2106e0b921c682d824bd5276902a3df822654dc000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000004a4bc674a97737376cfe990ae2fe0d2b6e73839300000000000000000000000041c80f826fd726cc35c991adabbf9c9765d4ee58000000000000000000000000eb6c9373bdd55348d6ef7c456a824705c6140222000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b9f2587d55e96276b09b258ac909d809961f6c20000000000000000000000006a55f2e6f3ddf2e2fc31f914d3d510f994e3e9e900000000000000000000000095436f7544e1abf9c9113ff9e5b37eb6c9ffd07500000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000283b4baa1d0415603c81edc1c68fadd3c790837c00000000000000000000000079f9d12bf1c43556ca638c93de8299be18f4c13c000000000000000000000000ca8cd8490cfd91eecc1c9ca6a78c2ec7bd0b586b000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3341ae4ed9da65fc30a7fa6357e8b5ac40b0a30000000000000000000000008a8b59b6a015facf15ade0e2ac759ef1e4339f18000000000000000000000000b4e483a1a4b2a8214ca130a7ac4c0e5e82eae6ee00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000afb9554299491a34d303f2c5a91bebb162f6b2cf000000000000000000000000a835c99c3ebe69ea2940c3d009d541e452d47fe3000000000000000000000000324ed3822d6ec798824268de0895623165a4c3bc00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000912fb48e1c220699cc1ee0bf5c00172c1c4d773300000000000000000000000060c44bfb13b10bb0897f8537bb987927a198842a000000000000000000000000107aa9956a8e2979c5dcad3599ac9df090e53d36000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f7b04cceb6adbebfb0b64d2acb6febe2393f9140000000000000000000000005ea8cc101aa90668594f473ef175d061225d62aa000000000000000000000000a19877e2c0cbb5c5eb7f37c417caf1fe1422384000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c2dbed259700dde15ee95f797345a65acaba511f0000000000000000000000009484cb3fc30aca08732d423108a1212380d6cad800000000000000000000000016b655d62b4213ce9cb51b29a923b22b2ebb4375000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f7b05263cd535a561ab72059b4390cbc80f133d00000000000000000000000010c9a7f733fd74c5403190fd43529b651ea53a740000000000000000000000003f43595f669e77b67d11d02aa3498da6751c479b0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023c148098a80fc3a47a87fd7989c4b2d032dc906000000000000000000000000755955288cfdd1143d3bbde3c868972608376b9c000000000000000000000000af83fdf1cb2995f0767b2cc3480faaf970b1bbd200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 89, - "blockHash": "0x2a1247705ac5ffe8bb94199018d9f91e41fa6f62dfb015b859ffdf61273d09c1" - }, - { - "transactionIndex": 32, - "blockNumber": 8500560, - "transactionHash": "0x21085f34a244b80c9269c03120f5e217af673f3111c2dc811295b5eaa995f83c", - "address": "0xA53D0a2dAC70D1fD3D9677c40636A7b50da4aB49", - "topics": [ - "0x976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000009", - "0x000000000000000000000000000000000000000000000000000000000000000b" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 90, - "blockHash": "0x2a1247705ac5ffe8bb94199018d9f91e41fa6f62dfb015b859ffdf61273d09c1" - }, - { - "transactionIndex": 32, - "blockNumber": 8500560, - "transactionHash": "0x21085f34a244b80c9269c03120f5e217af673f3111c2dc811295b5eaa995f83c", - "address": "0xA53D0a2dAC70D1fD3D9677c40636A7b50da4aB49", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 91, - "blockHash": "0x2a1247705ac5ffe8bb94199018d9f91e41fa6f62dfb015b859ffdf61273d09c1" - }, - { - "transactionIndex": 32, - "blockNumber": 8500560, - "transactionHash": "0x21085f34a244b80c9269c03120f5e217af673f3111c2dc811295b5eaa995f83c", - "address": "0xA53D0a2dAC70D1fD3D9677c40636A7b50da4aB49", - "topics": [ - "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b290e3276e86327af217ea0f40fef53f1b34d3ac", - "logIndex": 92, - "blockHash": "0x2a1247705ac5ffe8bb94199018d9f91e41fa6f62dfb015b859ffdf61273d09c1" - } - ], - "blockNumber": 8500560, - "cumulativeGasUsed": "10590717", - "status": 1, - "byzantium": true - }, - "args": [ - "0xa71456fA88a5f6a4696D0446E690Db4a5913fab0", - "0xb290E3276E86327AF217eA0F40fEf53f1b34D3Ac", - "0x7c37103c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000b6bc5bc0410773a3f86b1537ce7495c52e38f88b0000000000000000000000006e61779a5aff6f3400480981100d8f297be98db7000000000000000000000000b2106e0b921c682d824bd5276902a3df822654dc000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000004a4bc674a97737376cfe990ae2fe0d2b6e73839300000000000000000000000041c80f826fd726cc35c991adabbf9c9765d4ee58000000000000000000000000eb6c9373bdd55348d6ef7c456a824705c6140222000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b9f2587d55e96276b09b258ac909d809961f6c20000000000000000000000006a55f2e6f3ddf2e2fc31f914d3d510f994e3e9e900000000000000000000000095436f7544e1abf9c9113ff9e5b37eb6c9ffd07500000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000283b4baa1d0415603c81edc1c68fadd3c790837c00000000000000000000000079f9d12bf1c43556ca638c93de8299be18f4c13c000000000000000000000000ca8cd8490cfd91eecc1c9ca6a78c2ec7bd0b586b000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e3341ae4ed9da65fc30a7fa6357e8b5ac40b0a30000000000000000000000008a8b59b6a015facf15ade0e2ac759ef1e4339f18000000000000000000000000b4e483a1a4b2a8214ca130a7ac4c0e5e82eae6ee00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000afb9554299491a34d303f2c5a91bebb162f6b2cf000000000000000000000000a835c99c3ebe69ea2940c3d009d541e452d47fe3000000000000000000000000324ed3822d6ec798824268de0895623165a4c3bc00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000912fb48e1c220699cc1ee0bf5c00172c1c4d773300000000000000000000000060c44bfb13b10bb0897f8537bb987927a198842a000000000000000000000000107aa9956a8e2979c5dcad3599ac9df090e53d36000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f7b04cceb6adbebfb0b64d2acb6febe2393f9140000000000000000000000005ea8cc101aa90668594f473ef175d061225d62aa000000000000000000000000a19877e2c0cbb5c5eb7f37c417caf1fe1422384000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c2dbed259700dde15ee95f797345a65acaba511f0000000000000000000000009484cb3fc30aca08732d423108a1212380d6cad800000000000000000000000016b655d62b4213ce9cb51b29a923b22b2ebb4375000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f7b05263cd535a561ab72059b4390cbc80f133d00000000000000000000000010c9a7f733fd74c5403190fd43529b651ea53a740000000000000000000000003f43595f669e77b67d11d02aa3498da6751c479b0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023c148098a80fc3a47a87fd7989c4b2d032dc906000000000000000000000000755955288cfdd1143d3bbde3c868972608376b9c000000000000000000000000af83fdf1cb2995f0767b2cc3480faaf970b1bbd200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000" - ], - "numDeployments": 1, - "solcInputHash": "a595501ecf8849639d4423c21e560992", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"functionDelegateCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"functionDelegateCall(bytes)\":{\"details\":\"Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":\"TransparentUpgradeableProxyV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405260405162000f5f38038062000f5f83398101604081905262000026916200048d565b8282828281620000398282600062000053565b506200004790508262000090565b505050505050620005c0565b6200005e83620000eb565b6000825111806200006c5750805b156200008b576200008983836200012d60201b620002911760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000bb6200015c565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e88162000195565b50565b620000f6816200024a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606062000155838360405180606001604052806027815260200162000f3860279139620002fe565b9392505050565b60006200018660008051602062000f1883398151915260001b620003e460201b6200024d1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002005760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200022960008051602062000f1883398151915260001b620003e460201b6200024d1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200026081620003e760201b620002bd1760201c565b620002c45760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001f7565b80620002297f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b620003e460201b6200024d1760201c565b60606001600160a01b0384163b620003685760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620001f7565b600080856001600160a01b0316856040516200038591906200056d565b600060405180830381855af49150503d8060008114620003c2576040519150601f19603f3d011682016040523d82523d6000602084013e620003c7565b606091505b509092509050620003da828286620003f6565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200040757508162000155565b825115620004185782518084602001fd5b8160405162461bcd60e51b8152600401620001f791906200058b565b80516001600160a01b03811681146200044c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004845781810151838201526020016200046a565b50506000910152565b600080600060608486031215620004a357600080fd5b620004ae8462000434565b9250620004be6020850162000434565b60408501519092506001600160401b0380821115620004dc57600080fd5b818601915086601f830112620004f157600080fd5b81518181111562000506576200050662000451565b604051601f8201601f19908116603f0116810190838211818310171562000531576200053162000451565b816040528281528960208487010111156200054b57600080fd5b6200055e83602083016020880162000467565b80955050505050509250925092565b600082516200058181846020870162000467565b9190910192915050565b6020815260008251806020840152620005ac81604085016020870162000467565b601f01601f19169190910160400192915050565b61094880620005d06000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610713565b610136565b61006661009e366004610744565b610173565b6100666100b13660046107f5565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610713565b610250565b34801561011357600080fd5b506100cb610270565b6101246102cc565b61013461012f610361565b61036b565b565b61013e61038a565b6001600160a01b0316330361016b57610168816040518060200160405280600081525060006103bd565b50565b61016861011c565b61017b61038a565b6001600160a01b0316330361016b576000610194610361565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061038a565b6001600160a01b03163303610217576102128383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103bd915050565b505050565b61021261011c565b600061022961038a565b6001600160a01b0316330361024557610240610361565b905090565b61024d61011c565b90565b61025861038a565b6001600160a01b0316330361016b57610168816103e8565b600061027a61038a565b6001600160a01b031633036102455761024061038a565b60606102b683836040518060600160405280602781526020016108ec6027913961043c565b9392505050565b6001600160a01b03163b151590565b6102d461038a565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610519565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103c683610541565b6000825111806103d35750805b15610212576103e28383610291565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61041161038a565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610581565b60606001600160a01b0384163b6104a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610358565b600080856001600160a01b0316856040516104bf919061089c565b600060405180830381855af49150503d80600081146104fa576040519150601f19603f3d011682016040523d82523d6000602084013e6104ff565b606091505b509150915061050f82828661062a565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103ae565b61054a81610663565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105e65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610358565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156106395750816102b6565b8251156106495782518084602001fd5b8160405162461bcd60e51b815260040161035891906108b8565b6001600160a01b0381163b6106d05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610358565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610609565b80356001600160a01b038116811461070e57600080fd5b919050565b60006020828403121561072557600080fd5b6102b6826106f7565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561075657600080fd5b813567ffffffffffffffff8082111561076e57600080fd5b818401915084601f83011261078257600080fd5b8135818111156107945761079461072e565b604051601f8201601f19908116603f011681019083821181831017156107bc576107bc61072e565b816040528281528760208487010111156107d557600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060006040848603121561080a57600080fd5b610813846106f7565b9250602084013567ffffffffffffffff8082111561083057600080fd5b818601915086601f83011261084457600080fd5b81358181111561085357600080fd5b87602082850101111561086557600080fd5b6020830194508093505050509250925092565b60005b8381101561089357818101518382015260200161087b565b50506000910152565b600082516108ae818460208701610878565b9190910192915050565b60208152600082518060208401526108d7816040850160208701610878565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bebb3300d99b476bd2f64bbccc422fc4bd31a9389ff1c675d867f0aac8101a5664736f6c63430008110033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x6080604052600436106100595760003560e01c80633659cfe6146100705780634bb5274a146100905780634f1ef286146100a35780635c60da1b146100b65780638f283970146100e7578063f851a4401461010757610068565b366100685761006661011c565b005b61006661011c565b34801561007c57600080fd5b5061006661008b366004610713565b610136565b61006661009e366004610744565b610173565b6100666100b13660046107f5565b6101b8565b3480156100c257600080fd5b506100cb61021f565b6040516001600160a01b03909116815260200160405180910390f35b3480156100f357600080fd5b50610066610102366004610713565b610250565b34801561011357600080fd5b506100cb610270565b6101246102cc565b61013461012f610361565b61036b565b565b61013e61038a565b6001600160a01b0316330361016b57610168816040518060200160405280600081525060006103bd565b50565b61016861011c565b61017b61038a565b6001600160a01b0316330361016b576000610194610361565b9050600080835160208501845af43d6000803e8080156101b3573d6000f35b3d6000fd5b6101c061038a565b6001600160a01b03163303610217576102128383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103bd915050565b505050565b61021261011c565b600061022961038a565b6001600160a01b0316330361024557610240610361565b905090565b61024d61011c565b90565b61025861038a565b6001600160a01b0316330361016b57610168816103e8565b600061027a61038a565b6001600160a01b031633036102455761024061038a565b60606102b683836040518060600160405280602781526020016108ec6027913961043c565b9392505050565b6001600160a01b03163b151590565b6102d461038a565b6001600160a01b031633036101345760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b6000610240610519565b3660008037600080366000845af43d6000803e8080156101b3573d6000f35b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103c683610541565b6000825111806103d35750805b15610212576103e28383610291565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61041161038a565b604080516001600160a01b03928316815291841660208301520160405180910390a161016881610581565b60606001600160a01b0384163b6104a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610358565b600080856001600160a01b0316856040516104bf919061089c565b600060405180830381855af49150503d80600081146104fa576040519150601f19603f3d011682016040523d82523d6000602084013e6104ff565b606091505b509150915061050f82828661062a565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6103ae565b61054a81610663565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105e65760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610358565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156106395750816102b6565b8251156106495782518084602001fd5b8160405162461bcd60e51b815260040161035891906108b8565b6001600160a01b0381163b6106d05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610358565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610609565b80356001600160a01b038116811461070e57600080fd5b919050565b60006020828403121561072557600080fd5b6102b6826106f7565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561075657600080fd5b813567ffffffffffffffff8082111561076e57600080fd5b818401915084601f83011261078257600080fd5b8135818111156107945761079461072e565b604051601f8201601f19908116603f011681019083821181831017156107bc576107bc61072e565b816040528281528760208487010111156107d557600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060006040848603121561080a57600080fd5b610813846106f7565b9250602084013567ffffffffffffffff8082111561083057600080fd5b818601915086601f83011261084457600080fd5b81358181111561085357600080fd5b87602082850101111561086557600080fd5b6020830194508093505050509250925092565b60005b8381101561089357818101518382015260200161087b565b50506000910152565b600082516108ae818460208701610878565b9190910192915050565b60208152600082518060208401526108d7816040850160208701610878565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bebb3300d99b476bd2f64bbccc422fc4bd31a9389ff1c675d867f0aac8101a5664736f6c63430008110033", - "devdoc": { - "kind": "dev", - "methods": { - "admin()": { - "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" - }, - "changeAdmin(address)": { - "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." - }, - "functionDelegateCall(bytes)": { - "details": "Calls a function from the current implementation as specified by `_data`, which should be an encoded function call. Requirements: - Only the admin can call this function. Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider reviewing the encoded data `_data` and the method which is called before using this." - }, - "implementation()": { - "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" - }, - "upgradeTo(address)": { - "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." - }, - "upgradeToAndCall(address,bytes)": { - "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/deployments/goerli-for-devnet/RoninTrustedOrganizationLogic.json b/deployments/goerli-for-devnet/RoninTrustedOrganizationLogic.json deleted file mode 100644 index 58cc8803..00000000 --- a/deployments/goerli-for-devnet/RoninTrustedOrganizationLogic.json +++ /dev/null @@ -1,967 +0,0 @@ -{ - "address": "0xa71456fA88a5f6a4696D0446E690Db4a5913fab0", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousDenominator", - "type": "uint256" - } - ], - "name": "ThresholdUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "consensusAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeVoter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "addedBlock", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct IRoninTrustedOrganization.TrustedOrganization[]", - "name": "orgs", - "type": "tuple[]" - } - ], - "name": "TrustedOrganizationsAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "orgs", - "type": "address[]" - } - ], - "name": "TrustedOrganizationsRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "consensusAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeVoter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "addedBlock", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct IRoninTrustedOrganization.TrustedOrganization[]", - "name": "orgs", - "type": "tuple[]" - } - ], - "name": "TrustedOrganizationsUpdated", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "consensusAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeVoter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "addedBlock", - "type": "uint256" - } - ], - "internalType": "struct IRoninTrustedOrganization.TrustedOrganization[]", - "name": "_list", - "type": "tuple[]" - } - ], - "name": "addTrustedOrganizations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_voteWeight", - "type": "uint256" - } - ], - "name": "checkThreshold", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "countTrustedOrganizations", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAllTrustedOrganizations", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "consensusAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeVoter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "addedBlock", - "type": "uint256" - } - ], - "internalType": "struct IRoninTrustedOrganization.TrustedOrganization[]", - "name": "_list", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "getBridgeVoterWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_list", - "type": "address[]" - } - ], - "name": "getBridgeVoterWeights", - "outputs": [ - { - "internalType": "uint256[]", - "name": "_res", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_consensusAddr", - "type": "address" - } - ], - "name": "getConsensusWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_list", - "type": "address[]" - } - ], - "name": "getConsensusWeights", - "outputs": [ - { - "internalType": "uint256[]", - "name": "_res", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "getGovernorWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_list", - "type": "address[]" - } - ], - "name": "getGovernorWeights", - "outputs": [ - { - "internalType": "uint256[]", - "name": "_res", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "num_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "denom_", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_consensusAddr", - "type": "address" - } - ], - "name": "getTrustedOrganization", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "consensusAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeVoter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "addedBlock", - "type": "uint256" - } - ], - "internalType": "struct IRoninTrustedOrganization.TrustedOrganization", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_idx", - "type": "uint256" - } - ], - "name": "getTrustedOrganizationAt", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "consensusAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeVoter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "addedBlock", - "type": "uint256" - } - ], - "internalType": "struct IRoninTrustedOrganization.TrustedOrganization", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "consensusAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeVoter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "addedBlock", - "type": "uint256" - } - ], - "internalType": "struct IRoninTrustedOrganization.TrustedOrganization[]", - "name": "_trustedOrgs", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "__num", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "__denom", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "minimumVoteWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_list", - "type": "address[]" - } - ], - "name": "removeTrustedOrganizations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - } - ], - "name": "setThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_list", - "type": "address[]" - } - ], - "name": "sumBridgeVoterWeights", - "outputs": [ - { - "internalType": "uint256", - "name": "_res", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_list", - "type": "address[]" - } - ], - "name": "sumConsensusWeights", - "outputs": [ - { - "internalType": "uint256", - "name": "_res", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_list", - "type": "address[]" - } - ], - "name": "sumGovernorWeights", - "outputs": [ - { - "internalType": "uint256", - "name": "_res", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalWeights", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "consensusAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "governor", - "type": "address" - }, - { - "internalType": "address", - "name": "bridgeVoter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "addedBlock", - "type": "uint256" - } - ], - "internalType": "struct IRoninTrustedOrganization.TrustedOrganization[]", - "name": "_list", - "type": "tuple[]" - } - ], - "name": "updateTrustedOrganizations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x462f9eb819a566b93524849ccbfd5e6150f3a134c21722f7b7b4ccbc2178da5c", - "receipt": { - "to": null, - "from": "0xba0000a467FA5d2BCbB78209728dbD2753b41f25", - "contractAddress": "0xa71456fA88a5f6a4696D0446E690Db4a5913fab0", - "transactionIndex": 35, - "gasUsed": "2155862", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8e267767e3054e59765cf09d7773f70bb87d0015c3ee9c14588a859f7c96cc3a", - "transactionHash": "0x462f9eb819a566b93524849ccbfd5e6150f3a134c21722f7b7b4ccbc2178da5c", - "logs": [], - "blockNumber": 8495209, - "cumulativeGasUsed": "12091529", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "a595501ecf8849639d4423c21e560992", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"consensusAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeVoter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedBlock\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct IRoninTrustedOrganization.TrustedOrganization[]\",\"name\":\"orgs\",\"type\":\"tuple[]\"}],\"name\":\"TrustedOrganizationsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"orgs\",\"type\":\"address[]\"}],\"name\":\"TrustedOrganizationsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"consensusAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeVoter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedBlock\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct IRoninTrustedOrganization.TrustedOrganization[]\",\"name\":\"orgs\",\"type\":\"tuple[]\"}],\"name\":\"TrustedOrganizationsUpdated\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"consensusAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeVoter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedBlock\",\"type\":\"uint256\"}],\"internalType\":\"struct IRoninTrustedOrganization.TrustedOrganization[]\",\"name\":\"_list\",\"type\":\"tuple[]\"}],\"name\":\"addTrustedOrganizations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"countTrustedOrganizations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllTrustedOrganizations\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"consensusAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeVoter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedBlock\",\"type\":\"uint256\"}],\"internalType\":\"struct IRoninTrustedOrganization.TrustedOrganization[]\",\"name\":\"_list\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"getBridgeVoterWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_list\",\"type\":\"address[]\"}],\"name\":\"getBridgeVoterWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_res\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_consensusAddr\",\"type\":\"address\"}],\"name\":\"getConsensusWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_list\",\"type\":\"address[]\"}],\"name\":\"getConsensusWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_res\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"getGovernorWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_list\",\"type\":\"address[]\"}],\"name\":\"getGovernorWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_res\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_consensusAddr\",\"type\":\"address\"}],\"name\":\"getTrustedOrganization\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"consensusAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeVoter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedBlock\",\"type\":\"uint256\"}],\"internalType\":\"struct IRoninTrustedOrganization.TrustedOrganization\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"getTrustedOrganizationAt\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"consensusAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeVoter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedBlock\",\"type\":\"uint256\"}],\"internalType\":\"struct IRoninTrustedOrganization.TrustedOrganization\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"consensusAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeVoter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedBlock\",\"type\":\"uint256\"}],\"internalType\":\"struct IRoninTrustedOrganization.TrustedOrganization[]\",\"name\":\"_trustedOrgs\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"__num\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"__denom\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_list\",\"type\":\"address[]\"}],\"name\":\"removeTrustedOrganizations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_list\",\"type\":\"address[]\"}],\"name\":\"sumBridgeVoterWeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_res\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_list\",\"type\":\"address[]\"}],\"name\":\"sumConsensusWeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_res\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_list\",\"type\":\"address[]\"}],\"name\":\"sumGovernorWeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_res\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalWeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"consensusAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeVoter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedBlock\",\"type\":\"uint256\"}],\"internalType\":\"struct IRoninTrustedOrganization.TrustedOrganization[]\",\"name\":\"_list\",\"type\":\"tuple[]\"}],\"name\":\"updateTrustedOrganizations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addTrustedOrganizations((address,address,address,uint256,uint256)[])\":{\"details\":\"Adds a list of addresses into the trusted organization. Requirements: - The weights should larger than 0. - The method caller is admin. - The field `addedBlock` should be blank. Emits the event `TrustedOrganizationAdded` once an organization is added.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"countTrustedOrganizations()\":{\"details\":\"Returns the number of trusted organizations.\"},\"getAllTrustedOrganizations()\":{\"details\":\"Returns all of the trusted organizations.\"},\"getBridgeVoterWeight(address)\":{\"details\":\"Returns the weight of a bridge voter.\"},\"getBridgeVoterWeights(address[])\":{\"details\":\"Returns the weights of a list of bridge voter addresses.\"},\"getConsensusWeight(address)\":{\"details\":\"Returns the weight of a consensus.\"},\"getConsensusWeights(address[])\":{\"details\":\"Returns the weights of a list of consensus addresses.\"},\"getGovernorWeight(address)\":{\"details\":\"Returns the weight of a governor.\"},\"getGovernorWeights(address[])\":{\"details\":\"Returns the weights of a list of governor addresses.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTrustedOrganization(address)\":{\"details\":\"Returns the trusted organization by consensus address. Reverts once the consensus address is non-existent.\"},\"getTrustedOrganizationAt(uint256)\":{\"details\":\"Returns the trusted organization at `_index`.\"},\"initialize((address,address,address,uint256,uint256)[],uint256,uint256)\":{\"details\":\"Initializes the contract storage.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"removeTrustedOrganizations(address[])\":{\"details\":\"Removes a list of addresses from the trusted organization. Requirements: - The method caller is admin. Emits the event `TrustedOrganizationRemoved` once an organization is removed.\",\"params\":{\"_consensusAddrs\":\"The list of consensus addresses linked to corresponding trusted organization that to be removed.\"}},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"sumBridgeVoterWeights(address[])\":{\"details\":\"Returns total weights of the bridge voter list.\"},\"sumConsensusWeights(address[])\":{\"details\":\"Returns total weights of the consensus list.\"},\"sumGovernorWeights(address[])\":{\"details\":\"Returns total weights of the governor list.\"},\"totalWeights()\":{\"details\":\"Returns total weights.\"},\"updateTrustedOrganizations((address,address,address,uint256,uint256)[])\":{\"details\":\"Updates weights for a list of existent trusted organization. Requirements: - The weights should larger than 0. - The method caller is admin. Emits the `TrustedOrganizationUpdated` event.\"}},\"stateVariables\":{\"_addedBlock\":{\"details\":\"Mapping from consensus address => added block\"},\"_bridgeVoterList\":{\"details\":\"Bridge voters array\"},\"_bridgeVoterWeight\":{\"details\":\"Mapping from bridge voter address => weight\"},\"_consensusList\":{\"details\":\"Consensus array\"},\"_consensusWeight\":{\"details\":\"Mapping from consensus address => weight\"},\"_governorList\":{\"details\":\"Governors array\"},\"_governorWeight\":{\"details\":\"Mapping from governor address => weight\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/multi-chains/RoninTrustedOrganization.sol\":\"RoninTrustedOrganization\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == _getAdmin(), \\\"HasProxyAdmin: unauthorized sender\\\");\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n}\\n\",\"keccak256\":\"0x0c2fcf25290180e8cd733691b113464cdde671dc019e6c343e9eb3e16c6ca24a\",\"license\":\"MIT\"},\"contracts/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator)\\n external\\n returns (uint256 _previousNum, uint256 _previousDenom);\\n}\\n\",\"keccak256\":\"0x10f3b360430e6d03773c9959f54cbed6fb0346069645c05b05ef50cfb19f3753\",\"license\":\"MIT\"},\"contracts/interfaces/IRoninTrustedOrganization.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IQuorum.sol\\\";\\n\\ninterface IRoninTrustedOrganization is IQuorum {\\n struct TrustedOrganization {\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address to voting proposal\\n address governor;\\n // Address to voting bridge operators\\n address bridgeVoter;\\n // Its Weight\\n uint256 weight;\\n // The block that the organization was added\\n uint256 addedBlock;\\n }\\n\\n /// @dev Emitted when the trusted organization is added.\\n event TrustedOrganizationsAdded(TrustedOrganization[] orgs);\\n /// @dev Emitted when the trusted organization is updated.\\n event TrustedOrganizationsUpdated(TrustedOrganization[] orgs);\\n /// @dev Emitted when the trusted organization is removed.\\n event TrustedOrganizationsRemoved(address[] orgs);\\n\\n /**\\n * @dev Adds a list of addresses into the trusted organization.\\n *\\n * Requirements:\\n * - The weights should larger than 0.\\n * - The method caller is admin.\\n * - The field `addedBlock` should be blank.\\n *\\n * Emits the event `TrustedOrganizationAdded` once an organization is added.\\n *\\n */\\n function addTrustedOrganizations(TrustedOrganization[] calldata) external;\\n\\n /**\\n * @dev Updates weights for a list of existent trusted organization.\\n *\\n * Requirements:\\n * - The weights should larger than 0.\\n * - The method caller is admin.\\n *\\n * Emits the `TrustedOrganizationUpdated` event.\\n *\\n */\\n function updateTrustedOrganizations(TrustedOrganization[] calldata _list) external;\\n\\n /**\\n * @dev Removes a list of addresses from the trusted organization.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `TrustedOrganizationRemoved` once an organization is removed.\\n *\\n * @param _consensusAddrs The list of consensus addresses linked to corresponding trusted organization that to be removed.\\n */\\n function removeTrustedOrganizations(address[] calldata _consensusAddrs) external;\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function totalWeights() external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a consensus.\\n */\\n function getConsensusWeight(address _consensusAddr) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a governor.\\n */\\n function getGovernorWeight(address _governor) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a bridge voter.\\n */\\n function getBridgeVoterWeight(address _addr) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weights of a list of consensus addresses.\\n */\\n function getConsensusWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the weights of a list of bridge voter addresses.\\n */\\n function getBridgeVoterWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns total weights of the consensus list.\\n */\\n function sumConsensusWeights(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorWeights(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns total weights of the bridge voter list.\\n */\\n function sumBridgeVoterWeights(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns the trusted organization at `_index`.\\n */\\n function getTrustedOrganizationAt(uint256 _index) external view returns (TrustedOrganization memory);\\n\\n /**\\n * @dev Returns the number of trusted organizations.\\n */\\n function countTrustedOrganizations() external view returns (uint256);\\n\\n /**\\n * @dev Returns all of the trusted organizations.\\n */\\n function getAllTrustedOrganizations() external view returns (TrustedOrganization[] memory);\\n\\n /**\\n * @dev Returns the trusted organization by consensus address.\\n *\\n * Reverts once the consensus address is non-existent.\\n */\\n function getTrustedOrganization(address _consensusAddr) external view returns (TrustedOrganization memory);\\n}\\n\",\"keccak256\":\"0x1edb7a3f5d340e7efc141cb8d94c5499954dec869f026d3998ad92cbc714d604\",\"license\":\"MIT\"},\"contracts/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool) {\\n bytes32 _thisHash;\\n bytes32 _otherHash;\\n\\n assembly {\\n _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n }\\n\\n return _thisHash == _otherHash;\\n }\\n}\\n\",\"keccak256\":\"0xea4ac2b0783926a0e6ae257bc069fa37ea864ce77bfb25dd327d4727a38ad0ea\",\"license\":\"UNLICENSED\"},\"contracts/multi-chains/RoninTrustedOrganization.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport \\\"../interfaces/IRoninTrustedOrganization.sol\\\";\\nimport \\\"../extensions/collections/HasProxyAdmin.sol\\\";\\n\\ncontract RoninTrustedOrganization is IRoninTrustedOrganization, HasProxyAdmin, Initializable {\\n uint256 internal _num;\\n uint256 internal _denom;\\n uint256 internal _totalWeight;\\n uint256 internal _nonce;\\n\\n /// @dev Mapping from consensus address => weight\\n mapping(address => uint256) internal _consensusWeight;\\n /// @dev Mapping from governor address => weight\\n mapping(address => uint256) internal _governorWeight;\\n /// @dev Mapping from bridge voter address => weight\\n mapping(address => uint256) internal _bridgeVoterWeight;\\n\\n /// @dev Mapping from consensus address => added block\\n mapping(address => uint256) internal _addedBlock;\\n\\n /// @dev Consensus array\\n address[] internal _consensusList;\\n /// @dev Governors array\\n address[] internal _governorList;\\n /// @dev Bridge voters array\\n address[] internal _bridgeVoterList;\\n\\n /**\\n * @dev Initializes the contract storage.\\n */\\n function initialize(\\n TrustedOrganization[] calldata _trustedOrgs,\\n uint256 __num,\\n uint256 __denom\\n ) external initializer {\\n if (_trustedOrgs.length > 0) {\\n _addTrustedOrganizations(_trustedOrgs);\\n }\\n _setThreshold(__num, __denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _totalWeight;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() external view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(uint256 _numerator, uint256 _denominator)\\n external\\n override\\n onlyAdmin\\n returns (uint256, uint256)\\n {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function addTrustedOrganizations(TrustedOrganization[] calldata _list) external override onlyAdmin {\\n _addTrustedOrganizations(_list);\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function updateTrustedOrganizations(TrustedOrganization[] calldata _list) external override onlyAdmin {\\n require(_list.length > 0, \\\"RoninTrustedOrganization: invalid array length\\\");\\n for (uint256 _i; _i < _list.length; _i++) {\\n _updateTrustedOrganization(_list[_i]);\\n }\\n emit TrustedOrganizationsUpdated(_list);\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function removeTrustedOrganizations(address[] calldata _list) external override onlyAdmin {\\n require(_list.length > 0, \\\"RoninTrustedOrganization: invalid array length\\\");\\n for (uint _i = 0; _i < _list.length; _i++) {\\n _removeTrustedOrganization(_list[_i]);\\n }\\n emit TrustedOrganizationsRemoved(_list);\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function totalWeights() external view virtual returns (uint256) {\\n return _totalWeight;\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getConsensusWeight(address _consensusAddr) external view returns (uint256) {\\n return _consensusWeight[_consensusAddr];\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getGovernorWeight(address _governor) external view returns (uint256) {\\n return _governorWeight[_governor];\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getBridgeVoterWeight(address _addr) external view returns (uint256) {\\n return _bridgeVoterWeight[_addr];\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getConsensusWeights(address[] calldata _list) external view returns (uint256[] memory _res) {\\n _res = new uint256[](_list.length);\\n for (uint _i = 0; _i < _res.length; _i++) {\\n _res[_i] = _consensusWeight[_list[_i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getGovernorWeights(address[] calldata _list) external view returns (uint256[] memory _res) {\\n _res = new uint256[](_list.length);\\n for (uint _i = 0; _i < _res.length; _i++) {\\n _res[_i] = _governorWeight[_list[_i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getBridgeVoterWeights(address[] calldata _list) external view returns (uint256[] memory _res) {\\n _res = new uint256[](_list.length);\\n for (uint _i = 0; _i < _res.length; _i++) {\\n _res[_i] = _bridgeVoterWeight[_list[_i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function sumConsensusWeights(address[] calldata _list) external view returns (uint256 _res) {\\n for (uint _i = 0; _i < _list.length; _i++) {\\n _res += _consensusWeight[_list[_i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function sumGovernorWeights(address[] calldata _list) external view returns (uint256 _res) {\\n for (uint _i = 0; _i < _list.length; _i++) {\\n _res += _governorWeight[_list[_i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function sumBridgeVoterWeights(address[] calldata _list) external view returns (uint256 _res) {\\n for (uint _i = 0; _i < _list.length; _i++) {\\n _res += _bridgeVoterWeight[_list[_i]];\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function countTrustedOrganizations() external view override returns (uint256) {\\n return _consensusList.length;\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getAllTrustedOrganizations() external view override returns (TrustedOrganization[] memory _list) {\\n _list = new TrustedOrganization[](_consensusList.length);\\n address _addr;\\n for (uint256 _i; _i < _list.length; _i++) {\\n _addr = _consensusList[_i];\\n _list[_i].consensusAddr = _addr;\\n _list[_i].governor = _governorList[_i];\\n _list[_i].bridgeVoter = _bridgeVoterList[_i];\\n _list[_i].weight = _consensusWeight[_addr];\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getTrustedOrganization(address _consensusAddr) external view returns (TrustedOrganization memory) {\\n for (uint _i = 0; _i < _consensusList.length; _i++) {\\n if (_consensusList[_i] == _consensusAddr) {\\n return getTrustedOrganizationAt(_i);\\n }\\n }\\n revert(\\\"RoninTrustedOrganization: query for non-existent consensus address\\\");\\n }\\n\\n /**\\n * @inheritdoc IRoninTrustedOrganization\\n */\\n function getTrustedOrganizationAt(uint256 _idx) public view override returns (TrustedOrganization memory) {\\n address _addr = _consensusList[_idx];\\n return\\n TrustedOrganization(\\n _addr,\\n _governorList[_idx],\\n _bridgeVoterList[_idx],\\n _consensusWeight[_addr],\\n _addedBlock[_addr]\\n );\\n }\\n\\n /**\\n * @dev Adds a list of trusted organizations.\\n */\\n function _addTrustedOrganizations(TrustedOrganization[] calldata _list) internal virtual {\\n for (uint256 _i; _i < _list.length; _i++) {\\n _addTrustedOrganization(_list[_i]);\\n }\\n emit TrustedOrganizationsAdded(_list);\\n }\\n\\n /**\\n * @dev Adds a trusted organization.\\n *\\n * Requirements:\\n * - The weight is larger than 0.\\n * - The consensus address is not added.\\n * - The govenor address is not added.\\n * - The bridge voter address is not added.\\n *\\n */\\n function _addTrustedOrganization(TrustedOrganization memory _v) internal virtual {\\n require(_v.addedBlock == 0, \\\"RoninTrustedOrganization: invalid request\\\");\\n require(_v.weight > 0, \\\"RoninTrustedOrganization: invalid weight\\\");\\n\\n address[] memory _addresses = new address[](3);\\n _addresses[0] = _v.consensusAddr;\\n _addresses[1] = _v.governor;\\n _addresses[2] = _v.bridgeVoter;\\n require(!AddressArrayUtils.hasDuplicate(_addresses), \\\"RoninTrustedOrganization: three addresses must be distinct\\\");\\n\\n if (_consensusWeight[_v.consensusAddr] > 0) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"RoninTrustedOrganization: consensus address \\\",\\n Strings.toHexString(uint160(_v.consensusAddr), 20),\\n \\\" is added already\\\"\\n )\\n )\\n );\\n }\\n\\n if (_governorWeight[_v.governor] > 0) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"RoninTrustedOrganization: govenor address \\\",\\n Strings.toHexString(uint160(_v.governor), 20),\\n \\\" is added already\\\"\\n )\\n )\\n );\\n }\\n\\n if (_bridgeVoterWeight[_v.bridgeVoter] > 0) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"RoninTrustedOrganization: bridge voter address \\\",\\n Strings.toHexString(uint160(_v.bridgeVoter), 20),\\n \\\" is added already\\\"\\n )\\n )\\n );\\n }\\n\\n _consensusList.push(_v.consensusAddr);\\n _consensusWeight[_v.consensusAddr] = _v.weight;\\n\\n _governorList.push(_v.governor);\\n _governorWeight[_v.governor] = _v.weight;\\n\\n _bridgeVoterList.push(_v.bridgeVoter);\\n _bridgeVoterWeight[_v.bridgeVoter] = _v.weight;\\n\\n _addedBlock[_v.consensusAddr] = block.number;\\n\\n _totalWeight += _v.weight;\\n }\\n\\n /**\\n * @dev Updates a trusted organization.\\n *\\n * Requirements:\\n * - The weight is larger than 0.\\n * - The consensus address is already added.\\n *\\n */\\n function _updateTrustedOrganization(TrustedOrganization memory _v) internal virtual {\\n require(_v.weight > 0, \\\"RoninTrustedOrganization: invalid weight\\\");\\n\\n uint256 _weight = _consensusWeight[_v.consensusAddr];\\n if (_weight == 0) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"RoninTrustedOrganization: consensus address \\\",\\n Strings.toHexString(uint160(_v.consensusAddr), 20),\\n \\\" is not added\\\"\\n )\\n )\\n );\\n }\\n\\n uint256 _count = _consensusList.length;\\n for (uint256 _i = 0; _i < _count; _i++) {\\n if (_consensusList[_i] == _v.consensusAddr) {\\n _totalWeight -= _weight;\\n _totalWeight += _v.weight;\\n\\n if (_governorList[_i] != _v.governor) {\\n require(_governorWeight[_v.governor] == 0, \\\"RoninTrustedOrganization: query for duplicated governor\\\");\\n delete _governorWeight[_governorList[_i]];\\n _governorList[_i] = _v.governor;\\n }\\n\\n if (_bridgeVoterList[_i] != _v.bridgeVoter) {\\n require(\\n _bridgeVoterWeight[_v.bridgeVoter] == 0,\\n \\\"RoninTrustedOrganization: query for duplicated bridge voter\\\"\\n );\\n delete _bridgeVoterWeight[_bridgeVoterList[_i]];\\n _bridgeVoterList[_i] = _v.bridgeVoter;\\n }\\n\\n _consensusWeight[_v.consensusAddr] = _v.weight;\\n _governorWeight[_v.governor] = _v.weight;\\n _bridgeVoterWeight[_v.bridgeVoter] = _v.weight;\\n return;\\n }\\n }\\n }\\n\\n /**\\n * @dev Removes a trusted organization.\\n *\\n * Requirements:\\n * - The consensus address is added.\\n *\\n */\\n function _removeTrustedOrganization(address _addr) internal virtual {\\n uint256 _weight = _consensusWeight[_addr];\\n if (_weight == 0) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"RoninTrustedOrganization: consensus address \\\",\\n Strings.toHexString(uint160(_addr), 20),\\n \\\" is not added\\\"\\n )\\n )\\n );\\n }\\n\\n uint256 _index;\\n uint256 _count = _consensusList.length;\\n for (uint256 _i = 0; _i < _count; _i++) {\\n if (_consensusList[_i] == _addr) {\\n _index = _i;\\n break;\\n }\\n }\\n\\n _totalWeight -= _weight;\\n\\n delete _addedBlock[_addr];\\n delete _consensusWeight[_addr];\\n _consensusList[_index] = _consensusList[_count - 1];\\n _consensusList.pop();\\n\\n delete _governorWeight[_governorList[_index]];\\n _governorList[_index] = _governorList[_count - 1];\\n _governorList.pop();\\n\\n delete _bridgeVoterWeight[_bridgeVoterList[_index]];\\n _bridgeVoterList[_index] = _bridgeVoterList[_count - 1];\\n _bridgeVoterList.pop();\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(uint256 _numerator, uint256 _denominator)\\n internal\\n virtual\\n returns (uint256 _previousNum, uint256 _previousDenom)\\n {\\n require(_numerator <= _denominator, \\\"RoninTrustedOrganization: invalid threshold\\\");\\n _previousNum = _num;\\n _previousDenom = _denom;\\n _num = _numerator;\\n _denom = _denominator;\\n emit ThresholdUpdated(_nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n}\\n\",\"keccak256\":\"0xe15786e94256712f6c1ada33f24354ac99d594b8dc5d795fe0a2698e34db54ac\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50612609806100206000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063b505a07c116100b8578063d9d5dadb1161007c578063d9d5dadb146102d5578063dafae408146102e8578063db6693a21461030b578063e75235b81461032b578063e8c0685e14610336578063f09267c21461034957600080fd5b8063b505a07c14610256578063b9c3620914610269578063cacf8fb514610291578063cc7e6b3b14610299578063d78392f8146102ac57600080fd5b80635f14a1c31161010a5780635f14a1c3146101fa578063708236251461020d5780637c37103c146102205780637de5dedd14610233578063926323d51461023b578063a85c7d6e1461024357600080fd5b80630ed285df14610147578063150740051461015c57806341feed1c1461017a578063520fce62146101b157806356241911146101d1575b600080fd5b61015a610155366004611e6d565b61035c565b005b6101646103ab565b6040516101719190611eec565b60405180910390f35b6101a3610188366004611f56565b6001600160a01b031660009081526005602052604090205490565b604051908152602001610171565b6101c46101bf366004611f71565b6105a1565b6040516101719190611fe6565b6101a36101df366004611f56565b6001600160a01b031660009081526007602052604090205490565b6101a3610208366004611f71565b610676565b6101c461021b366004611f71565b6106e5565b61015a61022e36600461201e565b6107b3565b6101a36108dc565b6003546101a3565b61015a610251366004611f71565b610919565b61015a610264366004611e6d565b6109f8565b61027c61027736600461206f565b610acc565b60408051928352602083019190915201610171565b6009546101a3565b6101c46102a7366004611f71565b610b1d565b6101a36102ba366004611f56565b6001600160a01b031660009081526006602052604090205490565b6101a36102e3366004611f71565b610beb565b6102fb6102f6366004612091565b610c5a565b6040519015158152602001610171565b61031e610319366004611f56565b610c81565b60405161017191906120aa565b60015460025461027c565b6101a3610344366004611f71565b610d8a565b61031e610357366004612091565b610df9565b610364610eff565b6001600160a01b0316336001600160a01b03161461039d5760405162461bcd60e51b8152600401610394906120b8565b60405180910390fd5b6103a78282610f2d565b5050565b60095460609067ffffffffffffffff8111156103c9576103c96120fa565b60405190808252806020026020018201604052801561042257816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816103e75790505b5090506000805b825181101561059c576009818154811061044557610445612110565b9060005260206000200160009054906101000a90046001600160a01b031691508183828151811061047857610478612110565b60209081029190910101516001600160a01b039091169052600a8054829081106104a4576104a4612110565b9060005260206000200160009054906101000a90046001600160a01b03168382815181106104d4576104d4612110565b6020026020010151602001906001600160a01b031690816001600160a01b031681525050600b818154811061050b5761050b612110565b9060005260206000200160009054906101000a90046001600160a01b031683828151811061053b5761053b612110565b6020908102919091018101516001600160a01b03928316604091820152918416600090815260059091522054835184908390811061057b5761057b612110565b602090810291909101015160600152806105948161213c565b915050610429565b505090565b60608167ffffffffffffffff8111156105bc576105bc6120fa565b6040519080825280602002602001820160405280156105e5578160200160208202803683370190505b50905060005b815181101561066f576005600085858481811061060a5761060a612110565b905060200201602081019061061f9190611f56565b6001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061065257610652612110565b6020908102919091010152806106678161213c565b9150506105eb565b5092915050565b6000805b8281101561066f576006600085858481811061069857610698612110565b90506020020160208101906106ad9190611f56565b6001600160a01b031681526020810191909152604001600020546106d19083612155565b9150806106dd8161213c565b91505061067a565b60608167ffffffffffffffff811115610700576107006120fa565b604051908082528060200260200182016040528015610729578160200160208202803683370190505b50905060005b815181101561066f576007600085858481811061074e5761074e612110565b90506020020160208101906107639190611f56565b6001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061079657610796612110565b6020908102919091010152806107ab8161213c565b91505061072f565b600054610100900460ff16158080156107d35750600054600160ff909116105b806107ed5750303b1580156107ed575060005460ff166001145b6108505760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610394565b6000805460ff191660011790558015610873576000805461ff0019166101001790555b8315610883576108838585610f2d565b61088d8383610fac565b505080156108d5576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b600060025460016002546003546001546108f69190612168565b6109009190612155565b61090a919061217f565b6109149190612192565b905090565b610921610eff565b6001600160a01b0316336001600160a01b0316146109515760405162461bcd60e51b8152600401610394906120b8565b8061096e5760405162461bcd60e51b8152600401610394906121b4565b60005b818110156109ba576109a883838381811061098e5761098e612110565b90506020020160208101906109a39190611f56565b61106d565b806109b28161213c565b915050610971565b507f121945697ac30ee0fc67821492cb685c65f0ea4d7f1b710fde44d6e2237f43a782826040516109ec9291906121f0565b60405180910390a15050565b610a00610eff565b6001600160a01b0316336001600160a01b031614610a305760405162461bcd60e51b8152600401610394906120b8565b80610a4d5760405162461bcd60e51b8152600401610394906121b4565b60005b81811015610a9a57610a88838383818110610a6d57610a6d612110565b905060a00201803603810190610a83919061223c565b6113ff565b80610a928161213c565b915050610a50565b507fe887c8106c09d1770c0ef0bf8ca62c54766f18b07506801865501783376cbeda82826040516109ec9291906122cd565b600080610ad7610eff565b6001600160a01b0316336001600160a01b031614610b075760405162461bcd60e51b8152600401610394906120b8565b610b118484610fac565b915091505b9250929050565b60608167ffffffffffffffff811115610b3857610b386120fa565b604051908082528060200260200182016040528015610b61578160200160208202803683370190505b50905060005b815181101561066f5760066000858584818110610b8657610b86612110565b9050602002016020810190610b9b9190611f56565b6001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110610bce57610bce612110565b602090810291909101015280610be38161213c565b915050610b67565b6000805b8281101561066f5760076000858584818110610c0d57610c0d612110565b9050602002016020810190610c229190611f56565b6001600160a01b03168152602081019190915260400160002054610c469083612155565b915080610c528161213c565b915050610bef565b6000600354600154610c6c9190612168565b600254610c799084612168565b101592915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101829052905b600954811015610d1057826001600160a01b031660098281548110610cd457610cd4612110565b6000918252602090912001546001600160a01b031603610cfe57610cf781610df9565b9392505050565b80610d088161213c565b915050610cad565b5060405162461bcd60e51b815260206004820152604260248201527f526f6e696e547275737465644f7267616e697a6174696f6e3a2071756572792060448201527f666f72206e6f6e2d6578697374656e7420636f6e73656e737573206164647265606482015261737360f01b608482015260a401610394565b6000805b8281101561066f5760056000858584818110610dac57610dac612110565b9050602002016020810190610dc19190611f56565b6001600160a01b03168152602081019190915260400160002054610de59083612155565b915080610df18161213c565b915050610d8e565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152600060098381548110610e3957610e39612110565b9060005260206000200160009054906101000a90046001600160a01b031690506040518060a00160405280826001600160a01b03168152602001600a8581548110610e8657610e86612110565b600091825260209182902001546001600160a01b03168252600b8054929091019186908110610eb757610eb7612110565b60009182526020808320909101546001600160a01b03908116845294909416808252600585526040808320548487015290825260089094528390205492019190915292915050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031690565b60005b81811015610f7a57610f68838383818110610f4d57610f4d612110565b905060a00201803603810190610f63919061223c565b6117e4565b80610f728161213c565b915050610f30565b507fc753dbf7952c70ff6b9fa7b626403aa1d2230d97136b635bd5e85bec72bcca6c82826040516109ec9291906122cd565b600080828411156110015760405162461bcd60e51b815260206004820152602b60248201526000805160206125b483398151915260448201526a19081d1a1c995cda1bdb1960aa1b6064820152608401610394565b505060018054600280549285905583905560048054919291849186919060006110298361213c565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b6001600160a01b038116600090815260056020526040812054908190036110d8576110a2826001600160a01b03166014611bbc565b6040516020016110b291906123b8565b60408051601f198184030181529082905262461bcd60e51b8252610394916004016123f3565b600954600090815b8181101561113957846001600160a01b03166009828154811061110557611105612110565b6000918252602090912001546001600160a01b03160361112757809250611139565b806111318161213c565b9150506110e0565b50826003600082825461114c919061217f565b90915550506001600160a01b03841660009081526008602090815260408083208390556005909152812055600961118460018361217f565b8154811061119457611194612110565b600091825260209091200154600980546001600160a01b0390921691849081106111c0576111c0612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060098054806111ff576111ff612426565b6001900381819060005260206000200160006101000a8154906001600160a01b030219169055905560066000600a848154811061123e5761123e612110565b60009182526020808320909101546001600160a01b03168352820192909252604001812055600a61127060018361217f565b8154811061128057611280612110565b600091825260209091200154600a80546001600160a01b0390921691849081106112ac576112ac612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600a8054806112eb576112eb612426565b6001900381819060005260206000200160006101000a8154906001600160a01b030219169055905560076000600b848154811061132a5761132a612110565b60009182526020808320909101546001600160a01b03168352820192909252604001812055600b61135c60018361217f565b8154811061136c5761136c612110565b600091825260209091200154600b80546001600160a01b03909216918490811061139857611398612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600b8054806113d7576113d7612426565b600082815260209020810160001990810180546001600160a01b031916905501905550505050565b60008160600151116114235760405162461bcd60e51b81526004016103949061243c565b80516001600160a01b03166000908152600560205260408120549081900361145b5781516110a2906001600160a01b03166014611bbc565b60095460005b818110156117de5783600001516001600160a01b03166009828154811061148a5761148a612110565b6000918252602090912001546001600160a01b0316036117cc5782600360008282546114b6919061217f565b90915550506060840151600380546000906114d2908490612155565b9250508190555083602001516001600160a01b0316600a82815481106114fa576114fa612110565b6000918252602090912001546001600160a01b03161461162a576020808501516001600160a01b0316600090815260069091526040902054156115a55760405162461bcd60e51b815260206004820152603760248201527f526f6e696e547275737465644f7267616e697a6174696f6e3a2071756572792060448201527f666f72206475706c69636174656420676f7665726e6f720000000000000000006064820152608401610394565b60066000600a83815481106115bc576115bc612110565b60009182526020808320909101546001600160a01b03168352828101939093526040909101812055840151600a8054839081106115fb576115fb612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b83604001516001600160a01b0316600b828154811061164b5761164b612110565b6000918252602090912001546001600160a01b03161461177a576040808501516001600160a01b0316600090815260076020522054156116f35760405162461bcd60e51b815260206004820152603b60248201527f526f6e696e547275737465644f7267616e697a6174696f6e3a2071756572792060448201527f666f72206475706c6963617465642062726964676520766f74657200000000006064820152608401610394565b60076000600b838154811061170a5761170a612110565b60009182526020808320909101546001600160a01b031683528201929092526040908101822091909155840151600b80548390811061174b5761174b612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b50505060608101805182516001600160a01b0390811660009081526005602090815260408083209490945584518187015184168352600682528483205593519483015190911681526007909252902055565b806117d68161213c565b915050611461565b50505050565b6080810151156118365760405162461bcd60e51b815260206004820152602960248201526000805160206125b483398151915260448201526819081c995c5d595cdd60ba1b6064820152608401610394565b600081606001511161185a5760405162461bcd60e51b81526004016103949061243c565b604080516003808252608082019092526000916020820160608036833701905050905081600001518160008151811061189557611895612110565b60200260200101906001600160a01b031690816001600160a01b0316815250508160200151816001815181106118cd576118cd612110565b60200260200101906001600160a01b031690816001600160a01b03168152505081604001518160028151811061190557611905612110565b60200260200101906001600160a01b031690816001600160a01b03168152505061192e81611d61565b156119a15760405162461bcd60e51b815260206004820152603a60248201527f526f6e696e547275737465644f7267616e697a6174696f6e3a2074687265652060448201527f616464726573736573206d7573742062652064697374696e63740000000000006064820152608401610394565b81516001600160a01b0316600090815260056020526040902054156119e65781516119d6906001600160a01b03166014611bbc565b6040516020016110b29190612472565b6020808301516001600160a01b031660009081526006909152604090205415611a3157611a2182602001516001600160a01b03166014611bbc565b6040516020016110b291906124b1565b6040808301516001600160a01b031660009081526007602052205415611a7957611a6982604001516001600160a01b03166014611bbc565b6040516020016110b29190612524565b8151600980546001808201835560009283527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af90910180546001600160a01b03199081166001600160a01b0395861617909155606086018051875186168552600560209081526040808720929092558089018051600a805480890182559089527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180548716918a16919091179055835190518816875260068252828720558189018051600b8054978801815588527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9909601805490951695881695909517909355815193518616855260078352808520939093558651909416835260089052812043905590516003805491929091611bb3908490612155565b90915550505050565b60606000611bcb836002612168565b611bd6906002612155565b67ffffffffffffffff811115611bee57611bee6120fa565b6040519080825280601f01601f191660200182016040528015611c18576020820181803683370190505b509050600360fc1b81600081518110611c3357611c33612110565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c6257611c62612110565b60200101906001600160f81b031916908160001a9053506000611c86846002612168565b611c91906001612155565b90505b6001811115611d09576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cc557611cc5612110565b1a60f81b828281518110611cdb57611cdb612110565b60200101906001600160f81b031916908160001a90535060049490941c93611d028161259c565b9050611c94565b508315611d585760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610394565b90505b92915050565b60008151600003611d7457506000919050565b60005b60018351611d85919061217f565b811015611e1f576000611d99826001612155565b90505b8351811015611e0c57838181518110611db757611db7612110565b60200260200101516001600160a01b0316848381518110611dda57611dda612110565b60200260200101516001600160a01b031603611dfa575060019392505050565b80611e048161213c565b915050611d9c565b5080611e178161213c565b915050611d77565b50600092915050565b60008083601f840112611e3a57600080fd5b50813567ffffffffffffffff811115611e5257600080fd5b60208301915083602060a083028501011115610b1657600080fd5b60008060208385031215611e8057600080fd5b823567ffffffffffffffff811115611e9757600080fd5b611ea385828601611e28565b90969095509350505050565b80516001600160a01b0390811683526020808301518216908401526040808301519091169083015260608082015190830152608090810151910152565b6020808252825182820181905260009190848201906040850190845b81811015611f2e57611f1b838551611eaf565b9284019260a09290920191600101611f08565b50909695505050505050565b80356001600160a01b0381168114611f5157600080fd5b919050565b600060208284031215611f6857600080fd5b610cf782611f3a565b60008060208385031215611f8457600080fd5b823567ffffffffffffffff80821115611f9c57600080fd5b818501915085601f830112611fb057600080fd5b813581811115611fbf57600080fd5b8660208260051b8501011115611fd457600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015611f2e57835183529284019291840191600101612002565b6000806000806060858703121561203457600080fd5b843567ffffffffffffffff81111561204b57600080fd5b61205787828801611e28565b90989097506020870135966040013595509350505050565b6000806040838503121561208257600080fd5b50508035926020909101359150565b6000602082840312156120a357600080fd5b5035919050565b60a08101611d5b8284611eaf565b60208082526022908201527f48617350726f787941646d696e3a20756e617574686f72697a65642073656e6460408201526132b960f11b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161214e5761214e612126565b5060010190565b80820180821115611d5b57611d5b612126565b8082028115828204841417611d5b57611d5b612126565b81810381811115611d5b57611d5b612126565b6000826121af57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602e908201526000805160206125b483398151915260408201526d0c840c2e4e4c2f240d8cadccee8d60931b606082015260800190565b60208082528181018390526000908460408401835b86811015612231576001600160a01b0361221e84611f3a565b1682529183019190830190600101612205565b509695505050505050565b600060a0828403121561224e57600080fd5b60405160a0810181811067ffffffffffffffff8211171561227f57634e487b7160e01b600052604160045260246000fd5b60405261228b83611f3a565b815261229960208401611f3a565b60208201526122aa60408401611f3a565b604082015260608301356060820152608083013560808201528091505092915050565b6020808252818101839052600090604080840186845b87811015612349576001600160a01b03806122fd84611f3a565b1684528061230c878501611f3a565b16868501528061231d868501611f3a565b168486015250606082810135908401526080808301359084015260a092830192909101906001016122e3565b5090979650505050505050565b7f526f6e696e547275737465644f7267616e697a6174696f6e3a20636f6e73656e81526b039bab99030b2323932b9b9960a51b6020820152602c0190565b60005b838110156123af578181015183820152602001612397565b50506000910152565b60006123c382612356565b83516123d3818360208801612394565b6c081a5cc81b9bdd081859191959609a1b9101908152600d019392505050565b6020815260008251806020840152612412816040850160208701612394565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603160045260246000fd5b60208082526028908201526000805160206125b483398151915260408201526719081dd95a59da1d60c21b606082015260800190565b600061247d82612356565b835161248d818360208801612394565b7020697320616464656420616c726561647960781b91019081526011019392505050565b7f526f6e696e547275737465644f7267616e697a6174696f6e3a20676f76656e6f8152690391030b2323932b9b9960b51b6020820152600082516124fc81602a850160208701612394565b7020697320616464656420616c726561647960781b602a939091019283015250603b01919050565b7f526f6e696e547275737465644f7267616e697a6174696f6e3a2062726964676581526e0103b37ba32b91030b2323932b9b99608d1b60208201526000825161257481602f850160208701612394565b7020697320616464656420616c726561647960781b602f939091019283015250604001919050565b6000816125ab576125ab612126565b50600019019056fe526f6e696e547275737465644f7267616e697a6174696f6e3a20696e76616c69a2646970667358221220c4b9e8a5187cf27423558337feac61e76a63b713cb8fc296a7f4d1e3dad0358764736f6c63430008110033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c8063b505a07c116100b8578063d9d5dadb1161007c578063d9d5dadb146102d5578063dafae408146102e8578063db6693a21461030b578063e75235b81461032b578063e8c0685e14610336578063f09267c21461034957600080fd5b8063b505a07c14610256578063b9c3620914610269578063cacf8fb514610291578063cc7e6b3b14610299578063d78392f8146102ac57600080fd5b80635f14a1c31161010a5780635f14a1c3146101fa578063708236251461020d5780637c37103c146102205780637de5dedd14610233578063926323d51461023b578063a85c7d6e1461024357600080fd5b80630ed285df14610147578063150740051461015c57806341feed1c1461017a578063520fce62146101b157806356241911146101d1575b600080fd5b61015a610155366004611e6d565b61035c565b005b6101646103ab565b6040516101719190611eec565b60405180910390f35b6101a3610188366004611f56565b6001600160a01b031660009081526005602052604090205490565b604051908152602001610171565b6101c46101bf366004611f71565b6105a1565b6040516101719190611fe6565b6101a36101df366004611f56565b6001600160a01b031660009081526007602052604090205490565b6101a3610208366004611f71565b610676565b6101c461021b366004611f71565b6106e5565b61015a61022e36600461201e565b6107b3565b6101a36108dc565b6003546101a3565b61015a610251366004611f71565b610919565b61015a610264366004611e6d565b6109f8565b61027c61027736600461206f565b610acc565b60408051928352602083019190915201610171565b6009546101a3565b6101c46102a7366004611f71565b610b1d565b6101a36102ba366004611f56565b6001600160a01b031660009081526006602052604090205490565b6101a36102e3366004611f71565b610beb565b6102fb6102f6366004612091565b610c5a565b6040519015158152602001610171565b61031e610319366004611f56565b610c81565b60405161017191906120aa565b60015460025461027c565b6101a3610344366004611f71565b610d8a565b61031e610357366004612091565b610df9565b610364610eff565b6001600160a01b0316336001600160a01b03161461039d5760405162461bcd60e51b8152600401610394906120b8565b60405180910390fd5b6103a78282610f2d565b5050565b60095460609067ffffffffffffffff8111156103c9576103c96120fa565b60405190808252806020026020018201604052801561042257816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816103e75790505b5090506000805b825181101561059c576009818154811061044557610445612110565b9060005260206000200160009054906101000a90046001600160a01b031691508183828151811061047857610478612110565b60209081029190910101516001600160a01b039091169052600a8054829081106104a4576104a4612110565b9060005260206000200160009054906101000a90046001600160a01b03168382815181106104d4576104d4612110565b6020026020010151602001906001600160a01b031690816001600160a01b031681525050600b818154811061050b5761050b612110565b9060005260206000200160009054906101000a90046001600160a01b031683828151811061053b5761053b612110565b6020908102919091018101516001600160a01b03928316604091820152918416600090815260059091522054835184908390811061057b5761057b612110565b602090810291909101015160600152806105948161213c565b915050610429565b505090565b60608167ffffffffffffffff8111156105bc576105bc6120fa565b6040519080825280602002602001820160405280156105e5578160200160208202803683370190505b50905060005b815181101561066f576005600085858481811061060a5761060a612110565b905060200201602081019061061f9190611f56565b6001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061065257610652612110565b6020908102919091010152806106678161213c565b9150506105eb565b5092915050565b6000805b8281101561066f576006600085858481811061069857610698612110565b90506020020160208101906106ad9190611f56565b6001600160a01b031681526020810191909152604001600020546106d19083612155565b9150806106dd8161213c565b91505061067a565b60608167ffffffffffffffff811115610700576107006120fa565b604051908082528060200260200182016040528015610729578160200160208202803683370190505b50905060005b815181101561066f576007600085858481811061074e5761074e612110565b90506020020160208101906107639190611f56565b6001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061079657610796612110565b6020908102919091010152806107ab8161213c565b91505061072f565b600054610100900460ff16158080156107d35750600054600160ff909116105b806107ed5750303b1580156107ed575060005460ff166001145b6108505760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610394565b6000805460ff191660011790558015610873576000805461ff0019166101001790555b8315610883576108838585610f2d565b61088d8383610fac565b505080156108d5576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b600060025460016002546003546001546108f69190612168565b6109009190612155565b61090a919061217f565b6109149190612192565b905090565b610921610eff565b6001600160a01b0316336001600160a01b0316146109515760405162461bcd60e51b8152600401610394906120b8565b8061096e5760405162461bcd60e51b8152600401610394906121b4565b60005b818110156109ba576109a883838381811061098e5761098e612110565b90506020020160208101906109a39190611f56565b61106d565b806109b28161213c565b915050610971565b507f121945697ac30ee0fc67821492cb685c65f0ea4d7f1b710fde44d6e2237f43a782826040516109ec9291906121f0565b60405180910390a15050565b610a00610eff565b6001600160a01b0316336001600160a01b031614610a305760405162461bcd60e51b8152600401610394906120b8565b80610a4d5760405162461bcd60e51b8152600401610394906121b4565b60005b81811015610a9a57610a88838383818110610a6d57610a6d612110565b905060a00201803603810190610a83919061223c565b6113ff565b80610a928161213c565b915050610a50565b507fe887c8106c09d1770c0ef0bf8ca62c54766f18b07506801865501783376cbeda82826040516109ec9291906122cd565b600080610ad7610eff565b6001600160a01b0316336001600160a01b031614610b075760405162461bcd60e51b8152600401610394906120b8565b610b118484610fac565b915091505b9250929050565b60608167ffffffffffffffff811115610b3857610b386120fa565b604051908082528060200260200182016040528015610b61578160200160208202803683370190505b50905060005b815181101561066f5760066000858584818110610b8657610b86612110565b9050602002016020810190610b9b9190611f56565b6001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110610bce57610bce612110565b602090810291909101015280610be38161213c565b915050610b67565b6000805b8281101561066f5760076000858584818110610c0d57610c0d612110565b9050602002016020810190610c229190611f56565b6001600160a01b03168152602081019190915260400160002054610c469083612155565b915080610c528161213c565b915050610bef565b6000600354600154610c6c9190612168565b600254610c799084612168565b101592915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101829052905b600954811015610d1057826001600160a01b031660098281548110610cd457610cd4612110565b6000918252602090912001546001600160a01b031603610cfe57610cf781610df9565b9392505050565b80610d088161213c565b915050610cad565b5060405162461bcd60e51b815260206004820152604260248201527f526f6e696e547275737465644f7267616e697a6174696f6e3a2071756572792060448201527f666f72206e6f6e2d6578697374656e7420636f6e73656e737573206164647265606482015261737360f01b608482015260a401610394565b6000805b8281101561066f5760056000858584818110610dac57610dac612110565b9050602002016020810190610dc19190611f56565b6001600160a01b03168152602081019190915260400160002054610de59083612155565b915080610df18161213c565b915050610d8e565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152600060098381548110610e3957610e39612110565b9060005260206000200160009054906101000a90046001600160a01b031690506040518060a00160405280826001600160a01b03168152602001600a8581548110610e8657610e86612110565b600091825260209182902001546001600160a01b03168252600b8054929091019186908110610eb757610eb7612110565b60009182526020808320909101546001600160a01b03908116845294909416808252600585526040808320548487015290825260089094528390205492019190915292915050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031690565b60005b81811015610f7a57610f68838383818110610f4d57610f4d612110565b905060a00201803603810190610f63919061223c565b6117e4565b80610f728161213c565b915050610f30565b507fc753dbf7952c70ff6b9fa7b626403aa1d2230d97136b635bd5e85bec72bcca6c82826040516109ec9291906122cd565b600080828411156110015760405162461bcd60e51b815260206004820152602b60248201526000805160206125b483398151915260448201526a19081d1a1c995cda1bdb1960aa1b6064820152608401610394565b505060018054600280549285905583905560048054919291849186919060006110298361213c565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a49250929050565b6001600160a01b038116600090815260056020526040812054908190036110d8576110a2826001600160a01b03166014611bbc565b6040516020016110b291906123b8565b60408051601f198184030181529082905262461bcd60e51b8252610394916004016123f3565b600954600090815b8181101561113957846001600160a01b03166009828154811061110557611105612110565b6000918252602090912001546001600160a01b03160361112757809250611139565b806111318161213c565b9150506110e0565b50826003600082825461114c919061217f565b90915550506001600160a01b03841660009081526008602090815260408083208390556005909152812055600961118460018361217f565b8154811061119457611194612110565b600091825260209091200154600980546001600160a01b0390921691849081106111c0576111c0612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060098054806111ff576111ff612426565b6001900381819060005260206000200160006101000a8154906001600160a01b030219169055905560066000600a848154811061123e5761123e612110565b60009182526020808320909101546001600160a01b03168352820192909252604001812055600a61127060018361217f565b8154811061128057611280612110565b600091825260209091200154600a80546001600160a01b0390921691849081106112ac576112ac612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600a8054806112eb576112eb612426565b6001900381819060005260206000200160006101000a8154906001600160a01b030219169055905560076000600b848154811061132a5761132a612110565b60009182526020808320909101546001600160a01b03168352820192909252604001812055600b61135c60018361217f565b8154811061136c5761136c612110565b600091825260209091200154600b80546001600160a01b03909216918490811061139857611398612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600b8054806113d7576113d7612426565b600082815260209020810160001990810180546001600160a01b031916905501905550505050565b60008160600151116114235760405162461bcd60e51b81526004016103949061243c565b80516001600160a01b03166000908152600560205260408120549081900361145b5781516110a2906001600160a01b03166014611bbc565b60095460005b818110156117de5783600001516001600160a01b03166009828154811061148a5761148a612110565b6000918252602090912001546001600160a01b0316036117cc5782600360008282546114b6919061217f565b90915550506060840151600380546000906114d2908490612155565b9250508190555083602001516001600160a01b0316600a82815481106114fa576114fa612110565b6000918252602090912001546001600160a01b03161461162a576020808501516001600160a01b0316600090815260069091526040902054156115a55760405162461bcd60e51b815260206004820152603760248201527f526f6e696e547275737465644f7267616e697a6174696f6e3a2071756572792060448201527f666f72206475706c69636174656420676f7665726e6f720000000000000000006064820152608401610394565b60066000600a83815481106115bc576115bc612110565b60009182526020808320909101546001600160a01b03168352828101939093526040909101812055840151600a8054839081106115fb576115fb612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b83604001516001600160a01b0316600b828154811061164b5761164b612110565b6000918252602090912001546001600160a01b03161461177a576040808501516001600160a01b0316600090815260076020522054156116f35760405162461bcd60e51b815260206004820152603b60248201527f526f6e696e547275737465644f7267616e697a6174696f6e3a2071756572792060448201527f666f72206475706c6963617465642062726964676520766f74657200000000006064820152608401610394565b60076000600b838154811061170a5761170a612110565b60009182526020808320909101546001600160a01b031683528201929092526040908101822091909155840151600b80548390811061174b5761174b612110565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b50505060608101805182516001600160a01b0390811660009081526005602090815260408083209490945584518187015184168352600682528483205593519483015190911681526007909252902055565b806117d68161213c565b915050611461565b50505050565b6080810151156118365760405162461bcd60e51b815260206004820152602960248201526000805160206125b483398151915260448201526819081c995c5d595cdd60ba1b6064820152608401610394565b600081606001511161185a5760405162461bcd60e51b81526004016103949061243c565b604080516003808252608082019092526000916020820160608036833701905050905081600001518160008151811061189557611895612110565b60200260200101906001600160a01b031690816001600160a01b0316815250508160200151816001815181106118cd576118cd612110565b60200260200101906001600160a01b031690816001600160a01b03168152505081604001518160028151811061190557611905612110565b60200260200101906001600160a01b031690816001600160a01b03168152505061192e81611d61565b156119a15760405162461bcd60e51b815260206004820152603a60248201527f526f6e696e547275737465644f7267616e697a6174696f6e3a2074687265652060448201527f616464726573736573206d7573742062652064697374696e63740000000000006064820152608401610394565b81516001600160a01b0316600090815260056020526040902054156119e65781516119d6906001600160a01b03166014611bbc565b6040516020016110b29190612472565b6020808301516001600160a01b031660009081526006909152604090205415611a3157611a2182602001516001600160a01b03166014611bbc565b6040516020016110b291906124b1565b6040808301516001600160a01b031660009081526007602052205415611a7957611a6982604001516001600160a01b03166014611bbc565b6040516020016110b29190612524565b8151600980546001808201835560009283527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af90910180546001600160a01b03199081166001600160a01b0395861617909155606086018051875186168552600560209081526040808720929092558089018051600a805480890182559089527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180548716918a16919091179055835190518816875260068252828720558189018051600b8054978801815588527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9909601805490951695881695909517909355815193518616855260078352808520939093558651909416835260089052812043905590516003805491929091611bb3908490612155565b90915550505050565b60606000611bcb836002612168565b611bd6906002612155565b67ffffffffffffffff811115611bee57611bee6120fa565b6040519080825280601f01601f191660200182016040528015611c18576020820181803683370190505b509050600360fc1b81600081518110611c3357611c33612110565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c6257611c62612110565b60200101906001600160f81b031916908160001a9053506000611c86846002612168565b611c91906001612155565b90505b6001811115611d09576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cc557611cc5612110565b1a60f81b828281518110611cdb57611cdb612110565b60200101906001600160f81b031916908160001a90535060049490941c93611d028161259c565b9050611c94565b508315611d585760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610394565b90505b92915050565b60008151600003611d7457506000919050565b60005b60018351611d85919061217f565b811015611e1f576000611d99826001612155565b90505b8351811015611e0c57838181518110611db757611db7612110565b60200260200101516001600160a01b0316848381518110611dda57611dda612110565b60200260200101516001600160a01b031603611dfa575060019392505050565b80611e048161213c565b915050611d9c565b5080611e178161213c565b915050611d77565b50600092915050565b60008083601f840112611e3a57600080fd5b50813567ffffffffffffffff811115611e5257600080fd5b60208301915083602060a083028501011115610b1657600080fd5b60008060208385031215611e8057600080fd5b823567ffffffffffffffff811115611e9757600080fd5b611ea385828601611e28565b90969095509350505050565b80516001600160a01b0390811683526020808301518216908401526040808301519091169083015260608082015190830152608090810151910152565b6020808252825182820181905260009190848201906040850190845b81811015611f2e57611f1b838551611eaf565b9284019260a09290920191600101611f08565b50909695505050505050565b80356001600160a01b0381168114611f5157600080fd5b919050565b600060208284031215611f6857600080fd5b610cf782611f3a565b60008060208385031215611f8457600080fd5b823567ffffffffffffffff80821115611f9c57600080fd5b818501915085601f830112611fb057600080fd5b813581811115611fbf57600080fd5b8660208260051b8501011115611fd457600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015611f2e57835183529284019291840191600101612002565b6000806000806060858703121561203457600080fd5b843567ffffffffffffffff81111561204b57600080fd5b61205787828801611e28565b90989097506020870135966040013595509350505050565b6000806040838503121561208257600080fd5b50508035926020909101359150565b6000602082840312156120a357600080fd5b5035919050565b60a08101611d5b8284611eaf565b60208082526022908201527f48617350726f787941646d696e3a20756e617574686f72697a65642073656e6460408201526132b960f11b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161214e5761214e612126565b5060010190565b80820180821115611d5b57611d5b612126565b8082028115828204841417611d5b57611d5b612126565b81810381811115611d5b57611d5b612126565b6000826121af57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602e908201526000805160206125b483398151915260408201526d0c840c2e4e4c2f240d8cadccee8d60931b606082015260800190565b60208082528181018390526000908460408401835b86811015612231576001600160a01b0361221e84611f3a565b1682529183019190830190600101612205565b509695505050505050565b600060a0828403121561224e57600080fd5b60405160a0810181811067ffffffffffffffff8211171561227f57634e487b7160e01b600052604160045260246000fd5b60405261228b83611f3a565b815261229960208401611f3a565b60208201526122aa60408401611f3a565b604082015260608301356060820152608083013560808201528091505092915050565b6020808252818101839052600090604080840186845b87811015612349576001600160a01b03806122fd84611f3a565b1684528061230c878501611f3a565b16868501528061231d868501611f3a565b168486015250606082810135908401526080808301359084015260a092830192909101906001016122e3565b5090979650505050505050565b7f526f6e696e547275737465644f7267616e697a6174696f6e3a20636f6e73656e81526b039bab99030b2323932b9b9960a51b6020820152602c0190565b60005b838110156123af578181015183820152602001612397565b50506000910152565b60006123c382612356565b83516123d3818360208801612394565b6c081a5cc81b9bdd081859191959609a1b9101908152600d019392505050565b6020815260008251806020840152612412816040850160208701612394565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603160045260246000fd5b60208082526028908201526000805160206125b483398151915260408201526719081dd95a59da1d60c21b606082015260800190565b600061247d82612356565b835161248d818360208801612394565b7020697320616464656420616c726561647960781b91019081526011019392505050565b7f526f6e696e547275737465644f7267616e697a6174696f6e3a20676f76656e6f8152690391030b2323932b9b9960b51b6020820152600082516124fc81602a850160208701612394565b7020697320616464656420616c726561647960781b602a939091019283015250603b01919050565b7f526f6e696e547275737465644f7267616e697a6174696f6e3a2062726964676581526e0103b37ba32b91030b2323932b9b99608d1b60208201526000825161257481602f850160208701612394565b7020697320616464656420616c726561647960781b602f939091019283015250604001919050565b6000816125ab576125ab612126565b50600019019056fe526f6e696e547275737465644f7267616e697a6174696f6e3a20696e76616c69a2646970667358221220c4b9e8a5187cf27423558337feac61e76a63b713cb8fc296a7f4d1e3dad0358764736f6c63430008110033", - "devdoc": { - "kind": "dev", - "methods": { - "addTrustedOrganizations((address,address,address,uint256,uint256)[])": { - "details": "Adds a list of addresses into the trusted organization. Requirements: - The weights should larger than 0. - The method caller is admin. - The field `addedBlock` should be blank. Emits the event `TrustedOrganizationAdded` once an organization is added." - }, - "checkThreshold(uint256)": { - "details": "Checks whether the `_voteWeight` passes the threshold." - }, - "countTrustedOrganizations()": { - "details": "Returns the number of trusted organizations." - }, - "getAllTrustedOrganizations()": { - "details": "Returns all of the trusted organizations." - }, - "getBridgeVoterWeight(address)": { - "details": "Returns the weight of a bridge voter." - }, - "getBridgeVoterWeights(address[])": { - "details": "Returns the weights of a list of bridge voter addresses." - }, - "getConsensusWeight(address)": { - "details": "Returns the weight of a consensus." - }, - "getConsensusWeights(address[])": { - "details": "Returns the weights of a list of consensus addresses." - }, - "getGovernorWeight(address)": { - "details": "Returns the weight of a governor." - }, - "getGovernorWeights(address[])": { - "details": "Returns the weights of a list of governor addresses." - }, - "getThreshold()": { - "details": "Returns the threshold." - }, - "getTrustedOrganization(address)": { - "details": "Returns the trusted organization by consensus address. Reverts once the consensus address is non-existent." - }, - "getTrustedOrganizationAt(uint256)": { - "details": "Returns the trusted organization at `_index`." - }, - "initialize((address,address,address,uint256,uint256)[],uint256,uint256)": { - "details": "Initializes the contract storage." - }, - "minimumVoteWeight()": { - "details": "Returns the minimum vote weight to pass the threshold." - }, - "removeTrustedOrganizations(address[])": { - "details": "Removes a list of addresses from the trusted organization. Requirements: - The method caller is admin. Emits the event `TrustedOrganizationRemoved` once an organization is removed.", - "params": { - "_consensusAddrs": "The list of consensus addresses linked to corresponding trusted organization that to be removed." - } - }, - "setThreshold(uint256,uint256)": { - "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." - }, - "sumBridgeVoterWeights(address[])": { - "details": "Returns total weights of the bridge voter list." - }, - "sumConsensusWeights(address[])": { - "details": "Returns total weights of the consensus list." - }, - "sumGovernorWeights(address[])": { - "details": "Returns total weights of the governor list." - }, - "totalWeights()": { - "details": "Returns total weights." - }, - "updateTrustedOrganizations((address,address,address,uint256,uint256)[])": { - "details": "Updates weights for a list of existent trusted organization. Requirements: - The weights should larger than 0. - The method caller is admin. Emits the `TrustedOrganizationUpdated` event." - } - }, - "stateVariables": { - "_addedBlock": { - "details": "Mapping from consensus address => added block" - }, - "_bridgeVoterList": { - "details": "Bridge voters array" - }, - "_bridgeVoterWeight": { - "details": "Mapping from bridge voter address => weight" - }, - "_consensusList": { - "details": "Consensus array" - }, - "_consensusWeight": { - "details": "Mapping from consensus address => weight" - }, - "_governorList": { - "details": "Governors array" - }, - "_governorWeight": { - "details": "Mapping from governor address => weight" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1373, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8" - }, - { - "astId": 1376, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 18710, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_num", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 18712, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_denom", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 18714, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_totalWeight", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 18716, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_nonce", - "offset": 0, - "slot": "4", - "type": "t_uint256" - }, - { - "astId": 18721, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_consensusWeight", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 18726, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_governorWeight", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 18731, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_bridgeVoterWeight", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 18736, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_addedBlock", - "offset": 0, - "slot": "8", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 18740, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_consensusList", - "offset": 0, - "slot": "9", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 18744, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_governorList", - "offset": 0, - "slot": "10", - "type": "t_array(t_address)dyn_storage" - }, - { - "astId": 18748, - "contract": "contracts/multi-chains/RoninTrustedOrganization.sol:RoninTrustedOrganization", - "label": "_bridgeVoterList", - "offset": 0, - "slot": "11", - "type": "t_array(t_address)dyn_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_address)dyn_storage": { - "base": "t_address", - "encoding": "dynamic_array", - "label": "address[]", - "numberOfBytes": "32" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/deployments/goerli-for-devnet/solcInputs/a595501ecf8849639d4423c21e560992.json b/deployments/goerli-for-devnet/solcInputs/a595501ecf8849639d4423c21e560992.json deleted file mode 100644 index 854e2357..00000000 --- a/deployments/goerli-for-devnet/solcInputs/a595501ecf8849639d4423c21e560992.json +++ /dev/null @@ -1,506 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "contracts/extensions/collections/HasBridgeContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasBridgeContract.sol\";\nimport \"../../interfaces/IBridge.sol\";\n\ncontract HasBridgeContract is IHasBridgeContract, HasProxyAdmin {\n IBridge internal _bridgeContract;\n\n modifier onlyBridgeContract() {\n if (bridgeContract() != msg.sender) revert ErrCallerMustBeBridgeContract();\n _;\n }\n\n /**\n * @inheritdoc IHasBridgeContract\n */\n function bridgeContract() public view override returns (address) {\n return address(_bridgeContract);\n }\n\n /**\n * @inheritdoc IHasBridgeContract\n */\n function setBridgeContract(address _addr) external virtual override onlyAdmin {\n if (_addr.code.length <= 0) revert ErrZeroCodeContract();\n _setBridgeContract(_addr);\n }\n\n /**\n * @dev Sets the bridge contract.\n *\n * Emits the event `BridgeContractUpdated`.\n *\n */\n function _setBridgeContract(address _addr) internal {\n _bridgeContract = IBridge(_addr);\n emit BridgeContractUpdated(_addr);\n }\n}\n" - }, - "contracts/extensions/collections/HasProxyAdmin.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/StorageSlot.sol\";\n\nabstract contract HasProxyAdmin {\n // bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n modifier onlyAdmin() {\n require(msg.sender == _getAdmin(), \"HasProxyAdmin: unauthorized sender\");\n _;\n }\n\n /**\n * @dev Returns proxy admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n}\n" - }, - "contracts/interfaces/collections/IHasBridgeContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasBridgeContract is IHasContract {\n /// @dev Emitted when the bridge contract is updated.\n event BridgeContractUpdated(address);\n\n /// @dev Error of method caller must be bridge contract.\n error ErrCallerMustBeBridgeContract();\n\n /**\n * @dev Returns the bridge contract.\n */\n function bridgeContract() external view returns (address);\n\n /**\n * @dev Sets the bridge contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `BridgeContractUpdated`.\n *\n */\n function setBridgeContract(address) external;\n}\n" - }, - "contracts/interfaces/IBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IBridge {\n /**\n * @dev Replaces the old bridge operator list by the new one.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emitted the event `BridgeOperatorsReplaced`.\n *\n */\n function replaceBridgeOperators(address[] calldata) external;\n\n /**\n * @dev Returns the bridge operator list.\n */\n function getBridgeOperators() external view returns (address[] memory);\n}\n" - }, - "@openzeppelin/contracts/utils/StorageSlot.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" - }, - "contracts/interfaces/collections/IHasContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface IHasContract {\n /// @dev Error of set to non-contract.\n error ErrZeroCodeContract();\n}\n" - }, - "contracts/ronin/BridgeTracking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../extensions/collections/HasBridgeContract.sol\";\nimport \"../extensions/collections/HasValidatorContract.sol\";\nimport \"../interfaces/IBridgeTracking.sol\";\n\ncontract BridgeTracking is HasBridgeContract, HasValidatorContract, Initializable, IBridgeTracking {\n struct VoteStats {\n uint256 totalVotes;\n uint256 totalBallots;\n mapping(address => uint256) totalBallotsOf;\n address[] voters;\n }\n\n struct VoteStatsTimeWrapper {\n uint256 lastEpoch;\n VoteStats info;\n }\n\n struct ReceiptStats {\n // The period that the receipt is approved\n uint256 approvedPeriod;\n // The address list of voters\n address[] voters;\n // Mapping from voter => flag indicating the voter casts vote for this receipt\n mapping(address => bool) voted;\n }\n\n /// @dev Deprecated slots.\n uint256[6] private __deprecated;\n\n /// @dev The block that the contract allows incoming mutable calls.\n uint256 public startedAtBlock;\n\n /// @dev The temporary info of votes and ballots\n VoteStatsTimeWrapper internal _temporaryStats;\n /// @dev Mapping from period number => vote stats based on period\n mapping(uint256 => VoteStats) internal _periodStats;\n /// @dev Mapping from vote kind => receipt id => receipt stats\n mapping(VoteKind => mapping(uint256 => ReceiptStats)) internal _receiptStats;\n\n modifier skipOnUnstarted() {\n if (block.number < startedAtBlock) {\n return;\n }\n _;\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes the contract storage.\n */\n function initialize(\n address _bridgeContract,\n address _validatorContract,\n uint256 _startedAtBlock\n ) external initializer {\n _setBridgeContract(_bridgeContract);\n _setValidatorContract(_validatorContract);\n startedAtBlock = _startedAtBlock;\n }\n\n /**\n * @inheritdoc IBridgeTracking\n */\n function totalVotes(uint256 _period) external view override returns (uint256 _totalVotes) {\n _totalVotes = _periodStats[_period].totalVotes;\n\n bool _mustCountLastStats = _isLastStatsCountedForPeriod(_period);\n if (_mustCountLastStats) {\n _totalVotes += _temporaryStats.info.totalVotes;\n }\n }\n\n /**\n * @inheritdoc IBridgeTracking\n */\n function totalBallots(uint256 _period) external view override returns (uint256 _totalBallots) {\n _totalBallots = _periodStats[_period].totalBallots;\n\n bool _mustCountLastStats = _isLastStatsCountedForPeriod(_period);\n if (_mustCountLastStats) {\n _totalBallots += _temporaryStats.info.totalBallots;\n }\n }\n\n /**\n * @inheritdoc IBridgeTracking\n */\n function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators)\n external\n view\n override\n returns (uint256[] memory _res)\n {\n _res = new uint256[](_bridgeOperators.length);\n bool _mustCountLastStats = _isLastStatsCountedForPeriod(_period);\n for (uint _i = 0; _i < _bridgeOperators.length; _i++) {\n _res[_i] = _totalBallotsOf(_period, _bridgeOperators[_i], _mustCountLastStats);\n }\n }\n\n /**\n * @inheritdoc IBridgeTracking\n */\n function totalBallotsOf(uint256 _period, address _bridgeOperator) public view override returns (uint256) {\n return _totalBallotsOf(_period, _bridgeOperator, _isLastStatsCountedForPeriod(_period));\n }\n\n /**\n * @inheritdoc IBridgeTracking\n */\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external override onlyBridgeContract skipOnUnstarted {\n ReceiptStats storage _stats = _receiptStats[_kind][_requestId];\n\n // Only records for the receipt which not approved\n if (_stats.approvedPeriod == 0) {\n _trySyncPeriodStats();\n uint256 _currentPeriod = _validatorContract.currentPeriod();\n _temporaryStats.info.totalVotes++;\n _stats.approvedPeriod = _currentPeriod;\n\n address[] storage _voters = _stats.voters;\n for (uint _i = 0; _i < _voters.length; _i++) {\n _increaseBallot(_kind, _requestId, _voters[_i], _currentPeriod);\n }\n\n delete _stats.voters;\n }\n }\n\n /**\n * @inheritdoc IBridgeTracking\n */\n function recordVote(\n VoteKind _kind,\n uint256 _requestId,\n address _operator\n ) external override onlyBridgeContract skipOnUnstarted {\n uint256 _period = _validatorContract.currentPeriod();\n _trySyncPeriodStats();\n ReceiptStats storage _stats = _receiptStats[_kind][_requestId];\n\n // Stores the ones vote for the (deposit/mainchain withdrawal) request which is not approved yet\n if (_stats.approvedPeriod == 0) {\n _stats.voters.push(_operator);\n return;\n }\n\n _increaseBallot(_kind, _requestId, _operator, _period);\n }\n\n /**\n * Increases the ballot for the operator at a period.\n */\n function _increaseBallot(\n VoteKind _kind,\n uint256 _requestId,\n address _operator,\n uint256 _period\n ) internal {\n ReceiptStats storage _receiptInfo = _receiptStats[_kind][_requestId];\n if (_receiptInfo.voted[_operator]) {\n return;\n }\n\n _receiptInfo.voted[_operator] = true;\n\n // Only records within a period\n if (_receiptInfo.approvedPeriod == _period) {\n if (_temporaryStats.info.totalBallotsOf[_operator] == 0) {\n _temporaryStats.info.voters.push(_operator);\n }\n _temporaryStats.info.totalBallots++;\n _temporaryStats.info.totalBallotsOf[_operator]++;\n }\n }\n\n /**\n * @dev See `totalBallotsOf`.\n */\n function _totalBallotsOf(\n uint256 _period,\n address _bridgeOperator,\n bool _mustCountLastStats\n ) internal view returns (uint256 _totalBallots) {\n _totalBallots = _periodStats[_period].totalBallotsOf[_bridgeOperator];\n if (_mustCountLastStats) {\n _totalBallots += _temporaryStats.info.totalBallotsOf[_bridgeOperator];\n }\n }\n\n /**\n * @dev Syncs period stats if the last epoch + 1 is already wrapped up.\n */\n function _trySyncPeriodStats() internal {\n uint256 _currentEpoch = _validatorContract.epochOf(block.number);\n if (_temporaryStats.lastEpoch < _currentEpoch) {\n (bool _filled, uint256 _period) = _validatorContract.tryGetPeriodOfEpoch(_temporaryStats.lastEpoch + 1);\n if (!_filled) {\n return;\n }\n\n VoteStats storage _stats = _periodStats[_period];\n _stats.totalVotes += _temporaryStats.info.totalVotes;\n _stats.totalBallots += _temporaryStats.info.totalBallots;\n\n address _voter;\n for (uint _i = 0; _i < _temporaryStats.info.voters.length; _i++) {\n _voter = _temporaryStats.info.voters[_i];\n _stats.totalBallotsOf[_voter] += _temporaryStats.info.totalBallotsOf[_voter];\n delete _temporaryStats.info.totalBallotsOf[_voter];\n }\n delete _temporaryStats.info;\n _temporaryStats.lastEpoch = _currentEpoch;\n }\n }\n\n /**\n * @dev Returns whether the last stats must be counted or not;\n */\n function _isLastStatsCountedForPeriod(uint256 _queriedPeriod) internal view returns (bool) {\n uint256 _currentEpoch = _validatorContract.epochOf(block.number);\n (bool _filled, uint256 _periodOfNextTemporaryEpoch) = _validatorContract.tryGetPeriodOfEpoch(\n _temporaryStats.lastEpoch + 1\n );\n return _filled && _queriedPeriod == _periodOfNextTemporaryEpoch && _temporaryStats.lastEpoch < _currentEpoch;\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\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 {ERC1967Proxy-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 *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 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 Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n * initialization step. This is essential to configure modules that are added through upgrades and that require\n * initialization.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n}\n" - }, - "contracts/extensions/collections/HasValidatorContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasValidatorContract.sol\";\nimport \"../../interfaces/validator/IRoninValidatorSet.sol\";\n\ncontract HasValidatorContract is IHasValidatorContract, HasProxyAdmin {\n IRoninValidatorSet internal _validatorContract;\n\n modifier onlyValidatorContract() {\n if (validatorContract() != msg.sender) revert ErrCallerMustBeValidatorContract();\n _;\n }\n\n /**\n * @inheritdoc IHasValidatorContract\n */\n function validatorContract() public view override returns (address) {\n return address(_validatorContract);\n }\n\n /**\n * @inheritdoc IHasValidatorContract\n */\n function setValidatorContract(address _addr) external virtual override onlyAdmin {\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\n _setValidatorContract(_addr);\n }\n\n /**\n * @dev Sets the validator contract.\n *\n * Emits the event `ValidatorContractUpdated`.\n *\n */\n function _setValidatorContract(address _addr) internal {\n _validatorContract = IRoninValidatorSet(_addr);\n emit ValidatorContractUpdated(_addr);\n }\n}\n" - }, - "contracts/interfaces/IBridgeTracking.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IBridgeTracking {\n enum VoteKind {\n Deposit,\n Withdrawal,\n MainchainWithdrawal\n }\n\n /**\n * @dev Returns the total number of votes at the specific period `_period`.\n */\n function totalVotes(uint256 _period) external view returns (uint256);\n\n /**\n * @dev Returns the total number of ballots at the specific period `_period`.\n */\n function totalBallots(uint256 _period) external view returns (uint256);\n\n /**\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\n */\n function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\n */\n function totalBallotsOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\n\n /**\n * @dev Handles the request once it is approved.\n *\n * Requirements:\n * - The method caller is the bridge contract.\n *\n */\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\n\n /**\n * @dev Records vote for a receipt and a operator.\n *\n * Requirements:\n * - The method caller is the bridge contract.\n *\n */\n function recordVote(\n VoteKind _kind,\n uint256 _requestId,\n address _operator\n ) external;\n}\n" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\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 * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-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" - }, - "contracts/interfaces/collections/IHasValidatorContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasValidatorContract is IHasContract {\n /// @dev Emitted when the validator contract is updated.\n event ValidatorContractUpdated(address);\n\n /// @dev Error of method caller must be validator contract.\n error ErrCallerMustBeValidatorContract();\n\n /**\n * @dev Returns the validator contract.\n */\n function validatorContract() external view returns (address);\n\n /**\n * @dev Sets the validator contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `ValidatorContractUpdated`.\n *\n */\n function setValidatorContract(address) external;\n}\n" - }, - "contracts/interfaces/validator/IRoninValidatorSet.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./ICandidateManager.sol\";\nimport \"./info-fragments/ICommonInfo.sol\";\nimport \"./ICoinbaseExecution.sol\";\nimport \"./ISlashingExecution.sol\";\nimport \"./IEmergencyExit.sol\";\n\ninterface IRoninValidatorSet is\n ICandidateManager,\n ICommonInfo,\n ISlashingExecution,\n ICoinbaseExecution,\n IEmergencyExit\n{}\n" - }, - "contracts/interfaces/validator/ICandidateManager.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface ICandidateManager {\n struct ValidatorCandidate {\n // Admin of the candidate\n address admin;\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\n address consensusAddr;\n // Address that receives mining reward of the validator\n address payable treasuryAddr;\n // Address of the bridge operator corresponding to the candidate\n address bridgeOperatorAddr;\n // The percentage of reward that validators can be received, the rest goes to the delegators.\n // Values in range [0; 100_00] stands for 0-100%\n uint256 commissionRate;\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\n uint256 revokingTimestamp;\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\n uint256 topupDeadline;\n }\n\n struct CommissionSchedule {\n // The timestamp that the commission schedule gets affected (no schedule=0).\n uint256 effectiveTimestamp;\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\n uint256 commissionRate;\n }\n\n /// @dev Emitted when the maximum number of validator candidates is updated.\n event MaxValidatorCandidateUpdated(uint256 threshold);\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\n /// @dev Emitted when the validator candidate is granted.\n event CandidateGranted(\n address indexed consensusAddr,\n address indexed treasuryAddr,\n address indexed admin,\n address bridgeOperator\n );\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\n /// @dev Emitted when the topup deadline of a candidate is updated.\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\n /// @dev Emitted when the validator candidate is revoked.\n event CandidatesRevoked(address[] consensusAddrs);\n\n /// @dev Emitted when a schedule for updating commission rate is set.\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\n /// @dev Emitted when the commission rate of a validator is updated.\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\n\n /// @dev Error of exceeding maximum number of candidates.\n error ErrExceedsMaxNumberOfCandidate();\n /// @dev Error of querying for already existent candidate.\n error ErrExistentCandidate();\n /// @dev Error of querying for non-existent candidate.\n error ErrNonExistentCandidate();\n /// @dev Error of candidate admin already exists.\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\n /// @dev Error of treasury already exists.\n error ErrExistentTreasury(address _treasuryAddr);\n /// @dev Error of bridge operator already exists.\n error ErrExistentBridgeOperator(address _bridgeOperatorAddr);\n /// @dev Error of invalid commission rate.\n error ErrInvalidCommissionRate();\n /// @dev Error of invalid effective days onwards.\n error ErrInvalidEffectiveDaysOnwards();\n /// @dev Error of invalid min effective days onwards.\n error ErrInvalidMinEffectiveDaysOnwards();\n /// @dev Error of already requested revoking candidate before.\n error ErrAlreadyRequestedRevokingCandidate();\n /// @dev Error of commission change schedule exists.\n error ErrAlreadyRequestedUpdatingCommissionRate();\n /// @dev Error of trusted org cannot renounce.\n error ErrTrustedOrgCannotRenounce();\n\n /**\n * @dev Returns the maximum number of validator candidate.\n */\n function maxValidatorCandidate() external view returns (uint256);\n\n /**\n * @dev Returns the minimum number of days to the effective date of commission rate change.\n */\n function minEffectiveDaysOnwards() external view returns (uint256);\n\n /**\n * @dev Sets the maximum number of validator candidate.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the `MaxValidatorCandidateUpdated` event.\n *\n */\n function setMaxValidatorCandidate(uint256) external;\n\n /**\n * @dev Sets the minimum number of days to the effective date of commision rate change.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\n *\n */\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\n\n /**\n * @dev Grants a validator candidate.\n *\n * Requirements:\n * - The method caller is staking contract.\n *\n * Emits the event `CandidateGranted`.\n *\n */\n function execApplyValidatorCandidate(\n address _admin,\n address _consensusAddr,\n address payable _treasuryAddr,\n address _bridgeOperatorAddr,\n uint256 _commissionRate\n ) external;\n\n /**\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\n *\n * Requirements:\n * - The method caller is staking contract.\n *\n * Emits the event `CandidateRevokingTimestampUpdated`.\n *\n */\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\n\n /**\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\n *\n * Requirements:\n * - The method caller is the staking contract.\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\n * - The `_rate` must be in range of [0_00; 100_00].\n *\n * Emits the event `CommissionRateUpdateScheduled`.\n *\n */\n function execRequestUpdateCommissionRate(\n address _consensusAddr,\n uint256 _effectiveTimestamp,\n uint256 _rate\n ) external;\n\n /**\n * @dev Returns whether the address is a validator (candidate).\n */\n function isValidatorCandidate(address _addr) external view returns (bool);\n\n /**\n * @dev Returns the validator candidate.\n */\n function getValidatorCandidates() external view returns (address[] memory);\n\n /**\n * @dev Returns all candidate info.\n */\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\n\n /**\n * @dev Returns the info of a candidate.\n */\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\n\n /**\n * @dev Returns whether the address is the candidate admin.\n */\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\n\n /**\n * @dev Returns the schedule of changing commission rate of a candidate address.\n */\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\n}\n" - }, - "contracts/interfaces/validator/info-fragments/ICommonInfo.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IJailingInfo.sol\";\nimport \"./ITimingInfo.sol\";\nimport \"./IValidatorInfo.sol\";\n\ninterface ICommonInfo is ITimingInfo, IJailingInfo, IValidatorInfo {\n struct EmergencyExitInfo {\n uint256 lockedAmount;\n // The timestamp that this locked amount will be recycled to staking vesting contract\n uint256 recyclingAt;\n }\n\n /// @dev Emitted when the deprecated reward is withdrawn.\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\n /// @dev Emitted when the deprecated reward withdrawal is failed\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\n\n // Error thrown when receives RON from neither staking vesting contract nor staking contract\"\n error ErrUnauthorizedReceiveRON();\n\n /**\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\n */\n function totalDeprecatedReward() external view returns (uint256);\n\n /**\n * @dev Returns the emergency exit request.\n */\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\n}\n" - }, - "contracts/interfaces/validator/ICoinbaseExecution.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./ISlashingExecution.sol\";\n\ninterface ICoinbaseExecution is ISlashingExecution {\n enum BlockRewardDeprecatedType {\n UNKNOWN,\n UNAVAILABILITY,\n AFTER_BAILOUT\n }\n\n /// @dev Emitted when the validator set is updated\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\n /// @dev Emitted when the bridge operator set is updated.\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\n\n /// @dev Emitted when the reward of the block producer is deprecated.\n event BlockRewardDeprecated(\n address indexed coinbaseAddr,\n uint256 rewardAmount,\n BlockRewardDeprecatedType deprecatedType\n );\n /// @dev Emitted when the block reward is submitted.\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\n\n /// @dev Emitted when the block producer reward is distributed.\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\n /// @dev Emitted when the contract fails when distributing the block producer reward.\n event MiningRewardDistributionFailed(\n address indexed consensusAddr,\n address indexed recipient,\n uint256 amount,\n uint256 contractBalance\n );\n\n /// @dev Emitted when the bridge operator reward is distributed.\n event BridgeOperatorRewardDistributed(\n address indexed consensusAddr,\n address indexed bridgeOperator,\n address indexed recipientAddr,\n uint256 amount\n );\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\n event BridgeOperatorRewardDistributionFailed(\n address indexed consensusAddr,\n address indexed bridgeOperator,\n address indexed recipient,\n uint256 amount,\n uint256 contractBalance\n );\n\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\n event StakingRewardDistributionFailed(\n uint256 totalAmount,\n address[] consensusAddrs,\n uint256[] amounts,\n uint256 contractBalance\n );\n\n /// @dev Emitted when the epoch is wrapped up.\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\n\n /// @dev Error of method caller must be coinbase\n error ErrCallerMustBeCoinbase();\n /// @dev Error of only allowed at the end of epoch\n error ErrAtEndOfEpochOnly();\n /// @dev Error of query for already wrapped up epoch\n error ErrAlreadyWrappedEpoch();\n\n /**\n * @dev Submits reward of the current block.\n *\n * Requirements:\n * - The method caller is coinbase.\n *\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\n * Emits the event `BlockRewardSubmitted` for the valid call.\n *\n */\n function submitBlockReward() external payable;\n\n /**\n * @dev Wraps up the current epoch.\n *\n * Requirements:\n * - The method must be called when the current epoch is ending.\n * - The epoch is not wrapped yet.\n * - The method caller is coinbase.\n *\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\n * Emits the event `WrappedUpEpoch`.\n *\n */\n function wrapUpEpoch() external payable;\n}\n" - }, - "contracts/interfaces/validator/ISlashingExecution.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface ISlashingExecution {\n /// @dev Emitted when the validator is punished.\n event ValidatorPunished(\n address indexed consensusAddr,\n uint256 indexed period,\n uint256 jailedUntil,\n uint256 deductedStakingAmount,\n bool blockProducerRewardDeprecated,\n bool bridgeOperatorRewardDeprecated\n );\n /// @dev Emitted when the validator get out of jail by bailout.\n event ValidatorUnjailed(address indexed validator, uint256 period);\n\n /// @dev Error of cannot bailout due to high tier slash.\n error ErrCannotBailout(address validator);\n\n /**\n * @dev Finalize the slash request from slash indicator contract.\n *\n * Requirements:\n * - The method caller is slash indicator contract.\n *\n * Emits the event `ValidatorPunished`.\n *\n */\n function execSlash(\n address _validatorAddr,\n uint256 _newJailedUntil,\n uint256 _slashAmount,\n bool _cannotBailout\n ) external;\n\n /**\n * @dev Finalize the bailout request from slash indicator contract.\n *\n * Requirements:\n * - The method caller is slash indicator contract.\n *\n * Emits the event `ValidatorUnjailed`.\n *\n */\n function execBailOut(address _validatorAddr, uint256 _period) external;\n}\n" - }, - "contracts/interfaces/validator/IEmergencyExit.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface IEmergencyExit {\n /// @dev Emitted when the fund is locked from an emergency exit request\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\n event EmergencyExitLockedFundReleased(\n address indexed consensusAddr,\n address indexed recipient,\n uint256 unlockedAmount\n );\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\n event EmergencyExitLockedFundReleasingFailed(\n address indexed consensusAddr,\n address indexed recipient,\n uint256 unlockedAmount,\n uint256 contractBalance\n );\n\n /// @dev Emitted when the emergency exit locked amount is updated.\n event EmergencyExitLockedAmountUpdated(uint256 amount);\n /// @dev Emitted when the emergency expiry duration is updated.\n event EmergencyExpiryDurationUpdated(uint256 amount);\n\n /// @dev Error of already requested emergency exit before.\n error ErrAlreadyRequestedEmergencyExit();\n\n /**\n * @dev Returns the amount of RON to lock from a consensus address.\n */\n function emergencyExitLockedAmount() external returns (uint256);\n\n /**\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\n */\n function emergencyExpiryDuration() external returns (uint256);\n\n /**\n * @dev Sets the amount of RON to lock from a consensus address.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `EmergencyExitLockedAmountUpdated`.\n *\n */\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\n\n /**\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `EmergencyExpiryDurationUpdated`.\n *\n */\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\n\n /**\n * @dev Unlocks fund for emergency exit request.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\n *\n */\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\n\n /**\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\n *\n * Requirements:\n * - The method caller is staking contract.\n *\n */\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\n}\n" - }, - "contracts/interfaces/validator/info-fragments/IJailingInfo.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface IJailingInfo {\n /**\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\n */\n function checkJailed(address) external view returns (bool);\n\n /**\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\n */\n function getJailedTimeLeft(address _addr)\n external\n view\n returns (\n bool isJailed_,\n uint256 blockLeft_,\n uint256 epochLeft_\n );\n\n /**\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\n */\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\n\n /**\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\n */\n function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum)\n external\n view\n returns (\n bool isJailed_,\n uint256 blockLeft_,\n uint256 epochLeft_\n );\n\n /**\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\n */\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\n\n /**\n * @dev Returns whether the incoming reward of the block producers are deprecated during the current period.\n */\n function checkMiningRewardDeprecated(address[] calldata _blockProducers) external view returns (bool[] memory);\n\n /**\n * @dev Returns whether the incoming reward of the block producers are deprecated during a specific period.\n */\n function checkMiningRewardDeprecatedAtPeriod(address[] calldata _blockProducers, uint256 _period)\n external\n view\n returns (bool[] memory);\n}\n" - }, - "contracts/interfaces/validator/info-fragments/ITimingInfo.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface ITimingInfo {\n /**\n * @dev Returns the block that validator set was updated.\n */\n function getLastUpdatedBlock() external view returns (uint256);\n\n /**\n * @dev Returns the number of blocks in a epoch.\n */\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\n\n /**\n * @dev Returns the epoch index from the block number.\n */\n function epochOf(uint256 _block) external view returns (uint256);\n\n /**\n * @dev Returns whether the epoch ending is at the block number `_block`.\n */\n function epochEndingAt(uint256 _block) external view returns (bool);\n\n /**\n * @dev Tries to get the period index from the epoch number.\n */\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\n\n /**\n * @dev Returns whether the period ending at the current block number.\n */\n function isPeriodEnding() external view returns (bool);\n\n /**\n * @dev Returns the period index from the current block.\n */\n function currentPeriod() external view returns (uint256);\n\n /**\n * @dev Returns the block number that the current period starts at.\n */\n function currentPeriodStartAtBlock() external view returns (uint256);\n}\n" - }, - "contracts/interfaces/validator/info-fragments/IValidatorInfo.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface IValidatorInfo {\n /// @dev Emitted when the number of max validator is updated.\n event MaxValidatorNumberUpdated(uint256);\n /// @dev Emitted when the number of reserved slots for prioritized validators is updated.\n event MaxPrioritizedValidatorNumberUpdated(uint256);\n\n /// @dev Error of number of prioritized greater than number of max validators.\n error ErrInvalidMaxPrioritizedValidatorNumber();\n\n /**\n * @dev Returns the maximum number of validators in the epoch.\n */\n function maxValidatorNumber() external view returns (uint256 _maximumValidatorNumber);\n\n /**\n * @dev Returns the number of reserved slots for prioritized validators.\n */\n function maxPrioritizedValidatorNumber() external view returns (uint256 _maximumPrioritizedValidatorNumber);\n\n /**\n * @dev Returns the current validator list.\n */\n function getValidators() external view returns (address[] memory);\n\n /**\n * @dev Returns whether the address is either a bridge operator or a block producer.\n */\n function isValidator(address _addr) external view returns (bool);\n\n /**\n * @dev Returns the current block producer list.\n */\n function getBlockProducers() external view returns (address[] memory);\n\n /**\n * @dev Returns whether the address is block producer or not.\n */\n function isBlockProducer(address _addr) external view returns (bool);\n\n /**\n * @dev Returns total numbers of the block producers.\n */\n function totalBlockProducers() external view returns (uint256);\n\n /**\n * @dev Returns the current bridge operator list.\n */\n function getBridgeOperators() external view returns (address[] memory);\n\n /**\n * @dev Returns the bridge operator list corresponding to validator address list.\n */\n function getBridgeOperatorsOf(address[] memory _validatorAddrs) external view returns (address[] memory);\n\n /**\n * @dev Returns whether the address is bridge operator or not.\n */\n function isBridgeOperator(address _addr) external view returns (bool);\n\n /**\n * @dev Returns whether the consensus address is operating the bridge or not.\n */\n function isOperatingBridge(address _consensusAddr) external view returns (bool);\n\n /**\n * @dev Returns total numbers of the bridge operators.\n */\n function totalBridgeOperators() external view returns (uint256);\n\n /**\n * @dev Updates the max validator number\n *\n * Requirements:\n * - The method caller is admin\n *\n * Emits the event `MaxValidatorNumberUpdated`\n *\n */\n function setMaxValidatorNumber(uint256 _maxValidatorNumber) external;\n\n /**\n * @dev Updates the number of reserved slots for prioritized validators\n *\n * Requirements:\n * - The method caller is admin\n *\n * Emits the event `MaxPrioritizedValidatorNumberUpdated`\n *\n */\n function setMaxPrioritizedValidatorNumber(uint256 _maxPrioritizedValidatorNumber) external;\n}\n" - }, - "contracts/ronin/RoninGatewayV2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/AccessControlEnumerable.sol\";\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../extensions/GatewayV2.sol\";\nimport \"../extensions/isolated-governance/IsolatedGovernance.sol\";\nimport \"../extensions/MinimumWithdrawal.sol\";\nimport \"../interfaces/IERC20Mintable.sol\";\nimport \"../interfaces/IERC721Mintable.sol\";\nimport \"../interfaces/IRoninGatewayV2.sol\";\nimport \"../interfaces/validator/IRoninValidatorSet.sol\";\nimport \"../interfaces/IBridgeTracking.sol\";\nimport \"../interfaces/collections/IHasValidatorContract.sol\";\nimport \"../interfaces/collections/IHasBridgeTrackingContract.sol\";\n\ncontract RoninGatewayV2 is\n GatewayV2,\n IsolatedGovernance,\n Initializable,\n MinimumWithdrawal,\n AccessControlEnumerable,\n IRoninGatewayV2,\n IHasValidatorContract,\n IHasBridgeTrackingContract\n{\n using Token for Token.Info;\n using Transfer for Transfer.Request;\n using Transfer for Transfer.Receipt;\n\n /// @dev Withdrawal unlocker role hash\n bytes32 public constant WITHDRAWAL_MIGRATOR = keccak256(\"WITHDRAWAL_MIGRATOR\");\n\n /// @dev Flag indicating whether the withdrawal migrate progress is done\n bool public withdrawalMigrated;\n /// @dev Total withdrawal\n uint256 public withdrawalCount;\n /// @dev Mapping from chain id => deposit id => deposit vote\n mapping(uint256 => mapping(uint256 => IsolatedVote)) public depositVote;\n /// @dev Mapping from withdrawal id => mainchain withdrew vote\n mapping(uint256 => IsolatedVote) public mainchainWithdrewVote;\n /// @dev Mapping from withdrawal id => withdrawal receipt\n mapping(uint256 => Transfer.Receipt) public withdrawal;\n /// @dev Mapping from withdrawal id => validator address => signatures\n mapping(uint256 => mapping(address => bytes)) internal _withdrawalSig;\n /// @dev Mapping from token address => chain id => mainchain token address\n mapping(address => mapping(uint256 => MappedToken)) internal _mainchainToken;\n\n /// @dev The ronin validator contract\n IRoninValidatorSet internal _validatorContract;\n /// @dev The bridge tracking contract\n IBridgeTracking internal _bridgeTrackingContract;\n\n /// @dev Mapping from withdrawal id => vote for recording withdrawal stats\n mapping(uint256 => IsolatedVote) public withdrawalStatVote;\n\n fallback() external payable {\n _fallback();\n }\n\n receive() external payable {\n _fallback();\n }\n\n /**\n * @dev Initializes contract storage.\n */\n function initialize(\n address _roleSetter,\n uint256 _numerator,\n uint256 _denominator,\n address[] calldata _withdrawalMigrators,\n // _packedAddresses[0]: roninTokens\n // _packedAddresses[1]: mainchainTokens\n address[][2] calldata _packedAddresses,\n // _packedNumbers[0]: chainIds\n // _packedNumbers[1]: minimumThresholds\n uint256[][2] calldata _packedNumbers,\n Token.Standard[] calldata _standards\n ) external virtual initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\n _setThreshold(_numerator, _denominator);\n if (_packedAddresses[0].length > 0) {\n _mapTokens(_packedAddresses[0], _packedAddresses[1], _packedNumbers[0], _standards);\n _setMinimumThresholds(_packedAddresses[0], _packedNumbers[1]);\n }\n\n for (uint256 _i; _i < _withdrawalMigrators.length; _i++) {\n _grantRole(WITHDRAWAL_MIGRATOR, _withdrawalMigrators[_i]);\n }\n }\n\n /**\n * @inheritdoc IHasValidatorContract\n */\n function validatorContract() external view returns (address) {\n return address(_validatorContract);\n }\n\n /**\n * @inheritdoc IHasValidatorContract\n */\n function setValidatorContract(address _addr) external override onlyAdmin {\n require(_addr.code.length > 0, \"RoninGatewayV2: set to non-contract\");\n _setValidatorContract(_addr);\n }\n\n /**\n * @inheritdoc IHasBridgeTrackingContract\n */\n function bridgeTrackingContract() external view override returns (address) {\n return address(_bridgeTrackingContract);\n }\n\n /**\n * @inheritdoc IHasBridgeTrackingContract\n */\n function setBridgeTrackingContract(address _addr) external override onlyAdmin {\n require(_addr.code.length > 0, \"RoninGatewayV2: set to non-contract\");\n _setBridgeTrackingContract(_addr);\n }\n\n /**\n * @dev Migrates withdrawals.\n *\n * Requirements:\n * - The method caller is the migrator.\n * - The arrays have the same length and its length larger than 0.\n *\n */\n function migrateWithdrawals(Transfer.Request[] calldata _requests, address[] calldata _requesters)\n external\n onlyRole(WITHDRAWAL_MIGRATOR)\n {\n require(!withdrawalMigrated, \"RoninGatewayV2: withdrawals migrated\");\n require(_requesters.length == _requests.length && _requests.length > 0, \"RoninGatewayV2: invalid array lengths\");\n for (uint256 _i; _i < _requests.length; _i++) {\n MappedToken memory _token = getMainchainToken(_requests[_i].tokenAddr, 1);\n require(_requests[_i].info.erc == _token.erc, \"RoninGatewayV2: invalid token standard\");\n _storeAsReceipt(_requests[_i], 1, _requesters[_i], _token.tokenAddr);\n }\n }\n\n /**\n * @dev Mark the migration as done.\n */\n function markWithdrawalMigrated() external {\n require(\n hasRole(DEFAULT_ADMIN_ROLE, msg.sender) || hasRole(WITHDRAWAL_MIGRATOR, msg.sender),\n \"RoninGatewayV2: unauthorized sender\"\n );\n require(!withdrawalMigrated, \"RoninGatewayV2: withdrawals migrated\");\n withdrawalMigrated = true;\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function getWithdrawalSignatures(uint256 _withdrawalId, address[] calldata _validators)\n external\n view\n returns (bytes[] memory _signatures)\n {\n _signatures = new bytes[](_validators.length);\n for (uint256 _i = 0; _i < _validators.length; _i++) {\n _signatures[_i] = _withdrawalSig[_withdrawalId][_validators[_i]];\n }\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function depositFor(Transfer.Receipt calldata _receipt) external {\n address _sender = msg.sender;\n uint256 _weight = _getValidatorWeight(_sender);\n _depositFor(_receipt, _sender, _weight, minimumVoteWeight());\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, _receipt.id, _sender);\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds)\n external\n returns (bool[] memory _executedReceipts)\n {\n address _governor = msg.sender;\n uint256 _weight = _getValidatorWeight(_governor);\n uint256 _minVoteWeight = minimumVoteWeight();\n\n uint256 _withdrawalId;\n _executedReceipts = new bool[](_withdrawalIds.length);\n for (uint256 _i; _i < _withdrawalIds.length; _i++) {\n _withdrawalId = _withdrawalIds[_i];\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId, _governor);\n if (mainchainWithdrew(_withdrawalId)) {\n _executedReceipts[_i] = true;\n } else {\n IsolatedVote storage _proposal = mainchainWithdrewVote[_withdrawalId];\n Transfer.Receipt memory _withdrawal = withdrawal[_withdrawalId];\n bytes32 _hash = _withdrawal.hash();\n VoteStatus _status = _castVote(_proposal, _governor, _weight, _minVoteWeight, _hash);\n if (_status == VoteStatus.Approved) {\n _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId);\n _proposal.status = VoteStatus.Executed;\n emit MainchainWithdrew(_hash, _withdrawal);\n }\n }\n }\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function tryBulkDepositFor(Transfer.Receipt[] calldata _receipts) external returns (bool[] memory _executedReceipts) {\n address _sender = msg.sender;\n uint256 _weight = _getValidatorWeight(_sender);\n\n Transfer.Receipt memory _receipt;\n _executedReceipts = new bool[](_receipts.length);\n uint256 _minVoteWeight = minimumVoteWeight();\n for (uint256 _i; _i < _receipts.length; _i++) {\n _receipt = _receipts[_i];\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, _receipt.id, _sender);\n if (depositVote[_receipt.mainchain.chainId][_receipt.id].status == VoteStatus.Executed) {\n _executedReceipts[_i] = true;\n } else {\n _depositFor(_receipt, _sender, _weight, _minVoteWeight);\n }\n }\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external whenNotPaused {\n _requestWithdrawalFor(_request, msg.sender, _chainId);\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external whenNotPaused {\n require(_requests.length > 0, \"RoninGatewayV2: empty array\");\n for (uint256 _i; _i < _requests.length; _i++) {\n _requestWithdrawalFor(_requests[_i], msg.sender, _chainId);\n }\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function requestWithdrawalSignatures(uint256 _withdrawalId) external whenNotPaused {\n require(!mainchainWithdrew(_withdrawalId), \"RoninGatewayV2: withdrew on mainchain already\");\n Transfer.Receipt memory _receipt = withdrawal[_withdrawalId];\n require(_receipt.ronin.chainId == block.chainid, \"RoninGatewayV2: query for invalid withdrawal\");\n emit WithdrawalSignaturesRequested(_receipt.hash(), _receipt);\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function bulkSubmitWithdrawalSignatures(uint256[] calldata _withdrawals, bytes[] calldata _signatures) external {\n address _validator = msg.sender;\n // This checks method caller already\n uint256 _weight = _getValidatorWeight(_validator);\n uint256 _minVoteWeight = minimumVoteWeight();\n\n require(\n _withdrawals.length > 0 && _withdrawals.length == _signatures.length,\n \"RoninGatewayV2: invalid array length\"\n );\n\n uint256 _id;\n for (uint256 _i; _i < _withdrawals.length; _i++) {\n _id = _withdrawals[_i];\n _withdrawalSig[_id][_validator] = _signatures[_i];\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Withdrawal, _id, _validator);\n\n IsolatedVote storage _proposal = withdrawalStatVote[_id];\n VoteStatus _status = _castVote(_proposal, _validator, _weight, _minVoteWeight, bytes32(_id));\n if (_status == VoteStatus.Approved) {\n _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Withdrawal, _id);\n _proposal.status = VoteStatus.Executed;\n }\n }\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function mapTokens(\n address[] calldata _roninTokens,\n address[] calldata _mainchainTokens,\n uint256[] calldata _chainIds,\n Token.Standard[] calldata _standards\n ) external onlyAdmin {\n require(_roninTokens.length > 0, \"RoninGatewayV2: invalid array length\");\n _mapTokens(_roninTokens, _mainchainTokens, _chainIds, _standards);\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function depositVoted(\n uint256 _chainId,\n uint256 _depositId,\n address _voter\n ) external view returns (bool) {\n return _voted(depositVote[_chainId][_depositId], _voter);\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool) {\n return _voted(mainchainWithdrewVote[_withdrawalId], _voter);\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function mainchainWithdrew(uint256 _withdrawalId) public view returns (bool) {\n return mainchainWithdrewVote[_withdrawalId].status == VoteStatus.Executed;\n }\n\n /**\n * @inheritdoc IRoninGatewayV2\n */\n function getMainchainToken(address _roninToken, uint256 _chainId) public view returns (MappedToken memory _token) {\n _token = _mainchainToken[_roninToken][_chainId];\n require(_token.tokenAddr != address(0), \"RoninGatewayV2: unsupported token\");\n }\n\n /**\n * @dev Maps Ronin tokens to mainchain networks.\n *\n * Requirement:\n * - The arrays have the same length.\n *\n * Emits the `TokenMapped` event.\n *\n */\n function _mapTokens(\n address[] calldata _roninTokens,\n address[] calldata _mainchainTokens,\n uint256[] calldata _chainIds,\n Token.Standard[] calldata _standards\n ) internal {\n require(\n _roninTokens.length == _mainchainTokens.length && _roninTokens.length == _chainIds.length,\n \"RoninGatewayV2: invalid array length\"\n );\n\n for (uint256 _i; _i < _roninTokens.length; _i++) {\n _mainchainToken[_roninTokens[_i]][_chainIds[_i]].tokenAddr = _mainchainTokens[_i];\n _mainchainToken[_roninTokens[_i]][_chainIds[_i]].erc = _standards[_i];\n }\n\n emit TokenMapped(_roninTokens, _mainchainTokens, _chainIds, _standards);\n }\n\n /**\n * @dev Deposits based on the receipt.\n *\n * Emits the `Deposited` once the assets are released.\n *\n */\n function _depositFor(\n Transfer.Receipt memory _receipt,\n address _validator,\n uint256 _weight,\n uint256 _minVoteWeight\n ) internal {\n uint256 _id = _receipt.id;\n _receipt.info.validate();\n require(_receipt.kind == Transfer.Kind.Deposit, \"RoninGatewayV2: invalid receipt kind\");\n require(_receipt.ronin.chainId == block.chainid, \"RoninGatewayV2: invalid chain id\");\n MappedToken memory _token = getMainchainToken(_receipt.ronin.tokenAddr, _receipt.mainchain.chainId);\n require(\n _token.erc == _receipt.info.erc && _token.tokenAddr == _receipt.mainchain.tokenAddr,\n \"RoninGatewayV2: invalid receipt\"\n );\n\n IsolatedVote storage _proposal = depositVote[_receipt.mainchain.chainId][_id];\n bytes32 _receiptHash = _receipt.hash();\n VoteStatus _status = _castVote(_proposal, _validator, _weight, _minVoteWeight, _receiptHash);\n if (_status == VoteStatus.Approved) {\n _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Deposit, _receipt.id);\n _proposal.status = VoteStatus.Executed;\n _receipt.info.handleAssetTransfer(payable(_receipt.ronin.addr), _receipt.ronin.tokenAddr, IWETH(address(0)));\n emit Deposited(_receiptHash, _receipt);\n }\n }\n\n /**\n * @dev Returns the validator weight.\n *\n * Requirements:\n * - The `_addr` weight is larger than 0.\n *\n */\n function _getValidatorWeight(address _addr) internal view returns (uint256 _weight) {\n _weight = _validatorContract.isBridgeOperator(_addr) ? 1 : 0;\n require(_weight > 0, \"RoninGatewayV2: unauthorized sender\");\n }\n\n /**\n * @dev Locks the assets and request withdrawal.\n *\n * Requirements:\n * - The token info is valid.\n *\n * Emits the `WithdrawalRequested` event.\n *\n */\n function _requestWithdrawalFor(\n Transfer.Request calldata _request,\n address _requester,\n uint256 _chainId\n ) internal {\n _request.info.validate();\n _checkWithdrawal(_request);\n MappedToken memory _token = getMainchainToken(_request.tokenAddr, _chainId);\n require(_request.info.erc == _token.erc, \"RoninGatewayV2: invalid token standard\");\n _request.info.transferFrom(_requester, address(this), _request.tokenAddr);\n _storeAsReceipt(_request, _chainId, _requester, _token.tokenAddr);\n }\n\n /**\n * @dev Stores the withdrawal request as a receipt.\n *\n * Emits the `WithdrawalRequested` event.\n *\n */\n function _storeAsReceipt(\n Transfer.Request calldata _request,\n uint256 _chainId,\n address _requester,\n address _mainchainTokenAddr\n ) internal returns (uint256 _withdrawalId) {\n _withdrawalId = withdrawalCount++;\n Transfer.Receipt memory _receipt = _request.into_withdrawal_receipt(\n _requester,\n _withdrawalId,\n _mainchainTokenAddr,\n _chainId\n );\n withdrawal[_withdrawalId] = _receipt;\n emit WithdrawalRequested(_receipt.hash(), _receipt);\n }\n\n /**\n * @dev Don't send me RON.\n */\n function _fallback() internal virtual {\n revert(\"RoninGatewayV2: invalid request\");\n }\n\n /**\n * @inheritdoc GatewayV2\n */\n function _getTotalWeight() internal view virtual override returns (uint256) {\n return _validatorContract.totalBridgeOperators();\n }\n\n /**\n * @dev Sets the validator contract.\n *\n * Emits the event `ValidatorContractUpdated`.\n *\n */\n function _setValidatorContract(address _addr) internal {\n _validatorContract = IRoninValidatorSet(_addr);\n emit ValidatorContractUpdated(_addr);\n }\n\n /**\n * @dev Sets the bridge tracking contract.\n *\n * Emits the event `BridgeTrackingContractUpdated`.\n *\n */\n function _setBridgeTrackingContract(address _addr) internal {\n _bridgeTrackingContract = IBridgeTracking(_addr);\n emit BridgeTrackingContractUpdated(_addr);\n }\n}\n" - }, - "@openzeppelin/contracts/access/AccessControlEnumerable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerable.sol\";\nimport \"./AccessControl.sol\";\nimport \"../utils/structs/EnumerableSet.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\n using EnumerableSet for EnumerableSet.AddressSet;\n\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\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 virtual override returns (address) {\n return _roleMembers[role].at(index);\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 virtual override returns (uint256) {\n return _roleMembers[role].length();\n }\n\n /**\n * @dev Overload {_grantRole} to track enumerable memberships\n */\n function _grantRole(bytes32 role, address account) internal virtual override {\n super._grantRole(role, account);\n _roleMembers[role].add(account);\n }\n\n /**\n * @dev Overload {_revokeRole} to track enumerable memberships\n */\n function _revokeRole(bytes32 role, address account) internal virtual override {\n super._revokeRole(role, account);\n _roleMembers[role].remove(account);\n }\n}\n" - }, - "contracts/extensions/GatewayV2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/security/Pausable.sol\";\nimport \"../interfaces/IQuorum.sol\";\nimport \"./collections/HasProxyAdmin.sol\";\n\nabstract contract GatewayV2 is HasProxyAdmin, Pausable, IQuorum {\n uint256 internal _num;\n uint256 internal _denom;\n\n address private ______deprecated;\n uint256 public nonce;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc IQuorum\n */\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\n return (_num, _denom);\n }\n\n /**\n * @inheritdoc IQuorum\n */\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\n return _voteWeight * _denom >= _num * _getTotalWeight();\n }\n\n /**\n * @inheritdoc IQuorum\n */\n function setThreshold(uint256 _numerator, uint256 _denominator)\n external\n virtual\n onlyAdmin\n returns (uint256, uint256)\n {\n return _setThreshold(_numerator, _denominator);\n }\n\n /**\n * @dev Triggers paused state.\n */\n function pause() external onlyAdmin {\n _pause();\n }\n\n /**\n * @dev Triggers unpaused state.\n */\n function unpause() external onlyAdmin {\n _unpause();\n }\n\n /**\n * @inheritdoc IQuorum\n */\n function minimumVoteWeight() public view virtual returns (uint256) {\n return _minimumVoteWeight(_getTotalWeight());\n }\n\n /**\n * @dev Sets threshold and returns the old one.\n *\n * Emits the `ThresholdUpdated` event.\n *\n */\n function _setThreshold(uint256 _numerator, uint256 _denominator)\n internal\n virtual\n returns (uint256 _previousNum, uint256 _previousDenom)\n {\n require(_numerator <= _denominator, \"GatewayV2: invalid threshold\");\n _previousNum = _num;\n _previousDenom = _denom;\n _num = _numerator;\n _denom = _denominator;\n emit ThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\n }\n\n /**\n * @dev Returns minimum vote weight.\n */\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\n return (_num * _totalWeight + _denom - 1) / _denom;\n }\n\n /**\n * @dev Returns the total weight.\n */\n function _getTotalWeight() internal view virtual returns (uint256);\n}\n" - }, - "contracts/extensions/isolated-governance/IsolatedGovernance.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"../../interfaces/consumers/VoteStatusConsumer.sol\";\n\nabstract contract IsolatedGovernance is VoteStatusConsumer {\n struct IsolatedVote {\n VoteStatus status;\n bytes32 finalHash;\n /// @dev Mapping from voter => receipt hash\n mapping(address => bytes32) voteHashOf;\n /// @dev Mapping from receipt hash => vote weight\n mapping(bytes32 => uint256) weight;\n /// @dev The timestamp that voting is expired (no expiration=0)\n uint256 expiredAt;\n /// @dev The timestamp that voting is created\n uint256 createdAt;\n }\n\n /**\n * @dev Casts vote for the receipt with the receipt hash `_hash`.\n *\n * Requirements:\n * - The vote is not finalized.\n * - The voter has not voted for the round.\n *\n */\n function _castVote(\n IsolatedVote storage _proposal,\n address _voter,\n uint256 _voterWeight,\n uint256 _minimumVoteWeight,\n bytes32 _hash\n ) internal virtual returns (VoteStatus _status) {\n if (_proposal.expiredAt > 0 && _proposal.expiredAt <= block.timestamp) {\n _proposal.status = VoteStatus.Expired;\n return _proposal.status;\n }\n\n if (_voted(_proposal, _voter)) {\n revert(\n string(abi.encodePacked(\"IsolatedGovernance: \", Strings.toHexString(uint160(_voter), 20), \" already voted\"))\n );\n }\n\n // Record for voter\n _proposal.voteHashOf[_voter] = _hash;\n // Increase vote weight\n uint256 _weight = _proposal.weight[_hash] += _voterWeight;\n\n if (_weight >= _minimumVoteWeight && _proposal.status == VoteStatus.Pending) {\n _proposal.status = VoteStatus.Approved;\n _proposal.finalHash = _hash;\n }\n\n _status = _proposal.status;\n }\n\n /**\n * @dev Returns whether the voter casted for the proposal.\n */\n function _voted(IsolatedVote storage _proposal, address _voter) internal view virtual returns (bool) {\n return _proposal.voteHashOf[_voter] != bytes32(0);\n }\n}\n" - }, - "contracts/extensions/MinimumWithdrawal.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./collections/HasProxyAdmin.sol\";\nimport \"../libraries/Transfer.sol\";\n\nabstract contract MinimumWithdrawal is HasProxyAdmin {\n /// @dev Emitted when the minimum thresholds are updated\n event MinimumThresholdsUpdated(address[] tokens, uint256[] threshold);\n\n /// @dev Mapping from token address => minimum thresholds\n mapping(address => uint256) public minimumThreshold;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @dev Sets the minimum thresholds to withdraw.\n *\n * Requirements:\n * - The method caller is admin.\n * - The arrays have the same length and its length larger than 0.\n *\n * Emits the `MinimumThresholdsUpdated` event.\n *\n */\n function setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin {\n require(_tokens.length > 0, \"MinimumWithdrawal: invalid array length\");\n _setMinimumThresholds(_tokens, _thresholds);\n }\n\n /**\n * @dev Sets minimum thresholds.\n *\n * Requirements:\n * - The array lengths are equal.\n *\n * Emits the `MinimumThresholdsUpdated` event.\n *\n */\n function _setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\n require(_tokens.length == _thresholds.length, \"MinimumWithdrawal: invalid array length\");\n for (uint256 _i; _i < _tokens.length; _i++) {\n minimumThreshold[_tokens[_i]] = _thresholds[_i];\n }\n emit MinimumThresholdsUpdated(_tokens, _thresholds);\n }\n\n /**\n * @dev Checks whether the request is larger than or equal to the minimum threshold.\n */\n function _checkWithdrawal(Transfer.Request calldata _request) internal view {\n require(\n _request.info.erc != Token.Standard.ERC20 || _request.info.quantity >= minimumThreshold[_request.tokenAddr],\n \"MinimumWithdrawal: query for too small quantity\"\n );\n }\n}\n" - }, - "contracts/interfaces/IERC20Mintable.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.2;\n\ninterface IERC20Mintable {\n function mint(address _to, uint256 _value) external returns (bool _success);\n}\n" - }, - "contracts/interfaces/IERC721Mintable.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC721Mintable {\n function mint(address _to, uint256 _tokenId) external returns (bool);\n}\n" - }, - "contracts/interfaces/IRoninGatewayV2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../libraries/Transfer.sol\";\nimport \"./consumers/MappedTokenConsumer.sol\";\n\ninterface IRoninGatewayV2 is MappedTokenConsumer {\n /// @dev Emitted when the assets are depositted\n event Deposited(bytes32 receiptHash, Transfer.Receipt receipt);\n /// @dev Emitted when the withdrawal is requested\n event WithdrawalRequested(bytes32 receiptHash, Transfer.Receipt);\n /// @dev Emitted when the assets are withdrawn on mainchain\n event MainchainWithdrew(bytes32 receiptHash, Transfer.Receipt receipt);\n /// @dev Emitted when the withdrawal signatures is requested\n event WithdrawalSignaturesRequested(bytes32 receiptHash, Transfer.Receipt);\n /// @dev Emitted when the tokens are mapped\n event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, Token.Standard[] standards);\n\n /**\n * @dev Returns withdrawal count.\n */\n function withdrawalCount() external view returns (uint256);\n\n /**\n * @dev Returns withdrawal signatures.\n */\n function getWithdrawalSignatures(uint256 _withdrawalId, address[] calldata _validators)\n external\n view\n returns (bytes[] memory);\n\n /**\n * @dev Deposits based on the receipt.\n *\n * Requirements:\n * - The method caller is a validator.\n *\n * Emits the `Deposited` once the assets are released.\n *\n * @notice The assets will be transferred whenever the valid call passes the quorum threshold.\n *\n */\n function depositFor(Transfer.Receipt calldata _receipt) external;\n\n /**\n * @dev Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal\n * vote is already done before.\n *\n * Requirements:\n * - The method caller is a validator.\n *\n * Emits the `MainchainWithdrew` once the valid call passes the quorum threshold.\n *\n * @notice Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the\n * same time.\n *\n */\n function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external returns (bool[] memory);\n\n /**\n * @dev Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote\n * is already done before. Reverts if the deposit is invalid or is voted by the validator again.\n *\n * Requirements:\n * - The method caller is a validator.\n *\n * Emits the `Deposited` once the assets are released.\n *\n * @notice The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not\n * reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\n *\n */\n function tryBulkDepositFor(Transfer.Receipt[] calldata _receipts) external returns (bool[] memory);\n\n /**\n * @dev Locks the assets and request withdrawal.\n *\n * Emits the `WithdrawalRequested` event.\n *\n */\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external;\n\n /**\n * @dev Bulk requests withdrawals.\n *\n * Emits the `WithdrawalRequested` events.\n *\n */\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external;\n\n /**\n * @dev Requests withdrawal signatures for a specific withdrawal.\n *\n * Emits the `WithdrawalSignaturesRequested` event.\n *\n */\n function requestWithdrawalSignatures(uint256 _withdrawalId) external;\n\n /**\n * @dev Submits withdrawal signatures.\n *\n * Requirements:\n * - The method caller is a validator.\n *\n */\n function bulkSubmitWithdrawalSignatures(uint256[] calldata _withdrawals, bytes[] calldata _signatures) external;\n\n /**\n * @dev Maps Ronin tokens to mainchain networks.\n *\n * Requirement:\n * - The method caller is admin.\n * - The arrays have the same length and its length larger than 0.\n *\n * Emits the `TokenMapped` event.\n *\n */\n function mapTokens(\n address[] calldata _roninTokens,\n address[] calldata _mainchainTokens,\n uint256[] calldata chainIds,\n Token.Standard[] calldata _standards\n ) external;\n\n /**\n * @dev Returns whether the deposit is casted by the voter.\n */\n function depositVoted(\n uint256 _chainId,\n uint256 _depositId,\n address _voter\n ) external view returns (bool);\n\n /**\n * @dev Returns whether the mainchain withdrew is casted by the voter.\n */\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool);\n\n /**\n * @dev Returns whether the withdrawal is done on mainchain.\n */\n function mainchainWithdrew(uint256 _withdrawalId) external view returns (bool);\n\n /**\n * @dev Returns mainchain token address.\n * Reverts for unsupported token.\n */\n function getMainchainToken(address _roninToken, uint256 _chainId) external view returns (MappedToken memory _token);\n}\n" - }, - "contracts/interfaces/collections/IHasBridgeTrackingContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasBridgeTrackingContract is IHasContract {\n /// @dev Emitted when the bridge tracking contract is updated.\n event BridgeTrackingContractUpdated(address);\n\n /// @dev Error of method caller must be bridge tracking contract.\n error ErrCallerMustBeBridgeTrackingContract();\n\n /**\n * @dev Returns the bridge tracking contract.\n */\n function bridgeTrackingContract() external view returns (address);\n\n /**\n * @dev Sets the bridge tracking contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `BridgeTrackingContractUpdated`.\n *\n */\n function setBridgeTrackingContract(address) external;\n}\n" - }, - "@openzeppelin/contracts/access/IAccessControlEnumerable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerable is IAccessControl {\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) external view returns (address);\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) external view returns (uint256);\n}\n" - }, - "@openzeppelin/contracts/access/AccessControl.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\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 AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\n \" is missing role \",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\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 virtual override 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 * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\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 * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\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 revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\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 * May emit a {RoleGranted} event.\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 * NOTE: This function is deprecated in favor of {_grantRole}.\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 bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\n\npragma solidity ^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 *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\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 // 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) {\n // 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 if (lastIndex != toDeleteIndex) {\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] = valueIndex; // Replace lastValue's index to valueIndex\n }\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 return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\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 /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return _values(set._inner);\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 * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\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 /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" - }, - "@openzeppelin/contracts/access/IAccessControl.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\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 {AccessControl-_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) external view returns (bool);\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 {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\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) external;\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) external;\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) external;\n}\n" - }, - "@openzeppelin/contracts/utils/Context.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Strings.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" - }, - "@openzeppelin/contracts/utils/introspection/ERC165.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" - }, - "@openzeppelin/contracts/utils/introspection/IERC165.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" - }, - "@openzeppelin/contracts/security/Pausable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.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 Pausable is Context {\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 constructor() {\n _paused = false;\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 _requireNotPaused();\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 _requirePaused();\n _;\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 Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\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}\n" - }, - "contracts/interfaces/IQuorum.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IQuorum {\n /// @dev Emitted when the threshold is updated\n event ThresholdUpdated(\n uint256 indexed nonce,\n uint256 indexed numerator,\n uint256 indexed denominator,\n uint256 previousNumerator,\n uint256 previousDenominator\n );\n\n /**\n * @dev Returns the threshold.\n */\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\n\n /**\n * @dev Checks whether the `_voteWeight` passes the threshold.\n */\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\n\n /**\n * @dev Returns the minimum vote weight to pass the threshold.\n */\n function minimumVoteWeight() external view returns (uint256);\n\n /**\n * @dev Sets the threshold.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the `ThresholdUpdated` event.\n *\n */\n function setThreshold(uint256 _numerator, uint256 _denominator)\n external\n returns (uint256 _previousNum, uint256 _previousDenom);\n}\n" - }, - "contracts/interfaces/consumers/VoteStatusConsumer.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface VoteStatusConsumer {\n enum VoteStatus {\n Pending,\n Approved,\n Executed,\n Rejected,\n Expired\n }\n}\n" - }, - "contracts/libraries/Transfer.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"./Token.sol\";\n\nlibrary Transfer {\n using ECDSA for bytes32;\n\n enum Kind {\n Deposit,\n Withdrawal\n }\n\n struct Request {\n // For deposit request: Recipient address on Ronin network\n // For withdrawal request: Recipient address on mainchain network\n address recipientAddr;\n // Token address to deposit/withdraw\n // Value 0: native token\n address tokenAddr;\n Token.Info info;\n }\n\n /**\n * @dev Converts the transfer request into the deposit receipt.\n */\n function into_deposit_receipt(\n Request memory _request,\n address _requester,\n uint256 _id,\n address _roninTokenAddr,\n uint256 _roninChainId\n ) internal view returns (Receipt memory _receipt) {\n _receipt.id = _id;\n _receipt.kind = Kind.Deposit;\n _receipt.mainchain.addr = _requester;\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\n _receipt.mainchain.chainId = block.chainid;\n _receipt.ronin.addr = _request.recipientAddr;\n _receipt.ronin.tokenAddr = _roninTokenAddr;\n _receipt.ronin.chainId = _roninChainId;\n _receipt.info = _request.info;\n }\n\n /**\n * @dev Converts the transfer request into the withdrawal receipt.\n */\n function into_withdrawal_receipt(\n Request memory _request,\n address _requester,\n uint256 _id,\n address _mainchainTokenAddr,\n uint256 _mainchainId\n ) internal view returns (Receipt memory _receipt) {\n _receipt.id = _id;\n _receipt.kind = Kind.Withdrawal;\n _receipt.ronin.addr = _requester;\n _receipt.ronin.tokenAddr = _request.tokenAddr;\n _receipt.ronin.chainId = block.chainid;\n _receipt.mainchain.addr = _request.recipientAddr;\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\n _receipt.mainchain.chainId = _mainchainId;\n _receipt.info = _request.info;\n }\n\n struct Receipt {\n uint256 id;\n Kind kind;\n Token.Owner mainchain;\n Token.Owner ronin;\n Token.Info info;\n }\n\n // keccak256(\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\");\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\n\n /**\n * @dev Returns token info struct hash.\n */\n function hash(Receipt memory _receipt) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n TYPE_HASH,\n _receipt.id,\n _receipt.kind,\n Token.hash(_receipt.mainchain),\n Token.hash(_receipt.ronin),\n Token.hash(_receipt.info)\n )\n );\n }\n\n /**\n * @dev Returns the receipt digest.\n */\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\n return _domainSeparator.toTypedDataHash(_receiptHash);\n }\n}\n" - }, - "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev 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 /**\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 `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, 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 `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" - }, - "contracts/libraries/Token.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"../interfaces/IWETH.sol\";\n\nlibrary Token {\n enum Standard {\n ERC20,\n ERC721\n }\n struct Info {\n Standard erc;\n // For ERC20: the id must be 0 and the quantity is larger than 0.\n // For ERC721: the quantity must be 0.\n uint256 id;\n uint256 quantity;\n }\n\n // keccak256(\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\");\n bytes32 public constant INFO_TYPE_HASH = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\n\n /**\n * @dev Returns token info struct hash.\n */\n function hash(Info memory _info) internal pure returns (bytes32) {\n return keccak256(abi.encode(INFO_TYPE_HASH, _info.erc, _info.id, _info.quantity));\n }\n\n /**\n * @dev Validates the token info.\n */\n function validate(Info memory _info) internal pure {\n require(\n (_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) ||\n (_info.erc == Standard.ERC721 && _info.quantity == 0),\n \"Token: invalid info\"\n );\n }\n\n /**\n * @dev Transfer asset from.\n *\n * Requirements:\n * - The `_from` address must approve for the contract using this library.\n *\n */\n function transferFrom(\n Info memory _info,\n address _from,\n address _to,\n address _token\n ) internal {\n bool _success;\n bytes memory _data;\n if (_info.erc == Standard.ERC20) {\n (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, _from, _to, _info.quantity));\n _success = _success && (_data.length == 0 || abi.decode(_data, (bool)));\n } else if (_info.erc == Standard.ERC721) {\n // bytes4(keccak256(\"transferFrom(address,address,uint256)\"))\n (_success, ) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id));\n } else {\n revert(\"Token: unsupported token standard\");\n }\n\n if (!_success) {\n revert(\n string(\n abi.encodePacked(\n \"Token: could not transfer \",\n toString(_info),\n \" from \",\n Strings.toHexString(uint160(_from), 20),\n \" to \",\n Strings.toHexString(uint160(_to), 20),\n \" token \",\n Strings.toHexString(uint160(_token), 20)\n )\n )\n );\n }\n }\n\n /**\n * @dev Transfers ERC721 token and returns the result.\n */\n function tryTransferERC721(\n address _token,\n address _to,\n uint256 _id\n ) internal returns (bool _success) {\n (_success, ) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id));\n }\n\n /**\n * @dev Transfers ERC20 token and returns the result.\n */\n function tryTransferERC20(\n address _token,\n address _to,\n uint256 _quantity\n ) internal returns (bool _success) {\n bytes memory _data;\n (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transfer.selector, _to, _quantity));\n _success = _success && (_data.length == 0 || abi.decode(_data, (bool)));\n }\n\n /**\n * @dev Transfer assets from current address to `_to` address.\n */\n function transfer(\n Info memory _info,\n address _to,\n address _token\n ) internal {\n bool _success;\n if (_info.erc == Standard.ERC20) {\n _success = tryTransferERC20(_token, _to, _info.quantity);\n } else if (_info.erc == Standard.ERC721) {\n _success = tryTransferERC721(_token, _to, _info.id);\n } else {\n revert(\"Token: unsupported token standard\");\n }\n\n if (!_success) {\n revert(\n string(\n abi.encodePacked(\n \"Token: could not transfer \",\n toString(_info),\n \" to \",\n Strings.toHexString(uint160(_to), 20),\n \" token \",\n Strings.toHexString(uint160(_token), 20)\n )\n )\n );\n }\n }\n\n /**\n * @dev Tries minting and transfering assets.\n *\n * @notice Prioritizes transfer native token if the token is wrapped.\n *\n */\n function handleAssetTransfer(\n Info memory _info,\n address payable _to,\n address _token,\n IWETH _wrappedNativeToken\n ) internal {\n bool _success;\n if (_token == address(_wrappedNativeToken)) {\n // Try sending the native token before transferring the wrapped token\n if (!_to.send(_info.quantity)) {\n _wrappedNativeToken.deposit{ value: _info.quantity }();\n transfer(_info, _to, _token);\n }\n } else if (_info.erc == Token.Standard.ERC20) {\n uint256 _balance = IERC20(_token).balanceOf(address(this));\n\n if (_balance < _info.quantity) {\n // bytes4(keccak256(\"mint(address,uint256)\"))\n (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance));\n require(_success, \"Token: ERC20 minting failed\");\n }\n\n transfer(_info, _to, _token);\n } else if (_info.erc == Token.Standard.ERC721) {\n if (!tryTransferERC721(_token, _to, _info.id)) {\n // bytes4(keccak256(\"mint(address,uint256)\"))\n (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id));\n require(_success, \"Token: ERC721 minting failed\");\n }\n } else {\n revert(\"Token: unsupported token standard\");\n }\n }\n\n /**\n * @dev Returns readable string.\n */\n function toString(Info memory _info) internal pure returns (string memory) {\n return\n string(\n abi.encodePacked(\n \"TokenInfo(\",\n Strings.toHexString(uint160(_info.erc), 1),\n \",\",\n Strings.toHexString(_info.id),\n \",\",\n Strings.toHexString(_info.quantity),\n \")\"\n )\n );\n }\n\n struct Owner {\n address addr;\n address tokenAddr;\n uint256 chainId;\n }\n\n // keccak256(\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\");\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\n\n /**\n * @dev Returns ownership struct hash.\n */\n function hash(Owner memory _owner) internal pure returns (bytes32) {\n return keccak256(abi.encode(OWNER_TYPE_HASH, _owner.addr, _owner.tokenAddr, _owner.chainId));\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC721/IERC721.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" - }, - "contracts/interfaces/IWETH.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IWETH {\n function deposit() external payable;\n\n function withdraw(uint256 _wad) external;\n\n function balanceOf(address) external view returns (uint256);\n}\n" - }, - "contracts/interfaces/consumers/MappedTokenConsumer.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../libraries/Token.sol\";\n\ninterface MappedTokenConsumer {\n struct MappedToken {\n Token.Standard erc;\n address tokenAddr;\n }\n}\n" - }, - "contracts/ronin/StakingVesting.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../interfaces/IStakingVesting.sol\";\nimport \"../extensions/collections/HasValidatorContract.sol\";\nimport \"../extensions/RONTransferHelper.sol\";\n\ncontract StakingVesting is IStakingVesting, HasValidatorContract, RONTransferHelper, Initializable {\n /// @dev The block bonus for the block producer whenever a new block is mined.\n uint256 internal _blockProducerBonusPerBlock;\n /// @dev The block bonus for the bridge operator whenever a new block is mined.\n uint256 internal _bridgeOperatorBonusPerBlock;\n /// @dev The last block number that the staking vesting sent.\n uint256 public lastBlockSendingBonus;\n\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes the contract storage.\n */\n function initialize(\n address __validatorContract,\n uint256 __blockProducerBonusPerBlock,\n uint256 __bridgeOperatorBonusPerBlock\n ) external payable initializer {\n _setValidatorContract(__validatorContract);\n _setBlockProducerBonusPerBlock(__blockProducerBonusPerBlock);\n _setBridgeOperatorBonusPerBlock(__bridgeOperatorBonusPerBlock);\n }\n\n /**\n * @inheritdoc IStakingVesting\n */\n function receiveRON() external payable {}\n\n /**\n * @inheritdoc IStakingVesting\n */\n function blockProducerBlockBonus(\n uint256 /* _block */\n ) public view override returns (uint256) {\n return _blockProducerBonusPerBlock;\n }\n\n /**\n * @inheritdoc IStakingVesting\n */\n function bridgeOperatorBlockBonus(\n uint256 /* _block */\n ) public view override returns (uint256) {\n return _bridgeOperatorBonusPerBlock;\n }\n\n /**\n * @inheritdoc IStakingVesting\n */\n function requestBonus(bool _forBlockProducer, bool _forBridgeOperator)\n external\n override\n onlyValidatorContract\n returns (\n bool _success,\n uint256 _blockProducerBonus,\n uint256 _bridgeOperatorBonus\n )\n {\n require(block.number > lastBlockSendingBonus, \"StakingVesting: bonus for already sent\");\n lastBlockSendingBonus = block.number;\n\n _blockProducerBonus = _forBlockProducer ? blockProducerBlockBonus(block.number) : 0;\n _bridgeOperatorBonus = _forBridgeOperator ? bridgeOperatorBlockBonus(block.number) : 0;\n\n uint256 _totalAmount = _blockProducerBonus + _bridgeOperatorBonus;\n\n if (_totalAmount > 0) {\n address payable _validatorContractAddr = payable(validatorContract());\n\n _success = _unsafeSendRON(_validatorContractAddr, _totalAmount);\n\n if (!_success) {\n emit BonusTransferFailed(\n block.number,\n _validatorContractAddr,\n _blockProducerBonus,\n _bridgeOperatorBonus,\n address(this).balance\n );\n return (_success, 0, 0);\n }\n\n emit BonusTransferred(block.number, _validatorContractAddr, _blockProducerBonus, _bridgeOperatorBonus);\n }\n }\n\n /**\n * @inheritdoc IStakingVesting\n */\n function setBlockProducerBonusPerBlock(uint256 _amount) external override onlyAdmin {\n _setBlockProducerBonusPerBlock(_amount);\n }\n\n /**\n * @inheritdoc IStakingVesting\n */\n function setBridgeOperatorBonusPerBlock(uint256 _amount) external override onlyAdmin {\n _setBridgeOperatorBonusPerBlock(_amount);\n }\n\n /**\n * @dev Sets the bonus amount per block for block producer.\n *\n * Emits the event `BlockProducerBonusPerBlockUpdated`.\n *\n */\n function _setBlockProducerBonusPerBlock(uint256 _amount) internal {\n _blockProducerBonusPerBlock = _amount;\n emit BlockProducerBonusPerBlockUpdated(_amount);\n }\n\n /**\n * @dev Sets the bonus amount per block for bridge operator.\n *\n * Emits the event `BridgeOperatorBonusPerBlockUpdated`.\n *\n */\n function _setBridgeOperatorBonusPerBlock(uint256 _amount) internal {\n _bridgeOperatorBonusPerBlock = _amount;\n emit BridgeOperatorBonusPerBlockUpdated(_amount);\n }\n}\n" - }, - "contracts/interfaces/IStakingVesting.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface IStakingVesting {\n /// @dev Emitted when the block bonus for block producer is transferred.\n event BonusTransferred(\n uint256 indexed blockNumber,\n address indexed recipient,\n uint256 blockProducerAmount,\n uint256 bridgeOperatorAmount\n );\n /// @dev Emitted when the transfer of block bonus for block producer is failed.\n event BonusTransferFailed(\n uint256 indexed blockNumber,\n address indexed recipient,\n uint256 blockProducerAmount,\n uint256 bridgeOperatorAmount,\n uint256 contractBalance\n );\n /// @dev Emitted when the block bonus for block producer is updated\n event BlockProducerBonusPerBlockUpdated(uint256);\n /// @dev Emitted when the block bonus for bridge operator is updated\n event BridgeOperatorBonusPerBlockUpdated(uint256);\n\n /**\n * @dev Returns the bonus amount for the block producer at `_block`.\n */\n function blockProducerBlockBonus(uint256 _block) external view returns (uint256);\n\n /**\n * @dev Returns the bonus amount for the bridge validator at `_block`.\n */\n function bridgeOperatorBlockBonus(uint256 _block) external view returns (uint256);\n\n /**\n * @dev Receives RON from any address.\n */\n function receiveRON() external payable;\n\n /**\n * @dev Returns the last block number that the staking vesting is sent.\n */\n function lastBlockSendingBonus() external view returns (uint256);\n\n /**\n * @dev Transfers the staking vesting for the block producer and the bridge operator whenever a new block is mined.\n *\n * Requirements:\n * - The method caller must be validator contract.\n * - The method must be called only once per block.\n *\n * Emits the event `BonusTransferred` or `BonusTransferFailed`.\n *\n * Notes:\n * - The method does not revert when the contract balance is insufficient to send bonus. This assure the submit reward method\n * will not be reverted, and the underlying nodes does not hang.\n *\n * @param _forBlockProducer Indicates whether requesting the bonus for the block procucer, in case of being in jail or relevance.\n * @param _forBridgeOperator Indicates whether requesting the bonus for the bridge operator.\n *\n * @return _success Whether the transfer is successfully. This returns false mostly because this contract is out of balance.\n * @return _blockProducerBonus The amount of bonus actually sent for the block producer, returns 0 when the transfer is failed.\n * @return _bridgeOperatorBonus The amount of bonus actually sent for the bridge operator, returns 0 when the transfer is failed.\n *\n */\n function requestBonus(bool _forBlockProducer, bool _forBridgeOperator)\n external\n returns (\n bool _success,\n uint256 _blockProducerBonus,\n uint256 _bridgeOperatorBonus\n );\n\n /**\n * @dev Sets the bonus amount per block for block producer.\n *\n * Emits the event `BlockProducerBonusPerBlockUpdated`.\n *\n * Requirements:\n * - The method caller is admin.\n *\n */\n function setBlockProducerBonusPerBlock(uint256 _amount) external;\n\n /**\n * @dev Sets the bonus amount per block for bridge operator.\n *\n * Emits the event `BridgeOperatorBonusPerBlockUpdated`.\n *\n * Requirements:\n * - The method caller is admin.\n *\n */\n function setBridgeOperatorBonusPerBlock(uint256 _amount) external;\n}\n" - }, - "contracts/extensions/RONTransferHelper.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nabstract contract RONTransferHelper {\n /// @dev Error of recipient not accepting RON when transfer RON.\n error ErrRecipientRevert();\n /// @dev Error of sender has insufficient balance.\n error ErrInsufficientBalance();\n\n /**\n * @dev See `_sendRON`.\n * Reverts if the recipient does not receive RON.\n */\n function _transferRON(address payable _recipient, uint256 _amount) internal {\n if (!_sendRON(_recipient, _amount)) revert ErrRecipientRevert();\n }\n\n /**\n * @dev Send `_amount` RON to the address `_recipient`.\n * Returns whether the recipient receives RON or not.\n * Reverts once the contract balance is insufficient.\n *\n * Note: consider using `ReentrancyGuard` before calling this function.\n *\n */\n function _sendRON(address payable _recipient, uint256 _amount) internal returns (bool _success) {\n if (address(this).balance < _amount) revert ErrInsufficientBalance();\n return _unsafeSendRON(_recipient, _amount);\n }\n\n /**\n * @dev Unsafe send `_amount` RON to the address `_recipient`. If the sender's balance is insufficient,\n * the call does not revert.\n *\n * Note:\n * - Does not assert whether the balance of sender is sufficient.\n * - Does not assert whether the recipient accepts RON.\n * - Consider using `ReentrancyGuard` before calling this function.\n *\n */\n function _unsafeSendRON(address payable _recipient, uint256 _amount) internal returns (bool _success) {\n (_success, ) = _recipient.call{ value: _amount }(\"\");\n }\n\n /**\n * @dev Same purpose with {_unsafeSendRON(address,uin256)} but containing gas limit stipend forwarded in the call.\n */\n function _unsafeSendRON(\n address payable _recipient,\n uint256 _amount,\n uint256 _gas\n ) internal returns (bool _success) {\n (_success, ) = _recipient.call{ value: _amount, gas: _gas }(\"\");\n }\n}\n" - }, - "contracts/ronin/VaultForwarder.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../extensions/forwarder/Forwarder.sol\";\nimport \"../extensions/RONTransferHelper.sol\";\n\n/**\n * @title A vault contract that keeps RON, and behaves as an EOA account to interact with a target contract.\n * @dev There are three roles of interaction:\n * - Admin: top-up and withdraw RON to the vault, cannot forward call to the target.\n * - Moderator: forward all calls to the target, can top-up RON, cannot withdraw RON.\n * - Others: can top-up RON, cannot execute any other actions.\n */\ncontract VaultForwarder is Forwarder, RONTransferHelper {\n /// @dev Emitted when the admin withdraws all RON from the forwarder contract.\n event ForwarderRONWithdrawn(address indexed _recipient, uint256 _value);\n\n constructor(\n address[] memory _targets,\n address _admin,\n address _mod\n ) Forwarder(_targets, _admin, _mod) {}\n\n /**\n * @dev Withdraws all balance from the transfer to the admin.\n *\n * Requirements:\n * - Only the admin can call this method.\n */\n function withdrawAll() external onlyRole(DEFAULT_ADMIN_ROLE) {\n uint256 _value = address(this).balance;\n emit ForwarderRONWithdrawn(msg.sender, _value);\n _transferRON(payable(msg.sender), _value);\n }\n}\n" - }, - "contracts/extensions/forwarder/Forwarder.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/AccessControlEnumerable.sol\";\n\ncontract Forwarder is AccessControlEnumerable {\n /// @dev Only user with moderator role can invoke {functionCall} method to forward the call to the target.\n bytes32 public constant MODERATOR_ROLE = keccak256(\"MODERATOR_ROLE\");\n\n /**\n * @dev The target contracts must be registerred by the admin before called to. The admin can register the targets at\n * the contract construction or by assigning {TARGET_ROLE} to the target addresses.\n */\n bytes32 public constant TARGET_ROLE = keccak256(\"TARGET_ROLE\");\n\n /**\n * @dev Initializes the forwarder with an initial target address and a contract admin.\n */\n constructor(\n address[] memory _targets,\n address _admin,\n address _moderator\n ) payable {\n for (uint _i = 0; _i < _targets.length; _i++) {\n _setupRole(TARGET_ROLE, _targets[_i]);\n }\n _setupRole(DEFAULT_ADMIN_ROLE, _admin);\n _setupRole(MODERATOR_ROLE, _moderator);\n }\n\n modifier validTarget(address _target) {\n _checkRole(TARGET_ROLE, _target);\n _;\n }\n\n /**\n * @dev Receives RON transfer from all addresses.\n */\n fallback() external payable {}\n\n /**\n * @dev Receives RON transfer from all addresses.\n */\n receive() external payable {}\n\n /**\n * @dev Forwards the encoded call specified by `_data` to the target. The forwarder attachs `_val` value\n * from the forwarder contract and sends along with the call.\n *\n * Requirements:\n * - Only target with {TARGET_ROLE} can be called to.\n * - Only user with {MODERATOR_ROLE} can call this method.\n */\n function functionCall(\n address _target,\n bytes memory _data,\n uint256 _val\n ) external payable validTarget(_target) onlyRole(MODERATOR_ROLE) {\n require(_val <= address(this).balance, \"Forwarder: invalid forwarding value\");\n _call(_target, _data, _val);\n }\n\n /**\n * @dev Forwards the current call to `target`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _call(\n address _target,\n bytes memory _data,\n uint256 _value\n ) internal {\n (bool _success, bytes memory _res) = _target.call{ value: _value }(_data);\n if (!_success) {\n uint _size = _res.length;\n require(_size >= 4, \"Forwarder: target reverts silently\");\n assembly {\n _res := add(_res, 0x20)\n revert(_res, _size)\n }\n }\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../extensions/ERC20Burnable.sol\";\nimport \"../extensions/ERC20Pausable.sol\";\nimport \"../../../access/AccessControlEnumerable.sol\";\nimport \"../../../utils/Context.sol\";\n\n/**\n * @dev {ERC20} token, including:\n *\n * - ability for holders to burn (destroy) their tokens\n * - a minter role that allows for token minting (creation)\n * - a pauser role that allows to stop all token transfers\n *\n * This contract uses {AccessControl} to lock permissioned functions using the\n * different roles - head to its documentation for details.\n *\n * The account that deploys the contract will be granted the minter and pauser\n * roles, as well as the default admin role, which will let it grant both minter\n * and pauser roles to other accounts.\n *\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\n */\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n /**\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\n * account that deploys the contract.\n *\n * See {ERC20-constructor}.\n */\n constructor(string memory name, string memory symbol) ERC20(name, symbol) {\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\n\n _setupRole(MINTER_ROLE, _msgSender());\n _setupRole(PAUSER_ROLE, _msgSender());\n }\n\n /**\n * @dev Creates `amount` new tokens for `to`.\n *\n * See {ERC20-_mint}.\n *\n * Requirements:\n *\n * - the caller must have the `MINTER_ROLE`.\n */\n function mint(address to, uint256 amount) public virtual {\n require(hasRole(MINTER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have minter role to mint\");\n _mint(to, amount);\n }\n\n /**\n * @dev Pauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_pause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function pause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to pause\");\n _pause();\n }\n\n /**\n * @dev Unpauses all token transfers.\n *\n * See {ERC20Pausable} and {Pausable-_unpause}.\n *\n * Requirements:\n *\n * - the caller must have the `PAUSER_ROLE`.\n */\n function unpause() public virtual {\n require(hasRole(PAUSER_ROLE, _msgSender()), \"ERC20PresetMinterPauser: must have pauser role to unpause\");\n _unpause();\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override(ERC20, ERC20Pausable) {\n super._beforeTokenTransfer(from, to, amount);\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.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 Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * 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, IERC20Metadata {\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\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override 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 override 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 this function is\n * overridden;\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 override returns (uint8) {\n return 18;\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 * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, 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 * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\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 address owner = _msgSender();\n _approve(owner, 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 * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\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 address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + 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 address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This 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 * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n }\n _balances[to] += amount;\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, 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 * - `account` 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 += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(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 uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(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(\n address owner,\n address spender,\n uint256 amount\n ) 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 Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\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 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(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after 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 * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../utils/Context.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 /**\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 _spendAllowance(account, _msgSender(), amount);\n _burn(account, amount);\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n */\nabstract contract ERC20Pausable is ERC20, Pausable {\n /**\n * @dev See {ERC20-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n require(!paused(), \"ERC20Pausable: token transfer while paused\");\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" - }, - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev Returns the current implementation of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Returns the current admin of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `proxy` to `newAdmin`.\n *\n * Requirements:\n *\n * - This contract must be the current admin of `proxy`.\n */\n function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgradeAndCall(\n TransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n */\n function changeAdmin(address newAdmin) external virtual ifAdmin {\n _changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" - }, - "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" - }, - "contracts/multi-chains/RoninTrustedOrganization.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../libraries/AddressArrayUtils.sol\";\nimport \"../interfaces/IRoninTrustedOrganization.sol\";\nimport \"../extensions/collections/HasProxyAdmin.sol\";\n\ncontract RoninTrustedOrganization is IRoninTrustedOrganization, HasProxyAdmin, Initializable {\n uint256 internal _num;\n uint256 internal _denom;\n uint256 internal _totalWeight;\n uint256 internal _nonce;\n\n /// @dev Mapping from consensus address => weight\n mapping(address => uint256) internal _consensusWeight;\n /// @dev Mapping from governor address => weight\n mapping(address => uint256) internal _governorWeight;\n /// @dev Mapping from bridge voter address => weight\n mapping(address => uint256) internal _bridgeVoterWeight;\n\n /// @dev Mapping from consensus address => added block\n mapping(address => uint256) internal _addedBlock;\n\n /// @dev Consensus array\n address[] internal _consensusList;\n /// @dev Governors array\n address[] internal _governorList;\n /// @dev Bridge voters array\n address[] internal _bridgeVoterList;\n\n /**\n * @dev Initializes the contract storage.\n */\n function initialize(\n TrustedOrganization[] calldata _trustedOrgs,\n uint256 __num,\n uint256 __denom\n ) external initializer {\n if (_trustedOrgs.length > 0) {\n _addTrustedOrganizations(_trustedOrgs);\n }\n _setThreshold(__num, __denom);\n }\n\n /**\n * @inheritdoc IQuorum\n */\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\n return (_num, _denom);\n }\n\n /**\n * @inheritdoc IQuorum\n */\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\n return _voteWeight * _denom >= _num * _totalWeight;\n }\n\n /**\n * @inheritdoc IQuorum\n */\n function minimumVoteWeight() external view virtual returns (uint256) {\n return (_num * _totalWeight + _denom - 1) / _denom;\n }\n\n /**\n * @inheritdoc IQuorum\n */\n function setThreshold(uint256 _numerator, uint256 _denominator)\n external\n override\n onlyAdmin\n returns (uint256, uint256)\n {\n return _setThreshold(_numerator, _denominator);\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function addTrustedOrganizations(TrustedOrganization[] calldata _list) external override onlyAdmin {\n _addTrustedOrganizations(_list);\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function updateTrustedOrganizations(TrustedOrganization[] calldata _list) external override onlyAdmin {\n require(_list.length > 0, \"RoninTrustedOrganization: invalid array length\");\n for (uint256 _i; _i < _list.length; _i++) {\n _updateTrustedOrganization(_list[_i]);\n }\n emit TrustedOrganizationsUpdated(_list);\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function removeTrustedOrganizations(address[] calldata _list) external override onlyAdmin {\n require(_list.length > 0, \"RoninTrustedOrganization: invalid array length\");\n for (uint _i = 0; _i < _list.length; _i++) {\n _removeTrustedOrganization(_list[_i]);\n }\n emit TrustedOrganizationsRemoved(_list);\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function totalWeights() external view virtual returns (uint256) {\n return _totalWeight;\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getConsensusWeight(address _consensusAddr) external view returns (uint256) {\n return _consensusWeight[_consensusAddr];\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getGovernorWeight(address _governor) external view returns (uint256) {\n return _governorWeight[_governor];\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getBridgeVoterWeight(address _addr) external view returns (uint256) {\n return _bridgeVoterWeight[_addr];\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getConsensusWeights(address[] calldata _list) external view returns (uint256[] memory _res) {\n _res = new uint256[](_list.length);\n for (uint _i = 0; _i < _res.length; _i++) {\n _res[_i] = _consensusWeight[_list[_i]];\n }\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getGovernorWeights(address[] calldata _list) external view returns (uint256[] memory _res) {\n _res = new uint256[](_list.length);\n for (uint _i = 0; _i < _res.length; _i++) {\n _res[_i] = _governorWeight[_list[_i]];\n }\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getBridgeVoterWeights(address[] calldata _list) external view returns (uint256[] memory _res) {\n _res = new uint256[](_list.length);\n for (uint _i = 0; _i < _res.length; _i++) {\n _res[_i] = _bridgeVoterWeight[_list[_i]];\n }\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function sumConsensusWeights(address[] calldata _list) external view returns (uint256 _res) {\n for (uint _i = 0; _i < _list.length; _i++) {\n _res += _consensusWeight[_list[_i]];\n }\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function sumGovernorWeights(address[] calldata _list) external view returns (uint256 _res) {\n for (uint _i = 0; _i < _list.length; _i++) {\n _res += _governorWeight[_list[_i]];\n }\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function sumBridgeVoterWeights(address[] calldata _list) external view returns (uint256 _res) {\n for (uint _i = 0; _i < _list.length; _i++) {\n _res += _bridgeVoterWeight[_list[_i]];\n }\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function countTrustedOrganizations() external view override returns (uint256) {\n return _consensusList.length;\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getAllTrustedOrganizations() external view override returns (TrustedOrganization[] memory _list) {\n _list = new TrustedOrganization[](_consensusList.length);\n address _addr;\n for (uint256 _i; _i < _list.length; _i++) {\n _addr = _consensusList[_i];\n _list[_i].consensusAddr = _addr;\n _list[_i].governor = _governorList[_i];\n _list[_i].bridgeVoter = _bridgeVoterList[_i];\n _list[_i].weight = _consensusWeight[_addr];\n }\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getTrustedOrganization(address _consensusAddr) external view returns (TrustedOrganization memory) {\n for (uint _i = 0; _i < _consensusList.length; _i++) {\n if (_consensusList[_i] == _consensusAddr) {\n return getTrustedOrganizationAt(_i);\n }\n }\n revert(\"RoninTrustedOrganization: query for non-existent consensus address\");\n }\n\n /**\n * @inheritdoc IRoninTrustedOrganization\n */\n function getTrustedOrganizationAt(uint256 _idx) public view override returns (TrustedOrganization memory) {\n address _addr = _consensusList[_idx];\n return\n TrustedOrganization(\n _addr,\n _governorList[_idx],\n _bridgeVoterList[_idx],\n _consensusWeight[_addr],\n _addedBlock[_addr]\n );\n }\n\n /**\n * @dev Adds a list of trusted organizations.\n */\n function _addTrustedOrganizations(TrustedOrganization[] calldata _list) internal virtual {\n for (uint256 _i; _i < _list.length; _i++) {\n _addTrustedOrganization(_list[_i]);\n }\n emit TrustedOrganizationsAdded(_list);\n }\n\n /**\n * @dev Adds a trusted organization.\n *\n * Requirements:\n * - The weight is larger than 0.\n * - The consensus address is not added.\n * - The govenor address is not added.\n * - The bridge voter address is not added.\n *\n */\n function _addTrustedOrganization(TrustedOrganization memory _v) internal virtual {\n require(_v.addedBlock == 0, \"RoninTrustedOrganization: invalid request\");\n require(_v.weight > 0, \"RoninTrustedOrganization: invalid weight\");\n\n address[] memory _addresses = new address[](3);\n _addresses[0] = _v.consensusAddr;\n _addresses[1] = _v.governor;\n _addresses[2] = _v.bridgeVoter;\n require(!AddressArrayUtils.hasDuplicate(_addresses), \"RoninTrustedOrganization: three addresses must be distinct\");\n\n if (_consensusWeight[_v.consensusAddr] > 0) {\n revert(\n string(\n abi.encodePacked(\n \"RoninTrustedOrganization: consensus address \",\n Strings.toHexString(uint160(_v.consensusAddr), 20),\n \" is added already\"\n )\n )\n );\n }\n\n if (_governorWeight[_v.governor] > 0) {\n revert(\n string(\n abi.encodePacked(\n \"RoninTrustedOrganization: govenor address \",\n Strings.toHexString(uint160(_v.governor), 20),\n \" is added already\"\n )\n )\n );\n }\n\n if (_bridgeVoterWeight[_v.bridgeVoter] > 0) {\n revert(\n string(\n abi.encodePacked(\n \"RoninTrustedOrganization: bridge voter address \",\n Strings.toHexString(uint160(_v.bridgeVoter), 20),\n \" is added already\"\n )\n )\n );\n }\n\n _consensusList.push(_v.consensusAddr);\n _consensusWeight[_v.consensusAddr] = _v.weight;\n\n _governorList.push(_v.governor);\n _governorWeight[_v.governor] = _v.weight;\n\n _bridgeVoterList.push(_v.bridgeVoter);\n _bridgeVoterWeight[_v.bridgeVoter] = _v.weight;\n\n _addedBlock[_v.consensusAddr] = block.number;\n\n _totalWeight += _v.weight;\n }\n\n /**\n * @dev Updates a trusted organization.\n *\n * Requirements:\n * - The weight is larger than 0.\n * - The consensus address is already added.\n *\n */\n function _updateTrustedOrganization(TrustedOrganization memory _v) internal virtual {\n require(_v.weight > 0, \"RoninTrustedOrganization: invalid weight\");\n\n uint256 _weight = _consensusWeight[_v.consensusAddr];\n if (_weight == 0) {\n revert(\n string(\n abi.encodePacked(\n \"RoninTrustedOrganization: consensus address \",\n Strings.toHexString(uint160(_v.consensusAddr), 20),\n \" is not added\"\n )\n )\n );\n }\n\n uint256 _count = _consensusList.length;\n for (uint256 _i = 0; _i < _count; _i++) {\n if (_consensusList[_i] == _v.consensusAddr) {\n _totalWeight -= _weight;\n _totalWeight += _v.weight;\n\n if (_governorList[_i] != _v.governor) {\n require(_governorWeight[_v.governor] == 0, \"RoninTrustedOrganization: query for duplicated governor\");\n delete _governorWeight[_governorList[_i]];\n _governorList[_i] = _v.governor;\n }\n\n if (_bridgeVoterList[_i] != _v.bridgeVoter) {\n require(\n _bridgeVoterWeight[_v.bridgeVoter] == 0,\n \"RoninTrustedOrganization: query for duplicated bridge voter\"\n );\n delete _bridgeVoterWeight[_bridgeVoterList[_i]];\n _bridgeVoterList[_i] = _v.bridgeVoter;\n }\n\n _consensusWeight[_v.consensusAddr] = _v.weight;\n _governorWeight[_v.governor] = _v.weight;\n _bridgeVoterWeight[_v.bridgeVoter] = _v.weight;\n return;\n }\n }\n }\n\n /**\n * @dev Removes a trusted organization.\n *\n * Requirements:\n * - The consensus address is added.\n *\n */\n function _removeTrustedOrganization(address _addr) internal virtual {\n uint256 _weight = _consensusWeight[_addr];\n if (_weight == 0) {\n revert(\n string(\n abi.encodePacked(\n \"RoninTrustedOrganization: consensus address \",\n Strings.toHexString(uint160(_addr), 20),\n \" is not added\"\n )\n )\n );\n }\n\n uint256 _index;\n uint256 _count = _consensusList.length;\n for (uint256 _i = 0; _i < _count; _i++) {\n if (_consensusList[_i] == _addr) {\n _index = _i;\n break;\n }\n }\n\n _totalWeight -= _weight;\n\n delete _addedBlock[_addr];\n delete _consensusWeight[_addr];\n _consensusList[_index] = _consensusList[_count - 1];\n _consensusList.pop();\n\n delete _governorWeight[_governorList[_index]];\n _governorList[_index] = _governorList[_count - 1];\n _governorList.pop();\n\n delete _bridgeVoterWeight[_bridgeVoterList[_index]];\n _bridgeVoterList[_index] = _bridgeVoterList[_count - 1];\n _bridgeVoterList.pop();\n }\n\n /**\n * @dev Sets threshold and returns the old one.\n *\n * Emits the `ThresholdUpdated` event.\n *\n */\n function _setThreshold(uint256 _numerator, uint256 _denominator)\n internal\n virtual\n returns (uint256 _previousNum, uint256 _previousDenom)\n {\n require(_numerator <= _denominator, \"RoninTrustedOrganization: invalid threshold\");\n _previousNum = _num;\n _previousDenom = _denom;\n _num = _numerator;\n _denom = _denominator;\n emit ThresholdUpdated(_nonce++, _numerator, _denominator, _previousNum, _previousDenom);\n }\n}\n" - }, - "contracts/libraries/AddressArrayUtils.sol": { - "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity ^0.8.0;\n\nlibrary AddressArrayUtils {\n /**\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\n * @param A Array to search\n * @return Returns true if duplicate, false otherwise\n */\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\n if (A.length == 0) {\n return false;\n }\n for (uint256 i = 0; i < A.length - 1; i++) {\n for (uint256 j = i + 1; j < A.length; j++) {\n if (A[i] == A[j]) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * @dev Returns whether two arrays of addresses are equal or not.\n */\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool) {\n bytes32 _thisHash;\n bytes32 _otherHash;\n\n assembly {\n _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\n _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\n }\n\n return _thisHash == _otherHash;\n }\n}\n" - }, - "contracts/interfaces/IRoninTrustedOrganization.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IQuorum.sol\";\n\ninterface IRoninTrustedOrganization is IQuorum {\n struct TrustedOrganization {\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\n address consensusAddr;\n // Address to voting proposal\n address governor;\n // Address to voting bridge operators\n address bridgeVoter;\n // Its Weight\n uint256 weight;\n // The block that the organization was added\n uint256 addedBlock;\n }\n\n /// @dev Emitted when the trusted organization is added.\n event TrustedOrganizationsAdded(TrustedOrganization[] orgs);\n /// @dev Emitted when the trusted organization is updated.\n event TrustedOrganizationsUpdated(TrustedOrganization[] orgs);\n /// @dev Emitted when the trusted organization is removed.\n event TrustedOrganizationsRemoved(address[] orgs);\n\n /**\n * @dev Adds a list of addresses into the trusted organization.\n *\n * Requirements:\n * - The weights should larger than 0.\n * - The method caller is admin.\n * - The field `addedBlock` should be blank.\n *\n * Emits the event `TrustedOrganizationAdded` once an organization is added.\n *\n */\n function addTrustedOrganizations(TrustedOrganization[] calldata) external;\n\n /**\n * @dev Updates weights for a list of existent trusted organization.\n *\n * Requirements:\n * - The weights should larger than 0.\n * - The method caller is admin.\n *\n * Emits the `TrustedOrganizationUpdated` event.\n *\n */\n function updateTrustedOrganizations(TrustedOrganization[] calldata _list) external;\n\n /**\n * @dev Removes a list of addresses from the trusted organization.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `TrustedOrganizationRemoved` once an organization is removed.\n *\n * @param _consensusAddrs The list of consensus addresses linked to corresponding trusted organization that to be removed.\n */\n function removeTrustedOrganizations(address[] calldata _consensusAddrs) external;\n\n /**\n * @dev Returns total weights.\n */\n function totalWeights() external view returns (uint256);\n\n /**\n * @dev Returns the weight of a consensus.\n */\n function getConsensusWeight(address _consensusAddr) external view returns (uint256);\n\n /**\n * @dev Returns the weight of a governor.\n */\n function getGovernorWeight(address _governor) external view returns (uint256);\n\n /**\n * @dev Returns the weight of a bridge voter.\n */\n function getBridgeVoterWeight(address _addr) external view returns (uint256);\n\n /**\n * @dev Returns the weights of a list of consensus addresses.\n */\n function getConsensusWeights(address[] calldata _list) external view returns (uint256[] memory);\n\n /**\n * @dev Returns the weights of a list of governor addresses.\n */\n function getGovernorWeights(address[] calldata _list) external view returns (uint256[] memory);\n\n /**\n * @dev Returns the weights of a list of bridge voter addresses.\n */\n function getBridgeVoterWeights(address[] calldata _list) external view returns (uint256[] memory);\n\n /**\n * @dev Returns total weights of the consensus list.\n */\n function sumConsensusWeights(address[] calldata _list) external view returns (uint256 _res);\n\n /**\n * @dev Returns total weights of the governor list.\n */\n function sumGovernorWeights(address[] calldata _list) external view returns (uint256 _res);\n\n /**\n * @dev Returns total weights of the bridge voter list.\n */\n function sumBridgeVoterWeights(address[] calldata _list) external view returns (uint256 _res);\n\n /**\n * @dev Returns the trusted organization at `_index`.\n */\n function getTrustedOrganizationAt(uint256 _index) external view returns (TrustedOrganization memory);\n\n /**\n * @dev Returns the number of trusted organizations.\n */\n function countTrustedOrganizations() external view returns (uint256);\n\n /**\n * @dev Returns all of the trusted organizations.\n */\n function getAllTrustedOrganizations() external view returns (TrustedOrganization[] memory);\n\n /**\n * @dev Returns the trusted organization by consensus address.\n *\n * Reverts once the consensus address is non-existent.\n */\n function getTrustedOrganization(address _consensusAddr) external view returns (TrustedOrganization memory);\n}\n" - }, - "contracts/extensions/GovernanceAdmin.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../extensions/sequential-governance/CoreGovernance.sol\";\nimport \"../extensions/collections/HasRoninTrustedOrganizationContract.sol\";\nimport \"../extensions/collections/HasBridgeContract.sol\";\nimport \"../interfaces/IRoninTrustedOrganization.sol\";\n\nabstract contract GovernanceAdmin is CoreGovernance, HasRoninTrustedOrganizationContract, HasBridgeContract {\n uint256 public roninChainId;\n /// @dev Domain separator\n bytes32 public DOMAIN_SEPARATOR;\n\n modifier onlySelfCall() {\n require(msg.sender == address(this), \"GovernanceAdmin: only allowed self-call\");\n _;\n }\n\n constructor(\n uint256 _roninChainId,\n address _roninTrustedOrganizationContract,\n address _bridgeContract,\n uint256 _proposalExpiryDuration\n ) CoreGovernance(_proposalExpiryDuration) {\n roninChainId = _roninChainId;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,bytes32 salt)\"),\n keccak256(\"GovernanceAdmin\"), // name hash\n keccak256(\"2\"), // version hash\n keccak256(abi.encode(\"RONIN_GOVERNANCE_ADMIN\", _roninChainId)) // salt\n )\n );\n _setRoninTrustedOrganizationContract(_roninTrustedOrganizationContract);\n _setBridgeContract(_bridgeContract);\n }\n\n /**\n * @inheritdoc IHasRoninTrustedOrganizationContract\n */\n function setRoninTrustedOrganizationContract(address _addr) external override onlySelfCall {\n require(_addr.code.length > 0, \"GovernanceAdmin: set to non-contract\");\n _setRoninTrustedOrganizationContract(_addr);\n }\n\n /**\n * @inheritdoc IHasBridgeContract\n */\n function setBridgeContract(address _addr) external override onlySelfCall {\n require(_addr.code.length > 0, \"GovernanceAdmin: set to non-contract\");\n _setBridgeContract(_addr);\n }\n\n /**\n * @dev Sets the expiry duration for a new proposal.\n *\n * Requirements:\n * - Only allowing self-call to this method, since this contract does not have admin.\n *\n */\n function setProposalExpiryDuration(uint256 _expiryDuration) external onlySelfCall {\n _setProposalExpiryDuration(_expiryDuration);\n }\n\n /**\n * @dev Returns the current implementation of `_proxy`.\n *\n * Requirements:\n * - This contract must be the admin of `_proxy`.\n *\n */\n function getProxyImplementation(address _proxy) external view returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool _success, bytes memory _returndata) = _proxy.staticcall(hex\"5c60da1b\");\n require(_success, \"GovernanceAdmin: proxy call `implementation()` failed\");\n return abi.decode(_returndata, (address));\n }\n\n /**\n * @dev Returns the proposal expiry duration.\n */\n function getProposalExpiryDuration() external view returns (uint256) {\n return super._getProposalExpiryDuration();\n }\n\n /**\n * @dev Returns the current admin of `_proxy`.\n *\n * Requirements:\n * - This contract must be the admin of `_proxy`.\n *\n */\n function getProxyAdmin(address _proxy) external view returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool _success, bytes memory _returndata) = _proxy.staticcall(hex\"f851a440\");\n require(_success, \"GovernanceAdmin: proxy call `admin()` failed\");\n return abi.decode(_returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `_proxy` to `newAdmin`.\n *\n * Requirements:\n * - This contract must be the current admin of `_proxy`.\n *\n */\n function changeProxyAdmin(address _proxy, address _newAdmin) external onlySelfCall {\n // bytes4(keccak256(\"changeAdmin(address)\"))\n (bool _success, ) = _proxy.call(abi.encodeWithSelector(0x8f283970, _newAdmin));\n require(_success, \"GovernanceAdmin: proxy call `changeAdmin(address)` failed\");\n }\n\n /**\n * @dev Override `CoreGovernance-_getMinimumVoteWeight`.\n */\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\n abi.encodeWithSelector(\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\n 0x4bb5274a,\n abi.encodeWithSelector(IQuorum.minimumVoteWeight.selector)\n )\n );\n require(_success, \"GovernanceAdmin: proxy call `minimumVoteWeight()` failed\");\n return abi.decode(_returndata, (uint256));\n }\n\n /**\n * @dev Override `CoreGovernance-_getTotalWeights`.\n */\n function _getTotalWeights() internal view virtual override returns (uint256) {\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\n abi.encodeWithSelector(\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\n 0x4bb5274a,\n abi.encodeWithSelector(IRoninTrustedOrganization.totalWeights.selector)\n )\n );\n require(_success, \"GovernanceAdmin: proxy call `totalWeights()` failed\");\n return abi.decode(_returndata, (uint256));\n }\n}\n" - }, - "contracts/extensions/sequential-governance/CoreGovernance.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"../../libraries/Proposal.sol\";\nimport \"../../libraries/GlobalProposal.sol\";\nimport \"../../libraries/Ballot.sol\";\nimport \"../../interfaces/consumers/ChainTypeConsumer.sol\";\nimport \"../../interfaces/consumers/SignatureConsumer.sol\";\nimport \"../../interfaces/consumers/VoteStatusConsumer.sol\";\n\nabstract contract CoreGovernance is SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\n using Proposal for Proposal.ProposalDetail;\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\n\n struct ProposalVote {\n VoteStatus status;\n bytes32 hash;\n uint256 againstVoteWeight; // Total weight of against votes\n uint256 forVoteWeight; // Total weight of for votes\n address[] forVoteds; // Array of addresses voting for\n address[] againstVoteds; // Array of addresses voting against\n uint256 expiryTimestamp;\n mapping(address => Signature) sig;\n mapping(address => bool) voted;\n }\n\n /// @dev Emitted when a proposal is created\n event ProposalCreated(\n uint256 indexed chainId,\n uint256 indexed round,\n bytes32 indexed proposalHash,\n Proposal.ProposalDetail proposal,\n address creator\n );\n /// @dev Emitted when a proposal is created\n event GlobalProposalCreated(\n uint256 indexed round,\n bytes32 indexed proposalHash,\n Proposal.ProposalDetail proposal,\n bytes32 globalProposalHash,\n GlobalProposal.GlobalProposalDetail globalProposal,\n address creator\n );\n /// @dev Emitted when the proposal is voted\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\n /// @dev Emitted when the proposal is approved\n event ProposalApproved(bytes32 indexed proposalHash);\n /// @dev Emitted when the vote is reject\n event ProposalRejected(bytes32 indexed proposalHash);\n /// @dev Emitted when the vote is expired\n event ProposalExpired(bytes32 indexed proposalHash);\n /// @dev Emitted when the proposal is executed\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\n\n /// @dev Mapping from chain id => vote round\n /// @notice chain id = 0 for global proposal\n mapping(uint256 => uint256) public round;\n /// @dev Mapping from chain id => vote round => proposal vote\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\n\n uint256 private _proposalExpiryDuration;\n\n constructor(uint256 _expiryDuration) {\n _setProposalExpiryDuration(_expiryDuration);\n }\n\n /**\n * @dev Creates new round voting for the proposal `_proposalHash` of chain `_chainId`.\n */\n function _createVotingRound(\n uint256 _chainId,\n bytes32 _proposalHash,\n uint256 _expiryTimestamp\n ) internal returns (uint256 _round) {\n _round = round[_chainId];\n\n // Skip checking for the first ever round\n if (_round == 0) {\n _round = round[_chainId] = 1;\n } else {\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\n // Skip increase round number if the latest round is expired, allow the vote to be overridden\n if (!_isExpired) {\n require(_latestProposalVote.status != VoteStatus.Pending, \"CoreGovernance: current proposal is not completed\");\n _round = ++round[_chainId];\n }\n }\n\n vote[_chainId][_round].hash = _proposalHash;\n vote[_chainId][_round].expiryTimestamp = _expiryTimestamp;\n }\n\n /**\n * @dev Proposes for a new proposal.\n *\n * Requirements:\n * - The chain id is not equal to 0.\n *\n * Emits the `ProposalCreated` event.\n *\n */\n function _proposeProposal(\n uint256 _chainId,\n uint256 _expiryTimestamp,\n address[] memory _targets,\n uint256[] memory _values,\n bytes[] memory _calldatas,\n uint256[] memory _gasAmounts,\n address _creator\n ) internal virtual returns (Proposal.ProposalDetail memory _proposal) {\n require(_chainId != 0, \"CoreGovernance: invalid chain id\");\n\n _proposal = Proposal.ProposalDetail(\n round[_chainId] + 1,\n _chainId,\n _expiryTimestamp,\n _targets,\n _values,\n _calldatas,\n _gasAmounts\n );\n _proposal.validate(_proposalExpiryDuration);\n\n bytes32 _proposalHash = _proposal.hash();\n uint256 _round = _createVotingRound(_chainId, _proposalHash, _expiryTimestamp);\n emit ProposalCreated(_chainId, _round, _proposalHash, _proposal, _creator);\n }\n\n /**\n * @dev Proposes proposal struct.\n *\n * Requirements:\n * - The chain id is not equal to 0.\n * - The proposal nonce is equal to the new round.\n *\n * Emits the `ProposalCreated` event.\n *\n */\n function _proposeProposalStruct(Proposal.ProposalDetail memory _proposal, address _creator)\n internal\n virtual\n returns (uint256 _round)\n {\n uint256 _chainId = _proposal.chainId;\n require(_chainId != 0, \"CoreGovernance: invalid chain id\");\n _proposal.validate(_proposalExpiryDuration);\n\n bytes32 _proposalHash = _proposal.hash();\n _round = _createVotingRound(_chainId, _proposalHash, _proposal.expiryTimestamp);\n require(_round == _proposal.nonce, \"CoreGovernance: invalid proposal nonce\");\n emit ProposalCreated(_chainId, _round, _proposalHash, _proposal, _creator);\n }\n\n /**\n * @dev Proposes for a global proposal.\n *\n * Emits the `GlobalProposalCreated` event.\n *\n */\n function _proposeGlobal(\n uint256 _expiryTimestamp,\n GlobalProposal.TargetOption[] calldata _targetOptions,\n uint256[] memory _values,\n bytes[] memory _calldatas,\n uint256[] memory _gasAmounts,\n address _roninTrustedOrganizationContract,\n address _gatewayContract,\n address _creator\n ) internal virtual returns (uint256 _round) {\n GlobalProposal.GlobalProposalDetail memory _globalProposal = GlobalProposal.GlobalProposalDetail(\n round[0] + 1,\n _expiryTimestamp,\n _targetOptions,\n _values,\n _calldatas,\n _gasAmounts\n );\n Proposal.ProposalDetail memory _proposal = _globalProposal.into_proposal_detail(\n _roninTrustedOrganizationContract,\n _gatewayContract\n );\n _proposal.validate(_proposalExpiryDuration);\n\n bytes32 _proposalHash = _proposal.hash();\n _round = _createVotingRound(0, _proposalHash, _expiryTimestamp);\n emit GlobalProposalCreated(_round, _proposalHash, _proposal, _globalProposal.hash(), _globalProposal, _creator);\n }\n\n /**\n * @dev Proposes global proposal struct.\n *\n * Requirements:\n * - The proposal nonce is equal to the new round.\n *\n * Emits the `GlobalProposalCreated` event.\n *\n */\n function _proposeGlobalStruct(\n GlobalProposal.GlobalProposalDetail memory _globalProposal,\n address _roninTrustedOrganizationContract,\n address _gatewayContract,\n address _creator\n ) internal virtual returns (Proposal.ProposalDetail memory _proposal, uint256 _round) {\n _proposal = _globalProposal.into_proposal_detail(_roninTrustedOrganizationContract, _gatewayContract);\n _proposal.validate(_proposalExpiryDuration);\n\n bytes32 _proposalHash = _proposal.hash();\n _round = _createVotingRound(0, _proposalHash, _globalProposal.expiryTimestamp);\n require(_round == _proposal.nonce, \"CoreGovernance: invalid proposal nonce\");\n emit GlobalProposalCreated(_round, _proposalHash, _proposal, _globalProposal.hash(), _globalProposal, _creator);\n }\n\n /**\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\n *\n * Requirements:\n * - The proposal nonce is equal to the round.\n * - The vote is not finalized.\n * - The voter has not voted for the round.\n *\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\n * proposal is approved, executed or rejected.\n *\n */\n function _castVote(\n Proposal.ProposalDetail memory _proposal,\n Ballot.VoteType _support,\n uint256 _minimumForVoteWeight,\n uint256 _minimumAgainstVoteWeight,\n address _voter,\n Signature memory _signature,\n uint256 _voterWeight\n ) internal virtual returns (bool _done) {\n uint256 _chainId = _proposal.chainId;\n uint256 _round = _proposal.nonce;\n ProposalVote storage _vote = vote[_chainId][_round];\n\n if (_tryDeleteExpiredVotingRound(_vote)) {\n return true;\n }\n\n require(round[_proposal.chainId] == _round, \"CoreGovernance: query for invalid proposal nonce\");\n require(_vote.status == VoteStatus.Pending, \"CoreGovernance: the vote is finalized\");\n if (_voted(_vote, _voter)) {\n revert(string(abi.encodePacked(\"CoreGovernance: \", Strings.toHexString(uint160(_voter), 20), \" already voted\")));\n }\n\n _vote.voted[_voter] = true;\n // Stores the signature if it is not empty\n if (_signature.r > 0 || _signature.s > 0 || _signature.v > 0) {\n _vote.sig[_voter] = _signature;\n }\n emit ProposalVoted(_vote.hash, _voter, _support, _voterWeight);\n\n uint256 _forVoteWeight;\n uint256 _againstVoteWeight;\n if (_support == Ballot.VoteType.For) {\n _vote.forVoteds.push(_voter);\n _forVoteWeight = _vote.forVoteWeight += _voterWeight;\n } else if (_support == Ballot.VoteType.Against) {\n _vote.againstVoteds.push(_voter);\n _againstVoteWeight = _vote.againstVoteWeight += _voterWeight;\n } else {\n revert(\"CoreGovernance: unsupported vote type\");\n }\n\n if (_forVoteWeight >= _minimumForVoteWeight) {\n _done = true;\n _vote.status = VoteStatus.Approved;\n emit ProposalApproved(_vote.hash);\n _tryExecute(_vote, _proposal);\n } else if (_againstVoteWeight >= _minimumAgainstVoteWeight) {\n _done = true;\n _vote.status = VoteStatus.Rejected;\n emit ProposalRejected(_vote.hash);\n }\n }\n\n /**\n * @dev Delete the expired proposal by its chainId and nonce, without creating a new proposal.\n */\n function _deleteExpiredVotingRound(uint256 _chainId, uint256 _round) internal {\n ProposalVote storage _vote = vote[_chainId][_round];\n _tryDeleteExpiredVotingRound(_vote);\n }\n\n /**\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\n */\n function _tryDeleteExpiredVotingRound(ProposalVote storage _proposalVote) private returns (bool _isExpired) {\n _isExpired =\n _getChainType() == ChainType.RoninChain &&\n _proposalVote.status == VoteStatus.Pending &&\n _proposalVote.expiryTimestamp <= block.timestamp;\n\n if (_isExpired) {\n emit ProposalExpired(_proposalVote.hash);\n\n for (uint256 _i; _i < _proposalVote.forVoteds.length; _i++) {\n delete _proposalVote.voted[_proposalVote.forVoteds[_i]];\n delete _proposalVote.sig[_proposalVote.forVoteds[_i]];\n }\n for (uint256 _i; _i < _proposalVote.againstVoteds.length; _i++) {\n delete _proposalVote.voted[_proposalVote.againstVoteds[_i]];\n delete _proposalVote.sig[_proposalVote.againstVoteds[_i]];\n }\n delete _proposalVote.status;\n delete _proposalVote.hash;\n delete _proposalVote.againstVoteWeight;\n delete _proposalVote.forVoteWeight;\n delete _proposalVote.forVoteds;\n delete _proposalVote.againstVoteds;\n delete _proposalVote.expiryTimestamp;\n }\n }\n\n /**\n * @dev Executes the proposal and update the vote status once the proposal is executable.\n */\n function _tryExecute(ProposalVote storage _vote, Proposal.ProposalDetail memory _proposal) internal {\n if (_proposal.executable()) {\n _vote.status = VoteStatus.Executed;\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = _proposal.execute();\n emit ProposalExecuted(_vote.hash, _successCalls, _returnDatas);\n }\n }\n\n /**\n * @dev Sets the expiry duration for a new proposal.\n */\n function _setProposalExpiryDuration(uint256 _expiryDuration) internal {\n _proposalExpiryDuration = _expiryDuration;\n }\n\n /**\n * @dev Returns whether the voter casted for the proposal.\n */\n function _voted(ProposalVote storage _vote, address _voter) internal view returns (bool) {\n return _vote.voted[_voter];\n }\n\n /**\n * @dev Returns the expiry duration for a new proposal.\n */\n function _getProposalExpiryDuration() internal view returns (uint256) {\n return _proposalExpiryDuration;\n }\n\n /**\n * @dev Returns total weight from validators.\n */\n function _getTotalWeights() internal view virtual returns (uint256);\n\n /**\n * @dev Returns minimum vote to pass a proposal.\n */\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\n\n /**\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\n */\n function _getChainType() internal view virtual returns (ChainType);\n}\n" - }, - "contracts/extensions/collections/HasRoninTrustedOrganizationContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasRoninTrustedOrganizationContract.sol\";\nimport \"../../interfaces/IRoninTrustedOrganization.sol\";\n\ncontract HasRoninTrustedOrganizationContract is IHasRoninTrustedOrganizationContract, HasProxyAdmin {\n IRoninTrustedOrganization internal _roninTrustedOrganizationContract;\n\n modifier onlyRoninTrustedOrganizationContract() {\n if (roninTrustedOrganizationContract() != msg.sender) revert ErrCallerMustBeRoninTrustedOrgContract();\n _;\n }\n\n /**\n * @inheritdoc IHasRoninTrustedOrganizationContract\n */\n function roninTrustedOrganizationContract() public view override returns (address) {\n return address(_roninTrustedOrganizationContract);\n }\n\n /**\n * @inheritdoc IHasRoninTrustedOrganizationContract\n */\n function setRoninTrustedOrganizationContract(address _addr) external virtual override onlyAdmin {\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\n _setRoninTrustedOrganizationContract(_addr);\n }\n\n /**\n * @dev Sets the ronin trusted organization contract.\n *\n * Emits the event `RoninTrustedOrganizationContractUpdated`.\n *\n */\n function _setRoninTrustedOrganizationContract(address _addr) internal {\n _roninTrustedOrganizationContract = IRoninTrustedOrganization(_addr);\n emit RoninTrustedOrganizationContractUpdated(_addr);\n }\n}\n" - }, - "contracts/libraries/Proposal.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary Proposal {\n struct ProposalDetail {\n // Nonce to make sure proposals are executed in order\n uint256 nonce;\n // Value 0: all chain should run this proposal\n // Other values: only specifc chain has to execute\n uint256 chainId;\n uint256 expiryTimestamp;\n address[] targets;\n uint256[] values;\n bytes[] calldatas;\n uint256[] gasAmounts;\n }\n\n // keccak256(\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\");\n bytes32 public constant TYPE_HASH = 0xd051578048e6ff0bbc9fca3b65a42088dbde10f36ca841de566711087ad9b08a;\n\n /**\n * @dev Validates the proposal.\n */\n function validate(ProposalDetail memory _proposal, uint256 _maxExpiryDuration) internal view {\n require(\n _proposal.targets.length > 0 &&\n _proposal.targets.length == _proposal.values.length &&\n _proposal.targets.length == _proposal.calldatas.length &&\n _proposal.targets.length == _proposal.gasAmounts.length,\n \"Proposal: invalid array length\"\n );\n require(_proposal.expiryTimestamp <= block.timestamp + _maxExpiryDuration, \"Proposal: invalid expiry timestamp\");\n }\n\n /**\n * @dev Returns struct hash of the proposal.\n */\n function hash(ProposalDetail memory _proposal) internal pure returns (bytes32) {\n bytes32 _targetsHash;\n bytes32 _valuesHash;\n bytes32 _calldatasHash;\n bytes32 _gasAmountsHash;\n\n uint256[] memory _values = _proposal.values;\n address[] memory _targets = _proposal.targets;\n bytes32[] memory _calldataHashList = new bytes32[](_proposal.calldatas.length);\n uint256[] memory _gasAmounts = _proposal.gasAmounts;\n\n for (uint256 _i; _i < _calldataHashList.length; _i++) {\n _calldataHashList[_i] = keccak256(_proposal.calldatas[_i]);\n }\n\n assembly {\n _targetsHash := keccak256(add(_targets, 32), mul(mload(_targets), 32))\n _valuesHash := keccak256(add(_values, 32), mul(mload(_values), 32))\n _calldatasHash := keccak256(add(_calldataHashList, 32), mul(mload(_calldataHashList), 32))\n _gasAmountsHash := keccak256(add(_gasAmounts, 32), mul(mload(_gasAmounts), 32))\n }\n\n return\n keccak256(\n abi.encode(\n TYPE_HASH,\n _proposal.nonce,\n _proposal.chainId,\n _proposal.expiryTimestamp,\n _targetsHash,\n _valuesHash,\n _calldatasHash,\n _gasAmountsHash\n )\n );\n }\n\n /**\n * @dev Returns whether the proposal is executable for the current chain.\n *\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\n *\n */\n function executable(ProposalDetail memory _proposal) internal view returns (bool _result) {\n return _proposal.chainId == 0 || _proposal.chainId == block.chainid;\n }\n\n /**\n * @dev Executes the proposal.\n */\n function execute(ProposalDetail memory _proposal)\n internal\n returns (bool[] memory _successCalls, bytes[] memory _returnDatas)\n {\n require(executable(_proposal), \"Proposal: query for invalid chainId\");\n _successCalls = new bool[](_proposal.targets.length);\n _returnDatas = new bytes[](_proposal.targets.length);\n for (uint256 _i = 0; _i < _proposal.targets.length; ++_i) {\n require(gasleft() > _proposal.gasAmounts[_i], \"Proposal: insufficient gas\");\n\n (_successCalls[_i], _returnDatas[_i]) = _proposal.targets[_i].call{\n value: _proposal.values[_i],\n gas: _proposal.gasAmounts[_i]\n }(_proposal.calldatas[_i]);\n }\n }\n}\n" - }, - "contracts/libraries/GlobalProposal.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Proposal.sol\";\n\nlibrary GlobalProposal {\n enum TargetOption {\n RoninTrustedOrganizationContract,\n GatewayContract\n }\n\n struct GlobalProposalDetail {\n // Nonce to make sure proposals are executed in order\n uint256 nonce;\n uint256 expiryTimestamp;\n TargetOption[] targetOptions;\n uint256[] values;\n bytes[] calldatas;\n uint256[] gasAmounts;\n }\n\n // keccak256(\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\");\n bytes32 public constant TYPE_HASH = 0x1463f426c05aff2c1a7a0957a71c9898bc8b47142540538e79ee25ee91141350;\n\n /**\n * @dev Returns struct hash of the proposal.\n */\n function hash(GlobalProposalDetail memory _proposal) internal pure returns (bytes32) {\n bytes32 _targetsHash;\n bytes32 _valuesHash;\n bytes32 _calldatasHash;\n bytes32 _gasAmountsHash;\n\n uint256[] memory _values = _proposal.values;\n TargetOption[] memory _targets = _proposal.targetOptions;\n bytes32[] memory _calldataHashList = new bytes32[](_proposal.calldatas.length);\n uint256[] memory _gasAmounts = _proposal.gasAmounts;\n\n for (uint256 _i; _i < _calldataHashList.length; _i++) {\n _calldataHashList[_i] = keccak256(_proposal.calldatas[_i]);\n }\n\n assembly {\n _targetsHash := keccak256(add(_targets, 32), mul(mload(_targets), 32))\n _valuesHash := keccak256(add(_values, 32), mul(mload(_values), 32))\n _calldatasHash := keccak256(add(_calldataHashList, 32), mul(mload(_calldataHashList), 32))\n _gasAmountsHash := keccak256(add(_gasAmounts, 32), mul(mload(_gasAmounts), 32))\n }\n\n return\n keccak256(\n abi.encode(\n TYPE_HASH,\n _proposal.nonce,\n _proposal.expiryTimestamp,\n _targetsHash,\n _valuesHash,\n _calldatasHash,\n _gasAmountsHash\n )\n );\n }\n\n /**\n * @dev Converts into the normal proposal.\n */\n function into_proposal_detail(\n GlobalProposalDetail memory _proposal,\n address _roninTrustedOrganizationContract,\n address _gatewayContract\n ) internal pure returns (Proposal.ProposalDetail memory _detail) {\n _detail.nonce = _proposal.nonce;\n _detail.expiryTimestamp = _proposal.expiryTimestamp;\n _detail.chainId = 0;\n _detail.targets = new address[](_proposal.targetOptions.length);\n _detail.values = _proposal.values;\n _detail.calldatas = _proposal.calldatas;\n _detail.gasAmounts = _proposal.gasAmounts;\n\n for (uint256 _i; _i < _proposal.targetOptions.length; _i++) {\n if (_proposal.targetOptions[_i] == TargetOption.GatewayContract) {\n _detail.targets[_i] = _gatewayContract;\n } else if (_proposal.targetOptions[_i] == TargetOption.RoninTrustedOrganizationContract) {\n _detail.targets[_i] = _roninTrustedOrganizationContract;\n } else {\n revert(\"GlobalProposal: unsupported target\");\n }\n }\n }\n}\n" - }, - "contracts/libraries/Ballot.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\n\nlibrary Ballot {\n using ECDSA for bytes32;\n\n enum VoteType {\n For,\n Against\n }\n\n // keccak256(\"Ballot(bytes32 proposalHash,uint8 support)\");\n bytes32 public constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\n\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32) {\n return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\n }\n}\n" - }, - "contracts/interfaces/consumers/ChainTypeConsumer.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface ChainTypeConsumer {\n enum ChainType {\n RoninChain,\n Mainchain\n }\n}\n" - }, - "contracts/interfaces/consumers/SignatureConsumer.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface SignatureConsumer {\n struct Signature {\n uint8 v;\n bytes32 r;\n bytes32 s;\n }\n}\n" - }, - "contracts/interfaces/collections/IHasRoninTrustedOrganizationContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasRoninTrustedOrganizationContract is IHasContract {\n /// @dev Emitted when the ronin trusted organization contract is updated.\n event RoninTrustedOrganizationContractUpdated(address);\n\n /// @dev Error of method caller must be Ronin trusted org contract.\n error ErrCallerMustBeRoninTrustedOrgContract();\n\n /**\n * @dev Returns the ronin trusted organization contract.\n */\n function roninTrustedOrganizationContract() external view returns (address);\n\n /**\n * @dev Sets the ronin trusted organization contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `RoninTrustedOrganizationContractUpdated`.\n *\n */\n function setRoninTrustedOrganizationContract(address) external;\n}\n" - }, - "contracts/ronin/RoninGovernanceAdmin.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../extensions/isolated-governance/bridge-operator-governance/BOsGovernanceProposal.sol\";\nimport \"../extensions/sequential-governance/GovernanceProposal.sol\";\nimport \"../extensions/collections/HasValidatorContract.sol\";\nimport \"../extensions/GovernanceAdmin.sol\";\nimport \"../libraries/EmergencyExitBallot.sol\";\nimport \"../interfaces/IRoninGovernanceAdmin.sol\";\n\ncontract RoninGovernanceAdmin is\n IRoninGovernanceAdmin,\n GovernanceAdmin,\n GovernanceProposal,\n BOsGovernanceProposal,\n HasValidatorContract\n{\n using Proposal for Proposal.ProposalDetail;\n\n /// @dev Mapping from request hash => emergency poll\n mapping(bytes32 => IsolatedVote) internal _emergencyExitPoll;\n\n modifier onlyGovernor() {\n require(_getWeight(msg.sender) > 0, \"RoninGovernanceAdmin: sender is not governor\");\n _;\n }\n\n constructor(\n uint256 _roninChainId,\n address _roninTrustedOrganizationContract,\n address _bridgeContract,\n address _validatorContract,\n uint256 _proposalExpiryDuration\n ) GovernanceAdmin(_roninChainId, _roninTrustedOrganizationContract, _bridgeContract, _proposalExpiryDuration) {\n _setValidatorContract(_validatorContract);\n }\n\n /**\n * @inheritdoc IHasValidatorContract\n */\n function setValidatorContract(address _addr) external override onlySelfCall {\n require(_addr.code.length > 0, \"RoninGovernanceAdmin: set to non-contract\");\n _setValidatorContract(_addr);\n }\n\n /**\n * @dev Returns the voted signatures for the proposals.\n *\n * Note: The signatures can be empty in case the proposal is voted on the current network.\n *\n */\n function getProposalSignatures(uint256 _chainId, uint256 _round)\n external\n view\n returns (\n address[] memory _voters,\n Ballot.VoteType[] memory _supports,\n Signature[] memory _signatures\n )\n {\n ProposalVote storage _vote = vote[_chainId][_round];\n\n uint256 _forLength = _vote.forVoteds.length;\n uint256 _againstLength = _vote.againstVoteds.length;\n uint256 _voterLength = _forLength + _againstLength;\n\n _supports = new Ballot.VoteType[](_voterLength);\n _signatures = new Signature[](_voterLength);\n _voters = new address[](_voterLength);\n for (uint256 _i; _i < _forLength; _i++) {\n _supports[_i] = Ballot.VoteType.For;\n _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]];\n _voters[_i] = _vote.forVoteds[_i];\n }\n for (uint256 _i; _i < _againstLength; _i++) {\n _supports[_i + _forLength] = Ballot.VoteType.Against;\n _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]];\n _voters[_i + _forLength] = _vote.againstVoteds[_i];\n }\n }\n\n /**\n * @dev Returns the voted signatures for bridge operators at a specific period.\n *\n * Note: Does not verify whether the voter casted vote for the proposal and the returned signature can be empty.\n * Please consider filtering for empty signatures after calling this function.\n *\n */\n function getBridgeOperatorVotingSignatures(uint256 _period, uint256 _epoch)\n external\n view\n returns (address[] memory _voters, Signature[] memory _signatures)\n {\n VotingSignature storage _info = _bridgeVoterSig[_period][_epoch];\n _voters = _info.voters;\n _signatures = new Signature[](_voters.length);\n for (uint _i; _i < _voters.length; _i++) {\n _signatures[_i] = _info.signatureOf[_voters[_i]];\n }\n }\n\n /**\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\n */\n function proposalVoted(\n uint256 _chainId,\n uint256 _round,\n address _voter\n ) external view returns (bool) {\n return _voted(vote[_chainId][_round], _voter);\n }\n\n /**\n * @dev Returns whether the voter `_voter` casted vote for bridge operators at a specific period.\n */\n function bridgeOperatorsVoted(\n uint256 _period,\n uint256 _epoch,\n address _voter\n ) external view returns (bool) {\n return _voted(_vote[_period][_epoch], _voter);\n }\n\n /**\n * @dev Returns whether the voter casted vote for emergency exit poll.\n */\n function emergencyPollVoted(bytes32 _voteHash, address _voter) external view returns (bool) {\n return _voted(_emergencyExitPoll[_voteHash], _voter);\n }\n\n /**\n * @dev See `CoreGovernance-_proposeProposal`.\n *\n * Requirements:\n * - The method caller is governor.\n *\n */\n function propose(\n uint256 _chainId,\n uint256 _expiryTimestamp,\n address[] calldata _targets,\n uint256[] calldata _values,\n bytes[] calldata _calldatas,\n uint256[] calldata _gasAmounts\n ) external onlyGovernor {\n _proposeProposal(_chainId, _expiryTimestamp, _targets, _values, _calldatas, _gasAmounts, msg.sender);\n }\n\n /**\n * @dev See `GovernanceProposal-_proposeProposalStructAndCastVotes`.\n *\n * Requirements:\n * - The method caller is governor.\n * - The proposal is for the current network.\n *\n */\n function proposeProposalStructAndCastVotes(\n Proposal.ProposalDetail calldata _proposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures\n ) external onlyGovernor {\n _proposeProposalStructAndCastVotes(_proposal, _supports, _signatures, DOMAIN_SEPARATOR, msg.sender);\n }\n\n /**\n * @dev Proposes and casts vote for a proposal on the current network.\n *\n * Requirements:\n * - The method caller is governor.\n * - The proposal is for the current network.\n *\n */\n function proposeProposalForCurrentNetwork(\n uint256 _expiryTimestamp,\n address[] calldata _targets,\n uint256[] calldata _values,\n bytes[] calldata _calldatas,\n uint256[] calldata _gasAmounts,\n Ballot.VoteType _support\n ) external onlyGovernor {\n address _voter = msg.sender;\n Proposal.ProposalDetail memory _proposal = _proposeProposal(\n block.chainid,\n _expiryTimestamp,\n _targets,\n _values,\n _calldatas,\n _gasAmounts,\n _voter\n );\n _castProposalVoteForCurrentNetwork(_voter, _proposal, _support);\n }\n\n /**\n * @dev Casts vote for a proposal on the current network.\n *\n * Requirements:\n * - The method caller is governor.\n *\n */\n function castProposalVoteForCurrentNetwork(Proposal.ProposalDetail calldata _proposal, Ballot.VoteType _support)\n external\n onlyGovernor\n {\n _castProposalVoteForCurrentNetwork(msg.sender, _proposal, _support);\n }\n\n /**\n * @dev See `GovernanceProposal-_castProposalBySignatures`.\n */\n function castProposalBySignatures(\n Proposal.ProposalDetail calldata _proposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures\n ) external {\n _castProposalBySignatures(_proposal, _supports, _signatures, DOMAIN_SEPARATOR);\n }\n\n /**\n * @dev See `CoreGovernance-_proposeGlobal`.\n *\n * Requirements:\n * - The method caller is governor.\n *\n */\n function proposeGlobal(\n uint256 _expiryTimestamp,\n GlobalProposal.TargetOption[] calldata _targetOptions,\n uint256[] calldata _values,\n bytes[] calldata _calldatas,\n uint256[] calldata _gasAmounts\n ) external onlyGovernor {\n _proposeGlobal(\n _expiryTimestamp,\n _targetOptions,\n _values,\n _calldatas,\n _gasAmounts,\n roninTrustedOrganizationContract(),\n bridgeContract(),\n msg.sender\n );\n }\n\n /**\n * @dev See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`.\n *\n * Requirements:\n * - The method caller is governor.\n *\n */\n function proposeGlobalProposalStructAndCastVotes(\n GlobalProposal.GlobalProposalDetail calldata _globalProposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures\n ) external onlyGovernor {\n _proposeGlobalProposalStructAndCastVotes(\n _globalProposal,\n _supports,\n _signatures,\n DOMAIN_SEPARATOR,\n roninTrustedOrganizationContract(),\n bridgeContract(),\n msg.sender\n );\n }\n\n /**\n * @dev See `GovernanceProposal-_castGlobalProposalBySignatures`.\n */\n function castGlobalProposalBySignatures(\n GlobalProposal.GlobalProposalDetail calldata _globalProposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures\n ) external {\n _castGlobalProposalBySignatures(\n _globalProposal,\n _supports,\n _signatures,\n DOMAIN_SEPARATOR,\n roninTrustedOrganizationContract(),\n bridgeContract()\n );\n }\n\n /**\n * @dev See `CoreGovernance-_deleteExpiredProposal`\n */\n function deleteExpired(uint256 chainId, uint256 round) external {\n _deleteExpiredVotingRound(chainId, round);\n }\n\n /**\n * @dev See `BOsGovernanceProposal-_castVotesBySignatures`.\n */\n function voteBridgeOperatorsBySignatures(\n BridgeOperatorsBallot.BridgeOperatorSet calldata _ballot,\n Signature[] calldata _signatures\n ) external {\n _castVotesBySignatures(_ballot, _signatures, _getMinimumVoteWeight(), DOMAIN_SEPARATOR);\n IsolatedVote storage _v = _vote[_ballot.period][_ballot.epoch];\n if (_v.status == VoteStatus.Approved) {\n _lastSyncedBridgeOperatorSetInfo = _ballot;\n emit BridgeOperatorsApproved(_ballot.period, _ballot.epoch, _ballot.operators);\n _v.status = VoteStatus.Executed;\n }\n }\n\n /**\n * @inheritdoc IRoninGovernanceAdmin\n */\n function createEmergencyExitPoll(\n address _consensusAddr,\n address _recipientAfterUnlockedFund,\n uint256 _requestedAt,\n uint256 _expiredAt\n ) external onlyValidatorContract {\n bytes32 _hash = EmergencyExitBallot.hash(_consensusAddr, _recipientAfterUnlockedFund, _requestedAt, _expiredAt);\n IsolatedVote storage _v = _emergencyExitPoll[_hash];\n _v.createdAt = block.timestamp;\n _v.expiredAt = _expiredAt;\n emit EmergencyExitPollCreated(_hash, _consensusAddr, _recipientAfterUnlockedFund, _requestedAt, _expiredAt);\n }\n\n /**\n * @dev Votes for an emergency exit. Executes to unlock fund for the emergency exit's requester.\n *\n * Requirements:\n * - The voter is governor.\n * - The voting is existent.\n * - The voting is not expired yet.\n *\n */\n function voteEmergencyExit(\n bytes32 _voteHash,\n address _consensusAddr,\n address _recipientAfterUnlockedFund,\n uint256 _requestedAt,\n uint256 _expiredAt\n ) external {\n address _voter = msg.sender;\n uint256 _weight = _getWeight(_voter);\n require(_weight > 0, \"RoninGovernanceAdmin: sender is not governor\");\n\n bytes32 _hash = EmergencyExitBallot.hash(_consensusAddr, _recipientAfterUnlockedFund, _requestedAt, _expiredAt);\n require(_voteHash == _hash, \"RoninGovernanceAdmin: invalid vote hash\");\n\n IsolatedVote storage _v = _emergencyExitPoll[_hash];\n require(_v.createdAt > 0, \"RoninGovernanceAdmin: query for non-existent vote\");\n require(_v.status != VoteStatus.Expired, \"RoninGovernanceAdmin: query for expired vote\");\n\n VoteStatus _stt = _castVote(_v, _voter, _weight, _getMinimumVoteWeight(), _hash);\n if (_stt == VoteStatus.Approved) {\n _execReleaseLockedFundForEmergencyExitRequest(_consensusAddr, _recipientAfterUnlockedFund);\n emit EmergencyExitPollApproved(_hash);\n _v.status = VoteStatus.Executed;\n } else if (_stt == VoteStatus.Expired) {\n emit EmergencyExitPollExpired(_hash);\n }\n }\n\n /**\n * @inheritdoc GovernanceProposal\n */\n function _getWeight(address _governor) internal view virtual override returns (uint256) {\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\n abi.encodeWithSelector(\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\n 0x4bb5274a,\n abi.encodeWithSelector(IRoninTrustedOrganization.getGovernorWeight.selector, _governor)\n )\n );\n require(_success, \"GovernanceAdmin: proxy call `getGovernorWeight(address)` failed\");\n return abi.decode(_returndata, (uint256));\n }\n\n /**\n * @inheritdoc BOsGovernanceProposal\n */\n function _getBridgeVoterWeight(address _governor) internal view virtual override returns (uint256) {\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\n abi.encodeWithSelector(\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\n 0x4bb5274a,\n abi.encodeWithSelector(IRoninTrustedOrganization.getBridgeVoterWeight.selector, _governor)\n )\n );\n require(_success, \"GovernanceAdmin: proxy call `getBridgeVoterWeight(address)` failed\");\n return abi.decode(_returndata, (uint256));\n }\n\n /**\n * @dev Trigger function from validator contract to unlock fund for emeregency exit request.\n */\n function _execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address _recipientAfterUnlockedFund)\n internal\n virtual\n {\n (bool _success, ) = validatorContract().call(\n abi.encodeWithSelector(\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\n 0x4bb5274a,\n abi.encodeWithSelector(\n _validatorContract.execReleaseLockedFundForEmergencyExitRequest.selector,\n _consensusAddr,\n _recipientAfterUnlockedFund\n )\n )\n );\n require(\n _success,\n \"GovernanceAdmin: proxy call `execReleaseLockedFundForEmergencyExitRequest(address,address)` failed\"\n );\n }\n\n /**\n * @dev See `CoreGovernance-_getChainType`.\n */\n function _getChainType() internal pure override returns (ChainType) {\n return ChainType.RoninChain;\n }\n\n /**\n * @dev See `castProposalVoteForCurrentNetwork`.\n */\n function _castProposalVoteForCurrentNetwork(\n address _voter,\n Proposal.ProposalDetail memory _proposal,\n Ballot.VoteType _support\n ) internal {\n require(_proposal.chainId == block.chainid, \"RoninGovernanceAdmin: invalid chain id\");\n require(\n vote[_proposal.chainId][_proposal.nonce].hash == _proposal.hash(),\n \"RoninGovernanceAdmin: cast vote for invalid proposal\"\n );\n\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\n uint256 _minimumAgainstVoteWeight = _getTotalWeights() - _minimumForVoteWeight + 1;\n Signature memory _emptySignature;\n _castVote(\n _proposal,\n _support,\n _minimumForVoteWeight,\n _minimumAgainstVoteWeight,\n _voter,\n _emptySignature,\n _getWeight(_voter)\n );\n }\n}\n" - }, - "contracts/extensions/isolated-governance/bridge-operator-governance/BOsGovernanceProposal.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../../extensions/isolated-governance/IsolatedGovernance.sol\";\nimport \"../../../interfaces/consumers/SignatureConsumer.sol\";\nimport \"../../../libraries/BridgeOperatorsBallot.sol\";\nimport \"../../../interfaces/IRoninGovernanceAdmin.sol\";\n\nabstract contract BOsGovernanceProposal is SignatureConsumer, IsolatedGovernance, IRoninGovernanceAdmin {\n struct VotingSignature {\n mapping(address => Signature) signatureOf;\n address[] voters;\n }\n\n /// @dev The last the brige operator set info.\n BridgeOperatorsBallot.BridgeOperatorSet internal _lastSyncedBridgeOperatorSetInfo;\n /// @dev Mapping from period index => epoch index => bridge operators vote\n mapping(uint256 => mapping(uint256 => IsolatedVote)) internal _vote;\n /// @dev Mapping from bridge voter address => last block that the address voted\n mapping(address => uint256) internal _lastVotedBlock;\n /// @dev Mapping from period index => epoch index => bridge voter signatures\n mapping(uint256 => mapping(uint256 => VotingSignature)) internal _bridgeVoterSig;\n\n /**\n * @inheritdoc IRoninGovernanceAdmin\n */\n function lastVotedBlock(address _bridgeVoter) external view returns (uint256) {\n return _lastVotedBlock[_bridgeVoter];\n }\n\n /**\n * @inheritdoc IRoninGovernanceAdmin\n */\n function lastSyncedBridgeOperatorSetInfo() external view returns (BridgeOperatorsBallot.BridgeOperatorSet memory) {\n return _lastSyncedBridgeOperatorSetInfo;\n }\n\n /**\n * @dev Votes for a set of bridge operators by signatures.\n *\n * Requirements:\n * - The period of voting is larger than the last synced period.\n * - The arrays are not empty.\n * - The signature signers are in order.\n *\n */\n function _castVotesBySignatures(\n BridgeOperatorsBallot.BridgeOperatorSet calldata _ballot,\n Signature[] calldata _signatures,\n uint256 _minimumVoteWeight,\n bytes32 _domainSeperator\n ) internal {\n require(\n _ballot.period >= _lastSyncedBridgeOperatorSetInfo.period &&\n _ballot.epoch >= _lastSyncedBridgeOperatorSetInfo.epoch,\n \"BOsGovernanceProposal: query for outdated bridge operator set\"\n );\n BridgeOperatorsBallot.verifyBallot(_ballot);\n require(_signatures.length > 0, \"BOsGovernanceProposal: invalid array length\");\n\n address _signer;\n address _lastSigner;\n bytes32 _hash = BridgeOperatorsBallot.hash(_ballot);\n bytes32 _digest = ECDSA.toTypedDataHash(_domainSeperator, _hash);\n IsolatedVote storage _v = _vote[_ballot.period][_ballot.epoch];\n VotingSignature storage _info = _bridgeVoterSig[_ballot.period][_ballot.epoch];\n bool _hasValidVotes;\n\n for (uint256 _i = 0; _i < _signatures.length; _i++) {\n // Avoids stack too deeps\n {\n Signature calldata _sig = _signatures[_i];\n _signer = ECDSA.recover(_digest, _sig.v, _sig.r, _sig.s);\n require(_lastSigner < _signer, \"BOsGovernanceProposal: invalid signer order\");\n _lastSigner = _signer;\n }\n\n uint256 _weight = _getBridgeVoterWeight(_signer);\n if (_weight > 0) {\n _hasValidVotes = true;\n _lastVotedBlock[_signer] = block.number;\n _info.signatureOf[_signer] = _signatures[_i];\n _info.voters.push(_signer);\n if (_castVote(_v, _signer, _weight, _minimumVoteWeight, _hash) == VoteStatus.Approved) {\n return;\n }\n }\n }\n\n require(_hasValidVotes, \"BOsGovernanceProposal: invalid signatures\");\n }\n\n /**\n * @dev Returns the weight of a bridge voter.\n */\n function _getBridgeVoterWeight(address _bridgeVoter) internal view virtual returns (uint256);\n}\n" - }, - "contracts/extensions/sequential-governance/GovernanceProposal.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./CoreGovernance.sol\";\n\nabstract contract GovernanceProposal is CoreGovernance {\n using Proposal for Proposal.ProposalDetail;\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\n\n /**\n * @dev Casts votes by signatures.\n *\n * Note: This method does not verify the proposal hash with the vote hash. Please consider checking it before.\n *\n */\n function _castVotesBySignatures(\n Proposal.ProposalDetail memory _proposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures,\n bytes32 _forDigest,\n bytes32 _againstDigest\n ) internal {\n require(_supports.length > 0 && _supports.length == _signatures.length, \"GovernanceProposal: invalid array length\");\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\n uint256 _minimumAgainstVoteWeight = _getTotalWeights() - _minimumForVoteWeight + 1;\n\n address _lastSigner;\n address _signer;\n Signature calldata _sig;\n bool _hasValidVotes;\n for (uint256 _i; _i < _signatures.length; _i++) {\n _sig = _signatures[_i];\n\n if (_supports[_i] == Ballot.VoteType.For) {\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\n } else if (_supports[_i] == Ballot.VoteType.Against) {\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\n } else {\n revert(\"GovernanceProposal: query for unsupported vote type\");\n }\n\n require(_lastSigner < _signer, \"GovernanceProposal: invalid order\");\n _lastSigner = _signer;\n\n uint256 _weight = _getWeight(_signer);\n if (_weight > 0) {\n _hasValidVotes = true;\n if (\n _castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)\n ) {\n return;\n }\n }\n }\n\n require(_hasValidVotes, \"GovernanceProposal: invalid signatures\");\n }\n\n /**\n * @dev Proposes a proposal struct and casts votes by signature.\n */\n function _proposeProposalStructAndCastVotes(\n Proposal.ProposalDetail calldata _proposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures,\n bytes32 _domainSeparator,\n address _creator\n ) internal {\n _proposeProposalStruct(_proposal, _creator);\n bytes32 _proposalHash = _proposal.hash();\n _castVotesBySignatures(\n _proposal,\n _supports,\n _signatures,\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)),\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against))\n );\n }\n\n /**\n * @dev Proposes a proposal struct and casts votes by signature.\n */\n function _castProposalBySignatures(\n Proposal.ProposalDetail calldata _proposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures,\n bytes32 _domainSeparator\n ) internal {\n bytes32 _proposalHash = _proposal.hash();\n require(\n vote[_proposal.chainId][_proposal.nonce].hash == _proposalHash,\n \"GovernanceAdmin: cast vote for invalid proposal\"\n );\n _castVotesBySignatures(\n _proposal,\n _supports,\n _signatures,\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)),\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against))\n );\n }\n\n /**\n * @dev Proposes and votes by signature.\n */\n function _proposeGlobalProposalStructAndCastVotes(\n GlobalProposal.GlobalProposalDetail calldata _globalProposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures,\n bytes32 _domainSeparator,\n address _roninTrustedOrganizationContract,\n address _gatewayContract,\n address _creator\n ) internal returns (Proposal.ProposalDetail memory _proposal) {\n (_proposal, ) = _proposeGlobalStruct(\n _globalProposal,\n _roninTrustedOrganizationContract,\n _gatewayContract,\n _creator\n );\n bytes32 _globalProposalHash = _globalProposal.hash();\n _castVotesBySignatures(\n _proposal,\n _supports,\n _signatures,\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.For)),\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.Against))\n );\n }\n\n /**\n * @dev Proposes a global proposal struct and casts votes by signature.\n */\n function _castGlobalProposalBySignatures(\n GlobalProposal.GlobalProposalDetail calldata _globalProposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures,\n bytes32 _domainSeparator,\n address _roninTrustedOrganizationContract,\n address _gatewayContract\n ) internal {\n Proposal.ProposalDetail memory _proposal = _globalProposal.into_proposal_detail(\n _roninTrustedOrganizationContract,\n _gatewayContract\n );\n bytes32 _globalProposalHash = _globalProposal.hash();\n require(vote[0][_proposal.nonce].hash == _proposal.hash(), \"GovernanceAdmin: cast vote for invalid proposal\");\n _castVotesBySignatures(\n _proposal,\n _supports,\n _signatures,\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.For)),\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.Against))\n );\n }\n\n /**\n * @dev Returns the weight of a governor.\n */\n function _getWeight(address _governor) internal view virtual returns (uint256);\n}\n" - }, - "contracts/libraries/EmergencyExitBallot.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\n\nlibrary EmergencyExitBallot {\n // keccak256(\"EmergencyExitBallot(address consensusAddress,address recipientAfterUnlockedFund,uint256 requestedAt,uint256 expiredAt)\");\n bytes32 public constant EMERGENCY_EXIT_BALLOT_TYPEHASH =\n 0x697acba4deaf1a718d8c2d93e42860488cb7812696f28ca10eed17bac41e7027;\n\n /**\n * @dev Returns hash of the ballot.\n */\n function hash(\n address _consensusAddress,\n address _recipientAfterUnlockedFund,\n uint256 _requestedAt,\n uint256 _expiredAt\n ) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n EMERGENCY_EXIT_BALLOT_TYPEHASH,\n _consensusAddress,\n _recipientAfterUnlockedFund,\n _requestedAt,\n _expiredAt\n )\n );\n }\n}\n" - }, - "contracts/interfaces/IRoninGovernanceAdmin.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../libraries/BridgeOperatorsBallot.sol\";\n\ninterface IRoninGovernanceAdmin {\n /// @dev Emitted when the bridge operators are approved.\n event BridgeOperatorsApproved(uint256 _period, uint256 _epoch, address[] _operators);\n /// @dev Emitted when an emergency exit poll is created.\n event EmergencyExitPollCreated(\n bytes32 _voteHash,\n address _consensusAddr,\n address _recipientAfterUnlockedFund,\n uint256 _requestedAt,\n uint256 _expiredAt\n );\n /// @dev Emitted when an emergency exit poll is approved.\n event EmergencyExitPollApproved(bytes32 _voteHash);\n /// @dev Emitted when an emergency exit poll is expired.\n event EmergencyExitPollExpired(bytes32 _voteHash);\n\n /**\n * @dev Returns the last voted block of the bridge voter.\n */\n function lastVotedBlock(address _bridgeVoter) external view returns (uint256);\n\n /**\n * @dev Returns the synced bridge operator set info.\n */\n function lastSyncedBridgeOperatorSetInfo()\n external\n view\n returns (BridgeOperatorsBallot.BridgeOperatorSet memory _bridgeOperatorSetInfo);\n\n /**\n * @dev Create a vote to agree that an emergency exit is valid and should return the locked funds back.a\n *\n * Requirements:\n * - The method caller is validator contract.\n *\n */\n function createEmergencyExitPoll(\n address _consensusAddr,\n address _recipientAfterUnlockedFund,\n uint256 _requestedAt,\n uint256 _expiredAt\n ) external;\n}\n" - }, - "contracts/libraries/BridgeOperatorsBallot.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\n\nlibrary BridgeOperatorsBallot {\n struct BridgeOperatorSet {\n uint256 period;\n uint256 epoch;\n address[] operators;\n }\n\n // keccak256(\"BridgeOperatorsBallot(uint256 period,uint256 epoch,address[] operators)\");\n bytes32 public constant BRIDGE_OPERATORS_BALLOT_TYPEHASH =\n 0xd679a49e9e099fa9ed83a5446aaec83e746b03ec6723d6f5efb29d37d7f0b78a;\n\n /**\n * @dev Verifies whether the ballot is valid or not.\n *\n * Requirements:\n * - The ballot is not for an empty operator set.\n * - The operator address list is in order.\n *\n */\n function verifyBallot(BridgeOperatorSet calldata _ballot) internal pure {\n require(_ballot.operators.length > 0, \"BridgeOperatorsBallot: invalid array length\");\n address _addr = _ballot.operators[0];\n for (uint _i = 1; _i < _ballot.operators.length; _i++) {\n require(_addr < _ballot.operators[_i], \"BridgeOperatorsBallot: invalid order of bridge operators\");\n _addr = _ballot.operators[_i];\n }\n }\n\n /**\n * @dev Returns hash of the ballot.\n */\n function hash(BridgeOperatorSet calldata _ballot) internal pure returns (bytes32) {\n bytes32 _operatorsHash;\n address[] memory _operators = _ballot.operators;\n\n assembly {\n _operatorsHash := keccak256(add(_operators, 32), mul(mload(_operators), 32))\n }\n\n return keccak256(abi.encode(BRIDGE_OPERATORS_BALLOT_TYPEHASH, _ballot.period, _ballot.epoch, _operatorsHash));\n }\n}\n" - }, - "contracts/ronin/validator/EmergencyExit.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../extensions/RONTransferHelper.sol\";\nimport \"../../interfaces/IRoninGovernanceAdmin.sol\";\nimport \"../../interfaces/validator/IEmergencyExit.sol\";\nimport \"./storage-fragments/CommonStorage.sol\";\nimport \"./CandidateManager.sol\";\n\nabstract contract EmergencyExit is IEmergencyExit, RONTransferHelper, CandidateManager, CommonStorage {\n /**\n * @inheritdoc IEmergencyExit\n */\n function emergencyExitLockedAmount() external view returns (uint256) {\n return _emergencyExitLockedAmount;\n }\n\n /**\n * @inheritdoc IEmergencyExit\n */\n function emergencyExpiryDuration() external view returns (uint256) {\n return _emergencyExpiryDuration;\n }\n\n /**\n * @inheritdoc IEmergencyExit\n */\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external onlyStakingContract {\n EmergencyExitInfo storage _info = _exitInfo[_consensusAddr];\n if (_info.recyclingAt != 0) revert ErrAlreadyRequestedEmergencyExit();\n\n uint256 _revokingTimestamp = block.timestamp + _secLeftToRevoke;\n _setRevokingTimestamp(_candidateInfo[_consensusAddr], _revokingTimestamp);\n _emergencyExitJailedTimestamp[_consensusAddr] = _revokingTimestamp;\n\n uint256 _deductedAmount = _stakingContract.execDeductStakingAmount(_consensusAddr, _emergencyExitLockedAmount);\n if (_deductedAmount > 0) {\n uint256 _recyclingAt = block.timestamp + _emergencyExpiryDuration;\n _lockedConsensusList.push(_consensusAddr);\n _info.lockedAmount = _deductedAmount;\n _info.recyclingAt = _recyclingAt;\n IRoninGovernanceAdmin(_getAdmin()).createEmergencyExitPoll(\n _consensusAddr,\n _candidateInfo[_consensusAddr].treasuryAddr,\n block.timestamp,\n _recyclingAt\n );\n }\n emit EmergencyExitRequested(_consensusAddr, _deductedAmount);\n }\n\n /**\n * @inheritdoc IEmergencyExit\n */\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external onlyAdmin {\n _setEmergencyExitLockedAmount(_emergencyExitLockedAmount);\n }\n\n /**\n * @inheritdoc IEmergencyExit\n */\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external onlyAdmin {\n _setEmergencyExpiryDuration(_emergencyExpiryDuration);\n }\n\n /**\n * @inheritdoc IEmergencyExit\n */\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient)\n external\n onlyAdmin\n {\n if (_exitInfo[_consensusAddr].recyclingAt == 0) {\n return;\n }\n\n uint256 _length = _lockedConsensusList.length;\n uint256 _index = _length;\n\n for (uint _i = 0; _i < _length; _i++) {\n if (_lockedConsensusList[_i] == _consensusAddr) {\n _index = _i;\n break;\n }\n }\n\n // The locked amount might be recycled\n if (_index == _length) {\n return;\n }\n\n uint256 _amount = _exitInfo[_consensusAddr].lockedAmount;\n if (_amount > 0) {\n delete _exitInfo[_consensusAddr];\n if (_length > 1) {\n _lockedConsensusList[_index] = _lockedConsensusList[_length - 1];\n }\n _lockedConsensusList.pop();\n\n _lockedFundReleased[_consensusAddr] = true;\n if (_unsafeSendRON(_recipient, _amount, 3500)) {\n emit EmergencyExitLockedFundReleased(_consensusAddr, _recipient, _amount);\n return;\n }\n\n emit EmergencyExitLockedFundReleasingFailed(_consensusAddr, _recipient, _amount, address(this).balance);\n }\n }\n\n /**\n * @dev Tries to recycle the locked funds from emergency exit requests.\n */\n function _tryRecycleLockedFundsFromEmergencyExits() internal {\n uint256 _length = _lockedConsensusList.length;\n\n uint256 _i;\n address _addr;\n EmergencyExitInfo storage _info;\n\n while (_i < _length) {\n _addr = _lockedConsensusList[_i];\n _info = _exitInfo[_addr];\n\n if (_info.recyclingAt <= block.timestamp) {\n _totalDeprecatedReward += _info.lockedAmount;\n\n delete _exitInfo[_addr];\n if (--_length > 0) {\n _lockedConsensusList[_i] = _lockedConsensusList[_length];\n }\n _lockedConsensusList.pop();\n continue;\n }\n\n _i++;\n }\n }\n\n /**\n * @dev Override `CandidateManager-_emergencyExitLockedFundReleased`.\n */\n function _emergencyExitLockedFundReleased(address _consensusAddr) internal virtual override returns (bool) {\n return _lockedFundReleased[_consensusAddr];\n }\n\n /**\n * @dev Override `CandidateManager-_removeCandidate`.\n */\n function _removeCandidate(address _consensusAddr) internal override {\n delete _lockedFundReleased[_consensusAddr];\n super._removeCandidate(_consensusAddr);\n }\n\n /**\n * @dev Override `ValidatorInfoStorage-_bridgeOperatorOf`.\n */\n function _bridgeOperatorOf(address _consensusAddr)\n internal\n view\n virtual\n override(CandidateManager, ValidatorInfoStorage)\n returns (address)\n {\n return CandidateManager._bridgeOperatorOf(_consensusAddr);\n }\n\n /**\n * @dev See `setEmergencyExitLockedAmount.\n */\n function _setEmergencyExitLockedAmount(uint256 _amount) internal {\n _emergencyExitLockedAmount = _amount;\n emit EmergencyExitLockedAmountUpdated(_amount);\n }\n\n /**\n * @dev See `setEmergencyExpiryDuration`.\n */\n function _setEmergencyExpiryDuration(uint256 _duration) internal {\n _emergencyExpiryDuration = _duration;\n emit EmergencyExpiryDurationUpdated(_duration);\n }\n}\n" - }, - "contracts/ronin/validator/storage-fragments/CommonStorage.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../../interfaces/validator/info-fragments/ICommonInfo.sol\";\nimport \"./JailingStorage.sol\";\nimport \"./TimingStorage.sol\";\nimport \"./ValidatorInfoStorage.sol\";\n\nabstract contract CommonStorage is ICommonInfo, TimingStorage, JailingStorage, ValidatorInfoStorage {\n /// @dev Mapping from consensus address => pending reward from producing block\n mapping(address => uint256) internal _miningReward;\n /// @dev Mapping from consensus address => pending reward from delegating\n mapping(address => uint256) internal _delegatingReward;\n\n /// @dev The total reward for bridge operators\n uint256 internal _totalBridgeReward;\n /// @dev Mapping from consensus address => pending reward for being bridge operator\n mapping(address => uint256) internal _bridgeOperatingReward;\n\n /// @dev The deprecated reward that has not been withdrawn by admin\n uint256 internal _totalDeprecatedReward;\n\n /// @dev The amount of RON to lock from a consensus address.\n uint256 internal _emergencyExitLockedAmount;\n /// @dev The duration that an emergency request is expired and the fund will be recycled.\n uint256 internal _emergencyExpiryDuration;\n /// @dev The address list of consensus addresses that being locked fund.\n address[] internal _lockedConsensusList;\n /// @dev Mapping from consensus => request exist info\n mapping(address => EmergencyExitInfo) internal _exitInfo;\n /// @dev Mapping from consensus => flag indicating whether the locked fund is released\n mapping(address => bool) internal _lockedFundReleased;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[44] private ______gap;\n\n /**\n * @inheritdoc ICommonInfo\n */\n function getEmergencyExitInfo(address _consensusAddr)\n external\n view\n override\n returns (EmergencyExitInfo memory _info)\n {\n _info = _exitInfo[_consensusAddr];\n require(_info.recyclingAt > 0, \"CommonStorage: non-existent info\");\n }\n\n /**\n * @inheritdoc ICommonInfo\n */\n function totalDeprecatedReward() external view override returns (uint256) {\n return _totalDeprecatedReward;\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function epochOf(uint256 _block)\n public\n view\n virtual\n override(ITimingInfo, JailingStorage, TimingStorage)\n returns (uint256)\n {\n return TimingStorage.epochOf(_block);\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function currentPeriod() public view virtual override(ITimingInfo, JailingStorage, TimingStorage) returns (uint256) {\n return TimingStorage.currentPeriod();\n }\n}\n" - }, - "contracts/ronin/validator/CandidateManager.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../extensions/collections/HasStakingContract.sol\";\nimport \"../../extensions/consumers/PercentageConsumer.sol\";\nimport \"../../interfaces/validator/ICandidateManager.sol\";\nimport \"../../interfaces/staking/IStaking.sol\";\n\nabstract contract CandidateManager is ICandidateManager, PercentageConsumer, HasStakingContract {\n /// @dev Maximum number of validator candidate\n uint256 private _maxValidatorCandidate;\n\n /// @dev The validator candidate array\n address[] internal _candidates;\n /// @dev Mapping from candidate consensus address => bitwise negation of validator index in `_candidates`\n mapping(address => uint256) internal _candidateIndex;\n /// @dev Mapping from candidate consensus address => their info\n mapping(address => ValidatorCandidate) internal _candidateInfo;\n\n /**\n * @dev The minimum offset in day from current date to the effective date of a new commission schedule.\n * Value of 1 means the change gets affected at the beginning of the following day.\n **/\n uint256 internal _minEffectiveDaysOnwards;\n /// @dev Mapping from candidate consensus address => schedule commission change.\n mapping(address => CommissionSchedule) internal _candidateCommissionChangeSchedule;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[48] private ______gap;\n\n /**\n * @inheritdoc ICandidateManager\n */\n function maxValidatorCandidate() public view override returns (uint256) {\n return _maxValidatorCandidate;\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function minEffectiveDaysOnwards() external view override returns (uint256) {\n return _minEffectiveDaysOnwards;\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function setMaxValidatorCandidate(uint256 _number) external override onlyAdmin {\n _setMaxValidatorCandidate(_number);\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external override onlyAdmin {\n _setMinEffectiveDaysOnwards(_numOfDays);\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function execApplyValidatorCandidate(\n address _candidateAdmin,\n address _consensusAddr,\n address payable _treasuryAddr,\n address _bridgeOperatorAddr,\n uint256 _commissionRate\n ) external override onlyStakingContract {\n uint256 _length = _candidates.length;\n if (_length >= maxValidatorCandidate()) revert ErrExceedsMaxNumberOfCandidate();\n if (isValidatorCandidate(_consensusAddr)) revert ErrExistentCandidate();\n if (_commissionRate > _MAX_PERCENTAGE) revert ErrInvalidCommissionRate();\n\n for (uint _i = 0; _i < _candidates.length; _i++) {\n ValidatorCandidate storage existentInfo = _candidateInfo[_candidates[_i]];\n if (_candidateAdmin == existentInfo.admin) revert ErrExistentCandidateAdmin(_candidateAdmin);\n if (_treasuryAddr == existentInfo.treasuryAddr) revert ErrExistentTreasury(_treasuryAddr);\n if (_bridgeOperatorAddr == existentInfo.bridgeOperatorAddr) revert ErrExistentBridgeOperator(_bridgeOperatorAddr);\n }\n\n _candidateIndex[_consensusAddr] = ~_length;\n _candidates.push(_consensusAddr);\n\n ValidatorCandidate storage _info = _candidateInfo[_consensusAddr];\n _info.admin = _candidateAdmin;\n _info.consensusAddr = _consensusAddr;\n _info.treasuryAddr = _treasuryAddr;\n _info.bridgeOperatorAddr = _bridgeOperatorAddr;\n _info.commissionRate = _commissionRate;\n emit CandidateGranted(_consensusAddr, _treasuryAddr, _candidateAdmin, _bridgeOperatorAddr);\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function execRequestRenounceCandidate(address _consensusAddr, uint256 _secsLeft)\n external\n override\n onlyStakingContract\n {\n if (_isTrustedOrg(_consensusAddr)) revert ErrTrustedOrgCannotRenounce();\n\n ValidatorCandidate storage _info = _candidateInfo[_consensusAddr];\n if (_info.revokingTimestamp != 0) revert ErrAlreadyRequestedRevokingCandidate();\n _setRevokingTimestamp(_info, block.timestamp + _secsLeft);\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function execRequestUpdateCommissionRate(\n address _consensusAddr,\n uint256 _effectiveDaysOnwards,\n uint256 _commissionRate\n ) external override onlyStakingContract {\n if (_candidateCommissionChangeSchedule[_consensusAddr].effectiveTimestamp != 0) {\n revert ErrAlreadyRequestedUpdatingCommissionRate();\n }\n if (_commissionRate > _MAX_PERCENTAGE) revert ErrInvalidCommissionRate();\n if (_effectiveDaysOnwards < _minEffectiveDaysOnwards) revert ErrInvalidEffectiveDaysOnwards();\n\n CommissionSchedule storage _schedule = _candidateCommissionChangeSchedule[_consensusAddr];\n uint256 _effectiveTimestamp = ((block.timestamp / 1 days) + _effectiveDaysOnwards) * 1 days;\n _schedule.effectiveTimestamp = _effectiveTimestamp;\n _schedule.commissionRate = _commissionRate;\n\n emit CommissionRateUpdateScheduled(_consensusAddr, _effectiveTimestamp, _commissionRate);\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function isValidatorCandidate(address _addr) public view override returns (bool) {\n return _candidateIndex[_addr] != 0;\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function getCandidateInfos() external view override returns (ValidatorCandidate[] memory _list) {\n _list = new ValidatorCandidate[](_candidates.length);\n for (uint _i = 0; _i < _list.length; _i++) {\n _list[_i] = _candidateInfo[_candidates[_i]];\n }\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function getCandidateInfo(address _candidate) external view override returns (ValidatorCandidate memory) {\n if (!isValidatorCandidate(_candidate)) revert ErrNonExistentCandidate();\n return _candidateInfo[_candidate];\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function getValidatorCandidates() public view override returns (address[] memory) {\n return _candidates;\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function getCommissionChangeSchedule(address _candidate) external view override returns (CommissionSchedule memory) {\n return _candidateCommissionChangeSchedule[_candidate];\n }\n\n /**\n * @dev Removes unsastisfied candidates, the ones who have insufficient minimum candidate staking amount,\n * or the ones who requested to renounce their candidate role.\n *\n * Emits the event `CandidatesRevoked` when a candidate is revoked.\n *\n */\n function _syncCandidateSet(uint256 _nextPeriod) internal returns (address[] memory _unsatisfiedCandidates) {\n IStaking _staking = _stakingContract;\n uint256 _waitingSecsToRevoke = _staking.waitingSecsToRevoke();\n uint256 _minStakingAmount = _staking.minValidatorStakingAmount();\n uint256[] memory _selfStakings = _staking.getManySelfStakings(_candidates);\n\n uint256 _length = _candidates.length;\n uint256 _unsatisfiedCount;\n _unsatisfiedCandidates = new address[](_length);\n\n {\n uint256 _i;\n address _addr;\n ValidatorCandidate storage _info;\n while (_i < _length) {\n _addr = _candidates[_i];\n _info = _candidateInfo[_addr];\n\n // Checks for under-balance status of candidates\n bool _hasTopupDeadline = _info.topupDeadline != 0;\n if (_selfStakings[_i] < _minStakingAmount) {\n // Updates deadline on the first time unsatisfied the staking amount condition\n if (!_hasTopupDeadline) {\n uint256 _topupDeadline = block.timestamp + _waitingSecsToRevoke;\n _info.topupDeadline = _topupDeadline;\n emit CandidateTopupDeadlineUpdated(_addr, _topupDeadline);\n }\n } else if (_hasTopupDeadline) {\n // Removes the deadline if the staking amount condition is satisfied\n delete _info.topupDeadline;\n emit CandidateTopupDeadlineUpdated(_addr, 0);\n }\n\n // Removes unsastisfied candidates\n bool _revokingActivated = (_info.revokingTimestamp != 0 && _info.revokingTimestamp <= block.timestamp) ||\n _emergencyExitLockedFundReleased(_addr);\n bool _topupDeadlineMissed = _info.topupDeadline != 0 && _info.topupDeadline <= block.timestamp;\n if (_revokingActivated || _topupDeadlineMissed) {\n _selfStakings[_i] = _selfStakings[--_length];\n _unsatisfiedCandidates[_unsatisfiedCount++] = _addr;\n _removeCandidate(_addr);\n continue;\n }\n\n // Checks for schedule of commission change and updates commission rate\n uint256 _scheduleTimestamp = _candidateCommissionChangeSchedule[_addr].effectiveTimestamp;\n if (_scheduleTimestamp != 0 && _scheduleTimestamp <= block.timestamp) {\n uint256 _commisionRate = _candidateCommissionChangeSchedule[_addr].commissionRate;\n delete _candidateCommissionChangeSchedule[_addr];\n _info.commissionRate = _commisionRate;\n emit CommissionRateUpdated(_addr, _commisionRate);\n }\n\n _i++;\n }\n }\n\n if (_unsatisfiedCount > 0) {\n assembly {\n mstore(_unsatisfiedCandidates, _unsatisfiedCount)\n }\n emit CandidatesRevoked(_unsatisfiedCandidates);\n _staking.execDeprecatePools(_unsatisfiedCandidates, _nextPeriod);\n }\n }\n\n /**\n * @inheritdoc ICandidateManager\n */\n function isCandidateAdmin(address _candidate, address _admin) external view override returns (bool) {\n return _candidateInfo[_candidate].admin == _admin;\n }\n\n /**\n * @dev Override `ValidatorInfoStorage-_bridgeOperatorOf`.\n */\n function _bridgeOperatorOf(address _consensusAddr) internal view virtual returns (address) {\n return _candidateInfo[_consensusAddr].bridgeOperatorAddr;\n }\n\n /**\n * @dev Sets the maximum number of validator candidate.\n *\n * Emits the `MaxValidatorCandidateUpdated` event.\n *\n */\n function _setMaxValidatorCandidate(uint256 _threshold) internal {\n _maxValidatorCandidate = _threshold;\n emit MaxValidatorCandidateUpdated(_threshold);\n }\n\n /**\n * @dev Sets the minimum number of days onwards to the effective date of commission rate change.\n *\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\n *\n */\n function _setMinEffectiveDaysOnwards(uint256 _numOfDays) internal {\n if (_numOfDays < 1) revert ErrInvalidMinEffectiveDaysOnwards();\n _minEffectiveDaysOnwards = _numOfDays;\n emit MinEffectiveDaysOnwardsUpdated(_numOfDays);\n }\n\n /**\n * @dev Removes the candidate.\n */\n function _removeCandidate(address _addr) internal virtual {\n uint256 _idx = _candidateIndex[_addr];\n if (_idx == 0) {\n return;\n }\n\n delete _candidateInfo[_addr];\n delete _candidateIndex[_addr];\n delete _candidateCommissionChangeSchedule[_addr];\n\n address _lastCandidate = _candidates[_candidates.length - 1];\n if (_lastCandidate != _addr) {\n _candidateIndex[_lastCandidate] = _idx;\n _candidates[~_idx] = _lastCandidate;\n }\n\n _candidates.pop();\n }\n\n /**\n * @dev Sets timestamp to revoke a candidate.\n */\n function _setRevokingTimestamp(ValidatorCandidate storage _candidate, uint256 _timestamp) internal {\n if (!isValidatorCandidate(_candidate.consensusAddr)) revert ErrNonExistentCandidate();\n _candidate.revokingTimestamp = _timestamp;\n emit CandidateRevokingTimestampUpdated(_candidate.consensusAddr, _timestamp);\n }\n\n /**\n * @dev Returns a flag indicating whether the fund is unlocked.\n */\n function _emergencyExitLockedFundReleased(address _consensusAddr) internal virtual returns (bool);\n\n /**\n * @dev Returns whether the consensus address is a trusted org or not.\n */\n function _isTrustedOrg(address _consensusAddr) internal virtual returns (bool);\n}\n" - }, - "contracts/ronin/validator/storage-fragments/JailingStorage.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../../interfaces/validator/info-fragments/IJailingInfo.sol\";\nimport \"./TimingStorage.sol\";\n\nabstract contract JailingStorage is IJailingInfo {\n /// @dev Mapping from consensus address => period number => block producer has no pending reward.\n mapping(address => mapping(uint256 => bool)) internal _miningRewardDeprecatedAtPeriod;\n /// @dev Mapping from consensus address => period number => whether the block producer get cut off reward, due to bailout.\n mapping(address => mapping(uint256 => bool)) internal _miningRewardBailoutCutOffAtPeriod;\n /// @dev Mapping from consensus address => period number => block operator has no pending reward.\n mapping(address => mapping(uint256 => bool)) internal _bridgeRewardDeprecatedAtPeriod;\n\n /// @dev Mapping from consensus address => the last block that the block producer is jailed.\n mapping(address => uint256) internal _blockProducerJailedBlock;\n /// @dev Mapping from consensus address => the last timestamp that the bridge operator is jailed.\n mapping(address => uint256) internal _emergencyExitJailedTimestamp;\n /// @dev Mapping from consensus address => the last block that the block producer cannot bailout.\n mapping(address => uint256) internal _cannotBailoutUntilBlock;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[48] private ______gap;\n\n /**\n * @inheritdoc IJailingInfo\n */\n function checkJailed(address _addr) external view override returns (bool) {\n return checkJailedAtBlock(_addr, block.number);\n }\n\n /**\n * @inheritdoc IJailingInfo\n */\n function getJailedTimeLeft(address _addr)\n external\n view\n override\n returns (\n bool isJailed_,\n uint256 blockLeft_,\n uint256 epochLeft_\n )\n {\n return getJailedTimeLeftAtBlock(_addr, block.number);\n }\n\n /**\n * @inheritdoc IJailingInfo\n */\n function checkJailedAtBlock(address _addr, uint256 _blockNum) public view override returns (bool) {\n return _jailedAtBlock(_addr, _blockNum);\n }\n\n /**\n * @inheritdoc IJailingInfo\n */\n function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum)\n public\n view\n override\n returns (\n bool isJailed_,\n uint256 blockLeft_,\n uint256 epochLeft_\n )\n {\n uint256 _jailedBlock = _blockProducerJailedBlock[_addr];\n if (_jailedBlock < _blockNum) {\n return (false, 0, 0);\n }\n\n isJailed_ = true;\n blockLeft_ = _jailedBlock - _blockNum + 1;\n epochLeft_ = epochOf(_jailedBlock) - epochOf(_blockNum) + 1;\n }\n\n /**\n * @inheritdoc IJailingInfo\n */\n function checkManyJailed(address[] calldata _addrList) external view override returns (bool[] memory _result) {\n _result = new bool[](_addrList.length);\n for (uint256 _i; _i < _addrList.length; _i++) {\n _result[_i] = _jailed(_addrList[_i]);\n }\n }\n\n /**\n * @inheritdoc IJailingInfo\n */\n function checkMiningRewardDeprecated(address[] calldata _blockProducers)\n external\n view\n override\n returns (bool[] memory _result)\n {\n _result = new bool[](_blockProducers.length);\n uint256 _period = currentPeriod();\n for (uint256 _i; _i < _blockProducers.length; _i++) {\n _result[_i] = _miningRewardDeprecated(_blockProducers[_i], _period);\n }\n }\n\n /**\n * @inheritdoc IJailingInfo\n */\n function checkMiningRewardDeprecatedAtPeriod(address[] calldata _blockProducers, uint256 _period)\n external\n view\n override\n returns (bool[] memory _result)\n {\n _result = new bool[](_blockProducers.length);\n for (uint256 _i; _i < _blockProducers.length; _i++) {\n _result[_i] = _miningRewardDeprecated(_blockProducers[_i], _period);\n }\n }\n\n /**\n * @dev See `ITimingInfo-epochOf`\n */\n function epochOf(uint256 _block) public view virtual returns (uint256);\n\n /**\n * @dev See `ITimingInfo-currentPeriod`\n */\n function currentPeriod() public view virtual returns (uint256);\n\n /**\n * @dev Returns whether the reward of the validator is put in jail (cannot join the set of validators) during the current period.\n */\n function _jailed(address _validatorAddr) internal view returns (bool) {\n return _jailedAtBlock(_validatorAddr, block.number);\n }\n\n /**\n * @dev Returns whether the reward of the validator is put in jail (cannot join the set of validators) at a specific block.\n */\n function _jailedAtBlock(address _validatorAddr, uint256 _blockNum) internal view returns (bool) {\n return _blockNum <= _blockProducerJailedBlock[_validatorAddr];\n }\n\n /**\n * @dev Returns whether the block producer has no pending reward in that period.\n */\n function _miningRewardDeprecated(address _validatorAddr, uint256 _period) internal view returns (bool) {\n return _miningRewardDeprecatedAtPeriod[_validatorAddr][_period];\n }\n\n /**\n * @dev Returns whether the bridge operator has no pending reward in the period.\n */\n function _bridgeRewardDeprecated(address _validatorAddr, uint256 _period) internal view returns (bool) {\n return _bridgeRewardDeprecatedAtPeriod[_validatorAddr][_period];\n }\n}\n" - }, - "contracts/ronin/validator/storage-fragments/TimingStorage.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../../interfaces/validator/info-fragments/ITimingInfo.sol\";\n\nabstract contract TimingStorage is ITimingInfo {\n /// @dev Length of period in seconds\n uint256 internal constant _periodLength = 1 days;\n\n /// @dev The number of blocks in a epoch\n uint256 internal _numberOfBlocksInEpoch;\n /// @dev The last updated block\n uint256 internal _lastUpdatedBlock;\n /// @dev The last updated period\n uint256 internal _lastUpdatedPeriod;\n /// @dev The starting block of the last updated period\n uint256 internal _currentPeriodStartAtBlock;\n\n /// @dev Mapping from epoch index => period index\n mapping(uint256 => uint256) internal _periodOf;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[49] private ______gap;\n\n /**\n * @inheritdoc ITimingInfo\n */\n function getLastUpdatedBlock() external view override returns (uint256) {\n return _lastUpdatedBlock;\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function epochOf(uint256 _block) public view virtual override returns (uint256) {\n return _block / _numberOfBlocksInEpoch + 1;\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber) {\n return (_epoch <= epochOf(block.number) || _periodOf[_epoch] > 0, _periodOf[_epoch]);\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function isPeriodEnding() external view override returns (bool) {\n return _isPeriodEnding(_computePeriod(block.timestamp));\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function epochEndingAt(uint256 _block) public view virtual override returns (bool) {\n return _block % _numberOfBlocksInEpoch == _numberOfBlocksInEpoch - 1;\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function currentPeriod() public view virtual override returns (uint256) {\n return _lastUpdatedPeriod;\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function currentPeriodStartAtBlock() public view override returns (uint256) {\n return _currentPeriodStartAtBlock;\n }\n\n /**\n * @inheritdoc ITimingInfo\n */\n function numberOfBlocksInEpoch() public view virtual override returns (uint256 _numberOfBlocks) {\n return _numberOfBlocksInEpoch;\n }\n\n /**\n * @dev See `ITimingInfo-isPeriodEnding`\n */\n function _isPeriodEnding(uint256 _newPeriod) internal view virtual returns (bool) {\n return _newPeriod > _lastUpdatedPeriod;\n }\n\n /**\n * @dev Returns the calculated period.\n */\n function _computePeriod(uint256 _timestamp) internal pure returns (uint256) {\n return _timestamp / _periodLength;\n }\n}\n" - }, - "contracts/ronin/validator/storage-fragments/ValidatorInfoStorage.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../../libraries/EnumFlags.sol\";\nimport \"../../../extensions/collections/HasRoninTrustedOrganizationContract.sol\";\nimport \"../../../interfaces/validator/info-fragments/IValidatorInfo.sol\";\n\nabstract contract ValidatorInfoStorage is IValidatorInfo, HasRoninTrustedOrganizationContract {\n using EnumFlags for EnumFlags.ValidatorFlag;\n\n /// @dev The maximum number of validator.\n uint256 internal _maxValidatorNumber;\n\n /// @dev The total of validators\n uint256 public validatorCount;\n /// @dev Mapping from validator index => validator address\n mapping(uint256 => address) internal _validators;\n /// @dev Mapping from address => flag indicating the validator ability: producing block, operating bridge\n mapping(address => EnumFlags.ValidatorFlag) internal _validatorMap;\n /// @dev The number of slot that is reserved for prioritized validators\n uint256 internal _maxPrioritizedValidatorNumber;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function getValidators() public view override returns (address[] memory _validatorList) {\n _validatorList = new address[](validatorCount);\n for (uint _i = 0; _i < _validatorList.length; _i++) {\n _validatorList[_i] = _validators[_i];\n }\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function isValidator(address _addr) public view override returns (bool) {\n return !_validatorMap[_addr].isNone();\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function getBlockProducers() public view override returns (address[] memory _result) {\n _result = new address[](validatorCount);\n uint256 _count = 0;\n for (uint _i = 0; _i < _result.length; _i++) {\n if (isBlockProducer(_validators[_i])) {\n _result[_count++] = _validators[_i];\n }\n }\n\n assembly {\n mstore(_result, _count)\n }\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function isBlockProducer(address _addr) public view override returns (bool) {\n return _validatorMap[_addr].hasFlag(EnumFlags.ValidatorFlag.BlockProducer);\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function totalBlockProducers() external view returns (uint256 _total) {\n for (uint _i = 0; _i < validatorCount; _i++) {\n if (isBlockProducer(_validators[_i])) {\n _total++;\n }\n }\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function getBridgeOperators() public view override returns (address[] memory _result) {\n _result = new address[](validatorCount);\n uint256 _count = 0;\n for (uint _i = 0; _i < _result.length; _i++) {\n if (isOperatingBridge(_validators[_i])) {\n _result[_count++] = _bridgeOperatorOf(_validators[_i]);\n }\n }\n\n assembly {\n mstore(_result, _count)\n }\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function getBridgeOperatorsOf(address[] memory _validatorAddrs)\n public\n view\n override\n returns (address[] memory _result)\n {\n _result = new address[](_validatorAddrs.length);\n for (uint _i = 0; _i < _result.length; _i++) {\n _result[_i] = _bridgeOperatorOf(_validatorAddrs[_i]);\n }\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function isBridgeOperator(address _bridgeOperatorAddr) external view override returns (bool _result) {\n for (uint _i = 0; _i < validatorCount; _i++) {\n if (_bridgeOperatorOf(_validators[_i]) == _bridgeOperatorAddr && isOperatingBridge(_validators[_i])) {\n _result = true;\n break;\n }\n }\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function isOperatingBridge(address _consensusAddr) public view override returns (bool) {\n return _validatorMap[_consensusAddr].hasFlag(EnumFlags.ValidatorFlag.BridgeOperator);\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function maxValidatorNumber() external view override returns (uint256 _maximumValidatorNumber) {\n return _maxValidatorNumber;\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function maxPrioritizedValidatorNumber() external view override returns (uint256 _maximumPrioritizedValidatorNumber) {\n return _maxPrioritizedValidatorNumber;\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function totalBridgeOperators() public view returns (uint256 _total) {\n for (uint _i = 0; _i < validatorCount; _i++) {\n if (isOperatingBridge(_validators[_i])) {\n _total++;\n }\n }\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function setMaxValidatorNumber(uint256 _max) external override onlyAdmin {\n _setMaxValidatorNumber(_max);\n }\n\n /**\n * @inheritdoc IValidatorInfo\n */\n function setMaxPrioritizedValidatorNumber(uint256 _number) external override onlyAdmin {\n _setMaxPrioritizedValidatorNumber(_number);\n }\n\n /**\n * @dev Returns the bridge operator of a consensus address.\n */\n function _bridgeOperatorOf(address _consensusAddr) internal view virtual returns (address);\n\n /**\n * @dev See `IValidatorInfo-setMaxValidatorNumber`\n */\n function _setMaxValidatorNumber(uint256 _number) internal {\n _maxValidatorNumber = _number;\n emit MaxValidatorNumberUpdated(_number);\n }\n\n /**\n * @dev See `IValidatorInfo-setMaxPrioritizedValidatorNumber`\n */\n function _setMaxPrioritizedValidatorNumber(uint256 _number) internal {\n if (_number > _maxValidatorNumber) revert ErrInvalidMaxPrioritizedValidatorNumber();\n _maxPrioritizedValidatorNumber = _number;\n emit MaxPrioritizedValidatorNumberUpdated(_number);\n }\n}\n" - }, - "contracts/libraries/EnumFlags.sol": { - "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This library implements checking flag of an enumerated value.\n * The originated idea is inherited from [Enum.HashFlag(Enum)](https://learn.microsoft.com/en-us/dotnet/api/system.enum.hasflag?view=net-6.0) method of C#.\n */\nlibrary EnumFlags {\n enum ValidatorFlag {\n None, // bit(00)\n BlockProducer, // bit(01)\n BridgeOperator, // bit(10)\n Both // bit(11)\n }\n\n function isNone(ValidatorFlag _value) internal pure returns (bool) {\n return uint8(_value) == 0;\n }\n\n /**\n * @dev Checks if `_value` has `_flag`.\n */\n function hasFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (bool) {\n return (uint8(_value) & uint8(_flag)) != 0;\n }\n\n /**\n * @dev Calculate new value of `_value` after adding `_flag`.\n */\n function addFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\n return ValidatorFlag(uint8(_value) | uint8(_flag));\n }\n\n /**\n * @dev Calculate new value of `_value` after remove `_flag`.\n */\n function removeFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\n return ValidatorFlag(uint8(_value) & ~uint8(_flag));\n }\n}\n" - }, - "contracts/extensions/collections/HasStakingContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasStakingContract.sol\";\nimport \"../../interfaces/staking/IStaking.sol\";\n\ncontract HasStakingContract is IHasStakingContract, HasProxyAdmin {\n IStaking internal _stakingContract;\n\n modifier onlyStakingContract() {\n if (stakingContract() != msg.sender) revert ErrCallerMustBeStakingContract();\n _;\n }\n\n /**\n * @inheritdoc IHasStakingContract\n */\n function stakingContract() public view override returns (address) {\n return address(_stakingContract);\n }\n\n /**\n * @inheritdoc IHasStakingContract\n */\n function setStakingContract(address _addr) external override onlyAdmin {\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\n _setStakingContract(_addr);\n }\n\n /**\n * @dev Sets the staking contract.\n *\n * Emits the event `StakingContractUpdated`.\n *\n */\n function _setStakingContract(address _addr) internal {\n _stakingContract = IStaking(_addr);\n emit StakingContractUpdated(_addr);\n }\n}\n" - }, - "contracts/extensions/consumers/PercentageConsumer.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nabstract contract PercentageConsumer {\n uint256 internal constant _MAX_PERCENTAGE = 100_00;\n}\n" - }, - "contracts/interfaces/staking/IStaking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IBaseStaking.sol\";\nimport \"./ICandidateStaking.sol\";\nimport \"./IDelegatorStaking.sol\";\n\ninterface IStaking is IRewardPool, IBaseStaking, ICandidateStaking, IDelegatorStaking {\n /**\n * @dev Records the amount of rewards `_rewards` for the pools `_consensusAddrs`.\n *\n * Requirements:\n * - The method caller must be validator contract.\n *\n * Emits the event `PoolsUpdated` once the contract recorded the rewards successfully.\n * Emits the event `PoolsUpdateFailed` once the input array lengths are not equal.\n * Emits the event `PoolsUpdateConflicted` when there are some pools which already updated in the period.\n *\n * Note: This method should be called once at the period ending.\n *\n */\n function execRecordRewards(\n address[] calldata _consensusAddrs,\n uint256[] calldata _rewards,\n uint256 _period\n ) external payable;\n\n /**\n * @dev Deducts from staking amount of the validator `_consensusAddr` for `_amount`.\n *\n * Requirements:\n * - The method caller must be validator contract.\n *\n * Emits the event `Unstaked`.\n *\n */\n function execDeductStakingAmount(address _consensusAddr, uint256 _amount)\n external\n returns (uint256 _actualDeductingAmount);\n}\n" - }, - "contracts/interfaces/collections/IHasStakingContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasStakingContract is IHasContract {\n /// @dev Emitted when the staking contract is updated.\n event StakingContractUpdated(address);\n\n /// @dev Error of method caller must be staking contract.\n error ErrCallerMustBeStakingContract();\n\n /**\n * @dev Returns the staking contract.\n */\n function stakingContract() external view returns (address);\n\n /**\n * @dev Sets the staking contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `StakingContractUpdated`.\n *\n */\n function setStakingContract(address) external;\n}\n" - }, - "contracts/interfaces/staking/IBaseStaking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface IBaseStaking {\n struct PoolDetail {\n // Address of the pool i.e. consensus address of the validator\n address addr;\n // Pool admin address\n address admin;\n // Self-staking amount\n uint256 stakingAmount;\n // Total number of RON staking for the pool\n uint256 stakingTotal;\n // Mapping from delegator => delegating amount\n mapping(address => uint256) delegatingAmount;\n // Mapping from delegator => the last timestamp that delegator staked\n mapping(address => uint256) lastDelegatingTimestamp;\n }\n\n /// @dev Emitted when the minium number of seconds to undelegate is updated.\n event CooldownSecsToUndelegateUpdated(uint256 minSecs);\n /// @dev Emitted when the number of seconds that a candidate must wait to be revoked.\n event WaitingSecsToRevokeUpdated(uint256 secs);\n\n /// @dev Error of cannot transfer RON.\n error ErrCannotTransferRON();\n /// @dev Error of receiving zero message value.\n error ErrZeroValue();\n /// @dev Error of pool admin is not allowed to call.\n error ErrPoolAdminForbidden();\n /// @dev Error of no one is allowed to call but the pool's admin.\n error ErrOnlyPoolAdminAllowed();\n /// @dev Error of admin of any active pool cannot delegate.\n error ErrAdminOfAnyActivePoolForbidden(address admin);\n /// @dev Error of querying inactive pool.\n error ErrInactivePool(address poolAddr);\n /// @dev Error of length of input arrays are not of the same.\n error ErrInvalidArrays();\n\n /**\n * @dev Returns whether the `_poolAdminAddr` is currently active.\n */\n function isAdminOfActivePool(address _poolAdminAddr) external view returns (bool);\n\n /**\n * @dev Returns the consensus address corresponding to the pool admin.\n */\n function getPoolAddressOf(address _poolAdminAddr) external view returns (address);\n\n /**\n * @dev Returns the staking pool detail.\n */\n function getPoolDetail(address)\n external\n view\n returns (\n address _admin,\n uint256 _stakingAmount,\n uint256 _stakingTotal\n );\n\n /**\n * @dev Returns the self-staking amounts of the pools.\n */\n function getManySelfStakings(address[] calldata) external view returns (uint256[] memory);\n\n /**\n * @dev Returns The cooldown time in seconds to undelegate from the last timestamp (s)he delegated.\n */\n function cooldownSecsToUndelegate() external view returns (uint256);\n\n /**\n * @dev Returns the number of seconds that a candidate must wait for the renounce request gets affected.\n */\n function waitingSecsToRevoke() external view returns (uint256);\n\n /**\n * @dev Sets the cooldown time in seconds to undelegate from the last timestamp (s)he delegated.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `CooldownSecsToUndelegateUpdated`.\n *\n */\n function setCooldownSecsToUndelegate(uint256 _cooldownSecs) external;\n\n /**\n * @dev Sets the number of seconds that a candidate must wait to be revoked.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `WaitingSecsToRevokeUpdated`.\n *\n */\n function setWaitingSecsToRevoke(uint256 _secs) external;\n}\n" - }, - "contracts/interfaces/staking/ICandidateStaking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IRewardPool.sol\";\n\ninterface ICandidateStaking is IRewardPool {\n /// @dev Emitted when the minimum staking amount for being a validator is updated.\n event MinValidatorStakingAmountUpdated(uint256 threshold);\n\n /// @dev Emitted when the pool admin staked for themself.\n event Staked(address indexed consensuAddr, uint256 amount);\n /// @dev Emitted when the pool admin unstaked the amount of RON from themself.\n event Unstaked(address indexed consensuAddr, uint256 amount);\n\n /// @dev Emitted when the validator pool is approved.\n event PoolApproved(address indexed validator, address indexed admin);\n /// @dev Emitted when the validator pool is deprecated.\n event PoolsDeprecated(address[] validator);\n /// @dev Emitted when the staking amount transfer failed.\n event StakingAmountTransferFailed(\n address indexed validator,\n address indexed admin,\n uint256 amount,\n uint256 contractBalance\n );\n /// @dev Emitted when the staking amount deducted failed, e.g. when the validator gets slashed.\n event StakingAmountDeductFailed(\n address indexed validator,\n address indexed recipient,\n uint256 amount,\n uint256 contractBalance\n );\n\n /// @dev Error of cannot transfer RON to specified target.\n error ErrCannotInitTransferRON(address addr, string extraInfo);\n /// @dev Error of three interaction addresses must be of the same in applying for validator candidate.\n error ErrThreeInteractionAddrsNotEqual();\n /// @dev Error of three operation addresses must be distinct in applying for validator candidate.\n error ErrThreeOperationAddrsNotDistinct();\n /// @dev Error of unstaking zero amount.\n error ErrUnstakeZeroAmount();\n /// @dev Error of invalid staking amount left after deducted.\n error ErrStakingAmountLeft();\n /// @dev Error of insufficient staking amount for unstaking.\n error ErrInsufficientStakingAmount();\n /// @dev Error of unstaking too early.\n error ErrUnstakeTooEarly();\n\n /**\n * @dev Returns the minimum threshold for being a validator candidate.\n */\n function minValidatorStakingAmount() external view returns (uint256);\n\n /**\n * @dev Sets the minimum threshold for being a validator candidate.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the `MinValidatorStakingAmountUpdated` event.\n *\n */\n function setMinValidatorStakingAmount(uint256) external;\n\n /**\n * @dev Proposes a candidate to become a validator.\n *\n * Requirements:\n * - The method caller is able to receive RON.\n * - The treasury is able to receive RON.\n * - The amount is larger than or equal to the minimum validator staking amount `minValidatorStakingAmount()`.\n *\n * Emits the event `PoolApproved`.\n *\n * @param _candidateAdmin the candidate admin will be stored in the validator contract, used for calling function that affects\n * to its candidate, e.g. scheduling maintenance.\n *\n */\n function applyValidatorCandidate(\n address _candidateAdmin,\n address _consensusAddr,\n address payable _treasuryAddr,\n address _bridgeOperatorAddr,\n uint256 _commissionRate\n ) external payable;\n\n /**\n * @dev Deprecates the pool.\n * - Deduct self-staking amount of the pool admin to zero.\n * - Transfer the deducted amount to the pool admin.\n * - Deactivate the pool admin address in the mapping of active pool admins\n *\n * Requirements:\n * - The method caller is validator contract.\n *\n * Emits the event `PoolsDeprecated` and `Unstaked` events.\n * Emits the event `StakingAmountTransferFailed` if the contract cannot transfer RON back to the pool admin.\n *\n */\n function execDeprecatePools(address[] calldata _pools, uint256 _period) external;\n\n /**\n * @dev Self-delegates to the validator candidate `_consensusAddr`.\n *\n * Requirements:\n * - The consensus address is a validator candidate.\n * - The method caller is the pool admin.\n * - The `msg.value` is larger than 0.\n *\n * Emits the event `Staked`.\n *\n */\n function stake(address _consensusAddr) external payable;\n\n /**\n * @dev Unstakes from the validator candidate `_consensusAddr` for `_amount`.\n *\n * Requirements:\n * - The consensus address is a validator candidate.\n * - The method caller is the pool admin.\n *\n * Emits the event `Unstaked`.\n *\n */\n function unstake(address _consensusAddr, uint256 _amount) external;\n\n /**\n * @dev Pool admin requests update validator commission rate. The request will be forwarded to the candidate manager\n * contract, and the value is getting updated in {ICandidateManager-execRequestUpdateCommissionRate}.\n *\n * Requirements:\n * - The consensus address is a validator candidate.\n * - The method caller is the pool admin.\n * - The `_effectiveDaysOnwards` must be equal to or larger than the {CandidateManager-_minEffectiveDaysOnwards}.\n * - The `_rate` must be in range of [0_00; 100_00].\n *\n * Emits the event `CommissionRateUpdated`.\n *\n */\n function requestUpdateCommissionRate(\n address _consensusAddr,\n uint256 _effectiveDaysOnwards,\n uint256 _commissionRate\n ) external;\n\n /**\n * @dev Renounces being a validator candidate and takes back the delegating/staking amount.\n *\n * Requirements:\n * - The consensus address is a validator candidate.\n * - The method caller is the pool admin.\n *\n */\n function requestRenounce(address _consensusAddr) external;\n\n /**\n * @dev Renounces being a validator candidate and takes back the delegating/staking amount.\n *\n * Requirements:\n * - The consensus address is a validator candidate.\n * - The method caller is the pool admin.\n *\n */\n function requestEmergencyExit(address _consensusAddr) external;\n}\n" - }, - "contracts/interfaces/staking/IDelegatorStaking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IRewardPool.sol\";\n\ninterface IDelegatorStaking is IRewardPool {\n /// @dev Emitted when the delegator staked for a validator candidate.\n event Delegated(address indexed delegator, address indexed consensuAddr, uint256 amount);\n /// @dev Emitted when the delegator unstaked from a validator candidate.\n event Undelegated(address indexed delegator, address indexed consensuAddr, uint256 amount);\n\n /// @dev Error of undelegating zero amount.\n error ErrUndelegateZeroAmount();\n /// @dev Error of undelegating insufficient amount.\n error ErrInsufficientDelegatingAmount();\n /// @dev Error of undelegating too early.\n error ErrUndelegateTooEarly();\n\n /**\n * @dev Stakes for a validator candidate `_consensusAddr`.\n *\n * Requirements:\n * - The consensus address is a validator candidate.\n * - The method caller is not the pool admin.\n *\n * Emits the `Delegated` event.\n *\n */\n function delegate(address _consensusAddr) external payable;\n\n /**\n * @dev Unstakes from a validator candidate `_consensusAddr` for `_amount`.\n *\n * Requirements:\n * - The method caller is not the pool admin.\n *\n * Emits the `Undelegated` event.\n *\n */\n function undelegate(address _consensusAddr, uint256 _amount) external;\n\n /**\n * @dev Bulk unstakes from a list of candidates.\n *\n * Requirements:\n * - The method caller is not the pool admin.\n *\n * Emits the events `Undelegated`.\n *\n */\n function bulkUndelegate(address[] calldata _consensusAddrs, uint256[] calldata _amounts) external;\n\n /**\n * @dev Unstakes an amount of RON from the `_consensusAddrSrc` and stake for `_consensusAddrDst`.\n *\n * Requirements:\n * - The method caller is not the pool admin.\n * - The consensus address `_consensusAddrDst` is a validator candidate.\n *\n * Emits the `Undelegated` event and the `Delegated` event.\n *\n */\n function redelegate(\n address _consensusAddrSrc,\n address _consensusAddrDst,\n uint256 _amount\n ) external;\n\n /**\n * @dev Returns the claimable reward of the user `_user`.\n */\n function getRewards(address _user, address[] calldata _poolAddrList)\n external\n view\n returns (uint256[] memory _rewards);\n\n /**\n * @dev Claims the reward of method caller.\n *\n * Emits the `RewardClaimed` event.\n *\n */\n function claimRewards(address[] calldata _consensusAddrList) external returns (uint256 _amount);\n\n /**\n * @dev Claims the rewards and delegates them to the consensus address.\n *\n * Requirements:\n * - The method caller is not the pool admin.\n * - The consensus address `_consensusAddrDst` is a validator candidate.\n *\n * Emits the `RewardClaimed` event and the `Delegated` event.\n *\n */\n function delegateRewards(address[] calldata _consensusAddrList, address _consensusAddrDst)\n external\n returns (uint256 _amount);\n}\n" - }, - "contracts/interfaces/staking/IRewardPool.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../interfaces/consumers/PeriodWrapperConsumer.sol\";\n\ninterface IRewardPool is PeriodWrapperConsumer {\n struct UserRewardFields {\n // Recorded reward amount.\n uint256 debited;\n // The last accumulated of the amount rewards per share (one unit staking) that the info updated.\n uint256 aRps;\n // Lowest staking amount in the period.\n uint256 lowestAmount;\n // Last period number that the info updated.\n uint256 lastPeriod;\n }\n\n struct PoolFields {\n // Accumulated of the amount rewards per share (one unit staking).\n uint256 aRps;\n // The staking total to share reward of the current period.\n PeriodWrapper shares;\n }\n\n /// @dev Emitted when the fields to calculate pending reward for the user is updated.\n event UserRewardUpdated(address indexed poolAddr, address indexed user, uint256 debited);\n /// @dev Emitted when the user claimed their reward\n event RewardClaimed(address indexed poolAddr, address indexed user, uint256 amount);\n\n /// @dev Emitted when the pool shares are updated\n event PoolSharesUpdated(uint256 indexed period, address indexed poolAddr, uint256 shares);\n /// @dev Emitted when the pools are updated\n event PoolsUpdated(uint256 indexed period, address[] poolAddrs, uint256[] aRps, uint256[] shares);\n /// @dev Emitted when the contract fails when updating the pools\n event PoolsUpdateFailed(uint256 indexed period, address[] poolAddrs, uint256[] rewards);\n /// @dev Emitted when the contract fails when updating the pools that already set\n event PoolsUpdateConflicted(uint256 indexed period, address[] poolAddrs);\n\n /// @dev Error of invalid pool share.\n error ErrInvalidPoolShare();\n\n /**\n * @dev Returns the reward amount that user claimable.\n */\n function getReward(address _poolAddr, address _user) external view returns (uint256);\n\n /**\n * @dev Returns the staking amount of an user.\n */\n function getStakingAmount(address _poolAddr, address _user) external view returns (uint256);\n\n /**\n * @dev Returns the staking amounts of the users.\n */\n function getManyStakingAmounts(address[] calldata _poolAddrs, address[] calldata _userList)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Returns the total staking amount of all users for a pool.\n */\n function getStakingTotal(address _poolAddr) external view returns (uint256);\n\n /**\n * @dev Returns the total staking amounts of all users for the pools `_poolAddrs`.\n */\n function getManyStakingTotals(address[] calldata _poolAddrs) external view returns (uint256[] memory);\n}\n" - }, - "contracts/interfaces/consumers/PeriodWrapperConsumer.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface PeriodWrapperConsumer {\n struct PeriodWrapper {\n // Inner value.\n uint256 inner;\n // Last period number that the info updated.\n uint256 lastPeriod;\n }\n}\n" - }, - "contracts/mocks/validator/MockValidatorSet.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../interfaces/validator/IRoninValidatorSet.sol\";\nimport \"../../ronin/validator/CandidateManager.sol\";\n\ncontract MockValidatorSet is IRoninValidatorSet, CandidateManager {\n address public stakingVestingContract;\n address public slashIndicatorContract;\n\n uint256 internal _lastUpdatedPeriod;\n uint256 internal _numberOfBlocksInEpoch;\n /// @dev Mapping from period number => slashed\n mapping(uint256 => bool) internal _periodSlashed;\n\n constructor(\n address __stakingContract,\n address _slashIndicatorContract,\n address _stakingVestingContract,\n uint256 __maxValidatorCandidate,\n uint256 __numberOfBlocksInEpoch,\n uint256 __minEffectiveDaysOnwards\n ) {\n _setStakingContract(__stakingContract);\n _setMaxValidatorCandidate(__maxValidatorCandidate);\n slashIndicatorContract = _slashIndicatorContract;\n stakingVestingContract = _stakingVestingContract;\n _numberOfBlocksInEpoch = __numberOfBlocksInEpoch;\n _minEffectiveDaysOnwards = __minEffectiveDaysOnwards;\n }\n\n function submitBlockReward() external payable override {}\n\n function wrapUpEpoch() external payable override {\n _syncCandidateSet(_lastUpdatedPeriod + 1);\n _lastUpdatedPeriod = currentPeriod();\n }\n\n function getLastUpdatedBlock() external view override returns (uint256) {}\n\n function checkManyJailed(address[] calldata) external view override returns (bool[] memory) {}\n\n function checkMiningRewardDeprecatedAtPeriod(address[] calldata, uint256 _period)\n external\n view\n override\n returns (bool[] memory)\n {}\n\n function checkMiningRewardDeprecated(address[] calldata) external view override returns (bool[] memory) {}\n\n function epochOf(uint256 _block) external view override returns (uint256) {}\n\n function getValidators() external view override returns (address[] memory) {}\n\n function epochEndingAt(uint256 _block) external view override returns (bool) {}\n\n function execSlash(\n address _validatorAddr,\n uint256 _newJailedUntil,\n uint256 _slashAmount,\n bool _cannotBailout\n ) external override {}\n\n function execBailOut(address, uint256) external override {}\n\n function setMaxValidatorNumber(uint256 _maxValidatorNumber) external override {}\n\n function setMaxPrioritizedValidatorNumber(uint256 _maxPrioritizedValidatorNumber) external override {}\n\n function maxValidatorNumber() external view override returns (uint256 _maximumValidatorNumber) {}\n\n function maxPrioritizedValidatorNumber()\n external\n view\n override\n returns (uint256 _maximumPrioritizedValidatorNumber)\n {}\n\n function isValidator(address) external pure override returns (bool) {\n return true;\n }\n\n function numberOfBlocksInEpoch() public view override returns (uint256) {\n return _numberOfBlocksInEpoch;\n }\n\n function getBridgeOperators() external view override returns (address[] memory) {}\n\n function getBridgeOperatorsOf(address[] memory _validatorAddrs) external view override returns (address[] memory) {}\n\n function isBridgeOperator(address) external pure override returns (bool) {\n return true;\n }\n\n function totalBridgeOperators() external view override returns (uint256) {}\n\n function getBlockProducers() external view override returns (address[] memory) {}\n\n function isBlockProducer(address) external pure override returns (bool) {\n return true;\n }\n\n function totalBlockProducers() external view override returns (uint256) {}\n\n function tryGetPeriodOfEpoch(uint256) external view returns (bool, uint256) {}\n\n function isPeriodEnding() public view virtual returns (bool) {\n return currentPeriod() > _lastUpdatedPeriod;\n }\n\n function currentPeriod() public view override returns (uint256) {\n return block.timestamp / 86400;\n }\n\n function checkJailed(address) external view override returns (bool) {}\n\n function getJailedTimeLeft(address)\n external\n view\n override\n returns (\n bool,\n uint256,\n uint256\n )\n {}\n\n function currentPeriodStartAtBlock() external view override returns (uint256) {}\n\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view override returns (bool) {}\n\n function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum)\n external\n view\n override\n returns (\n bool isJailed_,\n uint256 blockLeft_,\n uint256 epochLeft_\n )\n {}\n\n function totalDeprecatedReward() external view override returns (uint256) {}\n\n function _bridgeOperatorOf(address _consensusAddr) internal view override returns (address) {\n return super._bridgeOperatorOf(_consensusAddr);\n }\n\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient)\n external\n override\n {}\n\n function emergencyExitLockedAmount() external override returns (uint256) {}\n\n function emergencyExpiryDuration() external override returns (uint256) {}\n\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external override {}\n\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external override {}\n\n function getEmergencyExitInfo(address _consensusAddr) external view override returns (EmergencyExitInfo memory) {}\n\n function execEmergencyExit(address, uint256) external {}\n\n function isOperatingBridge(address) external view returns (bool) {}\n\n function _emergencyExitLockedFundReleased(address _consensusAddr) internal virtual override returns (bool) {}\n\n function _isTrustedOrg(address _consensusAddr) internal virtual override returns (bool) {}\n}\n" - }, - "contracts/ronin/staking/Staking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../../interfaces/staking/IStaking.sol\";\nimport \"../../interfaces/validator/IRoninValidatorSet.sol\";\nimport \"./CandidateStaking.sol\";\nimport \"./DelegatorStaking.sol\";\n\ncontract Staking is IStaking, CandidateStaking, DelegatorStaking, Initializable {\n constructor() {\n _disableInitializers();\n }\n\n receive() external payable onlyValidatorContract {}\n\n fallback() external payable onlyValidatorContract {}\n\n /**\n * @dev Initializes the contract storage.\n */\n function initialize(\n address __validatorContract,\n uint256 __minValidatorStakingAmount,\n uint256 __cooldownSecsToUndelegate,\n uint256 __waitingSecsToRevoke\n ) external initializer {\n _setValidatorContract(__validatorContract);\n _setMinValidatorStakingAmount(__minValidatorStakingAmount);\n _setCooldownSecsToUndelegate(__cooldownSecsToUndelegate);\n _setWaitingSecsToRevoke(__waitingSecsToRevoke);\n }\n\n /**\n * @inheritdoc IStaking\n */\n function execRecordRewards(\n address[] calldata _consensusAddrs,\n uint256[] calldata _rewards,\n uint256 _period\n ) external payable override onlyValidatorContract {\n _recordRewards(_consensusAddrs, _rewards, _period);\n }\n\n /**\n * @inheritdoc IStaking\n */\n function execDeductStakingAmount(address _consensusAddr, uint256 _amount)\n external\n override\n onlyValidatorContract\n returns (uint256 _actualDeductingAmount)\n {\n _actualDeductingAmount = _deductStakingAmount(_stakingPool[_consensusAddr], _amount);\n address payable _recipientAddr = payable(validatorContract());\n if (!_unsafeSendRON(_recipientAddr, _actualDeductingAmount, 3500)) {\n emit StakingAmountDeductFailed(_consensusAddr, _recipientAddr, _actualDeductingAmount, address(this).balance);\n }\n }\n\n /**\n * @inheritdoc RewardCalculation\n */\n function _currentPeriod() internal view virtual override returns (uint256) {\n return _validatorContract.currentPeriod();\n }\n\n /**\n * @inheritdoc CandidateStaking\n */\n function _deductStakingAmount(PoolDetail storage _pool, uint256 _amount)\n internal\n override\n returns (uint256 _actualDeductingAmount)\n {\n _actualDeductingAmount = Math.min(_pool.stakingAmount, _amount);\n\n _pool.stakingAmount -= _actualDeductingAmount;\n _changeDelegatingAmount(_pool, _pool.admin, _pool.stakingAmount, _pool.stakingTotal - _actualDeductingAmount);\n emit Unstaked(_pool.addr, _actualDeductingAmount);\n }\n}\n" - }, - "contracts/ronin/staking/CandidateStaking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../libraries/AddressArrayUtils.sol\";\nimport \"../../interfaces/staking/ICandidateStaking.sol\";\nimport \"./BaseStaking.sol\";\n\nabstract contract CandidateStaking is BaseStaking, ICandidateStaking {\n /// @dev The minimum threshold for being a validator candidate.\n uint256 internal _minValidatorStakingAmount;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function minValidatorStakingAmount() public view override returns (uint256) {\n return _minValidatorStakingAmount;\n }\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function setMinValidatorStakingAmount(uint256 _threshold) external override onlyAdmin {\n _setMinValidatorStakingAmount(_threshold);\n }\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function applyValidatorCandidate(\n address _candidateAdmin,\n address _consensusAddr,\n address payable _treasuryAddr,\n address _bridgeOperatorAddr,\n uint256 _commissionRate\n ) external payable override nonReentrant {\n if (isAdminOfActivePool(msg.sender)) revert ErrAdminOfAnyActivePoolForbidden(msg.sender);\n\n uint256 _amount = msg.value;\n address payable _poolAdmin = payable(msg.sender);\n _applyValidatorCandidate(\n _poolAdmin,\n _candidateAdmin,\n _consensusAddr,\n _treasuryAddr,\n _bridgeOperatorAddr,\n _commissionRate,\n _amount\n );\n\n PoolDetail storage _pool = _stakingPool[_consensusAddr];\n _pool.admin = _poolAdmin;\n _pool.addr = _consensusAddr;\n _adminOfActivePoolMapping[_poolAdmin] = _consensusAddr;\n\n _stake(_stakingPool[_consensusAddr], _poolAdmin, _amount);\n emit PoolApproved(_consensusAddr, _poolAdmin);\n }\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function requestUpdateCommissionRate(\n address _consensusAddr,\n uint256 _effectiveDaysOnwards,\n uint256 _commissionRate\n ) external override poolIsActive(_consensusAddr) onlyPoolAdmin(_stakingPool[_consensusAddr], msg.sender) {\n _validatorContract.execRequestUpdateCommissionRate(_consensusAddr, _effectiveDaysOnwards, _commissionRate);\n }\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function execDeprecatePools(address[] calldata _pools, uint256 _newPeriod) external override onlyValidatorContract {\n if (_pools.length == 0) {\n return;\n }\n\n for (uint _i = 0; _i < _pools.length; _i++) {\n PoolDetail storage _pool = _stakingPool[_pools[_i]];\n // Deactivate the pool admin in the active mapping.\n delete _adminOfActivePoolMapping[_pool.admin];\n\n // Deduct and transfer the self staking amount to the pool admin.\n uint256 _deductingAmount = _pool.stakingAmount;\n if (_deductingAmount > 0) {\n _deductStakingAmount(_pool, _deductingAmount);\n if (!_unsafeSendRON(payable(_pool.admin), _deductingAmount, 3500)) {\n emit StakingAmountTransferFailed(_pool.addr, _pool.admin, _deductingAmount, address(this).balance);\n }\n }\n\n // Settle the unclaimed reward and transfer to the pool admin.\n uint256 _lastRewardAmount = _claimReward(_pools[_i], _pool.admin, _newPeriod);\n if (_lastRewardAmount > 0) {\n _unsafeSendRON(payable(_pool.admin), _lastRewardAmount, 3500);\n }\n }\n\n emit PoolsDeprecated(_pools);\n }\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function stake(address _consensusAddr) external payable override noEmptyValue poolIsActive(_consensusAddr) {\n _stake(_stakingPool[_consensusAddr], msg.sender, msg.value);\n }\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function unstake(address _consensusAddr, uint256 _amount)\n external\n override\n nonReentrant\n poolIsActive(_consensusAddr)\n {\n if (_amount == 0) revert ErrUnstakeZeroAmount();\n address _requester = msg.sender;\n PoolDetail storage _pool = _stakingPool[_consensusAddr];\n uint256 _remainAmount = _pool.stakingAmount - _amount;\n if (_remainAmount < _minValidatorStakingAmount) revert ErrStakingAmountLeft();\n\n _unstake(_pool, _requester, _amount);\n if (!_unsafeSendRON(payable(_requester), _amount, 3500)) revert ErrCannotTransferRON();\n }\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function requestRenounce(address _consensusAddr)\n external\n override\n poolIsActive(_consensusAddr)\n onlyPoolAdmin(_stakingPool[_consensusAddr], msg.sender)\n {\n _validatorContract.execRequestRenounceCandidate(_consensusAddr, _waitingSecsToRevoke);\n }\n\n /**\n * @inheritdoc ICandidateStaking\n */\n function requestEmergencyExit(address _consensusAddr)\n external\n override\n poolIsActive(_consensusAddr)\n onlyPoolAdmin(_stakingPool[_consensusAddr], msg.sender)\n {\n _validatorContract.execEmergencyExit(_consensusAddr, _waitingSecsToRevoke);\n }\n\n /**\n * @dev See `ICandidateStaking-applyValidatorCandidate`\n */\n function _applyValidatorCandidate(\n address payable _poolAdmin,\n address _candidateAdmin,\n address _consensusAddr,\n address payable _treasuryAddr,\n address _bridgeOperatorAddr,\n uint256 _commissionRate,\n uint256 _amount\n ) internal {\n if (!_unsafeSendRON(_poolAdmin, 0)) revert ErrCannotInitTransferRON(_poolAdmin, \"pool admin\");\n if (!_unsafeSendRON(_treasuryAddr, 0)) revert ErrCannotInitTransferRON(_treasuryAddr, \"treasury\");\n if (_amount < _minValidatorStakingAmount) revert ErrInsufficientStakingAmount();\n\n if (_poolAdmin != _candidateAdmin || _candidateAdmin != _treasuryAddr) revert ErrThreeInteractionAddrsNotEqual();\n\n address[] memory _diffAddrs = new address[](3);\n _diffAddrs[0] = _poolAdmin;\n _diffAddrs[1] = _consensusAddr;\n _diffAddrs[2] = _bridgeOperatorAddr;\n if (AddressArrayUtils.hasDuplicate(_diffAddrs)) revert ErrThreeOperationAddrsNotDistinct();\n\n _validatorContract.execApplyValidatorCandidate(\n _candidateAdmin,\n _consensusAddr,\n _treasuryAddr,\n _bridgeOperatorAddr,\n _commissionRate\n );\n }\n\n /**\n * @dev See `ICandidateStaking-stake`\n */\n function _stake(\n PoolDetail storage _pool,\n address _requester,\n uint256 _amount\n ) internal onlyPoolAdmin(_pool, _requester) {\n _pool.stakingAmount += _amount;\n _changeDelegatingAmount(_pool, _requester, _pool.stakingAmount, _pool.stakingTotal + _amount);\n _pool.lastDelegatingTimestamp[_requester] = block.timestamp;\n emit Staked(_pool.addr, _amount);\n }\n\n /**\n * @dev See `ICandidateStaking-unstake`\n */\n function _unstake(\n PoolDetail storage _pool,\n address _requester,\n uint256 _amount\n ) internal onlyPoolAdmin(_pool, _requester) {\n if (_amount > _pool.stakingAmount) revert ErrInsufficientStakingAmount();\n if (_pool.lastDelegatingTimestamp[_requester] + _cooldownSecsToUndelegate > block.timestamp) {\n revert ErrUnstakeTooEarly();\n }\n\n _pool.stakingAmount -= _amount;\n _changeDelegatingAmount(_pool, _requester, _pool.stakingAmount, _pool.stakingTotal - _amount);\n emit Unstaked(_pool.addr, _amount);\n }\n\n /**\n * @dev Deducts from staking amount of the validator `_consensusAddr` for `_amount`.\n *\n * Emits the event `Unstaked`.\n *\n * @return The actual deducted amount\n */\n function _deductStakingAmount(PoolDetail storage _pool, uint256 _amount) internal virtual returns (uint256);\n\n /**\n * @dev Sets the minimum threshold for being a validator candidate.\n *\n * Emits the `MinValidatorStakingAmountUpdated` event.\n *\n */\n function _setMinValidatorStakingAmount(uint256 _threshold) internal {\n _minValidatorStakingAmount = _threshold;\n emit MinValidatorStakingAmountUpdated(_threshold);\n }\n}\n" - }, - "contracts/ronin/staking/DelegatorStaking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../interfaces/staking/IDelegatorStaking.sol\";\nimport \"./BaseStaking.sol\";\n\nabstract contract DelegatorStaking is BaseStaking, IDelegatorStaking {\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc IDelegatorStaking\n */\n function delegate(address _consensusAddr) external payable noEmptyValue poolIsActive(_consensusAddr) {\n if (isAdminOfActivePool(msg.sender)) revert ErrAdminOfAnyActivePoolForbidden(msg.sender);\n _delegate(_stakingPool[_consensusAddr], msg.sender, msg.value);\n }\n\n /**\n * @inheritdoc IDelegatorStaking\n */\n function undelegate(address _consensusAddr, uint256 _amount) external nonReentrant {\n address payable _delegator = payable(msg.sender);\n _undelegate(_stakingPool[_consensusAddr], _delegator, _amount);\n if (!_sendRON(_delegator, _amount)) revert ErrCannotTransferRON();\n }\n\n /**\n * @inheritdoc IDelegatorStaking\n */\n function bulkUndelegate(address[] calldata _consensusAddrs, uint256[] calldata _amounts) external nonReentrant {\n if (_consensusAddrs.length == 0 || _consensusAddrs.length != _amounts.length) revert ErrInvalidArrays();\n\n address payable _delegator = payable(msg.sender);\n uint256 _total;\n\n for (uint _i = 0; _i < _consensusAddrs.length; _i++) {\n _total += _amounts[_i];\n _undelegate(_stakingPool[_consensusAddrs[_i]], _delegator, _amounts[_i]);\n }\n\n if (!_sendRON(_delegator, _total)) revert ErrCannotTransferRON();\n }\n\n /**\n * @inheritdoc IDelegatorStaking\n */\n function redelegate(\n address _consensusAddrSrc,\n address _consensusAddrDst,\n uint256 _amount\n ) external nonReentrant poolIsActive(_consensusAddrDst) {\n address _delegator = msg.sender;\n _undelegate(_stakingPool[_consensusAddrSrc], _delegator, _amount);\n _delegate(_stakingPool[_consensusAddrDst], _delegator, _amount);\n }\n\n /**\n * @inheritdoc IDelegatorStaking\n */\n function claimRewards(address[] calldata _consensusAddrList)\n external\n override\n nonReentrant\n returns (uint256 _amount)\n {\n _amount = _claimRewards(msg.sender, _consensusAddrList);\n _transferRON(payable(msg.sender), _amount);\n }\n\n /**\n * @inheritdoc IDelegatorStaking\n */\n function delegateRewards(address[] calldata _consensusAddrList, address _consensusAddrDst)\n external\n override\n nonReentrant\n poolIsActive(_consensusAddrDst)\n returns (uint256 _amount)\n {\n return _delegateRewards(msg.sender, _consensusAddrList, _consensusAddrDst);\n }\n\n /**\n * @inheritdoc IDelegatorStaking\n */\n function getRewards(address _user, address[] calldata _poolAddrList)\n external\n view\n returns (uint256[] memory _rewards)\n {\n address _consensusAddr;\n uint256 _period = _validatorContract.currentPeriod();\n _rewards = new uint256[](_poolAddrList.length);\n\n for (uint256 _i = 0; _i < _poolAddrList.length; _i++) {\n _consensusAddr = _poolAddrList[_i];\n _rewards[_i] = _getReward(_consensusAddr, _user, _period, getStakingAmount(_consensusAddr, _user));\n }\n }\n\n /**\n * @dev Delegates from a validator address.\n *\n * Requirements:\n * - The delegator is not the pool admin.\n *\n * Emits the `Delegated` event.\n *\n * Note: This function does not verify the `msg.value` with the amount.\n *\n */\n function _delegate(\n PoolDetail storage _pool,\n address _delegator,\n uint256 _amount\n ) internal notPoolAdmin(_pool, _delegator) {\n _changeDelegatingAmount(\n _pool,\n _delegator,\n _pool.delegatingAmount[_delegator] + _amount,\n _pool.stakingTotal + _amount\n );\n _pool.lastDelegatingTimestamp[_delegator] = block.timestamp;\n emit Delegated(_delegator, _pool.addr, _amount);\n }\n\n /**\n * @dev Undelegates from a validator address.\n *\n * Requirements:\n * - The delegator is not the pool admin.\n * - The amount is larger than 0.\n * - The delegating amount is larger than or equal to the undelegating amount.\n *\n * Emits the `Undelegated` event.\n *\n * Note: Consider transferring back the amount of RON after calling this function.\n *\n */\n function _undelegate(\n PoolDetail storage _pool,\n address _delegator,\n uint256 _amount\n ) private notPoolAdmin(_pool, _delegator) {\n if (_amount == 0) revert ErrUndelegateZeroAmount();\n if (_pool.delegatingAmount[_delegator] < _amount) revert ErrInsufficientDelegatingAmount();\n if (_pool.lastDelegatingTimestamp[_delegator] + _cooldownSecsToUndelegate >= block.timestamp) {\n revert ErrUndelegateTooEarly();\n }\n\n _changeDelegatingAmount(\n _pool,\n _delegator,\n _pool.delegatingAmount[_delegator] - _amount,\n _pool.stakingTotal - _amount\n );\n emit Undelegated(_delegator, _pool.addr, _amount);\n }\n\n /**\n * @dev Claims rewards from the pools `_poolAddrList`.\n * Note: This function does not transfer reward to user.\n */\n function _claimRewards(address _user, address[] memory _poolAddrList) internal returns (uint256 _amount) {\n uint256 _period = _currentPeriod();\n for (uint256 _i = 0; _i < _poolAddrList.length; _i++) {\n _amount += _claimReward(_poolAddrList[_i], _user, _period);\n }\n }\n\n /**\n * @dev Claims the rewards and delegates them to the consensus address.\n */\n function _delegateRewards(\n address _user,\n address[] calldata _poolAddrList,\n address _poolAddrDst\n ) internal returns (uint256 _amount) {\n _amount = _claimRewards(_user, _poolAddrList);\n _delegate(_stakingPool[_poolAddrDst], _user, _amount);\n }\n}\n" - }, - "contracts/ronin/staking/BaseStaking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport \"../../extensions/RONTransferHelper.sol\";\nimport \"../../extensions/collections/HasValidatorContract.sol\";\nimport \"../../interfaces/staking/IBaseStaking.sol\";\nimport \"../../libraries/Math.sol\";\nimport \"./RewardCalculation.sol\";\n\nabstract contract BaseStaking is\n RONTransferHelper,\n ReentrancyGuard,\n RewardCalculation,\n HasValidatorContract,\n IBaseStaking\n{\n /// @dev Mapping from pool address => staking pool detail\n mapping(address => PoolDetail) internal _stakingPool;\n\n /// @dev The cooldown time in seconds to undelegate from the last timestamp (s)he delegated.\n uint256 internal _cooldownSecsToUndelegate;\n /// @dev The number of seconds that a candidate must wait to be revoked and take the self-staking amount back.\n uint256 internal _waitingSecsToRevoke;\n\n /// @dev Mapping from admin address of an active pool => consensus address.\n mapping(address => address) internal _adminOfActivePoolMapping;\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[49] private ______gap;\n\n modifier noEmptyValue() {\n if (msg.value == 0) revert ErrZeroValue();\n _;\n }\n\n modifier notPoolAdmin(PoolDetail storage _pool, address _delegator) {\n if (_pool.admin == _delegator) revert ErrPoolAdminForbidden();\n _;\n }\n\n modifier onlyPoolAdmin(PoolDetail storage _pool, address _requester) {\n if (_pool.admin != _requester) revert ErrOnlyPoolAdminAllowed();\n _;\n }\n\n modifier poolIsActive(address _poolAddr) {\n if (!_validatorContract.isValidatorCandidate(_poolAddr)) revert ErrInactivePool(_poolAddr);\n _;\n }\n\n /**\n * @inheritdoc IBaseStaking\n */\n function isAdminOfActivePool(address _poolAdminAddr) public view override returns (bool) {\n return _adminOfActivePoolMapping[_poolAdminAddr] != address(0);\n }\n\n /**\n * @inheritdoc IBaseStaking\n */\n function getPoolAddressOf(address _poolAdminAddr) external view override returns (address) {\n return _adminOfActivePoolMapping[_poolAdminAddr];\n }\n\n /**\n * @inheritdoc IBaseStaking\n */\n function getPoolDetail(address _poolAddr)\n external\n view\n returns (\n address _admin,\n uint256 _stakingAmount,\n uint256 _stakingTotal\n )\n {\n PoolDetail storage _pool = _stakingPool[_poolAddr];\n return (_pool.admin, _pool.stakingAmount, _pool.stakingTotal);\n }\n\n /**\n * @inheritdoc IBaseStaking\n */\n function getManySelfStakings(address[] calldata _pools) external view returns (uint256[] memory _selfStakings) {\n _selfStakings = new uint256[](_pools.length);\n for (uint _i = 0; _i < _pools.length; _i++) {\n _selfStakings[_i] = _stakingPool[_pools[_i]].stakingAmount;\n }\n }\n\n /**\n * @inheritdoc IRewardPool\n */\n function getStakingTotal(address _poolAddr) public view override returns (uint256) {\n return _stakingPool[_poolAddr].stakingTotal;\n }\n\n /**\n * @inheritdoc IRewardPool\n */\n function getManyStakingTotals(address[] calldata _poolList)\n public\n view\n override\n returns (uint256[] memory _stakingAmounts)\n {\n _stakingAmounts = new uint256[](_poolList.length);\n for (uint _i = 0; _i < _poolList.length; _i++) {\n _stakingAmounts[_i] = getStakingTotal(_poolList[_i]);\n }\n }\n\n /**\n * @inheritdoc IRewardPool\n */\n function getStakingAmount(address _poolAddr, address _user) public view override returns (uint256) {\n return _stakingPool[_poolAddr].delegatingAmount[_user];\n }\n\n /**\n * @inheritdoc IRewardPool\n */\n function getManyStakingAmounts(address[] calldata _poolAddrs, address[] calldata _userList)\n external\n view\n override\n returns (uint256[] memory _stakingAmounts)\n {\n if (_poolAddrs.length != _userList.length) revert ErrInvalidArrays();\n _stakingAmounts = new uint256[](_poolAddrs.length);\n for (uint _i = 0; _i < _stakingAmounts.length; _i++) {\n _stakingAmounts[_i] = _stakingPool[_poolAddrs[_i]].delegatingAmount[_userList[_i]];\n }\n }\n\n /**\n * @inheritdoc IBaseStaking\n */\n function cooldownSecsToUndelegate() external view returns (uint256) {\n return _cooldownSecsToUndelegate;\n }\n\n /**\n * @inheritdoc IBaseStaking\n */\n function waitingSecsToRevoke() external view returns (uint256) {\n return _waitingSecsToRevoke;\n }\n\n /**\n * @inheritdoc IBaseStaking\n */\n function setCooldownSecsToUndelegate(uint256 _cooldownSecs) external override onlyAdmin {\n _setCooldownSecsToUndelegate(_cooldownSecs);\n }\n\n /**\n * @inheritdoc IBaseStaking\n */\n function setWaitingSecsToRevoke(uint256 _secs) external override onlyAdmin {\n _setWaitingSecsToRevoke(_secs);\n }\n\n /**\n * @dev Sets the minium number of seconds to undelegate.\n *\n * Emits the event `CooldownSecsToUndelegateUpdated`.\n *\n */\n function _setCooldownSecsToUndelegate(uint256 _cooldownSecs) internal {\n _cooldownSecsToUndelegate = _cooldownSecs;\n emit CooldownSecsToUndelegateUpdated(_cooldownSecs);\n }\n\n /**\n * @dev Sets the number of seconds that a candidate must wait to be revoked.\n *\n * Emits the event `WaitingSecsToRevokeUpdated`.\n *\n */\n function _setWaitingSecsToRevoke(uint256 _secs) internal {\n _waitingSecsToRevoke = _secs;\n emit WaitingSecsToRevokeUpdated(_secs);\n }\n\n /**\n * @dev Changes the delegate amount.\n */\n function _changeDelegatingAmount(\n PoolDetail storage _pool,\n address _delegator,\n uint256 _newDelegatingAmount,\n uint256 _newStakingTotal\n ) internal {\n _syncUserReward(_pool.addr, _delegator, _newDelegatingAmount);\n _pool.stakingTotal = _newStakingTotal;\n _pool.delegatingAmount[_delegator] = _newDelegatingAmount;\n }\n}\n" - }, - "@openzeppelin/contracts/security/ReentrancyGuard.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\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 ReentrancyGuard {\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 constructor() {\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 making 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}\n" - }, - "contracts/libraries/Math.sol": { - "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity ^0.8.0;\n\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns whether the number `c` is in range of [a; b].\n */\n function inRange(\n uint256 c,\n uint256 a,\n uint256 b\n ) internal pure returns (bool) {\n return a <= c && c <= b;\n }\n\n /**\n * @dev Returns whether two inclusive ranges [x1;x2] and [y1;y2] overlap.\n */\n function twoRangeOverlap(\n uint256 x1,\n uint256 x2,\n uint256 y1,\n uint256 y2\n ) internal pure returns (bool) {\n return x1 <= y2 && y1 <= x2;\n }\n\n /**\n * @dev Returns value of a + b; in case result is larger than upperbound, upperbound is returned.\n */\n function addWithUpperbound(\n uint256 a,\n uint256 b,\n uint256 upperbound\n ) internal pure returns (uint256) {\n return min(a + b, upperbound);\n }\n\n /**\n * @dev Returns value of a - b; in case of negative result, 0 is returned.\n */\n function subNonNegative(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - min(a, b);\n }\n}\n" - }, - "contracts/ronin/staking/RewardCalculation.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../interfaces/staking/IRewardPool.sol\";\nimport \"../../libraries/Math.sol\";\n\n/**\n * @title RewardCalculation contract\n * @dev This contract mainly contains the methods to calculate reward for staking contract.\n */\nabstract contract RewardCalculation is IRewardPool {\n /// @dev Mapping from pool address => period number => accumulated rewards per share (one unit staking)\n mapping(address => mapping(uint256 => PeriodWrapper)) private _accumulatedRps;\n /// @dev Mapping from the pool address => user address => the reward info of the user\n mapping(address => mapping(address => UserRewardFields)) private _userReward;\n /// @dev Mapping from the pool address => reward pool fields\n mapping(address => PoolFields) private _stakingPool;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc IRewardPool\n */\n function getReward(address _poolAddr, address _user) external view returns (uint256) {\n return _getReward(_poolAddr, _user, _currentPeriod(), getStakingAmount(_poolAddr, _user));\n }\n\n /**\n * @inheritdoc IRewardPool\n */\n function getStakingAmount(address _poolAddr, address _user) public view virtual returns (uint256);\n\n /**\n * @inheritdoc IRewardPool\n */\n function getStakingTotal(address _poolAddr) public view virtual returns (uint256);\n\n /**\n * @dev Returns the reward amount that user claimable.\n */\n function _getReward(\n address _poolAddr,\n address _user,\n uint256 _latestPeriod,\n uint256 _latestStakingAmount\n ) internal view returns (uint256) {\n UserRewardFields storage _reward = _userReward[_poolAddr][_user];\n\n if (_reward.lastPeriod == _latestPeriod) {\n return _reward.debited;\n }\n\n uint256 _aRps;\n uint256 _lastPeriodReward;\n PoolFields storage _pool = _stakingPool[_poolAddr];\n PeriodWrapper storage _wrappedArps = _accumulatedRps[_poolAddr][_reward.lastPeriod];\n\n if (_wrappedArps.lastPeriod > 0) {\n // Calculates the last period reward if the aRps at the period is set\n _aRps = _wrappedArps.inner;\n _lastPeriodReward = _reward.lowestAmount * (_aRps - _reward.aRps);\n } else {\n // Fallbacks to the previous aRps in case the aRps is not set\n _aRps = _reward.aRps;\n }\n\n uint256 _newPeriodsReward = _latestStakingAmount * (_pool.aRps - _aRps);\n return _reward.debited + (_lastPeriodReward + _newPeriodsReward) / 1e18;\n }\n\n /**\n * @dev Syncs the user reward.\n *\n * Emits the event `UserRewardUpdated` once the debit amount is updated.\n * Emits the event `PoolSharesUpdated` once the pool share is updated.\n *\n * Note: The method should be called whenever the user's staking amount changes.\n *\n */\n function _syncUserReward(\n address _poolAddr,\n address _user,\n uint256 _newStakingAmount\n ) internal {\n uint256 _period = _currentPeriod();\n PoolFields storage _pool = _stakingPool[_poolAddr];\n uint256 _lastShares = _pool.shares.inner;\n\n // Updates the pool shares if it is outdated\n if (_pool.shares.lastPeriod < _period) {\n _pool.shares = PeriodWrapper(getStakingTotal(_poolAddr), _period);\n }\n\n UserRewardFields storage _reward = _userReward[_poolAddr][_user];\n uint256 _currentStakingAmount = getStakingAmount(_poolAddr, _user);\n uint256 _debited = _getReward(_poolAddr, _user, _period, _currentStakingAmount);\n\n if (_reward.debited != _debited) {\n _reward.debited = _debited;\n emit UserRewardUpdated(_poolAddr, _user, _debited);\n }\n\n _syncMinStakingAmount(_pool, _reward, _period, _newStakingAmount, _currentStakingAmount);\n _reward.aRps = _pool.aRps;\n _reward.lastPeriod = _period;\n\n if (_pool.shares.inner != _lastShares) {\n emit PoolSharesUpdated(_period, _poolAddr, _pool.shares.inner);\n }\n }\n\n /**\n * @dev Syncs the minimum staking amount of an user in the current period.\n */\n function _syncMinStakingAmount(\n PoolFields storage _pool,\n UserRewardFields storage _reward,\n uint256 _latestPeriod,\n uint256 _newStakingAmount,\n uint256 _currentStakingAmount\n ) internal {\n if (_reward.lastPeriod < _latestPeriod) {\n _reward.lowestAmount = _currentStakingAmount;\n }\n\n uint256 _lowestAmount = Math.min(_reward.lowestAmount, _newStakingAmount);\n uint256 _diffAmount = _reward.lowestAmount - _lowestAmount;\n if (_diffAmount > 0) {\n _reward.lowestAmount = _lowestAmount;\n if (_pool.shares.inner < _diffAmount) revert ErrInvalidPoolShare();\n _pool.shares.inner -= _diffAmount;\n }\n }\n\n /**\n * @dev Claims the settled reward for a specific user.\n *\n * @param _lastPeriod Must be in two possible value: `_currentPeriod` in normal calculation, or\n * `_currentPeriod + 1` in case of calculating the reward for revoked validators.\n *\n * Emits the `RewardClaimed` event and the `UserRewardUpdated` event.\n *\n * Note: This method should be called before transferring rewards for the user.\n *\n */\n function _claimReward(\n address _poolAddr,\n address _user,\n uint256 _lastPeriod\n ) internal returns (uint256 _amount) {\n uint256 _currentStakingAmount = getStakingAmount(_poolAddr, _user);\n _amount = _getReward(_poolAddr, _user, _lastPeriod, _currentStakingAmount);\n emit RewardClaimed(_poolAddr, _user, _amount);\n\n UserRewardFields storage _reward = _userReward[_poolAddr][_user];\n _reward.debited = 0;\n _syncMinStakingAmount(_stakingPool[_poolAddr], _reward, _lastPeriod, _currentStakingAmount, _currentStakingAmount);\n _reward.lastPeriod = _lastPeriod;\n _reward.aRps = _stakingPool[_poolAddr].aRps;\n emit UserRewardUpdated(_poolAddr, _user, 0);\n }\n\n /**\n * @dev Records the amount of rewards `_rewards` for the pools `_poolAddrs`.\n *\n * Emits the event `PoolsUpdated` once the contract recorded the rewards successfully.\n * Emits the event `PoolsUpdateFailed` once the input array lengths are not equal.\n * Emits the event `PoolUpdateConflicted` when the pool is already updated in the period.\n *\n * Note: This method should be called once at the period ending.\n *\n */\n function _recordRewards(\n address[] memory _poolAddrs,\n uint256[] calldata _rewards,\n uint256 _period\n ) internal {\n if (_poolAddrs.length != _rewards.length) {\n emit PoolsUpdateFailed(_period, _poolAddrs, _rewards);\n return;\n }\n\n uint256 _rps;\n uint256 _count;\n address _poolAddr;\n uint256 _stakingTotal;\n uint256[] memory _aRps = new uint256[](_poolAddrs.length);\n uint256[] memory _shares = new uint256[](_poolAddrs.length);\n address[] memory _conflicted = new address[](_poolAddrs.length);\n\n for (uint _i = 0; _i < _poolAddrs.length; _i++) {\n _poolAddr = _poolAddrs[_i];\n PoolFields storage _pool = _stakingPool[_poolAddr];\n _stakingTotal = getStakingTotal(_poolAddr);\n\n if (_accumulatedRps[_poolAddr][_period].lastPeriod == _period) {\n _conflicted[_count++] = _poolAddr;\n continue;\n }\n\n // Updates the pool shares if it is outdated\n if (_pool.shares.lastPeriod < _period) {\n _pool.shares = PeriodWrapper(_stakingTotal, _period);\n }\n\n // The rps is 0 if no one stakes for the pool\n _rps = _pool.shares.inner == 0 ? 0 : (_rewards[_i] * 1e18) / _pool.shares.inner;\n _aRps[_i - _count] = _pool.aRps += _rps;\n _accumulatedRps[_poolAddr][_period] = PeriodWrapper(_pool.aRps, _period);\n _pool.shares.inner = _stakingTotal;\n _shares[_i - _count] = _pool.shares.inner;\n _poolAddrs[_i - _count] = _poolAddr;\n }\n\n if (_count > 0) {\n assembly {\n mstore(_conflicted, _count)\n mstore(_poolAddrs, sub(mload(_poolAddrs), _count))\n }\n emit PoolsUpdateConflicted(_period, _conflicted);\n }\n\n if (_poolAddrs.length > 0) {\n emit PoolsUpdated(_period, _poolAddrs, _aRps, _shares);\n }\n }\n\n /**\n * @dev Returns the current period.\n */\n function _currentPeriod() internal view virtual returns (uint256);\n}\n" - }, - "contracts/ronin/Maintenance.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../interfaces/IMaintenance.sol\";\nimport \"../interfaces/validator/IRoninValidatorSet.sol\";\nimport \"../extensions/collections/HasValidatorContract.sol\";\nimport \"../libraries/Math.sol\";\n\ncontract Maintenance is IMaintenance, HasValidatorContract, Initializable {\n using Math for uint256;\n\n /// @dev Mapping from consensus address => maintenance schedule.\n mapping(address => Schedule) internal _schedule;\n\n /// @dev The min duration to maintenance in blocks.\n uint256 public minMaintenanceDurationInBlock;\n /// @dev The max duration to maintenance in blocks.\n uint256 public maxMaintenanceDurationInBlock;\n /// @dev The offset to the min block number that the schedule can start.\n uint256 public minOffsetToStartSchedule;\n /// @dev The offset to the max block number that the schedule can start.\n uint256 public maxOffsetToStartSchedule;\n /// @dev The max number of scheduled maintenances.\n uint256 public maxSchedules;\n\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes the contract storage.\n */\n function initialize(\n address __validatorContract,\n uint256 _minMaintenanceDurationInBlock,\n uint256 _maxMaintenanceDurationInBlock,\n uint256 _minOffsetToStartSchedule,\n uint256 _maxOffsetToStartSchedule,\n uint256 _maxSchedules\n ) external initializer {\n _setValidatorContract(__validatorContract);\n _setMaintenanceConfig(\n _minMaintenanceDurationInBlock,\n _maxMaintenanceDurationInBlock,\n _minOffsetToStartSchedule,\n _maxOffsetToStartSchedule,\n _maxSchedules\n );\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function setMaintenanceConfig(\n uint256 _minMaintenanceDurationInBlock,\n uint256 _maxMaintenanceDurationInBlock,\n uint256 _minOffsetToStartSchedule,\n uint256 _maxOffsetToStartSchedule,\n uint256 _maxSchedules\n ) external onlyAdmin {\n _setMaintenanceConfig(\n _minMaintenanceDurationInBlock,\n _maxMaintenanceDurationInBlock,\n _minOffsetToStartSchedule,\n _maxOffsetToStartSchedule,\n _maxSchedules\n );\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function schedule(\n address _consensusAddr,\n uint256 _startedAtBlock,\n uint256 _endedAtBlock\n ) external override {\n IRoninValidatorSet _validator = _validatorContract;\n\n require(_validator.isBlockProducer(_consensusAddr), \"Maintenance: consensus address must be a block producer\");\n require(\n _validator.isCandidateAdmin(_consensusAddr, msg.sender),\n \"Maintenance: method caller must be a candidate admin\"\n );\n require(!checkScheduled(_consensusAddr), \"Maintenance: already scheduled\");\n require(totalSchedules() < maxSchedules, \"Maintenance: exceeds total of schedules\");\n require(\n _startedAtBlock.inRange(block.number + minOffsetToStartSchedule, block.number + maxOffsetToStartSchedule),\n \"Maintenance: start block is out of offset\"\n );\n require(_startedAtBlock < _endedAtBlock, \"Maintenance: start block must be less than end block\");\n uint256 _blockPeriod = _endedAtBlock - _startedAtBlock;\n require(\n _blockPeriod.inRange(minMaintenanceDurationInBlock, maxMaintenanceDurationInBlock),\n \"Maintenance: invalid maintenance duration\"\n );\n require(_validator.epochEndingAt(_startedAtBlock - 1), \"Maintenance: start block is not at the start of an epoch\");\n require(_validator.epochEndingAt(_endedAtBlock), \"Maintenance: end block is not at the end of an epoch\");\n\n Schedule storage _sSchedule = _schedule[_consensusAddr];\n _sSchedule.from = _startedAtBlock;\n _sSchedule.to = _endedAtBlock;\n _sSchedule.lastUpdatedBlock = block.number;\n emit MaintenanceScheduled(_consensusAddr, _sSchedule);\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function getSchedule(address _consensusAddr) external view returns (Schedule memory) {\n return _schedule[_consensusAddr];\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function checkManyMaintained(address[] calldata _addrList, uint256 _block)\n external\n view\n override\n returns (bool[] memory _resList)\n {\n _resList = new bool[](_addrList.length);\n for (uint _i = 0; _i < _addrList.length; _i++) {\n _resList[_i] = checkMaintained(_addrList[_i], _block);\n }\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function checkManyMaintainedInBlockRange(\n address[] calldata _addrList,\n uint256 _fromBlock,\n uint256 _toBlock\n ) external view override returns (bool[] memory _resList) {\n _resList = new bool[](_addrList.length);\n for (uint _i = 0; _i < _addrList.length; _i++) {\n _resList[_i] = _maintainingInBlockRange(_addrList[_i], _fromBlock, _toBlock);\n }\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function totalSchedules() public view override returns (uint256 _count) {\n address[] memory _validators = _validatorContract.getValidators();\n for (uint _i = 0; _i < _validators.length; _i++) {\n if (checkScheduled(_validators[_i])) {\n _count++;\n }\n }\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function checkMaintained(address _consensusAddr, uint256 _block) public view returns (bool) {\n Schedule storage _s = _schedule[_consensusAddr];\n return _s.from <= _block && _block <= _s.to;\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function checkMaintainedInBlockRange(\n address _consensusAddr,\n uint256 _fromBlock,\n uint256 _toBlock\n ) public view override returns (bool) {\n return _maintainingInBlockRange(_consensusAddr, _fromBlock, _toBlock);\n }\n\n /**\n * @inheritdoc IMaintenance\n */\n function checkScheduled(address _consensusAddr) public view override returns (bool) {\n return block.number <= _schedule[_consensusAddr].to;\n }\n\n /**\n * @dev Sets the min block period and max block period to maintenance.\n *\n * Requirements:\n * - The max period is larger than the min period.\n *\n * Emits the event `MaintenanceConfigUpdated`.\n *\n */\n function _setMaintenanceConfig(\n uint256 _minMaintenanceDurationInBlock,\n uint256 _maxMaintenanceDurationInBlock,\n uint256 _minOffsetToStartSchedule,\n uint256 _maxOffsetToStartSchedule,\n uint256 _maxSchedules\n ) internal {\n require(\n _minMaintenanceDurationInBlock < _maxMaintenanceDurationInBlock,\n \"Maintenance: invalid maintenance duration configs\"\n );\n require(\n _minOffsetToStartSchedule < _maxOffsetToStartSchedule,\n \"Maintenance: invalid offset to start schedule configs\"\n );\n minMaintenanceDurationInBlock = _minMaintenanceDurationInBlock;\n maxMaintenanceDurationInBlock = _maxMaintenanceDurationInBlock;\n minOffsetToStartSchedule = _minOffsetToStartSchedule;\n maxOffsetToStartSchedule = _maxOffsetToStartSchedule;\n maxSchedules = _maxSchedules;\n emit MaintenanceConfigUpdated(\n _minMaintenanceDurationInBlock,\n _maxMaintenanceDurationInBlock,\n _minOffsetToStartSchedule,\n _maxOffsetToStartSchedule,\n _maxSchedules\n );\n }\n\n /**\n * @dev Check if the validator was maintaining in the current period.\n *\n * Note: This method should be called at the end of the period.\n */\n function _maintainingInBlockRange(\n address _consensusAddr,\n uint256 _fromBlock,\n uint256 _toBlock\n ) private view returns (bool) {\n Schedule storage _s = _schedule[_consensusAddr];\n return Math.twoRangeOverlap(_fromBlock, _toBlock, _s.from, _s.to);\n }\n}\n" - }, - "contracts/interfaces/IMaintenance.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface IMaintenance {\n struct Schedule {\n uint256 from;\n uint256 to;\n uint256 lastUpdatedBlock;\n }\n\n /// @dev Emitted when a maintenance is scheduled.\n event MaintenanceScheduled(address indexed consensusAddr, Schedule);\n /// @dev Emitted when the maintenance config is updated.\n event MaintenanceConfigUpdated(\n uint256 minMaintenanceDurationInBlock,\n uint256 maxMaintenanceDurationInBlock,\n uint256 minOffsetToStartSchedule,\n uint256 maxOffsetToStartSchedule,\n uint256 maxSchedules\n );\n\n /**\n * @dev Returns whether the validator `_consensusAddr` maintained at the block number `_block`.\n */\n function checkMaintained(address _consensusAddr, uint256 _block) external view returns (bool);\n\n /**\n * @dev Returns whether the validator `_consensusAddr` maintained in the inclusive range [`_fromBlock`, `_toBlock`] of blocks.\n */\n function checkMaintainedInBlockRange(\n address _consensusAddr,\n uint256 _fromBlock,\n uint256 _toBlock\n ) external view returns (bool);\n\n /**\n * @dev Returns the bool array indicating the validators maintained at block number `_block` or not.\n */\n function checkManyMaintained(address[] calldata _addrList, uint256 _block) external view returns (bool[] memory);\n\n /**\n * @dev Returns a bool array indicating the validators maintained in the inclusive range [`_fromBlock`, `_toBlock`] of blocks or not.\n */\n function checkManyMaintainedInBlockRange(\n address[] calldata _addrList,\n uint256 _fromBlock,\n uint256 _toBlock\n ) external view returns (bool[] memory);\n\n /**\n * @dev Returns whether the validator `_consensusAddr` has scheduled.\n */\n function checkScheduled(address _consensusAddr) external view returns (bool);\n\n /**\n * @dev Returns the detailed schedule of the validator `_consensusAddr`.\n */\n function getSchedule(address _consensusAddr) external view returns (Schedule memory);\n\n /**\n * @dev Returns the total of current schedules.\n */\n function totalSchedules() external view returns (uint256 _count);\n\n /**\n * @dev Sets the duration restriction, start time restriction, and max allowed for maintenance.\n *\n * Requirements:\n * - The method caller is admin.\n * - The max duration is larger than the min duration.\n * - The max offset is larger than the min offset.\n *\n * Emits the event `MaintenanceConfigUpdated`.\n *\n */\n function setMaintenanceConfig(\n uint256 _minMaintenanceDurationInBlock,\n uint256 _maxMaintenanceDurationInBlock,\n uint256 _minOffsetToStartSchedule,\n uint256 _maxOffsetToStartSchedule,\n uint256 _maxSchedules\n ) external;\n\n /**\n * @dev Returns the min duration for maintenance in block.\n */\n function minMaintenanceDurationInBlock() external view returns (uint256);\n\n /**\n * @dev Returns the max duration for maintenance in block.\n */\n function maxMaintenanceDurationInBlock() external view returns (uint256);\n\n /**\n * @dev The offset to the min block number that the schedule can start\n */\n function minOffsetToStartSchedule() external view returns (uint256);\n\n /**\n * @dev The offset to the max block number that the schedule can start\n */\n function maxOffsetToStartSchedule() external view returns (uint256);\n\n /**\n * @dev Returns the max number of scheduled maintenances.\n */\n function maxSchedules() external view returns (uint256);\n\n /**\n * @dev Schedules for maintenance from `_startedAtBlock` to `_startedAtBlock`.\n *\n * Requirements:\n * - The candidate `_consensusAddr` is the block producer.\n * - The method caller is candidate admin of the candidate `_consensusAddr`.\n * - The candidate `_consensusAddr` has no schedule yet or the previous is done.\n * - The total number of schedules is not larger than `maxSchedules()`.\n * - The start block must be at least `minOffsetToStartSchedule()` and at most `maxOffsetToStartSchedule()` blocks from the current block.\n * - The end block is larger than the start block.\n * - The scheduled duration is larger than the `minMaintenanceDurationInBlock()` and less than the `maxMaintenanceDurationInBlock()`.\n * - The start block is at the start of an epoch.\n * - The end block is at the end of an epoch.\n *\n * Emits the event `MaintenanceScheduled`.\n *\n */\n function schedule(\n address _consensusAddr,\n uint256 _startedAtBlock,\n uint256 _endedAtBlock\n ) external;\n}\n" - }, - "contracts/extensions/collections/HasMaintenanceContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasMaintenanceContract.sol\";\nimport \"../../interfaces/IMaintenance.sol\";\n\ncontract HasMaintenanceContract is IHasMaintenanceContract, HasProxyAdmin {\n IMaintenance internal _maintenanceContract;\n\n modifier onlyMaintenanceContract() {\n if (maintenanceContract() != msg.sender) revert ErrCallerMustBeMaintenanceContract();\n _;\n }\n\n /**\n * @inheritdoc IHasMaintenanceContract\n */\n function maintenanceContract() public view override returns (address) {\n return address(_maintenanceContract);\n }\n\n /**\n * @inheritdoc IHasMaintenanceContract\n */\n function setMaintenanceContract(address _addr) external override onlyAdmin {\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\n _setMaintenanceContract(_addr);\n }\n\n /**\n * @dev Sets the scheduled maintenance contract.\n *\n * Emits the event `MaintenanceContractUpdated`.\n *\n */\n function _setMaintenanceContract(address _addr) internal {\n _maintenanceContract = IMaintenance(_addr);\n emit MaintenanceContractUpdated(_addr);\n }\n}\n" - }, - "contracts/interfaces/collections/IHasMaintenanceContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasMaintenanceContract is IHasContract {\n /// @dev Emitted when the maintenance contract is updated.\n event MaintenanceContractUpdated(address);\n\n /// @dev Error of method caller must be maintenance contract.\n error ErrCallerMustBeMaintenanceContract();\n\n /**\n * @dev Returns the maintenance contract.\n */\n function maintenanceContract() external view returns (address);\n\n /**\n * @dev Sets the maintenance contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `MaintenanceContractUpdated`.\n *\n */\n function setMaintenanceContract(address) external;\n}\n" - }, - "contracts/ronin/validator/CoinbaseExecution.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../extensions/collections/HasBridgeTrackingContract.sol\";\nimport \"../../extensions/collections/HasMaintenanceContract.sol\";\nimport \"../../extensions/collections/HasSlashIndicatorContract.sol\";\nimport \"../../extensions/collections/HasStakingVestingContract.sol\";\nimport \"../../extensions/RONTransferHelper.sol\";\nimport \"../../interfaces/validator/ICoinbaseExecution.sol\";\nimport \"../../libraries/EnumFlags.sol\";\nimport \"../../libraries/Math.sol\";\nimport \"../../precompile-usages/PCUSortValidators.sol\";\nimport \"../../precompile-usages/PCUPickValidatorSet.sol\";\nimport \"./storage-fragments/CommonStorage.sol\";\nimport \"./CandidateManager.sol\";\nimport \"./EmergencyExit.sol\";\n\nabstract contract CoinbaseExecution is\n ICoinbaseExecution,\n RONTransferHelper,\n PCUSortValidators,\n PCUPickValidatorSet,\n HasStakingVestingContract,\n HasBridgeTrackingContract,\n HasMaintenanceContract,\n HasSlashIndicatorContract,\n EmergencyExit\n{\n using EnumFlags for EnumFlags.ValidatorFlag;\n\n modifier onlyCoinbase() {\n if (msg.sender != block.coinbase) revert ErrCallerMustBeCoinbase();\n _;\n }\n\n modifier whenEpochEnding() {\n if (!epochEndingAt(block.number)) revert ErrAtEndOfEpochOnly();\n _;\n }\n\n modifier oncePerEpoch() {\n if (epochOf(_lastUpdatedBlock) >= epochOf(block.number)) revert ErrAlreadyWrappedEpoch();\n _lastUpdatedBlock = block.number;\n _;\n }\n\n /**\n * @inheritdoc ICoinbaseExecution\n */\n function submitBlockReward() external payable override onlyCoinbase {\n uint256 _submittedReward = msg.value;\n address _coinbaseAddr = msg.sender;\n bool _requestForBlockProducer = isBlockProducer(_coinbaseAddr) &&\n !_jailed(_coinbaseAddr) &&\n !_miningRewardDeprecated(_coinbaseAddr, currentPeriod());\n bool _requestForBridgeOperator = true;\n\n (, uint256 _blockProducerBonus, uint256 _bridgeOperatorBonus) = _stakingVestingContract.requestBonus(\n _requestForBlockProducer,\n _requestForBridgeOperator\n );\n\n _totalBridgeReward += _bridgeOperatorBonus;\n\n // Deprecates reward for non-validator or slashed validator\n if (!_requestForBlockProducer) {\n _totalDeprecatedReward += _submittedReward;\n emit BlockRewardDeprecated(_coinbaseAddr, _submittedReward, BlockRewardDeprecatedType.UNAVAILABILITY);\n return;\n }\n\n emit BlockRewardSubmitted(_coinbaseAddr, _submittedReward, _blockProducerBonus);\n\n uint256 _period = currentPeriod();\n uint256 _reward = _submittedReward + _blockProducerBonus;\n uint256 _cutOffReward;\n if (_miningRewardBailoutCutOffAtPeriod[_coinbaseAddr][_period]) {\n (, , , uint256 _cutOffPercentage) = _slashIndicatorContract.getCreditScoreConfigs();\n _cutOffReward = (_reward * _cutOffPercentage) / _MAX_PERCENTAGE;\n _totalDeprecatedReward += _cutOffReward;\n emit BlockRewardDeprecated(_coinbaseAddr, _cutOffReward, BlockRewardDeprecatedType.AFTER_BAILOUT);\n }\n\n _reward -= _cutOffReward;\n uint256 _rate = _candidateInfo[_coinbaseAddr].commissionRate;\n uint256 _miningAmount = (_rate * _reward) / _MAX_PERCENTAGE;\n _miningReward[_coinbaseAddr] += _miningAmount;\n\n uint256 _delegatingAmount = _reward - _miningAmount;\n _delegatingReward[_coinbaseAddr] += _delegatingAmount;\n }\n\n /**\n * @inheritdoc ICoinbaseExecution\n */\n function wrapUpEpoch() external payable virtual override onlyCoinbase whenEpochEnding oncePerEpoch {\n uint256 _newPeriod = _computePeriod(block.timestamp);\n bool _periodEnding = _isPeriodEnding(_newPeriod);\n\n address[] memory _currentValidators = getValidators();\n address[] memory _revokedCandidates;\n uint256 _epoch = epochOf(block.number);\n uint256 _nextEpoch = _epoch + 1;\n uint256 _lastPeriod = currentPeriod();\n\n if (_periodEnding) {\n _currentPeriodStartAtBlock = block.number + 1;\n _syncBridgeOperatingReward(_lastPeriod, _currentValidators);\n (\n uint256 _totalDelegatingReward,\n uint256[] memory _delegatingRewards\n ) = _distributeRewardToTreasuriesAndCalculateTotalDelegatingReward(_lastPeriod, _currentValidators);\n _settleAndTransferDelegatingRewards(_lastPeriod, _currentValidators, _totalDelegatingReward, _delegatingRewards);\n _tryRecycleLockedFundsFromEmergencyExits();\n _recycleDeprecatedRewards();\n _slashIndicatorContract.updateCreditScores(_currentValidators, _lastPeriod);\n (_currentValidators, _revokedCandidates) = _syncValidatorSet(_newPeriod);\n if (_revokedCandidates.length > 0) {\n _slashIndicatorContract.execResetCreditScores(_revokedCandidates);\n }\n }\n _revampRoles(_newPeriod, _nextEpoch, _currentValidators);\n emit WrappedUpEpoch(_lastPeriod, _epoch, _periodEnding);\n _periodOf[_nextEpoch] = _newPeriod;\n _lastUpdatedPeriod = _newPeriod;\n }\n\n /**\n * @dev This loop over the all current validators to sync the bridge operating reward.\n *\n * Note: This method should be called once in the end of each period.\n *\n */\n function _syncBridgeOperatingReward(uint256 _lastPeriod, address[] memory _currentValidators) internal {\n IBridgeTracking _bridgeTracking = _bridgeTrackingContract;\n uint256 _totalBridgeBallots = _bridgeTracking.totalBallots(_lastPeriod);\n uint256 _totalBridgeVotes = _bridgeTracking.totalVotes(_lastPeriod);\n address[] memory _correspondingBridgeOperators = getBridgeOperatorsOf(_currentValidators);\n uint256[] memory _bridgeBallots = _bridgeTracking.getManyTotalBallots(_lastPeriod, _correspondingBridgeOperators);\n (\n uint256 _missingVotesRatioTier1,\n uint256 _missingVotesRatioTier2,\n uint256 _jailDurationForMissingVotesRatioTier2,\n uint256 _skipBridgeOperatorSlashingThreshold\n ) = _slashIndicatorContract.getBridgeOperatorSlashingConfigs();\n for (uint _i = 0; _i < _currentValidators.length; _i++) {\n _updateValidatorRewardBaseOnBridgeOperatingPerformance(\n _lastPeriod,\n _currentValidators[_i],\n _bridgeBallots[_i],\n _totalBridgeVotes,\n _totalBridgeBallots,\n _missingVotesRatioTier1,\n _missingVotesRatioTier2,\n _jailDurationForMissingVotesRatioTier2,\n _skipBridgeOperatorSlashingThreshold\n );\n }\n }\n\n /**\n * @dev Updates validator reward based on the corresponding bridge operator performance.\n */\n function _updateValidatorRewardBaseOnBridgeOperatingPerformance(\n uint256 _period,\n address _validator,\n uint256 _validatorBallots,\n uint256 _totalVotes,\n uint256 _totalBallots,\n uint256 _ratioTier1,\n uint256 _ratioTier2,\n uint256 _jailDurationTier2,\n uint256 _skipBridgeOperatorSlashingThreshold\n ) internal {\n // Shares equally in case the bridge has nothing to votes\n bool _emptyBallot = _totalBallots == 0;\n if (_emptyBallot && _totalVotes == 0) {\n _bridgeOperatingReward[_validator] = _totalBridgeReward / totalBridgeOperators();\n return;\n } else if (_emptyBallot) {\n return;\n }\n\n // Skips slashing in case the total number of votes is too small\n if (_totalVotes <= _skipBridgeOperatorSlashingThreshold) {\n _bridgeOperatingReward[_validator] = (_totalBridgeReward * _validatorBallots) / _totalBallots;\n return;\n }\n\n uint256 _votedRatio = (_validatorBallots * _MAX_PERCENTAGE) / _totalVotes;\n uint256 _missedRatio = _MAX_PERCENTAGE - _votedRatio;\n if (_missedRatio > _ratioTier2) {\n _bridgeRewardDeprecatedAtPeriod[_validator][_period] = true;\n _miningRewardDeprecatedAtPeriod[_validator][_period] = true;\n\n // Cannot saving gas by temp variable here due to too deep stack.\n _blockProducerJailedBlock[_validator] = Math.max(\n block.number + _jailDurationTier2,\n _blockProducerJailedBlock[_validator]\n );\n _cannotBailoutUntilBlock[_validator] = Math.max(\n block.number + _jailDurationTier2,\n _cannotBailoutUntilBlock[_validator]\n );\n\n emit ValidatorPunished(_validator, _period, _blockProducerJailedBlock[_validator], 0, true, true);\n } else if (_missedRatio > _ratioTier1) {\n _bridgeRewardDeprecatedAtPeriod[_validator][_period] = true;\n emit ValidatorPunished(_validator, _period, _blockProducerJailedBlock[_validator], 0, false, true);\n } else if (_totalBallots > 0) {\n _bridgeOperatingReward[_validator] = (_totalBridgeReward * _validatorBallots) / _totalBallots;\n }\n }\n\n /**\n * @dev This loops over all current validators to:\n * - Update delegating reward for and calculate total delegating rewards to be sent to the staking contract,\n * - Distribute the reward of block producers and bridge operators to their treasury addresses,\n * - Update the total deprecated reward if the two previous conditions do not sastify.\n *\n * Note: This method should be called once in the end of each period.\n *\n */\n function _distributeRewardToTreasuriesAndCalculateTotalDelegatingReward(\n uint256 _lastPeriod,\n address[] memory _currentValidators\n ) private returns (uint256 _totalDelegatingReward, uint256[] memory _delegatingRewards) {\n address _consensusAddr;\n address payable _treasury;\n _delegatingRewards = new uint256[](_currentValidators.length);\n for (uint _i = 0; _i < _currentValidators.length; _i++) {\n _consensusAddr = _currentValidators[_i];\n _treasury = _candidateInfo[_consensusAddr].treasuryAddr;\n\n if (!_bridgeRewardDeprecated(_consensusAddr, _lastPeriod)) {\n _distributeBridgeOperatingReward(_consensusAddr, _candidateInfo[_consensusAddr].bridgeOperatorAddr, _treasury);\n } else {\n _totalDeprecatedReward += _bridgeOperatingReward[_consensusAddr];\n }\n\n if (!_jailed(_consensusAddr) && !_miningRewardDeprecated(_consensusAddr, _lastPeriod)) {\n _totalDelegatingReward += _delegatingReward[_consensusAddr];\n _delegatingRewards[_i] = _delegatingReward[_consensusAddr];\n _distributeMiningReward(_consensusAddr, _treasury);\n } else {\n _totalDeprecatedReward += _miningReward[_consensusAddr] + _delegatingReward[_consensusAddr];\n }\n\n delete _delegatingReward[_consensusAddr];\n delete _miningReward[_consensusAddr];\n delete _bridgeOperatingReward[_consensusAddr];\n }\n delete _totalBridgeReward;\n }\n\n /**\n * @dev Distributes bonus of staking vesting and mining fee for the block producer.\n *\n * Emits the `MiningRewardDistributed` once the reward is distributed successfully.\n * Emits the `MiningRewardDistributionFailed` once the contract fails to distribute reward.\n *\n * Note: This method should be called once in the end of each period.\n *\n */\n function _distributeMiningReward(address _consensusAddr, address payable _treasury) private {\n uint256 _amount = _miningReward[_consensusAddr];\n if (_amount > 0) {\n if (_unsafeSendRON(_treasury, _amount, 3500)) {\n emit MiningRewardDistributed(_consensusAddr, _treasury, _amount);\n return;\n }\n\n emit MiningRewardDistributionFailed(_consensusAddr, _treasury, _amount, address(this).balance);\n }\n }\n\n /**\n * @dev Distribute bonus of staking vesting for the bridge operator.\n *\n * Emits the `BridgeOperatorRewardDistributed` once the reward is distributed successfully.\n * Emits the `BridgeOperatorRewardDistributionFailed` once the contract fails to distribute reward.\n *\n * Note: This method should be called once in the end of each period.\n *\n */\n function _distributeBridgeOperatingReward(\n address _consensusAddr,\n address _bridgeOperator,\n address payable _treasury\n ) private {\n uint256 _amount = _bridgeOperatingReward[_consensusAddr];\n if (_amount > 0) {\n if (_unsafeSendRON(_treasury, _amount, 3500)) {\n emit BridgeOperatorRewardDistributed(_consensusAddr, _bridgeOperator, _treasury, _amount);\n return;\n }\n\n emit BridgeOperatorRewardDistributionFailed(\n _consensusAddr,\n _bridgeOperator,\n _treasury,\n _amount,\n address(this).balance\n );\n }\n }\n\n /**\n * @dev Helper function to settle rewards for delegators of `_currentValidators` at the end of each period,\n * then transfer the rewards from this contract to the staking contract, in order to finalize a period.\n *\n * Emits the `StakingRewardDistributed` once the reward is distributed successfully.\n * Emits the `StakingRewardDistributionFailed` once the contract fails to distribute reward.\n *\n * Note: This method should be called once in the end of each period.\n *\n */\n function _settleAndTransferDelegatingRewards(\n uint256 _period,\n address[] memory _currentValidators,\n uint256 _totalDelegatingReward,\n uint256[] memory _delegatingRewards\n ) private {\n IStaking _staking = _stakingContract;\n if (_totalDelegatingReward > 0) {\n if (_unsafeSendRON(payable(address(_staking)), _totalDelegatingReward)) {\n _staking.execRecordRewards(_currentValidators, _delegatingRewards, _period);\n emit StakingRewardDistributed(_totalDelegatingReward, _currentValidators, _delegatingRewards);\n return;\n }\n\n emit StakingRewardDistributionFailed(\n _totalDelegatingReward,\n _currentValidators,\n _delegatingRewards,\n address(this).balance\n );\n }\n }\n\n /**\n * @dev Transfer the deprecated rewards e.g. the rewards that get deprecated when validator is slashed/maintained,\n * to the staking vesting contract\n *\n * Note: This method should be called once in the end of each period.\n */\n function _recycleDeprecatedRewards() private {\n uint256 _withdrawAmount = _totalDeprecatedReward;\n\n if (_withdrawAmount != 0) {\n address _withdrawTarget = stakingVestingContract();\n\n delete _totalDeprecatedReward;\n\n (bool _success, ) = _withdrawTarget.call{ value: _withdrawAmount }(\n abi.encodeWithSelector(IStakingVesting.receiveRON.selector)\n );\n\n if (_success) {\n emit DeprecatedRewardRecycled(_withdrawTarget, _withdrawAmount);\n } else {\n emit DeprecatedRewardRecycleFailed(_withdrawTarget, _withdrawAmount, address(this).balance);\n }\n }\n }\n\n /**\n * @dev Updates the validator set based on the validator candidates from the Staking contract.\n *\n * Emits the `ValidatorSetUpdated` event.\n *\n * Note: This method should be called once in the end of each period.\n *\n */\n function _syncValidatorSet(uint256 _newPeriod)\n private\n returns (address[] memory _newValidators, address[] memory _unsastifiedCandidates)\n {\n _unsastifiedCandidates = _syncCandidateSet(_newPeriod);\n uint256[] memory _weights = _stakingContract.getManyStakingTotals(_candidates);\n uint256[] memory _trustedWeights = _roninTrustedOrganizationContract.getConsensusWeights(_candidates);\n uint256 _newValidatorCount;\n (_newValidators, _newValidatorCount) = _pcPickValidatorSet(\n _candidates,\n _weights,\n _trustedWeights,\n _maxValidatorNumber,\n _maxPrioritizedValidatorNumber\n );\n _setNewValidatorSet(_newValidators, _newValidatorCount, _newPeriod);\n }\n\n /**\n * @dev Private helper function helps writing the new validator set into the contract storage.\n *\n * Emits the `ValidatorSetUpdated` event.\n *\n * Note: This method should be called once in the end of each period.\n *\n */\n function _setNewValidatorSet(\n address[] memory _newValidators,\n uint256 _newValidatorCount,\n uint256 _newPeriod\n ) private {\n for (uint256 _i = _newValidatorCount; _i < validatorCount; _i++) {\n delete _validatorMap[_validators[_i]];\n delete _validators[_i];\n }\n\n uint256 _count;\n for (uint256 _i = 0; _i < _newValidatorCount; _i++) {\n address _newValidator = _newValidators[_i];\n if (_newValidator == _validators[_count]) {\n _count++;\n continue;\n }\n\n delete _validatorMap[_validators[_count]];\n _validatorMap[_newValidator] = EnumFlags.ValidatorFlag.Both;\n _validators[_count] = _newValidator;\n _count++;\n }\n\n validatorCount = _count;\n emit ValidatorSetUpdated(_newPeriod, _newValidators);\n }\n\n /**\n * @dev Activate/Deactivate the validators from producing blocks, based on their in jail status and maintenance status.\n *\n * Requirements:\n * - This method is called at the end of each epoch\n *\n * Emits the `BlockProducerSetUpdated` event.\n * Emits the `BridgeOperatorSetUpdated` event.\n *\n */\n function _revampRoles(\n uint256 _newPeriod,\n uint256 _nextEpoch,\n address[] memory _currentValidators\n ) private {\n bool[] memory _maintainedList = _maintenanceContract.checkManyMaintained(_candidates, block.number + 1);\n\n for (uint _i = 0; _i < _currentValidators.length; _i++) {\n address _validator = _currentValidators[_i];\n bool _emergencyExitRequested = block.timestamp <= _emergencyExitJailedTimestamp[_validator];\n bool _isProducerBefore = isBlockProducer(_validator);\n bool _isProducerAfter = !(_jailed(_validator) || _maintainedList[_i] || _emergencyExitRequested);\n\n if (!_isProducerBefore && _isProducerAfter) {\n _validatorMap[_validator] = _validatorMap[_validator].addFlag(EnumFlags.ValidatorFlag.BlockProducer);\n } else if (_isProducerBefore && !_isProducerAfter) {\n _validatorMap[_validator] = _validatorMap[_validator].removeFlag(EnumFlags.ValidatorFlag.BlockProducer);\n }\n\n bool _isBridgeOperatorBefore = isOperatingBridge(_validator);\n bool _isBridgeOperatorAfter = !_emergencyExitRequested;\n if (!_isBridgeOperatorBefore && _isBridgeOperatorAfter) {\n _validatorMap[_validator] = _validatorMap[_validator].addFlag(EnumFlags.ValidatorFlag.BridgeOperator);\n } else if (_isBridgeOperatorBefore && !_isBridgeOperatorAfter) {\n _validatorMap[_validator] = _validatorMap[_validator].removeFlag(EnumFlags.ValidatorFlag.BridgeOperator);\n }\n }\n\n emit BlockProducerSetUpdated(_newPeriod, _nextEpoch, getBlockProducers());\n emit BridgeOperatorSetUpdated(_newPeriod, _nextEpoch, getBridgeOperators());\n }\n\n /**\n * @dev Override `CandidateManager-_isTrustedOrg`.\n */\n function _isTrustedOrg(address _consensusAddr) internal view override returns (bool) {\n return _roninTrustedOrganizationContract.getConsensusWeight(_consensusAddr) > 0;\n }\n}\n" - }, - "contracts/extensions/collections/HasBridgeTrackingContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasBridgeTrackingContract.sol\";\nimport \"../../interfaces/IBridgeTracking.sol\";\n\ncontract HasBridgeTrackingContract is IHasBridgeTrackingContract, HasProxyAdmin {\n IBridgeTracking internal _bridgeTrackingContract;\n\n modifier onlyBridgeTrackingContract() {\n if (bridgeTrackingContract() != msg.sender) revert ErrCallerMustBeBridgeTrackingContract();\n _;\n }\n\n /**\n * @inheritdoc IHasBridgeTrackingContract\n */\n function bridgeTrackingContract() public view override returns (address) {\n return address(_bridgeTrackingContract);\n }\n\n /**\n * @inheritdoc IHasBridgeTrackingContract\n */\n function setBridgeTrackingContract(address _addr) external virtual override onlyAdmin {\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\n _setBridgeTrackingContract(_addr);\n }\n\n /**\n * @dev Sets the bridge tracking contract.\n *\n * Emits the event `BridgeTrackingContractUpdated`.\n *\n */\n function _setBridgeTrackingContract(address _addr) internal {\n _bridgeTrackingContract = IBridgeTracking(_addr);\n emit BridgeTrackingContractUpdated(_addr);\n }\n}\n" - }, - "contracts/extensions/collections/HasSlashIndicatorContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasSlashIndicatorContract.sol\";\nimport \"../../interfaces/slash-indicator/ISlashIndicator.sol\";\n\ncontract HasSlashIndicatorContract is IHasSlashIndicatorContract, HasProxyAdmin {\n ISlashIndicator internal _slashIndicatorContract;\n\n modifier onlySlashIndicatorContract() {\n if (slashIndicatorContract() != msg.sender) revert ErrCallerMustBeSlashIndicatorContract();\n _;\n }\n\n /**\n * @inheritdoc IHasSlashIndicatorContract\n */\n function slashIndicatorContract() public view override returns (address) {\n return address(_slashIndicatorContract);\n }\n\n /**\n * @inheritdoc IHasSlashIndicatorContract\n */\n function setSlashIndicatorContract(address _addr) external override onlyAdmin {\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\n _setSlashIndicatorContract(_addr);\n }\n\n /**\n * @dev Sets the slash indicator contract.\n *\n * Emits the event `SlashIndicatorContractUpdated`.\n *\n */\n function _setSlashIndicatorContract(address _addr) internal {\n _slashIndicatorContract = ISlashIndicator(_addr);\n emit SlashIndicatorContractUpdated(_addr);\n }\n}\n" - }, - "contracts/extensions/collections/HasStakingVestingContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasStakingVestingContract.sol\";\nimport \"../../interfaces/IStakingVesting.sol\";\n\ncontract HasStakingVestingContract is IHasStakingVestingContract, HasProxyAdmin {\n IStakingVesting internal _stakingVestingContract;\n\n modifier onlyStakingVestingContract() {\n if (stakingVestingContract() != msg.sender) revert ErrCallerMustBeStakingVestingContract();\n _;\n }\n\n /**\n * @inheritdoc IHasStakingVestingContract\n */\n function stakingVestingContract() public view override returns (address) {\n return address(_stakingVestingContract);\n }\n\n /**\n * @inheritdoc IHasStakingVestingContract\n */\n function setStakingVestingContract(address _addr) external override onlyAdmin {\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\n _setStakingVestingContract(_addr);\n }\n\n /**\n * @dev Sets the staking vesting contract.\n *\n * Emits the event `StakingVestingContractUpdated`.\n *\n */\n function _setStakingVestingContract(address _addr) internal {\n _stakingVestingContract = IStakingVesting(_addr);\n emit StakingVestingContractUpdated(_addr);\n }\n}\n" - }, - "contracts/precompile-usages/PCUSortValidators.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./PrecompiledUsage.sol\";\n\nabstract contract PCUSortValidators is PrecompiledUsage {\n /// @dev Gets the address of the precompile of sorting validators\n function precompileSortValidatorsAddress() public view virtual returns (address) {\n return address(0x66);\n }\n\n /**\n * @dev Sorts candidates descending by their weights by calling precompile contract.\n *\n * Note: This function is marked as virtual for being wrapping in mock contract for testing purpose.\n */\n function _pcSortCandidates(address[] memory _candidates, uint256[] memory _weights)\n internal\n view\n virtual\n returns (address[] memory _result)\n {\n address _smc = precompileSortValidatorsAddress();\n bool _success = true;\n\n bytes memory _payload = abi.encodeWithSignature(\"sortValidators(address[],uint256[])\", _candidates, _weights);\n uint256 _payloadLength = _payload.length;\n uint256 _resultLength = 0x20 * _candidates.length + 0x40;\n\n assembly {\n let _payloadStart := add(_payload, 0x20)\n\n if iszero(staticcall(gas(), _smc, _payloadStart, _payloadLength, _result, _resultLength)) {\n _success := 0\n }\n\n if iszero(returndatasize()) {\n _success := 0\n }\n\n _result := add(_result, 0x20)\n }\n\n if (!_success) revert ErrCallPrecompiled();\n }\n}\n" - }, - "contracts/precompile-usages/PCUPickValidatorSet.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./PrecompiledUsage.sol\";\n\nabstract contract PCUPickValidatorSet is PrecompiledUsage {\n /// @dev Gets the address of the precompile of picking validator set\n function precompilePickValidatorSetAddress() public view virtual returns (address) {\n return address(0x68);\n }\n\n /**\n * @dev Sorts and arranges to return a new validator set.\n *\n * Note: The recover process is done by pre-compiled contract. This function is marked as\n * virtual for implementing mocking contract for testing purpose.\n */\n function _pcPickValidatorSet(\n address[] memory _candidates,\n uint256[] memory _weights,\n uint256[] memory _trustedWeights,\n uint256 _maxValidatorNumber,\n uint256 _maxPrioritizedValidatorNumber\n ) internal view virtual returns (address[] memory _result, uint256 _newValidatorCount) {\n address _smc = precompilePickValidatorSetAddress();\n bytes memory _payload = abi.encodeWithSignature(\n \"pickValidatorSet(address[],uint256[],uint256[],uint256,uint256)\",\n _candidates,\n _weights,\n _trustedWeights,\n _maxValidatorNumber,\n _maxPrioritizedValidatorNumber\n );\n bool _success = true;\n\n uint256 _payloadLength = _payload.length;\n uint256 _resultLength = 0x20 * _candidates.length + 0x40;\n\n assembly {\n let _payloadStart := add(_payload, 0x20)\n\n if iszero(staticcall(gas(), _smc, _payloadStart, _payloadLength, _result, _resultLength)) {\n _success := 0\n }\n\n if iszero(returndatasize()) {\n _success := 0\n }\n\n _result := add(_result, 0x20)\n }\n\n if (!_success) revert ErrCallPrecompiled();\n\n _newValidatorCount = _result.length;\n }\n}\n" - }, - "contracts/interfaces/collections/IHasSlashIndicatorContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasSlashIndicatorContract is IHasContract {\n /// @dev Emitted when the slash indicator contract is updated.\n event SlashIndicatorContractUpdated(address);\n\n /// @dev Error of method caller must be slash indicator contract.\n error ErrCallerMustBeSlashIndicatorContract();\n\n /**\n * @dev Returns the slash indicator contract.\n */\n function slashIndicatorContract() external view returns (address);\n\n /**\n * @dev Sets the slash indicator contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `SlashIndicatorContractUpdated`.\n *\n */\n function setSlashIndicatorContract(address) external;\n}\n" - }, - "contracts/interfaces/slash-indicator/ISlashIndicator.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./ISlashDoubleSign.sol\";\nimport \"./ISlashBridgeVoting.sol\";\nimport \"./ISlashBridgeOperator.sol\";\nimport \"./ISlashUnavailability.sol\";\nimport \"./ICreditScore.sol\";\n\ninterface ISlashIndicator is\n ISlashDoubleSign,\n ISlashBridgeVoting,\n ISlashBridgeOperator,\n ISlashUnavailability,\n ICreditScore\n{}\n" - }, - "contracts/interfaces/slash-indicator/ISlashDoubleSign.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IBaseSlash.sol\";\n\ninterface ISlashDoubleSign is IBaseSlash {\n /**\n * @dev Emitted when the configs to slash double sign is updated. See the method `getDoubleSignSlashingConfigs`\n * for param details.\n */\n event DoubleSignSlashingConfigsUpdated(uint256 slashDoubleSignAmount, uint256 doubleSigningJailUntilBlock);\n\n /**\n * @dev Slashes for double signing.\n *\n * Requirements:\n * - The method caller is coinbase.\n *\n * Emits the event `Slashed` if the double signing evidence of the two headers valid.\n */\n function slashDoubleSign(\n address _validatorAddr,\n bytes calldata _header1,\n bytes calldata _header2\n ) external;\n\n /**\n * @dev Returns the configs related to block producer slashing.\n *\n * @return _slashDoubleSignAmount The amount of RON to slash double sign.\n * @return _doubleSigningJailUntilBlock The block number that the punished validator will be jailed until, due to\n * double signing.\n *\n */\n function getDoubleSignSlashingConfigs()\n external\n view\n returns (uint256 _slashDoubleSignAmount, uint256 _doubleSigningJailUntilBlock);\n\n /**\n * @dev Sets the configs to slash block producers.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `DoubleSignSlashingConfigsUpdated`.\n *\n * @param _slashAmount The amount of RON to slash double sign.\n * @param _jailUntilBlock The block number that the punished validator will be jailed until, due to double signing.\n *\n */\n function setDoubleSignSlashingConfigs(uint256 _slashAmount, uint256 _jailUntilBlock) external;\n}\n" - }, - "contracts/interfaces/slash-indicator/ISlashBridgeVoting.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IBaseSlash.sol\";\n\ninterface ISlashBridgeVoting is IBaseSlash {\n /**\n * @dev Emitted when the configs to slash bridge voting is updated. See the method `getBridgeVotingSlashingConfigs` for param\n * details.\n */\n event BridgeVotingSlashingConfigsUpdated(uint256 bridgeVotingThreshold, uint256 bridgeVotingSlashAmount);\n\n /**\n * @dev Slashes for bridge voter governance.\n *\n * Emits the event `Slashed`.\n */\n function slashBridgeVoting(address _consensusAddr) external;\n\n /**\n * @dev Returns the configs related to bridge voting slashing.\n *\n * @return _bridgeVotingThreshold The threshold to slash when a trusted organization does not vote for bridge\n * operators.\n * @return _bridgeVotingSlashAmount The amount of RON to slash bridge voting.\n *\n */\n function getBridgeVotingSlashingConfigs()\n external\n view\n returns (uint256 _bridgeVotingThreshold, uint256 _bridgeVotingSlashAmount);\n\n /**\n * @dev Sets the configs to slash bridge voting.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `BridgeVotingSlashingConfigsUpdated`.\n *\n * @param _threshold The threshold to slash when a trusted organization does not vote for bridge operators.\n * @param _slashAmount The amount of RON to slash bridge voting.\n *\n */\n function setBridgeVotingSlashingConfigs(uint256 _threshold, uint256 _slashAmount) external;\n}\n" - }, - "contracts/interfaces/slash-indicator/ISlashBridgeOperator.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface ISlashBridgeOperator {\n /**\n * @dev Emitted when the configs to slash bridge operator is updated. See the method\n * `getBridgeOperatorSlashingConfigs` for param details.\n */\n event BridgeOperatorSlashingConfigsUpdated(\n uint256 missingVotesRatioTier1,\n uint256 missingVotesRatioTier2,\n uint256 jailDurationForMissingVotesRatioTier2,\n uint256 skipBridgeOperatorSlashingThreshold\n );\n\n /**\n * @dev Returns the configs related to bridge operator slashing.\n *\n * @return _missingVotesRatioTier1 The bridge reward will be deprecated if (s)he missed more than this ratio.\n * @return _missingVotesRatioTier2 The bridge reward and mining reward will be deprecated and the corresponding\n * block producer will be put in jail if (s)he misses more than this ratio.\n * @return _jailDurationForMissingVotesRatioTier2 The number of blocks to jail the corresponding block producer when\n * its bridge operator is slashed tier-2.\n * @return _skipBridgeOperatorSlashingThreshold The threshold to skip slashing the bridge operator in case the total\n * number of votes in the bridge is too small.\n *\n */\n function getBridgeOperatorSlashingConfigs()\n external\n view\n returns (\n uint256 _missingVotesRatioTier1,\n uint256 _missingVotesRatioTier2,\n uint256 _jailDurationForMissingVotesRatioTier2,\n uint256 _skipBridgeOperatorSlashingThreshold\n );\n\n /**\n * @dev Sets the configs to slash bridge operators.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `BridgeOperatorSlashingConfigsUpdated`.\n *\n * @param _ratioTier1 The bridge reward will be deprecated if (s)he missed more than this ratio. Values 0-10,000 map\n * to 0%-100%.\n * @param _ratioTier2 The bridge reward and mining reward will be deprecated and the corresponding block producer will\n * be put in jail if (s)he misses more than this ratio. Values 0-10,000 map to 0%-100%.\n * @param _jailDurationTier2 The number of blocks to jail the corresponding block producer when its bridge operator is\n * slashed tier-2.\n * @param _skipSlashingThreshold The threshold to skip slashing the bridge operator in case the total number of votes\n * in the bridge is too small.\n *\n */\n function setBridgeOperatorSlashingConfigs(\n uint256 _ratioTier1,\n uint256 _ratioTier2,\n uint256 _jailDurationTier2,\n uint256 _skipSlashingThreshold\n ) external;\n}\n" - }, - "contracts/interfaces/slash-indicator/ISlashUnavailability.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IBaseSlash.sol\";\n\ninterface ISlashUnavailability is IBaseSlash {\n /**\n * @dev Emitted when the configs to slash bridge operator is updated. See the method `getUnavailabilitySlashingConfigs`\n * for param details.\n */\n event UnavailabilitySlashingConfigsUpdated(\n uint256 unavailabilityTier1Threshold,\n uint256 unavailabilityTier2Threshold,\n uint256 slashAmountForUnavailabilityTier2Threshold,\n uint256 jailDurationForUnavailabilityTier2Threshold\n );\n\n /**\n * @dev Returns the last block that a block producer is slashed for unavailability.\n */\n function lastUnavailabilitySlashedBlock() external view returns (uint256);\n\n /**\n * @dev Slashes for unavailability by increasing the counter of block producer `_consensusAddr`.\n *\n * Requirements:\n * - The method caller is coinbase.\n *\n * Emits the event `Slashed` when the threshold is reached.\n *\n */\n function slashUnavailability(address _consensusAddr) external;\n\n /**\n * @dev Returns the current unavailability indicator of a block producer.\n */\n function currentUnavailabilityIndicator(address _validator) external view returns (uint256);\n\n /**\n * @dev Returns the unavailability indicator in the period `_period` of a block producer.\n */\n function getUnavailabilityIndicator(address _validator, uint256 _period) external view returns (uint256);\n\n /**\n * @dev Returns the configs related to block producer slashing.\n *\n * @return _unavailabilityTier1Threshold The mining reward will be deprecated, if (s)he missed more than this\n * threshold. This threshold is applied for tier-1 and tier-3 slash.\n * @return _unavailabilityTier2Threshold The mining reward will be deprecated, (s)he will be put in jailed, and will\n * be deducted self-staking if (s)he misses more than this threshold. This threshold is applied for tier-2 slash.\n * @return _slashAmountForUnavailabilityTier2Threshold The amount of RON to deduct from self-staking of a block\n * producer when (s)he is slashed with tier-2 or tier-3.\n * @return _jailDurationForUnavailabilityTier2Threshold The number of blocks to jail a block producer when (s)he is\n * slashed with tier-2 or tier-3.\n *\n */\n function getUnavailabilitySlashingConfigs()\n external\n view\n returns (\n uint256 _unavailabilityTier1Threshold,\n uint256 _unavailabilityTier2Threshold,\n uint256 _slashAmountForUnavailabilityTier2Threshold,\n uint256 _jailDurationForUnavailabilityTier2Threshold\n );\n\n /**\n * @dev Sets the configs to slash block producers.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `BridgeOperatorSlashingConfigsUpdated`.\n *\n * @param _tier1Threshold The mining reward will be deprecated, if (s)he missed more than this threshold.\n * @param _tier2Threshold The mining reward will be deprecated, (s)he will be put in jailed, and will be deducted\n * self-staking if (s)he misses more than this threshold.\n * @param _slashAmountForTier2Threshold The amount of RON to deduct from self-staking of a block producer when (s)he\n * is slashed tier-2.\n * @param _jailDurationForTier2Threshold The number of blocks to jail a block producer when (s)he is slashed tier-2.\n *\n */\n function setUnavailabilitySlashingConfigs(\n uint256 _tier1Threshold,\n uint256 _tier2Threshold,\n uint256 _slashAmountForTier2Threshold,\n uint256 _jailDurationForTier2Threshold\n ) external;\n}\n" - }, - "contracts/interfaces/slash-indicator/ICreditScore.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface ICreditScore {\n /// @dev Emitted when the configs to credit score is updated. See the method `setCreditScoreConfigs` for param details.\n event CreditScoreConfigsUpdated(\n uint256 gainCreditScore,\n uint256 maxCreditScore,\n uint256 bailOutCostMultiplier,\n uint256 cutOffPercentageAfterBailout\n );\n /// @dev Emitted the credit score of validators is updated\n event CreditScoresUpdated(address[] validators, uint256[] creditScores);\n /// @dev Emitted when a validator bailed out of jail\n event BailedOut(address indexed validator, uint256 period);\n\n /**\n * @dev Updates the credit score for the validators.\n *\n * Requirements:\n * - Only validator contract can call this method.\n * - This method is only called at the end of each period.\n *\n * Emits the event `CreditScoresUpdated`.\n *\n */\n function updateCreditScores(address[] calldata _validators, uint256 _period) external;\n\n /**\n * @dev Resets the credit score for the revoked validators.\n *\n * Requirements:\n * - Only validator contract can call this method.\n * - This method is only called at the end of each period.\n *\n * Emits the event `CreditScoresUpdated`.\n *\n */\n function execResetCreditScores(address[] calldata _validators) external;\n\n /**\n * @dev A slashed validator use this method to get out of jail.\n *\n * Requirements:\n * - The `_consensusAddr` must be a validator.\n * - Only validator's admin can call this method.\n *\n * Emits the event `BailedOut`.\n *\n */\n function bailOut(address _consensusAddr) external;\n\n /**\n * @dev Sets the configs to credit score.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the event `CreditScoreConfigsUpdated`.\n *\n * @param _gainScore The score to gain per period.\n * @param _maxScore The max number of credit score that a validator can hold.\n * @param _bailOutMultiplier The number that will be multiplied with the remaining jailed time to get the cost of bailing out.\n * @param _cutOffPercentage The percentage of reward that the block producer will be cut off from until the end of the period after bailing out.\n *\n */\n function setCreditScoreConfigs(\n uint256 _gainScore,\n uint256 _maxScore,\n uint256 _bailOutMultiplier,\n uint256 _cutOffPercentage\n ) external;\n\n /**\n * @dev Returns the configs related to credit score.\n *\n * @return _gainCreditScore The score to gain per period.\n * @return _maxCreditScore The max number of credit score that a validator can hold.\n * @return _bailOutCostMultiplier The number that will be multiplied with the remaining jailed time to get the cost of bailing out.\n * @return _cutOffPercentageAfterBailout The percentage of reward that the block producer will be cut off from until the end of the period after bailing out.\n *\n */\n function getCreditScoreConfigs()\n external\n view\n returns (\n uint256 _gainCreditScore,\n uint256 _maxCreditScore,\n uint256 _bailOutCostMultiplier,\n uint256 _cutOffPercentageAfterBailout\n );\n\n /**\n * @dev Returns the current credit score of the validator.\n */\n function getCreditScore(address _validator) external view returns (uint256);\n\n /**\n * @dev Returns the current credit score of a list of validators.\n */\n function getManyCreditScores(address[] calldata _validators) external view returns (uint256[] memory _resultList);\n\n /**\n * @dev Returns the whether the `_validator` has been bailed out at the `_period`.\n */\n function checkBailedOutAtPeriod(address _validator, uint256 _period) external view returns (bool);\n}\n" - }, - "contracts/interfaces/slash-indicator/IBaseSlash.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\ninterface IBaseSlash {\n enum SlashType {\n UNKNOWN,\n UNAVAILABILITY_TIER_1,\n UNAVAILABILITY_TIER_2,\n DOUBLE_SIGNING,\n BRIDGE_VOTING,\n BRIDGE_OPERATOR_MISSING_VOTE_TIER_1,\n BRIDGE_OPERATOR_MISSING_VOTE_TIER_2,\n UNAVAILABILITY_TIER_3\n }\n\n /// @dev Emitted when the validator is slashed.\n event Slashed(address indexed validator, SlashType slashType, uint256 period);\n}\n" - }, - "contracts/interfaces/collections/IHasStakingVestingContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasStakingVestingContract is IHasContract {\n /// @dev Emitted when the staking vesting contract is updated.\n event StakingVestingContractUpdated(address);\n\n /// @dev Error of method caller must be staking vesting contract.\n error ErrCallerMustBeStakingVestingContract();\n\n /**\n * @dev Returns the staking vesting contract.\n */\n function stakingVestingContract() external view returns (address);\n\n /**\n * @dev Sets the staking vesting contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `StakingVestingContractUpdated`.\n *\n */\n function setStakingVestingContract(address) external;\n}\n" - }, - "contracts/precompile-usages/PrecompiledUsage.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./PrecompiledUsage.sol\";\n\nabstract contract PrecompiledUsage {\n /// @dev Error of call to precompile fails.\n error ErrCallPrecompiled();\n}\n" - }, - "contracts/ronin/validator/SlashingExecution.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../extensions/collections/HasSlashIndicatorContract.sol\";\nimport \"../../extensions/collections/HasStakingContract.sol\";\nimport \"../../interfaces/validator/ISlashingExecution.sol\";\nimport \"../../libraries/Math.sol\";\nimport \"./storage-fragments/CommonStorage.sol\";\n\nabstract contract SlashingExecution is\n ISlashingExecution,\n HasSlashIndicatorContract,\n HasStakingContract,\n CommonStorage\n{\n /**\n * @inheritdoc ISlashingExecution\n */\n function execSlash(\n address _validatorAddr,\n uint256 _newJailedUntil,\n uint256 _slashAmount,\n bool _cannotBailout\n ) external override onlySlashIndicatorContract {\n uint256 _period = currentPeriod();\n _miningRewardDeprecatedAtPeriod[_validatorAddr][_period] = true;\n\n _totalDeprecatedReward += _miningReward[_validatorAddr] + _delegatingReward[_validatorAddr];\n\n delete _miningReward[_validatorAddr];\n delete _delegatingReward[_validatorAddr];\n\n _blockProducerJailedBlock[_validatorAddr] = Math.max(_newJailedUntil, _blockProducerJailedBlock[_validatorAddr]);\n\n if (_slashAmount > 0) {\n uint256 _actualAmount = _stakingContract.execDeductStakingAmount(_validatorAddr, _slashAmount);\n _totalDeprecatedReward += _actualAmount;\n }\n\n if (_cannotBailout) {\n _cannotBailoutUntilBlock[_validatorAddr] = Math.max(_newJailedUntil, _cannotBailoutUntilBlock[_validatorAddr]);\n }\n\n emit ValidatorPunished(\n _validatorAddr,\n _period,\n _blockProducerJailedBlock[_validatorAddr],\n _slashAmount,\n true,\n false\n );\n }\n\n /**\n * @inheritdoc ISlashingExecution\n */\n function execBailOut(address _validatorAddr, uint256 _period) external override onlySlashIndicatorContract {\n if (block.number <= _cannotBailoutUntilBlock[_validatorAddr]) revert ErrCannotBailout(_validatorAddr);\n\n // Note: Removing rewards of validator in `bailOut` function is not needed, since the rewards have been\n // removed previously in the `slash` function.\n _miningRewardBailoutCutOffAtPeriod[_validatorAddr][_period] = true;\n _miningRewardDeprecatedAtPeriod[_validatorAddr][_period] = false;\n _blockProducerJailedBlock[_validatorAddr] = block.number - 1;\n\n emit ValidatorUnjailed(_validatorAddr, _period);\n }\n}\n" - }, - "contracts/ronin/slash-indicator/SlashIndicator.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../../interfaces/slash-indicator/ISlashIndicator.sol\";\nimport \"./SlashDoubleSign.sol\";\nimport \"./SlashBridgeVoting.sol\";\nimport \"./SlashBridgeOperator.sol\";\nimport \"./SlashUnavailability.sol\";\nimport \"./CreditScore.sol\";\n\ncontract SlashIndicator is\n ISlashIndicator,\n SlashDoubleSign,\n SlashBridgeVoting,\n SlashBridgeOperator,\n SlashUnavailability,\n CreditScore,\n Initializable\n{\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes the contract storage.\n */\n function initialize(\n address __validatorContract,\n address __maintenanceContract,\n address __roninTrustedOrganizationContract,\n address __roninGovernanceAdminContract,\n // _bridgeOperatorSlashingConfigs[0]: _missingVotesRatioTier1\n // _bridgeOperatorSlashingConfigs[1]: _missingVotesRatioTier2\n // _bridgeOperatorSlashingConfigs[2]: _jailDurationForMissingVotesRatioTier2\n // _bridgeOperatorSlashingConfigs[3]: _skipBridgeOperatorSlashingThreshold\n uint256[4] calldata _bridgeOperatorSlashingConfigs,\n // _bridgeVotingSlashingConfigs[0]: _bridgeVotingThreshold\n // _bridgeVotingSlashingConfigs[1]: _bridgeVotingSlashAmount\n uint256[2] calldata _bridgeVotingSlashingConfigs,\n // _doubleSignSlashingConfigs[0]: _slashDoubleSignAmount\n // _doubleSignSlashingConfigs[1]: _doubleSigningJailUntilBlock\n uint256[2] calldata _doubleSignSlashingConfigs,\n // _unavailabilitySlashingConfigs[0]: _unavailabilityTier1Threshold\n // _unavailabilitySlashingConfigs[1]: _unavailabilityTier2Threshold\n // _unavailabilitySlashingConfigs[2]: _slashAmountForUnavailabilityTier2Threshold\n // _unavailabilitySlashingConfigs[3]: _jailDurationForUnavailabilityTier2Threshold\n uint256[4] calldata _unavailabilitySlashingConfigs,\n // _creditScoreConfigs[0]: _gainCreditScore\n // _creditScoreConfigs[1]: _maxCreditScore\n // _creditScoreConfigs[2]: _bailOutCostMultiplier\n // _creditScoreConfigs[3]: _cutOffPercentageAfterBailout\n uint256[4] calldata _creditScoreConfigs\n ) external initializer {\n _setValidatorContract(__validatorContract);\n _setMaintenanceContract(__maintenanceContract);\n _setRoninTrustedOrganizationContract(__roninTrustedOrganizationContract);\n _setRoninGovernanceAdminContract(__roninGovernanceAdminContract);\n _setBridgeOperatorSlashingConfigs(\n _bridgeOperatorSlashingConfigs[0],\n _bridgeOperatorSlashingConfigs[1],\n _bridgeOperatorSlashingConfigs[2],\n _bridgeOperatorSlashingConfigs[3]\n );\n _setBridgeVotingSlashingConfigs(_bridgeVotingSlashingConfigs[0], _bridgeVotingSlashingConfigs[1]);\n _setDoubleSignSlashingConfigs(_doubleSignSlashingConfigs[0], _doubleSignSlashingConfigs[1]);\n _setUnavailabilitySlashingConfigs(\n _unavailabilitySlashingConfigs[0],\n _unavailabilitySlashingConfigs[1],\n _unavailabilitySlashingConfigs[2],\n _unavailabilitySlashingConfigs[3]\n );\n _setCreditScoreConfigs(\n _creditScoreConfigs[0],\n _creditScoreConfigs[1],\n _creditScoreConfigs[2],\n _creditScoreConfigs[3]\n );\n }\n\n /**\n * @dev Helper for CreditScore contract to reset the indicator of the validator after bailing out.\n */\n function _setUnavailabilityIndicator(\n address _validator,\n uint256 _period,\n uint256 _indicator\n ) internal override(CreditScore, SlashUnavailability) {\n SlashUnavailability._setUnavailabilityIndicator(_validator, _period, _indicator);\n }\n\n /**\n * @dev Helper for CreditScore contract to query indicator of the validator.\n */\n function getUnavailabilityIndicator(address _validator, uint256 _period)\n public\n view\n override(CreditScore, ISlashUnavailability, SlashUnavailability)\n returns (uint256)\n {\n return SlashUnavailability.getUnavailabilityIndicator(_validator, _period);\n }\n\n /**\n * @inheritdoc ICreditScore\n */\n function checkBailedOutAtPeriod(address _validator, uint256 _period)\n public\n view\n override(CreditScore, ICreditScore, SlashUnavailability)\n returns (bool)\n {\n return CreditScore.checkBailedOutAtPeriod(_validator, _period);\n }\n\n /**\n * @dev Sanity check the address to be slashed\n */\n function _shouldSlash(address _addr) internal view override(SlashDoubleSign, SlashUnavailability) returns (bool) {\n return\n (msg.sender != _addr) &&\n _validatorContract.isBlockProducer(_addr) &&\n !_maintenanceContract.checkMaintained(_addr, block.number);\n }\n}\n" - }, - "contracts/ronin/slash-indicator/SlashDoubleSign.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../interfaces/slash-indicator/ISlashDoubleSign.sol\";\nimport \"../../precompile-usages/PCUValidateDoubleSign.sol\";\nimport \"../../extensions/collections/HasValidatorContract.sol\";\n\nabstract contract SlashDoubleSign is ISlashDoubleSign, HasValidatorContract, PCUValidateDoubleSign {\n /// @dev The amount of RON to slash double sign.\n uint256 internal _slashDoubleSignAmount;\n /// @dev The block number that the punished validator will be jailed until, due to double signing.\n uint256 internal _doubleSigningJailUntilBlock;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc ISlashDoubleSign\n */\n function slashDoubleSign(\n address _consensuAddr,\n bytes calldata _header1,\n bytes calldata _header2\n ) external override {\n require(msg.sender == block.coinbase, \"SlashIndicator: method caller must be coinbase\");\n if (!_shouldSlash(_consensuAddr)) {\n return;\n }\n\n if (_pcValidateEvidence(_header1, _header2)) {\n uint256 _period = _validatorContract.currentPeriod();\n emit Slashed(_consensuAddr, SlashType.DOUBLE_SIGNING, _period);\n _validatorContract.execSlash(_consensuAddr, _doubleSigningJailUntilBlock, _slashDoubleSignAmount, false);\n }\n }\n\n /**\n * @inheritdoc ISlashDoubleSign\n */\n function getDoubleSignSlashingConfigs()\n external\n view\n override\n returns (uint256 slashDoubleSignAmount_, uint256 doubleSigningJailUntilBlock_)\n {\n return (_slashDoubleSignAmount, _doubleSigningJailUntilBlock);\n }\n\n /**\n * @inheritdoc ISlashDoubleSign\n */\n function setDoubleSignSlashingConfigs(uint256 _slashAmount, uint256 _jailUntilBlock) external override onlyAdmin {\n _setDoubleSignSlashingConfigs(_slashAmount, _jailUntilBlock);\n }\n\n /**\n * @dev See `ISlashDoubleSign-setDoubleSignSlashingConfigs`.\n */\n function _setDoubleSignSlashingConfigs(uint256 _slashAmount, uint256 _jailUntilBlock) internal {\n _slashDoubleSignAmount = _slashAmount;\n _doubleSigningJailUntilBlock = _jailUntilBlock;\n emit DoubleSignSlashingConfigsUpdated(_slashAmount, _jailUntilBlock);\n }\n\n /**\n * @dev Returns whether the account `_addr` should be slashed or not.\n */\n function _shouldSlash(address _addr) internal view virtual returns (bool);\n}\n" - }, - "contracts/ronin/slash-indicator/SlashBridgeVoting.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../libraries/Math.sol\";\nimport \"../../interfaces/slash-indicator/ISlashBridgeVoting.sol\";\nimport \"../../extensions/collections/HasRoninTrustedOrganizationContract.sol\";\nimport \"../../extensions/collections/HasRoninGovernanceAdminContract.sol\";\nimport \"../../extensions/collections/HasValidatorContract.sol\";\n\nabstract contract SlashBridgeVoting is\n ISlashBridgeVoting,\n HasValidatorContract,\n HasRoninTrustedOrganizationContract,\n HasRoninGovernanceAdminContract\n{\n /// @dev Mapping from validator address => period index => bridge voting slashed\n mapping(address => mapping(uint256 => bool)) internal _bridgeVotingSlashed;\n /// @dev The threshold to slash when a trusted organization does not vote for bridge operators.\n uint256 internal _bridgeVotingThreshold;\n /// @dev The amount of RON to slash bridge voting.\n uint256 internal _bridgeVotingSlashAmount;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc ISlashBridgeVoting\n */\n function slashBridgeVoting(address _consensusAddr) external {\n IRoninTrustedOrganization.TrustedOrganization memory _org = _roninTrustedOrganizationContract\n .getTrustedOrganization(_consensusAddr);\n uint256 _lastVotedBlock = Math.max(_roninGovernanceAdminContract.lastVotedBlock(_org.bridgeVoter), _org.addedBlock);\n uint256 _period = _validatorContract.currentPeriod();\n if (block.number - _lastVotedBlock > _bridgeVotingThreshold && !_bridgeVotingSlashed[_consensusAddr][_period]) {\n _bridgeVotingSlashed[_consensusAddr][_period] = true;\n emit Slashed(_consensusAddr, SlashType.BRIDGE_VOTING, _period);\n _validatorContract.execSlash(_consensusAddr, 0, _bridgeVotingSlashAmount, false);\n }\n }\n\n /**\n * @inheritdoc ISlashBridgeVoting\n */\n function getBridgeVotingSlashingConfigs()\n external\n view\n override\n returns (uint256 bridgeVotingThreshold_, uint256 bridgeVotingSlashAmount_)\n {\n return (_bridgeVotingThreshold, _bridgeVotingSlashAmount);\n }\n\n /**\n * @inheritdoc ISlashBridgeVoting\n */\n function setBridgeVotingSlashingConfigs(uint256 _threshold, uint256 _slashAmount) external override onlyAdmin {\n _setBridgeVotingSlashingConfigs(_threshold, _slashAmount);\n }\n\n /**\n * @dev See `ISlashBridgeVoting-setBridgeVotingSlashingConfigs`.\n */\n function _setBridgeVotingSlashingConfigs(uint256 _threshold, uint256 _slashAmount) internal {\n _bridgeVotingThreshold = _threshold;\n _slashAmount = _bridgeVotingSlashAmount;\n emit BridgeVotingSlashingConfigsUpdated(_threshold, _slashAmount);\n }\n}\n" - }, - "contracts/ronin/slash-indicator/SlashBridgeOperator.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../extensions/consumers/PercentageConsumer.sol\";\nimport \"../../extensions/collections/HasProxyAdmin.sol\";\nimport \"../../interfaces/slash-indicator/ISlashBridgeOperator.sol\";\n\nabstract contract SlashBridgeOperator is ISlashBridgeOperator, HasProxyAdmin, PercentageConsumer {\n /**\n * @dev The bridge operators will be deprecated reward if (s)he missed more than the ratio.\n * Values 0-10,000 map to 0%-100%.\n */\n uint256 internal _missingVotesRatioTier1;\n /**\n * @dev The bridge operators will be deprecated all rewards including bridge reward and mining reward if (s)he missed\n * more than the ratio. Values 0-10,000 map to 0%-100%.\n */\n uint256 internal _missingVotesRatioTier2;\n /// @dev The number of blocks to jail the corresponding block producer when its bridge operator is slashed tier-2.\n uint256 internal _jailDurationForMissingVotesRatioTier2;\n /// @dev The threshold to skip slashing the bridge operator in case the total number of votes in the bridge is too small.\n uint256 internal _skipBridgeOperatorSlashingThreshold;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc ISlashBridgeOperator\n */\n function getBridgeOperatorSlashingConfigs()\n external\n view\n override\n returns (\n uint256 missingVotesRatioTier1_,\n uint256 missingVotesRatioTier2_,\n uint256 jailDurationForMissingVotesRatioTier2_,\n uint256 skipBridgeOperatorSlashingThreshold_\n )\n {\n return (\n _missingVotesRatioTier1,\n _missingVotesRatioTier2,\n _jailDurationForMissingVotesRatioTier2,\n _skipBridgeOperatorSlashingThreshold\n );\n }\n\n /**\n * @inheritdoc ISlashBridgeOperator\n */\n function setBridgeOperatorSlashingConfigs(\n uint256 _ratioTier1,\n uint256 _ratioTier2,\n uint256 _jailDurationTier2,\n uint256 _skipSlashingThreshold\n ) external override onlyAdmin {\n _setBridgeOperatorSlashingConfigs(_ratioTier1, _ratioTier2, _jailDurationTier2, _skipSlashingThreshold);\n }\n\n /**\n * @dev See `ISlashBridgeOperator-setBridgeOperatorSlashingConfigs`.\n */\n function _setBridgeOperatorSlashingConfigs(\n uint256 _ratioTier1,\n uint256 _ratioTier2,\n uint256 _jailDurationTier2,\n uint256 _skipSlashingThreshold\n ) internal {\n require(\n _ratioTier1 <= _ratioTier2 && _ratioTier1 <= _MAX_PERCENTAGE && _ratioTier2 <= _MAX_PERCENTAGE,\n \"SlashIndicator: invalid ratios\"\n );\n _missingVotesRatioTier1 = _ratioTier1;\n _missingVotesRatioTier2 = _ratioTier2;\n _jailDurationForMissingVotesRatioTier2 = _jailDurationTier2;\n _skipBridgeOperatorSlashingThreshold = _skipSlashingThreshold;\n emit BridgeOperatorSlashingConfigsUpdated(_ratioTier1, _ratioTier2, _jailDurationTier2, _skipSlashingThreshold);\n }\n}\n" - }, - "contracts/ronin/slash-indicator/SlashUnavailability.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./CreditScore.sol\";\nimport \"../../interfaces/slash-indicator/ISlashUnavailability.sol\";\nimport \"../../extensions/collections/HasValidatorContract.sol\";\n\nabstract contract SlashUnavailability is ISlashUnavailability, HasValidatorContract {\n /// @dev The last block that a validator is slashed for unavailability.\n uint256 public lastUnavailabilitySlashedBlock;\n /// @dev Mapping from validator address => period index => unavailability indicator.\n mapping(address => mapping(uint256 => uint256)) internal _unavailabilityIndicator;\n\n /**\n * @dev The mining reward will be deprecated, if (s)he missed more than this threshold.\n * This threshold is applied for tier-1 and tier-3 of unavailability slash.\n */\n uint256 internal _unavailabilityTier1Threshold;\n /**\n * @dev The mining reward will be deprecated, (s)he will be put in jailed, and will be deducted\n * self-staking if (s)he misses more than this threshold. This threshold is applied for tier-2 slash.\n */\n uint256 internal _unavailabilityTier2Threshold;\n /**\n * @dev The amount of RON to deduct from self-staking of a block producer when (s)he is slashed with\n * tier-2 or tier-3.\n **/\n uint256 internal _slashAmountForUnavailabilityTier2Threshold;\n /// @dev The number of blocks to jail a block producer when (s)he is slashed with tier-2 or tier-3.\n uint256 internal _jailDurationForUnavailabilityTier2Threshold;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n modifier oncePerBlock() {\n require(\n block.number > lastUnavailabilitySlashedBlock,\n \"SlashIndicator: cannot slash a validator twice or slash more than one validator in one block\"\n );\n lastUnavailabilitySlashedBlock = block.number;\n _;\n }\n\n /**\n * @inheritdoc ISlashUnavailability\n */\n function slashUnavailability(address _validatorAddr) external override oncePerBlock {\n require(msg.sender == block.coinbase, \"SlashUnavailability: method caller must be coinbase\");\n if (!_shouldSlash(_validatorAddr)) {\n return;\n }\n\n uint256 _period = _validatorContract.currentPeriod();\n uint256 _count = ++_unavailabilityIndicator[_validatorAddr][_period];\n\n if (_count == _unavailabilityTier2Threshold) {\n emit Slashed(_validatorAddr, SlashType.UNAVAILABILITY_TIER_2, _period);\n _validatorContract.execSlash(\n _validatorAddr,\n block.number + _jailDurationForUnavailabilityTier2Threshold,\n _slashAmountForUnavailabilityTier2Threshold,\n false\n );\n } else if (_count == _unavailabilityTier1Threshold) {\n bool _tier1SecondTime = checkBailedOutAtPeriod(_validatorAddr, _period);\n if (!_tier1SecondTime) {\n emit Slashed(_validatorAddr, SlashType.UNAVAILABILITY_TIER_1, _period);\n _validatorContract.execSlash(_validatorAddr, 0, 0, false);\n } else {\n /// Handles tier-3\n emit Slashed(_validatorAddr, SlashType.UNAVAILABILITY_TIER_3, _period);\n uint256 _jailedUntilBlock = block.number + _jailDurationForUnavailabilityTier2Threshold;\n _validatorContract.execSlash(\n _validatorAddr,\n _jailedUntilBlock,\n _slashAmountForUnavailabilityTier2Threshold,\n true\n );\n }\n }\n }\n\n /**\n * @inheritdoc ISlashUnavailability\n */\n function setUnavailabilitySlashingConfigs(\n uint256 _tier1Threshold,\n uint256 _tier2Threshold,\n uint256 _slashAmountForTier2Threshold,\n uint256 _jailDurationForTier2Threshold\n ) external override onlyAdmin {\n _setUnavailabilitySlashingConfigs(\n _tier1Threshold,\n _tier2Threshold,\n _slashAmountForTier2Threshold,\n _jailDurationForTier2Threshold\n );\n }\n\n /**\n * @inheritdoc ISlashUnavailability\n */\n function getUnavailabilitySlashingConfigs()\n external\n view\n override\n returns (\n uint256 unavailabilityTier1Threshold_,\n uint256 unavailabilityTier2Threshold_,\n uint256 slashAmountForUnavailabilityTier2Threshold_,\n uint256 jailDurationForUnavailabilityTier2Threshold_\n )\n {\n return (\n _unavailabilityTier1Threshold,\n _unavailabilityTier2Threshold,\n _slashAmountForUnavailabilityTier2Threshold,\n _jailDurationForUnavailabilityTier2Threshold\n );\n }\n\n /**\n * @inheritdoc ISlashUnavailability\n */\n function currentUnavailabilityIndicator(address _validator) external view override returns (uint256) {\n return getUnavailabilityIndicator(_validator, _validatorContract.currentPeriod());\n }\n\n /**\n * @inheritdoc ISlashUnavailability\n */\n function getUnavailabilityIndicator(address _validator, uint256 _period)\n public\n view\n virtual\n override\n returns (uint256)\n {\n return _unavailabilityIndicator[_validator][_period];\n }\n\n /**\n * @dev Sets the unavailability indicator of the `_validator` at `_period`.\n */\n function _setUnavailabilityIndicator(\n address _validator,\n uint256 _period,\n uint256 _indicator\n ) internal virtual {\n _unavailabilityIndicator[_validator][_period] = _indicator;\n }\n\n /**\n * @dev See `ISlashUnavailability-setUnavailabilitySlashingConfigs`.\n */\n function _setUnavailabilitySlashingConfigs(\n uint256 _tier1Threshold,\n uint256 _tier2Threshold,\n uint256 _slashAmountForTier2Threshold,\n uint256 _jailDurationForTier2Threshold\n ) internal {\n require(_unavailabilityTier1Threshold <= _unavailabilityTier2Threshold, \"SlashUnavailability: invalid threshold\");\n _unavailabilityTier1Threshold = _tier1Threshold;\n _unavailabilityTier2Threshold = _tier2Threshold;\n _slashAmountForUnavailabilityTier2Threshold = _slashAmountForTier2Threshold;\n _jailDurationForUnavailabilityTier2Threshold = _jailDurationForTier2Threshold;\n emit UnavailabilitySlashingConfigsUpdated(\n _tier1Threshold,\n _tier2Threshold,\n _slashAmountForTier2Threshold,\n _jailDurationForTier2Threshold\n );\n }\n\n /**\n * @dev Returns whether the account `_addr` should be slashed or not.\n */\n function _shouldSlash(address _addr) internal view virtual returns (bool);\n\n /**\n * @dev See `ICreditScore-checkBailedOutAtPeriod`\n */\n function checkBailedOutAtPeriod(address _validator, uint256 _period) public view virtual returns (bool);\n}\n" - }, - "contracts/ronin/slash-indicator/CreditScore.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../interfaces/slash-indicator/ICreditScore.sol\";\nimport \"../../extensions/collections/HasMaintenanceContract.sol\";\nimport \"../../extensions/collections/HasValidatorContract.sol\";\nimport \"../../extensions/consumers/PercentageConsumer.sol\";\nimport \"../../libraries/Math.sol\";\n\nabstract contract CreditScore is ICreditScore, HasValidatorContract, HasMaintenanceContract, PercentageConsumer {\n /// @dev Mapping from validator address => period index => whether bailed out before\n mapping(address => mapping(uint256 => bool)) internal _checkBailedOutAtPeriod;\n /// @dev Mapping from validator address => credit score\n mapping(address => uint256) internal _creditScore;\n\n /// @dev The max gained number of credit score per period.\n uint256 internal _gainCreditScore;\n /// @dev The max number of credit score that a validator can hold.\n uint256 internal _maxCreditScore;\n /// @dev The number that will be multiplied with the remaining jailed time to get the cost of bailing out.\n uint256 internal _bailOutCostMultiplier;\n /// @dev The percentage of reward to be cut off from the validator in the rest of the period after bailed out.\n uint256 internal _cutOffPercentageAfterBailout;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @inheritdoc ICreditScore\n */\n function updateCreditScores(address[] calldata _validators, uint256 _period) external override onlyValidatorContract {\n uint256 _periodStartAtBlock = _validatorContract.currentPeriodStartAtBlock();\n\n bool[] memory _jaileds = _validatorContract.checkManyJailed(_validators);\n bool[] memory _maintaineds = _maintenanceContract.checkManyMaintainedInBlockRange(\n _validators,\n _periodStartAtBlock,\n block.number\n );\n uint256[] memory _updatedCreditScores = new uint256[](_validators.length);\n\n for (uint _i = 0; _i < _validators.length; _i++) {\n address _validator = _validators[_i];\n\n uint256 _indicator = getUnavailabilityIndicator(_validator, _period);\n bool _isJailedInPeriod = _jaileds[_i];\n bool _isMaintainingInPeriod = _maintaineds[_i];\n\n uint256 _actualGain = (_isJailedInPeriod || _isMaintainingInPeriod)\n ? 0\n : Math.subNonNegative(_gainCreditScore, _indicator);\n\n _creditScore[_validator] = Math.addWithUpperbound(_creditScore[_validator], _actualGain, _maxCreditScore);\n _updatedCreditScores[_i] = _creditScore[_validator];\n }\n\n emit CreditScoresUpdated(_validators, _updatedCreditScores);\n }\n\n function execResetCreditScores(address[] calldata _validators) external override onlyValidatorContract {\n uint256[] memory _updatedCreditScores = new uint256[](_validators.length);\n for (uint _i = 0; _i < _validators.length; _i++) {\n address _validator = _validators[_i];\n delete _creditScore[_validator];\n delete _updatedCreditScores[_i];\n }\n emit CreditScoresUpdated(_validators, _updatedCreditScores);\n }\n\n /**\n * @inheritdoc ICreditScore\n */\n function bailOut(address _consensusAddr) external override {\n require(\n _validatorContract.isValidatorCandidate(_consensusAddr),\n \"SlashIndicator: consensus address must be a validator candidate\"\n );\n require(\n _validatorContract.isCandidateAdmin(_consensusAddr, msg.sender),\n \"SlashIndicator: method caller must be a candidate admin\"\n );\n\n (bool _isJailed, , uint256 _jailedEpochLeft) = _validatorContract.getJailedTimeLeft(_consensusAddr);\n require(_isJailed, \"SlashIndicator: caller must be jailed in the current period\");\n\n uint256 _period = _validatorContract.currentPeriod();\n require(!_checkBailedOutAtPeriod[_consensusAddr][_period], \"SlashIndicator: validator has bailed out previously\");\n\n uint256 _score = _creditScore[_consensusAddr];\n uint256 _cost = _jailedEpochLeft * _bailOutCostMultiplier;\n require(_score >= _cost, \"SlashIndicator: insufficient credit score to bail out\");\n\n _validatorContract.execBailOut(_consensusAddr, _period);\n\n _creditScore[_consensusAddr] -= _cost;\n _setUnavailabilityIndicator(_consensusAddr, _period, 0);\n _checkBailedOutAtPeriod[_consensusAddr][_period] = true;\n }\n\n /**\n * @inheritdoc ICreditScore\n */\n function setCreditScoreConfigs(\n uint256 _gainScore,\n uint256 _maxScore,\n uint256 _bailOutMultiplier,\n uint256 _cutOffPercentage\n ) external override onlyAdmin {\n _setCreditScoreConfigs(_gainScore, _maxScore, _bailOutMultiplier, _cutOffPercentage);\n }\n\n /**\n * @dev See `ISlashUnavailability`\n */\n function getUnavailabilityIndicator(address _validator, uint256 _period) public view virtual returns (uint256);\n\n /**\n * @inheritdoc ICreditScore\n */\n function getCreditScoreConfigs()\n external\n view\n override\n returns (\n uint256 gainCreditScore_,\n uint256 maxCreditScore_,\n uint256 bailOutCostMultiplier_,\n uint256 cutOffPercentageAfterBailout_\n )\n {\n return (_gainCreditScore, _maxCreditScore, _bailOutCostMultiplier, _cutOffPercentageAfterBailout);\n }\n\n /**\n * @inheritdoc ICreditScore\n */\n function getCreditScore(address _validator) external view override returns (uint256) {\n return _creditScore[_validator];\n }\n\n /**\n * @inheritdoc ICreditScore\n */\n function getManyCreditScores(address[] calldata _validators)\n public\n view\n override\n returns (uint256[] memory _resultList)\n {\n _resultList = new uint256[](_validators.length);\n\n for (uint _i = 0; _i < _resultList.length; _i++) {\n _resultList[_i] = _creditScore[_validators[_i]];\n }\n }\n\n /**\n * @inheritdoc ICreditScore\n */\n function checkBailedOutAtPeriod(address _validator, uint256 _period) public view virtual override returns (bool) {\n return _checkBailedOutAtPeriod[_validator][_period];\n }\n\n /**\n * @dev See `SlashUnavailability`.\n */\n function _setUnavailabilityIndicator(\n address _validator,\n uint256 _period,\n uint256 _indicator\n ) internal virtual;\n\n /**\n * @dev See `ICreditScore-setCreditScoreConfigs`.\n */\n function _setCreditScoreConfigs(\n uint256 _gainScore,\n uint256 _maxScore,\n uint256 _bailOutMultiplier,\n uint256 _cutOffPercentage\n ) internal {\n require(_gainScore <= _maxScore, \"CreditScore: invalid credit score config\");\n require(_cutOffPercentage <= _MAX_PERCENTAGE, \"CreditScore: invalid cut off percentage config\");\n\n _gainCreditScore = _gainScore;\n _maxCreditScore = _maxScore;\n _bailOutCostMultiplier = _bailOutMultiplier;\n _cutOffPercentageAfterBailout = _cutOffPercentage;\n emit CreditScoreConfigsUpdated(_gainScore, _maxScore, _bailOutMultiplier, _cutOffPercentage);\n }\n}\n" - }, - "contracts/precompile-usages/PCUValidateDoubleSign.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./PrecompiledUsage.sol\";\n\nabstract contract PCUValidateDoubleSign is PrecompiledUsage {\n /// @dev Gets the address of the precompile of validating double sign evidence\n function precompileValidateDoubleSignAddress() public view virtual returns (address) {\n return address(0x67);\n }\n\n /**\n * @dev Validates the two submitted block header if they are produced by the same address\n *\n * Note: The recover process is done by pre-compiled contract. This function is marked as\n * virtual for implementing mocking contract for testing purpose.\n */\n function _pcValidateEvidence(bytes calldata _header1, bytes calldata _header2)\n internal\n view\n virtual\n returns (bool _validEvidence)\n {\n address _smc = precompileValidateDoubleSignAddress();\n bool _success = true;\n\n bytes memory _payload = abi.encodeWithSignature(\"validatingDoubleSignProof(bytes,bytes)\", _header1, _header2);\n uint _payloadLength = _payload.length;\n uint[1] memory _output;\n\n assembly {\n let _payloadStart := add(_payload, 0x20)\n if iszero(staticcall(gas(), _smc, _payloadStart, _payloadLength, _output, 0x20)) {\n _success := 0\n }\n\n if iszero(returndatasize()) {\n _success := 0\n }\n }\n\n if (!_success) revert ErrCallPrecompiled();\n return (_output[0] != 0);\n }\n}\n" - }, - "contracts/extensions/collections/HasRoninGovernanceAdminContract.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./HasProxyAdmin.sol\";\nimport \"../../interfaces/collections/IHasRoninGovernanceAdminContract.sol\";\nimport \"../../interfaces/IRoninGovernanceAdmin.sol\";\n\ncontract HasRoninGovernanceAdminContract is IHasRoninGovernanceAdminContract, HasProxyAdmin {\n IRoninGovernanceAdmin internal _roninGovernanceAdminContract;\n\n modifier onlyRoninGovernanceAdminContract() {\n if (roninGovernanceAdminContract() != msg.sender) revert ErrCallerMustBeGovernanceAdminContract();\n _;\n }\n\n /**\n * @inheritdoc IHasRoninGovernanceAdminContract\n */\n function roninGovernanceAdminContract() public view override returns (address) {\n return address(_roninGovernanceAdminContract);\n }\n\n /**\n * @inheritdoc IHasRoninGovernanceAdminContract\n */\n function setRoninGovernanceAdminContract(address _addr) external override onlyAdmin {\n if (_addr.code.length == 0) revert ErrZeroCodeContract();\n _setRoninGovernanceAdminContract(_addr);\n }\n\n /**\n * @dev Sets the ronin governance admin contract.\n *\n * Emits the event `RoninGovernanceAdminContractUpdated`.\n *\n */\n function _setRoninGovernanceAdminContract(address _addr) internal {\n _roninGovernanceAdminContract = IRoninGovernanceAdmin(_addr);\n emit RoninGovernanceAdminContractUpdated(_addr);\n }\n}\n" - }, - "contracts/interfaces/collections/IHasRoninGovernanceAdminContract.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./IHasContract.sol\";\n\ninterface IHasRoninGovernanceAdminContract is IHasContract {\n /// @dev Emitted when the ronin governance admin contract is updated.\n event RoninGovernanceAdminContractUpdated(address);\n\n /// @dev Error of method caller must be goverance admin contract.\n error ErrCallerMustBeGovernanceAdminContract();\n\n /**\n * @dev Returns the ronin governance admin contract.\n */\n function roninGovernanceAdminContract() external view returns (address);\n\n /**\n * @dev Sets the ronin governance admin contract.\n *\n * Requirements:\n * - The method caller is admin.\n * - The new address is a contract.\n *\n * Emits the event `RoninGovernanceAdminContractUpdated`.\n *\n */\n function setRoninGovernanceAdminContract(address) external;\n}\n" - }, - "contracts/mocks/validator/MockRoninValidatorSetExtended.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./MockRoninValidatorSetOverridePrecompile.sol\";\nimport \"../../libraries/EnumFlags.sol\";\n\ncontract MockRoninValidatorSetExtended is MockRoninValidatorSetOverridePrecompile {\n bool private _initialized;\n uint256[] internal _epochs;\n\n constructor() {}\n\n function initEpoch() public {\n if (!_initialized) {\n _epochs.push(0);\n _initialized = true;\n }\n }\n\n function endEpoch() external {\n _epochs.push(block.number);\n }\n\n function epochOf(uint256 _block) public view override returns (uint256 _epoch) {\n for (uint256 _i = _epochs.length; _i > 0; _i--) {\n if (_block > _epochs[_i - 1]) {\n return _i;\n }\n }\n }\n\n function epochEndingAt(uint256 _block) public view override(ITimingInfo, TimingStorage) returns (bool) {\n for (uint _i = 0; _i < _epochs.length; _i++) {\n if (_block == _epochs[_i]) {\n return true;\n }\n }\n return false;\n }\n\n function getJailUntils(address[] calldata _addrs) public view returns (uint256[] memory jailUntils_) {\n jailUntils_ = new uint256[](_addrs.length);\n for (uint _i = 0; _i < _addrs.length; _i++) {\n jailUntils_[_i] = _blockProducerJailedBlock[_addrs[_i]];\n }\n }\n\n function addValidators(address[] calldata _addrs) public {\n for (uint _i = 0; _i < _addrs.length; _i++) {\n _validators[_i] = _addrs[_i];\n _validatorMap[_addrs[_i]] = EnumFlags.ValidatorFlag.Both;\n }\n }\n}\n" - }, - "contracts/mocks/validator/MockRoninValidatorSetOverridePrecompile.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../MockPrecompile.sol\";\nimport \"../../ronin/validator/RoninValidatorSet.sol\";\n\ncontract MockRoninValidatorSetOverridePrecompile is RoninValidatorSet, MockPrecompile {\n constructor() {}\n\n function arrangeValidatorCandidates(\n address[] memory _candidates,\n uint256[] memory _trustedWeights,\n uint _newValidatorCount,\n uint _maxPrioritizedValidatorNumber\n ) external pure returns (address[] memory) {\n _arrangeValidatorCandidates(_candidates, _trustedWeights, _newValidatorCount, _maxPrioritizedValidatorNumber);\n return _candidates;\n }\n\n function _pcSortCandidates(address[] memory _candidates, uint256[] memory _weights)\n internal\n pure\n override\n returns (address[] memory _result)\n {\n return sortValidators(_candidates, _weights);\n }\n\n function _pcPickValidatorSet(\n address[] memory _candidates,\n uint256[] memory _weights,\n uint256[] memory _trustedWeights,\n uint256 _maxValidatorNumber,\n uint256 _maxPrioritizedValidatorNumber\n ) internal pure override returns (address[] memory _result, uint256 _newValidatorCount) {\n _result = pickValidatorSet(\n _candidates,\n _weights,\n _trustedWeights,\n _maxValidatorNumber,\n _maxPrioritizedValidatorNumber\n );\n\n _newValidatorCount = _result.length;\n }\n}\n" - }, - "contracts/mocks/MockPrecompile.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./libraries/Sorting.sol\";\nimport \"../libraries/Math.sol\";\n\ncontract MockPrecompile {\n function sortValidators(address[] memory _validators, uint256[] memory _weights)\n public\n pure\n returns (address[] memory)\n {\n return Sorting.sort(_validators, _weights);\n }\n\n function validatingDoubleSignProof(\n bytes calldata, /*_header1*/\n bytes calldata /*_header2*/\n ) public pure returns (bool _validEvidence) {\n return true;\n }\n\n function pickValidatorSet(\n address[] memory _candidates,\n uint256[] memory _weights,\n uint256[] memory _trustedWeights,\n uint256 _maxValidatorNumber,\n uint256 _maxPrioritizedValidatorNumber\n ) public pure returns (address[] memory _result) {\n (_result, _trustedWeights) = Sorting.sortWithExternalKeys(_candidates, _weights, _trustedWeights);\n uint256 _newValidatorCount = Math.min(_maxValidatorNumber, _result.length);\n _arrangeValidatorCandidates(_result, _trustedWeights, _newValidatorCount, _maxPrioritizedValidatorNumber);\n }\n\n /**\n * @dev Arranges the sorted candidates to list of validators, by asserting prioritized and non-prioritized candidates\n *\n * @param _candidates A sorted list of candidates\n */\n function _arrangeValidatorCandidates(\n address[] memory _candidates,\n uint256[] memory _trustedWeights,\n uint _newValidatorCount,\n uint _maxPrioritizedValidatorNumber\n ) internal pure {\n address[] memory _waitingCandidates = new address[](_candidates.length);\n uint _waitingCounter;\n uint _prioritySlotCounter;\n\n for (uint _i = 0; _i < _candidates.length; _i++) {\n if (_trustedWeights[_i] > 0 && _prioritySlotCounter < _maxPrioritizedValidatorNumber) {\n _candidates[_prioritySlotCounter++] = _candidates[_i];\n continue;\n }\n _waitingCandidates[_waitingCounter++] = _candidates[_i];\n }\n\n _waitingCounter = 0;\n for (uint _i = _prioritySlotCounter; _i < _newValidatorCount; _i++) {\n _candidates[_i] = _waitingCandidates[_waitingCounter++];\n }\n\n assembly {\n mstore(_candidates, _newValidatorCount)\n }\n }\n}\n" - }, - "contracts/ronin/validator/RoninValidatorSet.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../../interfaces/validator/IRoninValidatorSet.sol\";\nimport \"./CoinbaseExecution.sol\";\nimport \"./SlashingExecution.sol\";\n\ncontract RoninValidatorSet is Initializable, CoinbaseExecution, SlashingExecution {\n constructor() {\n _disableInitializers();\n }\n\n fallback() external payable {\n _fallback();\n }\n\n receive() external payable {\n _fallback();\n }\n\n /**\n * @dev Initializes the contract storage.\n */\n function initialize(\n address __slashIndicatorContract,\n address __stakingContract,\n address __stakingVestingContract,\n address __maintenanceContract,\n address __roninTrustedOrganizationContract,\n address __bridgeTrackingContract,\n uint256 __maxValidatorNumber,\n uint256 __maxValidatorCandidate,\n uint256 __maxPrioritizedValidatorNumber,\n uint256 __minEffectiveDaysOnwards,\n uint256 __numberOfBlocksInEpoch,\n // __emergencyExitConfigs[0]: emergencyExitLockedAmount\n // __emergencyExitConfigs[1]: emergencyExpiryDuration\n uint256[2] calldata __emergencyExitConfigs\n ) external initializer {\n _setSlashIndicatorContract(__slashIndicatorContract);\n _setStakingContract(__stakingContract);\n _setStakingVestingContract(__stakingVestingContract);\n _setMaintenanceContract(__maintenanceContract);\n _setBridgeTrackingContract(__bridgeTrackingContract);\n _setRoninTrustedOrganizationContract(__roninTrustedOrganizationContract);\n _setMaxValidatorNumber(__maxValidatorNumber);\n _setMaxValidatorCandidate(__maxValidatorCandidate);\n _setMaxPrioritizedValidatorNumber(__maxPrioritizedValidatorNumber);\n _setMinEffectiveDaysOnwards(__minEffectiveDaysOnwards);\n _setEmergencyExitLockedAmount(__emergencyExitConfigs[0]);\n _setEmergencyExpiryDuration(__emergencyExitConfigs[1]);\n _numberOfBlocksInEpoch = __numberOfBlocksInEpoch;\n }\n\n /**\n * @dev Only receives RON from staking vesting contract (for topping up bonus), and from staking contract (for transferring\n * deducting amount on slashing).\n */\n function _fallback() internal view {\n if (msg.sender != stakingVestingContract() && msg.sender != stakingContract()) revert ErrUnauthorizedReceiveRON();\n }\n\n /**\n * @dev Override `ValidatorInfoStorage-_bridgeOperatorOf`.\n */\n function _bridgeOperatorOf(address _consensusAddr)\n internal\n view\n override(EmergencyExit, ValidatorInfoStorage)\n returns (address)\n {\n return super._bridgeOperatorOf(_consensusAddr);\n }\n}\n" - }, - "contracts/mocks/libraries/Sorting.sol": { - "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity ^0.8.0;\n\nlibrary Sorting {\n struct Node {\n uint key;\n uint value;\n }\n\n struct Node3 {\n uint key;\n uint value;\n uint otherKey;\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n // VALUE SORTING //\n ///////////////////////////////////////////////////////////////////////////////////////\n\n function sort(uint[] memory data) internal pure returns (uint[] memory) {\n return _quickSort(data, int(0), int(data.length - 1));\n }\n\n function _quickSort(\n uint[] memory arr,\n int left,\n int right\n ) private pure returns (uint[] memory) {\n int i = left;\n int j = right;\n if (i == j) return arr;\n uint pivot = arr[uint(left + (right - left) / 2)];\n while (i <= j) {\n while (arr[uint(i)] > pivot) i++;\n while (pivot > arr[uint(j)]) j--;\n if (i <= j) {\n (arr[uint(i)], arr[uint(j)]) = (arr[uint(j)], arr[uint(i)]);\n i++;\n j--;\n }\n }\n if (left < j) arr = _quickSort(arr, left, j);\n if (i < right) arr = _quickSort(arr, i, right);\n\n return arr;\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n // NODE SORTING //\n ///////////////////////////////////////////////////////////////////////////////////////\n\n function sort(address[] memory _keys, uint256[] memory _values) internal pure returns (address[] memory) {\n require(_values.length == _keys.length, \"Sorting: invalid array length\");\n if (_keys.length == 0) {\n return _keys;\n }\n\n Node[] memory _nodes = new Node[](_keys.length);\n for (uint256 _i; _i < _nodes.length; _i++) {\n _nodes[_i] = Node(uint256(uint160(_keys[_i])), _values[_i]);\n }\n _quickSortNodes(_nodes, int(0), int(_nodes.length - 1));\n\n for (uint256 _i; _i < _nodes.length; _i++) {\n _keys[_i] = address(uint160(_nodes[_i].key)); // Casting?\n }\n\n return _keys;\n }\n\n function sortNodes(Node[] memory nodes) internal pure returns (Node[] memory) {\n return _quickSortNodes(nodes, int(0), int(nodes.length - 1));\n }\n\n function _quickSortNodes(\n Node[] memory nodes,\n int left,\n int right\n ) private pure returns (Node[] memory) {\n int i = left;\n int j = right;\n if (i == j) return nodes;\n Node memory pivot = nodes[uint(left + (right - left) / 2)];\n while (i <= j) {\n while (nodes[uint(i)].value > pivot.value) i++;\n while (pivot.value > nodes[uint(j)].value) j--;\n if (i <= j) {\n (nodes[uint(i)], nodes[uint(j)]) = __swapNodes(nodes[uint(i)], nodes[uint(j)]);\n i++;\n j--;\n }\n }\n if (left < j) nodes = _quickSortNodes(nodes, left, j);\n if (i < right) nodes = _quickSortNodes(nodes, i, right);\n\n return nodes;\n }\n\n function _bubbleSortNodes(Node[] memory nodes) private pure returns (Node[] memory) {\n uint length = nodes.length;\n for (uint i = 0; i < length - 1; i++) {\n for (uint j = i + 1; j < length; j++) {\n if (nodes[j].value > nodes[i].value) {\n (nodes[i], nodes[j]) = __swapNodes(nodes[i], nodes[j]);\n }\n }\n }\n return nodes;\n }\n\n function __swapNodes(Node memory x, Node memory y) private pure returns (Node memory, Node memory) {\n Node memory tmp = x;\n (x, y) = (y, tmp);\n return (x, y);\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////\n // NODE3 SORTING //\n ///////////////////////////////////////////////////////////////////////////////////////\n\n function sortWithExternalKeys(\n address[] memory _keys,\n uint256[] memory _values,\n uint256[] memory _otherKeys\n ) internal pure returns (address[] memory keys_, uint256[] memory otherKeys_) {\n require((_values.length == _keys.length) && (_otherKeys.length == _keys.length), \"Sorting: invalid array length\");\n if (_keys.length == 0) {\n return (_keys, _otherKeys);\n }\n\n Node3[] memory _nodes = new Node3[](_keys.length);\n for (uint256 _i; _i < _nodes.length; _i++) {\n _nodes[_i] = Node3(uint256(uint160(_keys[_i])), _values[_i], _otherKeys[_i]);\n }\n _quickSortNode3s(_nodes, int(0), int(_nodes.length - 1));\n\n for (uint256 _i; _i < _nodes.length; _i++) {\n _keys[_i] = address(uint160(_nodes[_i].key)); // Casting?\n }\n\n return (_keys, _otherKeys);\n }\n\n function sortNode3s(Node3[] memory nodes) internal pure returns (Node3[] memory) {\n return _quickSortNode3s(nodes, int(0), int(nodes.length - 1));\n }\n\n function _quickSortNode3s(\n Node3[] memory nodes,\n int left,\n int right\n ) private pure returns (Node3[] memory) {\n int i = left;\n int j = right;\n if (i == j) return nodes;\n Node3 memory pivot = nodes[uint(left + (right - left) / 2)];\n while (i <= j) {\n while (nodes[uint(i)].value > pivot.value) i++;\n while (pivot.value > nodes[uint(j)].value) j--;\n if (i <= j) {\n (nodes[uint(i)], nodes[uint(j)]) = __swapNode3s(nodes[uint(i)], nodes[uint(j)]);\n i++;\n j--;\n }\n }\n if (left < j) nodes = _quickSortNode3s(nodes, left, j);\n if (i < right) nodes = _quickSortNode3s(nodes, i, right);\n\n return nodes;\n }\n\n function _bubbleSortNode3s(Node3[] memory nodes) private pure returns (Node3[] memory) {\n uint length = nodes.length;\n for (uint i = 0; i < length - 1; i++) {\n for (uint j = i + 1; j < length; j++) {\n if (nodes[j].value > nodes[i].value) {\n (nodes[i], nodes[j]) = __swapNode3s(nodes[i], nodes[j]);\n }\n }\n }\n return nodes;\n }\n\n function __swapNode3s(Node3 memory x, Node3 memory y) private pure returns (Node3 memory, Node3 memory) {\n Node3 memory tmp = x;\n (x, y) = (y, tmp);\n return (x, y);\n }\n}\n" - }, - "contracts/mainchain/MainchainGatewayV2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/AccessControlEnumerable.sol\";\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\";\nimport \"../extensions/GatewayV2.sol\";\nimport \"../extensions/WithdrawalLimitation.sol\";\nimport \"../libraries/Transfer.sol\";\nimport \"../interfaces/IMainchainGatewayV2.sol\";\n\ncontract MainchainGatewayV2 is WithdrawalLimitation, Initializable, AccessControlEnumerable, IMainchainGatewayV2 {\n using Token for Token.Info;\n using Transfer for Transfer.Request;\n using Transfer for Transfer.Receipt;\n\n /// @dev Emitted when the bridge operators are replaced\n event BridgeOperatorsReplaced(address[] operators);\n\n /// @dev Withdrawal unlocker role hash\n bytes32 public constant WITHDRAWAL_UNLOCKER_ROLE = keccak256(\"WITHDRAWAL_UNLOCKER_ROLE\");\n\n /// @dev Wrapped native token address\n IWETH public wrappedNativeToken;\n /// @dev Ronin network id\n uint256 public roninChainId;\n /// @dev Total deposit\n uint256 public depositCount;\n /// @dev Domain seperator\n bytes32 internal _domainSeparator;\n /// @dev Mapping from mainchain token => token address on Ronin network\n mapping(address => MappedToken) internal _roninToken;\n /// @dev Mapping from withdrawal id => withdrawal hash\n mapping(uint256 => bytes32) public withdrawalHash;\n /// @dev Mapping from withdrawal id => locked\n mapping(uint256 => bool) public withdrawalLocked;\n\n /// @dev Mapping from validator address => last block that the bridge operator is added\n mapping(address => uint256) internal _bridgeOperatorAddedBlock;\n /// @dev Bridge operators array\n address[] internal _bridgeOperators;\n\n fallback() external payable {\n _fallback();\n }\n\n receive() external payable {\n _fallback();\n }\n\n /**\n * @dev Initializes contract storage.\n */\n function initialize(\n address _roleSetter,\n IWETH _wrappedToken,\n uint256 _roninChainId,\n uint256 _numerator,\n uint256 _highTierVWNumerator,\n uint256 _denominator,\n // _addresses[0]: mainchainTokens\n // _addresses[1]: roninTokens\n // _addresses[2]: withdrawalUnlockers\n address[][3] calldata _addresses,\n // _thresholds[0]: highTierThreshold\n // _thresholds[1]: lockedThreshold\n // _thresholds[2]: unlockFeePercentages\n // _thresholds[3]: dailyWithdrawalLimit\n uint256[][4] calldata _thresholds,\n Token.Standard[] calldata _standards\n ) external payable virtual initializer {\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\n roninChainId = _roninChainId;\n\n _setWrappedNativeTokenContract(_wrappedToken);\n _updateDomainSeparator();\n _setThreshold(_numerator, _denominator);\n _setHighTierVoteWeightThreshold(_highTierVWNumerator, _denominator);\n _verifyThresholds();\n\n if (_addresses[0].length > 0) {\n // Map mainchain tokens to ronin tokens\n _mapTokens(_addresses[0], _addresses[1], _standards);\n // Sets thresholds based on the mainchain tokens\n _setHighTierThresholds(_addresses[0], _thresholds[0]);\n _setLockedThresholds(_addresses[0], _thresholds[1]);\n _setUnlockFeePercentages(_addresses[0], _thresholds[2]);\n _setDailyWithdrawalLimits(_addresses[0], _thresholds[3]);\n }\n\n // Grant role for withdrawal unlocker\n for (uint256 _i; _i < _addresses[2].length; _i++) {\n _grantRole(WITHDRAWAL_UNLOCKER_ROLE, _addresses[2][_i]);\n }\n }\n\n /**\n * @inheritdoc IBridge\n */\n function replaceBridgeOperators(address[] calldata _list) external onlyAdmin {\n address _addr;\n for (uint256 _i = 0; _i < _list.length; _i++) {\n _addr = _list[_i];\n if (_bridgeOperatorAddedBlock[_addr] == 0) {\n _bridgeOperators.push(_addr);\n }\n _bridgeOperatorAddedBlock[_addr] = block.number;\n }\n\n {\n uint256 _i;\n while (_i < _bridgeOperators.length) {\n _addr = _bridgeOperators[_i];\n if (_bridgeOperatorAddedBlock[_addr] < block.number) {\n delete _bridgeOperatorAddedBlock[_addr];\n _bridgeOperators[_i] = _bridgeOperators[_bridgeOperators.length - 1];\n _bridgeOperators.pop();\n continue;\n }\n _i++;\n }\n }\n\n emit BridgeOperatorsReplaced(_list);\n }\n\n /**\n * @inheritdoc IBridge\n */\n function getBridgeOperators() external view returns (address[] memory) {\n return _bridgeOperators;\n }\n\n /**\n * @dev Receives ether without doing anything. Use this function to topup native token.\n */\n function receiveEther() external payable {}\n\n /**\n * @inheritdoc IMainchainGatewayV2\n */\n function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {\n return _domainSeparator;\n }\n\n /**\n * @inheritdoc IMainchainGatewayV2\n */\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external virtual onlyAdmin {\n _setWrappedNativeTokenContract(_wrappedToken);\n }\n\n /**\n * @inheritdoc IMainchainGatewayV2\n */\n function requestDepositFor(Transfer.Request calldata _request) external payable virtual whenNotPaused {\n _requestDepositFor(_request, msg.sender);\n }\n\n /**\n * @inheritdoc IMainchainGatewayV2\n */\n function submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] calldata _signatures)\n external\n virtual\n whenNotPaused\n returns (bool _locked)\n {\n return _submitWithdrawal(_receipt, _signatures);\n }\n\n /**\n * @inheritdoc IMainchainGatewayV2\n */\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external onlyRole(WITHDRAWAL_UNLOCKER_ROLE) {\n bytes32 _receiptHash = _receipt.hash();\n require(withdrawalHash[_receipt.id] == _receipt.hash(), \"MainchainGatewayV2: invalid receipt\");\n require(withdrawalLocked[_receipt.id], \"MainchainGatewayV2: query for approved withdrawal\");\n delete withdrawalLocked[_receipt.id];\n emit WithdrawalUnlocked(_receiptHash, _receipt);\n\n address _token = _receipt.mainchain.tokenAddr;\n if (_receipt.info.erc == Token.Standard.ERC20) {\n Token.Info memory _feeInfo = _receipt.info;\n _feeInfo.quantity = _computeFeePercentage(_receipt.info.quantity, unlockFeePercentages[_token]);\n Token.Info memory _withdrawInfo = _receipt.info;\n _withdrawInfo.quantity = _receipt.info.quantity - _feeInfo.quantity;\n\n _feeInfo.handleAssetTransfer(payable(msg.sender), _token, wrappedNativeToken);\n _withdrawInfo.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken);\n } else {\n _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _token, wrappedNativeToken);\n }\n\n emit Withdrew(_receiptHash, _receipt);\n }\n\n /**\n * @inheritdoc IMainchainGatewayV2\n */\n function mapTokens(\n address[] calldata _mainchainTokens,\n address[] calldata _roninTokens,\n Token.Standard[] calldata _standards\n ) external virtual onlyAdmin {\n require(_mainchainTokens.length > 0, \"MainchainGatewayV2: query for empty array\");\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\n }\n\n /**\n * @inheritdoc IMainchainGatewayV2\n */\n function mapTokensAndThresholds(\n address[] calldata _mainchainTokens,\n address[] calldata _roninTokens,\n Token.Standard[] calldata _standards,\n // _thresholds[0]: highTierThreshold\n // _thresholds[1]: lockedThreshold\n // _thresholds[2]: unlockFeePercentages\n // _thresholds[3]: dailyWithdrawalLimit\n uint256[][4] calldata _thresholds\n ) external virtual onlyAdmin {\n require(_mainchainTokens.length > 0, \"MainchainGatewayV2: query for empty array\");\n _mapTokens(_mainchainTokens, _roninTokens, _standards);\n _setHighTierThresholds(_mainchainTokens, _thresholds[0]);\n _setLockedThresholds(_mainchainTokens, _thresholds[1]);\n _setUnlockFeePercentages(_mainchainTokens, _thresholds[2]);\n _setDailyWithdrawalLimits(_mainchainTokens, _thresholds[3]);\n }\n\n /**\n * @inheritdoc IMainchainGatewayV2\n */\n function getRoninToken(address _mainchainToken) public view returns (MappedToken memory _token) {\n _token = _roninToken[_mainchainToken];\n require(_token.tokenAddr != address(0), \"MainchainGatewayV2: unsupported token\");\n }\n\n /**\n * @dev Maps mainchain tokens to Ronin network.\n *\n * Requirement:\n * - The arrays have the same length.\n *\n * Emits the `TokenMapped` event.\n *\n */\n function _mapTokens(\n address[] calldata _mainchainTokens,\n address[] calldata _roninTokens,\n Token.Standard[] calldata _standards\n ) internal virtual {\n require(\n _mainchainTokens.length == _roninTokens.length && _mainchainTokens.length == _standards.length,\n \"MainchainGatewayV2: invalid array length\"\n );\n\n for (uint256 _i; _i < _mainchainTokens.length; _i++) {\n _roninToken[_mainchainTokens[_i]].tokenAddr = _roninTokens[_i];\n _roninToken[_mainchainTokens[_i]].erc = _standards[_i];\n }\n\n emit TokenMapped(_mainchainTokens, _roninTokens, _standards);\n }\n\n /**\n * @dev Submits withdrawal receipt.\n *\n * Requirements:\n * - The receipt kind is withdrawal.\n * - The receipt is to withdraw on this chain.\n * - The receipt is not used to withdraw before.\n * - The withdrawal is not reached the limit threshold.\n * - The signer weight total is larger than or equal to the minimum threshold.\n * - The signature signers are in order.\n *\n * Emits the `Withdrew` once the assets are released.\n *\n */\n function _submitWithdrawal(Transfer.Receipt calldata _receipt, Signature[] memory _signatures)\n internal\n virtual\n returns (bool _locked)\n {\n uint256 _id = _receipt.id;\n uint256 _quantity = _receipt.info.quantity;\n address _tokenAddr = _receipt.mainchain.tokenAddr;\n\n _receipt.info.validate();\n require(_receipt.kind == Transfer.Kind.Withdrawal, \"MainchainGatewayV2: invalid receipt kind\");\n require(_receipt.mainchain.chainId == block.chainid, \"MainchainGatewayV2: invalid chain id\");\n MappedToken memory _token = getRoninToken(_receipt.mainchain.tokenAddr);\n require(\n _token.erc == _receipt.info.erc && _token.tokenAddr == _receipt.ronin.tokenAddr,\n \"MainchainGatewayV2: invalid receipt\"\n );\n require(withdrawalHash[_id] == bytes32(0), \"MainchainGatewayV2: query for processed withdrawal\");\n require(\n _receipt.info.erc == Token.Standard.ERC721 || !_reachedWithdrawalLimit(_tokenAddr, _quantity),\n \"MainchainGatewayV2: reached daily withdrawal limit\"\n );\n\n bytes32 _receiptHash = _receipt.hash();\n bytes32 _receiptDigest = Transfer.receiptDigest(_domainSeparator, _receiptHash);\n\n uint256 _minimumVoteWeight;\n (_minimumVoteWeight, _locked) = _computeMinVoteWeight(_receipt.info.erc, _tokenAddr, _quantity);\n\n {\n bool _passed;\n address _signer;\n address _lastSigner;\n Signature memory _sig;\n uint256 _weight;\n for (uint256 _i; _i < _signatures.length; _i++) {\n _sig = _signatures[_i];\n _signer = ecrecover(_receiptDigest, _sig.v, _sig.r, _sig.s);\n require(_lastSigner < _signer, \"MainchainGatewayV2: invalid order\");\n _lastSigner = _signer;\n\n _weight += _getWeight(_signer);\n if (_weight >= _minimumVoteWeight) {\n _passed = true;\n break;\n }\n }\n require(_passed, \"MainchainGatewayV2: query for insufficient vote weight\");\n withdrawalHash[_id] = _receiptHash;\n }\n\n if (_locked) {\n withdrawalLocked[_id] = true;\n emit WithdrawalLocked(_receiptHash, _receipt);\n return _locked;\n }\n\n _recordWithdrawal(_tokenAddr, _quantity);\n _receipt.info.handleAssetTransfer(payable(_receipt.mainchain.addr), _tokenAddr, wrappedNativeToken);\n emit Withdrew(_receiptHash, _receipt);\n }\n\n /**\n * @dev Requests deposit made by `_requester` address.\n *\n * Requirements:\n * - The token info is valid.\n * - The `msg.value` is 0 while depositing ERC20 token.\n * - The `msg.value` is equal to deposit quantity while depositing native token.\n *\n * Emits the `DepositRequested` event.\n *\n */\n function _requestDepositFor(Transfer.Request memory _request, address _requester) internal virtual {\n MappedToken memory _token;\n address _weth = address(wrappedNativeToken);\n\n _request.info.validate();\n if (_request.tokenAddr == address(0)) {\n require(_request.info.quantity == msg.value, \"MainchainGatewayV2: invalid request\");\n _token = getRoninToken(_weth);\n require(_token.erc == _request.info.erc, \"MainchainGatewayV2: invalid token standard\");\n _request.tokenAddr = _weth;\n } else {\n require(msg.value == 0, \"MainchainGatewayV2: invalid request\");\n _token = getRoninToken(_request.tokenAddr);\n require(_token.erc == _request.info.erc, \"MainchainGatewayV2: invalid token standard\");\n _request.info.transferFrom(_requester, address(this), _request.tokenAddr);\n // Withdraw if token is WETH\n if (_weth == _request.tokenAddr) {\n IWETH(_weth).withdraw(_request.info.quantity);\n }\n }\n\n uint256 _depositId = depositCount++;\n Transfer.Receipt memory _receipt = _request.into_deposit_receipt(\n _requester,\n _depositId,\n _token.tokenAddr,\n roninChainId\n );\n\n emit DepositRequested(_receipt.hash(), _receipt);\n }\n\n /**\n * @dev Returns the minimum vote weight for the token.\n */\n function _computeMinVoteWeight(\n Token.Standard _erc,\n address _token,\n uint256 _quantity\n ) internal virtual returns (uint256 _weight, bool _locked) {\n uint256 _totalWeight = _getTotalWeight();\n _weight = _minimumVoteWeight(_totalWeight);\n if (_erc == Token.Standard.ERC20) {\n if (highTierThreshold[_token] <= _quantity) {\n _weight = _highTierVoteWeight(_totalWeight);\n }\n _locked = _lockedWithdrawalRequest(_token, _quantity);\n }\n }\n\n /**\n * @dev Update domain seperator.\n */\n function _updateDomainSeparator() internal {\n _domainSeparator = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(\"MainchainGatewayV2\"),\n keccak256(\"2\"),\n block.chainid,\n address(this)\n )\n );\n }\n\n /**\n * @dev Sets the WETH contract.\n *\n * Emits the `WrappedNativeTokenContractUpdated` event.\n *\n */\n function _setWrappedNativeTokenContract(IWETH _wrapedToken) internal {\n wrappedNativeToken = _wrapedToken;\n emit WrappedNativeTokenContractUpdated(_wrapedToken);\n }\n\n /**\n * @dev Receives ETH from WETH or creates deposit request.\n */\n function _fallback() internal virtual whenNotPaused {\n if (msg.sender != address(wrappedNativeToken)) {\n Transfer.Request memory _request;\n _request.recipientAddr = msg.sender;\n _request.info.quantity = msg.value;\n _requestDepositFor(_request, _request.recipientAddr);\n }\n }\n\n /**\n * @inheritdoc GatewayV2\n */\n function _getTotalWeight() internal view override returns (uint256) {\n return _bridgeOperators.length;\n }\n\n /**\n * @dev Returns the weight of an address.\n */\n function _getWeight(address _addr) internal view returns (uint256) {\n return _bridgeOperatorAddedBlock[_addr] > 0 ? 1 : 0;\n }\n}\n" - }, - "contracts/extensions/WithdrawalLimitation.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./GatewayV2.sol\";\n\nabstract contract WithdrawalLimitation is GatewayV2 {\n /// @dev Emitted when the high-tier vote weight threshold is updated\n event HighTierVoteWeightThresholdUpdated(\n uint256 indexed nonce,\n uint256 indexed numerator,\n uint256 indexed denominator,\n uint256 previousNumerator,\n uint256 previousDenominator\n );\n /// @dev Emitted when the thresholds for high-tier withdrawals that requires high-tier vote weights are updated\n event HighTierThresholdsUpdated(address[] tokens, uint256[] thresholds);\n /// @dev Emitted when the thresholds for locked withdrawals are updated\n event LockedThresholdsUpdated(address[] tokens, uint256[] thresholds);\n /// @dev Emitted when the fee percentages to unlock withdraw are updated\n event UnlockFeePercentagesUpdated(address[] tokens, uint256[] percentages);\n /// @dev Emitted when the daily limit thresholds are updated\n event DailyWithdrawalLimitsUpdated(address[] tokens, uint256[] limits);\n\n uint256 public constant _MAX_PERCENTAGE = 1_000_000;\n\n uint256 internal _highTierVWNum;\n uint256 internal _highTierVWDenom;\n\n /// @dev Mapping from mainchain token => the amount thresholds for high-tier withdrawals that requires high-tier vote weights\n mapping(address => uint256) public highTierThreshold;\n /// @dev Mapping from mainchain token => the amount thresholds to lock withdrawal\n mapping(address => uint256) public lockedThreshold;\n /// @dev Mapping from mainchain token => unlock fee percentages for unlocker\n /// @notice Values 0-1,000,000 map to 0%-100%\n mapping(address => uint256) public unlockFeePercentages;\n /// @dev Mapping from mainchain token => daily limit amount for withdrawal\n mapping(address => uint256) public dailyWithdrawalLimit;\n /// @dev Mapping from token address => today withdrawal amount\n mapping(address => uint256) public lastSyncedWithdrawal;\n /// @dev Mapping from token address => last date synced to record the `lastSyncedWithdrawal`\n mapping(address => uint256) public lastDateSynced;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n */\n uint256[50] private ______gap;\n\n /**\n * @dev Override `GatewayV2-setThreshold`.\n *\n * Requirements:\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\n *\n */\n function setThreshold(uint256 _numerator, uint256 _denominator)\n external\n virtual\n override\n onlyAdmin\n returns (uint256 _previousNum, uint256 _previousDenom)\n {\n (_previousNum, _previousDenom) = _setThreshold(_numerator, _denominator);\n _verifyThresholds();\n }\n\n /**\n * @dev Returns the high-tier vote weight threshold.\n */\n function getHighTierVoteWeightThreshold() external view virtual returns (uint256, uint256) {\n return (_highTierVWNum, _highTierVWDenom);\n }\n\n /**\n * @dev Checks whether the `_voteWeight` passes the high-tier vote weight threshold.\n */\n function checkHighTierVoteWeightThreshold(uint256 _voteWeight) external view virtual returns (bool) {\n return _voteWeight * _highTierVWDenom >= _highTierVWNum * _getTotalWeight();\n }\n\n /**\n * @dev Sets high-tier vote weight threshold and returns the old one.\n *\n * Requirements:\n * - The method caller is admin.\n * - The high-tier vote weight threshold must equal to or larger than the normal threshold.\n *\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\n *\n */\n function setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator)\n external\n virtual\n onlyAdmin\n returns (uint256 _previousNum, uint256 _previousDenom)\n {\n (_previousNum, _previousDenom) = _setHighTierVoteWeightThreshold(_numerator, _denominator);\n _verifyThresholds();\n }\n\n /**\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\n *\n * Requirements:\n * - The method caller is admin.\n * - The arrays have the same length and its length larger than 0.\n *\n * Emits the `HighTierThresholdsUpdated` event.\n *\n */\n function setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds)\n external\n virtual\n onlyAdmin\n {\n require(_tokens.length > 0, \"WithdrawalLimitation: invalid array length\");\n _setHighTierThresholds(_tokens, _thresholds);\n }\n\n /**\n * @dev Sets the amount thresholds to lock withdrawal.\n *\n * Requirements:\n * - The method caller is admin.\n * - The arrays have the same length and its length larger than 0.\n *\n * Emits the `LockedThresholdsUpdated` event.\n *\n */\n function setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin {\n require(_tokens.length > 0, \"WithdrawalLimitation: invalid array length\");\n _setLockedThresholds(_tokens, _thresholds);\n }\n\n /**\n * @dev Sets fee percentages to unlock withdrawal.\n *\n * Requirements:\n * - The method caller is admin.\n * - The arrays have the same length and its length larger than 0.\n *\n * Emits the `UnlockFeePercentagesUpdated` event.\n *\n */\n function setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages)\n external\n virtual\n onlyAdmin\n {\n require(_tokens.length > 0, \"WithdrawalLimitation: invalid array length\");\n _setUnlockFeePercentages(_tokens, _percentages);\n }\n\n /**\n * @dev Sets daily limit amounts for the withdrawals.\n *\n * Requirements:\n * - The method caller is admin.\n * - The arrays have the same length and its length larger than 0.\n *\n * Emits the `DailyWithdrawalLimitsUpdated` event.\n *\n */\n function setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) external virtual onlyAdmin {\n require(_tokens.length > 0, \"WithdrawalLimitation: invalid array length\");\n _setDailyWithdrawalLimits(_tokens, _limits);\n }\n\n /**\n * @dev Checks whether the withdrawal reaches the limitation.\n */\n function reachedWithdrawalLimit(address _token, uint256 _quantity) external view virtual returns (bool) {\n return _reachedWithdrawalLimit(_token, _quantity);\n }\n\n /**\n * @dev Sets high-tier vote weight threshold and returns the old one.\n *\n * Emits the `HighTierVoteWeightThresholdUpdated` event.\n *\n */\n function _setHighTierVoteWeightThreshold(uint256 _numerator, uint256 _denominator)\n internal\n returns (uint256 _previousNum, uint256 _previousDenom)\n {\n require(_numerator <= _denominator, \"WithdrawalLimitation: invalid threshold\");\n _previousNum = _highTierVWNum;\n _previousDenom = _highTierVWDenom;\n _highTierVWNum = _numerator;\n _highTierVWDenom = _denominator;\n emit HighTierVoteWeightThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\n }\n\n /**\n * @dev Sets the thresholds for high-tier withdrawals that requires high-tier vote weights.\n *\n * Requirements:\n * - The array lengths are equal.\n *\n * Emits the `HighTierThresholdsUpdated` event.\n *\n */\n function _setHighTierThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\n require(_tokens.length == _thresholds.length, \"WithdrawalLimitation: invalid array length\");\n for (uint256 _i; _i < _tokens.length; _i++) {\n highTierThreshold[_tokens[_i]] = _thresholds[_i];\n }\n emit HighTierThresholdsUpdated(_tokens, _thresholds);\n }\n\n /**\n * @dev Sets the amount thresholds to lock withdrawal.\n *\n * Requirements:\n * - The array lengths are equal.\n *\n * Emits the `LockedThresholdsUpdated` event.\n *\n */\n function _setLockedThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\n require(_tokens.length == _thresholds.length, \"WithdrawalLimitation: invalid array length\");\n for (uint256 _i; _i < _tokens.length; _i++) {\n lockedThreshold[_tokens[_i]] = _thresholds[_i];\n }\n emit LockedThresholdsUpdated(_tokens, _thresholds);\n }\n\n /**\n * @dev Sets fee percentages to unlock withdrawal.\n *\n * Requirements:\n * - The array lengths are equal.\n * - The percentage is equal to or less than 100_000.\n *\n * Emits the `UnlockFeePercentagesUpdated` event.\n *\n */\n function _setUnlockFeePercentages(address[] calldata _tokens, uint256[] calldata _percentages) internal virtual {\n require(_tokens.length == _percentages.length, \"WithdrawalLimitation: invalid array length\");\n for (uint256 _i; _i < _tokens.length; _i++) {\n require(_percentages[_i] <= _MAX_PERCENTAGE, \"WithdrawalLimitation: invalid percentage\");\n unlockFeePercentages[_tokens[_i]] = _percentages[_i];\n }\n emit UnlockFeePercentagesUpdated(_tokens, _percentages);\n }\n\n /**\n * @dev Sets daily limit amounts for the withdrawals.\n *\n * Requirements:\n * - The array lengths are equal.\n *\n * Emits the `DailyWithdrawalLimitsUpdated` event.\n *\n */\n function _setDailyWithdrawalLimits(address[] calldata _tokens, uint256[] calldata _limits) internal virtual {\n require(_tokens.length == _limits.length, \"WithdrawalLimitation: invalid array length\");\n for (uint256 _i; _i < _tokens.length; _i++) {\n dailyWithdrawalLimit[_tokens[_i]] = _limits[_i];\n }\n emit DailyWithdrawalLimitsUpdated(_tokens, _limits);\n }\n\n /**\n * @dev Checks whether the withdrawal reaches the daily limitation.\n *\n * Requirements:\n * - The daily withdrawal threshold should not apply for locked withdrawals.\n *\n */\n function _reachedWithdrawalLimit(address _token, uint256 _quantity) internal view virtual returns (bool) {\n if (_lockedWithdrawalRequest(_token, _quantity)) {\n return false;\n }\n\n uint256 _currentDate = block.timestamp / 1 days;\n if (_currentDate > lastDateSynced[_token]) {\n return dailyWithdrawalLimit[_token] <= _quantity;\n } else {\n return dailyWithdrawalLimit[_token] <= lastSyncedWithdrawal[_token] + _quantity;\n }\n }\n\n /**\n * @dev Record withdrawal token.\n */\n function _recordWithdrawal(address _token, uint256 _quantity) internal virtual {\n uint256 _currentDate = block.timestamp / 1 days;\n if (_currentDate > lastDateSynced[_token]) {\n lastDateSynced[_token] = _currentDate;\n lastSyncedWithdrawal[_token] = _quantity;\n } else {\n lastSyncedWithdrawal[_token] += _quantity;\n }\n }\n\n /**\n * @dev Returns whether the withdrawal request is locked or not.\n */\n function _lockedWithdrawalRequest(address _token, uint256 _quantity) internal view virtual returns (bool) {\n return lockedThreshold[_token] <= _quantity;\n }\n\n /**\n * @dev Computes fee percentage.\n */\n function _computeFeePercentage(uint256 _amount, uint256 _percentage) internal view virtual returns (uint256) {\n return (_amount * _percentage) / _MAX_PERCENTAGE;\n }\n\n /**\n * @dev Returns high-tier vote weight.\n */\n function _highTierVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\n return (_highTierVWNum * _totalWeight + _highTierVWDenom - 1) / _highTierVWDenom;\n }\n\n /**\n * @dev Validates whether the high-tier vote weight threshold is larger than the normal threshold.\n */\n function _verifyThresholds() internal view {\n require(_num * _highTierVWDenom <= _highTierVWNum * _denom, \"WithdrawalLimitation: invalid thresholds\");\n }\n}\n" - }, - "contracts/interfaces/IMainchainGatewayV2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IBridge.sol\";\nimport \"./IWETH.sol\";\nimport \"./consumers/SignatureConsumer.sol\";\nimport \"./consumers/MappedTokenConsumer.sol\";\nimport \"../libraries/Transfer.sol\";\n\ninterface IMainchainGatewayV2 is SignatureConsumer, MappedTokenConsumer, IBridge {\n /// @dev Emitted when the deposit is requested\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\n /// @dev Emitted when the assets are withdrawn\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\n /// @dev Emitted when the tokens are mapped\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, Token.Standard[] standards);\n /// @dev Emitted when the wrapped native token contract is updated\n event WrappedNativeTokenContractUpdated(IWETH weth);\n /// @dev Emitted when the withdrawal is locked\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\n /// @dev Emitted when the withdrawal is unlocked\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\n\n /**\n * @dev Returns the domain seperator.\n */\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n /**\n * @dev Returns deposit count.\n */\n function depositCount() external view returns (uint256);\n\n /**\n * @dev Sets the wrapped native token contract.\n *\n * Requirements:\n * - The method caller is admin.\n *\n * Emits the `WrappedNativeTokenContractUpdated` event.\n *\n */\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\n\n /**\n * @dev Returns whether the withdrawal is locked.\n */\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\n\n /**\n * @dev Returns the withdrawal hash.\n */\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\n\n /**\n * @dev Locks the assets and request deposit.\n */\n function requestDepositFor(Transfer.Request calldata _request) external payable;\n\n /**\n * @dev Withdraws based on the receipt and the validator signatures.\n * Returns whether the withdrawal is locked.\n *\n * Emits the `Withdrew` once the assets are released.\n *\n */\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures)\n external\n returns (bool _locked);\n\n /**\n * @dev Approves a specific withdrawal.\n *\n * Requirements:\n * - The method caller is a validator.\n *\n * Emits the `Withdrew` once the assets are released.\n *\n */\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\n\n /**\n * @dev Maps mainchain tokens to Ronin network.\n *\n * Requirement:\n * - The method caller is admin.\n * - The arrays have the same length and its length larger than 0.\n *\n * Emits the `TokenMapped` event.\n *\n */\n function mapTokens(\n address[] calldata _mainchainTokens,\n address[] calldata _roninTokens,\n Token.Standard[] calldata _standards\n ) external;\n\n /**\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\n *\n * Requirement:\n * - The method caller is admin.\n * - The arrays have the same length and its length larger than 0.\n *\n * Emits the `TokenMapped` event.\n *\n */\n function mapTokensAndThresholds(\n address[] calldata _mainchainTokens,\n address[] calldata _roninTokens,\n Token.Standard[] calldata _standards,\n uint256[][4] calldata _thresholds\n ) external;\n\n /**\n * @dev Returns token address on Ronin network.\n * Note: Reverts for unsupported token.\n */\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\n}\n" - }, - "contracts/extensions/isolated-governance/bridge-operator-governance/BOsGovernanceRelay.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../../extensions/isolated-governance/IsolatedGovernance.sol\";\nimport \"../../../interfaces/consumers/SignatureConsumer.sol\";\nimport \"../../../libraries/BridgeOperatorsBallot.sol\";\nimport \"../../../libraries/AddressArrayUtils.sol\";\n\nabstract contract BOsGovernanceRelay is SignatureConsumer, IsolatedGovernance {\n /// @dev The last the brige operator set info.\n BridgeOperatorsBallot.BridgeOperatorSet internal _lastSyncedBridgeOperatorSetInfo;\n /// @dev Mapping from period index => epoch index => bridge operators vote\n mapping(uint256 => mapping(uint256 => IsolatedVote)) internal _vote;\n\n /**\n * @dev Returns the synced bridge operator set info.\n */\n function lastSyncedBridgeOperatorSetInfo() external view returns (BridgeOperatorsBallot.BridgeOperatorSet memory) {\n return _lastSyncedBridgeOperatorSetInfo;\n }\n\n /**\n * @dev Relays votes by signatures.\n *\n * Requirements:\n * - The period of voting is larger than the last synced period.\n * - The arrays are not empty.\n * - The signature signers are in order.\n *\n * @notice Does not store the voter signature into storage.\n *\n */\n function _relayVotesBySignatures(\n BridgeOperatorsBallot.BridgeOperatorSet calldata _ballot,\n Signature[] calldata _signatures,\n uint256 _minimumVoteWeight,\n bytes32 _domainSeperator\n ) internal {\n require(\n (_ballot.period >= _lastSyncedBridgeOperatorSetInfo.period &&\n _ballot.epoch > _lastSyncedBridgeOperatorSetInfo.epoch),\n \"BOsGovernanceRelay: query for outdated bridge operator set\"\n );\n BridgeOperatorsBallot.verifyBallot(_ballot);\n require(\n !AddressArrayUtils.isEqual(_ballot.operators, _lastSyncedBridgeOperatorSetInfo.operators),\n \"BOsGovernanceRelay: bridge operator set is already voted\"\n );\n require(_signatures.length > 0, \"BOsGovernanceRelay: invalid array length\");\n\n Signature calldata _sig;\n address[] memory _signers = new address[](_signatures.length);\n address _lastSigner;\n bytes32 _hash = BridgeOperatorsBallot.hash(_ballot);\n bytes32 _digest = ECDSA.toTypedDataHash(_domainSeperator, _hash);\n\n for (uint256 _i = 0; _i < _signatures.length; _i++) {\n _sig = _signatures[_i];\n _signers[_i] = ECDSA.recover(_digest, _sig.v, _sig.r, _sig.s);\n require(_lastSigner < _signers[_i], \"BOsGovernanceRelay: invalid order\");\n _lastSigner = _signers[_i];\n }\n\n IsolatedVote storage _v = _vote[_ballot.period][_ballot.epoch];\n uint256 _totalVoteWeight = _sumBridgeVoterWeights(_signers);\n if (_totalVoteWeight >= _minimumVoteWeight) {\n require(_totalVoteWeight > 0, \"BOsGovernanceRelay: invalid vote weight\");\n _v.status = VoteStatus.Approved;\n _lastSyncedBridgeOperatorSetInfo = _ballot;\n return;\n }\n\n revert(\"BOsGovernanceRelay: relay failed\");\n }\n\n /**\n * @dev Returns the weight of the governor list.\n */\n function _sumBridgeVoterWeights(address[] memory _bridgeVoters) internal view virtual returns (uint256);\n}\n" - }, - "contracts/mainchain/MainchainGovernanceAdmin.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/AccessControlEnumerable.sol\";\nimport \"../extensions/isolated-governance/bridge-operator-governance/BOsGovernanceRelay.sol\";\nimport \"../extensions/sequential-governance/GovernanceRelay.sol\";\nimport \"../extensions/TransparentUpgradeableProxyV2.sol\";\nimport \"../extensions/GovernanceAdmin.sol\";\nimport \"../interfaces/IBridge.sol\";\n\ncontract MainchainGovernanceAdmin is AccessControlEnumerable, GovernanceRelay, GovernanceAdmin, BOsGovernanceRelay {\n bytes32 public constant RELAYER_ROLE = keccak256(\"RELAYER_ROLE\");\n uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255;\n\n constructor(\n uint256 _roninChainId,\n address _roleSetter,\n address _roninTrustedOrganizationContract,\n address _bridgeContract,\n address[] memory _relayers\n ) GovernanceAdmin(_roninChainId, _roninTrustedOrganizationContract, _bridgeContract, DEFAULT_EXPIRY_DURATION) {\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\n for (uint256 _i; _i < _relayers.length; _i++) {\n _grantRole(RELAYER_ROLE, _relayers[_i]);\n }\n }\n\n /**\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\n */\n function proposalRelayed(uint256 _chainId, uint256 _round) external view returns (bool) {\n return vote[_chainId][_round].status != VoteStatus.Pending;\n }\n\n /**\n * @dev Returns whether the voter `_voter` casted vote for bridge operators at a specific period.\n */\n function bridgeOperatorsRelayed(uint256 _period, uint256 _epoch) external view returns (bool) {\n return _vote[_period][_epoch].status != VoteStatus.Pending;\n }\n\n /**\n * @dev See `GovernanceRelay-_relayProposal`.\n *\n * Requirements:\n * - The method caller is relayer.\n *\n */\n function relayProposal(\n Proposal.ProposalDetail calldata _proposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures\n ) external onlyRole(RELAYER_ROLE) {\n _relayProposal(_proposal, _supports, _signatures, DOMAIN_SEPARATOR, msg.sender);\n }\n\n /**\n * @dev See `GovernanceRelay-_relayGlobalProposal`.\n *\n * Requirements:\n * - The method caller is relayer.\n *\n */\n function relayGlobalProposal(\n GlobalProposal.GlobalProposalDetail calldata _globalProposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures\n ) external onlyRole(RELAYER_ROLE) {\n _relayGlobalProposal(\n _globalProposal,\n _supports,\n _signatures,\n DOMAIN_SEPARATOR,\n roninTrustedOrganizationContract(),\n bridgeContract(),\n msg.sender\n );\n }\n\n /**\n * @dev See `BOsGovernanceRelay-_relayVotesBySignatures`.\n *\n * Requirements:\n * - The method caller is relayer.\n *\n */\n function relayBridgeOperators(\n BridgeOperatorsBallot.BridgeOperatorSet calldata _ballot,\n Signature[] calldata _signatures\n ) external onlyRole(RELAYER_ROLE) {\n _relayVotesBySignatures(_ballot, _signatures, _getMinimumVoteWeight(), DOMAIN_SEPARATOR);\n TransparentUpgradeableProxyV2(payable(bridgeContract())).functionDelegateCall(\n abi.encodeWithSelector(_bridgeContract.replaceBridgeOperators.selector, _ballot.operators)\n );\n }\n\n /**\n * @inheritdoc GovernanceRelay\n */\n function _sumWeights(address[] memory _governors) internal view virtual override returns (uint256) {\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\n abi.encodeWithSelector(\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\n 0x4bb5274a,\n abi.encodeWithSelector(IRoninTrustedOrganization.sumGovernorWeights.selector, _governors)\n )\n );\n require(_success, \"MainchainGovernanceAdmin: proxy call `sumGovernorWeights(address[])` failed\");\n return abi.decode(_returndata, (uint256));\n }\n\n /**\n * @inheritdoc BOsGovernanceRelay\n */\n function _sumBridgeVoterWeights(address[] memory _governors) internal view virtual override returns (uint256) {\n (bool _success, bytes memory _returndata) = roninTrustedOrganizationContract().staticcall(\n abi.encodeWithSelector(\n // TransparentUpgradeableProxyV2.functionDelegateCall.selector,\n 0x4bb5274a,\n abi.encodeWithSelector(IRoninTrustedOrganization.sumBridgeVoterWeights.selector, _governors)\n )\n );\n require(_success, \"MainchainGovernanceAdmin: proxy call `sumBridgeVoterWeights(address[])` failed\");\n return abi.decode(_returndata, (uint256));\n }\n\n /**\n * @dev See {CoreGovernance-_getChainType}\n */\n function _getChainType() internal pure override returns (ChainType) {\n return ChainType.Mainchain;\n }\n}\n" - }, - "contracts/extensions/sequential-governance/GovernanceRelay.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./CoreGovernance.sol\";\n\nabstract contract GovernanceRelay is CoreGovernance {\n using Proposal for Proposal.ProposalDetail;\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\n\n /**\n * @dev Relays votes by signatures.\n *\n * @notice Does not store the voter signature into storage.\n *\n */\n function _relayVotesBySignatures(\n Proposal.ProposalDetail memory _proposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures,\n bytes32 _forDigest,\n bytes32 _againstDigest\n ) internal {\n require(_supports.length > 0 && _supports.length == _signatures.length, \"GovernanceRelay: invalid array length\");\n uint256 _forVoteCount;\n uint256 _againstVoteCount;\n address[] memory _forVoteSigners = new address[](_signatures.length);\n address[] memory _againstVoteSigners = new address[](_signatures.length);\n\n {\n address _signer;\n address _lastSigner;\n Ballot.VoteType _support;\n Signature calldata _sig;\n\n for (uint256 _i; _i < _signatures.length; _i++) {\n _sig = _signatures[_i];\n _support = _supports[_i];\n\n if (_support == Ballot.VoteType.For) {\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\n _forVoteSigners[_forVoteCount++] = _signer;\n } else if (_support == Ballot.VoteType.Against) {\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\n _againstVoteSigners[_againstVoteCount++] = _signer;\n } else {\n revert(\"GovernanceRelay: query for unsupported vote type\");\n }\n\n require(_lastSigner < _signer, \"GovernanceRelay: invalid order\");\n _lastSigner = _signer;\n }\n }\n\n assembly {\n mstore(_forVoteSigners, _forVoteCount)\n mstore(_againstVoteSigners, _againstVoteCount)\n }\n\n ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce];\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\n uint256 _totalForVoteWeight = _sumWeights(_forVoteSigners);\n if (_totalForVoteWeight >= _minimumForVoteWeight) {\n require(_totalForVoteWeight > 0, \"GovernanceRelay: invalid vote weight\");\n _vote.status = VoteStatus.Approved;\n emit ProposalApproved(_vote.hash);\n _tryExecute(_vote, _proposal);\n return;\n }\n\n uint256 _minimumAgainstVoteWeight = _getTotalWeights() - _minimumForVoteWeight + 1;\n uint256 _totalAgainstVoteWeight = _sumWeights(_againstVoteSigners);\n if (_totalAgainstVoteWeight >= _minimumAgainstVoteWeight) {\n require(_totalAgainstVoteWeight > 0, \"GovernanceRelay: invalid vote weight\");\n _vote.status = VoteStatus.Rejected;\n emit ProposalRejected(_vote.hash);\n return;\n }\n\n revert(\"GovernanceRelay: relay failed\");\n }\n\n /**\n * @dev Relays voted proposal.\n *\n * Requirements:\n * - The relay proposal is finalized.\n *\n */\n function _relayProposal(\n Proposal.ProposalDetail calldata _proposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures,\n bytes32 _domainSeparator,\n address _creator\n ) internal {\n _proposeProposalStruct(_proposal, _creator);\n bytes32 _proposalHash = _proposal.hash();\n _relayVotesBySignatures(\n _proposal,\n _supports,\n _signatures,\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.For)),\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_proposalHash, Ballot.VoteType.Against))\n );\n }\n\n /**\n * @dev Relays voted global proposal.\n *\n * Requirements:\n * - The relay proposal is finalized.\n *\n */\n function _relayGlobalProposal(\n GlobalProposal.GlobalProposalDetail calldata _globalProposal,\n Ballot.VoteType[] calldata _supports,\n Signature[] calldata _signatures,\n bytes32 _domainSeparator,\n address _roninTrustedOrganizationContract,\n address _gatewayContract,\n address _creator\n ) internal {\n (Proposal.ProposalDetail memory _proposal, ) = _proposeGlobalStruct(\n _globalProposal,\n _roninTrustedOrganizationContract,\n _gatewayContract,\n _creator\n );\n bytes32 _globalProposalHash = _globalProposal.hash();\n _relayVotesBySignatures(\n _proposal,\n _supports,\n _signatures,\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.For)),\n ECDSA.toTypedDataHash(_domainSeparator, Ballot.hash(_globalProposalHash, Ballot.VoteType.Against))\n );\n }\n\n /**\n * @dev Returns the weight of the governor list.\n */\n function _sumWeights(address[] memory _governors) internal view virtual returns (uint256);\n}\n" - }, - "contracts/extensions/TransparentUpgradeableProxyV2.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\";\n\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\n\n /**\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\n *\n * Requirements:\n * - Only the admin can call this function.\n *\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\n * reviewing the encoded data `_data` and the method which is called before using this.\n *\n */\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\n address _addr = _implementation();\n assembly {\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch _result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" - }, - "contracts/mocks/MockBridge.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\";\nimport \"../interfaces/IBridge.sol\";\n\ncontract MockBridge is IBridge {\n /// @dev Mapping from validator address => last block that the bridge operator is added\n mapping(address => uint256) public bridgeOperatorAddedBlock;\n /// @dev Bridge operators array\n address[] public bridgeOperators;\n\n function replaceBridgeOperators(address[] calldata _list) external {\n address _addr;\n for (uint256 _i = 0; _i < _list.length; _i++) {\n _addr = _list[_i];\n if (bridgeOperatorAddedBlock[_addr] == 0) {\n bridgeOperators.push(_addr);\n }\n bridgeOperatorAddedBlock[_addr] = block.number;\n }\n\n {\n uint256 _i;\n while (_i < bridgeOperators.length) {\n _addr = bridgeOperators[_i];\n if (bridgeOperatorAddedBlock[_addr] < block.number) {\n delete bridgeOperatorAddedBlock[_addr];\n bridgeOperators[_i] = bridgeOperators[bridgeOperators.length - 1];\n bridgeOperators.pop();\n continue;\n }\n _i++;\n }\n }\n }\n\n function getBridgeOperators() external view override returns (address[] memory) {\n return bridgeOperators;\n }\n}\n" - }, - "contracts/mocks/MockSlashIndicatorExtended.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"./MockPrecompile.sol\";\nimport \"../ronin/slash-indicator/SlashIndicator.sol\";\n\ncontract MockSlashIndicatorExtended is SlashIndicator, MockPrecompile {\n function slashFelony(address _validatorAddr) external {\n _validatorContract.execSlash(_validatorAddr, 0, 0, false);\n }\n\n function slashMisdemeanor(address _validatorAddr) external {\n _validatorContract.execSlash(_validatorAddr, 0, 0, false);\n }\n\n function _pcValidateEvidence(bytes calldata _header1, bytes calldata _header2)\n internal\n pure\n override\n returns (bool _validEvidence)\n {\n return validatingDoubleSignProof(_header1, _header2);\n }\n}\n" - }, - "contracts/mocks/sorting/MockSorting.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\";\nimport \"../libraries/Sorting.sol\";\n\ncontract MockSorting {\n uint256[] public data;\n\n function addData(uint256[] memory _data) public {\n for (uint256 i; i < _data.length; i++) {\n data.push(_data[i]);\n }\n }\n\n function sort(uint256[] memory _data) public pure returns (uint256[] memory) {\n return Sorting.sort(_data);\n }\n\n function sortOnStorage() public returns (uint256[] memory, uint256) {\n uint256[] memory _tmpData = data;\n data = Sorting.sort(_tmpData);\n\n return (data, data.length);\n }\n\n function sortAddressesAndValues(address[] calldata _addrs, uint256[] calldata _values)\n public\n pure\n returns (address[] memory)\n {\n return Sorting.sort(_addrs, _values);\n }\n}\n" - }, - "contracts/mocks/precompile-usages/MockPCUValidateDoubleSign.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../precompile-usages/PCUValidateDoubleSign.sol\";\n\ncontract MockPCUValidateDoubleSign is PCUValidateDoubleSign {\n address internal _precompileValidateDoubleSignAddress;\n\n constructor(address _precompile) {\n setPrecompileValidateDoubleSignAddress(_precompile);\n }\n\n function setPrecompileValidateDoubleSignAddress(address _addr) public {\n _precompileValidateDoubleSignAddress = _addr;\n }\n\n function precompileValidateDoubleSignAddress() public view override returns (address) {\n return _precompileValidateDoubleSignAddress;\n }\n\n function callPrecompile(bytes calldata _header1, bytes calldata _header2) public view returns (bool) {\n return _pcValidateEvidence(_header1, _header2);\n }\n}\n" - }, - "contracts/mocks/precompile-usages/MockPCUSortValidators.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../precompile-usages/PCUSortValidators.sol\";\n\ncontract MockPCUSortValidators is PCUSortValidators {\n address internal _precompileSortValidatorAddress;\n\n constructor(address _precompile) {\n setPrecompileSortValidatorAddress(_precompile);\n }\n\n function setPrecompileSortValidatorAddress(address _addr) public {\n _precompileSortValidatorAddress = _addr;\n }\n\n function precompileSortValidatorsAddress() public view override returns (address) {\n return _precompileSortValidatorAddress;\n }\n\n function callPrecompile(address[] calldata _validators, uint256[] calldata _weights)\n public\n view\n returns (address[] memory _result)\n {\n return _pcSortCandidates(_validators, _weights);\n }\n}\n" - }, - "contracts/mocks/precompile-usages/MockPCUPickValidatorSet.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../precompile-usages/PCUPickValidatorSet.sol\";\n\ncontract MockPCUPickValidatorSet is PCUPickValidatorSet {\n address internal _precompileSortValidatorAddress;\n\n constructor(address _precompile) {\n setPrecompileSortValidatorAddress(_precompile);\n }\n\n function setPrecompileSortValidatorAddress(address _addr) public {\n _precompileSortValidatorAddress = _addr;\n }\n\n function precompilePickValidatorSetAddress() public view override returns (address) {\n return _precompileSortValidatorAddress;\n }\n\n function callPrecompile(\n address[] memory _candidates,\n uint256[] memory _weights,\n uint256[] memory _trustedWeights,\n uint256 _maxValidatorNumber,\n uint256 _maxPrioritizedValidatorNumber\n ) public view returns (address[] memory _result) {\n (_result, ) = _pcPickValidatorSet(\n _candidates,\n _weights,\n _trustedWeights,\n _maxValidatorNumber,\n _maxPrioritizedValidatorNumber\n );\n }\n}\n" - }, - "contracts/mocks/MockStaking.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../ronin/staking/RewardCalculation.sol\";\n\ncontract MockStaking is RewardCalculation {\n /// @dev Mapping from user => staking balance\n mapping(address => uint256) internal _stakingAmount;\n /// @dev Mapping from period number => slashed\n mapping(uint256 => bool) internal _periodSlashed;\n\n uint256 internal _stakingTotal;\n\n uint256 public lastUpdatedPeriod;\n uint256 public pendingReward;\n address public poolAddr;\n\n constructor(address _poolAddr) {\n poolAddr = _poolAddr;\n }\n\n function firstEverWrapup() external {\n delete pendingReward;\n lastUpdatedPeriod = block.timestamp / 1 days + 1;\n }\n\n function endPeriod() external {\n address[] memory _addrs = new address[](1);\n uint256[] memory _rewards = new uint256[](1);\n _addrs[0] = poolAddr;\n _rewards[0] = pendingReward;\n this.execRecordRewards(_addrs, _rewards);\n\n pendingReward = 0;\n lastUpdatedPeriod++;\n }\n\n function increasePeriod() external {\n lastUpdatedPeriod++;\n }\n\n function stake(address _user, uint256 _amount) external {\n uint256 _lastStakingAmount = _stakingAmount[_user];\n uint256 _newStakingAmount = _lastStakingAmount + _amount;\n _syncUserReward(poolAddr, _user, _newStakingAmount);\n _stakingAmount[_user] = _newStakingAmount;\n _stakingTotal += _amount;\n }\n\n function unstake(address _user, uint256 _amount) external {\n uint256 _lastStakingAmount = _stakingAmount[_user];\n uint256 _newStakingAmount = _lastStakingAmount - _amount;\n _syncUserReward(poolAddr, _user, _newStakingAmount);\n _stakingAmount[_user] = _newStakingAmount;\n _stakingTotal -= _amount;\n }\n\n function increaseReward(uint256 _amount) external {\n pendingReward += _amount;\n }\n\n function decreaseReward(uint256 _amount) external {\n pendingReward -= _amount;\n }\n\n function execRecordRewards(address[] calldata _addrList, uint256[] calldata _rewards) external {\n _recordRewards(_addrList, _rewards, _currentPeriod());\n }\n\n function getPeriod() public view returns (uint256) {\n return _currentPeriod();\n }\n\n function claimReward(address _user) external returns (uint256 _amount) {\n _amount = _claimReward(poolAddr, _user, getPeriod());\n }\n\n function getStakingAmount(address, address _user) public view override returns (uint256) {\n return _stakingAmount[_user];\n }\n\n function getManyStakingAmounts(address[] calldata _poolAddrs, address[] calldata _userList)\n external\n view\n override\n returns (uint256[] memory)\n {}\n\n function getStakingTotal(address _addr) public view virtual override returns (uint256) {\n return _addr == poolAddr ? _stakingTotal : 0;\n }\n\n function _currentPeriod() internal view override returns (uint256 _period) {\n return lastUpdatedPeriod;\n }\n\n function getManyStakingTotals(address[] calldata _poolAddr) external view override returns (uint256[] memory) {}\n}\n" - }, - "contracts/mocks/forwarder/MockForwarderTarget.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.9;\n\nimport \"../../extensions/RONTransferHelper.sol\";\n\ncontract MockForwarderTarget is RONTransferHelper {\n address public owner;\n uint256 public data;\n\n event TargetWithdrawn(address indexed _origin, address indexed _caller, address indexed _recipient);\n\n error ErrIntentionally();\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"MockForwarderContract: only owner can call method\");\n _;\n }\n\n fallback() external payable {\n _fallback();\n }\n\n receive() external payable {\n _fallback();\n }\n\n constructor(address _owner, uint256 _data) payable {\n owner = _owner;\n data = _data;\n }\n\n function foo(uint256 _data) external onlyOwner {\n data = _data;\n }\n\n function fooPayable(uint256 _data) external payable onlyOwner {\n data = _data;\n }\n\n function fooSilentRevert() external view onlyOwner {\n revert();\n }\n\n function fooCustomErrorRevert() external view onlyOwner {\n revert ErrIntentionally();\n }\n\n function fooRevert() external view onlyOwner {\n revert(\"MockForwarderContract: revert intentionally\");\n }\n\n function getBalance() external view returns (uint256) {\n return address(this).balance;\n }\n\n function withdrawAll() external onlyOwner {\n emit TargetWithdrawn(tx.origin, msg.sender, msg.sender);\n _transferRON(payable(msg.sender), address(this).balance);\n }\n\n function _fallback() private pure {\n revert(\"MockForwardTarget: hello from fallback\");\n }\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file From 20951ea418476a9f9a15491075aa3ec0ea942739 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 1 Aug 2024 14:28:29 +0700 Subject: [PATCH 273/305] chore: ignore run-latest of broadcast --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b5e3de51..9feb60e5 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,6 @@ out dry-run/ **-operators-key.s.sol dependencies -deployments/**/exported_address \ No newline at end of file +deployments/**/exported_address + +run-latest.json \ No newline at end of file From 3c6e5d7834d59f2ace73b024c382c49056846472 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 10:53:43 +0700 Subject: [PATCH 274/305] fix(WBTC): fix decimals to match with WBTC on ethereum --- src/tokens/erc20/WBTC.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tokens/erc20/WBTC.sol b/src/tokens/erc20/WBTC.sol index c00adbd2..b683d50c 100644 --- a/src/tokens/erc20/WBTC.sol +++ b/src/tokens/erc20/WBTC.sol @@ -18,6 +18,13 @@ contract WBTC is ERC20PresetMinterPauser { _revokeRole(PAUSER_ROLE, _msgSender()); } + /** + * @inheritdoc ERC20 + */ + function decimals() public view virtual override returns (uint8) { + return 8; + } + function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20PresetMinterPauser) { if (to == address(0)) { if (_msgSender() != GATEWAY_ADDRESS) { From dd938908313c603627dc972a5e1c88ebe5e37789 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 13:15:56 +0700 Subject: [PATCH 275/305] test: fix compiler error --- test/bridge/integration/BaseIntegration.t.sol | 4 ++-- test/helpers/RoninBridgeAdminUtils.t.sol | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/bridge/integration/BaseIntegration.t.sol b/test/bridge/integration/BaseIntegration.t.sol index 47bfd468..bebc09a6 100644 --- a/test/bridge/integration/BaseIntegration.t.sol +++ b/test/bridge/integration/BaseIntegration.t.sol @@ -9,7 +9,7 @@ import { IGeneralConfig } from "@fdk/interfaces/IGeneralConfig.sol"; import { GeneralConfig } from "@ronin/script/GeneralConfig.sol"; import { Network } from "@ronin/script/utils/Network.sol"; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import { RoninGatewayV3 } from "@ronin/contracts/ronin/gateway/RoninGatewayV3.sol"; import { BridgeTracking } from "@ronin/contracts/ronin/gateway/BridgeTracking.sol"; import { BridgeSlash } from "@ronin/contracts/ronin/gateway/BridgeSlash.sol"; @@ -86,7 +86,7 @@ contract BaseIntegration_Test is Base_Test { ISharedArgument.SharedParameter _param; PauseEnforcer _roninPauseEnforcer; - RoninBridgeManager _roninBridgeManager; + IRoninBridgeManager _roninBridgeManager; RoninGatewayV3 _roninGatewayV3; BridgeTracking _bridgeTracking; BridgeSlash _bridgeSlash; diff --git a/test/helpers/RoninBridgeAdminUtils.t.sol b/test/helpers/RoninBridgeAdminUtils.t.sol index f8596a0e..e5a02478 100644 --- a/test/helpers/RoninBridgeAdminUtils.t.sol +++ b/test/helpers/RoninBridgeAdminUtils.t.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; import "./ProposalUtils.t.sol"; contract RoninBridgeAdminUtils is ProposalUtils { - RoninBridgeManager _contract; + IRoninBridgeManager _contract; address _sender; - constructor(uint256 roninChainId, uint256[] memory signerPKs, RoninBridgeManager contract_, address sender) ProposalUtils(roninChainId, signerPKs) { + constructor(uint256 roninChainId, uint256[] memory signerPKs, IRoninBridgeManager contract_, address sender) ProposalUtils(roninChainId, signerPKs) { _contract = contract_; _sender = sender; } From 8f8cae4b4555cac3f76265a1f5ed7c5536f468ac Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 13:29:54 +0700 Subject: [PATCH 276/305] script: update address wbtc ronin mainnet --- script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol index e5244e18..68fb3b0b 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; contract Migration__MapToken_WBTC_Threshold { - address _wbtcRoninToken = address(0xC13948b5325c11279F5B6cBA67957581d374E0F0); // https://app.roninchain.com/address/0xC13948b5325c11279F5B6cBA67957581d374E0F0 + address _wbtcRoninToken = address(0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e); // https://app.roninchain.com/address/0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e address _wbtcMainchainToken = address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); // https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 // The decimal of WBTC token is 18 From 2dc08bbdb271c21d220af0a70f01164016e78d85 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 13:33:54 +0700 Subject: [PATCH 277/305] chore: add WBTC ronin-mainnet artifact --- .../2020/run-1722838747.json | 32 +++ .../2020/run-1722838784.json | 194 ++++++++++++++++++ deployments/ronin-mainnet/WBTC.json | 60 +++--- 3 files changed, 256 insertions(+), 30 deletions(-) create mode 100644 broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722838747.json create mode 100644 broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722838784.json diff --git a/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722838747.json b/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722838747.json new file mode 100644 index 00000000..d025516f --- /dev/null +++ b/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722838747.json @@ -0,0 +1,32 @@ +{ + "transactions": [ + { + "hash": null, + "transactionType": "CREATE", + "contractName": "WBTC", + "contractAddress": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "function": null, + "arguments": [ + "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "0x8417AC6838be147Ab0e201496B2E5eDf90A48cC5" + ], + "transaction": { + "from": "0x08295771719b138a241f45023b13cc868d72827d", + "gas": "0x3953b6", + "value": "0x0", + "input": "0x60a06040523480156200001157600080fd5b50604051620020bd380380620020bd8339810160408190526200003491620004b4565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c919062000592565b5060066200009b828262000592565b50506007805460ff1916905550620000b560003362000189565b620000d06000805160206200209d8339815191523362000189565b620000eb6000805160206200207d8339815191523362000189565b50620000fb905060008262000189565b620001166000805160206200207d8339815191528262000189565b6001600160a01b0382166080526200013e6000805160206200209d8339815191528362000189565b6200014b60003362000199565b620001666000805160206200209d8339815191523362000199565b620001816000805160206200207d8339815191523362000199565b5050620006ac565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf90826200026a565b505050565b620001d082826200028a565b6000828152600160205260409020620001bf90826200032a565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000281836001600160a01b03841662000341565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000281836001600160a01b03841662000445565b600081815260018301602052604081205480156200043a576000620003686001836200065e565b85549091506000906200037e906001906200065e565b9050818114620003ea576000866000018281548110620003a257620003a262000680565b9060005260206000200154905080876000018481548110620003c857620003c862000680565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003fe57620003fe62000696565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000284565b600091505062000284565b60008181526001830160205260408120546200048e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000284565b50600062000284565b80516001600160a01b0381168114620004af57600080fd5b919050565b60008060408385031215620004c857600080fd5b620004d38362000497565b9150620004e36020840162000497565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051757607f821691505b6020821081036200053857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005695750805b601f850160051c820191505b818110156200058a5782815560010162000575565b505050505050565b81516001600160401b03811115620005ae57620005ae620004ec565b620005c681620005bf845462000502565b846200053e565b602080601f831160018114620005fe5760008415620005e55750858301515b600019600386901b1c1916600185901b1785556200058a565b600085815260208120601f198616915b828110156200062f578886015182559484019460019091019084016200060e565b50858210156200064e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200028457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516119ae620006cf60003960008181610433015261106401526119ae6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051600881526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206c82e80b01e3d2f3c41a1b05390b6cc6adf2befa4f81b9fb1dfde13fdd134f9c64736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a60000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "nonce": "0x26", + "chainId": "0x7e4" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1722838747, + "chain": 2020, + "commit": "dd93890" +} \ No newline at end of file diff --git a/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722838784.json b/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722838784.json new file mode 100644 index 00000000..d664148e --- /dev/null +++ b/broadcast/20240716-p1-2-deploy-wbtc.s.sol/2020/run-1722838784.json @@ -0,0 +1,194 @@ +{ + "transactions": [ + { + "hash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionType": "CREATE", + "contractName": "WBTC", + "contractAddress": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "function": null, + "arguments": [ + "0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df", + "0x8417AC6838be147Ab0e201496B2E5eDf90A48cC5" + ], + "transaction": { + "from": "0x08295771719b138a241f45023b13cc868d72827d", + "gas": "0x3953b6", + "value": "0x0", + "input": "0x60a06040523480156200001157600080fd5b50604051620020bd380380620020bd8339810160408190526200003491620004b4565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c919062000592565b5060066200009b828262000592565b50506007805460ff1916905550620000b560003362000189565b620000d06000805160206200209d8339815191523362000189565b620000eb6000805160206200207d8339815191523362000189565b50620000fb905060008262000189565b620001166000805160206200207d8339815191528262000189565b6001600160a01b0382166080526200013e6000805160206200209d8339815191528362000189565b6200014b60003362000199565b620001666000805160206200209d8339815191523362000199565b620001816000805160206200207d8339815191523362000199565b5050620006ac565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf90826200026a565b505050565b620001d082826200028a565b6000828152600160205260409020620001bf90826200032a565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000281836001600160a01b03841662000341565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000281836001600160a01b03841662000445565b600081815260018301602052604081205480156200043a576000620003686001836200065e565b85549091506000906200037e906001906200065e565b9050818114620003ea576000866000018281548110620003a257620003a262000680565b9060005260206000200154905080876000018481548110620003c857620003c862000680565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003fe57620003fe62000696565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000284565b600091505062000284565b60008181526001830160205260408120546200048e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000284565b50600062000284565b80516001600160a01b0381168114620004af57600080fd5b919050565b60008060408385031215620004c857600080fd5b620004d38362000497565b9150620004e36020840162000497565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051757607f821691505b6020821081036200053857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005695750805b601f850160051c820191505b818110156200058a5782815560010162000575565b505050505050565b81516001600160401b03811115620005ae57620005ae620004ec565b620005c681620005bf845462000502565b846200053e565b602080601f831160018114620005fe5760008415620005e55750858301515b600019600386901b1c1916600185901b1785556200058a565b600085815260208120601f198616915b828110156200062f578886015182559484019460019091019084016200060e565b50858210156200064e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200028457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516119ae620006cf60003960008181610433015261106401526119ae6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051600881526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206c82e80b01e3d2f3c41a1b05390b6cc6adf2befa4f81b9fb1dfde13fdd134f9c64736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a60000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "nonce": "0x26", + "chainId": "0x7e4" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x5d148b", + "logs": [ + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x67", + "removed": false + }, + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x68", + "removed": false + }, + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x69", + "removed": false + }, + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x6a", + "removed": false + }, + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x6b", + "removed": false + }, + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x6c", + "removed": false + }, + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x6d", + "removed": false + }, + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x6e", + "removed": false + }, + { + "address": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e", + "topics": [ + "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d", + "0x00000000000000000000000008295771719b138a241f45023b13cc868d72827d" + ], + "data": "0x", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "logIndex": "0x6f", + "removed": false + } + ], + "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000040000000000000000000000000000004000200000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000040000008020000000000000000000800000000000000000000000000001000000000000040000000000000000000008000000000000000000000040000000001000000000000000000000000000000000020000000000000201000000000000000000000000000000000000080000000001200000000000100002000000020000000002000000000000000000000000100000400000000000000000000000000", + "type": "0x0", + "transactionHash": "0xe957562eaa9371606d22c4a5856a73d68df0dbec959681bb298ee98f38077dc7", + "transactionIndex": "0x45", + "blockHash": "0x5b1a037727c36a9daf6cd5d68d77b303d5f69dd70848d0a35128aca9ea88cea1", + "blockNumber": "0x2349834", + "gasUsed": "0x1c7713", + "effectiveGasPrice": "0x4a817c800", + "from": "0x08295771719b138a241f45023b13cc868d72827d", + "to": null, + "contractAddress": "0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1722838784, + "chain": 2020, + "commit": "dd93890" +} \ No newline at end of file diff --git a/deployments/ronin-mainnet/WBTC.json b/deployments/ronin-mainnet/WBTC.json index 3480f99a..65c6fbbc 100644 --- a/deployments/ronin-mainnet/WBTC.json +++ b/deployments/ronin-mainnet/WBTC.json @@ -1,15 +1,15 @@ { "abi": "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"gateway\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"pauser\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GATEWAY_ADDRESS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MINTER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PAUSER_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\":\"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\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"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\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"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\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"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\":\"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\":\"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},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false}]", "absolutePath": "WBTC.sol", - "address": "0xC13948b5325c11279F5B6cBA67957581d374E0F0", + "address": "0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e", "ast": "", - "blockNumber": 36860867, - "bytecode": "\"0x60a06040523480156200001157600080fd5b50604051620020bd380380620020bd8339810160408190526200003491620004b4565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c919062000592565b5060066200009b828262000592565b50506007805460ff1916905550620000b560003362000189565b620000d06000805160206200209d8339815191523362000189565b620000eb6000805160206200207d8339815191523362000189565b50620000fb905060008262000189565b620001166000805160206200207d8339815191528262000189565b6001600160a01b0382166080526200013e6000805160206200209d8339815191528362000189565b6200014b60003362000199565b620001666000805160206200209d8339815191523362000199565b620001816000805160206200207d8339815191523362000199565b5050620006ac565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf90826200026a565b505050565b620001d082826200028a565b6000828152600160205260409020620001bf90826200032a565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000281836001600160a01b03841662000341565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000281836001600160a01b03841662000445565b600081815260018301602052604081205480156200043a576000620003686001836200065e565b85549091506000906200037e906001906200065e565b9050818114620003ea576000866000018281548110620003a257620003a262000680565b9060005260206000200154905080876000018481548110620003c857620003c862000680565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003fe57620003fe62000696565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000284565b600091505062000284565b60008181526001830160205260408120546200048e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000284565b50600062000284565b80516001600160a01b0381168114620004af57600080fd5b919050565b60008060408385031215620004c857600080fd5b620004d38362000497565b9150620004e36020840162000497565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051757607f821691505b6020821081036200053857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005695750805b601f850160051c820191505b818110156200058a5782815560010162000575565b505050505050565b81516001600160401b03811115620005ae57620005ae620004ec565b620005c681620005bf845462000502565b846200053e565b602080601f831160018114620005fe5760008415620005e55750858301515b600019600386901b1c1916600185901b1785556200058a565b600085815260208120601f198616915b828110156200062f578886015182559484019460019091019084016200060e565b50858210156200064e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200028457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516119ae620006cf60003960008181610433015261106401526119ae6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051601281526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220a3425f4a72f112ea886f5fb148825fd09155665a3039ab7125839e61b456a38364736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6\"", + "blockNumber": 37001205, + "bytecode": "\"0x60a06040523480156200001157600080fd5b50604051620020bd380380620020bd8339810160408190526200003491620004b4565b6040518060400160405280600f81526020016e2bb930b83832b2102134ba31b7b4b760891b815250604051806040016040528060048152602001635742544360e01b815250818181600590816200008c919062000592565b5060066200009b828262000592565b50506007805460ff1916905550620000b560003362000189565b620000d06000805160206200209d8339815191523362000189565b620000eb6000805160206200207d8339815191523362000189565b50620000fb905060008262000189565b620001166000805160206200207d8339815191528262000189565b6001600160a01b0382166080526200013e6000805160206200209d8339815191528362000189565b6200014b60003362000199565b620001666000805160206200209d8339815191523362000199565b620001816000805160206200207d8339815191523362000199565b5050620006ac565b620001958282620001c4565b5050565b620001a58282620001ea565b6000828152600160205260409020620001bf90826200026a565b505050565b620001d082826200028a565b6000828152600160205260409020620001bf90826200032a565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161562000195576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600062000281836001600160a01b03841662000341565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000195576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000281836001600160a01b03841662000445565b600081815260018301602052604081205480156200043a576000620003686001836200065e565b85549091506000906200037e906001906200065e565b9050818114620003ea576000866000018281548110620003a257620003a262000680565b9060005260206000200154905080876000018481548110620003c857620003c862000680565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620003fe57620003fe62000696565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000284565b600091505062000284565b60008181526001830160205260408120546200048e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000284565b50600062000284565b80516001600160a01b0381168114620004af57600080fd5b919050565b60008060408385031215620004c857600080fd5b620004d38362000497565b9150620004e36020840162000497565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200051757607f821691505b6020821081036200053857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf576000816000526020600020601f850160051c81016020861015620005695750805b601f850160051c820191505b818110156200058a5782815560010162000575565b505050505050565b81516001600160401b03811115620005ae57620005ae620004ec565b620005c681620005bf845462000502565b846200053e565b602080601f831160018114620005fe5760008415620005e55750858301515b600019600386901b1c1916600185901b1785556200058a565b600085815260208120601f198616915b828110156200062f578886015182559484019460019091019084016200060e565b50858210156200064e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156200028457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6080516119ae620006cf60003960008181610433015261106401526119ae6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051600881526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206c82e80b01e3d2f3c41a1b05390b6cc6adf2befa4f81b9fb1dfde13fdd134f9c64736f6c6343000817003365d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6\"", "callValue": 0, "chainId": 2020, "constructorArgs": "0x0000000000000000000000000cf8ff40a508bdbc39fbe1bb679dcba64e65c7df0000000000000000000000008417ac6838be147ab0e201496b2e5edf90a48cc5", "contractName": "WBTC", - "deployedBytecode": "\"0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051601281526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220a3425f4a72f112ea886f5fb148825fd09155665a3039ab7125839e61b456a38364736f6c63430008170033\"", + "deployedBytecode": "\"0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370a0823111610104578063a457c2d7116100a2578063d547741f11610071578063d547741f146103e1578063dd62ed3e146103f4578063e63ab1e914610407578063f56c84e51461042e57600080fd5b8063a457c2d714610381578063a9059cbb14610394578063ca15c873146103a7578063d5391393146103ba57600080fd5b80639010d07c116100de5780639010d07c1461033357806391d148541461035e57806395d89b4114610371578063a217fddf1461037957600080fd5b806370a08231146102ef57806379cc6790146103185780638456cb591461032b57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780635c975abb146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e236600461166e565b610455565b60405190151581526020015b60405180910390f35b610204610480565b6040516101f391906116bc565b6101e761021f36600461170b565b610512565b6004545b6040519081526020016101f3565b6101e7610244366004611735565b61052a565b610228610257366004611771565b60009081526020819052604090206001015490565b61027f61027a36600461178a565b61054e565b005b604051600881526020016101f3565b61027f61029e36600461178a565b610578565b6101e76102b136600461170b565b6105fb565b61027f61061d565b61027f6102cc36600461170b565b6106c3565b61027f6102df366004611771565b610762565b60075460ff166101e7565b6102286102fd3660046117b6565b6001600160a01b031660009081526002602052604090205490565b61027f61032636600461170b565b61076f565b61027f610784565b6103466103413660046117d1565b610828565b6040516001600160a01b0390911681526020016101f3565b6101e761036c36600461178a565b610847565b610204610870565b610228600081565b6101e761038f36600461170b565b61087f565b6101e76103a236600461170b565b6108fa565b6102286103b5366004611771565b610908565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f6103ef36600461178a565b61091f565b6102286104023660046117f3565b610944565b6102287f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103467f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b03198216635a05180f60e01b148061047a575061047a8261096f565b92915050565b60606005805461048f9061181d565b80601f01602080910402602001604051908101604052809291908181526020018280546104bb9061181d565b80156105085780601f106104dd57610100808354040283529160200191610508565b820191906000526020600020905b8154815290600101906020018083116104eb57829003601f168201915b5050505050905090565b6000336105208185856109a4565b5060019392505050565b600033610538858285610ac8565b610543858585610b42565b506001949350505050565b60008281526020819052604090206001015461056981610d1b565b6105738383610d25565b505050565b6001600160a01b03811633146105ed5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105f78282610d47565b5050565b60003361052081858561060e8383610944565b610618919061186d565b6109a4565b6106477f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6106b95760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105e4565b6106c1610d69565b565b6106ed7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610847565b6107585760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105e4565b6105f78282610dbb565b61076c3382610ea6565b50565b61077a823383610ac8565b6105f78282610ea6565b6107ae7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610847565b6108205760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105e4565b6106c1611000565b6000828152600160205260408120610840908361103d565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461048f9061181d565b6000338161088d8286610944565b9050838110156108ed5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e4565b61054382868684036109a4565b600033610520818585610b42565b600081815260016020526040812061047a90611049565b60008281526020819052604090206001015461093a81610d1b565b6105738383610d47565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061047a57506301ffc9a760e01b6001600160e01b031983161461047a565b6001600160a01b038316610a065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e4565b6001600160a01b038216610a675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ad48484610944565b90506000198114610b3c5781811015610b2f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e4565b610b3c84848484036109a4565b50505050565b6001600160a01b038316610ba65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e4565b6001600160a01b038216610c085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e4565b610c13838383611053565b6001600160a01b03831660009081526002602052604090205481811015610c8b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e4565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290610cc290849061186d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d0e91815260200190565b60405180910390a3610b3c565b61076c81336110ef565b610d2f8282611153565b600082815260016020526040902061057390826111d7565b610d5182826111ec565b60008281526001602052604090206105739082611251565b610d71611266565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e115760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e4565b610e1d60008383611053565b8060046000828254610e2f919061186d565b90915550506001600160a01b03821660009081526002602052604081208054839290610e5c90849061186d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610f065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e4565b610f1282600083611053565b6001600160a01b03821660009081526002602052604090205481811015610f865760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e4565b6001600160a01b0383166000908152600260205260408120838303905560048054849290610fb5908490611880565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6110086112af565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d9e3390565b600061084083836112f5565b600061047a825490565b6001600160a01b0382166110e457337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146110e45760405162461bcd60e51b815260206004820152602260248201527f574254433a206f6e6c7920676174657761792063616e206275726e20746f6b656044820152616e7360f01b60648201526084016105e4565b61057383838361131f565b6110f98282610847565b6105f757611111816001600160a01b0316601461132a565b61111c83602061132a565b60405160200161112d929190611893565b60408051601f198184030181529082905262461bcd60e51b82526105e4916004016116bc565b61115d8282610847565b6105f7576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610840836001600160a01b0384166114c6565b6111f68282610847565b156105f7576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610840836001600160a01b038416611515565b60075460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105e4565b60075460ff16156106c15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105e4565b600082600001828154811061130c5761130c611908565b9060005260206000200154905092915050565b610573838383611608565b6060600061133983600261191e565b61134490600261186d565b67ffffffffffffffff81111561135c5761135c611935565b6040519080825280601f01601f191660200182016040528015611386576020820181803683370190505b509050600360fc1b816000815181106113a1576113a1611908565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106113d0576113d0611908565b60200101906001600160f81b031916908160001a90535060006113f484600261191e565b6113ff90600161186d565b90505b6001811115611477576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061143357611433611908565b1a60f81b82828151811061144957611449611908565b60200101906001600160f81b031916908160001a90535060049490941c936114708161194b565b9050611402565b5083156108405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e4565b600081815260018301602052604081205461150d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561047a565b50600061047a565b600081815260018301602052604081205480156115fe576000611539600183611880565b855490915060009061154d90600190611880565b90508181146115b257600086600001828154811061156d5761156d611908565b906000526020600020015490508087600001848154811061159057611590611908565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806115c3576115c3611962565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061047a565b600091505061047a565b60075460ff16156105735760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105e4565b60006020828403121561168057600080fd5b81356001600160e01b03198116811461084057600080fd5b60005b838110156116b357818101518382015260200161169b565b50506000910152565b60208152600082518060208401526116db816040850160208701611698565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461170657600080fd5b919050565b6000806040838503121561171e57600080fd5b611727836116ef565b946020939093013593505050565b60008060006060848603121561174a57600080fd5b611753846116ef565b9250611761602085016116ef565b9150604084013590509250925092565b60006020828403121561178357600080fd5b5035919050565b6000806040838503121561179d57600080fd5b823591506117ad602084016116ef565b90509250929050565b6000602082840312156117c857600080fd5b610840826116ef565b600080604083850312156117e457600080fd5b50508035926020909101359150565b6000806040838503121561180657600080fd5b61180f836116ef565b91506117ad602084016116ef565b600181811c9082168061183157607f821691505b60208210810361185157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561047a5761047a611857565b8181038181111561047a5761047a611857565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118cb816017850160208801611698565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516118fc816028840160208801611698565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761047a5761047a611857565b634e487b7160e01b600052604160045260246000fd5b60008161195a5761195a611857565b506000190190565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206c82e80b01e3d2f3c41a1b05390b6cc6adf2befa4f81b9fb1dfde13fdd134f9c64736f6c63430008170033\"", "deployer": "0x08295771719b138a241F45023B13CC868D72827D", "devdoc": { "version": 1, @@ -116,28 +116,28 @@ } }, "isFoundry": true, - "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"gateway\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"pauser\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Approval\\\",\\\"type\\\":\\\"event\\\"},{\\\"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\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Transfer\\\",\\\"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\\\":\\\"GATEWAY_ADDRESS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"MINTER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"PAUSER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"allowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"approve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"balanceOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burn\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burnFrom\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"decimals\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"subtractedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"decreaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"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\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"addedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"increaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"mint\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"name\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"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\\\":\\\"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\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"supportsInterface\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"symbol\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalSupply\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transferFrom\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"events\\\":{\\\"Approval(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\\\"},\\\"Paused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is triggered by `account`.\\\"},\\\"RoleAdminChanged(bytes32,bytes32,bytes32)\\\":{\\\"details\\\":\\\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\\\"},\\\"RoleGranted(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\\\"},\\\"RoleRevoked(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\\\"},\\\"Transfer(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\\\"},\\\"Unpaused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is lifted by `account`.\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"allowance(address,address)\\\":{\\\"details\\\":\\\"See {IERC20-allowance}.\\\"},\\\"approve(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\\\"},\\\"balanceOf(address)\\\":{\\\"details\\\":\\\"See {IERC20-balanceOf}.\\\"},\\\"burn(uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\\\"},\\\"burnFrom(address,uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\\\"},\\\"decimals()\\\":{\\\"details\\\":\\\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\\\"},\\\"decreaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\\\"},\\\"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. May emit a {RoleGranted} event.\\\"},\\\"hasRole(bytes32,address)\\\":{\\\"details\\\":\\\"Returns `true` if `account` has been granted `role`.\\\"},\\\"increaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\\\"},\\\"mint(address,uint256)\\\":{\\\"details\\\":\\\"Creates `amount` new tokens for `to`. See {ERC20-_mint}. Requirements: - the caller must have the `MINTER_ROLE`.\\\"},\\\"name()\\\":{\\\"details\\\":\\\"Returns the name of the token.\\\"},\\\"pause()\\\":{\\\"details\\\":\\\"Pauses all token transfers. See {ERC20Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"},\\\"paused()\\\":{\\\"details\\\":\\\"Returns true if the contract is paused, and false otherwise.\\\"},\\\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\\\"},\\\"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. May emit a {RoleRevoked} event.\\\"},\\\"supportsInterface(bytes4)\\\":{\\\"details\\\":\\\"See {IERC165-supportsInterface}.\\\"},\\\"symbol()\\\":{\\\"details\\\":\\\"Returns the symbol of the token, usually a shorter version of the name.\\\"},\\\"totalSupply()\\\":{\\\"details\\\":\\\"See {IERC20-totalSupply}.\\\"},\\\"transfer(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\\\"},\\\"transferFrom(address,address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\\\"},\\\"unpause()\\\":{\\\"details\\\":\\\"Unpauses all token transfers. See {ERC20Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/tokens/erc20/WBTC.sol\\\":\\\"WBTC\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC20Metadata.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.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 Contracts guidelines: functions revert\\\\n * instead returning `false` on failure. This behavior is nonetheless\\\\n * conventional and does not conflict with the expectations of ERC20\\\\n * 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, IERC20Metadata {\\\\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\\\\n /**\\\\n * @dev Sets the values for {name} and {symbol}.\\\\n *\\\\n * The default value of {decimals} is 18. To select a different value for\\\\n * {decimals} you should overload it.\\\\n *\\\\n * All two of these values are immutable: they can only be set once during\\\\n * construction.\\\\n */\\\\n constructor(string memory name_, string memory symbol_) {\\\\n _name = name_;\\\\n _symbol = symbol_;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() public view virtual override 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 override 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 this function is\\\\n * overridden;\\\\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 override returns (uint8) {\\\\n return 18;\\\\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 * - `to` cannot be the zero address.\\\\n * - the caller must have a balance of at least `amount`.\\\\n */\\\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\\\n address owner = _msgSender();\\\\n _transfer(owner, to, 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 * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\\\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 address owner = _msgSender();\\\\n _approve(owner, 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 * NOTE: Does not update the allowance if the current allowance\\\\n * is the maximum `uint256`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` and `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n * - the caller must have allowance for ``from``'s tokens of at least\\\\n * `amount`.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) public virtual override returns (bool) {\\\\n address spender = _msgSender();\\\\n _spendAllowance(from, spender, amount);\\\\n _transfer(from, to, amount);\\\\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 address owner = _msgSender();\\\\n _approve(owner, spender, allowance(owner, spender) + 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 address owner = _msgSender();\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n require(currentAllowance >= subtractedValue, \\\\\\\"ERC20: decreased allowance below zero\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - subtractedValue);\\\\n }\\\\n\\\\n return true;\\\\n }\\\\n\\\\n /**\\\\n * @dev Moves `amount` of tokens from `from` to `to`.\\\\n *\\\\n * This 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 * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n */\\\\n function _transfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC20: transfer from the zero address\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC20: transfer to the zero address\\\\\\\");\\\\n\\\\n _beforeTokenTransfer(from, to, amount);\\\\n\\\\n uint256 fromBalance = _balances[from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC20: transfer amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[from] = fromBalance - amount;\\\\n }\\\\n _balances[to] += amount;\\\\n\\\\n emit Transfer(from, to, amount);\\\\n\\\\n _afterTokenTransfer(from, to, 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 * - `account` 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 += amount;\\\\n _balances[account] += amount;\\\\n emit Transfer(address(0), account, amount);\\\\n\\\\n _afterTokenTransfer(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 uint256 accountBalance = _balances[account];\\\\n require(accountBalance >= amount, \\\\\\\"ERC20: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[account] = accountBalance - amount;\\\\n }\\\\n _totalSupply -= amount;\\\\n\\\\n emit Transfer(account, address(0), amount);\\\\n\\\\n _afterTokenTransfer(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(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) 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 Updates `owner` s allowance for `spender` based on spent `amount`.\\\\n *\\\\n * Does not update the allowance amount in case of infinite allowance.\\\\n * Revert if not enough allowance is available.\\\\n *\\\\n * Might emit an {Approval} event.\\\\n */\\\\n function _spendAllowance(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n if (currentAllowance != type(uint256).max) {\\\\n require(currentAllowance >= amount, \\\\\\\"ERC20: insufficient allowance\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - amount);\\\\n }\\\\n }\\\\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 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(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after 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 * has been transferred to `to`.\\\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.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 /**\\\\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 _spendAllowance(account, _msgSender(), amount);\\\\n _burn(account, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n */\\\\nabstract contract ERC20Pausable is ERC20, Pausable {\\\\n /**\\\\n * @dev See {ERC20-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n\\\\n require(!paused(), \\\\\\\"ERC20Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x978847fbff92d66d27d8767402a90ba996970b1936b372406aa17f5492bd8dc5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC20.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\ninterface IERC20Metadata is IERC20 {\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the symbol of the token.\\\\n */\\\\n function symbol() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the decimals places of the token.\\\\n */\\\\n function decimals() external view returns (uint8);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC20} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\\\n * account that deploys the contract.\\\\n *\\\\n * See {ERC20-constructor}.\\\\n */\\\\n constructor(string memory name, string memory symbol) ERC20(name, symbol) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`.\\\\n *\\\\n * See {ERC20-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(address to, uint256 amount) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n _mint(to, amount);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override(ERC20, ERC20Pausable) {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2cd54808b851c4db22f459065af0b7a952262741a85a73923e7a660767cd7baa\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/tokens/erc20/WBTC.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\\\\\";\\\\n\\\\ncontract WBTC is ERC20PresetMinterPauser {\\\\n address public immutable GATEWAY_ADDRESS;\\\\n\\\\n constructor(address gateway, address pauser) ERC20PresetMinterPauser(\\\\\\\"Wrapped Bitcoin\\\\\\\", \\\\\\\"WBTC\\\\\\\") {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, pauser);\\\\n _setupRole(PAUSER_ROLE, pauser);\\\\n\\\\n GATEWAY_ADDRESS = gateway;\\\\n _setupRole(MINTER_ROLE, gateway);\\\\n\\\\n _revokeRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n _revokeRole(MINTER_ROLE, _msgSender());\\\\n _revokeRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20PresetMinterPauser) {\\\\n if (to == address(0)) {\\\\n if (_msgSender() != GATEWAY_ADDRESS) {\\\\n revert(\\\\\\\"WBTC: only gateway can burn tokens\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdf20641f881e86dc6203e8664ee6735dd9f1edddae147e1919de695c2bc15a01\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", - "nonce": 36, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"gateway\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"pauser\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Approval\\\",\\\"type\\\":\\\"event\\\"},{\\\"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\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"Transfer\\\",\\\"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\\\":\\\"GATEWAY_ADDRESS\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"MINTER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"PAUSER_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"owner\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"allowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"approve\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"balanceOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burn\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"burnFrom\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"decimals\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"subtractedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"decreaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"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\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"addedValue\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"increaseAllowance\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"mint\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"name\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"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\\\":\\\"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\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"supportsInterface\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"symbol\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"string\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalSupply\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transfer\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"transferFrom\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"events\\\":{\\\"Approval(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\\\"},\\\"Paused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is triggered by `account`.\\\"},\\\"RoleAdminChanged(bytes32,bytes32,bytes32)\\\":{\\\"details\\\":\\\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\\\"},\\\"RoleGranted(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\\\"},\\\"RoleRevoked(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\\\"},\\\"Transfer(address,address,uint256)\\\":{\\\"details\\\":\\\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\\\"},\\\"Unpaused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is lifted by `account`.\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"allowance(address,address)\\\":{\\\"details\\\":\\\"See {IERC20-allowance}.\\\"},\\\"approve(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\\\"},\\\"balanceOf(address)\\\":{\\\"details\\\":\\\"See {IERC20-balanceOf}.\\\"},\\\"burn(uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\\\"},\\\"burnFrom(address,uint256)\\\":{\\\"details\\\":\\\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\\\"},\\\"decimals()\\\":{\\\"details\\\":\\\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\\\"},\\\"decreaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\\\"},\\\"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. May emit a {RoleGranted} event.\\\"},\\\"hasRole(bytes32,address)\\\":{\\\"details\\\":\\\"Returns `true` if `account` has been granted `role`.\\\"},\\\"increaseAllowance(address,uint256)\\\":{\\\"details\\\":\\\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\\\"},\\\"mint(address,uint256)\\\":{\\\"details\\\":\\\"Creates `amount` new tokens for `to`. See {ERC20-_mint}. Requirements: - the caller must have the `MINTER_ROLE`.\\\"},\\\"name()\\\":{\\\"details\\\":\\\"Returns the name of the token.\\\"},\\\"pause()\\\":{\\\"details\\\":\\\"Pauses all token transfers. See {ERC20Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"},\\\"paused()\\\":{\\\"details\\\":\\\"Returns true if the contract is paused, and false otherwise.\\\"},\\\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\\\"},\\\"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. May emit a {RoleRevoked} event.\\\"},\\\"supportsInterface(bytes4)\\\":{\\\"details\\\":\\\"See {IERC165-supportsInterface}.\\\"},\\\"symbol()\\\":{\\\"details\\\":\\\"Returns the symbol of the token, usually a shorter version of the name.\\\"},\\\"totalSupply()\\\":{\\\"details\\\":\\\"See {IERC20-totalSupply}.\\\"},\\\"transfer(address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\\\"},\\\"transferFrom(address,address,uint256)\\\":{\\\"details\\\":\\\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\\\"},\\\"unpause()\\\":{\\\"details\\\":\\\"Unpauses all token transfers. See {ERC20Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/tokens/erc20/WBTC.sol\\\":\\\"WBTC\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC20Metadata.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.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 Contracts guidelines: functions revert\\\\n * instead returning `false` on failure. This behavior is nonetheless\\\\n * conventional and does not conflict with the expectations of ERC20\\\\n * 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, IERC20Metadata {\\\\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\\\\n /**\\\\n * @dev Sets the values for {name} and {symbol}.\\\\n *\\\\n * The default value of {decimals} is 18. To select a different value for\\\\n * {decimals} you should overload it.\\\\n *\\\\n * All two of these values are immutable: they can only be set once during\\\\n * construction.\\\\n */\\\\n constructor(string memory name_, string memory symbol_) {\\\\n _name = name_;\\\\n _symbol = symbol_;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() public view virtual override 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 override 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 this function is\\\\n * overridden;\\\\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 override returns (uint8) {\\\\n return 18;\\\\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 * - `to` cannot be the zero address.\\\\n * - the caller must have a balance of at least `amount`.\\\\n */\\\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\\\n address owner = _msgSender();\\\\n _transfer(owner, to, 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 * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\\\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 address owner = _msgSender();\\\\n _approve(owner, 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 * NOTE: Does not update the allowance if the current allowance\\\\n * is the maximum `uint256`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` and `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n * - the caller must have allowance for ``from``'s tokens of at least\\\\n * `amount`.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) public virtual override returns (bool) {\\\\n address spender = _msgSender();\\\\n _spendAllowance(from, spender, amount);\\\\n _transfer(from, to, amount);\\\\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 address owner = _msgSender();\\\\n _approve(owner, spender, allowance(owner, spender) + 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 address owner = _msgSender();\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n require(currentAllowance >= subtractedValue, \\\\\\\"ERC20: decreased allowance below zero\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - subtractedValue);\\\\n }\\\\n\\\\n return true;\\\\n }\\\\n\\\\n /**\\\\n * @dev Moves `amount` of tokens from `from` to `to`.\\\\n *\\\\n * This 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 * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of at least `amount`.\\\\n */\\\\n function _transfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC20: transfer from the zero address\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC20: transfer to the zero address\\\\\\\");\\\\n\\\\n _beforeTokenTransfer(from, to, amount);\\\\n\\\\n uint256 fromBalance = _balances[from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC20: transfer amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[from] = fromBalance - amount;\\\\n }\\\\n _balances[to] += amount;\\\\n\\\\n emit Transfer(from, to, amount);\\\\n\\\\n _afterTokenTransfer(from, to, 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 * - `account` 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 += amount;\\\\n _balances[account] += amount;\\\\n emit Transfer(address(0), account, amount);\\\\n\\\\n _afterTokenTransfer(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 uint256 accountBalance = _balances[account];\\\\n require(accountBalance >= amount, \\\\\\\"ERC20: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[account] = accountBalance - amount;\\\\n }\\\\n _totalSupply -= amount;\\\\n\\\\n emit Transfer(account, address(0), amount);\\\\n\\\\n _afterTokenTransfer(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(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) 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 Updates `owner` s allowance for `spender` based on spent `amount`.\\\\n *\\\\n * Does not update the allowance amount in case of infinite allowance.\\\\n * Revert if not enough allowance is available.\\\\n *\\\\n * Might emit an {Approval} event.\\\\n */\\\\n function _spendAllowance(\\\\n address owner,\\\\n address spender,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n uint256 currentAllowance = allowance(owner, spender);\\\\n if (currentAllowance != type(uint256).max) {\\\\n require(currentAllowance >= amount, \\\\\\\"ERC20: insufficient allowance\\\\\\\");\\\\n unchecked {\\\\n _approve(owner, spender, currentAllowance - amount);\\\\n }\\\\n }\\\\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 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(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after 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 * has been transferred to `to`.\\\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.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 /**\\\\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 _spendAllowance(account, _msgSender(), amount);\\\\n _burn(account, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0d19410453cda55960a818e02bd7c18952a5c8fe7a3036e81f0d599f34487a7b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n */\\\\nabstract contract ERC20Pausable is ERC20, Pausable {\\\\n /**\\\\n * @dev See {ERC20-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n\\\\n require(!paused(), \\\\\\\"ERC20Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x978847fbff92d66d27d8767402a90ba996970b1936b372406aa17f5492bd8dc5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC20.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\ninterface IERC20Metadata is IERC20 {\\\\n /**\\\\n * @dev Returns the name of the token.\\\\n */\\\\n function name() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the symbol of the token.\\\\n */\\\\n function symbol() external view returns (string memory);\\\\n\\\\n /**\\\\n * @dev Returns the decimals places of the token.\\\\n */\\\\n function decimals() external view returns (uint8);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC20.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC20Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC20} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the\\\\n * account that deploys the contract.\\\\n *\\\\n * See {ERC20-constructor}.\\\\n */\\\\n constructor(string memory name, string memory symbol) ERC20(name, symbol) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`.\\\\n *\\\\n * See {ERC20-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(address to, uint256 amount) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n _mint(to, amount);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC20Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC20PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) internal virtual override(ERC20, ERC20Pausable) {\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2cd54808b851c4db22f459065af0b7a952262741a85a73923e7a660767cd7baa\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/tokens/erc20/WBTC.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\\\\\\\";\\\\n\\\\ncontract WBTC is ERC20PresetMinterPauser {\\\\n address public immutable GATEWAY_ADDRESS;\\\\n\\\\n constructor(address gateway, address pauser) ERC20PresetMinterPauser(\\\\\\\"Wrapped Bitcoin\\\\\\\", \\\\\\\"WBTC\\\\\\\") {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, pauser);\\\\n _setupRole(PAUSER_ROLE, pauser);\\\\n\\\\n GATEWAY_ADDRESS = gateway;\\\\n _setupRole(MINTER_ROLE, gateway);\\\\n\\\\n _revokeRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n _revokeRole(MINTER_ROLE, _msgSender());\\\\n _revokeRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc ERC20\\\\n */\\\\n function decimals() public view virtual override returns (uint8) {\\\\n return 8;\\\\n }\\\\n\\\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20PresetMinterPauser) {\\\\n if (to == address(0)) {\\\\n if (_msgSender() != GATEWAY_ADDRESS) {\\\\n revert(\\\\\\\"WBTC: only gateway can burn tokens\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n super._beforeTokenTransfer(from, to, amount);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x8feda48d265897a859e1c55fce92250b0a75970819eb18588d29839c09a470ac\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 38, "storageLayout": { "storage": [ { - "astId": 50680, + "astId": 50687, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_roles", "offset": 0, "slot": "0", - "type": "t_mapping(t_bytes32,t_struct(RoleData)50675_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)50682_storage)" }, { - "astId": 50994, + "astId": 51001, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_roleMembers", "offset": 0, "slot": "1", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)57146_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)57657_storage)" }, { - "astId": 53889, + "astId": 53896, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_balances", "offset": 0, @@ -145,7 +145,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 53895, + "astId": 53902, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_allowances", "offset": 0, @@ -153,7 +153,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 53897, + "astId": 53904, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_totalSupply", "offset": 0, @@ -161,7 +161,7 @@ "type": "t_uint256" }, { - "astId": 53899, + "astId": 53906, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_name", "offset": 0, @@ -169,7 +169,7 @@ "type": "t_string_storage" }, { - "astId": 53901, + "astId": 53908, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_symbol", "offset": 0, @@ -177,7 +177,7 @@ "type": "t_string_storage" }, { - "astId": 51942, + "astId": 51949, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_paused", "offset": 0, @@ -228,19 +228,19 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_bytes32,t_struct(AddressSet)57146_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)57657_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)57146_storage" + "value": "t_struct(AddressSet)57657_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)50675_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)50682_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)50675_storage" + "value": "t_struct(RoleData)50682_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -254,28 +254,28 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(AddressSet)57146_storage": { + "t_struct(AddressSet)57657_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 57145, + "astId": 57656, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)56845_storage" + "type": "t_struct(Set)57356_storage" } ] }, - "t_struct(RoleData)50675_storage": { + "t_struct(RoleData)50682_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", "numberOfBytes": "64", "members": [ { - "astId": 50672, + "astId": 50679, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "members", "offset": 0, @@ -283,7 +283,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 50674, + "astId": 50681, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "adminRole", "offset": 0, @@ -292,13 +292,13 @@ } ] }, - "t_struct(Set)56845_storage": { + "t_struct(Set)57356_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 56840, + "astId": 57351, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_values", "offset": 0, @@ -306,7 +306,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 56844, + "astId": 57355, "contract": "src/tokens/erc20/WBTC.sol:WBTC", "label": "_indexes", "offset": 0, @@ -322,7 +322,7 @@ } } }, - "timestamp": 1722417551, + "timestamp": 1722838585, "userdoc": { "version": 1, "kind": "user" From c5f62c6634d091f81f3c9914e43c2593d87f1a8a Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 13:37:35 +0700 Subject: [PATCH 278/305] script: fix checksum address wbtc --- script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol index 68fb3b0b..0308e483 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; contract Migration__MapToken_WBTC_Threshold { - address _wbtcRoninToken = address(0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e); // https://app.roninchain.com/address/0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e + address _wbtcRoninToken = address(0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e); // https://app.roninchain.com/address/0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e address _wbtcMainchainToken = address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); // https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 // The decimal of WBTC token is 18 From e4102eabb32b76f142016d95afe112fb298352bd Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 11:31:21 +0700 Subject: [PATCH 279/305] fix(RoninBridgeManager, MainchainBridgeManager): expose map tokens function --- src/mainchain/MainchainBridgeManager.sol | 14 ++++++++++++++ src/ronin/gateway/RoninBridgeManager.sol | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index 7bc5f3cf..e80e6ab0 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -5,6 +5,8 @@ import { CoreGovernance } from "../extensions/sequential-governance/CoreGovernan import { GlobalCoreGovernance, GlobalGovernanceRelay } from "../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol"; import { GovernanceRelay } from "../extensions/sequential-governance/governance-relay/GovernanceRelay.sol"; import { ContractType, BridgeManager } from "../extensions/bridge-operator-governance/BridgeManager.sol"; +import { IMainchainGatewayV3 } from "../interfaces/IMainchainGatewayV3.sol"; +import { TokenStandard } from "../libraries/LibTokenInfo.sol"; import { Ballot } from "../libraries/Ballot.sol"; import { Proposal } from "../libraries/Proposal.sol"; import { GlobalProposal } from "../libraries/GlobalProposal.sol"; @@ -30,6 +32,18 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); } + function expose_mapTokensAndThresholds( + address[] calldata mainchainTokens, + address[] calldata roninTokens, + TokenStandard[] calldata standards, + uint256[][4] calldata thresholds + ) external onlyProxyAdmin { + GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); + targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + IMainchainGatewayV3 gateway = IMainchainGatewayV3(_resolveTargets({ targetOptions: targetOptions, strict: true })[0]); + gateway.mapTokensAndThresholds({ _mainchainTokens: mainchainTokens, _roninTokens: roninTokens, _standards: standards, _thresholds: thresholds }); + } + /** * @dev See `GovernanceRelay-_relayProposal`. * diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index a55a992d..6dc7f530 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -14,6 +14,8 @@ import { GlobalCoreGovernance, GlobalGovernanceProposal } from "../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol"; +import { IRoninGatewayV3 } from "../../interfaces/IRoninGatewayV3.sol"; +import { TokenStandard } from "../../libraries/LibTokenInfo.sol"; import { VoteStatusConsumer } from "../../interfaces/consumers/VoteStatusConsumer.sol"; import "../../utils/CommonErrors.sol"; @@ -21,6 +23,18 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan using Proposal for Proposal.ProposalDetail; using GlobalProposal for GlobalProposal.GlobalProposalDetail; + function expose_mapToken( + address[] calldata mainchainTokens, + address[] calldata roninTokens, + uint256[] calldata chainIds, + TokenStandard[] calldata standards + ) external onlyProxyAdmin { + GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); + targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; + IRoninGatewayV3 gateway = IRoninGatewayV3(_resolveTargets({ targetOptions: targetOptions, strict: true })[0]); + gateway.mapTokens({ _roninTokens: roninTokens, _mainchainTokens: mainchainTokens, chainIds: chainIds, _standards: standards }); + } + /** * CURRENT NETWORK */ From c527b3486a87bcfc3761866fd9b1d637a8403fee Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 11:39:41 +0700 Subject: [PATCH 280/305] fix(RoninBridgeManager): add setMinimumThresholds --- src/mainchain/MainchainBridgeManager.sol | 1 + src/ronin/gateway/RoninBridgeManager.sol | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index e80e6ab0..088be28c 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -41,6 +41,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; IMainchainGatewayV3 gateway = IMainchainGatewayV3(_resolveTargets({ targetOptions: targetOptions, strict: true })[0]); + gateway.mapTokensAndThresholds({ _mainchainTokens: mainchainTokens, _roninTokens: roninTokens, _standards: standards, _thresholds: thresholds }); } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 6dc7f530..9d78e8a7 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -15,6 +15,7 @@ import { GlobalGovernanceProposal } from "../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol"; import { IRoninGatewayV3 } from "../../interfaces/IRoninGatewayV3.sol"; +import { MinimumWithdrawal } from "../../extensions/MinimumWithdrawal.sol"; import { TokenStandard } from "../../libraries/LibTokenInfo.sol"; import { VoteStatusConsumer } from "../../interfaces/consumers/VoteStatusConsumer.sol"; import "../../utils/CommonErrors.sol"; @@ -23,16 +24,19 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan using Proposal for Proposal.ProposalDetail; using GlobalProposal for GlobalProposal.GlobalProposalDetail; - function expose_mapToken( + function expose_mapTokenAndSetMinimumThresholds( address[] calldata mainchainTokens, address[] calldata roninTokens, uint256[] calldata chainIds, - TokenStandard[] calldata standards + TokenStandard[] calldata standards, + uint256[] calldata withdrawalThresholds ) external onlyProxyAdmin { GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; - IRoninGatewayV3 gateway = IRoninGatewayV3(_resolveTargets({ targetOptions: targetOptions, strict: true })[0]); - gateway.mapTokens({ _roninTokens: roninTokens, _mainchainTokens: mainchainTokens, chainIds: chainIds, _standards: standards }); + address gw = _resolveTargets({ targetOptions: targetOptions, strict: true })[0]; + + IRoninGatewayV3(gw).mapTokens({ _roninTokens: roninTokens, _mainchainTokens: mainchainTokens, chainIds: chainIds, _standards: standards }); + MinimumWithdrawal(gw).setMinimumThresholds({ _tokens: mainchainTokens, _thresholds: withdrawalThresholds }); } /** From 6e7ca70de5f0e86078f44c7738c18edf1eb97741 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 13:50:32 +0700 Subject: [PATCH 281/305] script: update decimal value in script wbtc --- .../wbtc-threshold.s.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol index 0308e483..fadd13ef 100644 --- a/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol +++ b/script/20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol @@ -5,11 +5,11 @@ contract Migration__MapToken_WBTC_Threshold { address _wbtcRoninToken = address(0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e); // https://app.roninchain.com/address/0x7e73630f81647bcfd7b1f2c04c1c662d17d4577e address _wbtcMainchainToken = address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); // https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 - // The decimal of WBTC token is 18 - uint256 _wbtcHighTierThreshold = 17 ether; - uint256 _wbtcLockedThreshold = 34 ether; - uint256 _wbtcDailyWithdrawalLimit = 42 ether; - uint256 _wbtcMinThreshold = 0.000167 ether; + // The decimal of WBTC token is 8 + uint256 _wbtcHighTierThreshold = 17 * 10 ** 8; + uint256 _wbtcLockedThreshold = 34 * 10 ** 8; + uint256 _wbtcDailyWithdrawalLimit = 42 * 10 ** 8; + uint256 _wbtcMinThreshold = 0.000167 * 10 ** 8; // The MAX_PERCENTAGE is 100_0000 uint256 _wbtcUnlockFeePercentages = 10; // 0.001%. Max percentage is 1e6 so 10 is 0.001% (`10 / 1e6 = 0.001 * 100`) From ae04f72884feff8f2a2e96ed83c6ffa43e4b3080 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 14:37:24 +0700 Subject: [PATCH 282/305] fix(MainchainBridgeManager, RoninbridgeManager): hardcode config for hotfix fn --- src/mainchain/MainchainBridgeManager.sol | 33 +++++++++++++++++++----- src/ronin/gateway/RoninBridgeManager.sol | 28 ++++++++++++++------ 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index 088be28c..c01a5a2b 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -32,17 +32,38 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); } - function expose_mapTokensAndThresholds( - address[] calldata mainchainTokens, - address[] calldata roninTokens, - TokenStandard[] calldata standards, - uint256[][4] calldata thresholds - ) external onlyProxyAdmin { + function hotfix__mapTokensAndThresholds_registerCallbacks() external onlyProxyAdmin { + require(block.chainid == 1, "Only on ethereum-mainnet"); + + address[] memory mainchainTokens = new address[](1); + address[] memory roninTokens = new address[](1); + address[] memory callbacks = new address[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + uint256[][4] memory thresholds; + + mainchainTokens[0] = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; + roninTokens[0] = 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e; + callbacks[0] = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; // MainchainGatewayV3 + standards[0] = TokenStandard.ERC20; + // highTierThreshold + thresholds[0] = new uint256[](1); + thresholds[0][0] = 17 * 10 ** 8; + // lockedThreshold + thresholds[1] = new uint256[](1); + thresholds[1][0] = 34 * 10 ** 8; + // unlockFeePercentages + thresholds[2] = new uint256[](1); + thresholds[2][0] = 10; + // dailyWithdrawalLimit + thresholds[3] = new uint256[](1); + thresholds[3][0] = 42 * 10 ** 8; + GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; IMainchainGatewayV3 gateway = IMainchainGatewayV3(_resolveTargets({ targetOptions: targetOptions, strict: true })[0]); gateway.mapTokensAndThresholds({ _mainchainTokens: mainchainTokens, _roninTokens: roninTokens, _standards: standards, _thresholds: thresholds }); + _registerCallbacks(callbacks); } /** diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 9d78e8a7..9b1078bf 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -24,19 +24,31 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan using Proposal for Proposal.ProposalDetail; using GlobalProposal for GlobalProposal.GlobalProposalDetail; - function expose_mapTokenAndSetMinimumThresholds( - address[] calldata mainchainTokens, - address[] calldata roninTokens, - uint256[] calldata chainIds, - TokenStandard[] calldata standards, - uint256[] calldata withdrawalThresholds - ) external onlyProxyAdmin { + function hotfix__mapToken_setMinimumThresholds_registerCallbacks() external onlyProxyAdmin { + require(block.chainid == 2020, "Only on ronin-mainnet"); + + address[] memory roninTokens = new address[](1); + address[] memory mainchainTokens = new address[](1); + uint256[] memory chainIds = new uint256[](1); + address[] memory callbacks = new address[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + uint256[] memory withdrawalThresholds = new uint256[](1); + + roninTokens[0] = 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e; + mainchainTokens[0] = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; + chainIds[0] = 1; + callbacks[0] = 0x273cdA3AFE17eB7BcB028b058382A9010ae82B24; // Bridge Slash contract + standards[0] = TokenStandard.ERC20; + withdrawalThresholds[0] = 0.000167 * 10 ** 8; + GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; address gw = _resolveTargets({ targetOptions: targetOptions, strict: true })[0]; - + IRoninGatewayV3(gw).mapTokens({ _roninTokens: roninTokens, _mainchainTokens: mainchainTokens, chainIds: chainIds, _standards: standards }); MinimumWithdrawal(gw).setMinimumThresholds({ _tokens: mainchainTokens, _thresholds: withdrawalThresholds }); + + _registerCallbacks(callbacks); } /** From 769c6d4bbf29a363a67d0aa65e8fbaee758df8e0 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 14:54:10 +0700 Subject: [PATCH 283/305] fix(RoninBridgeManager): hardcode gateway config --- src/ronin/gateway/RoninBridgeManager.sol | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 9b1078bf..b3126491 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -41,9 +41,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan standards[0] = TokenStandard.ERC20; withdrawalThresholds[0] = 0.000167 * 10 ** 8; - GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); - targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; - address gw = _resolveTargets({ targetOptions: targetOptions, strict: true })[0]; + address gw = 0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df; IRoninGatewayV3(gw).mapTokens({ _roninTokens: roninTokens, _mainchainTokens: mainchainTokens, chainIds: chainIds, _standards: standards }); MinimumWithdrawal(gw).setMinimumThresholds({ _tokens: mainchainTokens, _thresholds: withdrawalThresholds }); From 489e35033e4c9adc3c278913fee11346dde4592b Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 15:07:41 +0700 Subject: [PATCH 284/305] fix: hardcode gateway config, reduce code size for temporal ronin bridge manager --- src/mainchain/MainchainBridgeManager.sol | 4 +-- src/ronin/gateway/RoninBridgeManager.sol | 41 ++---------------------- 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index c01a5a2b..d4b71ad3 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -58,9 +58,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna thresholds[3] = new uint256[](1); thresholds[3][0] = 42 * 10 ** 8; - GlobalProposal.TargetOption[] memory targetOptions = new GlobalProposal.TargetOption[](1); - targetOptions[0] = GlobalProposal.TargetOption.GatewayContract; - IMainchainGatewayV3 gateway = IMainchainGatewayV3(_resolveTargets({ targetOptions: targetOptions, strict: true })[0]); + IMainchainGatewayV3 gateway = IMainchainGatewayV3(0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08); gateway.mapTokensAndThresholds({ _mainchainTokens: mainchainTokens, _roninTokens: roninTokens, _standards: standards, _thresholds: thresholds }); _registerCallbacks(callbacks); diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index b3126491..15759279 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -167,17 +167,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan uint256[] calldata values, bytes[] calldata calldatas, uint256[] calldata gasAmounts - ) external onlyGovernor { - _proposeGlobal({ - expiryTimestamp: expiryTimestamp, - executor: executor, - targetOptions: targetOptions, - values: values, - calldatas: calldatas, - gasAmounts: gasAmounts, - creator: msg.sender - }); - } + ) external onlyGovernor { } /** * @dev See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. @@ -190,9 +180,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan GlobalProposal.GlobalProposalDetail calldata globalProposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures - ) external onlyGovernor { - _proposeGlobalProposalStructAndCastVotes({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender }); - } + ) external onlyGovernor { } /** * @dev See `GovernanceProposal-_castGlobalProposalBySignatures`. @@ -201,9 +189,7 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan GlobalProposal.GlobalProposalDetail calldata globalProposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures - ) external { - _castGlobalProposalBySignatures({ globalProposal: globalProposal, supports_: supports_, signatures: signatures }); - } + ) external { } /** * COMMON METHODS @@ -226,27 +212,6 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan }); } - /** - * @dev Deletes the expired proposal by its chainId and nonce, without creating a new proposal. - * - * Requirements: - * - The proposal is already created. - * - */ - function deleteExpired(uint256 _chainId, uint256 _round) external { - ProposalVote storage _vote = vote[_chainId][_round]; - if (_vote.hash == 0) revert ErrQueryForEmptyVote(); - - _tryDeleteExpiredVotingRound(_vote); - } - - /** - * @dev Returns the expiry duration for a new proposal. - */ - function getProposalExpiryDuration() external view returns (uint256) { - return _proposalExpiryDuration; - } - /** * @dev Internal function to get the chain type of the contract. * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain). From c8db7d18bb8f37ed0ed99558fdf7a0c530097eda Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 15:17:37 +0700 Subject: [PATCH 285/305] fix: use function delegatecall --- src/ronin/gateway/RoninBridgeManager.sol | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 15759279..5d043e1c 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -43,9 +43,15 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan address gw = 0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df; - IRoninGatewayV3(gw).mapTokens({ _roninTokens: roninTokens, _mainchainTokens: mainchainTokens, chainIds: chainIds, _standards: standards }); - MinimumWithdrawal(gw).setMinimumThresholds({ _tokens: mainchainTokens, _thresholds: withdrawalThresholds }); - + (bool success,) = gw.call( + abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards))) + ); + require(success, "Map tokens failed"); + (success,) = gw.call( + abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (mainchainTokens, withdrawalThresholds))) + ); + require(success, "Set minimum withdrawal failed"); + _registerCallbacks(callbacks); } From 40e6413e9043af86944fa7a6f95462b0856df6bd Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 15:20:49 +0700 Subject: [PATCH 286/305] fix(MainchainBridgeManager): use functionDelegateCall --- src/mainchain/MainchainBridgeManager.sol | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index d4b71ad3..3617c0f9 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -58,9 +58,15 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna thresholds[3] = new uint256[](1); thresholds[3][0] = 42 * 10 ** 8; - IMainchainGatewayV3 gateway = IMainchainGatewayV3(0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08); + address gateway = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; + + (bool success,) = gateway.call( + abi.encodeWithSignature( + "functionDelegateCall(bytes)", abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds)) + ) + ); + require(success, "Map tokens and thresholds failed"); - gateway.mapTokensAndThresholds({ _mainchainTokens: mainchainTokens, _roninTokens: roninTokens, _standards: standards, _thresholds: thresholds }); _registerCallbacks(callbacks); } From df1d80e48fa1e0854133775eb94aa5bdb64a2a47 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 16:00:11 +0700 Subject: [PATCH 287/305] fix(MainchainBridgeManager): reduce code size for temporal impl --- src/mainchain/MainchainBridgeManager.sol | 46 ++++++------------------ 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/src/mainchain/MainchainBridgeManager.sol b/src/mainchain/MainchainBridgeManager.sol index 3617c0f9..0b63d90d 100644 --- a/src/mainchain/MainchainBridgeManager.sol +++ b/src/mainchain/MainchainBridgeManager.sol @@ -26,11 +26,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna uint96[] memory voteWeights, GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets - ) external initializer { - __CoreGovernance_init(DEFAULT_EXPIRY_DURATION); - __GlobalCoreGovernance_init(targetOptions, targets); - __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights); - } + ) external initializer { } function hotfix__mapTokensAndThresholds_registerCallbacks() external onlyProxyAdmin { require(block.chainid == 1, "Only on ethereum-mainnet"); @@ -80,10 +76,7 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna Proposal.ProposalDetail calldata proposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures - ) external onlyGovernor { - _requireExecutor(proposal.executor, msg.sender); - _relayProposal(proposal, supports_, signatures, msg.sender); - } + ) external onlyGovernor { } /** * @dev See `GovernanceRelay-_relayGlobalProposal`. @@ -95,58 +88,39 @@ contract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGoverna GlobalProposal.GlobalProposalDetail calldata globalProposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures - ) external onlyGovernor { - _requireExecutor(globalProposal.executor, msg.sender); - _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender }); - } + ) external onlyGovernor { } - function _requireExecutor(address executor, address caller) internal pure { - if (executor != address(0) && caller != executor) { - revert ErrNonExecutorCannotRelay(executor, caller); - } - } + function _requireExecutor(address executor, address caller) internal pure { } /** * @dev Internal function to retrieve the minimum vote weight required for governance actions. * @return minimumVoteWeight The minimum vote weight required for governance actions. */ - function _getMinimumVoteWeight() internal view override returns (uint256) { - return minimumVoteWeight(); - } + function _getMinimumVoteWeight() internal view override returns (uint256) { } /** * @dev Returns the expiry duration for a new proposal. */ - function getProposalExpiryDuration() external view returns (uint256) { - return _proposalExpiryDuration; - } + function getProposalExpiryDuration() external view returns (uint256) { } /** * @dev Internal function to retrieve the total weights of all governors. * @return totalWeights The total weights of all governors combined. */ - function _getTotalWeight() internal view override returns (uint256) { - return getTotalWeight(); - } + function _getTotalWeight() internal view override returns (uint256) { } /** * @dev Internal function to calculate the sum of weights for a given array of governors. * @param governors An array containing the addresses of governors to calculate the sum of weights. * @return sumWeights The sum of weights for the provided governors. */ - function _sumWeight(address[] memory governors) internal view override returns (uint256) { - return _sumGovernorsWeight(governors); - } + function _sumWeight(address[] memory governors) internal view override returns (uint256) { } /** * @dev Internal function to retrieve the chain type of the contract. * @return chainType The chain type, indicating the type of the chain the contract operates on (e.g., Mainchain). */ - function _getChainType() internal pure override returns (ChainType) { - return ChainType.Mainchain; - } + function _getChainType() internal pure override returns (ChainType) { } - function _proposalDomainSeparator() internal view override returns (bytes32) { - return DOMAIN_SEPARATOR; - } + function _proposalDomainSeparator() internal view override returns (bytes32) { } } From 3b22642e8f503214a508fe386adce7c85ced7cae Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 16:30:30 +0700 Subject: [PATCH 288/305] script: add hot fix simulation for ronin bridge manager --- ...20240805-hotfix-ronin-bridge-manager.s.sol | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 script/20240716-upgrade-v3.2.0-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol b/script/20240716-upgrade-v3.2.0-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol new file mode 100644 index 00000000..a62bfb7b --- /dev/null +++ b/script/20240716-upgrade-v3.2.0-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console } from "forge-std/console.sol"; +import { Migration } from "script/Migration.s.sol"; +import { Contract } from "script/utils/Contract.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { cheatBroadcast } from "@fdk/utils/Helpers.sol"; +import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; +import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; + +contract Migration__20240805_HotFix_RoninBridgeManager is Migration { + using LibProxy for *; + + function run() external { + address roninBM = loadContract(Contract.RoninBridgeManager.key()); + address proxyAdmin = roninBM.getProxyAdmin(); + address bridgeSlash = loadContract(Contract.BridgeSlash.key()); + address roninGW = loadContract(Contract.RoninGatewayV3.key()); + // Cheat set admin slot to current bm + vm.store(roninGW, LibProxy.ADMIN_SLOT, bytes32(uint256(uint160(roninBM)))); + // Cheat set impl slot to new bridge slash logic + vm.store(bridgeSlash, LibProxy.IMPLEMENTATION_SLOT, bytes32(uint256(uint160(0xfc274EC92bBb1A1472884558d1B5CaaC6F8220Ee)))); + + console.log("Proxy Admin", proxyAdmin); + + address prevImpl = roninBM.getProxyImplementation(); + + console.log("Prev Impl", prevImpl); + + address hotfixImpl = _deployLogic(Contract.RoninBridgeManager.key()); + + console.log("Hotfix Impl", hotfixImpl); + + cheatBroadcast( + proxyAdmin, + roninBM, + 0, + abi.encodeCall( + TransparentUpgradeableProxy.upgradeToAndCall, + (hotfixImpl, abi.encodeCall(RoninBridgeManager.hotfix__mapToken_setMinimumThresholds_registerCallbacks, ())) + ) + ); + + cheatBroadcast(proxyAdmin, roninBM, 0, abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (prevImpl))); + } +} From 8e7a41ed11075aada36f34a0a93ec875098313e7 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Fri, 2 Aug 2024 18:25:02 +0700 Subject: [PATCH 289/305] script: transfer MainchainBM to multisig --- .../20240802-change-proxy-admin-BM.s.sol | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 script/ad-hoc/20240802-change-proxy-admin-BM.s.sol diff --git a/script/ad-hoc/20240802-change-proxy-admin-BM.s.sol b/script/ad-hoc/20240802-change-proxy-admin-BM.s.sol new file mode 100644 index 00000000..16b02886 --- /dev/null +++ b/script/ad-hoc/20240802-change-proxy-admin-BM.s.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import { console } from "forge-std/console.sol"; +import { Migration } from "script/Migration.s.sol"; +import { Contract } from "script/utils/Contract.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; +import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; + +contract MainchainTransferProxyAdminBridgeManager is Migration { + using LibProxy for *; + + address internal constant ETH_MULTISIG = 0x51F6696Ae42C6C40CA9F5955EcA2aaaB1Cefb26e; + + function run() external { + address mainchainBM = loadContract(Contract.MainchainBridgeManager.key()); + address currProxyAdmin = mainchainBM.getProxyAdmin(); + + console.log("Mainchain BM", mainchainBM); + console.log("Current PA", currProxyAdmin); + + vm.broadcast(currProxyAdmin); + TransparentUpgradeableProxy(payable(mainchainBM)).changeAdmin(ETH_MULTISIG); + + address newProxyAdmin = mainchainBM.getProxyAdmin(); + assertEq(newProxyAdmin, ETH_MULTISIG, "New Proxy Admin"); + assertTrue(newProxyAdmin.code.length != 0, "Contain code at new proxy admin, probably multisig"); + + console.log("New PA", newProxyAdmin); + } +} \ No newline at end of file From b220cc4313782d6a90ca7175ecf4f5e769fba0bc Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 5 Aug 2024 16:39:57 +0700 Subject: [PATCH 290/305] script: add mainchain script --- .../20240805-hotfix-v3.2.2-mainchain.s.sol | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-v3.2.2-mainchain.s.sol diff --git a/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-v3.2.2-mainchain.s.sol b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-v3.2.2-mainchain.s.sol new file mode 100644 index 00000000..773a8a8e --- /dev/null +++ b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-v3.2.2-mainchain.s.sol @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import { console } from "forge-std/console.sol"; +import { StdStyle } from "forge-std/StdStyle.sol"; +import { IRoninBridgeManager } from "script/interfaces/IRoninBridgeManager.sol"; +import { IMainchainGatewayV3 } from "@ronin/contracts/interfaces/IMainchainGatewayV3.sol"; +import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; +import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; +import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol"; +import { LibTokenInfo, TokenStandard } from "@ronin/contracts/libraries/LibTokenInfo.sol"; +import { Contract } from "../utils/Contract.sol"; +import { Network } from "../utils/Network.sol"; +import { Contract } from "../utils/Contract.sol"; +import { ISharedArgument } from "../interfaces/ISharedArgument.sol"; +import "@ronin/contracts/ronin/gateway/BridgeReward.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; +import "@ronin/contracts/mainchain/MainchainGatewayV3.sol"; +import "@ronin/contracts/libraries/Proposal.sol"; +import "@ronin/contracts/libraries/Ballot.sol"; +import { TransparentUpgradeableProxyV2, TransparentUpgradeableProxy } from "@ronin/contracts/extensions/TransparentUpgradeableProxyV2.sol"; + +import { MockSLP } from "@ronin/contracts/mocks/token/MockSLP.sol"; +import { SLPDeploy } from "@ronin/script/contracts/token/SLPDeploy.s.sol"; +import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; +import "@ronin/script/contracts/RoninBridgeManagerDeploy.s.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { Migration } from "../Migration.s.sol"; +import { cheatBroadcast } from "@fdk/utils/Helpers.sol"; + +import { Migration__MapToken_WBTC_Threshold } from "../20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol"; + +contract Migration__20240805_Hotfix_V3_2_0__Mainchain is Migration__MapToken_WBTC_Threshold, Migration +{ + using StdStyle for *; + + ISharedArgument.SharedParameter _param; + + address _multisigEth = 0x51F6696Ae42C6C40CA9F5955EcA2aaaB1Cefb26e; + + function setUp() public virtual override { + super.setUp(); + + vm.label(_multisigEth, "ETH Multisig"); + } + + function run() public virtual onlyOn(Network.EthMainnet.key()) { + IMainchainBridgeManager mainchainBM = IMainchainBridgeManager(0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB); + vm.prank(_multisigEth); + TransparentUpgradeableProxyV2 mainchainBMproxy = TransparentUpgradeableProxyV2(payable(address(mainchainBM))); + + address prevBMLogic = mainchainBMproxy.implementation(); + address newBMLogic = _deployLogic(Contract.MainchainBridgeManager.key()); + + // 0. Prank relay running proposal + { + bytes32 adminSlot_$ = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + bytes32 adminValue = bytes32(uint256(uint160(_multisigEth))); + vm.store(address(mainchainBMproxy), adminSlot_$, adminValue); + + address mainchainGW = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; + adminValue = bytes32(uint256(uint160(address(mainchainBMproxy)))); + vm.store(address(mainchainGW), adminSlot_$, adminValue); + + // Prank that Mainchain gateway is upgraded + bytes32 implSlot_$ = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + bytes32 implValue = bytes32(uint256(uint160(0xfc274EC92bBb1A1472884558d1B5CaaC6F8220Ee))); + vm.store(address(mainchainGW), implSlot_$, implValue); + } + + // 1. Upgrade to and call + { + address[] memory mainchainTokens = new address[](1); + address[] memory roninTokens = new address[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + uint256[][4] memory thresholds; + + mainchainTokens[0] = _wbtcMainchainToken; + roninTokens[0] = _wbtcRoninToken; + standards[0] = TokenStandard.ERC20; + // highTierThreshold + thresholds[0] = new uint256[](1); + thresholds[0][0] = _wbtcHighTierThreshold; + // lockedThreshold + thresholds[1] = new uint256[](1); + thresholds[1][0] = _wbtcLockedThreshold; + // unlockFeePercentages + thresholds[2] = new uint256[](1); + thresholds[2][0] = _wbtcUnlockFeePercentages; + // dailyWithdrawalLimit + thresholds[3] = new uint256[](1); + thresholds[3][0] = _wbtcDailyWithdrawalLimit; + + cheatBroadcast({ + from: _multisigEth, + to: address(mainchainBMproxy), + callValue: 0, + callData: abi.encodeWithSignature( + "upgradeToAndCall(address,bytes)", + newBMLogic, + abi.encodeWithSignature("hotfix__mapTokensAndThresholds_registerCallbacks()") + ) + }); + // mainchainBMproxy.upgradeToAndCall( + // newBMLogic, abi.encodeWithSignature( + // // function expose_mapTokensAndThresholds( + // // address[] calldata mainchainTokens, + // // address[] calldata roninTokens, + // // TokenStandard[] calldata standards, + // // uint256[][4] calldata thresholds + // // ) + // "expose_mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])", + // mainchainTokens, + // roninTokens, + // standards, + // thresholds + // ) + // ); + + vm.startPrank(address(_multisigEth)); + assertTrue(mainchainBMproxy.implementation() == newBMLogic, "Mainchain BM Logic"); + vm.stopPrank(); + } + + // 2. Downgrade to previous version + cheatBroadcast({ + from: _multisigEth, + to: address(mainchainBMproxy), + callValue: 0, + callData: abi.encodeWithSignature( + "upgradeTo(address)", + prevBMLogic + ) + }); + } + + function _postCheck() internal virtual override { + console.log("Starting post-check".bold().cyan()); + + super._postCheck(); + } +} From 44a0035a0d0e31adf6b2e3fd1e06e1e814fb0cdc Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 5 Aug 2024 16:41:51 +0700 Subject: [PATCH 291/305] script: move folder script --- .../20240805-hotfix-ronin-bridge-manager.s.sol | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename script/{20240716-upgrade-v3.2.0-mainnet => 20240805-upgrade-v3.2.2-fix-mainnet}/20240805-hotfix-ronin-bridge-manager.s.sol (100%) diff --git a/script/20240716-upgrade-v3.2.0-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol similarity index 100% rename from script/20240716-upgrade-v3.2.0-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol rename to script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol From 218dcb65029ae77f92aff7abf37fee4ca8ec6a71 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 5 Aug 2024 17:54:49 +0700 Subject: [PATCH 292/305] feat: add unmapToken and mapWithMinWithdrawals method --- src/extensions/MinimumWithdrawal.sol | 20 +++++-------- src/interfaces/IRoninGatewayV3.sol | 18 +++++++++++ src/ronin/gateway/RoninGatewayV3.sol | 45 +++++++++++++++++++++++++++- 3 files changed, 70 insertions(+), 13 deletions(-) diff --git a/src/extensions/MinimumWithdrawal.sol b/src/extensions/MinimumWithdrawal.sol index df2fc7e5..a3de472b 100644 --- a/src/extensions/MinimumWithdrawal.sol +++ b/src/extensions/MinimumWithdrawal.sol @@ -30,9 +30,9 @@ abstract contract MinimumWithdrawal is HasProxyAdmin { * Emits the `MinimumThresholdsUpdated` event. * */ - function setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyProxyAdmin { - if (_tokens.length == 0) revert ErrEmptyArray(); - _setMinimumThresholds(_tokens, _thresholds); + function setMinimumThresholds(address[] calldata mainchainTokens_, uint256[] calldata thresholds_) external virtual onlyProxyAdmin { + if (mainchainTokens_.length == 0) revert ErrEmptyArray(); + _setMinimumThresholds(mainchainTokens_, thresholds_); } /** @@ -44,17 +44,13 @@ abstract contract MinimumWithdrawal is HasProxyAdmin { * Emits the `MinimumThresholdsUpdated` event. * */ - function _setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual { - if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig); + function _setMinimumThresholds(address[] calldata mainchainTokens_, uint256[] calldata thresholds_) internal virtual { + if (mainchainTokens_.length != thresholds_.length) revert ErrLengthMismatch(msg.sig); - for (uint256 _i; _i < _tokens.length;) { - minimumThreshold[_tokens[_i]] = _thresholds[_i]; - - unchecked { - ++_i; - } + for (uint256 i; i < mainchainTokens_.length; ++i) { + minimumThreshold[mainchainTokens_[i]] = thresholds_[i]; } - emit MinimumThresholdsUpdated(_tokens, _thresholds); + emit MinimumThresholdsUpdated(mainchainTokens_, thresholds_); } /** diff --git a/src/interfaces/IRoninGatewayV3.sol b/src/interfaces/IRoninGatewayV3.sol index c9d8d573..2c0bad9f 100644 --- a/src/interfaces/IRoninGatewayV3.sol +++ b/src/interfaces/IRoninGatewayV3.sol @@ -30,6 +30,8 @@ interface IRoninGatewayV3 is MappedTokenConsumer { event WithdrawalSignaturesRequested(bytes32 receiptHash, Transfer.Receipt); /// @dev Emitted when the tokens are mapped event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, TokenStandard[] standards); + /// @dev Emitted when the tokens are unmapped + event TokenUnmapped(address[] roninTokens, uint256[] chainIds); /// @dev Emitted when the threshold is updated event TrustedThresholdUpdated( uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator @@ -140,6 +142,22 @@ interface IRoninGatewayV3 is MappedTokenConsumer { TokenStandard[] calldata _standards ) external; + /** + * @dev Maps Ronin tokens to mainchain networks with minimum withdrawal thresholds. + */ + function mapTokensWithMinThresholds( + address[] calldata roninTokens_, + address[] calldata mainchainTokens_, + uint256[] calldata chainIds_, + TokenStandard[] calldata standards_, + uint256[] calldata minimumThresholds_ + ) external; + + /** + * @dev Unmaps Ronin tokens and clears the minimum withdrawal thresholds. + */ + function unmapTokens(address[] calldata roninTokens_, uint256[] calldata chainIds_) external; + /** * @dev Returns whether the deposit is casted by the voter. */ diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index e4bdf31f..a1c2f5a6 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -277,6 +277,34 @@ contract RoninGatewayV3 is _mapTokens(_roninTokens, _mainchainTokens, _chainIds, _standards); } + /** + * @inheritdoc IRoninGatewayV3 + */ + function mapTokensWithMinThresholds( + address[] calldata roninTokens_, + address[] calldata mainchainTokens_, + uint256[] calldata chainIds_, + TokenStandard[] calldata standards_, + uint256[] calldata minimumThresholds_ + ) external onlyProxyAdmin { + if (roninTokens_.length == 0) { + revert ErrLengthMismatch(msg.sig); + } + + _mapTokens(roninTokens_, mainchainTokens_, chainIds_, standards_); + _setMinimumThresholds(roninTokens_, minimumThresholds_); + } + + /** + * @inheritdoc IRoninGatewayV3 + */ + function unmapTokens(address[] calldata roninTokens_, uint256[] calldata chainIds_) external onlyProxyAdmin { + uint length = roninTokens_.length; + if (length == 0 || length != chainIds_.length) revert ErrLengthMismatch(msg.sig); + + _unmapTokensAndMinWithdrawals(roninTokens_, chainIds_); + } + /** * @inheritdoc IRoninGatewayV3 */ @@ -321,7 +349,8 @@ contract RoninGatewayV3 is uint256[] calldata _chainIds, TokenStandard[] calldata _standards ) internal { - if (!(_roninTokens.length == _mainchainTokens.length && _roninTokens.length == _chainIds.length)) { + uint length = _roninTokens.length; + if (!(length == _mainchainTokens.length && length == _chainIds.length && length == _standards.length)) { revert ErrLengthMismatch(msg.sig); } @@ -337,6 +366,20 @@ contract RoninGatewayV3 is emit TokenMapped(_roninTokens, _mainchainTokens, _chainIds, _standards); } + /** + * @dev Unmaps tokens and minimum withdrawals by removing mapping (roninToken => chainId => mainchainToken) and minimumThreshold. + * + * Emits the `TokenUnmapped` event. + */ + function _unmapTokensAndMinWithdrawals(address[] calldata roninTokens_, uint256[] calldata chainIds_) internal { + for (uint i; i < roninTokens_.length; ++i) { + delete _mainchainToken[roninTokens_[i]][chainIds_[i]]; + delete minimumThreshold[roninTokens_[i]]; + } + + emit TokenUnmapped(roninTokens_, chainIds_); + } + /** * @dev Deposits based on the receipt. * From c58bd39a9bfff2e534262ec42b5242c4c3b5ea04 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 5 Aug 2024 18:03:13 +0700 Subject: [PATCH 293/305] fix: cache iterator --- src/ronin/gateway/RoninGatewayV3.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index a1c2f5a6..0c8939d6 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -372,7 +372,8 @@ contract RoninGatewayV3 is * Emits the `TokenUnmapped` event. */ function _unmapTokensAndMinWithdrawals(address[] calldata roninTokens_, uint256[] calldata chainIds_) internal { - for (uint i; i < roninTokens_.length; ++i) { + uint length = roninTokens_.length; + for (uint i; i < length; ++i) { delete _mainchainToken[roninTokens_[i]][chainIds_[i]]; delete minimumThreshold[roninTokens_[i]]; } From 35e2aebb34e355f08d8a3b34c5640fd9db886b21 Mon Sep 17 00:00:00 2001 From: Bao Date: Mon, 5 Aug 2024 18:07:00 +0700 Subject: [PATCH 294/305] fix param of setMinThresholds Co-authored-by: tu-do.ron Signed-off-by: Bao --- src/ronin/gateway/RoninGatewayV3.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 0c8939d6..2355f5da 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -292,7 +292,7 @@ contract RoninGatewayV3 is } _mapTokens(roninTokens_, mainchainTokens_, chainIds_, standards_); - _setMinimumThresholds(roninTokens_, minimumThresholds_); + _setMinimumThresholds(mainchainTokens_, minimumThresholds_); } /** From d802a49ae6e6d0adc8d77b03c14cee572f508479 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Mon, 5 Aug 2024 18:17:30 +0700 Subject: [PATCH 295/305] fix: delete minimumThresholds --- src/ronin/gateway/RoninGatewayV3.sol | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ronin/gateway/RoninGatewayV3.sol b/src/ronin/gateway/RoninGatewayV3.sol index 2355f5da..4cf0229d 100644 --- a/src/ronin/gateway/RoninGatewayV3.sol +++ b/src/ronin/gateway/RoninGatewayV3.sol @@ -374,8 +374,11 @@ contract RoninGatewayV3 is function _unmapTokensAndMinWithdrawals(address[] calldata roninTokens_, uint256[] calldata chainIds_) internal { uint length = roninTokens_.length; for (uint i; i < length; ++i) { - delete _mainchainToken[roninTokens_[i]][chainIds_[i]]; - delete minimumThreshold[roninTokens_[i]]; + MappedToken storage $_iToken = _mainchainToken[roninTokens_[i]][chainIds_[i]]; + + delete minimumThreshold[$_iToken.tokenAddr]; + delete $_iToken.erc; + delete $_iToken.tokenAddr; } emit TokenUnmapped(roninTokens_, chainIds_); From 0e8f8e41e8a4b2b5cf08a404ac688b5f3602aa47 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 6 Aug 2024 01:22:59 +0700 Subject: [PATCH 296/305] script: add actual relay simulation --- .../20240805-hotfix-v3.2.2-mainchain.s.sol | 171 ++++++++++++------ 1 file changed, 120 insertions(+), 51 deletions(-) diff --git a/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-v3.2.2-mainchain.s.sol b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-v3.2.2-mainchain.s.sol index 773a8a8e..7bd6ebef 100644 --- a/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-v3.2.2-mainchain.s.sol +++ b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-v3.2.2-mainchain.s.sol @@ -31,67 +31,63 @@ import { cheatBroadcast } from "@fdk/utils/Helpers.sol"; import { Migration__MapToken_WBTC_Threshold } from "../20240716-upgrade-v3.2.0-mainnet/wbtc-threshold.s.sol"; +struct LegacyProposalDetail { + uint256 nonce; + uint256 chainId; + uint256 expiryTimestamp; + address[] targets; + uint256[] values; + bytes[] calldatas; + uint256[] gasAmounts; +} + contract Migration__20240805_Hotfix_V3_2_0__Mainchain is Migration__MapToken_WBTC_Threshold, Migration { using StdStyle for *; ISharedArgument.SharedParameter _param; - address _multisigEth = 0x51F6696Ae42C6C40CA9F5955EcA2aaaB1Cefb26e; + address private _multisigEth = 0x51F6696Ae42C6C40CA9F5955EcA2aaaB1Cefb26e; + IMainchainBridgeManager private mainchainBM ; + TransparentUpgradeableProxyV2 private mainchainBMproxy; + + IMainchainGatewayV3 private mainchainGW; function setUp() public virtual override { super.setUp(); vm.label(_multisigEth, "ETH Multisig"); + + mainchainBM = IMainchainBridgeManager(0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB); + mainchainBMproxy = TransparentUpgradeableProxyV2(payable(address(mainchainBM))); + mainchainGW = IMainchainGatewayV3(0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08); } function run() public virtual onlyOn(Network.EthMainnet.key()) { - IMainchainBridgeManager mainchainBM = IMainchainBridgeManager(0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB); vm.prank(_multisigEth); - TransparentUpgradeableProxyV2 mainchainBMproxy = TransparentUpgradeableProxyV2(payable(address(mainchainBM))); address prevBMLogic = mainchainBMproxy.implementation(); address newBMLogic = _deployLogic(Contract.MainchainBridgeManager.key()); // 0. Prank relay running proposal { - bytes32 adminSlot_$ = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; - bytes32 adminValue = bytes32(uint256(uint160(_multisigEth))); - vm.store(address(mainchainBMproxy), adminSlot_$, adminValue); - - address mainchainGW = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; - adminValue = bytes32(uint256(uint160(address(mainchainBMproxy)))); - vm.store(address(mainchainGW), adminSlot_$, adminValue); - - // Prank that Mainchain gateway is upgraded - bytes32 implSlot_$ = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - bytes32 implValue = bytes32(uint256(uint160(0xfc274EC92bBb1A1472884558d1B5CaaC6F8220Ee))); - vm.store(address(mainchainGW), implSlot_$, implValue); + // bytes32 adminSlot_$ = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + // bytes32 adminValue = bytes32(uint256(uint160(_multisigEth))); + // vm.store(address(mainchainBMproxy), adminSlot_$, adminValue); + + // adminValue = bytes32(uint256(uint160(address(mainchainBMproxy)))); + // vm.store(address(mainchainGW), adminSlot_$, adminValue); + + // // Prank that Mainchain gateway is upgraded + // bytes32 implSlot_$ = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + // bytes32 implValue = bytes32(uint256(uint160(0xfc274EC92bBb1A1472884558d1B5CaaC6F8220Ee))); + // vm.store(address(mainchainGW), implSlot_$, implValue); + + _scr_relayProposal(); } // 1. Upgrade to and call { - address[] memory mainchainTokens = new address[](1); - address[] memory roninTokens = new address[](1); - TokenStandard[] memory standards = new TokenStandard[](1); - uint256[][4] memory thresholds; - - mainchainTokens[0] = _wbtcMainchainToken; - roninTokens[0] = _wbtcRoninToken; - standards[0] = TokenStandard.ERC20; - // highTierThreshold - thresholds[0] = new uint256[](1); - thresholds[0][0] = _wbtcHighTierThreshold; - // lockedThreshold - thresholds[1] = new uint256[](1); - thresholds[1][0] = _wbtcLockedThreshold; - // unlockFeePercentages - thresholds[2] = new uint256[](1); - thresholds[2][0] = _wbtcUnlockFeePercentages; - // dailyWithdrawalLimit - thresholds[3] = new uint256[](1); - thresholds[3][0] = _wbtcDailyWithdrawalLimit; - cheatBroadcast({ from: _multisigEth, to: address(mainchainBMproxy), @@ -102,21 +98,6 @@ contract Migration__20240805_Hotfix_V3_2_0__Mainchain is Migration__MapToken_WBT abi.encodeWithSignature("hotfix__mapTokensAndThresholds_registerCallbacks()") ) }); - // mainchainBMproxy.upgradeToAndCall( - // newBMLogic, abi.encodeWithSignature( - // // function expose_mapTokensAndThresholds( - // // address[] calldata mainchainTokens, - // // address[] calldata roninTokens, - // // TokenStandard[] calldata standards, - // // uint256[][4] calldata thresholds - // // ) - // "expose_mapTokensAndThresholds(address[],address[],uint8[],uint256[][4])", - // mainchainTokens, - // roninTokens, - // standards, - // thresholds - // ) - // ); vm.startPrank(address(_multisigEth)); assertTrue(mainchainBMproxy.implementation() == newBMLogic, "Mainchain BM Logic"); @@ -133,6 +114,9 @@ contract Migration__20240805_Hotfix_V3_2_0__Mainchain is Migration__MapToken_WBT prevBMLogic ) }); + + address mappedWBTC = mainchainGW.getRoninToken(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599).tokenAddr; + assertTrue(mappedWBTC == 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e); } function _postCheck() internal virtual override { @@ -140,4 +124,89 @@ contract Migration__20240805_Hotfix_V3_2_0__Mainchain is Migration__MapToken_WBT super._postCheck(); } + + function _scr_relayProposal() private { + // Function:castProposalBySignatures((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[]) + // Arguments: + // [0]-[proposal]: { + // 5 + // 1 + // 66ba3f8f + // [64192819ac13ef72bf6b5ae239ac672b43a9af08 64192819ac13ef72bf6b5ae239ac672b43a9af08 64192819ac13ef72bf6b5ae239ac672b43a9af08 64192819ac13ef72bf6b5ae239ac672b43a9af08 2cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb 2cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb] + // [0 0 0 0 0 0] + // [ + // 4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c13948b5325c11279f5b6cba67957581d374e0f000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000ebec21ee1da400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001d7d843dc3b4800000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000246ddf9797668000000000000000000000000000000000000000000000000000000000000 + // 4f1ef286000000000000000000000000fc274ec92bbb1a1472884558d1b5caac6f8220ee00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024110a83080000000000000000000000008048b12511d9be6e4e094089b12f54923c4e2f8300000000000000000000000000000000000000000000000000000000 + // 4bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb00000000000000000000000000000000000000000000000000000000 + // 8f2839700000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb + // 4bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da81210000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000000000000000000000000000000000000 + // 8f2839700000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb + // ] + // [f4240 f4240 f4240 f4240 f4240 f4240]} + // [1]-[supports_]: [0] + // [2]-[signatures]: [{1c b3db5c516d49ae175ee549edb55f5c53252bf6e8e7656177034fab7bbad3e9d2 6eee60a229d05d27fb0262c84292726d90875aa8bf237513d5738273e8ff5320}] + + LegacyProposalDetail memory proposal; + proposal.nonce = 5; + proposal.chainId = 1; + proposal.expiryTimestamp = 1723481999; + proposal.targets = new address[](6); + proposal.values = new uint256[](6); + proposal.gasAmounts = new uint256[](6); + proposal.calldatas = new bytes[](6); + + proposal.targets[0] = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; + proposal.targets[1] = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; + proposal.targets[2] = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; + proposal.targets[3] = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; + proposal.targets[4] = 0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB; + proposal.targets[5] = 0x2Cf3CFb17774Ce0CFa34bB3f3761904e7fc3FaDB; + + proposal.gasAmounts[0] = 1000000; + proposal.gasAmounts[1] = 1000000; + proposal.gasAmounts[2] = 1000000; + proposal.gasAmounts[3] = 1000000; + proposal.gasAmounts[4] = 1000000; + proposal.gasAmounts[5] = 1000000; + + proposal.calldatas[0] = hex"4bb5274a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002c4dff525e1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c13948b5325c11279f5b6cba67957581d374e0f000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000ebec21ee1da400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001d7d843dc3b4800000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000246ddf9797668000000000000000000000000000000000000000000000000000000000000"; + proposal.calldatas[1] = hex"4f1ef286000000000000000000000000fc274ec92bbb1a1472884558d1b5caac6f8220ee00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024110a83080000000000000000000000008048b12511d9be6e4e094089b12f54923c4e2f8300000000000000000000000000000000000000000000000000000000"; + proposal.calldatas[2] = hex"4bb5274a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044865e6fd3000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb00000000000000000000000000000000000000000000000000000000"; + proposal.calldatas[3] = hex"8f2839700000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb"; + proposal.calldatas[4] = hex"4bb5274a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006435da81210000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000064192819ac13ef72bf6b5ae239ac672b43a9af0800000000000000000000000000000000000000000000000000000000"; + proposal.calldatas[5] = hex"8f2839700000000000000000000000002cf3cfb17774ce0cfa34bb3f3761904e7fc3fadb"; + + Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](16); + SignatureConsumer.Signature[] memory signatures = new SignatureConsumer.Signature[](16); + + // [{'v': 27, 'r': '0xec5a30c3c1635430d9660a9a2cf7336b84d2f51c0433889164a8416044d68e32', 's': '0x03d29251f59f5ddfce03dea8154e358fe67e46ba8e5792a1280ece815005c172'}, {'v': 28, 'r': '0xb0bc8158fd000f28f7bf20a8ff5d7b46081a89f80b04933dc0b4bed54322e70b', 's': '0x4d6cef6f2d1b03d3b6298d089d9201253b28e52beec1a5435857ac48af3b4ec3'}, {'v': 27, 'r': '0xec5ee17b4336c223c10bbd838e1f2ec09442187b66b7876d90d07bec524c30c5', 's': '0x50ed9c6d79d602b3059162409568b401ba4742b0159670fa4ee15110a47430b5'}, {'v': 28, 'r': '0x0361fb7dec6272b2cb8120a93bbdd54d87ec0dcce2d46451f616afa29dae1ea3', 's': '0x723d6e43e753e30fe1c27776f1ce5dd117003998aecf2218c4f48b19d765b954'}, {'v': 28, 'r': '0xb3db5c516d49ae175ee549edb55f5c53252bf6e8e7656177034fab7bbad3e9d2', 's': '0x6eee60a229d05d27fb0262c84292726d90875aa8bf237513d5738273e8ff5320'}, {'v': 27, 'r': '0xaea9fb0b20f9a5a51320193f47e9027166df7445a11f4edd05d0cff55b41e4d3', 's': '0x3ca2d1aac9e593c65d5a6e65f6d635425370ffe0a6f550e35b5088db1e07ef1b'}, {'v': 27, 'r': '0xd240cdd33a6fe0cdbb5c76912fa38893aed431ed3d2f43deb9cf7ad568e7fc1d', 's': '0x353fd1a0528ad292f59283a84b2539659f25fb97aeaa91fb0caa2d216cb8d50a'}, {'v': 28, 'r': '0xc77c7d29fd85edb0fc2bbf5fc3a9b7d73cf877d02e0e843207de02fe596d6f48', 's': '0x01ef740391138a8c4533e9d562492123e0f5745f0c7655d591d7db95090b8776'}, {'v': 27, 'r': '0xaa3a0b88f6f9445625d6f1f30ec43fc47901238acea8986f114342baadb14fbc', 's': '0x5cd8df8f6cb949be6c6e168a8b845fe0cc6e6434c57cd5067b821a942d347ed4'}, {'v': 27, 'r': '0x5002d8aa9a2c3f8c1548e4940ef75be3d52655a4d65629fa820e94702fd08b8c', 's': '0x623fe34ab5d32303779f5373d0c2130e6143b0f47e8859227aac51eacc0b58c5'}, {'v': 27, 'r': '0xb3e50b8443e04676d8bc685fa5f0fefccb7b17c7fa525089a70704825437c634', 's': '0x37f66c4341065970bb399d2fd78f887ceef8c179c55f961f3c8b8b0fab4e8c4f'}, {'v': 27, 'r': '0x0c8b1807afa1cdd638934cecd2199a0aa36048a10de94b0d8a113c0d24627056', 's': '0x53f13739df0bd41772584c6e1f7cdf3990f6b63a4aeaab45b961d4a465e3e58c'}, {'v': 27, 'r': '0x5fc87d26ab38ca059b82caa904812f8854f7519a0cfbf13ab2daaf71e437a95d', 's': '0x27faee6619ca79dfb1c9f69e4a3cea953ceb63965b7f0247c821e45925e5fd92'}, {'v': 28, 'r': '0x733a772c9952a2339f4601dab945a8984e956484688a83821a3c1b1e929b4010', 's': '0x66a575c11051bd5a82a4b604c224ef717b5675c1c160c338e427b5c322551cd4'}, {'v': 27, 'r': '0x17151dfa694f530e20fcbcc10930fb52e219caf42d99c8e21405e18523c93777', 's': '0x456c4dacd19f1da62533d144c041235cae9552d8d2cf4ac19372256ad0758b0e'}, {'v': 27, 'r': '0x13aa87c8c9f3cd3d69392919c96940b0ada8eb942620ccf5f397c7fbe35ee181', 's': '0x4d4156ddb08cd148618c81659d5e0b384003cd71271139a18f84bf226ff3f01c'}] + signatures[0] = SignatureConsumer.Signature(27, 0xec5a30c3c1635430d9660a9a2cf7336b84d2f51c0433889164a8416044d68e32, 0x03d29251f59f5ddfce03dea8154e358fe67e46ba8e5792a1280ece815005c172); + signatures[1] = SignatureConsumer.Signature(28, 0xb0bc8158fd000f28f7bf20a8ff5d7b46081a89f80b04933dc0b4bed54322e70b, 0x4d6cef6f2d1b03d3b6298d089d9201253b28e52beec1a5435857ac48af3b4ec3); + signatures[2] = SignatureConsumer.Signature(27, 0xec5ee17b4336c223c10bbd838e1f2ec09442187b66b7876d90d07bec524c30c5, 0x50ed9c6d79d602b3059162409568b401ba4742b0159670fa4ee15110a47430b5); + signatures[3] = SignatureConsumer.Signature(28, 0x0361fb7dec6272b2cb8120a93bbdd54d87ec0dcce2d46451f616afa29dae1ea3, 0x723d6e43e753e30fe1c27776f1ce5dd117003998aecf2218c4f48b19d765b954); + signatures[4] = SignatureConsumer.Signature(28, 0xb3db5c516d49ae175ee549edb55f5c53252bf6e8e7656177034fab7bbad3e9d2, 0x6eee60a229d05d27fb0262c84292726d90875aa8bf237513d5738273e8ff5320); + signatures[5] = SignatureConsumer.Signature(27, 0xaea9fb0b20f9a5a51320193f47e9027166df7445a11f4edd05d0cff55b41e4d3, 0x3ca2d1aac9e593c65d5a6e65f6d635425370ffe0a6f550e35b5088db1e07ef1b); + signatures[6] = SignatureConsumer.Signature(27, 0xd240cdd33a6fe0cdbb5c76912fa38893aed431ed3d2f43deb9cf7ad568e7fc1d, 0x353fd1a0528ad292f59283a84b2539659f25fb97aeaa91fb0caa2d216cb8d50a); + signatures[7] = SignatureConsumer.Signature(28, 0xc77c7d29fd85edb0fc2bbf5fc3a9b7d73cf877d02e0e843207de02fe596d6f48, 0x01ef740391138a8c4533e9d562492123e0f5745f0c7655d591d7db95090b8776); + signatures[8] = SignatureConsumer.Signature(27, 0xaa3a0b88f6f9445625d6f1f30ec43fc47901238acea8986f114342baadb14fbc, 0x5cd8df8f6cb949be6c6e168a8b845fe0cc6e6434c57cd5067b821a942d347ed4); + signatures[9] = SignatureConsumer.Signature(27, 0x5002d8aa9a2c3f8c1548e4940ef75be3d52655a4d65629fa820e94702fd08b8c, 0x623fe34ab5d32303779f5373d0c2130e6143b0f47e8859227aac51eacc0b58c5); + signatures[10] = SignatureConsumer.Signature(27, 0xb3e50b8443e04676d8bc685fa5f0fefccb7b17c7fa525089a70704825437c634, 0x37f66c4341065970bb399d2fd78f887ceef8c179c55f961f3c8b8b0fab4e8c4f); + signatures[11] = SignatureConsumer.Signature(27, 0x0c8b1807afa1cdd638934cecd2199a0aa36048a10de94b0d8a113c0d24627056, 0x53f13739df0bd41772584c6e1f7cdf3990f6b63a4aeaab45b961d4a465e3e58c); + signatures[12] = SignatureConsumer.Signature(27, 0x5fc87d26ab38ca059b82caa904812f8854f7519a0cfbf13ab2daaf71e437a95d, 0x27faee6619ca79dfb1c9f69e4a3cea953ceb63965b7f0247c821e45925e5fd92); + signatures[13] = SignatureConsumer.Signature(28, 0x733a772c9952a2339f4601dab945a8984e956484688a83821a3c1b1e929b4010, 0x66a575c11051bd5a82a4b604c224ef717b5675c1c160c338e427b5c322551cd4); + signatures[14] = SignatureConsumer.Signature(27, 0x17151dfa694f530e20fcbcc10930fb52e219caf42d99c8e21405e18523c93777, 0x456c4dacd19f1da62533d144c041235cae9552d8d2cf4ac19372256ad0758b0e); + signatures[15] = SignatureConsumer.Signature(27, 0x13aa87c8c9f3cd3d69392919c96940b0ada8eb942620ccf5f397c7fbe35ee181, 0x4d4156ddb08cd148618c81659d5e0b384003cd71271139a18f84bf226ff3f01c); + + + IMainchainBridgeManager oldMainchainBM = IMainchainBridgeManager(0xa71456fA88a5f6a4696D0446E690Db4a5913fab0); + vm.prank(0xe880802580a1fbdeF67ACe39D1B21c5b2C74f059); + address(oldMainchainBM).call{ gas: 6000000 }( + abi.encodeWithSignature( + "relayProposal((uint256,uint256,uint256,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])", + proposal, + supports_, + signatures + ) + ); + } } From 223057f53e428260ee13c6d0031adb532bc0500d Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 6 Aug 2024 11:05:30 +0700 Subject: [PATCH 297/305] script: unmap token --- ...20240805-hotfix-ronin-bridge-manager.s.sol | 10 +++++++++ src/ronin/gateway/RoninBridgeManager.sol | 21 ++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol index a62bfb7b..e4a4c51a 100644 --- a/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol +++ b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol @@ -8,6 +8,8 @@ import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { cheatBroadcast } from "@fdk/utils/Helpers.sol"; import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeManager.sol"; import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; +import "@ronin/contracts/utils/CommonErrors.sol"; contract Migration__20240805_HotFix_RoninBridgeManager is Migration { using LibProxy for *; @@ -43,5 +45,13 @@ contract Migration__20240805_HotFix_RoninBridgeManager is Migration { ); cheatBroadcast(proxyAdmin, roninBM, 0, abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (prevImpl))); + + address finalizedWBTC = 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e; + address mappedWBTC = IRoninGatewayV3(roninGW).getMainchainToken(finalizedWBTC, 1).tokenAddr; + assertTrue(mappedWBTC == 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); + + address deprecatedWBTC = 0xC13948b5325c11279F5B6cBA67957581d374E0F0; + vm.expectRevert(abi.encodeWithSelector(ErrUnsupportedToken.selector)); + mappedWBTC = IRoninGatewayV3(roninGW).getMainchainToken(deprecatedWBTC, 1).tokenAddr; } } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 5d043e1c..1aa3b76a 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -27,20 +27,26 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan function hotfix__mapToken_setMinimumThresholds_registerCallbacks() external onlyProxyAdmin { require(block.chainid == 2020, "Only on ronin-mainnet"); - address[] memory roninTokens = new address[](1); - address[] memory mainchainTokens = new address[](1); - uint256[] memory chainIds = new uint256[](1); + address[] memory roninTokens = new address[](2); + address[] memory mainchainTokens = new address[](2); + uint256[] memory chainIds = new uint256[](2); + TokenStandard[] memory standards = new TokenStandard[](2); + uint256[] memory withdrawalThresholds = new uint256[](2); + address[] memory callbacks = new address[](1); - TokenStandard[] memory standards = new TokenStandard[](1); - uint256[] memory withdrawalThresholds = new uint256[](1); roninTokens[0] = 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e; mainchainTokens[0] = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; chainIds[0] = 1; - callbacks[0] = 0x273cdA3AFE17eB7BcB028b058382A9010ae82B24; // Bridge Slash contract standards[0] = TokenStandard.ERC20; withdrawalThresholds[0] = 0.000167 * 10 ** 8; + roninTokens[1] = 0xC13948b5325c11279F5B6cBA67957581d374E0F0; + mainchainTokens[1] = address(0); + chainIds[1] = 1; + standards[1] = TokenStandard(0); + withdrawalThresholds[1] = 0; + address gw = 0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df; (bool success,) = gw.call( @@ -51,7 +57,8 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (mainchainTokens, withdrawalThresholds))) ); require(success, "Set minimum withdrawal failed"); - + + callbacks[0] = 0x273cdA3AFE17eB7BcB028b058382A9010ae82B24; // Bridge Slash contract _registerCallbacks(callbacks); } From aed42ed48005f0d4ba10dd40215cb8b7afc246b0 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 6 Aug 2024 11:14:35 +0700 Subject: [PATCH 298/305] fix(RoninBridgeManager): reduce code size for hotfix contract --- src/ronin/gateway/RoninBridgeManager.sol | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 1aa3b76a..81cef50a 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -211,19 +211,12 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan /** * @dev See {CoreGovernance-_executeWithCaller}. */ - function execute(Proposal.ProposalDetail calldata proposal) external { - _executeWithCaller(proposal, msg.sender); - } + function execute(Proposal.ProposalDetail calldata proposal) external { } /** * @dev See {GlobalCoreGovernance-_executeWithCaller}. */ - function executeGlobal(GlobalProposal.GlobalProposalDetail calldata globalProposal) external { - _executeWithCaller({ - proposal: globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })), - caller: msg.sender - }); - } + function executeGlobal(GlobalProposal.GlobalProposalDetail calldata globalProposal) external { } /** * @dev Internal function to get the chain type of the contract. From 72433aaa4053b406259f5e8cdf1b78856656097e Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 6 Aug 2024 11:57:24 +0700 Subject: [PATCH 299/305] script: unmap token by `unmap` method --- ...20240805-hotfix-ronin-bridge-manager.s.sol | 11 ++++- src/ronin/gateway/RoninBridgeManager.sol | 42 +++++++++++-------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol index e4a4c51a..42d18784 100644 --- a/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol +++ b/script/20240805-upgrade-v3.2.2-fix-mainnet/20240805-hotfix-ronin-bridge-manager.s.sol @@ -10,6 +10,7 @@ import { RoninBridgeManager } from "@ronin/contracts/ronin/gateway/RoninBridgeMa import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import { IRoninGatewayV3 } from "@ronin/contracts/interfaces/IRoninGatewayV3.sol"; import "@ronin/contracts/utils/CommonErrors.sol"; +import { MinimumWithdrawal } from "@ronin/contracts/extensions/MinimumWithdrawal.sol"; contract Migration__20240805_HotFix_RoninBridgeManager is Migration { using LibProxy for *; @@ -19,6 +20,9 @@ contract Migration__20240805_HotFix_RoninBridgeManager is Migration { address proxyAdmin = roninBM.getProxyAdmin(); address bridgeSlash = loadContract(Contract.BridgeSlash.key()); address roninGW = loadContract(Contract.RoninGatewayV3.key()); + + address newRoninGWImpl = _deployLogic(Contract.RoninGatewayV3.key()); + // Cheat set admin slot to current bm vm.store(roninGW, LibProxy.ADMIN_SLOT, bytes32(uint256(uint160(roninBM)))); // Cheat set impl slot to new bridge slash logic @@ -40,18 +44,21 @@ contract Migration__20240805_HotFix_RoninBridgeManager is Migration { 0, abi.encodeCall( TransparentUpgradeableProxy.upgradeToAndCall, - (hotfixImpl, abi.encodeCall(RoninBridgeManager.hotfix__mapToken_setMinimumThresholds_registerCallbacks, ())) + (hotfixImpl, abi.encodeCall(RoninBridgeManager.hotfix__mapToken_setMinimumThresholds_registerCallbacks, (newRoninGWImpl))) ) ); cheatBroadcast(proxyAdmin, roninBM, 0, abi.encodeCall(TransparentUpgradeableProxy.upgradeTo, (prevImpl))); + address mainchainWBTC = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; address finalizedWBTC = 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e; address mappedWBTC = IRoninGatewayV3(roninGW).getMainchainToken(finalizedWBTC, 1).tokenAddr; - assertTrue(mappedWBTC == 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); + assertTrue(mappedWBTC == mainchainWBTC); + assertTrue(MinimumWithdrawal(roninGW).minimumThreshold(mainchainWBTC) == 16700); address deprecatedWBTC = 0xC13948b5325c11279F5B6cBA67957581d374E0F0; vm.expectRevert(abi.encodeWithSelector(ErrUnsupportedToken.selector)); mappedWBTC = IRoninGatewayV3(roninGW).getMainchainToken(deprecatedWBTC, 1).tokenAddr; + // assertTrue(MinimumWithdrawal(roninGW).minimumThreshold(mainchainWBTC) == 0); } } diff --git a/src/ronin/gateway/RoninBridgeManager.sol b/src/ronin/gateway/RoninBridgeManager.sol index 81cef50a..9b157409 100644 --- a/src/ronin/gateway/RoninBridgeManager.sol +++ b/src/ronin/gateway/RoninBridgeManager.sol @@ -24,16 +24,28 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan using Proposal for Proposal.ProposalDetail; using GlobalProposal for GlobalProposal.GlobalProposalDetail; - function hotfix__mapToken_setMinimumThresholds_registerCallbacks() external onlyProxyAdmin { + function hotfix__mapToken_setMinimumThresholds_registerCallbacks(address newGwImpl) external onlyProxyAdmin { require(block.chainid == 2020, "Only on ronin-mainnet"); - address[] memory roninTokens = new address[](2); - address[] memory mainchainTokens = new address[](2); - uint256[] memory chainIds = new uint256[](2); - TokenStandard[] memory standards = new TokenStandard[](2); - uint256[] memory withdrawalThresholds = new uint256[](2); + address gw = 0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df; - address[] memory callbacks = new address[](1); + (bool success,) = gw.call(abi.encodeWithSignature("upgradeTo(address)", newGwImpl)); + require(success, "C0"); + + address[] memory unmapRoninTokens = new address[](1); + uint256[] memory unmapChainIds = new uint256[](1); + unmapRoninTokens[0] = 0xC13948b5325c11279F5B6cBA67957581d374E0F0; + unmapChainIds[0] = 1; + (success,) = gw.call( + abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(IRoninGatewayV3.unmapTokens, (unmapRoninTokens, unmapChainIds))) + ); + require(success, "C3"); + + address[] memory roninTokens = new address[](1); + address[] memory mainchainTokens = new address[](1); + uint256[] memory chainIds = new uint256[](1); + TokenStandard[] memory standards = new TokenStandard[](1); + uint256[] memory withdrawalThresholds = new uint256[](1); roninTokens[0] = 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e; mainchainTokens[0] = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; @@ -41,23 +53,17 @@ contract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernan standards[0] = TokenStandard.ERC20; withdrawalThresholds[0] = 0.000167 * 10 ** 8; - roninTokens[1] = 0xC13948b5325c11279F5B6cBA67957581d374E0F0; - mainchainTokens[1] = address(0); - chainIds[1] = 1; - standards[1] = TokenStandard(0); - withdrawalThresholds[1] = 0; - - address gw = 0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df; - - (bool success,) = gw.call( + (success,) = gw.call( abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards))) ); - require(success, "Map tokens failed"); + require(success, "C1"); + (success,) = gw.call( abi.encodeWithSignature("functionDelegateCall(bytes)", abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (mainchainTokens, withdrawalThresholds))) ); - require(success, "Set minimum withdrawal failed"); + require(success, "C2"); + address[] memory callbacks = new address[](1); callbacks[0] = 0x273cdA3AFE17eB7BcB028b058382A9010ae82B24; // Bridge Slash contract _registerCallbacks(callbacks); } From 03b6d17a4775613989d30ac41680e0010cc18a0b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 6 Aug 2024 13:33:48 +0700 Subject: [PATCH 300/305] chore: add new artifact --- .../ethereum/MainchainBridgeManagerLogic.json | 148 +++++------------- 1 file changed, 43 insertions(+), 105 deletions(-) diff --git a/deployments/ethereum/MainchainBridgeManagerLogic.json b/deployments/ethereum/MainchainBridgeManagerLogic.json index ee0e0450..ed985a84 100644 --- a/deployments/ethereum/MainchainBridgeManagerLogic.json +++ b/deployments/ethereum/MainchainBridgeManagerLogic.json @@ -1,15 +1,15 @@ { - "abi": "[{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addBridgeOperators\",\"inputs\":[{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperatorWeight\",\"inputs\":[{\"name\":\"bridgeOperator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperators\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCallbackRegisters\",\"inputs\":[],\"outputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFullBridgeOperatorInfos\",\"inputs\":[],\"outputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorOf\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeight\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeights\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernors\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorOf\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalExpiryDuration\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalProposalRelayed\",\"inputs\":[{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"roninChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bridgeContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"callbackRegisters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isBridgeOperator\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"relayGlobalProposal\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"relayProposal\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeBridgeOperators\",\"inputs\":[{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolveTargets\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"}],\"outputs\":[{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"round\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinRequiredGovernor\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sumGovernorsWeight\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"sum\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalBridgeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unregisterCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateManyTargetOption\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"vote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"againstVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"forVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BridgeOperatorAddingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorRemovingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorUpdated\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsAdded\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"indexed\":false,\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsRemoved\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallbackRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalProposalCreated\",\"inputs\":[{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"globalProposalHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"globalProposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinRequiredGovernorUpdated\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Notified\",\"inputs\":[{\"name\":\"callData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"registers\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalApproved\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalCreated\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExecuted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"successCalls\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpired\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpiryDurationChanged\",\"inputs\":[{\"name\":\"duration\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalRejected\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalVoted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"voter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"support\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TargetOptionUpdated\",\"inputs\":[{\"name\":\"targetOption\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrBelowMinRequiredGovernors\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrCurrentProposalIsNotCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrDuplicated\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrExistOneInternalCallFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"callData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotFound\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotMatch\",\"inputs\":[{\"name\":\"required\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrInsufficientGas\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidArguments\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidChainId\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidExpiryTimestamp\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidInput\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidOrder\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidProposalNonce\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidVoteWeight\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLooseProposalInternallyRevert\",\"inputs\":[{\"name\":\"callIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"revertMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrNonExecutorCannotRelay\",\"inputs\":[{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrOnlySelfCall\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOperatorNotFound\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrRelayFailed\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedVoteType\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrVoteIsFinalized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroAddress\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + "abi": "[{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addBridgeOperators\",\"inputs\":[{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperatorWeight\",\"inputs\":[{\"name\":\"bridgeOperator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperators\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCallbackRegisters\",\"inputs\":[],\"outputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFullBridgeOperatorInfos\",\"inputs\":[],\"outputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorOf\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeight\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeights\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernors\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorOf\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalExpiryDuration\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalProposalRelayed\",\"inputs\":[{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hotfix__mapTokensAndThresholds_registerCallbacks\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"roninChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bridgeContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"callbackRegisters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isBridgeOperator\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"relayGlobalProposal\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"relayProposal\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeBridgeOperators\",\"inputs\":[{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolveTargets\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"}],\"outputs\":[{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"round\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinRequiredGovernor\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sumGovernorsWeight\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"sum\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalBridgeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unregisterCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateManyTargetOption\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"vote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"againstVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"forVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BridgeOperatorAddingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorRemovingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorUpdated\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsAdded\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"indexed\":false,\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsRemoved\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallbackRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalProposalCreated\",\"inputs\":[{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"globalProposalHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"globalProposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinRequiredGovernorUpdated\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Notified\",\"inputs\":[{\"name\":\"callData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"registers\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalApproved\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalCreated\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExecuted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"successCalls\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpired\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpiryDurationChanged\",\"inputs\":[{\"name\":\"duration\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalRejected\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalVoted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"voter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"support\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TargetOptionUpdated\",\"inputs\":[{\"name\":\"targetOption\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrBelowMinRequiredGovernors\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrCurrentProposalIsNotCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrDuplicated\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrExistOneInternalCallFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"callData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotFound\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotMatch\",\"inputs\":[{\"name\":\"required\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidArguments\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidInput\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidVoteWeight\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOnlySelfCall\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOperatorNotFound\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrVoteIsFinalized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroAddress\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", "absolutePath": "MainchainBridgeManager.sol", - "address": "0x0ac26945032143f6196d4bb5Ae03592BfAf822FD", + "address": "0x3BA040BC32352E2dC21f9A85C5573E84696a74Dd", "ast": "", - "blockNumber": 20425324, - "bytecode": "\"0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61519e80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212209b8f259545122f66d7b909c338372302f448cabc8b0563521692a408e8f2a0a064736f6c63430008170033\"", + "blockNumber": 20467665, + "bytecode": "\"0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6138b580620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c80639b19dbfd11610125578063d0a50db0116100ad578063e75235b81161007c578063e75235b8146104c6578063e9c03498146104e3578063f4cc4d69146104f6578063f80b5352146104fe578063f896f0701461050657600080fd5b8063d0a50db014610485578063d78392f81461048d578063dafae408146104a0578063de981f1b146104b357600080fd5b8063b405aaf2116100f4578063b405aaf214610421578063b9c3620914610434578063bc96180b14610447578063c441c4a81461044e578063cc7e6b3b1461046557600080fd5b80639b19dbfd14610398578063a64a8380146103a0578063aee1767f146103b3578063b384abef146103c657600080fd5b80633644e515116101a85780637f7fe058116101775780637f7fe0581461030e578063800eaab314610339578063865e6fd31461034c5780638dc0dbc61461035f578063901979d51461036d57600080fd5b80633644e515146102c757806362077409146102d0578063776fb1ec146102e35780637de5dedd1461030657600080fd5b80631f425338116101e45780631f4253381461026e5780632d6d7d731461028157806334d5f37b1461029457806335da8121146102b457600080fd5b806301a5f43f1461021657806306aba0e11461022b5780630a44fa43146102465780630f7c318914610259575b600080fd5b610229610224366004612c27565b610519565b005b6102336105c8565b6040519081526020015b60405180910390f35b610233610254366004612cc0565b6105d7565b61026161065c565b60405161023d9190612d46565b61022961027c366004612cc0565b610675565b61026161028f366004612cc0565b610717565b6102336102a2366004612d59565b60026020526000908152604090205481565b6102296102c2366004612cc0565b61075e565b61023360015481565b6102296102de366004612db6565b6107a6565b6102f66102f1366004612d59565b6107af565b604051901515815260200161023d565b6102336107fc565b61032161031c366004612e69565b610852565b6040516001600160a01b03909116815260200161023d565b610229610347366004612fd0565b6108d3565b61022961035a366004613042565b61090b565b6102296102de366004613075565b61038061037b366004612e69565b610926565b6040516001600160601b03909116815260200161023d565b61026161095c565b6102296103ae366004612d59565b6109c7565b6103216103c1366004612e69565b6109db565b6104106103d43660046130b9565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023d9594939291906130f1565b6102f661042f366004612e69565b6109ed565b6102296104423660046130b9565b610a25565b6000610233565b610456610a37565b60405161023d93929190613160565b610478610473366004612cc0565b610b11565b60405161023d91906131a3565b610233610b4f565b61038061049b366004612e69565b610b62565b6102f66104ae366004612d59565b610b6d565b6103216104c13660046131b6565b610bbf565b6104ce610c3a565b6040805192835260208301919091520161023d565b6102296104f1366004612cc0565b610c82565b610229610ccb565b610261611128565b610229610514366004613246565b61118b565b61052161129e565b6105bf86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506112fa92505050565b50505050505050565b60006105d261165c565b905090565b6000828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610618925083915061166f9050565b6106548484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506116a492505050565b949350505050565b60606105d2600080516020613860833981519152611729565b61067d61129e565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106bc925083915061166f9050565b60008051602061386083398151915260005b83811015610710576107078585838181106106eb576106eb61336b565b90506020020160208101906107009190612e69565b839061173d565b506001016106ce565b5050505050565b606061075583838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611752915050565b90505b92915050565b61076661129e565b6107a28282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506118a592505050565b5050565b61071033611962565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff1660048111156107f4576107f46130db565b141592915050565b6000806108076119a4565b9050600080610814610c3a565b915091508060018285600401548561082c9190613397565b61083691906133ae565b61084091906133c1565b61084a91906133d4565b935050505090565b60008060006108686108626119a4565b856119c8565b915091508161089a5760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108a26119a4565b60010181815481106108b6576108b661336b565b6000918252602090912001546001600160a01b0316949350505050565b333014610901576000356001600160e01b0319166040516307337e1960e41b815260040161089191906133f6565b6107a28282611a2d565b61091361129e565b61091c81611ad6565b6107a28282611b0c565b6000806109316119a4565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109666119a4565b6001018054806020026020016040519081016040528092919081815260200182805480156109bd57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161099f575b5050505050905090565b6109cf61129e565b6109d881611bb0565b50565b60006109e682611c1d565b5092915050565b6000806109f86119a4565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a2d61129e565b6107a28282611c9d565b60608060606000610a466119a4565b805460408051602080840282018101909252828152929350839190830182828015610a9a57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a7c575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610af957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610adb575b50505050509250610b0984611d9f565b915050909192565b6060610755838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d9f92505050565b6000610b596119a4565b60010154919050565b600061075882611e8b565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610b9861165c565b8160010154610ba79190613397565b6002820154610bb69085613397565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bf657610bf66130db565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c35578160405163409140df60e11b8152600401610891919061340b565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610c8a61129e565b610cc6828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ec092505050565b505050565b610cd361129e565b46600114610d235760405162461bcd60e51b815260206004820152601860248201527f4f6e6c79206f6e20657468657265756d2d6d61696e6e657400000000000000006044820152606401610891565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833750506040805160018082528183019092529293506000929150602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050610db6612bbc565b732260fac5e5542a773aa44fbcfedf7c193bc2c59985600081518110610dde57610dde61336b565b60200260200101906001600160a01b031690816001600160a01b031681525050737e73630f81647bcfd7b1f2c04c1c662d17d4577e84600081518110610e2657610e2661336b565b60200260200101906001600160a01b031690816001600160a01b0316815250507364192819ac13ef72bf6b5ae239ac672b43a9af0883600081518110610e6e57610e6e61336b565b60200260200101906001600160a01b031690816001600160a01b031681525050600082600081518110610ea357610ea361336b565b60200260200101906002811115610ebc57610ebc6130db565b90816002811115610ecf57610ecf6130db565b90525060408051600180825281830190925290602080830190803683375050508082528051636553f1009190600090610f0a57610f0a61336b565b60209081029190910101526040805160018082528183019092529081602001602082028036833750505060208201819052805163caa7e2009190600090610f5357610f5361336b565b602090810291909101015260408051600180825281830190925290816020016020820280368337505050604082018190528051600a9190600090610f9957610f9961336b565b60209081029190910101526040805160018082528183019092529081602001602082028036833750505060608201819052805163fa56ea009190600090610fe257610fe261336b565b60209081029190910101526040517364192819ac13ef72bf6b5ae239ac672b43a9af0890600090829061101f908990899088908890602401613425565b60408051601f198184030181529181526020820180516001600160e01b031663dff525e160e01b179052516110579190602401613556565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161108c9190613569565b6000604051808303816000865af19150503d80600081146110c9576040519150601f19603f3d011682016040523d82523d6000602084013e6110ce565b606091505b505090508061111f5760405162461bcd60e51b815260206004820181905260248201527f4d617020746f6b656e7320616e64207468726573686f6c6473206661696c65646044820152606401610891565b6105bf856118a5565b60606111326119a4565b8054604080516020808402820181019092528281529291908301828280156109bd576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161099f575050505050905090565b600054610100900460ff16158080156111ab5750600054600160ff909116105b806111c55750303b1580156111c5575060005460ff166001145b6112285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610891565b6000805460ff19166001179055801561124b576000805461ff0019166101001790555b8015611291576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146112f8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610891929190613585565b565b606061130683836122a6565b61130f8161166f565b60006113196119a4565b84518751919250908114801561132f5750855181145b61135a576000356001600160e01b0319166040516306b5667560e21b815260040161089191906133f6565b806001600160401b0381111561137257611372612e84565b60405190808252806020026020018201604052801561139b578160200160208202803683370190505b509350806000036113ad575050611654565b60008060008060005b858110156115c0578a81815181106113d0576113d061336b565b602002602001015194508981815181106113ec576113ec61336b565b602002602001015193508b81815181106114085761140861336b565b6020026020010151925061141b856123b0565b611424846123b0565b826001600160601b031660000361145c576000356001600160e01b031916604051637f11b8a360e11b815260040161089191906133f6565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926114b49290811691166135b3565b6114be91906135b3565b6114c891906135b3565b6001600160601b03166000148982815181106114e6576114e661336b565b60200260200101901515908115158152505088818151811061150a5761150a61336b565b6020026020010151156115b8578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556115b590836133ae565b91505b6001016113b6565b50808660040160008282546115d591906133ae565b9091555050604051611610906347c28ec560e11b906115fc908c908f908d90602001613606565b6040516020818303038152906040526123e5565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c604051611645949392919061363f565b60405180910390a15050505050505b509392505050565b60006116666119a4565b60040154905090565b61167881612412565b156109d8576000356001600160e01b031916604051630d697db160e11b815260040161089191906133f6565b6000816116b08161166f565b60006116ba6119a4565b905060005b8451811015611721578160020160008683815181106116e0576116e061336b565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611717906001600160601b0316856133ae565b93506001016116bf565b505050919050565b60606000611736836124b1565b9392505050565b6000610755836001600160a01b03841661250d565b606082516001600160401b0381111561176d5761176d612e84565b604051908082528060200260200182016040528015611796578160200160208202803683370190505b50905060005b83518110156109e657600560008583815181106117bb576117bb61336b565b602002602001015160058111156117d4576117d46130db565b60058111156117e5576117e56130db565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106118195761181961336b565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611871575060006001600160a01b031682828151811061185e5761185e61336b565b60200260200101516001600160a01b0316145b1561189d576000356001600160e01b03191660405163053265f160e01b815260040161089191906133f6565b60010161179c565b806118af8161166f565b600080516020613860833981519152600080805b855181101561195a578581815181106118de576118de61336b565b602002602001015192506118f183611ad6565b611902836312c0151560e21b612600565b61190c8484612793565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016118c3565b505050505050565b61196b81611e8b565b6001600160601b03166000036109d8576000356001600160e01b0319166003604051620f948f60ea1b8152600401610891929190613585565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611a1b578481815481106119e9576119e961336b565b6000918252602090912001546001600160a01b0390811690851603611a1357600192509050611a26565b6001016119ce565b506000600019915091505b9250929050565b60005b8251811015610cc657306001600160a01b0316828281518110611a5557611a5561336b565b60200260200101516001600160a01b031603611a92576000356001600160e01b03191660405163053265f160e01b815260040161089191906133f6565b611ace838281518110611aa757611aa761336b565b6020026020010151838381518110611ac157611ac161336b565b60200260200101516127a8565b600101611a30565b806001600160a01b03163b6000036109d857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610891565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611b4257611b426130db565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b8357611b836130db565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611bd2576040516305f4dee960e31b815260040160405180910390fd5b6000611bdc6119a4565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611c37611c2e6119a4565b600101866119c8565b9150915081611c64576040516326527e1760e01b81526001600160a01b0386166004820152602401610891565b611c6c6119a4565b805482908110611c7e57611c7e61336b565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611cac575060018111155b15611cd8576000356001600160e01b0319166040516387f6f09560e01b815260040161089191906133f6565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611d5b83613697565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611dab6119a4565b905082516001600160401b03811115611dc657611dc6612e84565b604051908082528060200260200182016040528015611def578160200160208202803683370190505b50915060005b8351811015611e8457816002016000858381518110611e1657611e1661336b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611e6457611e6461336b565b6001600160601b0390921660209283029190910190910152600101611df5565b5050919050565b6000611e956119a4565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611ecc8161166f565b6000611ed66119a4565b8451909150806001600160401b03811115611ef357611ef3612e84565b604051908082528060200260200182016040528015611f1c578160200160208202803683370190505b50935080600003611f2e5750506122a0565b60058201548254611f409083906133c1565b1015611f5f5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561222657898181518110611f8257611f8261336b565b60200260200101519350611f9584611c1d565b9095509150611fa3856123b0565b611fac846123b0565b6001600160a01b03851660009081526002880160205260409020546001600160601b03161580159061200057506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b8982815181106120125761201261336b565b6020026020010190151590811515815250508881815181106120365761203661336b565b60200260200101511561221e576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612079906001906133c1565b90508860000181815481106120905761209061336b565b60009182526020909120015489546001600160a01b03909116908a90869081106120bc576120bc61336b565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120f6576120f66136b0565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106121565761215661336b565b60009182526020909120015460018a0180546001600160a01b0390921691869081106121845761218461336b565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121c5576121c56136b0565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b031916905561221982866133ae565b945050505b600101611f68565b508186600401600082825461223b91906133c1565b909155505060405161226090636242a4ef60e11b906115fc908c908c906020016136c6565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516122919291906136f4565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122c8576122c8612e84565b6040519080825280602002602001820160405280156122f1578160200160208202803683370190505b50925060005b8281101561234b578581815181106123115761231161336b565b602002602001015184828151811061232b5761232b61336b565b6001600160a01b03909216602092830291909101909101526001016122f7565b60005b828110156123a6578581815181106123685761236861336b565b60200260200101518583815181106123825761238261336b565b6001600160a01b03909216602092830291909101909101526001918201910161234e565b5050505092915050565b6001600160a01b0381166109d8576000356001600160e01b03191660405163104c66df60e31b815260040161089191906133f6565b6123ef828261283b565b6107a2573382826040516319b5fdcb60e31b815260040161089193929190613719565b6000815160000361242557506000919050565b60005b60018351038110156124a857600181015b835181101561249f578381815181106124545761245461336b565b60200260200101516001600160a01b03168483815181106124775761247761336b565b60200260200101516001600160a01b031603612497575060019392505050565b600101612439565b50600101612428565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561250157602002820191906000526020600020905b8154815260200190600101908083116124ed575b50505050509050919050565b600081815260018301602052604081205480156125f65760006125316001836133c1565b8554909150600090612545906001906133c1565b90508181146125aa5760008660000182815481106125655761256561336b565b90600052602060002001549050808760000184815481106125885761258861336b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125bb576125bb6136b0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610758565b6000915050610758565b60008160405160240161261391906133f6565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169061265c908590613569565b600060405180830381855afa9150503d8060008114612697576040519150601f19603f3d011682016040523d82523d6000602084013e61269c565b606091505b50915091508161275e57846001600160a01b0316836040516024016126c19190613556565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516126f69190613569565b600060405180830381855afa9150503d8060008114612731576040519150601f19603f3d011682016040523d82523d6000602084013e612736565b606091505b5090925090508161275e57838560405163069d427960e11b815260040161089192919061374d565b808060200190518101906127729190613770565b61071057838560405163069d427960e11b815260040161089192919061374d565b6000610755836001600160a01b038416612b6d565b80600560008460058111156127bf576127bf6130db565b60058111156127d0576127d06130db565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561280e5761280e6130db565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60016000612856600080516020613860833981519152611729565b8051909150600081900361286b575050610758565b6000816001600160401b0381111561288557612885612e84565b6040519080825280602002602001820160405280156128ae578160200160208202803683370190505b5090506000826001600160401b038111156128cb576128cb612e84565b6040519080825280602002602001820160405280156128fe57816020015b60608152602001906001900390816128e95790505b50905060008787604051602001612916929190613792565b604051602081830303815290604052905060008160405160240161293a9190613556565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612b23578681815181106129835761298361336b565b60200260200101516001600160a01b0316836040516129a29190613569565b6000604051808303816000865af19150503d80600081146129df576040519150601f19603f3d011682016040523d82523d6000602084013e6129e4565b606091505b508683815181106129f7576129f761336b565b60200260200101868481518110612a1057612a1061336b565b6020026020010182905282151515158152505050848181518110612a3657612a3661336b565b6020026020010151612b1b57868181518110612a5457612a5461336b565b60200260200101516001600160a01b031682604051612a739190613569565b6000604051808303816000865af19150503d8060008114612ab0576040519150601f19603f3d011682016040523d82523d6000602084013e612ab5565b606091505b50868381518110612ac857612ac861336b565b60200260200101868481518110612ae157612ae161336b565b6020026020010182905282151515158152505050878015612b185750848181518110612b0f57612b0f61336b565b60200260200101515b97505b600101612969565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612b5994939291906137c3565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612bb457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610758565b506000610758565b60405180608001604052806004905b6060815260200190600190039081612bcb5790505090565b60008083601f840112612bf557600080fd5b5081356001600160401b03811115612c0c57600080fd5b6020830191508360208260051b8501011115611a2657600080fd5b60008060008060008060608789031215612c4057600080fd5b86356001600160401b0380821115612c5757600080fd5b612c638a838b01612be3565b90985096506020890135915080821115612c7c57600080fd5b612c888a838b01612be3565b90965094506040890135915080821115612ca157600080fd5b50612cae89828a01612be3565b979a9699509497509295939492505050565b60008060208385031215612cd357600080fd5b82356001600160401b03811115612ce957600080fd5b612cf585828601612be3565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612d3b5781516001600160a01b031687529582019590820190600101612d16565b509495945050505050565b6020815260006107556020830184612d01565b600060208284031215612d6b57600080fd5b5035919050565b60008083601f840112612d8457600080fd5b5081356001600160401b03811115612d9b57600080fd5b602083019150836020606083028501011115611a2657600080fd5b600080600080600060608688031215612dce57600080fd5b85356001600160401b0380821115612de557600080fd5b9087019060e0828a031215612df957600080fd5b90955060208701359080821115612e0f57600080fd5b612e1b89838a01612be3565b90965094506040880135915080821115612e3457600080fd5b50612e4188828901612d72565b969995985093965092949392505050565b80356001600160a01b0381168114610c3557600080fd5b600060208284031215612e7b57600080fd5b61075582612e52565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612ec257612ec2612e84565b604052919050565b60006001600160401b03821115612ee357612ee3612e84565b5060051b60200190565b600082601f830112612efe57600080fd5b81356020612f13612f0e83612eca565b612e9a565b8083825260208201915060208460051b870101935086841115612f3557600080fd5b602086015b84811015612f5f57803560068110612f525760008081fd5b8352918301918301612f3a565b509695505050505050565b600082601f830112612f7b57600080fd5b81356020612f8b612f0e83612eca565b8083825260208201915060208460051b870101935086841115612fad57600080fd5b602086015b84811015612f5f57612fc381612e52565b8352918301918301612fb2565b60008060408385031215612fe357600080fd5b82356001600160401b0380821115612ffa57600080fd5b61300686838701612eed565b9350602085013591508082111561301c57600080fd5b5061302985828601612f6a565b9150509250929050565b803560108110610c3557600080fd5b6000806040838503121561305557600080fd5b61305e83613033565b915061306c60208401612e52565b90509250929050565b60008060008060006060868803121561308d57600080fd5b85356001600160401b03808211156130a457600080fd5b90870190610100828a031215612df957600080fd5b600080604083850312156130cc57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a0810160058710613105576131056130db565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612d3b5781516001600160601b03168752958201959082019060010161313b565b6060815260006131736060830186612d01565b82810360208401526131858186612d01565b905082810360408401526131998185613126565b9695505050505050565b6020815260006107556020830184613126565b6000602082840312156131c857600080fd5b61075582613033565b600082601f8301126131e257600080fd5b813560206131f2612f0e83612eca565b8083825260208201915060208460051b87010193508684111561321457600080fd5b602086015b84811015612f5f5780356001600160601b03811681146132395760008081fd5b8352918301918301613219565b6000806000806000806000806000806101408b8d03121561326657600080fd5b8a35995060208b0135985060408b0135975061328460608c01612e52565b965060808b01356001600160401b03808211156132a057600080fd5b6132ac8e838f01612f6a565b975060a08d01359150808211156132c257600080fd5b6132ce8e838f01612f6a565b965060c08d01359150808211156132e457600080fd5b6132f08e838f01612f6a565b955060e08d013591508082111561330657600080fd5b6133128e838f016131d1565b94506101008d013591508082111561332957600080fd5b6133358e838f01612eed565b93506101208d013591508082111561334c57600080fd5b506133598d828e01612f6a565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761075857610758613381565b8082018082111561075857610758613381565b8181038181111561075857610758613381565b6000826133f157634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b602081016010831061341f5761341f6130db565b91905290565b6080815260006134386080830187612d01565b60208382038185015261344b8288612d01565b8481036040860152865180825282880193509082019060005b818110156134905784516003811061347e5761347e6130db565b83529383019391830191600101613464565b50508481036060860152915081608081018660005b60048110156134f657838303865281518051808552908601908685019060005b818110156134e1578351835292880192918801916001016134c5565b505096860196935050908401906001016134a5565b50909a9950505050505050505050565b60005b83811015613521578181015183820152602001613509565b50506000910152565b60008151808452613542816020860160208601613506565b601f01601f19169290920160200192915050565b602081526000610755602083018461352a565b6000825161357b818460208701613506565b9190910192915050565b6001600160e01b03198316815260408101600b83106135a6576135a66130db565b8260208301529392505050565b6001600160601b038181168382160190808211156109e6576109e6613381565b60008151808452602080850194506020840160005b83811015612d3b5781511515875295820195908201906001016135e8565b6060815260006136196060830186612d01565b828103602084015261362b8186613126565b9050828103604084015261319981856135d3565b60808152600061365260808301876135d3565b82810360208401526136648187613126565b905082810360408401526136788186612d01565b9050828103606084015261368c8185612d01565b979650505050505050565b6000600182016136a9576136a9613381565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006136d96040830185612d01565b82810360208401526136eb81856135d3565b95945050505050565b60408152600061370760408301856135d3565b82810360208401526136eb8185612d01565b6001600160a01b03841681526001600160e01b0319831660208201526060604082018190526000906136eb9083018461352a565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561378257600080fd5b8151801515811461173657600080fd5b6001600160e01b03198316815281516000906137b5816004850160208701613506565b919091016004019392505050565b6080815260006137d6608083018761352a565b6020838203818501526137e98288612d01565b915083820360408501526137fd82876135d3565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561384e57601f1987840301855261383c83835161352a565b94860194925090850190600101613820565b50909b9a505050505050505050505056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a2646970667358221220ddb3d07e0bd9778e7ee67146a1a2ce8218b11d73fd07f5b259ad590c3632d90164736f6c63430008170033\"", "callValue": 0, "chainId": 1, "constructorArgs": "0x", "contractName": "MainchainBridgeManager", - "deployedBytecode": "\"0x608060405234801561001057600080fd5b50600436106102065760003560e01c80639b19dbfd1161011a578063cc7e6b3b116100ad578063de981f1b1161007c578063de981f1b146104ae578063e75235b8146104c1578063e9c03498146104de578063f80b5352146104f1578063f896f070146104f957600080fd5b8063cc7e6b3b14610460578063d0a50db014610480578063d78392f814610488578063dafae4081461049b57600080fd5b8063b405aaf2116100e9578063b405aaf21461041b578063b9c362091461042e578063bc96180b14610441578063c441c4a81461044957600080fd5b80639b19dbfd14610392578063a64a83801461039a578063aee1767f146103ad578063b384abef146103c057600080fd5b80633644e5151161019d5780637f7fe0581161016c5780637f7fe05814610303578063800eaab31461032e578063865e6fd3146103415780638dc0dbc614610354578063901979d51461036757600080fd5b80633644e515146102bc57806362077409146102c5578063776fb1ec146102d85780637de5dedd146102fb57600080fd5b80631f425338116101d95780631f425338146102635780632d6d7d731461027657806334d5f37b1461028957806335da8121146102a957600080fd5b806301a5f43f1461020b57806306aba0e1146102205780630a44fa431461023b5780630f7c31891461024e575b600080fd5b61021e610219366004613fd0565b61050c565b005b6102286105bb565b6040519081526020015b60405180910390f35b610228610249366004614069565b6105ca565b61025661064f565b60405161023291906140ef565b61021e610271366004614069565b610668565b610256610284366004614069565b61070a565b610228610297366004614102565b60026020526000908152604090205481565b61021e6102b7366004614069565b610751565b61022860015481565b61021e6102d336600461415f565b610799565b6102eb6102e6366004614102565b6107c9565b6040519015158152602001610232565b610228610816565b610316610311366004614212565b61086c565b6040516001600160a01b039091168152602001610232565b61021e61033c3660046143c4565b6108ed565b61021e61034f366004614436565b610925565b61021e610362366004614469565b610940565b61037a610375366004614212565b61096a565b6040516001600160601b039091168152602001610232565b6102566109a0565b61021e6103a8366004614102565b610a0b565b6103166103bb366004614212565b610a1f565b61040a6103ce3660046144ad565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102329594939291906144e5565b6102eb610429366004614212565b610a31565b61021e61043c3660046144ad565b610a69565b600454610228565b610451610a7b565b60405161023293929190614554565b61047361046e366004614069565b610b55565b6040516102329190614597565b610228610b93565b61037a610496366004614212565b610ba6565b6102eb6104a9366004614102565b610bb1565b6103166104bc3660046145aa565b610c03565b6104c9610c7e565b60408051928352602083019190915201610232565b61021e6104ec366004614069565b610cc6565b610256610d0f565b61021e61050736600461463a565b610d72565b610514610eac565b6105b286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610f0892505050565b50505050505050565b60006105c561126a565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061060b925083915061127d9050565b6106478484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112b292505050565b949350505050565b60606105c5600080516020615149833981519152611337565b610670610eac565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106af925083915061127d9050565b60008051602061514983398151915260005b83811015610703576106fa8585838181106106de576106de61475f565b90506020020160208101906106f39190614212565b839061134b565b506001016106c1565b5050505050565b606061074883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611360915050565b90505b92915050565b610759610eac565b6107958282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506114b392505050565b5050565b6107a233611570565b6107bb6107b56060870160408801614212565b336115b2565b61070385858585853361160d565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff16600481111561080e5761080e6144cf565b141592915050565b600080610821611641565b905060008061082e610c7e565b9150915080600182856004015485610846919061478b565b61085091906147a2565b61085a91906147b5565b61086491906147c8565b935050505090565b600080600061088261087c611641565b85611665565b91509150816108b45760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108bc611641565b60010181815481106108d0576108d061475f565b6000918252602090912001546001600160a01b0316949350505050565b33301461091b576000356001600160e01b0319166040516307337e1960e41b81526004016108ab91906147ea565b61079582826116ca565b61092d610eac565b61093681611773565b61079582826117a9565b61094933611570565b61095c6107b56080870160608801614212565b61070385858585853361184d565b600080610975611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109aa611641565b600101805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050905090565b610a13610eac565b610a1c81611881565b50565b6000610a2a826118ee565b5092915050565b600080610a3c611641565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a71610eac565b610795828261196e565b60608060606000610a8a611641565b805460408051602080840282018101909252828152929350839190830182828015610ade57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ac0575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b1f575b50505050509250610b4d84611a70565b915050909192565b6060610748838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611a7092505050565b6000610b9d611641565b60010154919050565b600061074b82611b5c565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610bdc61126a565b8160010154610beb919061478b565b6002820154610bfa908561478b565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610c3a57610c3a6144cf565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c79578160405163409140df60e11b81526004016108ab91906147ff565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610cce610eac565b610d0a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611b9192505050565b505050565b6060610d19611641565b805460408051602080840282018101909252828152929190830182828015610a01576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109e3575050505050905090565b600054610100900460ff1615808015610d925750600054600160ff909116105b80610dac5750303b158015610dac575060005460ff166001145b610e0f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108ab565b6000805460ff191660011790558015610e32576000805461ff0019166101001790555b610e3f600160ff1b611f77565b610e498383611fa7565b610e598b8b8b8b8b8b8b8b611fd8565b8015610e9f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f06576000356001600160e01b0319166001604051620f948f60ea1b81526004016108ab929190614819565b565b6060610f148383612029565b610f1d8161127d565b6000610f27611641565b845187519192509081148015610f3d5750855181145b610f68576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b806001600160401b03811115610f8057610f8061422d565b604051908082528060200260200182016040528015610fa9578160200160208202803683370190505b50935080600003610fbb575050611262565b60008060008060005b858110156111ce578a8181518110610fde57610fde61475f565b60200260200101519450898181518110610ffa57610ffa61475f565b602002602001015193508b81815181106110165761101661475f565b6020026020010151925061102985612133565b61103284612133565b826001600160601b031660000361106a576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926110c2929081169116614847565b6110cc9190614847565b6110d69190614847565b6001600160601b03166000148982815181106110f4576110f461475f565b6020026020010190151590811515815250508881815181106111185761111861475f565b6020026020010151156111c6578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556111c390836147a2565b91505b600101610fc4565b50808660040160008282546111e391906147a2565b909155505060405161121e906347c28ec560e11b9061120a908c908f908d9060200161489a565b604051602081830303815290604052612168565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c60405161125394939291906148d3565b60405180910390a15050505050505b509392505050565b6000611274611641565b60040154905090565b61128681612195565b15610a1c576000356001600160e01b031916604051630d697db160e11b81526004016108ab91906147ea565b6000816112be8161127d565b60006112c8611641565b905060005b845181101561132f578160020160008683815181106112ee576112ee61475f565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611325906001600160601b0316856147a2565b93506001016112cd565b505050919050565b6060600061134483612234565b9392505050565b6000610748836001600160a01b038416612290565b606082516001600160401b0381111561137b5761137b61422d565b6040519080825280602002602001820160405280156113a4578160200160208202803683370190505b50905060005b8351811015610a2a57600560008583815181106113c9576113c961475f565b602002602001015160058111156113e2576113e26144cf565b60058111156113f3576113f36144cf565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106114275761142761475f565b60200260200101906001600160a01b031690816001600160a01b03168152505082801561147f575060006001600160a01b031682828151811061146c5761146c61475f565b60200260200101516001600160a01b0316145b156114ab576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b6001016113aa565b806114bd8161127d565b600080516020615149833981519152600080805b8551811015611568578581815181106114ec576114ec61475f565b602002602001015192506114ff83611773565b611510836312c0151560e21b612383565b61151a8484612516565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016114d1565b505050505050565b61157981611b5c565b6001600160601b0316600003610a1c576000356001600160e01b0319166003604051620f948f60ea1b81526004016108ab929190614819565b6001600160a01b038216158015906115dc5750816001600160a01b0316816001600160a01b031614155b15610795576040516301df97c360e51b81526001600160a01b038084166004830152821660248201526044016108ab565b600061162161161b88614a6e565b8361252b565b90506105b2818787878761163c6116378e614a6e565b61263d565b61277c565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b84548110156116b8578481815481106116865761168661475f565b6000918252602090912001546001600160a01b03908116908516036116b0576001925090506116c3565b60010161166b565b506000600019915091505b9250929050565b60005b8251811015610d0a57306001600160a01b03168282815181106116f2576116f261475f565b60200260200101516001600160a01b03160361172f576000356001600160e01b03191660405163053265f160e01b81526004016108ab91906147ea565b61176b8382815181106117445761174461475f565b602002602001015183838151811061175e5761175e61475f565b6020026020010151612c48565b6001016116cd565b806001600160a01b03163b600003610a1c57604051630bfc64a360e21b81526001600160a01b03821660048201526024016108ab565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156117df576117df6144cf565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611820576118206144cf565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b61185f61185987614b49565b82612cdb565b5061156861186c87614b49565b8686868661163c61187c8d614b49565b612de2565b60038110156118a3576040516305f4dee960e31b815260040160405180910390fd5b60006118ad611641565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806119086118ff611641565b60010186611665565b9150915081611935576040516326527e1760e01b81526001600160a01b03861660048201526024016108ab565b61193d611641565b80548290811061194f5761194f61475f565b6000918252602090912001546001600160a01b03169590945092505050565b8082118061197d575060018111155b156119a9576000356001600160e01b0319166040516387f6f09560e01b81526004016108ab91906147ea565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611a2c83614c2f565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611a7c611641565b905082516001600160401b03811115611a9757611a9761422d565b604051908082528060200260200182016040528015611ac0578160200160208202803683370190505b50915060005b8351811015611b5557816002016000858381518110611ae757611ae761475f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611b3557611b3561475f565b6001600160601b0390921660209283029190910190910152600101611ac6565b5050919050565b6000611b66611641565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611b9d8161127d565b6000611ba7611641565b8451909150806001600160401b03811115611bc457611bc461422d565b604051908082528060200260200182016040528015611bed578160200160208202803683370190505b50935080600003611bff575050611f71565b60058201548254611c119083906147b5565b1015611c305760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015611ef757898181518110611c5357611c5361475f565b60200260200101519350611c66846118ee565b9095509150611c7485612133565b611c7d84612133565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590611cd157506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110611ce357611ce361475f565b602002602001019015159081151581525050888181518110611d0757611d0761475f565b602002602001015115611eef576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190611d4a906001906147b5565b9050886000018181548110611d6157611d6161475f565b60009182526020909120015489546001600160a01b03909116908a9086908110611d8d57611d8d61475f565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080611dc757611dc7614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110611e2757611e2761475f565b60009182526020909120015460018a0180546001600160a01b039092169186908110611e5557611e5561475f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480611e9657611e96614c48565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055611eea82866147a2565b945050505b600101611c39565b5081866004016000828254611f0c91906147b5565b9091555050604051611f3190636242a4ef60e11b9061120a908c908c90602001614c5e565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051611f62929190614c8c565b60405180910390a15050505050505b50919050565b600054610100900460ff16611f9e5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c81612f2c565b600054610100900460ff16611fce5760405162461bcd60e51b81526004016108ab90614cb1565b6107958282612f5c565b600054610100900460ff16611fff5760405162461bcd60e51b81526004016108ab90614cb1565b6120098888612f8e565b61201284612fe5565b61201f8686858585613015565b5050505050505050565b81518151606091908082016001600160401b0381111561204b5761204b61422d565b604051908082528060200260200182016040528015612074578160200160208202803683370190505b50925060005b828110156120ce578581815181106120945761209461475f565b60200260200101518482815181106120ae576120ae61475f565b6001600160a01b039092166020928302919091019091015260010161207a565b60005b82811015612129578581815181106120eb576120eb61475f565b60200260200101518583815181106121055761210561475f565b6001600160a01b0390921660209283029190910190910152600191820191016120d1565b5050505092915050565b6001600160a01b038116610a1c576000356001600160e01b03191660405163104c66df60e31b81526004016108ab91906147ea565b612172828261313f565b610795573382826040516319b5fdcb60e31b81526004016108ab93929190614d4c565b600081516000036121a857506000919050565b60005b600183510381101561222b57600181015b8351811015612222578381815181106121d7576121d761475f565b60200260200101516001600160a01b03168483815181106121fa576121fa61475f565b60200260200101516001600160a01b03160361221a575060019392505050565b6001016121bc565b506001016121ab565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561228457602002820191906000526020600020905b815481526020019060010190808311612270575b50505050509050919050565b600081815260018301602052604081205480156123795760006122b46001836147b5565b85549091506000906122c8906001906147b5565b905081811461232d5760008660000182815481106122e8576122e861475f565b906000526020600020015490508087600001848154811061230b5761230b61475f565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061233e5761233e614c48565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074b565b600091505061074b565b60008160405160240161239691906147ea565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906123df908590614d80565b600060405180830381855afa9150503d806000811461241a576040519150601f19603f3d011682016040523d82523d6000602084013e61241f565b606091505b5091509150816124e157846001600160a01b0316836040516024016124449190614d9c565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516124799190614d80565b600060405180830381855afa9150503d80600081146124b4576040519150601f19603f3d011682016040523d82523d6000602084013e6124b9565b606091505b509092509050816124e157838560405163069d427960e11b81526004016108ab929190614daf565b808060200190518101906124f59190614dd2565b61070357838560405163069d427960e11b81526004016108ab929190614daf565b6000610748836001600160a01b038416613471565b612533613f0c565b61254c61254584606001516001611360565b84906134c0565b9050612563600454826135c690919063ffffffff16565b600061256e82612de2565b9050600061257c6000613667565b60008181527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff6020908152604090912090870151600182018590556006909101559050825181146125ee576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b81817fe5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d78561261b8961263d565b898960405161262d9493929190614f5d565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b0381111561266b5761266b61422d565b604051908082528060200260200182016040528015612694578160200160208202803683370190505b5060c086015190915060005b82518110156126f3578660a0015181815181106126bf576126bf61475f565b6020026020010151805190602001208382815181106126e0576126e061475f565b60209081029190910101526001016126a0565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b831580159061278a57508382145b6127b5576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b60006128426127c360015490565b612802846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061289161285260015490565b612802856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000846001600160401b038111156128ad576128ad61422d565b6040519080825280602002602001820160405280156128d6578160200160208202803683370190505b5090506000856001600160401b038111156128f3576128f361422d565b60405190808252806020026020018201604052801561291c578160200160208202803683370190505b50905060008060008060003660005b8c811015612ab0578d8d828181106129455761294561475f565b90506060020191508f8f8281811061295f5761295f61475f565b9050602002016020810190612974919061501e565b9250600083600181111561298a5761298a6144cf565b036129f4576129af8b6129a0602085018561503f565b84602001358560400135613703565b94508489886129bd81614c2f565b9950815181106129cf576129cf61475f565b60200260200101906001600160a01b031690816001600160a01b031681525050612a65565b6001836001811115612a0857612a086144cf565b03612a3e57612a1e8a6129a0602085018561503f565b9450848887612a2c81614c2f565b9850815181106129cf576129cf61475f565b6000356001600160e01b031916604051630612418f60e11b81526004016108ab91906147ea565b846001600160a01b0316846001600160a01b031610612aa5576000356001600160e01b031916604051635d3dcd3160e01b81526004016108ab91906147ea565b84935060010161292b565b505050928552508252506020808b015160009081526003825260408082208d51835290925290812090612ae161372b565b90506000612aee85613735565b9050818110612b755780600003612b26576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b825460ff1916600190811784558301546040517f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a2612b69838e613740565b50505050505050611568565b600082612b806137ad565b612b8a91906147b5565b612b959060016147a2565b90506000612ba286613735565b9050818110612c215780600003612bda576000356001600160e01b031916604051637f11b8a360e11b81526004016108ab91906147ea565b845460ff1916600317855560018501546040517f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a2505050505050505050611568565b6000356001600160e01b031916604051634ccfe64360e11b81526004016108ab91906147ea565b8060056000846005811115612c5f57612c5f6144cf565b6005811115612c7057612c706144cf565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b039283161790558116826005811115612cae57612cae6144cf565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b6020820151600090808203612d1d5760405163092048d160e11b8152600080356001600160e01b031916600483015260248201524660448201526064016108ab565b600454612d2b9085906135c6565b6000612d3685612de2565b9050612d4182613667565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314612d9e576000356001600160e01b03191660405163d4cec26960e01b81526004016108ab91906147ea565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051612dd2929190615062565b60405180910390a4505092915050565b60a0810151608082015160c083015151600092919083906001600160401b03811115612e1057612e1061422d565b604051908082528060200260200182016040528015612e39578160200160208202803683370190505b5060e086015190915060005b8251811015612e98578660c001518181518110612e6457612e6461475f565b602002602001015180519060200120838281518110612e8557612e8561475f565b6020908102919091010152600101612e45565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b600054610100900460ff16612f535760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816137b7565b600054610100900460ff16612f835760405162461bcd60e51b81526004016108ab90614cb1565b61091b600030612c48565b600054610100900460ff16612fb55760405162461bcd60e51b81526004016108ab90614cb1565b60017ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00908155610d0a838361196e565b600054610100900460ff1661300c5760405162461bcd60e51b81526004016108ab90614cb1565b610a1c816114b3565b600054610100900460ff1661303c5760405162461bcd60e51b81526004016108ab90614cb1565b6130476002856117a9565b604080516020808201839052600e60608301526d212924a223a2afa6a0a720a3a2a960911b6080808401919091528284018990528351808403909101815260a0830184528051908201207f599a80fcaa47b95e2323ab4d34d34e0cc9feda4b843edafcc30c7bdf60ea15bf60c08401527fe4d2346818310a10fac5a6d073d3dce255578caf4aa81ddcbcc7c2b98405eef060e08401527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de61010084015261012080840191909152835180840390910181526101409092019092528051910120600155613134818385610f08565b506107036003611881565b6001600061315a600080516020615149833981519152611337565b8051909150600081900361316f57505061074b565b6000816001600160401b038111156131895761318961422d565b6040519080825280602002602001820160405280156131b2578160200160208202803683370190505b5090506000826001600160401b038111156131cf576131cf61422d565b60405190808252806020026020018201604052801561320257816020015b60608152602001906001900390816131ed5790505b5090506000878760405160200161321a92919061508c565b604051602081830303815290604052905060008160405160240161323e9190614d9c565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015613427578681815181106132875761328761475f565b60200260200101516001600160a01b0316836040516132a69190614d80565b6000604051808303816000865af19150503d80600081146132e3576040519150601f19603f3d011682016040523d82523d6000602084013e6132e8565b606091505b508683815181106132fb576132fb61475f565b602002602001018684815181106133145761331461475f565b602002602001018290528215151515815250505084818151811061333a5761333a61475f565b602002602001015161341f578681815181106133585761335861475f565b60200260200101516001600160a01b0316826040516133779190614d80565b6000604051808303816000865af19150503d80600081146133b4576040519150601f19603f3d011682016040523d82523d6000602084013e6133b9565b606091505b508683815181106133cc576133cc61475f565b602002602001018684815181106133e5576133e561475f565b602002602001018290528215151515815250505087801561341c57508481815181106134135761341361475f565b60200260200101515b97505b60010161326d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161345d94939291906150bd565b60405180910390a150505050505092915050565b60008181526001830160205260408120546134b85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074b565b50600061074b565b6134c8613f0c565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156135135761351361422d565b60405190808252806020026020018201604052801561353c578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610a2a578281815181106135885761358861475f565b6020026020010151826080015182815181106135a6576135a661475f565b6001600160a01b0390921660209283029190910190910152600101613569565b60008260800151511180156135e457508160a0015151826080015151145b80156135f957508160c0015151826080015151145b801561360e57508160e0015151826080015151145b613639576000356001600160e01b0319166040516306b5667560e21b81526004016108ab91906147ea565b61364381426147a2565b826040015111156107955760405163ad89be9d60e01b815260040160405180910390fd5b600081815260026020526040812054908190036136965750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906000825460ff1660048111156136c8576136c86144cf565b036136e65760405163757a436360e01b815260040160405180910390fd5b505050600090815260026020526040902080546001019081905590565b60008060006137148787878761399c565b9150915061372181613a89565b5095945050505050565b60006105c5610816565b600061074b826112b2565b61374981613c3f565b1561079557815460ff1916600217825560008061376583613c59565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba838360405161379f92919061510a565b60405180910390a250505050565b60006105c56105bb565b600481905560405181907fe5cd1c123a8cf63fa1b7229678db61fe8ae99dbbd27889370b6667c8cae97da190600090a250565b600483015481101561389d578260080160008460040183815481106138115761381161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061385a5761385a61475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016137ea565b5060005b6005830154811015613954578260080160008460050183815481106138c8576138c861475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106139115761391161475f565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff191681556001818101839055600290910191909155016138a1565b50815460ff191682556000600183018190556002830181905560038301819055613982906004840190613f5a565b613990600583016000613f5a565b60006006830155919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139d35750600090506003613a80565b8460ff16601b141580156139eb57508460ff16601c14155b156139fc5750600090506004613a80565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a50573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a7957600060019250925050613a80565b9150600090505b94509492505050565b6000816004811115613a9d57613a9d6144cf565b03613aa55750565b6001816004811115613ab957613ab96144cf565b03613b065760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108ab565b6002816004811115613b1a57613b1a6144cf565b03613b675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108ab565b6003816004811115613b7b57613b7b6144cf565b03613bd35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108ab565b6004816004811115613be757613be76144cf565b03610a1c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108ab565b600081602001516000148061074b57505060200151461490565b606080613c6583613c3f565b613ca357602083015160405163092048d160e11b81526000356001600160e01b031916600482015260248101919091524660448201526064016108ab565b8260800151516001600160401b03811115613cc057613cc061422d565b604051908082528060200260200182016040528015613ce9578160200160208202803683370190505b5091508260800151516001600160401b03811115613d0957613d0961422d565b604051908082528060200260200182016040528015613d3c57816020015b6060815260200190600190039081613d275790505b50905060005b836080015151811015613f06578360e001518181518110613d6557613d6561475f565b60200260200101515a11613d9857613d7c84612de2565b6040516307aec4ab60e21b81526004016108ab91815260200190565b83608001518181518110613dae57613dae61475f565b60200260200101516001600160a01b03168460a001518281518110613dd557613dd561475f565b60200260200101518560e001518381518110613df357613df361475f565b6020026020010151908660c001518481518110613e1257613e1261475f565b6020026020010151604051613e279190614d80565b600060405180830381858888f193505050503d8060008114613e65576040519150601f19603f3d011682016040523d82523d6000602084013e613e6a565b606091505b50848381518110613e7d57613e7d61475f565b60200260200101848481518110613e9657613e9661475f565b6020026020010182905282151515158152505050828181518110613ebc57613ebc61475f565b6020026020010151613efe5780828281518110613edb57613edb61475f565b60200260200101516040516376df417560e11b81526004016108ab92919061512f565b600101613d42565b50915091565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b5080546000825590600052602060002090810190610a1c91905b80821115613f885760008155600101613f74565b5090565b60008083601f840112613f9e57600080fd5b5081356001600160401b03811115613fb557600080fd5b6020830191508360208260051b85010111156116c357600080fd5b60008060008060008060608789031215613fe957600080fd5b86356001600160401b038082111561400057600080fd5b61400c8a838b01613f8c565b9098509650602089013591508082111561402557600080fd5b6140318a838b01613f8c565b9096509450604089013591508082111561404a57600080fd5b5061405789828a01613f8c565b979a9699509497509295939492505050565b6000806020838503121561407c57600080fd5b82356001600160401b0381111561409257600080fd5b61409e85828601613f8c565b90969095509350505050565b60008151808452602080850194506020840160005b838110156140e45781516001600160a01b0316875295820195908201906001016140bf565b509495945050505050565b60208152600061074860208301846140aa565b60006020828403121561411457600080fd5b5035919050565b60008083601f84011261412d57600080fd5b5081356001600160401b0381111561414457600080fd5b6020830191508360206060830285010111156116c357600080fd5b60008060008060006060868803121561417757600080fd5b85356001600160401b038082111561418e57600080fd5b9087019060e0828a0312156141a257600080fd5b909550602087013590808211156141b857600080fd5b6141c489838a01613f8c565b909650945060408801359150808211156141dd57600080fd5b506141ea8882890161411b565b969995985093965092949392505050565b80356001600160a01b0381168114610c7957600080fd5b60006020828403121561422457600080fd5b610748826141fb565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156142655761426561422d565b60405290565b60405161010081016001600160401b03811182821017156142655761426561422d565b604051601f8201601f191681016001600160401b03811182821017156142b6576142b661422d565b604052919050565b60006001600160401b038211156142d7576142d761422d565b5060051b60200190565b600082601f8301126142f257600080fd5b81356020614307614302836142be565b61428e565b8083825260208201915060208460051b87010193508684111561432957600080fd5b602086015b84811015614353578035600681106143465760008081fd5b835291830191830161432e565b509695505050505050565b600082601f83011261436f57600080fd5b8135602061437f614302836142be565b8083825260208201915060208460051b8701019350868411156143a157600080fd5b602086015b84811015614353576143b7816141fb565b83529183019183016143a6565b600080604083850312156143d757600080fd5b82356001600160401b03808211156143ee57600080fd5b6143fa868387016142e1565b9350602085013591508082111561441057600080fd5b5061441d8582860161435e565b9150509250929050565b803560108110610c7957600080fd5b6000806040838503121561444957600080fd5b61445283614427565b9150614460602084016141fb565b90509250929050565b60008060008060006060868803121561448157600080fd5b85356001600160401b038082111561449857600080fd5b90870190610100828a0312156141a257600080fd5b600080604083850312156144c057600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a08101600587106144f9576144f96144cf565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b838110156140e45781516001600160601b03168752958201959082019060010161452f565b60608152600061456760608301866140aa565b828103602084015261457981866140aa565b9050828103604084015261458d818561451a565b9695505050505050565b602081526000610748602083018461451a565b6000602082840312156145bc57600080fd5b61074882614427565b600082601f8301126145d657600080fd5b813560206145e6614302836142be565b8083825260208201915060208460051b87010193508684111561460857600080fd5b602086015b848110156143535780356001600160601b038116811461462d5760008081fd5b835291830191830161460d565b6000806000806000806000806000806101408b8d03121561465a57600080fd5b8a35995060208b0135985060408b0135975061467860608c016141fb565b965060808b01356001600160401b038082111561469457600080fd5b6146a08e838f0161435e565b975060a08d01359150808211156146b657600080fd5b6146c28e838f0161435e565b965060c08d01359150808211156146d857600080fd5b6146e48e838f0161435e565b955060e08d01359150808211156146fa57600080fd5b6147068e838f016145c5565b94506101008d013591508082111561471d57600080fd5b6147298e838f016142e1565b93506101208d013591508082111561474057600080fd5b5061474d8d828e0161435e565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074b5761074b614775565b8082018082111561074b5761074b614775565b8181038181111561074b5761074b614775565b6000826147e557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6020810160108310614813576148136144cf565b91905290565b6001600160e01b03198316815260408101600b831061483a5761483a6144cf565b8260208301529392505050565b6001600160601b03818116838216019080821115610a2a57610a2a614775565b60008151808452602080850194506020840160005b838110156140e457815115158752958201959082019060010161487c565b6060815260006148ad60608301866140aa565b82810360208401526148bf818661451a565b9050828103604084015261458d8185614867565b6080815260006148e66080830187614867565b82810360208401526148f8818761451a565b9050828103604084015261490c81866140aa565b9050828103606084015261492081856140aa565b979650505050505050565b600082601f83011261493c57600080fd5b8135602061494c614302836142be565b8083825260208201915060208460051b87010193508684111561496e57600080fd5b602086015b848110156143535780358352918301918301614973565b6000601f83601f84011261499d57600080fd5b823560206149ad614302836142be565b82815260059290921b850181019181810190878411156149cc57600080fd5b8287015b84811015614a625780356001600160401b03808211156149f05760008081fd5b818a0191508a603f830112614a055760008081fd5b85820135604082821115614a1b57614a1b61422d565b614a2c828b01601f1916890161428e565b92508183528c81838601011115614a435760008081fd5b81818501898501375060009082018701528452509183019183016149d0565b50979650505050505050565b600060e08236031215614a8057600080fd5b614a88614243565b8235815260208301356020820152614aa2604084016141fb565b604082015260608301356001600160401b0380821115614ac157600080fd5b614acd368387016142e1565b60608401526080850135915080821115614ae657600080fd5b614af23683870161492b565b608084015260a0850135915080821115614b0b57600080fd5b614b173683870161498a565b60a084015260c0850135915080821115614b3057600080fd5b50614b3d3682860161492b565b60c08301525092915050565b60006101008236031215614b5c57600080fd5b614b6461426b565b823581526020830135602082015260408301356040820152614b88606084016141fb565b606082015260808301356001600160401b0380821115614ba757600080fd5b614bb33683870161435e565b608084015260a0850135915080821115614bcc57600080fd5b614bd83683870161492b565b60a084015260c0850135915080821115614bf157600080fd5b614bfd3683870161498a565b60c084015260e0850135915080821115614c1657600080fd5b50614c233682860161492b565b60e08301525092915050565b600060018201614c4157614c41614775565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000614c7160408301856140aa565b8281036020840152614c838185614867565b95945050505050565b604081526000614c9f6040830185614867565b8281036020840152614c8381856140aa565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b83811015614d17578181015183820152602001614cff565b50506000910152565b60008151808452614d38816020860160208601614cfc565b601f01601f19169290920160200192915050565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090614c8390830184614d20565b60008251614d92818460208701614cfc565b9190910192915050565b6020815260006107486020830184614d20565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215614de457600080fd5b8151801515811461134457600080fd5b60008151808452602080850194506020840160005b838110156140e457815187529582019590820190600101614e09565b60008282518085526020808601955060208260051b8401016020860160005b84811015614e7257601f19868403018952614e60838351614d20565b98840198925090830190600101614e44565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151614eb660608601826001600160a01b03169052565b506080830151816080860152614ece828601826140aa565b91505060a083015184820360a0860152614ee88282614df4565b91505060c083015184820360c0860152614f028282614e25565b91505060e083015184820360e0860152614c838282614df4565b60008151808452602080850194506020840160005b838110156140e457815160068110614f4b57614f4b6144cf565b87529582019590820190600101614f31565b608081526000614f706080830187614e7f565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152614fb760e0830182614f1c565b905060808601518282036080840152614fd08282614df4565b91505060a086015182820360a0840152614fea8282614e25565b91505060c086015182820360c08401526150048282614df4565b9350505050614c8360608301846001600160a01b03169052565b60006020828403121561503057600080fd5b81356002811061134457600080fd5b60006020828403121561505157600080fd5b813560ff8116811461134457600080fd5b6040815260006150756040830185614e7f565b905060018060a01b03831660208301529392505050565b6001600160e01b03198316815281516000906150af816004850160208701614cfc565b919091016004019392505050565b6080815260006150d06080830187614d20565b82810360208401526150e281876140aa565b905082810360408401526150f68186614867565b905082810360608401526149208185614e25565b60408152600061511d6040830185614867565b8281036020840152614c838185614e25565b8281526040602082015260006106476040830184614d2056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212209b8f259545122f66d7b909c338372302f448cabc8b0563521692a408e8f2a0a064736f6c63430008170033\"", + "deployedBytecode": "\"0x608060405234801561001057600080fd5b50600436106102115760003560e01c80639b19dbfd11610125578063d0a50db0116100ad578063e75235b81161007c578063e75235b8146104c6578063e9c03498146104e3578063f4cc4d69146104f6578063f80b5352146104fe578063f896f0701461050657600080fd5b8063d0a50db014610485578063d78392f81461048d578063dafae408146104a0578063de981f1b146104b357600080fd5b8063b405aaf2116100f4578063b405aaf214610421578063b9c3620914610434578063bc96180b14610447578063c441c4a81461044e578063cc7e6b3b1461046557600080fd5b80639b19dbfd14610398578063a64a8380146103a0578063aee1767f146103b3578063b384abef146103c657600080fd5b80633644e515116101a85780637f7fe058116101775780637f7fe0581461030e578063800eaab314610339578063865e6fd31461034c5780638dc0dbc61461035f578063901979d51461036d57600080fd5b80633644e515146102c757806362077409146102d0578063776fb1ec146102e35780637de5dedd1461030657600080fd5b80631f425338116101e45780631f4253381461026e5780632d6d7d731461028157806334d5f37b1461029457806335da8121146102b457600080fd5b806301a5f43f1461021657806306aba0e11461022b5780630a44fa43146102465780630f7c318914610259575b600080fd5b610229610224366004612c27565b610519565b005b6102336105c8565b6040519081526020015b60405180910390f35b610233610254366004612cc0565b6105d7565b61026161065c565b60405161023d9190612d46565b61022961027c366004612cc0565b610675565b61026161028f366004612cc0565b610717565b6102336102a2366004612d59565b60026020526000908152604090205481565b6102296102c2366004612cc0565b61075e565b61023360015481565b6102296102de366004612db6565b6107a6565b6102f66102f1366004612d59565b6107af565b604051901515815260200161023d565b6102336107fc565b61032161031c366004612e69565b610852565b6040516001600160a01b03909116815260200161023d565b610229610347366004612fd0565b6108d3565b61022961035a366004613042565b61090b565b6102296102de366004613075565b61038061037b366004612e69565b610926565b6040516001600160601b03909116815260200161023d565b61026161095c565b6102296103ae366004612d59565b6109c7565b6103216103c1366004612e69565b6109db565b6104106103d43660046130b9565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023d9594939291906130f1565b6102f661042f366004612e69565b6109ed565b6102296104423660046130b9565b610a25565b6000610233565b610456610a37565b60405161023d93929190613160565b610478610473366004612cc0565b610b11565b60405161023d91906131a3565b610233610b4f565b61038061049b366004612e69565b610b62565b6102f66104ae366004612d59565b610b6d565b6103216104c13660046131b6565b610bbf565b6104ce610c3a565b6040805192835260208301919091520161023d565b6102296104f1366004612cc0565b610c82565b610229610ccb565b610261611128565b610229610514366004613246565b61118b565b61052161129e565b6105bf86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506112fa92505050565b50505050505050565b60006105d261165c565b905090565b6000828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610618925083915061166f9050565b6106548484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506116a492505050565b949350505050565b60606105d2600080516020613860833981519152611729565b61067d61129e565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106bc925083915061166f9050565b60008051602061386083398151915260005b83811015610710576107078585838181106106eb576106eb61336b565b90506020020160208101906107009190612e69565b839061173d565b506001016106ce565b5050505050565b606061075583838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611752915050565b90505b92915050565b61076661129e565b6107a28282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506118a592505050565b5050565b61071033611962565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff1660048111156107f4576107f46130db565b141592915050565b6000806108076119a4565b9050600080610814610c3a565b915091508060018285600401548561082c9190613397565b61083691906133ae565b61084091906133c1565b61084a91906133d4565b935050505090565b60008060006108686108626119a4565b856119c8565b915091508161089a5760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108a26119a4565b60010181815481106108b6576108b661336b565b6000918252602090912001546001600160a01b0316949350505050565b333014610901576000356001600160e01b0319166040516307337e1960e41b815260040161089191906133f6565b6107a28282611a2d565b61091361129e565b61091c81611ad6565b6107a28282611b0c565b6000806109316119a4565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109666119a4565b6001018054806020026020016040519081016040528092919081815260200182805480156109bd57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161099f575b5050505050905090565b6109cf61129e565b6109d881611bb0565b50565b60006109e682611c1d565b5092915050565b6000806109f86119a4565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a2d61129e565b6107a28282611c9d565b60608060606000610a466119a4565b805460408051602080840282018101909252828152929350839190830182828015610a9a57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a7c575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610af957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610adb575b50505050509250610b0984611d9f565b915050909192565b6060610755838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d9f92505050565b6000610b596119a4565b60010154919050565b600061075882611e8b565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610b9861165c565b8160010154610ba79190613397565b6002820154610bb69085613397565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bf657610bf66130db565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c35578160405163409140df60e11b8152600401610891919061340b565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610c8a61129e565b610cc6828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ec092505050565b505050565b610cd361129e565b46600114610d235760405162461bcd60e51b815260206004820152601860248201527f4f6e6c79206f6e20657468657265756d2d6d61696e6e657400000000000000006044820152606401610891565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833750506040805160018082528183019092529293506000929150602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050610db6612bbc565b732260fac5e5542a773aa44fbcfedf7c193bc2c59985600081518110610dde57610dde61336b565b60200260200101906001600160a01b031690816001600160a01b031681525050737e73630f81647bcfd7b1f2c04c1c662d17d4577e84600081518110610e2657610e2661336b565b60200260200101906001600160a01b031690816001600160a01b0316815250507364192819ac13ef72bf6b5ae239ac672b43a9af0883600081518110610e6e57610e6e61336b565b60200260200101906001600160a01b031690816001600160a01b031681525050600082600081518110610ea357610ea361336b565b60200260200101906002811115610ebc57610ebc6130db565b90816002811115610ecf57610ecf6130db565b90525060408051600180825281830190925290602080830190803683375050508082528051636553f1009190600090610f0a57610f0a61336b565b60209081029190910101526040805160018082528183019092529081602001602082028036833750505060208201819052805163caa7e2009190600090610f5357610f5361336b565b602090810291909101015260408051600180825281830190925290816020016020820280368337505050604082018190528051600a9190600090610f9957610f9961336b565b60209081029190910101526040805160018082528183019092529081602001602082028036833750505060608201819052805163fa56ea009190600090610fe257610fe261336b565b60209081029190910101526040517364192819ac13ef72bf6b5ae239ac672b43a9af0890600090829061101f908990899088908890602401613425565b60408051601f198184030181529181526020820180516001600160e01b031663dff525e160e01b179052516110579190602401613556565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161108c9190613569565b6000604051808303816000865af19150503d80600081146110c9576040519150601f19603f3d011682016040523d82523d6000602084013e6110ce565b606091505b505090508061111f5760405162461bcd60e51b815260206004820181905260248201527f4d617020746f6b656e7320616e64207468726573686f6c6473206661696c65646044820152606401610891565b6105bf856118a5565b60606111326119a4565b8054604080516020808402820181019092528281529291908301828280156109bd576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161099f575050505050905090565b600054610100900460ff16158080156111ab5750600054600160ff909116105b806111c55750303b1580156111c5575060005460ff166001145b6112285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610891565b6000805460ff19166001179055801561124b576000805461ff0019166101001790555b8015611291576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146112f8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610891929190613585565b565b606061130683836122a6565b61130f8161166f565b60006113196119a4565b84518751919250908114801561132f5750855181145b61135a576000356001600160e01b0319166040516306b5667560e21b815260040161089191906133f6565b806001600160401b0381111561137257611372612e84565b60405190808252806020026020018201604052801561139b578160200160208202803683370190505b509350806000036113ad575050611654565b60008060008060005b858110156115c0578a81815181106113d0576113d061336b565b602002602001015194508981815181106113ec576113ec61336b565b602002602001015193508b81815181106114085761140861336b565b6020026020010151925061141b856123b0565b611424846123b0565b826001600160601b031660000361145c576000356001600160e01b031916604051637f11b8a360e11b815260040161089191906133f6565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926114b49290811691166135b3565b6114be91906135b3565b6114c891906135b3565b6001600160601b03166000148982815181106114e6576114e661336b565b60200260200101901515908115158152505088818151811061150a5761150a61336b565b6020026020010151156115b8578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556115b590836133ae565b91505b6001016113b6565b50808660040160008282546115d591906133ae565b9091555050604051611610906347c28ec560e11b906115fc908c908f908d90602001613606565b6040516020818303038152906040526123e5565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c604051611645949392919061363f565b60405180910390a15050505050505b509392505050565b60006116666119a4565b60040154905090565b61167881612412565b156109d8576000356001600160e01b031916604051630d697db160e11b815260040161089191906133f6565b6000816116b08161166f565b60006116ba6119a4565b905060005b8451811015611721578160020160008683815181106116e0576116e061336b565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611717906001600160601b0316856133ae565b93506001016116bf565b505050919050565b60606000611736836124b1565b9392505050565b6000610755836001600160a01b03841661250d565b606082516001600160401b0381111561176d5761176d612e84565b604051908082528060200260200182016040528015611796578160200160208202803683370190505b50905060005b83518110156109e657600560008583815181106117bb576117bb61336b565b602002602001015160058111156117d4576117d46130db565b60058111156117e5576117e56130db565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106118195761181961336b565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611871575060006001600160a01b031682828151811061185e5761185e61336b565b60200260200101516001600160a01b0316145b1561189d576000356001600160e01b03191660405163053265f160e01b815260040161089191906133f6565b60010161179c565b806118af8161166f565b600080516020613860833981519152600080805b855181101561195a578581815181106118de576118de61336b565b602002602001015192506118f183611ad6565b611902836312c0151560e21b612600565b61190c8484612793565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016118c3565b505050505050565b61196b81611e8b565b6001600160601b03166000036109d8576000356001600160e01b0319166003604051620f948f60ea1b8152600401610891929190613585565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611a1b578481815481106119e9576119e961336b565b6000918252602090912001546001600160a01b0390811690851603611a1357600192509050611a26565b6001016119ce565b506000600019915091505b9250929050565b60005b8251811015610cc657306001600160a01b0316828281518110611a5557611a5561336b565b60200260200101516001600160a01b031603611a92576000356001600160e01b03191660405163053265f160e01b815260040161089191906133f6565b611ace838281518110611aa757611aa761336b565b6020026020010151838381518110611ac157611ac161336b565b60200260200101516127a8565b600101611a30565b806001600160a01b03163b6000036109d857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610891565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611b4257611b426130db565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b8357611b836130db565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611bd2576040516305f4dee960e31b815260040160405180910390fd5b6000611bdc6119a4565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611c37611c2e6119a4565b600101866119c8565b9150915081611c64576040516326527e1760e01b81526001600160a01b0386166004820152602401610891565b611c6c6119a4565b805482908110611c7e57611c7e61336b565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611cac575060018111155b15611cd8576000356001600160e01b0319166040516387f6f09560e01b815260040161089191906133f6565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611d5b83613697565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611dab6119a4565b905082516001600160401b03811115611dc657611dc6612e84565b604051908082528060200260200182016040528015611def578160200160208202803683370190505b50915060005b8351811015611e8457816002016000858381518110611e1657611e1661336b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611e6457611e6461336b565b6001600160601b0390921660209283029190910190910152600101611df5565b5050919050565b6000611e956119a4565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611ecc8161166f565b6000611ed66119a4565b8451909150806001600160401b03811115611ef357611ef3612e84565b604051908082528060200260200182016040528015611f1c578160200160208202803683370190505b50935080600003611f2e5750506122a0565b60058201548254611f409083906133c1565b1015611f5f5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561222657898181518110611f8257611f8261336b565b60200260200101519350611f9584611c1d565b9095509150611fa3856123b0565b611fac846123b0565b6001600160a01b03851660009081526002880160205260409020546001600160601b03161580159061200057506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b8982815181106120125761201261336b565b6020026020010190151590811515815250508881815181106120365761203661336b565b60200260200101511561221e576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612079906001906133c1565b90508860000181815481106120905761209061336b565b60009182526020909120015489546001600160a01b03909116908a90869081106120bc576120bc61336b565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120f6576120f66136b0565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106121565761215661336b565b60009182526020909120015460018a0180546001600160a01b0390921691869081106121845761218461336b565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121c5576121c56136b0565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b031916905561221982866133ae565b945050505b600101611f68565b508186600401600082825461223b91906133c1565b909155505060405161226090636242a4ef60e11b906115fc908c908c906020016136c6565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516122919291906136f4565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122c8576122c8612e84565b6040519080825280602002602001820160405280156122f1578160200160208202803683370190505b50925060005b8281101561234b578581815181106123115761231161336b565b602002602001015184828151811061232b5761232b61336b565b6001600160a01b03909216602092830291909101909101526001016122f7565b60005b828110156123a6578581815181106123685761236861336b565b60200260200101518583815181106123825761238261336b565b6001600160a01b03909216602092830291909101909101526001918201910161234e565b5050505092915050565b6001600160a01b0381166109d8576000356001600160e01b03191660405163104c66df60e31b815260040161089191906133f6565b6123ef828261283b565b6107a2573382826040516319b5fdcb60e31b815260040161089193929190613719565b6000815160000361242557506000919050565b60005b60018351038110156124a857600181015b835181101561249f578381815181106124545761245461336b565b60200260200101516001600160a01b03168483815181106124775761247761336b565b60200260200101516001600160a01b031603612497575060019392505050565b600101612439565b50600101612428565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561250157602002820191906000526020600020905b8154815260200190600101908083116124ed575b50505050509050919050565b600081815260018301602052604081205480156125f65760006125316001836133c1565b8554909150600090612545906001906133c1565b90508181146125aa5760008660000182815481106125655761256561336b565b90600052602060002001549050808760000184815481106125885761258861336b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125bb576125bb6136b0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610758565b6000915050610758565b60008160405160240161261391906133f6565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169061265c908590613569565b600060405180830381855afa9150503d8060008114612697576040519150601f19603f3d011682016040523d82523d6000602084013e61269c565b606091505b50915091508161275e57846001600160a01b0316836040516024016126c19190613556565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516126f69190613569565b600060405180830381855afa9150503d8060008114612731576040519150601f19603f3d011682016040523d82523d6000602084013e612736565b606091505b5090925090508161275e57838560405163069d427960e11b815260040161089192919061374d565b808060200190518101906127729190613770565b61071057838560405163069d427960e11b815260040161089192919061374d565b6000610755836001600160a01b038416612b6d565b80600560008460058111156127bf576127bf6130db565b60058111156127d0576127d06130db565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561280e5761280e6130db565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60016000612856600080516020613860833981519152611729565b8051909150600081900361286b575050610758565b6000816001600160401b0381111561288557612885612e84565b6040519080825280602002602001820160405280156128ae578160200160208202803683370190505b5090506000826001600160401b038111156128cb576128cb612e84565b6040519080825280602002602001820160405280156128fe57816020015b60608152602001906001900390816128e95790505b50905060008787604051602001612916929190613792565b604051602081830303815290604052905060008160405160240161293a9190613556565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612b23578681815181106129835761298361336b565b60200260200101516001600160a01b0316836040516129a29190613569565b6000604051808303816000865af19150503d80600081146129df576040519150601f19603f3d011682016040523d82523d6000602084013e6129e4565b606091505b508683815181106129f7576129f761336b565b60200260200101868481518110612a1057612a1061336b565b6020026020010182905282151515158152505050848181518110612a3657612a3661336b565b6020026020010151612b1b57868181518110612a5457612a5461336b565b60200260200101516001600160a01b031682604051612a739190613569565b6000604051808303816000865af19150503d8060008114612ab0576040519150601f19603f3d011682016040523d82523d6000602084013e612ab5565b606091505b50868381518110612ac857612ac861336b565b60200260200101868481518110612ae157612ae161336b565b6020026020010182905282151515158152505050878015612b185750848181518110612b0f57612b0f61336b565b60200260200101515b97505b600101612969565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612b5994939291906137c3565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612bb457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610758565b506000610758565b60405180608001604052806004905b6060815260200190600190039081612bcb5790505090565b60008083601f840112612bf557600080fd5b5081356001600160401b03811115612c0c57600080fd5b6020830191508360208260051b8501011115611a2657600080fd5b60008060008060008060608789031215612c4057600080fd5b86356001600160401b0380821115612c5757600080fd5b612c638a838b01612be3565b90985096506020890135915080821115612c7c57600080fd5b612c888a838b01612be3565b90965094506040890135915080821115612ca157600080fd5b50612cae89828a01612be3565b979a9699509497509295939492505050565b60008060208385031215612cd357600080fd5b82356001600160401b03811115612ce957600080fd5b612cf585828601612be3565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612d3b5781516001600160a01b031687529582019590820190600101612d16565b509495945050505050565b6020815260006107556020830184612d01565b600060208284031215612d6b57600080fd5b5035919050565b60008083601f840112612d8457600080fd5b5081356001600160401b03811115612d9b57600080fd5b602083019150836020606083028501011115611a2657600080fd5b600080600080600060608688031215612dce57600080fd5b85356001600160401b0380821115612de557600080fd5b9087019060e0828a031215612df957600080fd5b90955060208701359080821115612e0f57600080fd5b612e1b89838a01612be3565b90965094506040880135915080821115612e3457600080fd5b50612e4188828901612d72565b969995985093965092949392505050565b80356001600160a01b0381168114610c3557600080fd5b600060208284031215612e7b57600080fd5b61075582612e52565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612ec257612ec2612e84565b604052919050565b60006001600160401b03821115612ee357612ee3612e84565b5060051b60200190565b600082601f830112612efe57600080fd5b81356020612f13612f0e83612eca565b612e9a565b8083825260208201915060208460051b870101935086841115612f3557600080fd5b602086015b84811015612f5f57803560068110612f525760008081fd5b8352918301918301612f3a565b509695505050505050565b600082601f830112612f7b57600080fd5b81356020612f8b612f0e83612eca565b8083825260208201915060208460051b870101935086841115612fad57600080fd5b602086015b84811015612f5f57612fc381612e52565b8352918301918301612fb2565b60008060408385031215612fe357600080fd5b82356001600160401b0380821115612ffa57600080fd5b61300686838701612eed565b9350602085013591508082111561301c57600080fd5b5061302985828601612f6a565b9150509250929050565b803560108110610c3557600080fd5b6000806040838503121561305557600080fd5b61305e83613033565b915061306c60208401612e52565b90509250929050565b60008060008060006060868803121561308d57600080fd5b85356001600160401b03808211156130a457600080fd5b90870190610100828a031215612df957600080fd5b600080604083850312156130cc57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a0810160058710613105576131056130db565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612d3b5781516001600160601b03168752958201959082019060010161313b565b6060815260006131736060830186612d01565b82810360208401526131858186612d01565b905082810360408401526131998185613126565b9695505050505050565b6020815260006107556020830184613126565b6000602082840312156131c857600080fd5b61075582613033565b600082601f8301126131e257600080fd5b813560206131f2612f0e83612eca565b8083825260208201915060208460051b87010193508684111561321457600080fd5b602086015b84811015612f5f5780356001600160601b03811681146132395760008081fd5b8352918301918301613219565b6000806000806000806000806000806101408b8d03121561326657600080fd5b8a35995060208b0135985060408b0135975061328460608c01612e52565b965060808b01356001600160401b03808211156132a057600080fd5b6132ac8e838f01612f6a565b975060a08d01359150808211156132c257600080fd5b6132ce8e838f01612f6a565b965060c08d01359150808211156132e457600080fd5b6132f08e838f01612f6a565b955060e08d013591508082111561330657600080fd5b6133128e838f016131d1565b94506101008d013591508082111561332957600080fd5b6133358e838f01612eed565b93506101208d013591508082111561334c57600080fd5b506133598d828e01612f6a565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761075857610758613381565b8082018082111561075857610758613381565b8181038181111561075857610758613381565b6000826133f157634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b602081016010831061341f5761341f6130db565b91905290565b6080815260006134386080830187612d01565b60208382038185015261344b8288612d01565b8481036040860152865180825282880193509082019060005b818110156134905784516003811061347e5761347e6130db565b83529383019391830191600101613464565b50508481036060860152915081608081018660005b60048110156134f657838303865281518051808552908601908685019060005b818110156134e1578351835292880192918801916001016134c5565b505096860196935050908401906001016134a5565b50909a9950505050505050505050565b60005b83811015613521578181015183820152602001613509565b50506000910152565b60008151808452613542816020860160208601613506565b601f01601f19169290920160200192915050565b602081526000610755602083018461352a565b6000825161357b818460208701613506565b9190910192915050565b6001600160e01b03198316815260408101600b83106135a6576135a66130db565b8260208301529392505050565b6001600160601b038181168382160190808211156109e6576109e6613381565b60008151808452602080850194506020840160005b83811015612d3b5781511515875295820195908201906001016135e8565b6060815260006136196060830186612d01565b828103602084015261362b8186613126565b9050828103604084015261319981856135d3565b60808152600061365260808301876135d3565b82810360208401526136648187613126565b905082810360408401526136788186612d01565b9050828103606084015261368c8185612d01565b979650505050505050565b6000600182016136a9576136a9613381565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006136d96040830185612d01565b82810360208401526136eb81856135d3565b95945050505050565b60408152600061370760408301856135d3565b82810360208401526136eb8185612d01565b6001600160a01b03841681526001600160e01b0319831660208201526060604082018190526000906136eb9083018461352a565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561378257600080fd5b8151801515811461173657600080fd5b6001600160e01b03198316815281516000906137b5816004850160208701613506565b919091016004019392505050565b6080815260006137d6608083018761352a565b6020838203818501526137e98288612d01565b915083820360408501526137fd82876135d3565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561384e57601f1987840301855261383c83835161352a565b94860194925090850190600101613820565b50909b9a505050505050505050505056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a2646970667358221220ddb3d07e0bd9778e7ee67146a1a2ce8218b11d73fd07f5b259ad590c3632d90164736f6c63430008170033\"", "deployer": "0xA62DddCC58E769bCFd2f9A7A61CDF331f18c2650", "devdoc": { "version": 1, @@ -245,47 +245,11 @@ } } ], - "ErrInsufficientGas(bytes32)": [ - { - "details": "Error thrown when there is insufficient gas to execute a function." - } - ], "ErrInvalidArguments(bytes4)": [ { "details": "Error indicating that arguments are invalid." } ], - "ErrInvalidChainId(bytes4,uint256,uint256)": [ - { - "details": "Error indicating that the chain ID is invalid.", - "params": { - "actual": "Current chain ID that executing function.", - "expected": "Expected chain ID required for the tx to success.", - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid chain ID." - } - } - ], - "ErrInvalidExpiryTimestamp()": [ - { - "details": "Error thrown when an invalid expiry timestamp is provided." - } - ], - "ErrInvalidOrder(bytes4)": [ - { - "details": "Error indicating that an order is invalid.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid order." - } - } - ], - "ErrInvalidProposalNonce(bytes4)": [ - { - "details": "Error indicating that the proposal nonce is invalid.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an invalid proposal nonce." - } - } - ], "ErrInvalidThreshold(bytes4)": [ { "details": "Error indicating that the provided threshold is invalid for a specific function signature.", @@ -310,16 +274,6 @@ } } ], - "ErrLooseProposalInternallyRevert(uint256,bytes)": [ - { - "details": "Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`." - } - ], - "ErrNonExecutorCannotRelay(address,address)": [ - { - "details": "Error of the `caller` to relay is not the specified `executor`." - } - ], "ErrOnlySelfCall(bytes4)": [ { "details": "Error indicating that a function can only be called by the contract itself.", @@ -328,14 +282,6 @@ } } ], - "ErrRelayFailed(bytes4)": [ - { - "details": "Error indicating that a relay call has failed.", - "params": { - "msgSig": "The function signature (bytes4) of the relay call that failed." - } - } - ], "ErrUnauthorized(bytes4,uint8)": [ { "details": "Error indicating that the caller is unauthorized to perform a specific function.", @@ -354,14 +300,6 @@ } } ], - "ErrUnsupportedVoteType(bytes4)": [ - { - "details": "Error indicating that a vote type is not supported.", - "params": { - "msgSig": "The function signature (bytes4) of the operation that encountered an unsupported vote type." - } - } - ], "ErrVoteIsFinalized()": [ { "details": "Error thrown when attempting to interact with a finalized vote." @@ -380,12 +318,12 @@ } }, "isFoundry": true, - "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrBelowMinRequiredGovernors\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrCurrentProposalIsNotCompleted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrDuplicated\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrExistOneInternalCallFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"required\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotMatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ErrInsufficientGas\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidArguments\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ErrInvalidChainId\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidExpiryTimestamp\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInput\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidOrder\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidProposalNonce\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidVoteWeight\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"callIndex\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"revertMsg\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrLooseProposalInternallyRevert\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"caller\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrNonExecutorCannotRelay\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrOnlySelfCall\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrOperatorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrRelayFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrUnsupportedInterface\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrUnsupportedVoteType\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrVoteIsFinalized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrZeroAddress\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorAddingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorRemovingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"fromBridgeOperator\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"toBridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"CallbackRegistered\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"globalProposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GlobalProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"MinRequiredGovernorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"Notified\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalApproved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"successCalls\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"ProposalExecuted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalExpired\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"duration\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalExpiryDurationChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalRejected\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalVoted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption\\\",\\\"name\\\":\\\"targetOption\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"TargetOptionUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DOMAIN_SEPARATOR\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"addBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getBridgeOperatorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getBridgeOperators\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getCallbackRegisters\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getFullBridgeOperatorInfos\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"getGovernorWeights\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getGovernors\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getOperatorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getProposalExpiryDuration\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getTotalWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"globalProposalRelayed\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"roninChainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeContract\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"callbackRegisters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"initialize\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"relayGlobalProposal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"relayProposal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"removeBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"resolveTargets\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"round\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setMinRequiredGovernor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"sumGovernorsWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"sum\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"unregisterCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"updateManyTargetOption\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"vote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"hash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"againstVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"forVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrCurrentProposalIsNotCompleted()\\\":[{\\\"details\\\":\\\"Error thrown when the current proposal is not completed.\\\"}],\\\"ErrDuplicated(bytes4)\\\":[{\\\"details\\\":\\\"Error thrown when a duplicated element is detected in an array.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature that invoke the error.\\\"}}],\\\"ErrInsufficientGas(bytes32)\\\":[{\\\"details\\\":\\\"Error thrown when there is insufficient gas to execute a function.\\\"}],\\\"ErrInvalidArguments(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that arguments are invalid.\\\"}],\\\"ErrInvalidChainId(bytes4,uint256,uint256)\\\":[{\\\"details\\\":\\\"Error indicating that the chain ID is invalid.\\\",\\\"params\\\":{\\\"actual\\\":\\\"Current chain ID that executing function.\\\",\\\"expected\\\":\\\"Expected chain ID required for the tx to success.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\"}}],\\\"ErrInvalidExpiryTimestamp()\\\":[{\\\"details\\\":\\\"Error thrown when an invalid expiry timestamp is provided.\\\"}],\\\"ErrInvalidOrder(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that an order is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid order.\\\"}}],\\\"ErrInvalidProposalNonce(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the proposal nonce is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\"}}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidVoteWeight(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote weight is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid vote weight.\\\"}}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrLooseProposalInternallyRevert(uint256,bytes)\\\":[{\\\"details\\\":\\\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\"}],\\\"ErrNonExecutorCannotRelay(address,address)\\\":[{\\\"details\\\":\\\"Error of the `caller` to relay is not the specified `executor`.\\\"}],\\\"ErrOnlySelfCall(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a function can only be called by the contract itself.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that can only be called by the contract itself.\\\"}}],\\\"ErrRelayFailed(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a relay call has failed.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the relay call that failed.\\\"}}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnsupportedInterface(bytes4,address)\\\":[{\\\"details\\\":\\\"The error indicating an unsupported interface.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address where the unsupported interface was encountered.\\\",\\\"interfaceId\\\":\\\"The bytes4 interface identifier that is not supported.\\\"}}],\\\"ErrUnsupportedVoteType(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote type is not supported.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\"}}],\\\"ErrVoteIsFinalized()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to interact with a finalized vote.\\\"}],\\\"ErrZeroAddress(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that given address is null when it should not.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"BridgeOperatorAddingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to add.\\\"},\\\"BridgeOperatorRemovingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to remove.\\\"},\\\"BridgeOperatorUpdated(address,address,address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is updated.\\\"},\\\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Emitted when new bridge operators are added.\\\"},\\\"BridgeOperatorsRemoved(bool[],address[])\\\":{\\\"details\\\":\\\"Emitted when bridge operators are removed.\\\"},\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"MinRequiredGovernorUpdated(uint256)\\\":{\\\"details\\\":\\\"Emitted when the minimum number of required governors is updated.\\\"},\\\"Notified(bytes,address[],bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the contract notifies multiple registers with statuses and return data.\\\"},\\\"ProposalApproved(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the proposal is approved\\\"},\\\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"ProposalExecuted(bytes32,bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the proposal is executed\\\"},\\\"ProposalExpired(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is expired\\\"},\\\"ProposalExpiryDurationChanged(uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal expiry duration is changed.\\\"},\\\"ProposalRejected(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is reject\\\"},\\\"ProposalVoted(bytes32,address,uint8,uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal is voted\\\"},\\\"TargetOptionUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when the target options are updated\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addBridgeOperators(uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Adds multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to add.\\\",\\\"governors\\\":\\\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\"}},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"getBridgeOperatorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific bridge operator.\\\",\\\"params\\\":{\\\"bridgeOperator\\\":\\\"The address of the bridge operator to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"The vote weight of the specified bridge operator.\\\"}},\\\"getBridgeOperators()\\\":{\\\"details\\\":\\\"Returns an array of all bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all bridge operators.\\\"}},\\\"getCallbackRegisters()\\\":{\\\"details\\\":\\\"Retrieves the addresses of registered callbacks.\\\",\\\"returns\\\":{\\\"registers\\\":\\\"An array containing the addresses of registered callbacks.\\\"}},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getFullBridgeOperatorInfos()\\\":{\\\"details\\\":\\\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\",\\\"returns\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the registered bridge operators.\\\",\\\"governors\\\":\\\"An array of addresses representing the governors of each bridge operator.\\\",\\\"weights\\\":\\\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\\\"}},\\\"getGovernorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `governor` of a `operator`.\\\"},\\\"getGovernorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific governor.\\\",\\\"params\\\":{\\\"governor\\\":\\\"The address of the governor to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"voteWeight The vote weight of the specified governor.\\\"}},\\\"getGovernorWeights(address[])\\\":{\\\"details\\\":\\\"Returns the weights of a list of governor addresses.\\\"},\\\"getGovernors()\\\":{\\\"details\\\":\\\"Returns an array of all governors.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all governors.\\\"}},\\\"getOperatorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `operator` of a `governor`.\\\"},\\\"getProposalExpiryDuration()\\\":{\\\"details\\\":\\\"Returns the expiry duration for a new proposal.\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"getTotalWeight()\\\":{\\\"details\\\":\\\"Returns total weights.\\\"},\\\"globalProposalRelayed(uint256)\\\":{\\\"details\\\":\\\"Returns whether the voter `_voter` casted vote for the proposal.\\\"},\\\"isBridgeOperator(address)\\\":{\\\"details\\\":\\\"Checks if the given address is a bridge operator.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address to check.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"A boolean indicating whether the address is a bridge operator.\\\"}},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"registerCallbacks(address[])\\\":{\\\"details\\\":\\\"Registers multiple callbacks with the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to register.\\\"}},\\\"relayGlobalProposal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor.\\\"},\\\"relayProposal((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor.\\\"},\\\"removeBridgeOperators(address[])\\\":{\\\"details\\\":\\\"Removes multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to remove.\\\"}},\\\"resolveTargets(uint8[])\\\":{\\\"details\\\":\\\"Returns corresponding address of target options. Return address(0) on non-existent target.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setMinRequiredGovernor(uint256)\\\":{\\\"details\\\":\\\"Self-call to update the minimum required governor.\\\",\\\"params\\\":{\\\"min\\\":\\\"The minimum number, this must not less than 3.\\\"}},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\\\"},\\\"sumGovernorsWeight(address[])\\\":{\\\"details\\\":\\\"Returns total weights of the governor list.\\\"},\\\"totalBridgeOperator()\\\":{\\\"details\\\":\\\"Returns the total number of bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"The total number of bridge operators.\\\"}},\\\"unregisterCallbacks(address[])\\\":{\\\"details\\\":\\\"Unregisters multiple callbacks from the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to unregister.\\\"}},\\\"updateManyTargetOption(uint8[],address[])\\\":{\\\"details\\\":\\\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"errors\\\":{\\\"ErrBelowMinRequiredGovernors()\\\":[{\\\"notice\\\":\\\"Error indicating that the governors list will go below minimum number of required governor.\\\"}],\\\"ErrGovernorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying governor\\\"}],\\\"ErrGovernorNotMatch(address,address)\\\":[{\\\"notice\\\":\\\"Error indicating that the msg.sender is not match the required governor\\\"}],\\\"ErrInvalidInput()\\\":[{\\\"notice\\\":\\\"Common invalid input error\\\"}],\\\"ErrOperatorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying operator\\\"}]},\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"round(uint256)\\\":{\\\"notice\\\":\\\"chain id = 0 for global proposal\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/mainchain/MainchainBridgeManager.sol\\\":\\\"MainchainBridgeManager\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\\\\\"./BridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IHasContracts, HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\n\\\\nimport { IBridgeManager } from \\\\\\\"../../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\nimport { AddressArrayUtils } from \\\\\\\"../../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"../../utils/RoleAccess.sol\\\\\\\";\\\\nimport { TUint256Slot } from \\\\\\\"../../types/Types.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"./BridgeManagerQuorum.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n struct BridgeManagerStorage {\\\\n /// @notice List of the governors.\\\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\\\n address[] _governors;\\\\n address[] _operators;\\\\n /// @dev Mapping from address to the governor weight\\\\n mapping(address governor => uint96 weight) _governorWeight;\\\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\\\n mapping(address operator => uint96 weight) _operatorWeight;\\\\n /// @dev Total weight of all governors / operators.\\\\n uint256 _totalWeight;\\\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\\\n uint256 _minRequiredGovernor;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerStorageLocation\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n bytes32 public DOMAIN_SEPARATOR;\\\\n\\\\n modifier onlyGovernor() virtual {\\\\n _requireGovernor(msg.sender);\\\\n _;\\\\n }\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n function __BridgeManager_init(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n __BridgeManagerQuorum_init_unchained(num, denom);\\\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n function __BridgeManager_init_unchained(\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n _setContract(ContractType.BRIDGE, bridgeContract);\\\\n\\\\n DOMAIN_SEPARATOR = keccak256(\\\\n abi.encode(\\\\n keccak256(\\\\\\\"EIP712Domain(string name,string version,bytes32 salt)\\\\\\\"),\\\\n keccak256(\\\\\\\"BridgeManager\\\\\\\"), // name hash\\\\n keccak256(\\\\\\\"3\\\\\\\"), // version hash\\\\n keccak256(abi.encode(\\\\\\\"BRIDGE_MANAGER\\\\\\\", roninChainId)) // salt\\\\n )\\\\n );\\\\n\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n _setMinRequiredGovernor(3);\\\\n }\\\\n\\\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerStorageLocation\\\\n }\\\\n }\\\\n\\\\n // ===================== CONFIG ========================\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\\\n _setMinRequiredGovernor(min);\\\\n }\\\\n\\\\n function _setMinRequiredGovernor(uint min) internal {\\\\n if (min < 3) revert ErrInvalidInput();\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n $._minRequiredGovernor = min;\\\\n emit MinRequiredGovernorUpdated(min);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the caller has governor role access.\\\\n */\\\\n function _requireGovernor(address addr) internal view {\\\\n if (_getGovernorWeight(addr) == 0) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\\\n }\\\\n }\\\\n\\\\n // ===================== WEIGHTS METHOD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getTotalWeight() public view returns (uint256) {\\\\n return _totalWeight();\\\\n }\\\\n\\\\n function _totalWeight() internal view override returns (uint256) {\\\\n return _getBridgeManagerStorage()._totalWeight;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weights of a given array of governors.\\\\n */\\\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n weights = new uint96[](governors.length);\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n weights[i] = $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\\\n weight = _getGovernorWeight(governor);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\\\n */\\\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\\\n return _getBridgeManagerStorage()._governorWeight[governor];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\\\n sum = _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\\\n * @param governors The non-duplicated input.\\\\n */\\\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n sum += $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n return $._operatorWeight[bridgeOperator];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n (uint256 numerator, uint256 denominator) = getThreshold();\\\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\\\n }\\\\n\\\\n // ===================== MANAGER CRUD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _removeBridgeOperators(bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to add bridge operators.\\\\n *\\\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to add bridge operators.\\\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\\\n *\\\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\\\n */\\\\n function _addBridgeOperators(\\\\n uint96[] memory voteWeights,\\\\n address[] memory newGovernors,\\\\n address[] memory newOperators\\\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = newOperators.length;\\\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\\\n addeds = new bool[](length);\\\\n\\\\n // simply skip add operations if inputs are empty.\\\\n if (length == 0) return addeds;\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint96 iVoteWeight;\\\\n uint256 accumulatedWeight;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iGovernor = newGovernors[i];\\\\n iOperator = newOperators[i];\\\\n iVoteWeight = voteWeights[i];\\\\n\\\\n // Check non-zero inputs\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n\\\\n // Check not yet added operators\\\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\\\n\\\\n // Only add the valid operator\\\\n if (addeds[i]) {\\\\n // Add governor to list, update governor weight\\\\n $._governors.push(iGovernor);\\\\n $._governorWeight[iGovernor] = iVoteWeight;\\\\n\\\\n // Add operator to list, update governor weight\\\\n $._operators.push(iOperator);\\\\n $._operatorWeight[iOperator] = iVoteWeight;\\\\n\\\\n accumulatedWeight += iVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight += accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\\\n\\\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to remove bridge operators.\\\\n *\\\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to remove bridge operators.\\\\n *\\\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\\\n */\\\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = removingOperators.length;\\\\n removeds = new bool[](length);\\\\n\\\\n // simply skip remove operations if inputs are empty.\\\\n if (length == 0) return removeds;\\\\n if ($._governors.length - length < $._minRequiredGovernor) {\\\\n revert ErrBelowMinRequiredGovernors();\\\\n }\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint256 accumulatedWeight;\\\\n uint idx;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iOperator = removingOperators[i];\\\\n\\\\n // Check non-zero inputs\\\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n\\\\n // Check existing operators\\\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\\\n\\\\n // Only remove the valid operator\\\\n if (removeds[i]) {\\\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\\\n\\\\n // Remove governor from list, update governor weight\\\\n uint lastIdx = $._governors.length - 1;\\\\n $._governors[idx] = $._governors[lastIdx];\\\\n $._governors.pop();\\\\n delete $._governorWeight[iGovernor];\\\\n\\\\n // Remove operator from list, update operator weight\\\\n $._operators[idx] = $._operators[lastIdx];\\\\n $._operators.pop();\\\\n delete $._operatorWeight[iOperator];\\\\n\\\\n accumulatedWeight += removingVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight -= accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\\\n\\\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\\\n }\\\\n\\\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\\\n for (uint i; i < $_array.length; i++) {\\\\n if (addr == $_array[i]) {\\\\n return (true, i);\\\\n }\\\\n }\\\\n\\\\n return (false, type(uint256).max);\\\\n }\\\\n\\\\n // ================= MANAGER VIEW METHODS =============\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256) {\\\\n return _getBridgeManagerStorage()._operators.length;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n return $._operatorWeight[addr] > 0;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._operators;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernors() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._governors;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator) {\\\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\\\n if (!found) revert ErrGovernorNotFound(governor);\\\\n\\\\n return _getBridgeManagerStorage()._operators[idx];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor) {\\\\n (governor,) = _getGovernorOf(operator);\\\\n }\\\\n\\\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\\\n if (!found) revert ErrOperatorNotFound(operator);\\\\n\\\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n governors = $._governors;\\\\n bridgeOperators = $._operators;\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { EnumerableSet } from \\\\\\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\\\\\";\\\\nimport { IBridgeManagerCallbackRegister } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title BridgeManagerCallbackRegister\\\\n * @dev A contract that manages callback registrations and execution for a bridge.\\\\n */\\\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n /**\\\\n * @dev Storage slot for the address set of callback registers.\\\\n * @dev Value is equal to keccak256(\\\\\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\\\\\") - 1.\\\\n */\\\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\\\n\\\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\\\n _registerCallbacks(callbackRegisters);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\\\n _registerCallbacks(registers);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n _callbackRegisters.remove(registers[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\\\n registers = _getCallbackRegisters().values();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to register multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n address register;\\\\n bool regSuccess;\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n register = registers[i];\\\\n\\\\n _requireHasCode(register);\\\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\\\n\\\\n regSuccess = _callbackRegisters.add(register);\\\\n\\\\n emit CallbackRegistered(register, regSuccess);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\\\n */\\\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\\\n * @param callbackFnSig The function signature of the callback method.\\\\n * @param inputs The data to pass to the callback method.\\\\n * @return allSuccess Return true if all internal calls are success\\\\n */\\\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\\\n allSuccess = true;\\\\n\\\\n address[] memory registers = _getCallbackRegisters().values();\\\\n uint256 length = registers.length;\\\\n if (length == 0) return allSuccess;\\\\n\\\\n bool[] memory successes = new bool[](length);\\\\n bytes[] memory returnDatas = new bytes[](length);\\\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n // First, attempt to call normally\\\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\\\n\\\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\\\n if (!successes[i]) {\\\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\\\n allSuccess = allSuccess && successes[i];\\\\n }\\\\n }\\\\n\\\\n emit Notified(callData, registers, successes, returnDatas);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the address set of callback registers.\\\\n * @return callbackRegisters The storage reference to the callback registers.\\\\n */\\\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IQuorum } from \\\\\\\"../../interfaces/IQuorum.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\\\n struct BridgeManagerQuorumStorage {\\\\n uint256 _nonce;\\\\n uint256 _numerator;\\\\n uint256 _denominator;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerQuorumStorage\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\\\n\\\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n $._nonce = 1;\\\\n\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerQuorumStorage\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n return ($._numerator, $._denominator);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\\\n\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n uint256 prevNum = $._numerator;\\\\n uint256 prevDenom = $._denominator;\\\\n\\\\n $._numerator = num;\\\\n $._denominator = denom;\\\\n\\\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n\\\\n function _totalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/CoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Ballot.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\n\\\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to interact with a finalized vote.\\\\n */\\\\n error ErrVoteIsFinalized();\\\\n\\\\n /**\\\\n * @dev Error thrown when the current proposal is not completed.\\\\n */\\\\n error ErrCurrentProposalIsNotCompleted();\\\\n\\\\n struct ProposalVote {\\\\n VoteStatus status;\\\\n bytes32 hash;\\\\n uint256 againstVoteWeight; // Total weight of against votes\\\\n uint256 forVoteWeight; // Total weight of for votes\\\\n address[] forVoteds; // Array of addresses voting for\\\\n address[] againstVoteds; // Array of addresses voting against\\\\n uint256 expiryTimestamp;\\\\n mapping(address => Signature) sig;\\\\n mapping(address => bool) voted;\\\\n }\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\\\n /// @dev Emitted when the proposal is voted\\\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\\\n /// @dev Emitted when the proposal is approved\\\\n event ProposalApproved(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is reject\\\\n event ProposalRejected(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is expired\\\\n event ProposalExpired(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the proposal is executed\\\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\\\n /// @dev Emitted when the proposal expiry duration is changed.\\\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\\\n\\\\n /// @dev Mapping from chain id => vote round\\\\n /// @notice chain id = 0 for global proposal\\\\n mapping(uint256 => uint256) public round;\\\\n /// @dev Mapping from chain id => vote round => proposal vote\\\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\\\n\\\\n uint256 internal _proposalExpiryDuration;\\\\n\\\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\\\n __CoreGovernance_init_unchained(expiryDuration);\\\\n }\\\\n\\\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\\\n _setProposalExpiryDuration(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\\\n * if it is expired and not increase the `_round`.\\\\n */\\\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\\\n _round = round[_chainId];\\\\n // Skip checking for the first ever round\\\\n if (_round == 0) {\\\\n _round = round[_chainId] = 1;\\\\n } else {\\\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\\\n if (!_isExpired) {\\\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\\\n unchecked {\\\\n _round = ++round[_chainId];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\\\n */\\\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\\\n _vote.hash = _proposalHash;\\\\n _vote.expiryTimestamp = _expiryTimestamp;\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The chain id is not equal to 0.\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `ProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\\\n uint256 chainId = proposal.chainId;\\\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n round_ = _createVotingRound(chainId);\\\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the round.\\\\n * - The vote is not finalized.\\\\n * - The voter has not voted for the round.\\\\n *\\\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\\\n * proposal is approved, executed or rejected.\\\\n *\\\\n */\\\\n function _castVote(\\\\n Proposal.ProposalDetail memory proposal,\\\\n Ballot.VoteType support,\\\\n uint256 minimumForVoteWeight,\\\\n uint256 minimumAgainstVoteWeight,\\\\n address voter,\\\\n Signature memory signature,\\\\n uint256 voterWeight\\\\n ) internal virtual returns (bool done) {\\\\n uint256 chainId = proposal.chainId;\\\\n uint256 round_ = proposal.nonce;\\\\n ProposalVote storage _vote = vote[chainId][round_];\\\\n\\\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\\\n return true;\\\\n }\\\\n\\\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\\\n\\\\n _vote.voted[voter] = true;\\\\n // Stores the signature if it is not empty\\\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\\\n _vote.sig[voter] = signature;\\\\n }\\\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\\\n\\\\n uint256 _forVoteWeight;\\\\n uint256 _againstVoteWeight;\\\\n if (support == Ballot.VoteType.For) {\\\\n _vote.forVoteds.push(voter);\\\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\\\n } else if (support == Ballot.VoteType.Against) {\\\\n _vote.againstVoteds.push(voter);\\\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_forVoteWeight >= minimumForVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n if (proposal.isAutoExecute()) {\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev The specified executor executes the proposal on an approved proposal.\\\\n */\\\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\\\n bytes32 proposalHash = proposal.hash();\\\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\\\n\\\\n if (_vote.hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\\\n }\\\\n\\\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\\\n\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n\\\\n /**\\\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\\\n *\\\\n * Emits the event `ProposalExpired` if the vote is expired.\\\\n *\\\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\\\n * before or it will emit an unexpected event of `ProposalExpired`.\\\\n */\\\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\\\n\\\\n if (isExpired) {\\\\n emit ProposalExpired(proposalVote.hash);\\\\n\\\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n delete proposalVote.status;\\\\n delete proposalVote.hash;\\\\n delete proposalVote.againstVoteWeight;\\\\n delete proposalVote.forVoteWeight;\\\\n delete proposalVote.forVoteds;\\\\n delete proposalVote.againstVoteds;\\\\n delete proposalVote.expiryTimestamp;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\\\n */\\\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\\\n if (proposal.executable()) {\\\\n vote_.status = VoteStatus.Executed;\\\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the expiry duration for a new proposal.\\\\n */\\\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\\\n _proposalExpiryDuration = expiryDuration;\\\\n emit ProposalExpiryDurationChanged(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter casted for the proposal.\\\\n */\\\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\\\n return vote_.voted[voter];\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns total weight from validators.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns minimum vote to pass a proposal.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\\\n */\\\\n function _getChainType() internal view virtual returns (ChainType);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"./CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event GlobalProposalCreated(\\\\n uint256 indexed round,\\\\n bytes32 indexed proposalHash,\\\\n Proposal.ProposalDetail proposal,\\\\n bytes32 globalProposalHash,\\\\n GlobalProposal.GlobalProposalDetail globalProposal,\\\\n address creator\\\\n );\\\\n\\\\n /// @dev Emitted when the target options are updated\\\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\\\n\\\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\\\n }\\\\n\\\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\\\n _updateManyTargetOption(targetOptions, addrs);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes for a global proposal.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n address executor,\\\\n uint256[] memory values,\\\\n bytes[] memory calldatas,\\\\n uint256[] memory gasAmounts,\\\\n address creator\\\\n ) internal virtual {\\\\n uint256 round_ = _createVotingRound(0);\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes global proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobalStruct(\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\\\n address creator\\\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n uint256 round_ = _createVotingRound(0);\\\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\\\n\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\\\n */\\\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal helper of {resolveTargets}.\\\\n *\\\\n * @param strict When the param is set to `true`, revert on non-existent target.\\\\n */\\\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\\\n targets = new address[](targetOptions.length);\\\\n\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n *\\\\n * Requirement:\\\\n * - Only allow self-call through proposal.\\\\n *\\\\n */\\\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\\\n // HACK: Cannot reuse the existing library due to too deep stack\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n _updateManyTargetOption(targetOptions, targets);\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n */\\\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\\\n _updateTargetOption(targetOptions[i], targets[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates `targetOption` to `target`.\\\\n *\\\\n * Requirement:\\\\n * - Emit a `TargetOptionUpdated` event.\\\\n */\\\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\\\n _targetOptionsMap[targetOption] = target;\\\\n emit TargetOptionUpdated(targetOption, target);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract CommonGovernanceRelay is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Relays votes by signatures.\\\\n *\\\\n * @notice Does not store the voter signature into storage.\\\\n *\\\\n */\\\\n function _relayVotesBySignatures(\\\\n Proposal.ProposalDetail memory _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n bytes32 proposalHash\\\\n ) internal {\\\\n if (!(_supports.length > 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\\\n\\\\n address[] memory _forVoteSigners = new address[](_signatures.length);\\\\n address[] memory _againstVoteSigners = new address[](_signatures.length);\\\\n\\\\n {\\\\n uint256 _forVoteCount;\\\\n uint256 _againstVoteCount;\\\\n\\\\n {\\\\n address _signer;\\\\n address _lastSigner;\\\\n Ballot.VoteType _support;\\\\n Signature calldata _sig;\\\\n\\\\n for (uint256 _i; _i < _signatures.length;) {\\\\n _sig = _signatures[_i];\\\\n _support = _supports[_i];\\\\n\\\\n if (_support == Ballot.VoteType.For) {\\\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\\\n _forVoteSigners[_forVoteCount++] = _signer;\\\\n } else if (_support == Ballot.VoteType.Against) {\\\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\\\n _againstVoteSigners[_againstVoteCount++] = _signer;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\\\n _lastSigner = _signer;\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n assembly {\\\\n mstore(_forVoteSigners, _forVoteCount)\\\\n mstore(_againstVoteSigners, _againstVoteCount)\\\\n }\\\\n }\\\\n\\\\n ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce];\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _totalForVoteWeight = _sumWeight(_forVoteSigners);\\\\n if (_totalForVoteWeight >= _minimumForVoteWeight) {\\\\n if (_totalForVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n _tryExecute(_vote, _proposal);\\\\n return;\\\\n }\\\\n\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n uint256 _totalAgainstVoteWeight = _sumWeight(_againstVoteSigners);\\\\n if (_totalAgainstVoteWeight >= _minimumAgainstVoteWeight) {\\\\n if (_totalAgainstVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n return;\\\\n }\\\\n\\\\n revert ErrRelayFailed(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the weight of the governor list.\\\\n */\\\\n function _sumWeight(address[] memory _governors) internal view virtual returns (uint256);\\\\n\\\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x48b03ea86a3e312de4242115554d2188891719bcd3a20d8e4504b03319ba6993\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../GlobalCoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceRelay.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGovernance {\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\\\n */\\\\n function globalProposalRelayed(uint256 _round) external view returns (bool) {\\\\n return vote[0][_round].status != VoteStatus.Pending;\\\\n }\\\\n\\\\n /**\\\\n * @dev Relays voted global proposal.\\\\n *\\\\n * Requirements:\\\\n * - The relay proposal is finalized.\\\\n *\\\\n */\\\\n function _relayGlobalProposal(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures,\\\\n address creator\\\\n ) internal {\\\\n Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator);\\\\n _relayVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d168ae3300e07f3b6312c61ea3d6021a12722c7122d9f2f3f782909d47e05d4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceRelay.sol\\\\\\\";\\\\n\\\\nabstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Relays voted proposal.\\\\n *\\\\n * Requirements:\\\\n * - The relay proposal is finalized.\\\\n *\\\\n */\\\\n function _relayProposal(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n address _creator\\\\n ) internal {\\\\n _proposeProposalStruct(_proposal, _creator);\\\\n _relayVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x050da96d4079cfb515a09ee8a61d5b6c782adf4559b2c66b618bd51f41ca1cd4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallback.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManagerCallback\\\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\\\n */\\\\ninterface IBridgeManagerCallback is IERC165 {\\\\n /**\\\\n * @dev Handles the event when bridge operators are added.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\\\n\\\\n /**\\\\n * @dev Handles the event when bridge operators are removed.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerCallbackRegister {\\\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\\\n\\\\n event CallbackRegistered(address, bool);\\\\n /**\\\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\\\n */\\\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\\\n\\\\n /**\\\\n * @dev Retrieves the addresses of registered callbacks.\\\\n * @return registers An array containing the addresses of registered callbacks.\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers);\\\\n\\\\n /**\\\\n * @dev Registers multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external;\\\\n\\\\n /**\\\\n * @dev Unregisters multiple callbacks from the bridge.\\\\n * @param registers The array of callback addresses to unregister.\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/ChainTypeConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface ChainTypeConsumer {\\\\n enum ChainType {\\\\n RoninChain,\\\\n Mainchain\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/SignatureConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface SignatureConsumer {\\\\n struct Signature {\\\\n uint8 v;\\\\n bytes32 r;\\\\n bytes32 s;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/VoteStatusConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface VoteStatusConsumer {\\\\n enum VoteStatus {\\\\n Pending,\\\\n Approved,\\\\n Executed,\\\\n Rejected,\\\\n Expired\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/Ballot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\n\\\\nlibrary Ballot {\\\\n using ECDSA for bytes32;\\\\n\\\\n enum VoteType {\\\\n For,\\\\n Against\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Ballot(bytes32 proposalHash,uint8 support)\\\\\\\");\\\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\\\n\\\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, BALLOT_TYPEHASH)\\\\n mstore(add(ptr, 0x20), _proposalHash)\\\\n mstore(add(ptr, 0x40), _support)\\\\n digest := keccak256(ptr, 0x60)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/GlobalProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./Proposal.sol\\\\\\\";\\\\n\\\\nlibrary GlobalProposal {\\\\n /**\\\\n * @dev Error thrown when attempting to interact with an unsupported target.\\\\n */\\\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\\\n\\\\n enum TargetOption {\\\\n BridgeManager, // 0\\\\n GatewayContract, // 1\\\\n BridgeReward, // 2\\\\n BridgeSlash, // 3\\\\n BridgeTracking, // 4\\\\n PauseEnforcer // 5\\\\n\\\\n }\\\\n\\\\n struct GlobalProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n uint256 expiryTimestamp;\\\\n address executor;\\\\n TargetOption[] targetOptions;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = self.values;\\\\n TargetOption[] memory targets = self.targetOptions;\\\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\\\n uint256[] memory gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length;) {\\\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\\\n\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * proposal.nonce,\\\\n * proposal.expiryTimestamp,\\\\n * proposal.executor,\\\\n * targetsHash,\\\\n * valuesHash,\\\\n * calldatasHash,\\\\n * gasAmountsHash\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0x80), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x100)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts into the normal proposal.\\\\n */\\\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\\\n detail_.nonce = self.nonce;\\\\n detail_.chainId = 0;\\\\n detail_.expiryTimestamp = self.expiryTimestamp;\\\\n detail_.executor = self.executor;\\\\n\\\\n detail_.targets = new address[](self.targetOptions.length);\\\\n detail_.values = self.values;\\\\n detail_.calldatas = self.calldatas;\\\\n detail_.gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\\\n detail_.targets[i] = targets[i];\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Proposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nlibrary Proposal {\\\\n /**\\\\n * @dev Error thrown when there is insufficient gas to execute a function.\\\\n */\\\\n error ErrInsufficientGas(bytes32 proposalHash);\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\\\n */\\\\n error ErrInvalidExpiryTimestamp();\\\\n\\\\n /**\\\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\\n */\\\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\\\n\\\\n struct ProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n // Value 0: all chain should run this proposal\\\\n // Other values: only specific chain has to execute\\\\n uint256 chainId;\\\\n uint256 expiryTimestamp;\\\\n // The address that execute the proposal after the proposal passes.\\\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\\\n address executor;\\\\n address[] targets;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\\\n\\\\n /**\\\\n * @dev Validates the proposal.\\\\n */\\\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\\\n if (\\\\n !(\\\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\\\n && proposal.targets.length == proposal.gasAmounts.length\\\\n )\\\\n ) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\\\n revert ErrInvalidExpiryTimestamp();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = proposal.values;\\\\n address[] memory targets = proposal.targets;\\\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length; ++i) {\\\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\\\n }\\\\n\\\\n // return\\\\n // keccak256(\\\\n // abi.encode(\\\\n // TYPE_HASH,\\\\n // proposal.nonce,\\\\n // proposal.chainId,\\\\n // proposal.expiryTimestamp\\\\n // proposal.executor\\\\n // targetsHash,\\\\n // valuesHash,\\\\n // calldatasHash,\\\\n // gasAmountsHash\\\\n // )\\\\n // );\\\\n // /\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0x100), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x120)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\\\n */\\\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\\\n return proposal.executor == address(0);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is executable for the current chain.\\\\n *\\\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\\\n *\\\\n */\\\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal.\\\\n */\\\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\\\n\\\\n successCalls = new bool[](proposal.targets.length);\\\\n returnDatas = new bytes[](proposal.targets.length);\\\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\\\n\\\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\\\n\\\\n if (!successCalls[i]) {\\\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/mainchain/MainchainBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { CoreGovernance } from \\\\\\\"../extensions/sequential-governance/CoreGovernance.sol\\\\\\\";\\\\nimport { GlobalCoreGovernance, GlobalGovernanceRelay } from \\\\\\\"../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\\\\\";\\\\nimport { GovernanceRelay } from \\\\\\\"../extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\\\\\";\\\\nimport { ContractType, BridgeManager } from \\\\\\\"../extensions/bridge-operator-governance/BridgeManager.sol\\\\\\\";\\\\nimport { Ballot } from \\\\\\\"../libraries/Ballot.sol\\\\\\\";\\\\nimport { Proposal } from \\\\\\\"../libraries/Proposal.sol\\\\\\\";\\\\nimport { GlobalProposal } from \\\\\\\"../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\ncontract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGovernanceRelay {\\\\n uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255;\\\\n\\\\n function initialize(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights,\\\\n GlobalProposal.TargetOption[] memory targetOptions,\\\\n address[] memory targets\\\\n ) external initializer {\\\\n __CoreGovernance_init(DEFAULT_EXPIRY_DURATION);\\\\n __GlobalCoreGovernance_init(targetOptions, targets);\\\\n __BridgeManager_init(num, denom, roninChainId, bridgeContract, callbackRegisters, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceRelay-_relayProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n */\\\\n function relayProposal(\\\\n Proposal.ProposalDetail calldata proposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor {\\\\n _requireExecutor(proposal.executor, msg.sender);\\\\n _relayProposal(proposal, supports_, signatures, msg.sender);\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceRelay-_relayGlobalProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n */\\\\n function relayGlobalProposal(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor {\\\\n _requireExecutor(globalProposal.executor, msg.sender);\\\\n _relayGlobalProposal({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender });\\\\n }\\\\n\\\\n function _requireExecutor(address executor, address caller) internal pure {\\\\n if (executor != address(0) && caller != executor) {\\\\n revert ErrNonExecutorCannotRelay(executor, caller);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the minimum vote weight required for governance actions.\\\\n * @return minimumVoteWeight The minimum vote weight required for governance actions.\\\\n */\\\\n function _getMinimumVoteWeight() internal view override returns (uint256) {\\\\n return minimumVoteWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the expiry duration for a new proposal.\\\\n */\\\\n function getProposalExpiryDuration() external view returns (uint256) {\\\\n return _proposalExpiryDuration;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the total weights of all governors.\\\\n * @return totalWeights The total weights of all governors combined.\\\\n */\\\\n function _getTotalWeight() internal view override returns (uint256) {\\\\n return getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of weights for a given array of governors.\\\\n * @param governors An array containing the addresses of governors to calculate the sum of weights.\\\\n * @return sumWeights The sum of weights for the provided governors.\\\\n */\\\\n function _sumWeight(address[] memory governors) internal view override returns (uint256) {\\\\n return _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the chain type of the contract.\\\\n * @return chainType The chain type, indicating the type of the chain the contract operates on (e.g., Mainchain).\\\\n */\\\\n function _getChainType() internal pure override returns (ChainType) {\\\\n return ChainType.Mainchain;\\\\n }\\\\n\\\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\\\n return DOMAIN_SEPARATOR;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xea177997b7100f310369b8fd530ea48ab823b06a53424c14f150cef723584c02\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/Types.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { LibTUint256Slot } from \\\\\\\"./operations/LibTUint256Slot.sol\\\\\\\";\\\\n\\\\ntype TUint256Slot is bytes32;\\\\n\\\\nusing {\\\\n LibTUint256Slot.add,\\\\n LibTUint256Slot.sub,\\\\n LibTUint256Slot.mul,\\\\n LibTUint256Slot.div,\\\\n LibTUint256Slot.load,\\\\n LibTUint256Slot.store,\\\\n LibTUint256Slot.addAssign,\\\\n LibTUint256Slot.subAssign,\\\\n LibTUint256Slot.preDecrement,\\\\n LibTUint256Slot.postDecrement,\\\\n LibTUint256Slot.preIncrement,\\\\n LibTUint256Slot.postIncrement\\\\n} for TUint256Slot global;\\\\n\\\",\\\"keccak256\\\":\\\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/operations/LibTUint256Slot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { TUint256Slot } from \\\\\\\"../Types.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title LibTUint256Slot\\\\n * @dev Library for handling unsigned 256-bit integers.\\\\n */\\\\nlibrary LibTUint256Slot {\\\\n /// @dev value is equal to bytes4(keccak256(\\\\\\\"Panic(uint256)\\\\\\\"))\\\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\\\n /// @dev error code for {Arithmetic over/underflow} error\\\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\\\n /// @dev error code for {Division or modulo by 0} error\\\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\\\n\\\\n /**\\\\n * @dev Loads the value of the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @return val The loaded value.\\\\n */\\\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\\\n assembly {\\\\n val := sload(self)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a value into the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to be stored.\\\\n */\\\\n function store(TUint256Slot self, uint256 other) internal {\\\\n assembly {\\\\n sstore(self, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Multiplies the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to multiply by.\\\\n * @return res The resulting value after multiplication.\\\\n */\\\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n if iszero(iszero(storedVal)) {\\\\n res := mul(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if iszero(eq(other, div(res, storedVal))) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Divides the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to divide by.\\\\n * @return res The resulting value after division.\\\\n */\\\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n // revert if divide by zero\\\\n if iszero(other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, DIVISION_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n res := div(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction.\\\\n */\\\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n\\\\n // Underflow check\\\\n if lt(storedVal, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n\\\\n res := sub(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition.\\\\n */\\\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n res := add(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if lt(res, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after incrementing.\\\\n */\\\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = addAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The original value before incrementing.\\\\n */\\\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res + 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after decrementing.\\\\n */\\\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = subAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value before decrementing.\\\\n */\\\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res - 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition and storage.\\\\n */\\\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = add(self, other));\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction and storage.\\\\n */\\\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = sub(self, other));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", - "nonce": 0, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrBelowMinRequiredGovernors\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrCurrentProposalIsNotCompleted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrDuplicated\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrExistOneInternalCallFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"required\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotMatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidArguments\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInput\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidVoteWeight\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrOnlySelfCall\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrOperatorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrUnsupportedInterface\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrVoteIsFinalized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrZeroAddress\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorAddingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorRemovingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"fromBridgeOperator\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"toBridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"CallbackRegistered\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"globalProposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GlobalProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"MinRequiredGovernorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"Notified\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalApproved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"successCalls\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"ProposalExecuted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalExpired\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"duration\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalExpiryDurationChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalRejected\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalVoted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption\\\",\\\"name\\\":\\\"targetOption\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"TargetOptionUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DOMAIN_SEPARATOR\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"addBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getBridgeOperatorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getBridgeOperators\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getCallbackRegisters\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getFullBridgeOperatorInfos\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"getGovernorWeights\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getGovernors\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getOperatorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getProposalExpiryDuration\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getTotalWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"globalProposalRelayed\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"hotfix__mapTokensAndThresholds_registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"roninChainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeContract\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"callbackRegisters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"initialize\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"relayGlobalProposal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"relayProposal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"removeBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"resolveTargets\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"round\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setMinRequiredGovernor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"sumGovernorsWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"sum\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"unregisterCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"updateManyTargetOption\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"vote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"hash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"againstVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"forVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrCurrentProposalIsNotCompleted()\\\":[{\\\"details\\\":\\\"Error thrown when the current proposal is not completed.\\\"}],\\\"ErrDuplicated(bytes4)\\\":[{\\\"details\\\":\\\"Error thrown when a duplicated element is detected in an array.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature that invoke the error.\\\"}}],\\\"ErrInvalidArguments(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that arguments are invalid.\\\"}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidVoteWeight(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote weight is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid vote weight.\\\"}}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrOnlySelfCall(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a function can only be called by the contract itself.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that can only be called by the contract itself.\\\"}}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnsupportedInterface(bytes4,address)\\\":[{\\\"details\\\":\\\"The error indicating an unsupported interface.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address where the unsupported interface was encountered.\\\",\\\"interfaceId\\\":\\\"The bytes4 interface identifier that is not supported.\\\"}}],\\\"ErrVoteIsFinalized()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to interact with a finalized vote.\\\"}],\\\"ErrZeroAddress(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that given address is null when it should not.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"BridgeOperatorAddingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to add.\\\"},\\\"BridgeOperatorRemovingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to remove.\\\"},\\\"BridgeOperatorUpdated(address,address,address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is updated.\\\"},\\\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Emitted when new bridge operators are added.\\\"},\\\"BridgeOperatorsRemoved(bool[],address[])\\\":{\\\"details\\\":\\\"Emitted when bridge operators are removed.\\\"},\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"MinRequiredGovernorUpdated(uint256)\\\":{\\\"details\\\":\\\"Emitted when the minimum number of required governors is updated.\\\"},\\\"Notified(bytes,address[],bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the contract notifies multiple registers with statuses and return data.\\\"},\\\"ProposalApproved(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the proposal is approved\\\"},\\\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"ProposalExecuted(bytes32,bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the proposal is executed\\\"},\\\"ProposalExpired(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is expired\\\"},\\\"ProposalExpiryDurationChanged(uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal expiry duration is changed.\\\"},\\\"ProposalRejected(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is reject\\\"},\\\"ProposalVoted(bytes32,address,uint8,uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal is voted\\\"},\\\"TargetOptionUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when the target options are updated\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addBridgeOperators(uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Adds multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to add.\\\",\\\"governors\\\":\\\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\"}},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"getBridgeOperatorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific bridge operator.\\\",\\\"params\\\":{\\\"bridgeOperator\\\":\\\"The address of the bridge operator to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"The vote weight of the specified bridge operator.\\\"}},\\\"getBridgeOperators()\\\":{\\\"details\\\":\\\"Returns an array of all bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all bridge operators.\\\"}},\\\"getCallbackRegisters()\\\":{\\\"details\\\":\\\"Retrieves the addresses of registered callbacks.\\\",\\\"returns\\\":{\\\"registers\\\":\\\"An array containing the addresses of registered callbacks.\\\"}},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getFullBridgeOperatorInfos()\\\":{\\\"details\\\":\\\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\",\\\"returns\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the registered bridge operators.\\\",\\\"governors\\\":\\\"An array of addresses representing the governors of each bridge operator.\\\",\\\"weights\\\":\\\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\\\"}},\\\"getGovernorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `governor` of a `operator`.\\\"},\\\"getGovernorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific governor.\\\",\\\"params\\\":{\\\"governor\\\":\\\"The address of the governor to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"voteWeight The vote weight of the specified governor.\\\"}},\\\"getGovernorWeights(address[])\\\":{\\\"details\\\":\\\"Returns the weights of a list of governor addresses.\\\"},\\\"getGovernors()\\\":{\\\"details\\\":\\\"Returns an array of all governors.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all governors.\\\"}},\\\"getOperatorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `operator` of a `governor`.\\\"},\\\"getProposalExpiryDuration()\\\":{\\\"details\\\":\\\"Returns the expiry duration for a new proposal.\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"getTotalWeight()\\\":{\\\"details\\\":\\\"Returns total weights.\\\"},\\\"globalProposalRelayed(uint256)\\\":{\\\"details\\\":\\\"Returns whether the voter `_voter` casted vote for the proposal.\\\"},\\\"isBridgeOperator(address)\\\":{\\\"details\\\":\\\"Checks if the given address is a bridge operator.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address to check.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"A boolean indicating whether the address is a bridge operator.\\\"}},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"registerCallbacks(address[])\\\":{\\\"details\\\":\\\"Registers multiple callbacks with the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to register.\\\"}},\\\"relayGlobalProposal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceRelay-_relayGlobalProposal`. Requirements: - The method caller is governor.\\\"},\\\"relayProposal((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceRelay-_relayProposal`. Requirements: - The method caller is governor.\\\"},\\\"removeBridgeOperators(address[])\\\":{\\\"details\\\":\\\"Removes multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to remove.\\\"}},\\\"resolveTargets(uint8[])\\\":{\\\"details\\\":\\\"Returns corresponding address of target options. Return address(0) on non-existent target.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setMinRequiredGovernor(uint256)\\\":{\\\"details\\\":\\\"Self-call to update the minimum required governor.\\\",\\\"params\\\":{\\\"min\\\":\\\"The minimum number, this must not less than 3.\\\"}},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\\\"},\\\"sumGovernorsWeight(address[])\\\":{\\\"details\\\":\\\"Returns total weights of the governor list.\\\"},\\\"totalBridgeOperator()\\\":{\\\"details\\\":\\\"Returns the total number of bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"The total number of bridge operators.\\\"}},\\\"unregisterCallbacks(address[])\\\":{\\\"details\\\":\\\"Unregisters multiple callbacks from the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to unregister.\\\"}},\\\"updateManyTargetOption(uint8[],address[])\\\":{\\\"details\\\":\\\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"errors\\\":{\\\"ErrBelowMinRequiredGovernors()\\\":[{\\\"notice\\\":\\\"Error indicating that the governors list will go below minimum number of required governor.\\\"}],\\\"ErrGovernorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying governor\\\"}],\\\"ErrGovernorNotMatch(address,address)\\\":[{\\\"notice\\\":\\\"Error indicating that the msg.sender is not match the required governor\\\"}],\\\"ErrInvalidInput()\\\":[{\\\"notice\\\":\\\"Common invalid input error\\\"}],\\\"ErrOperatorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying operator\\\"}]},\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"round(uint256)\\\":{\\\"notice\\\":\\\"chain id = 0 for global proposal\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/mainchain/MainchainBridgeManager.sol\\\":\\\"MainchainBridgeManager\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"./IERC1155Receiver.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC1155MetadataURI.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the basic standard multi-token.\\\\n * See https://eips.ethereum.org/EIPS/eip-1155\\\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\\\n using Address for address;\\\\n\\\\n // Mapping from token ID to account balances\\\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\\\n\\\\n // Mapping from account to operator approvals\\\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\\\n\\\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\\\n string private _uri;\\\\n\\\\n /**\\\\n * @dev See {_setURI}.\\\\n */\\\\n constructor(string memory uri_) {\\\\n _setURI(uri_);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\\\n return\\\\n interfaceId == type(IERC1155).interfaceId ||\\\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\\\n super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155MetadataURI-uri}.\\\\n *\\\\n * This implementation returns the same URI for *all* token types. It relies\\\\n * on the token type ID substitution mechanism\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\\\n *\\\\n * Clients calling this function must replace the `\\\\\\\\{id\\\\\\\\}` substring with the\\\\n * actual token type ID.\\\\n */\\\\n function uri(uint256) public view virtual override returns (string memory) {\\\\n return _uri;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-balanceOf}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `account` cannot be the zero address.\\\\n */\\\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\\\n require(account != address(0), \\\\\\\"ERC1155: address zero is not a valid owner\\\\\\\");\\\\n return _balances[id][account];\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-balanceOfBatch}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `accounts` and `ids` must have the same length.\\\\n */\\\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\\\n public\\\\n view\\\\n virtual\\\\n override\\\\n returns (uint256[] memory)\\\\n {\\\\n require(accounts.length == ids.length, \\\\\\\"ERC1155: accounts and ids length mismatch\\\\\\\");\\\\n\\\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\\\n\\\\n for (uint256 i = 0; i < accounts.length; ++i) {\\\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\\\n }\\\\n\\\\n return batchBalances;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-setApprovalForAll}.\\\\n */\\\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\\\n _setApprovalForAll(_msgSender(), operator, approved);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-isApprovedForAll}.\\\\n */\\\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\\\n return _operatorApprovals[account][operator];\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-safeTransferFrom}.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) public virtual override {\\\\n require(\\\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n _safeTransferFrom(from, to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\\\n */\\\\n function safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) public virtual override {\\\\n require(\\\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: transfer to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: insufficient balance for transfer\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n _balances[id][to] += amount;\\\\n\\\\n emit TransferSingle(operator, from, to, id, amount);\\\\n\\\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC1155: transfer to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n for (uint256 i = 0; i < ids.length; ++i) {\\\\n uint256 id = ids[i];\\\\n uint256 amount = amounts[i];\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: insufficient balance for transfer\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n _balances[id][to] += amount;\\\\n }\\\\n\\\\n emit TransferBatch(operator, from, to, ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\\\n * substitution mechanism\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\\\n *\\\\n * By this mechanism, any occurrence of the `\\\\\\\\{id\\\\\\\\}` substring in either the\\\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\\\n * clients with the token type ID.\\\\n *\\\\n * For example, the `https://token-cdn-domain/\\\\\\\\{id\\\\\\\\}.json` URI would be\\\\n * interpreted by clients as\\\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\\\n * for token type ID 0x4cce0.\\\\n *\\\\n * See {uri}.\\\\n *\\\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\\\n * this function emits no events.\\\\n */\\\\n function _setURI(string memory newuri) internal virtual {\\\\n _uri = newuri;\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _mint(\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: mint to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _balances[id][to] += amount;\\\\n emit TransferSingle(operator, address(0), to, id, amount);\\\\n\\\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _mintBatch(\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: mint to the zero address\\\\\\\");\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n for (uint256 i = 0; i < ids.length; i++) {\\\\n _balances[ids[i]][to] += amounts[i];\\\\n }\\\\n\\\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `from` must have at least `amount` tokens of token type `id`.\\\\n */\\\\n function _burn(\\\\n address from,\\\\n uint256 id,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC1155: burn from the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n\\\\n emit TransferSingle(operator, from, address(0), id, amount);\\\\n\\\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n */\\\\n function _burnBatch(\\\\n address from,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC1155: burn from the zero address\\\\\\\");\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n\\\\n for (uint256 i = 0; i < ids.length; i++) {\\\\n uint256 id = ids[i];\\\\n uint256 amount = amounts[i];\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n }\\\\n\\\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Approve `operator` to operate on all of `owner` tokens\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n */\\\\n function _setApprovalForAll(\\\\n address owner,\\\\n address operator,\\\\n bool approved\\\\n ) internal virtual {\\\\n require(owner != operator, \\\\\\\"ERC1155: setting approval status for self\\\\\\\");\\\\n _operatorApprovals[owner][operator] = approved;\\\\n emit ApprovalForAll(owner, operator, approved);\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before any token transfer. This includes minting\\\\n * and burning, as well as batched variants.\\\\n *\\\\n * The same hook is called on both single and batched variants. For single\\\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\\\n *\\\\n * Calling conditions (for each `id` and `amount` pair):\\\\n *\\\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\\\n * of token type `id` will be transferred to `to`.\\\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\\\n * for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\\\n * will be burned.\\\\n * - `from` and `to` are never both zero.\\\\n * - `ids` and `amounts` have the same, non-zero length.\\\\n *\\\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after any token transfer. This includes minting\\\\n * and burning, as well as batched variants.\\\\n *\\\\n * The same hook is called on both single and batched variants. For single\\\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\\\n *\\\\n * Calling conditions (for each `id` and `amount` pair):\\\\n *\\\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\\\n * of token type `id` will be transferred to `to`.\\\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\\\n * for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\\\n * will be burned.\\\\n * - `from` and `to` are never both zero.\\\\n * - `ids` and `amounts` have the same, non-zero length.\\\\n *\\\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\\\n */\\\\n function _afterTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {}\\\\n\\\\n function _doSafeTransferAcceptanceCheck(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) private {\\\\n if (to.isContract()) {\\\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\\\n revert(\\\\\\\"ERC1155: ERC1155Receiver rejected tokens\\\\\\\");\\\\n }\\\\n } catch Error(string memory reason) {\\\\n revert(reason);\\\\n } catch {\\\\n revert(\\\\\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\\\\\");\\\\n }\\\\n }\\\\n }\\\\n\\\\n function _doSafeBatchTransferAcceptanceCheck(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) private {\\\\n if (to.isContract()) {\\\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\\\n bytes4 response\\\\n ) {\\\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\\\n revert(\\\\\\\"ERC1155: ERC1155Receiver rejected tokens\\\\\\\");\\\\n }\\\\n } catch Error(string memory reason) {\\\\n revert(reason);\\\\n } catch {\\\\n revert(\\\\\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\\\\\");\\\\n }\\\\n }\\\\n }\\\\n\\\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\\\n uint256[] memory array = new uint256[](1);\\\\n array[0] = element;\\\\n\\\\n return array;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ninterface IERC1155 is IERC165 {\\\\n /**\\\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\\\n */\\\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\\\n\\\\n /**\\\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\\\n * transfers.\\\\n */\\\\n event TransferBatch(\\\\n address indexed operator,\\\\n address indexed from,\\\\n address indexed to,\\\\n uint256[] ids,\\\\n uint256[] values\\\\n );\\\\n\\\\n /**\\\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\\\n * `approved`.\\\\n */\\\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\\\n\\\\n /**\\\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\\\n *\\\\n * If an {URI} event was emitted for `id`, the standard\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\\\n * returned by {IERC1155MetadataURI-uri}.\\\\n */\\\\n event URI(string value, uint256 indexed id);\\\\n\\\\n /**\\\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `account` cannot be the zero address.\\\\n */\\\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `accounts` and `ids` must have the same length.\\\\n */\\\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\\\n external\\\\n view\\\\n returns (uint256[] memory);\\\\n\\\\n /**\\\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `operator` cannot be the caller.\\\\n */\\\\n function setApprovalForAll(address operator, bool approved) external;\\\\n\\\\n /**\\\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\\\n *\\\\n * See {setApprovalForAll}.\\\\n */\\\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes calldata data\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] calldata ids,\\\\n uint256[] calldata amounts,\\\\n bytes calldata data\\\\n ) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev _Available since v3.1._\\\\n */\\\\ninterface IERC1155Receiver is IERC165 {\\\\n /**\\\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\\\n *\\\\n * NOTE: To accept the transfer, this must return\\\\n * `bytes4(keccak256(\\\\\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\\\\\"))`\\\\n * (i.e. 0xf23a6e61, or its own function selector).\\\\n *\\\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\\\n * @param from The address which previously owned the token\\\\n * @param id The ID of the token being transferred\\\\n * @param value The amount of tokens being transferred\\\\n * @param data Additional data with no specified format\\\\n * @return `bytes4(keccak256(\\\\\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\\\\\"))` if transfer is allowed\\\\n */\\\\n function onERC1155Received(\\\\n address operator,\\\\n address from,\\\\n uint256 id,\\\\n uint256 value,\\\\n bytes calldata data\\\\n ) external returns (bytes4);\\\\n\\\\n /**\\\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\\\n * been updated.\\\\n *\\\\n * NOTE: To accept the transfer(s), this must return\\\\n * `bytes4(keccak256(\\\\\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\\\\\"))`\\\\n * (i.e. 0xbc197c81, or its own function selector).\\\\n *\\\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\\\n * @param from The address which previously owned the token\\\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\\\n * @param data Additional data with no specified format\\\\n * @return `bytes4(keccak256(\\\\\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\\\\\"))` if transfer is allowed\\\\n */\\\\n function onERC1155BatchReceived(\\\\n address operator,\\\\n address from,\\\\n uint256[] calldata ids,\\\\n uint256[] calldata values,\\\\n bytes calldata data\\\\n ) external returns (bytes4);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\\\n * own tokens and those that they have been approved to use.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Burnable is ERC1155 {\\\\n function burn(\\\\n address account,\\\\n uint256 id,\\\\n uint256 value\\\\n ) public virtual {\\\\n require(\\\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n\\\\n _burn(account, id, value);\\\\n }\\\\n\\\\n function burnBatch(\\\\n address account,\\\\n uint256[] memory ids,\\\\n uint256[] memory values\\\\n ) public virtual {\\\\n require(\\\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n\\\\n _burnBatch(account, ids, values);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\\\n /**\\\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n require(!paused(), \\\\\\\"ERC1155Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC1155.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ninterface IERC1155MetadataURI is IERC1155 {\\\\n /**\\\\n * @dev Returns the URI for token type `id`.\\\\n *\\\\n * If the `\\\\\\\\{id\\\\\\\\}` substring is present in the URI, it must be replaced by\\\\n * clients with the actual token type ID.\\\\n */\\\\n function uri(uint256 id) external view returns (string memory);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC1155Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC1155Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC1155} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\\\n * deploys the contract.\\\\n */\\\\n constructor(string memory uri) ERC1155(uri) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\\\n *\\\\n * See {ERC1155-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n\\\\n _mint(to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\\\n */\\\\n function mintBatch(\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n\\\\n _mintBatch(to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId)\\\\n public\\\\n view\\\\n virtual\\\\n override(AccessControlEnumerable, ERC1155)\\\\n returns (bool)\\\\n {\\\\n return super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Required interface of an ERC721 compliant contract.\\\\n */\\\\ninterface IERC721 is IERC165 {\\\\n /**\\\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\\\n */\\\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\\\n\\\\n /**\\\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\\\n */\\\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\\\n\\\\n /**\\\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\\\n */\\\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\\\n\\\\n /**\\\\n * @dev Returns the number of tokens in ``owner``'s account.\\\\n */\\\\n function balanceOf(address owner) external view returns (uint256 balance);\\\\n\\\\n /**\\\\n * @dev Returns the owner of the `tokenId` token.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `tokenId` must exist.\\\\n */\\\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\\\n\\\\n /**\\\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must exist and be owned by `from`.\\\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId,\\\\n bytes calldata data\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must exist and be owned by `from`.\\\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Transfers `tokenId` token from `from` to `to`.\\\\n *\\\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must be owned by `from`.\\\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\\\n * The approval is cleared when the token is transferred.\\\\n *\\\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The caller must own the token or be an approved operator.\\\\n * - `tokenId` must exist.\\\\n *\\\\n * Emits an {Approval} event.\\\\n */\\\\n function approve(address to, uint256 tokenId) external;\\\\n\\\\n /**\\\\n * @dev Approve or remove `operator` as an operator for the caller.\\\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The `operator` cannot be the caller.\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n */\\\\n function setApprovalForAll(address operator, bool _approved) external;\\\\n\\\\n /**\\\\n * @dev Returns the account approved for `tokenId` token.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `tokenId` must exist.\\\\n */\\\\n function getApproved(uint256 tokenId) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\\\n *\\\\n * See {setApprovalForAll}\\\\n */\\\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\\\\\"./BridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IHasContracts, HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\n\\\\nimport { IBridgeManager } from \\\\\\\"../../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\nimport { AddressArrayUtils } from \\\\\\\"../../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"../../utils/RoleAccess.sol\\\\\\\";\\\\nimport { TUint256Slot } from \\\\\\\"../../types/Types.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"./BridgeManagerQuorum.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n struct BridgeManagerStorage {\\\\n /// @notice List of the governors.\\\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\\\n address[] _governors;\\\\n address[] _operators;\\\\n /// @dev Mapping from address to the governor weight\\\\n mapping(address governor => uint96 weight) _governorWeight;\\\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\\\n mapping(address operator => uint96 weight) _operatorWeight;\\\\n /// @dev Total weight of all governors / operators.\\\\n uint256 _totalWeight;\\\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\\\n uint256 _minRequiredGovernor;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerStorageLocation\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n bytes32 public DOMAIN_SEPARATOR;\\\\n\\\\n modifier onlyGovernor() virtual {\\\\n _requireGovernor(msg.sender);\\\\n _;\\\\n }\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n function __BridgeManager_init(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n __BridgeManagerQuorum_init_unchained(num, denom);\\\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n function __BridgeManager_init_unchained(\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n _setContract(ContractType.BRIDGE, bridgeContract);\\\\n\\\\n DOMAIN_SEPARATOR = keccak256(\\\\n abi.encode(\\\\n keccak256(\\\\\\\"EIP712Domain(string name,string version,bytes32 salt)\\\\\\\"),\\\\n keccak256(\\\\\\\"BridgeManager\\\\\\\"), // name hash\\\\n keccak256(\\\\\\\"3\\\\\\\"), // version hash\\\\n keccak256(abi.encode(\\\\\\\"BRIDGE_MANAGER\\\\\\\", roninChainId)) // salt\\\\n )\\\\n );\\\\n\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n _setMinRequiredGovernor(3);\\\\n }\\\\n\\\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerStorageLocation\\\\n }\\\\n }\\\\n\\\\n // ===================== CONFIG ========================\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\\\n _setMinRequiredGovernor(min);\\\\n }\\\\n\\\\n function _setMinRequiredGovernor(uint min) internal {\\\\n if (min < 3) revert ErrInvalidInput();\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n $._minRequiredGovernor = min;\\\\n emit MinRequiredGovernorUpdated(min);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the caller has governor role access.\\\\n */\\\\n function _requireGovernor(address addr) internal view {\\\\n if (_getGovernorWeight(addr) == 0) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\\\n }\\\\n }\\\\n\\\\n // ===================== WEIGHTS METHOD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getTotalWeight() public view returns (uint256) {\\\\n return _totalWeight();\\\\n }\\\\n\\\\n function _totalWeight() internal view override returns (uint256) {\\\\n return _getBridgeManagerStorage()._totalWeight;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weights of a given array of governors.\\\\n */\\\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n weights = new uint96[](governors.length);\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n weights[i] = $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\\\n weight = _getGovernorWeight(governor);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\\\n */\\\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\\\n return _getBridgeManagerStorage()._governorWeight[governor];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\\\n sum = _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\\\n * @param governors The non-duplicated input.\\\\n */\\\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n sum += $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n return $._operatorWeight[bridgeOperator];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n (uint256 numerator, uint256 denominator) = getThreshold();\\\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\\\n }\\\\n\\\\n // ===================== MANAGER CRUD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _removeBridgeOperators(bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to add bridge operators.\\\\n *\\\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to add bridge operators.\\\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\\\n *\\\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\\\n */\\\\n function _addBridgeOperators(\\\\n uint96[] memory voteWeights,\\\\n address[] memory newGovernors,\\\\n address[] memory newOperators\\\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = newOperators.length;\\\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\\\n addeds = new bool[](length);\\\\n\\\\n // simply skip add operations if inputs are empty.\\\\n if (length == 0) return addeds;\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint96 iVoteWeight;\\\\n uint256 accumulatedWeight;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iGovernor = newGovernors[i];\\\\n iOperator = newOperators[i];\\\\n iVoteWeight = voteWeights[i];\\\\n\\\\n // Check non-zero inputs\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n\\\\n // Check not yet added operators\\\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\\\n\\\\n // Only add the valid operator\\\\n if (addeds[i]) {\\\\n // Add governor to list, update governor weight\\\\n $._governors.push(iGovernor);\\\\n $._governorWeight[iGovernor] = iVoteWeight;\\\\n\\\\n // Add operator to list, update governor weight\\\\n $._operators.push(iOperator);\\\\n $._operatorWeight[iOperator] = iVoteWeight;\\\\n\\\\n accumulatedWeight += iVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight += accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\\\n\\\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to remove bridge operators.\\\\n *\\\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to remove bridge operators.\\\\n *\\\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\\\n */\\\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = removingOperators.length;\\\\n removeds = new bool[](length);\\\\n\\\\n // simply skip remove operations if inputs are empty.\\\\n if (length == 0) return removeds;\\\\n if ($._governors.length - length < $._minRequiredGovernor) {\\\\n revert ErrBelowMinRequiredGovernors();\\\\n }\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint256 accumulatedWeight;\\\\n uint idx;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iOperator = removingOperators[i];\\\\n\\\\n // Check non-zero inputs\\\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n\\\\n // Check existing operators\\\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\\\n\\\\n // Only remove the valid operator\\\\n if (removeds[i]) {\\\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\\\n\\\\n // Remove governor from list, update governor weight\\\\n uint lastIdx = $._governors.length - 1;\\\\n $._governors[idx] = $._governors[lastIdx];\\\\n $._governors.pop();\\\\n delete $._governorWeight[iGovernor];\\\\n\\\\n // Remove operator from list, update operator weight\\\\n $._operators[idx] = $._operators[lastIdx];\\\\n $._operators.pop();\\\\n delete $._operatorWeight[iOperator];\\\\n\\\\n accumulatedWeight += removingVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight -= accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\\\n\\\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\\\n }\\\\n\\\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\\\n for (uint i; i < $_array.length; i++) {\\\\n if (addr == $_array[i]) {\\\\n return (true, i);\\\\n }\\\\n }\\\\n\\\\n return (false, type(uint256).max);\\\\n }\\\\n\\\\n // ================= MANAGER VIEW METHODS =============\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256) {\\\\n return _getBridgeManagerStorage()._operators.length;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n return $._operatorWeight[addr] > 0;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._operators;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernors() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._governors;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator) {\\\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\\\n if (!found) revert ErrGovernorNotFound(governor);\\\\n\\\\n return _getBridgeManagerStorage()._operators[idx];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor) {\\\\n (governor,) = _getGovernorOf(operator);\\\\n }\\\\n\\\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\\\n if (!found) revert ErrOperatorNotFound(operator);\\\\n\\\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n governors = $._governors;\\\\n bridgeOperators = $._operators;\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { EnumerableSet } from \\\\\\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\\\\\";\\\\nimport { IBridgeManagerCallbackRegister } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title BridgeManagerCallbackRegister\\\\n * @dev A contract that manages callback registrations and execution for a bridge.\\\\n */\\\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n /**\\\\n * @dev Storage slot for the address set of callback registers.\\\\n * @dev Value is equal to keccak256(\\\\\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\\\\\") - 1.\\\\n */\\\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\\\n\\\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\\\n _registerCallbacks(callbackRegisters);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\\\n _registerCallbacks(registers);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n _callbackRegisters.remove(registers[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\\\n registers = _getCallbackRegisters().values();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to register multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n address register;\\\\n bool regSuccess;\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n register = registers[i];\\\\n\\\\n _requireHasCode(register);\\\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\\\n\\\\n regSuccess = _callbackRegisters.add(register);\\\\n\\\\n emit CallbackRegistered(register, regSuccess);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\\\n */\\\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\\\n * @param callbackFnSig The function signature of the callback method.\\\\n * @param inputs The data to pass to the callback method.\\\\n * @return allSuccess Return true if all internal calls are success\\\\n */\\\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\\\n allSuccess = true;\\\\n\\\\n address[] memory registers = _getCallbackRegisters().values();\\\\n uint256 length = registers.length;\\\\n if (length == 0) return allSuccess;\\\\n\\\\n bool[] memory successes = new bool[](length);\\\\n bytes[] memory returnDatas = new bytes[](length);\\\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n // First, attempt to call normally\\\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\\\n\\\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\\\n if (!successes[i]) {\\\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\\\n allSuccess = allSuccess && successes[i];\\\\n }\\\\n }\\\\n\\\\n emit Notified(callData, registers, successes, returnDatas);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the address set of callback registers.\\\\n * @return callbackRegisters The storage reference to the callback registers.\\\\n */\\\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IQuorum } from \\\\\\\"../../interfaces/IQuorum.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\\\n struct BridgeManagerQuorumStorage {\\\\n uint256 _nonce;\\\\n uint256 _numerator;\\\\n uint256 _denominator;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerQuorumStorage\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\\\n\\\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n $._nonce = 1;\\\\n\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerQuorumStorage\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n return ($._numerator, $._denominator);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\\\n\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n uint256 prevNum = $._numerator;\\\\n uint256 prevDenom = $._denominator;\\\\n\\\\n $._numerator = num;\\\\n $._denominator = denom;\\\\n\\\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n\\\\n function _totalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/CoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Ballot.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\n\\\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to interact with a finalized vote.\\\\n */\\\\n error ErrVoteIsFinalized();\\\\n\\\\n /**\\\\n * @dev Error thrown when the current proposal is not completed.\\\\n */\\\\n error ErrCurrentProposalIsNotCompleted();\\\\n\\\\n struct ProposalVote {\\\\n VoteStatus status;\\\\n bytes32 hash;\\\\n uint256 againstVoteWeight; // Total weight of against votes\\\\n uint256 forVoteWeight; // Total weight of for votes\\\\n address[] forVoteds; // Array of addresses voting for\\\\n address[] againstVoteds; // Array of addresses voting against\\\\n uint256 expiryTimestamp;\\\\n mapping(address => Signature) sig;\\\\n mapping(address => bool) voted;\\\\n }\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\\\n /// @dev Emitted when the proposal is voted\\\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\\\n /// @dev Emitted when the proposal is approved\\\\n event ProposalApproved(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is reject\\\\n event ProposalRejected(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is expired\\\\n event ProposalExpired(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the proposal is executed\\\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\\\n /// @dev Emitted when the proposal expiry duration is changed.\\\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\\\n\\\\n /// @dev Mapping from chain id => vote round\\\\n /// @notice chain id = 0 for global proposal\\\\n mapping(uint256 => uint256) public round;\\\\n /// @dev Mapping from chain id => vote round => proposal vote\\\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\\\n\\\\n uint256 internal _proposalExpiryDuration;\\\\n\\\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\\\n __CoreGovernance_init_unchained(expiryDuration);\\\\n }\\\\n\\\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\\\n _setProposalExpiryDuration(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\\\n * if it is expired and not increase the `_round`.\\\\n */\\\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\\\n _round = round[_chainId];\\\\n // Skip checking for the first ever round\\\\n if (_round == 0) {\\\\n _round = round[_chainId] = 1;\\\\n } else {\\\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\\\n if (!_isExpired) {\\\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\\\n unchecked {\\\\n _round = ++round[_chainId];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\\\n */\\\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\\\n _vote.hash = _proposalHash;\\\\n _vote.expiryTimestamp = _expiryTimestamp;\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The chain id is not equal to 0.\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `ProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\\\n uint256 chainId = proposal.chainId;\\\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n round_ = _createVotingRound(chainId);\\\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the round.\\\\n * - The vote is not finalized.\\\\n * - The voter has not voted for the round.\\\\n *\\\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\\\n * proposal is approved, executed or rejected.\\\\n *\\\\n */\\\\n function _castVote(\\\\n Proposal.ProposalDetail memory proposal,\\\\n Ballot.VoteType support,\\\\n uint256 minimumForVoteWeight,\\\\n uint256 minimumAgainstVoteWeight,\\\\n address voter,\\\\n Signature memory signature,\\\\n uint256 voterWeight\\\\n ) internal virtual returns (bool done) {\\\\n uint256 chainId = proposal.chainId;\\\\n uint256 round_ = proposal.nonce;\\\\n ProposalVote storage _vote = vote[chainId][round_];\\\\n\\\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\\\n return true;\\\\n }\\\\n\\\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\\\n\\\\n _vote.voted[voter] = true;\\\\n // Stores the signature if it is not empty\\\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\\\n _vote.sig[voter] = signature;\\\\n }\\\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\\\n\\\\n uint256 _forVoteWeight;\\\\n uint256 _againstVoteWeight;\\\\n if (support == Ballot.VoteType.For) {\\\\n _vote.forVoteds.push(voter);\\\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\\\n } else if (support == Ballot.VoteType.Against) {\\\\n _vote.againstVoteds.push(voter);\\\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_forVoteWeight >= minimumForVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n if (proposal.isAutoExecute()) {\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev The specified executor executes the proposal on an approved proposal.\\\\n */\\\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\\\n bytes32 proposalHash = proposal.hash();\\\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\\\n\\\\n if (_vote.hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\\\n }\\\\n\\\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\\\n\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n\\\\n /**\\\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\\\n *\\\\n * Emits the event `ProposalExpired` if the vote is expired.\\\\n *\\\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\\\n * before or it will emit an unexpected event of `ProposalExpired`.\\\\n */\\\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\\\n\\\\n if (isExpired) {\\\\n emit ProposalExpired(proposalVote.hash);\\\\n\\\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n delete proposalVote.status;\\\\n delete proposalVote.hash;\\\\n delete proposalVote.againstVoteWeight;\\\\n delete proposalVote.forVoteWeight;\\\\n delete proposalVote.forVoteds;\\\\n delete proposalVote.againstVoteds;\\\\n delete proposalVote.expiryTimestamp;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\\\n */\\\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\\\n if (proposal.executable()) {\\\\n vote_.status = VoteStatus.Executed;\\\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the expiry duration for a new proposal.\\\\n */\\\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\\\n _proposalExpiryDuration = expiryDuration;\\\\n emit ProposalExpiryDurationChanged(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter casted for the proposal.\\\\n */\\\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\\\n return vote_.voted[voter];\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns total weight from validators.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns minimum vote to pass a proposal.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\\\n */\\\\n function _getChainType() internal view virtual returns (ChainType);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"./CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event GlobalProposalCreated(\\\\n uint256 indexed round,\\\\n bytes32 indexed proposalHash,\\\\n Proposal.ProposalDetail proposal,\\\\n bytes32 globalProposalHash,\\\\n GlobalProposal.GlobalProposalDetail globalProposal,\\\\n address creator\\\\n );\\\\n\\\\n /// @dev Emitted when the target options are updated\\\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\\\n\\\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\\\n }\\\\n\\\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\\\n _updateManyTargetOption(targetOptions, addrs);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes for a global proposal.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n address executor,\\\\n uint256[] memory values,\\\\n bytes[] memory calldatas,\\\\n uint256[] memory gasAmounts,\\\\n address creator\\\\n ) internal virtual {\\\\n uint256 round_ = _createVotingRound(0);\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes global proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobalStruct(\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\\\n address creator\\\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n uint256 round_ = _createVotingRound(0);\\\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\\\n\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\\\n */\\\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal helper of {resolveTargets}.\\\\n *\\\\n * @param strict When the param is set to `true`, revert on non-existent target.\\\\n */\\\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\\\n targets = new address[](targetOptions.length);\\\\n\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n *\\\\n * Requirement:\\\\n * - Only allow self-call through proposal.\\\\n *\\\\n */\\\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\\\n // HACK: Cannot reuse the existing library due to too deep stack\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n _updateManyTargetOption(targetOptions, targets);\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n */\\\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\\\n _updateTargetOption(targetOptions[i], targets[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates `targetOption` to `target`.\\\\n *\\\\n * Requirement:\\\\n * - Emit a `TargetOptionUpdated` event.\\\\n */\\\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\\\n _targetOptionsMap[targetOption] = target;\\\\n emit TargetOptionUpdated(targetOption, target);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/CommonGovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract CommonGovernanceRelay is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Relays votes by signatures.\\\\n *\\\\n * @notice Does not store the voter signature into storage.\\\\n *\\\\n */\\\\n function _relayVotesBySignatures(\\\\n Proposal.ProposalDetail memory _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n bytes32 proposalHash\\\\n ) internal {\\\\n if (!(_supports.length > 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\\\n\\\\n address[] memory _forVoteSigners = new address[](_signatures.length);\\\\n address[] memory _againstVoteSigners = new address[](_signatures.length);\\\\n\\\\n {\\\\n uint256 _forVoteCount;\\\\n uint256 _againstVoteCount;\\\\n\\\\n {\\\\n address _signer;\\\\n address _lastSigner;\\\\n Ballot.VoteType _support;\\\\n Signature calldata _sig;\\\\n\\\\n for (uint256 _i; _i < _signatures.length;) {\\\\n _sig = _signatures[_i];\\\\n _support = _supports[_i];\\\\n\\\\n if (_support == Ballot.VoteType.For) {\\\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\\\n _forVoteSigners[_forVoteCount++] = _signer;\\\\n } else if (_support == Ballot.VoteType.Against) {\\\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\\\n _againstVoteSigners[_againstVoteCount++] = _signer;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\\\n _lastSigner = _signer;\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n assembly {\\\\n mstore(_forVoteSigners, _forVoteCount)\\\\n mstore(_againstVoteSigners, _againstVoteCount)\\\\n }\\\\n }\\\\n\\\\n ProposalVote storage _vote = vote[_proposal.chainId][_proposal.nonce];\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _totalForVoteWeight = _sumWeight(_forVoteSigners);\\\\n if (_totalForVoteWeight >= _minimumForVoteWeight) {\\\\n if (_totalForVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n _tryExecute(_vote, _proposal);\\\\n return;\\\\n }\\\\n\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n uint256 _totalAgainstVoteWeight = _sumWeight(_againstVoteSigners);\\\\n if (_totalAgainstVoteWeight >= _minimumAgainstVoteWeight) {\\\\n if (_totalAgainstVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n return;\\\\n }\\\\n\\\\n revert ErrRelayFailed(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the weight of the governor list.\\\\n */\\\\n function _sumWeight(address[] memory _governors) internal view virtual returns (uint256);\\\\n\\\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x48b03ea86a3e312de4242115554d2188891719bcd3a20d8e4504b03319ba6993\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../GlobalCoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceRelay.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalGovernanceRelay is CommonGovernanceRelay, GlobalCoreGovernance {\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\\\n */\\\\n function globalProposalRelayed(uint256 _round) external view returns (bool) {\\\\n return vote[0][_round].status != VoteStatus.Pending;\\\\n }\\\\n\\\\n /**\\\\n * @dev Relays voted global proposal.\\\\n *\\\\n * Requirements:\\\\n * - The relay proposal is finalized.\\\\n *\\\\n */\\\\n function _relayGlobalProposal(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures,\\\\n address creator\\\\n ) internal {\\\\n Proposal.ProposalDetail memory _proposal = _proposeGlobalStruct(globalProposal, creator);\\\\n _relayVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d168ae3300e07f3b6312c61ea3d6021a12722c7122d9f2f3f782909d47e05d4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceRelay.sol\\\\\\\";\\\\n\\\\nabstract contract GovernanceRelay is CoreGovernance, CommonGovernanceRelay {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Relays voted proposal.\\\\n *\\\\n * Requirements:\\\\n * - The relay proposal is finalized.\\\\n *\\\\n */\\\\n function _relayProposal(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n address _creator\\\\n ) internal {\\\\n _proposeProposalStruct(_proposal, _creator);\\\\n _relayVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x050da96d4079cfb515a09ee8a61d5b6c782adf4559b2c66b618bd51f41ca1cd4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IMainchainGatewayV3.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IWETH.sol\\\\\\\";\\\\nimport \\\\\\\"./consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"./consumers/MappedTokenConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../libraries/Transfer.sol\\\\\\\";\\\\n\\\\ninterface IMainchainGatewayV3 is SignatureConsumer, MappedTokenConsumer {\\\\n /**\\\\n * @dev Error indicating that a query was made for an approved withdrawal.\\\\n */\\\\n error ErrQueryForApprovedWithdrawal();\\\\n\\\\n /**\\\\n * @dev Error indicating that the daily withdrawal limit has been reached.\\\\n */\\\\n error ErrReachedDailyWithdrawalLimit();\\\\n\\\\n /**\\\\n * @dev Error indicating that a query was made for a processed withdrawal.\\\\n */\\\\n error ErrQueryForProcessedWithdrawal();\\\\n\\\\n /**\\\\n * @dev Error indicating that a query was made for insufficient vote weight.\\\\n */\\\\n error ErrQueryForInsufficientVoteWeight();\\\\n\\\\n /// @dev Emitted when the deposit is requested\\\\n event DepositRequested(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the assets are withdrawn\\\\n event Withdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the tokens are mapped\\\\n event TokenMapped(address[] mainchainTokens, address[] roninTokens, TokenStandard[] standards);\\\\n /// @dev Emitted when the wrapped native token contract is updated\\\\n event WrappedNativeTokenContractUpdated(IWETH weth);\\\\n /// @dev Emitted when the withdrawal is locked\\\\n event WithdrawalLocked(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the withdrawal is unlocked\\\\n event WithdrawalUnlocked(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n\\\\n /**\\\\n * @dev Returns the domain seperator.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns deposit count.\\\\n */\\\\n function depositCount() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the wrapped native token contract.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `WrappedNativeTokenContractUpdated` event.\\\\n *\\\\n */\\\\n function setWrappedNativeTokenContract(IWETH _wrappedToken) external;\\\\n\\\\n /**\\\\n * @dev Returns whether the withdrawal is locked.\\\\n */\\\\n function withdrawalLocked(uint256 withdrawalId) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the withdrawal hash.\\\\n */\\\\n function withdrawalHash(uint256 withdrawalId) external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Locks the assets and request deposit.\\\\n */\\\\n function requestDepositFor(Transfer.Request calldata _request) external payable;\\\\n\\\\n /**\\\\n * @dev Locks the assets and request deposit for batch.\\\\n */\\\\n function requestDepositForBatch(Transfer.Request[] calldata requests) external payable;\\\\n\\\\n /**\\\\n * @dev Withdraws based on the receipt and the validator signatures.\\\\n * Returns whether the withdrawal is locked.\\\\n *\\\\n * Emits the `Withdrew` once the assets are released.\\\\n *\\\\n */\\\\n function submitWithdrawal(Transfer.Receipt memory _receipt, Signature[] memory _signatures) external returns (bool _locked);\\\\n\\\\n /**\\\\n * @dev Approves a specific withdrawal.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n * Emits the `Withdrew` once the assets are released.\\\\n *\\\\n */\\\\n function unlockWithdrawal(Transfer.Receipt calldata _receipt) external;\\\\n\\\\n /**\\\\n * @dev Maps mainchain tokens to Ronin network.\\\\n *\\\\n * Requirement:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `TokenMapped` event.\\\\n *\\\\n */\\\\n function mapTokens(address[] calldata _mainchainTokens, address[] calldata _roninTokens, TokenStandard[] calldata _standards) external;\\\\n\\\\n /**\\\\n * @dev Maps mainchain tokens to Ronin network and sets thresholds.\\\\n *\\\\n * Requirement:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `TokenMapped` event.\\\\n *\\\\n */\\\\n function mapTokensAndThresholds(\\\\n address[] calldata _mainchainTokens,\\\\n address[] calldata _roninTokens,\\\\n TokenStandard[] calldata _standards,\\\\n uint256[][4] calldata _thresholds\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Returns token address on Ronin network.\\\\n * Note: Reverts for unsupported token.\\\\n */\\\\n function getRoninToken(address _mainchainToken) external view returns (MappedToken memory _token);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x77b52c1dce7c096d298e0ae14d19d79cb1d506248e947fdee27f295b33743d46\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IWETH.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IWETH {\\\\n event Transfer(address indexed src, address indexed dst, uint wad);\\\\n\\\\n function deposit() external payable;\\\\n\\\\n function transfer(address dst, uint wad) external returns (bool);\\\\n\\\\n function approve(address guy, uint wad) external returns (bool);\\\\n\\\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\\\n\\\\n function withdraw(uint256 _wad) external;\\\\n\\\\n function balanceOf(address) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallback.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManagerCallback\\\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\\\n */\\\\ninterface IBridgeManagerCallback is IERC165 {\\\\n /**\\\\n * @dev Handles the event when bridge operators are added.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\\\n\\\\n /**\\\\n * @dev Handles the event when bridge operators are removed.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerCallbackRegister {\\\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\\\n\\\\n event CallbackRegistered(address, bool);\\\\n /**\\\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\\\n */\\\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\\\n\\\\n /**\\\\n * @dev Retrieves the addresses of registered callbacks.\\\\n * @return registers An array containing the addresses of registered callbacks.\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers);\\\\n\\\\n /**\\\\n * @dev Registers multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external;\\\\n\\\\n /**\\\\n * @dev Unregisters multiple callbacks from the bridge.\\\\n * @param registers The array of callback addresses to unregister.\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/ChainTypeConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface ChainTypeConsumer {\\\\n enum ChainType {\\\\n RoninChain,\\\\n Mainchain\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/MappedTokenConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/LibTokenInfo.sol\\\\\\\";\\\\n\\\\ninterface MappedTokenConsumer {\\\\n struct MappedToken {\\\\n TokenStandard erc;\\\\n address tokenAddr;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/SignatureConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface SignatureConsumer {\\\\n struct Signature {\\\\n uint8 v;\\\\n bytes32 r;\\\\n bytes32 s;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/VoteStatusConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface VoteStatusConsumer {\\\\n enum VoteStatus {\\\\n Pending,\\\\n Approved,\\\\n Executed,\\\\n Rejected,\\\\n Expired\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/Ballot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\n\\\\nlibrary Ballot {\\\\n using ECDSA for bytes32;\\\\n\\\\n enum VoteType {\\\\n For,\\\\n Against\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Ballot(bytes32 proposalHash,uint8 support)\\\\\\\");\\\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\\\n\\\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, BALLOT_TYPEHASH)\\\\n mstore(add(ptr, 0x20), _proposalHash)\\\\n mstore(add(ptr, 0x40), _support)\\\\n digest := keccak256(ptr, 0x60)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/GlobalProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./Proposal.sol\\\\\\\";\\\\n\\\\nlibrary GlobalProposal {\\\\n /**\\\\n * @dev Error thrown when attempting to interact with an unsupported target.\\\\n */\\\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\\\n\\\\n enum TargetOption {\\\\n BridgeManager, // 0\\\\n GatewayContract, // 1\\\\n BridgeReward, // 2\\\\n BridgeSlash, // 3\\\\n BridgeTracking, // 4\\\\n PauseEnforcer // 5\\\\n\\\\n }\\\\n\\\\n struct GlobalProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n uint256 expiryTimestamp;\\\\n address executor;\\\\n TargetOption[] targetOptions;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = self.values;\\\\n TargetOption[] memory targets = self.targetOptions;\\\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\\\n uint256[] memory gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length;) {\\\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\\\n\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * proposal.nonce,\\\\n * proposal.expiryTimestamp,\\\\n * proposal.executor,\\\\n * targetsHash,\\\\n * valuesHash,\\\\n * calldatasHash,\\\\n * gasAmountsHash\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0x80), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x100)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts into the normal proposal.\\\\n */\\\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\\\n detail_.nonce = self.nonce;\\\\n detail_.chainId = 0;\\\\n detail_.expiryTimestamp = self.expiryTimestamp;\\\\n detail_.executor = self.executor;\\\\n\\\\n detail_.targets = new address[](self.targetOptions.length);\\\\n detail_.values = self.values;\\\\n detail_.calldatas = self.calldatas;\\\\n detail_.gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\\\n detail_.targets[i] = targets[i];\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/LibTokenInfo.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IWETH.sol\\\\\\\";\\\\n\\\\nenum TokenStandard {\\\\n ERC20,\\\\n ERC721,\\\\n ERC1155\\\\n}\\\\n\\\\nstruct TokenInfo {\\\\n TokenStandard erc;\\\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\\\n // For ERC721: the quantity must be 0.\\\\n uint256 id;\\\\n uint256 quantity;\\\\n}\\\\n\\\\n/**\\\\n * @dev Error indicating that the `transfer` has failed.\\\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\\\n * @param to Receiver of the token value.\\\\n * @param token Address of the token.\\\\n */\\\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\\\n\\\\n/**\\\\n * @dev Error indicating that the `handleAssetIn` has failed.\\\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\\\n * @param from Owner of the token value.\\\\n * @param to Receiver of the token value.\\\\n * @param token Address of the token.\\\\n */\\\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\\\n\\\\n/// @dev Error indicating that the provided information is invalid.\\\\nerror ErrInvalidInfo();\\\\n\\\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\\\nerror ErrERC20MintingFailed();\\\\n\\\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\\\nerror ErrERC721MintingFailed();\\\\n\\\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\\\nerror ErrERC1155TransferFailed();\\\\n\\\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\\\nerror ErrERC1155MintingFailed();\\\\n\\\\n/// @dev Error indicating that an unsupported standard is encountered.\\\\nerror ErrUnsupportedStandard();\\\\n\\\\nlibrary LibTokenInfo {\\\\n /**\\\\n *\\\\n * HASH\\\\n *\\\\n */\\\\n\\\\n // keccak256(\\\\\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\\\\\");\\\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\\\n\\\\n /**\\\\n * @dev Returns token info struct hash.\\\\n */\\\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\\\n digest := keccak256(ptr, 0x80)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * VALIDATE\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Validates the token info.\\\\n */\\\\n function validate(TokenInfo memory self) internal pure {\\\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\\\n revert ErrInvalidInfo();\\\\n }\\\\n }\\\\n\\\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\\\n }\\\\n\\\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\\\n }\\\\n\\\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * TRANSFER IN/OUT METHOD\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfer asset in.\\\\n *\\\\n * Requirements:\\\\n * - The `_from` address must approve for the contract using this library.\\\\n *\\\\n */\\\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\\\n bool success;\\\\n bytes memory data;\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\\\n } else if (self.erc == TokenStandard.ERC721) {\\\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\\\n } else if (self.erc == TokenStandard.ERC1155) {\\\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\\\n } else {\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\\\n *\\\\n * @notice Prioritizes transfer native token if the token is wrapped.\\\\n *\\\\n */\\\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\\\n if (token == address(wrappedNativeToken)) {\\\\n // Try sending the native token before transferring the wrapped token\\\\n if (!to.send(self.quantity)) {\\\\n wrappedNativeToken.deposit{ value: self.quantity }();\\\\n _transferTokenOut(self, to, token);\\\\n }\\\\n\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n uint256 balance = IERC20(token).balanceOf(address(this));\\\\n if (balance < self.quantity) {\\\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\\\n }\\\\n\\\\n _transferTokenOut(self, to, token);\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC721) {\\\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\\\n revert ErrERC721MintingFailed();\\\\n }\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC1155) {\\\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\\\n revert ErrERC1155MintingFailed();\\\\n }\\\\n return;\\\\n }\\\\n\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * TRANSFER HELPERS\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfer assets from current address to `_to` address.\\\\n */\\\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\\\n bool success;\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n success = _tryTransferERC20(token, to, self.quantity);\\\\n } else if (self.erc == TokenStandard.ERC721) {\\\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\\\n } else {\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-20\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers ERC20 token and returns the result.\\\\n */\\\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\\\n bytes memory data;\\\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC20 token and returns the result.\\\\n */\\\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\\\n // bytes4(keccak256(\\\\\\\"mint(address,uint256)\\\\\\\"))\\\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-721\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\\\n * @return success Returns `false` if both transfer and mint are failed.\\\\n */\\\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\\\n success = _tryTransferFromERC721(token, address(this), to, id);\\\\n if (!success) {\\\\n return _tryMintERC721(token, to, id);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers ERC721 token and returns the result.\\\\n */\\\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC721 token and returns the result.\\\\n */\\\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\\\n // bytes4(keccak256(\\\\\\\"mint(address,uint256)\\\\\\\"))\\\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-1155\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\\\n * @return success Returns `false` if both transfer and mint are failed.\\\\n */\\\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\\\n if (!success) {\\\\n return _tryMintERC1155(token, to, id, amount);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers ERC1155 token and returns the result.\\\\n */\\\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC1155 token and returns the result.\\\\n */\\\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/LibTokenOwner.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nstruct TokenOwner {\\\\n address addr;\\\\n address tokenAddr;\\\\n uint256 chainId;\\\\n}\\\\n\\\\nlibrary LibTokenOwner {\\\\n // keccak256(\\\\\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\\\\\");\\\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\\\n\\\\n /**\\\\n * @dev Returns ownership struct hash.\\\\n */\\\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, OWNER_TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\\\n digest := keccak256(ptr, 0x80)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Proposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nlibrary Proposal {\\\\n /**\\\\n * @dev Error thrown when there is insufficient gas to execute a function.\\\\n */\\\\n error ErrInsufficientGas(bytes32 proposalHash);\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\\\n */\\\\n error ErrInvalidExpiryTimestamp();\\\\n\\\\n /**\\\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\\n */\\\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\\\n\\\\n struct ProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n // Value 0: all chain should run this proposal\\\\n // Other values: only specific chain has to execute\\\\n uint256 chainId;\\\\n uint256 expiryTimestamp;\\\\n // The address that execute the proposal after the proposal passes.\\\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\\\n address executor;\\\\n address[] targets;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\\\n\\\\n /**\\\\n * @dev Validates the proposal.\\\\n */\\\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\\\n if (\\\\n !(\\\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\\\n && proposal.targets.length == proposal.gasAmounts.length\\\\n )\\\\n ) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\\\n revert ErrInvalidExpiryTimestamp();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = proposal.values;\\\\n address[] memory targets = proposal.targets;\\\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length; ++i) {\\\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\\\n }\\\\n\\\\n // return\\\\n // keccak256(\\\\n // abi.encode(\\\\n // TYPE_HASH,\\\\n // proposal.nonce,\\\\n // proposal.chainId,\\\\n // proposal.expiryTimestamp\\\\n // proposal.executor\\\\n // targetsHash,\\\\n // valuesHash,\\\\n // calldatasHash,\\\\n // gasAmountsHash\\\\n // )\\\\n // );\\\\n // /\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0x100), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x120)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\\\n */\\\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\\\n return proposal.executor == address(0);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is executable for the current chain.\\\\n *\\\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\\\n *\\\\n */\\\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal.\\\\n */\\\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\\\n\\\\n successCalls = new bool[](proposal.targets.length);\\\\n returnDatas = new bytes[](proposal.targets.length);\\\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\\\n\\\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\\\n\\\\n if (!successCalls[i]) {\\\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Transfer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./LibTokenInfo.sol\\\\\\\";\\\\nimport \\\\\\\"./LibTokenOwner.sol\\\\\\\";\\\\n\\\\nlibrary Transfer {\\\\n using ECDSA for bytes32;\\\\n using LibTokenOwner for TokenOwner;\\\\n using LibTokenInfo for TokenInfo;\\\\n\\\\n enum Kind {\\\\n Deposit,\\\\n Withdrawal\\\\n }\\\\n\\\\n struct Request {\\\\n // For deposit request: Recipient address on Ronin network\\\\n // For withdrawal request: Recipient address on mainchain network\\\\n address recipientAddr;\\\\n // Token address to deposit/withdraw\\\\n // Value 0: native token\\\\n address tokenAddr;\\\\n TokenInfo info;\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts the transfer request into the deposit receipt.\\\\n */\\\\n function into_deposit_receipt(\\\\n Request memory _request,\\\\n address _requester,\\\\n uint256 _id,\\\\n address _roninTokenAddr,\\\\n uint256 _roninChainId\\\\n ) internal view returns (Receipt memory _receipt) {\\\\n _receipt.id = _id;\\\\n _receipt.kind = Kind.Deposit;\\\\n _receipt.mainchain.addr = _requester;\\\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\\\n _receipt.mainchain.chainId = block.chainid;\\\\n _receipt.ronin.addr = _request.recipientAddr;\\\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\\\n _receipt.ronin.chainId = _roninChainId;\\\\n _receipt.info = _request.info;\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts the transfer request into the withdrawal receipt.\\\\n */\\\\n function into_withdrawal_receipt(\\\\n Request memory _request,\\\\n address _requester,\\\\n uint256 _id,\\\\n address _mainchainTokenAddr,\\\\n uint256 _mainchainId\\\\n ) internal view returns (Receipt memory _receipt) {\\\\n _receipt.id = _id;\\\\n _receipt.kind = Kind.Withdrawal;\\\\n _receipt.ronin.addr = _requester;\\\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\\\n _receipt.ronin.chainId = block.chainid;\\\\n _receipt.mainchain.addr = _request.recipientAddr;\\\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\\\n _receipt.mainchain.chainId = _mainchainId;\\\\n _receipt.info = _request.info;\\\\n }\\\\n\\\\n struct Receipt {\\\\n uint256 id;\\\\n Kind kind;\\\\n TokenOwner mainchain;\\\\n TokenOwner ronin;\\\\n TokenInfo info;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\\\\\");\\\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\\\n\\\\n /**\\\\n * @dev Returns token info struct hash.\\\\n */\\\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * _receipt.id,\\\\n * _receipt.kind,\\\\n * Token.hash(_receipt.mainchain),\\\\n * Token.hash(_receipt.ronin),\\\\n * Token.hash(_receipt.info)\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\\\n digest := keccak256(ptr, 0xc0)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the receipt digest.\\\\n */\\\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/mainchain/MainchainBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { CoreGovernance } from \\\\\\\"../extensions/sequential-governance/CoreGovernance.sol\\\\\\\";\\\\nimport { GlobalCoreGovernance, GlobalGovernanceRelay } from \\\\\\\"../extensions/sequential-governance/governance-relay/GlobalGovernanceRelay.sol\\\\\\\";\\\\nimport { GovernanceRelay } from \\\\\\\"../extensions/sequential-governance/governance-relay/GovernanceRelay.sol\\\\\\\";\\\\nimport { ContractType, BridgeManager } from \\\\\\\"../extensions/bridge-operator-governance/BridgeManager.sol\\\\\\\";\\\\nimport { IMainchainGatewayV3 } from \\\\\\\"../interfaces/IMainchainGatewayV3.sol\\\\\\\";\\\\nimport { TokenStandard } from \\\\\\\"../libraries/LibTokenInfo.sol\\\\\\\";\\\\nimport { Ballot } from \\\\\\\"../libraries/Ballot.sol\\\\\\\";\\\\nimport { Proposal } from \\\\\\\"../libraries/Proposal.sol\\\\\\\";\\\\nimport { GlobalProposal } from \\\\\\\"../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\ncontract MainchainBridgeManager is BridgeManager, GovernanceRelay, GlobalGovernanceRelay {\\\\n uint256 private constant DEFAULT_EXPIRY_DURATION = 1 << 255;\\\\n\\\\n function initialize(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights,\\\\n GlobalProposal.TargetOption[] memory targetOptions,\\\\n address[] memory targets\\\\n ) external initializer { }\\\\n\\\\n function hotfix__mapTokensAndThresholds_registerCallbacks() external onlyProxyAdmin {\\\\n require(block.chainid == 1, \\\\\\\"Only on ethereum-mainnet\\\\\\\");\\\\n\\\\n address[] memory mainchainTokens = new address[](1);\\\\n address[] memory roninTokens = new address[](1);\\\\n address[] memory callbacks = new address[](1);\\\\n TokenStandard[] memory standards = new TokenStandard[](1);\\\\n uint256[][4] memory thresholds;\\\\n\\\\n mainchainTokens[0] = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599;\\\\n roninTokens[0] = 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e;\\\\n callbacks[0] = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08; // MainchainGatewayV3\\\\n standards[0] = TokenStandard.ERC20;\\\\n // highTierThreshold\\\\n thresholds[0] = new uint256[](1);\\\\n thresholds[0][0] = 17 * 10 ** 8;\\\\n // lockedThreshold\\\\n thresholds[1] = new uint256[](1);\\\\n thresholds[1][0] = 34 * 10 ** 8;\\\\n // unlockFeePercentages\\\\n thresholds[2] = new uint256[](1);\\\\n thresholds[2][0] = 10;\\\\n // dailyWithdrawalLimit\\\\n thresholds[3] = new uint256[](1);\\\\n thresholds[3][0] = 42 * 10 ** 8;\\\\n\\\\n address gateway = 0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08;\\\\n\\\\n (bool success,) = gateway.call(\\\\n abi.encodeWithSignature(\\\\n \\\\\\\"functionDelegateCall(bytes)\\\\\\\", abi.encodeCall(IMainchainGatewayV3.mapTokensAndThresholds, (mainchainTokens, roninTokens, standards, thresholds))\\\\n )\\\\n );\\\\n require(success, \\\\\\\"Map tokens and thresholds failed\\\\\\\");\\\\n\\\\n _registerCallbacks(callbacks);\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceRelay-_relayProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n */\\\\n function relayProposal(\\\\n Proposal.ProposalDetail calldata proposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor { }\\\\n\\\\n /**\\\\n * @dev See `GovernanceRelay-_relayGlobalProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n */\\\\n function relayGlobalProposal(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor { }\\\\n\\\\n function _requireExecutor(address executor, address caller) internal pure { }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the minimum vote weight required for governance actions.\\\\n * @return minimumVoteWeight The minimum vote weight required for governance actions.\\\\n */\\\\n function _getMinimumVoteWeight() internal view override returns (uint256) { }\\\\n\\\\n /**\\\\n * @dev Returns the expiry duration for a new proposal.\\\\n */\\\\n function getProposalExpiryDuration() external view returns (uint256) { }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the total weights of all governors.\\\\n * @return totalWeights The total weights of all governors combined.\\\\n */\\\\n function _getTotalWeight() internal view override returns (uint256) { }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of weights for a given array of governors.\\\\n * @param governors An array containing the addresses of governors to calculate the sum of weights.\\\\n * @return sumWeights The sum of weights for the provided governors.\\\\n */\\\\n function _sumWeight(address[] memory governors) internal view override returns (uint256) { }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the chain type of the contract.\\\\n * @return chainType The chain type, indicating the type of the chain the contract operates on (e.g., Mainchain).\\\\n */\\\\n function _getChainType() internal pure override returns (ChainType) { }\\\\n\\\\n function _proposalDomainSeparator() internal view override returns (bytes32) { }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1c9178fa532c353c77df1d92fb68b10c40f68a0df9c514490993c5eeea12be3f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/Types.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { LibTUint256Slot } from \\\\\\\"./operations/LibTUint256Slot.sol\\\\\\\";\\\\n\\\\ntype TUint256Slot is bytes32;\\\\n\\\\nusing {\\\\n LibTUint256Slot.add,\\\\n LibTUint256Slot.sub,\\\\n LibTUint256Slot.mul,\\\\n LibTUint256Slot.div,\\\\n LibTUint256Slot.load,\\\\n LibTUint256Slot.store,\\\\n LibTUint256Slot.addAssign,\\\\n LibTUint256Slot.subAssign,\\\\n LibTUint256Slot.preDecrement,\\\\n LibTUint256Slot.postDecrement,\\\\n LibTUint256Slot.preIncrement,\\\\n LibTUint256Slot.postIncrement\\\\n} for TUint256Slot global;\\\\n\\\",\\\"keccak256\\\":\\\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/operations/LibTUint256Slot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { TUint256Slot } from \\\\\\\"../Types.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title LibTUint256Slot\\\\n * @dev Library for handling unsigned 256-bit integers.\\\\n */\\\\nlibrary LibTUint256Slot {\\\\n /// @dev value is equal to bytes4(keccak256(\\\\\\\"Panic(uint256)\\\\\\\"))\\\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\\\n /// @dev error code for {Arithmetic over/underflow} error\\\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\\\n /// @dev error code for {Division or modulo by 0} error\\\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\\\n\\\\n /**\\\\n * @dev Loads the value of the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @return val The loaded value.\\\\n */\\\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\\\n assembly {\\\\n val := sload(self)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a value into the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to be stored.\\\\n */\\\\n function store(TUint256Slot self, uint256 other) internal {\\\\n assembly {\\\\n sstore(self, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Multiplies the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to multiply by.\\\\n * @return res The resulting value after multiplication.\\\\n */\\\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n if iszero(iszero(storedVal)) {\\\\n res := mul(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if iszero(eq(other, div(res, storedVal))) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Divides the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to divide by.\\\\n * @return res The resulting value after division.\\\\n */\\\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n // revert if divide by zero\\\\n if iszero(other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, DIVISION_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n res := div(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction.\\\\n */\\\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n\\\\n // Underflow check\\\\n if lt(storedVal, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n\\\\n res := sub(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition.\\\\n */\\\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n res := add(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if lt(res, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after incrementing.\\\\n */\\\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = addAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The original value before incrementing.\\\\n */\\\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res + 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after decrementing.\\\\n */\\\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = subAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value before decrementing.\\\\n */\\\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res - 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition and storage.\\\\n */\\\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = add(self, other));\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction and storage.\\\\n */\\\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = sub(self, other));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 5, "storageLayout": { "storage": [ { - "astId": 52029, + "astId": 52534, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "_initialized", "offset": 0, @@ -393,7 +331,7 @@ "type": "t_uint8" }, { - "astId": 52032, + "astId": 52537, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "_initializing", "offset": 1, @@ -401,7 +339,7 @@ "type": "t_bool" }, { - "astId": 69551, + "astId": 108323, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "DOMAIN_SEPARATOR", "offset": 0, @@ -409,7 +347,7 @@ "type": "t_bytes32" }, { - "astId": 71600, + "astId": 110372, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "round", "offset": 0, @@ -417,15 +355,15 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 71608, + "astId": 110380, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "vote", "offset": 0, "slot": "3", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)71538_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)110310_storage))" }, { - "astId": 71610, + "astId": 110382, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "_proposalExpiryDuration", "offset": 0, @@ -433,12 +371,12 @@ "type": "t_uint256" }, { - "astId": 72332, + "astId": 111104, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "_targetOptionsMap", "offset": 0, "slot": "5", - "type": "t_mapping(t_enum(TargetOption)76404,t_address)" + "type": "t_mapping(t_enum(TargetOption)115215,t_address)" } ], "types": { @@ -463,12 +401,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_enum(TargetOption)76404": { + "t_enum(TargetOption)115215": { "encoding": "inplace", "label": "enum GlobalProposal.TargetOption", "numberOfBytes": "1" }, - "t_enum(VoteStatus)75348": { + "t_enum(VoteStatus)114159": { "encoding": "inplace", "label": "enum VoteStatusConsumer.VoteStatus", "numberOfBytes": "1" @@ -480,33 +418,33 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_address,t_struct(Signature)75339_storage)": { + "t_mapping(t_address,t_struct(Signature)114150_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct SignatureConsumer.Signature)", "numberOfBytes": "32", - "value": "t_struct(Signature)75339_storage" + "value": "t_struct(Signature)114150_storage" }, - "t_mapping(t_enum(TargetOption)76404,t_address)": { + "t_mapping(t_enum(TargetOption)115215,t_address)": { "encoding": "mapping", - "key": "t_enum(TargetOption)76404", + "key": "t_enum(TargetOption)115215", "label": "mapping(enum GlobalProposal.TargetOption => address)", "numberOfBytes": "32", "value": "t_address" }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)71538_storage))": { + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)110310_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(ProposalVote)71538_storage)" + "value": "t_mapping(t_uint256,t_struct(ProposalVote)110310_storage)" }, - "t_mapping(t_uint256,t_struct(ProposalVote)71538_storage)": { + "t_mapping(t_uint256,t_struct(ProposalVote)110310_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", "numberOfBytes": "32", - "value": "t_struct(ProposalVote)71538_storage" + "value": "t_struct(ProposalVote)110310_storage" }, "t_mapping(t_uint256,t_uint256)": { "encoding": "mapping", @@ -515,21 +453,21 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(ProposalVote)71538_storage": { + "t_struct(ProposalVote)110310_storage": { "encoding": "inplace", "label": "struct CoreGovernance.ProposalVote", "numberOfBytes": "288", "members": [ { - "astId": 71514, + "astId": 110286, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "status", "offset": 0, "slot": "0", - "type": "t_enum(VoteStatus)75348" + "type": "t_enum(VoteStatus)114159" }, { - "astId": 71516, + "astId": 110288, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "hash", "offset": 0, @@ -537,7 +475,7 @@ "type": "t_bytes32" }, { - "astId": 71518, + "astId": 110290, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "againstVoteWeight", "offset": 0, @@ -545,7 +483,7 @@ "type": "t_uint256" }, { - "astId": 71520, + "astId": 110292, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "forVoteWeight", "offset": 0, @@ -553,7 +491,7 @@ "type": "t_uint256" }, { - "astId": 71523, + "astId": 110295, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "forVoteds", "offset": 0, @@ -561,7 +499,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 71526, + "astId": 110298, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "againstVoteds", "offset": 0, @@ -569,7 +507,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 71528, + "astId": 110300, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "expiryTimestamp", "offset": 0, @@ -577,15 +515,15 @@ "type": "t_uint256" }, { - "astId": 71533, + "astId": 110305, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "sig", "offset": 0, "slot": "7", - "type": "t_mapping(t_address,t_struct(Signature)75339_storage)" + "type": "t_mapping(t_address,t_struct(Signature)114150_storage)" }, { - "astId": 71537, + "astId": 110309, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "voted", "offset": 0, @@ -594,13 +532,13 @@ } ] }, - "t_struct(Signature)75339_storage": { + "t_struct(Signature)114150_storage": { "encoding": "inplace", "label": "struct SignatureConsumer.Signature", "numberOfBytes": "96", "members": [ { - "astId": 75334, + "astId": 114145, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "v", "offset": 0, @@ -608,7 +546,7 @@ "type": "t_uint8" }, { - "astId": 75336, + "astId": 114147, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "r", "offset": 0, @@ -616,7 +554,7 @@ "type": "t_bytes32" }, { - "astId": 75338, + "astId": 114149, "contract": "src/mainchain/MainchainBridgeManager.sol:MainchainBridgeManager", "label": "s", "offset": 0, @@ -637,7 +575,7 @@ } } }, - "timestamp": 1722414311, + "timestamp": 1722924827, "userdoc": { "version": 1, "kind": "user", From c3ff037ae61a27cccb7739b5228ce8a1f07ecb74 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Tue, 6 Aug 2024 13:34:09 +0700 Subject: [PATCH 301/305] chore: add broadcast log --- .../1/run-1722924899.json | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 broadcast/20240805-hotfix-v3.2.2-mainchain.s.sol/1/run-1722924899.json diff --git a/broadcast/20240805-hotfix-v3.2.2-mainchain.s.sol/1/run-1722924899.json b/broadcast/20240805-hotfix-v3.2.2-mainchain.s.sol/1/run-1722924899.json new file mode 100644 index 00000000..99d100fe --- /dev/null +++ b/broadcast/20240805-hotfix-v3.2.2-mainchain.s.sol/1/run-1722924899.json @@ -0,0 +1,61 @@ +{ + "transactions": [ + { + "hash": "0xdc4e90383be718d5a6ef2305385f2b96d8f5f819f05dfe88600cb2101d9c9952", + "transactionType": "CREATE", + "contractName": "MainchainBridgeManager", + "contractAddress": "0x3ba040bc32352e2dc21f9a85c5573e84696a74dd", + "function": null, + "arguments": null, + "transaction": { + "from": "0xa62dddcc58e769bcfd2f9a7a61cdf331f18c2650", + "gas": "0x3fc4e5", + "value": "0x0", + "input": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6138b580620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c80639b19dbfd11610125578063d0a50db0116100ad578063e75235b81161007c578063e75235b8146104c6578063e9c03498146104e3578063f4cc4d69146104f6578063f80b5352146104fe578063f896f0701461050657600080fd5b8063d0a50db014610485578063d78392f81461048d578063dafae408146104a0578063de981f1b146104b357600080fd5b8063b405aaf2116100f4578063b405aaf214610421578063b9c3620914610434578063bc96180b14610447578063c441c4a81461044e578063cc7e6b3b1461046557600080fd5b80639b19dbfd14610398578063a64a8380146103a0578063aee1767f146103b3578063b384abef146103c657600080fd5b80633644e515116101a85780637f7fe058116101775780637f7fe0581461030e578063800eaab314610339578063865e6fd31461034c5780638dc0dbc61461035f578063901979d51461036d57600080fd5b80633644e515146102c757806362077409146102d0578063776fb1ec146102e35780637de5dedd1461030657600080fd5b80631f425338116101e45780631f4253381461026e5780632d6d7d731461028157806334d5f37b1461029457806335da8121146102b457600080fd5b806301a5f43f1461021657806306aba0e11461022b5780630a44fa43146102465780630f7c318914610259575b600080fd5b610229610224366004612c27565b610519565b005b6102336105c8565b6040519081526020015b60405180910390f35b610233610254366004612cc0565b6105d7565b61026161065c565b60405161023d9190612d46565b61022961027c366004612cc0565b610675565b61026161028f366004612cc0565b610717565b6102336102a2366004612d59565b60026020526000908152604090205481565b6102296102c2366004612cc0565b61075e565b61023360015481565b6102296102de366004612db6565b6107a6565b6102f66102f1366004612d59565b6107af565b604051901515815260200161023d565b6102336107fc565b61032161031c366004612e69565b610852565b6040516001600160a01b03909116815260200161023d565b610229610347366004612fd0565b6108d3565b61022961035a366004613042565b61090b565b6102296102de366004613075565b61038061037b366004612e69565b610926565b6040516001600160601b03909116815260200161023d565b61026161095c565b6102296103ae366004612d59565b6109c7565b6103216103c1366004612e69565b6109db565b6104106103d43660046130b9565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023d9594939291906130f1565b6102f661042f366004612e69565b6109ed565b6102296104423660046130b9565b610a25565b6000610233565b610456610a37565b60405161023d93929190613160565b610478610473366004612cc0565b610b11565b60405161023d91906131a3565b610233610b4f565b61038061049b366004612e69565b610b62565b6102f66104ae366004612d59565b610b6d565b6103216104c13660046131b6565b610bbf565b6104ce610c3a565b6040805192835260208301919091520161023d565b6102296104f1366004612cc0565b610c82565b610229610ccb565b610261611128565b610229610514366004613246565b61118b565b61052161129e565b6105bf86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506112fa92505050565b50505050505050565b60006105d261165c565b905090565b6000828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610618925083915061166f9050565b6106548484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506116a492505050565b949350505050565b60606105d2600080516020613860833981519152611729565b61067d61129e565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106bc925083915061166f9050565b60008051602061386083398151915260005b83811015610710576107078585838181106106eb576106eb61336b565b90506020020160208101906107009190612e69565b839061173d565b506001016106ce565b5050505050565b606061075583838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611752915050565b90505b92915050565b61076661129e565b6107a28282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506118a592505050565b5050565b61071033611962565b60008060008381527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff602052604090205460ff1660048111156107f4576107f46130db565b141592915050565b6000806108076119a4565b9050600080610814610c3a565b915091508060018285600401548561082c9190613397565b61083691906133ae565b61084091906133c1565b61084a91906133d4565b935050505090565b60008060006108686108626119a4565b856119c8565b915091508161089a5760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b6108a26119a4565b60010181815481106108b6576108b661336b565b6000918252602090912001546001600160a01b0316949350505050565b333014610901576000356001600160e01b0319166040516307337e1960e41b815260040161089191906133f6565b6107a28282611a2d565b61091361129e565b61091c81611ad6565b6107a28282611b0c565b6000806109316119a4565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b60606109666119a4565b6001018054806020026020016040519081016040528092919081815260200182805480156109bd57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161099f575b5050505050905090565b6109cf61129e565b6109d881611bb0565b50565b60006109e682611c1d565b5092915050565b6000806109f86119a4565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b610a2d61129e565b6107a28282611c9d565b60608060606000610a466119a4565b805460408051602080840282018101909252828152929350839190830182828015610a9a57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a7c575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610af957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610adb575b50505050509250610b0984611d9f565b915050909192565b6060610755838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d9f92505050565b6000610b596119a4565b60010154919050565b600061075882611e8b565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00610b9861165c565b8160010154610ba79190613397565b6002820154610bb69085613397565b10159392505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f811115610bf657610bf66130db565b60ff1681526020810191909152604001600020546001600160a01b0316905080610c35578160405163409140df60e11b8152600401610891919061340b565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b610c8a61129e565b610cc6828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ec092505050565b505050565b610cd361129e565b46600114610d235760405162461bcd60e51b815260206004820152601860248201527f4f6e6c79206f6e20657468657265756d2d6d61696e6e657400000000000000006044820152606401610891565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833750506040805160018082528183019092529293506000929150602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050610db6612bbc565b732260fac5e5542a773aa44fbcfedf7c193bc2c59985600081518110610dde57610dde61336b565b60200260200101906001600160a01b031690816001600160a01b031681525050737e73630f81647bcfd7b1f2c04c1c662d17d4577e84600081518110610e2657610e2661336b565b60200260200101906001600160a01b031690816001600160a01b0316815250507364192819ac13ef72bf6b5ae239ac672b43a9af0883600081518110610e6e57610e6e61336b565b60200260200101906001600160a01b031690816001600160a01b031681525050600082600081518110610ea357610ea361336b565b60200260200101906002811115610ebc57610ebc6130db565b90816002811115610ecf57610ecf6130db565b90525060408051600180825281830190925290602080830190803683375050508082528051636553f1009190600090610f0a57610f0a61336b565b60209081029190910101526040805160018082528183019092529081602001602082028036833750505060208201819052805163caa7e2009190600090610f5357610f5361336b565b602090810291909101015260408051600180825281830190925290816020016020820280368337505050604082018190528051600a9190600090610f9957610f9961336b565b60209081029190910101526040805160018082528183019092529081602001602082028036833750505060608201819052805163fa56ea009190600090610fe257610fe261336b565b60209081029190910101526040517364192819ac13ef72bf6b5ae239ac672b43a9af0890600090829061101f908990899088908890602401613425565b60408051601f198184030181529181526020820180516001600160e01b031663dff525e160e01b179052516110579190602401613556565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161108c9190613569565b6000604051808303816000865af19150503d80600081146110c9576040519150601f19603f3d011682016040523d82523d6000602084013e6110ce565b606091505b505090508061111f5760405162461bcd60e51b815260206004820181905260248201527f4d617020746f6b656e7320616e64207468726573686f6c6473206661696c65646044820152606401610891565b6105bf856118a5565b60606111326119a4565b8054604080516020808402820181019092528281529291908301828280156109bd576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161099f575050505050905090565b600054610100900460ff16158080156111ab5750600054600160ff909116105b806111c55750303b1580156111c5575060005460ff166001145b6112285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610891565b6000805460ff19166001179055801561124b576000805461ff0019166101001790555b8015611291576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146112f8576000356001600160e01b0319166001604051620f948f60ea1b8152600401610891929190613585565b565b606061130683836122a6565b61130f8161166f565b60006113196119a4565b84518751919250908114801561132f5750855181145b61135a576000356001600160e01b0319166040516306b5667560e21b815260040161089191906133f6565b806001600160401b0381111561137257611372612e84565b60405190808252806020026020018201604052801561139b578160200160208202803683370190505b509350806000036113ad575050611654565b60008060008060005b858110156115c0578a81815181106113d0576113d061336b565b602002602001015194508981815181106113ec576113ec61336b565b602002602001015193508b81815181106114085761140861336b565b6020026020010151925061141b856123b0565b611424846123b0565b826001600160601b031660000361145c576000356001600160e01b031916604051637f11b8a360e11b815260040161089191906133f6565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b0393841693918216926114b49290811691166135b3565b6114be91906135b3565b6114c891906135b3565b6001600160601b03166000148982815181106114e6576114e661336b565b60200260200101901515908115158152505088818151811061150a5761150a61336b565b6020026020010151156115b8578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c0190945290208054909116821790556115b590836133ae565b91505b6001016113b6565b50808660040160008282546115d591906133ae565b9091555050604051611610906347c28ec560e11b906115fc908c908f908d90602001613606565b6040516020818303038152906040526123e5565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c604051611645949392919061363f565b60405180910390a15050505050505b509392505050565b60006116666119a4565b60040154905090565b61167881612412565b156109d8576000356001600160e01b031916604051630d697db160e11b815260040161089191906133f6565b6000816116b08161166f565b60006116ba6119a4565b905060005b8451811015611721578160020160008683815181106116e0576116e061336b565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611717906001600160601b0316856133ae565b93506001016116bf565b505050919050565b60606000611736836124b1565b9392505050565b6000610755836001600160a01b03841661250d565b606082516001600160401b0381111561176d5761176d612e84565b604051908082528060200260200182016040528015611796578160200160208202803683370190505b50905060005b83518110156109e657600560008583815181106117bb576117bb61336b565b602002602001015160058111156117d4576117d46130db565b60058111156117e5576117e56130db565b815260200190815260200160002060009054906101000a90046001600160a01b03168282815181106118195761181961336b565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611871575060006001600160a01b031682828151811061185e5761185e61336b565b60200260200101516001600160a01b0316145b1561189d576000356001600160e01b03191660405163053265f160e01b815260040161089191906133f6565b60010161179c565b806118af8161166f565b600080516020613860833981519152600080805b855181101561195a578581815181106118de576118de61336b565b602002602001015192506118f183611ad6565b611902836312c0151560e21b612600565b61190c8484612793565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a16001016118c3565b505050505050565b61196b81611e8b565b6001600160601b03166000036109d8576000356001600160e01b0319166003604051620f948f60ea1b8152600401610891929190613585565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611a1b578481815481106119e9576119e961336b565b6000918252602090912001546001600160a01b0390811690851603611a1357600192509050611a26565b6001016119ce565b506000600019915091505b9250929050565b60005b8251811015610cc657306001600160a01b0316828281518110611a5557611a5561336b565b60200260200101516001600160a01b031603611a92576000356001600160e01b03191660405163053265f160e01b815260040161089191906133f6565b611ace838281518110611aa757611aa761336b565b6020026020010151838381518110611ac157611ac161336b565b60200260200101516127a8565b600101611a30565b806001600160a01b03163b6000036109d857604051630bfc64a360e21b81526001600160a01b0382166004820152602401610891565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f811115611b4257611b426130db565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f811115611b8357611b836130db565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6003811015611bd2576040516305f4dee960e31b815260040160405180910390fd5b6000611bdc6119a4565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b600080600080611c37611c2e6119a4565b600101866119c8565b9150915081611c64576040516326527e1760e01b81526001600160a01b0386166004820152602401610891565b611c6c6119a4565b805482908110611c7e57611c7e61336b565b6000918252602090912001546001600160a01b03169590945092505050565b80821180611cac575060018111155b15611cd8576000356001600160e01b0319166040516387f6f09560e01b815260040161089191906133f6565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000611d5b83613697565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000611dab6119a4565b905082516001600160401b03811115611dc657611dc6612e84565b604051908082528060200260200182016040528015611def578160200160208202803683370190505b50915060005b8351811015611e8457816002016000858381518110611e1657611e1661336b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110611e6457611e6461336b565b6001600160601b0390921660209283029190910190910152600101611df5565b5050919050565b6000611e956119a4565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081611ecc8161166f565b6000611ed66119a4565b8451909150806001600160401b03811115611ef357611ef3612e84565b604051908082528060200260200182016040528015611f1c578160200160208202803683370190505b50935080600003611f2e5750506122a0565b60058201548254611f409083906133c1565b1015611f5f5760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b8581101561222657898181518110611f8257611f8261336b565b60200260200101519350611f9584611c1d565b9095509150611fa3856123b0565b611fac846123b0565b6001600160a01b03851660009081526002880160205260409020546001600160601b03161580159061200057506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b8982815181106120125761201261336b565b6020026020010190151590811515815250508881815181106120365761203661336b565b60200260200101511561221e576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612079906001906133c1565b90508860000181815481106120905761209061336b565b60009182526020909120015489546001600160a01b03909116908a90869081106120bc576120bc61336b565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905588548990806120f6576120f66136b0565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b0319169055600189018054829081106121565761215661336b565b60009182526020909120015460018a0180546001600160a01b0390921691869081106121845761218461336b565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550886001018054806121c5576121c56136b0565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b031916905561221982866133ae565b945050505b600101611f68565b508186600401600082825461223b91906133c1565b909155505060405161226090636242a4ef60e11b906115fc908c908c906020016136c6565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a6040516122919291906136f4565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b038111156122c8576122c8612e84565b6040519080825280602002602001820160405280156122f1578160200160208202803683370190505b50925060005b8281101561234b578581815181106123115761231161336b565b602002602001015184828151811061232b5761232b61336b565b6001600160a01b03909216602092830291909101909101526001016122f7565b60005b828110156123a6578581815181106123685761236861336b565b60200260200101518583815181106123825761238261336b565b6001600160a01b03909216602092830291909101909101526001918201910161234e565b5050505092915050565b6001600160a01b0381166109d8576000356001600160e01b03191660405163104c66df60e31b815260040161089191906133f6565b6123ef828261283b565b6107a2573382826040516319b5fdcb60e31b815260040161089193929190613719565b6000815160000361242557506000919050565b60005b60018351038110156124a857600181015b835181101561249f578381815181106124545761245461336b565b60200260200101516001600160a01b03168483815181106124775761247761336b565b60200260200101516001600160a01b031603612497575060019392505050565b600101612439565b50600101612428565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561250157602002820191906000526020600020905b8154815260200190600101908083116124ed575b50505050509050919050565b600081815260018301602052604081205480156125f65760006125316001836133c1565b8554909150600090612545906001906133c1565b90508181146125aa5760008660000182815481106125655761256561336b565b90600052602060002001549050808760000184815481106125885761258861336b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125bb576125bb6136b0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610758565b6000915050610758565b60008160405160240161261391906133f6565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b0386169061265c908590613569565b600060405180830381855afa9150503d8060008114612697576040519150601f19603f3d011682016040523d82523d6000602084013e61269c565b606091505b50915091508161275e57846001600160a01b0316836040516024016126c19190613556565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516126f69190613569565b600060405180830381855afa9150503d8060008114612731576040519150601f19603f3d011682016040523d82523d6000602084013e612736565b606091505b5090925090508161275e57838560405163069d427960e11b815260040161089192919061374d565b808060200190518101906127729190613770565b61071057838560405163069d427960e11b815260040161089192919061374d565b6000610755836001600160a01b038416612b6d565b80600560008460058111156127bf576127bf6130db565b60058111156127d0576127d06130db565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561280e5761280e6130db565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b60016000612856600080516020613860833981519152611729565b8051909150600081900361286b575050610758565b6000816001600160401b0381111561288557612885612e84565b6040519080825280602002602001820160405280156128ae578160200160208202803683370190505b5090506000826001600160401b038111156128cb576128cb612e84565b6040519080825280602002602001820160405280156128fe57816020015b60608152602001906001900390816128e95790505b50905060008787604051602001612916929190613792565b604051602081830303815290604052905060008160405160240161293a9190613556565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015612b23578681815181106129835761298361336b565b60200260200101516001600160a01b0316836040516129a29190613569565b6000604051808303816000865af19150503d80600081146129df576040519150601f19603f3d011682016040523d82523d6000602084013e6129e4565b606091505b508683815181106129f7576129f761336b565b60200260200101868481518110612a1057612a1061336b565b6020026020010182905282151515158152505050848181518110612a3657612a3661336b565b6020026020010151612b1b57868181518110612a5457612a5461336b565b60200260200101516001600160a01b031682604051612a739190613569565b6000604051808303816000865af19150503d8060008114612ab0576040519150601f19603f3d011682016040523d82523d6000602084013e612ab5565b606091505b50868381518110612ac857612ac861336b565b60200260200101868481518110612ae157612ae161336b565b6020026020010182905282151515158152505050878015612b185750848181518110612b0f57612b0f61336b565b60200260200101515b97505b600101612969565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b6382878686604051612b5994939291906137c3565b60405180910390a150505050505092915050565b6000818152600183016020526040812054612bb457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610758565b506000610758565b60405180608001604052806004905b6060815260200190600190039081612bcb5790505090565b60008083601f840112612bf557600080fd5b5081356001600160401b03811115612c0c57600080fd5b6020830191508360208260051b8501011115611a2657600080fd5b60008060008060008060608789031215612c4057600080fd5b86356001600160401b0380821115612c5757600080fd5b612c638a838b01612be3565b90985096506020890135915080821115612c7c57600080fd5b612c888a838b01612be3565b90965094506040890135915080821115612ca157600080fd5b50612cae89828a01612be3565b979a9699509497509295939492505050565b60008060208385031215612cd357600080fd5b82356001600160401b03811115612ce957600080fd5b612cf585828601612be3565b90969095509350505050565b60008151808452602080850194506020840160005b83811015612d3b5781516001600160a01b031687529582019590820190600101612d16565b509495945050505050565b6020815260006107556020830184612d01565b600060208284031215612d6b57600080fd5b5035919050565b60008083601f840112612d8457600080fd5b5081356001600160401b03811115612d9b57600080fd5b602083019150836020606083028501011115611a2657600080fd5b600080600080600060608688031215612dce57600080fd5b85356001600160401b0380821115612de557600080fd5b9087019060e0828a031215612df957600080fd5b90955060208701359080821115612e0f57600080fd5b612e1b89838a01612be3565b90965094506040880135915080821115612e3457600080fd5b50612e4188828901612d72565b969995985093965092949392505050565b80356001600160a01b0381168114610c3557600080fd5b600060208284031215612e7b57600080fd5b61075582612e52565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612ec257612ec2612e84565b604052919050565b60006001600160401b03821115612ee357612ee3612e84565b5060051b60200190565b600082601f830112612efe57600080fd5b81356020612f13612f0e83612eca565b612e9a565b8083825260208201915060208460051b870101935086841115612f3557600080fd5b602086015b84811015612f5f57803560068110612f525760008081fd5b8352918301918301612f3a565b509695505050505050565b600082601f830112612f7b57600080fd5b81356020612f8b612f0e83612eca565b8083825260208201915060208460051b870101935086841115612fad57600080fd5b602086015b84811015612f5f57612fc381612e52565b8352918301918301612fb2565b60008060408385031215612fe357600080fd5b82356001600160401b0380821115612ffa57600080fd5b61300686838701612eed565b9350602085013591508082111561301c57600080fd5b5061302985828601612f6a565b9150509250929050565b803560108110610c3557600080fd5b6000806040838503121561305557600080fd5b61305e83613033565b915061306c60208401612e52565b90509250929050565b60008060008060006060868803121561308d57600080fd5b85356001600160401b03808211156130a457600080fd5b90870190610100828a031215612df957600080fd5b600080604083850312156130cc57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60a0810160058710613105576131056130db565b95815260208101949094526040840192909252606083015260809091015290565b60008151808452602080850194506020840160005b83811015612d3b5781516001600160601b03168752958201959082019060010161313b565b6060815260006131736060830186612d01565b82810360208401526131858186612d01565b905082810360408401526131998185613126565b9695505050505050565b6020815260006107556020830184613126565b6000602082840312156131c857600080fd5b61075582613033565b600082601f8301126131e257600080fd5b813560206131f2612f0e83612eca565b8083825260208201915060208460051b87010193508684111561321457600080fd5b602086015b84811015612f5f5780356001600160601b03811681146132395760008081fd5b8352918301918301613219565b6000806000806000806000806000806101408b8d03121561326657600080fd5b8a35995060208b0135985060408b0135975061328460608c01612e52565b965060808b01356001600160401b03808211156132a057600080fd5b6132ac8e838f01612f6a565b975060a08d01359150808211156132c257600080fd5b6132ce8e838f01612f6a565b965060c08d01359150808211156132e457600080fd5b6132f08e838f01612f6a565b955060e08d013591508082111561330657600080fd5b6133128e838f016131d1565b94506101008d013591508082111561332957600080fd5b6133358e838f01612eed565b93506101208d013591508082111561334c57600080fd5b506133598d828e01612f6a565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761075857610758613381565b8082018082111561075857610758613381565b8181038181111561075857610758613381565b6000826133f157634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b602081016010831061341f5761341f6130db565b91905290565b6080815260006134386080830187612d01565b60208382038185015261344b8288612d01565b8481036040860152865180825282880193509082019060005b818110156134905784516003811061347e5761347e6130db565b83529383019391830191600101613464565b50508481036060860152915081608081018660005b60048110156134f657838303865281518051808552908601908685019060005b818110156134e1578351835292880192918801916001016134c5565b505096860196935050908401906001016134a5565b50909a9950505050505050505050565b60005b83811015613521578181015183820152602001613509565b50506000910152565b60008151808452613542816020860160208601613506565b601f01601f19169290920160200192915050565b602081526000610755602083018461352a565b6000825161357b818460208701613506565b9190910192915050565b6001600160e01b03198316815260408101600b83106135a6576135a66130db565b8260208301529392505050565b6001600160601b038181168382160190808211156109e6576109e6613381565b60008151808452602080850194506020840160005b83811015612d3b5781511515875295820195908201906001016135e8565b6060815260006136196060830186612d01565b828103602084015261362b8186613126565b9050828103604084015261319981856135d3565b60808152600061365260808301876135d3565b82810360208401526136648187613126565b905082810360408401526136788186612d01565b9050828103606084015261368c8185612d01565b979650505050505050565b6000600182016136a9576136a9613381565b5060010190565b634e487b7160e01b600052603160045260246000fd5b6040815260006136d96040830185612d01565b82810360208401526136eb81856135d3565b95945050505050565b60408152600061370760408301856135d3565b82810360208401526136eb8185612d01565b6001600160a01b03841681526001600160e01b0319831660208201526060604082018190526000906136eb9083018461352a565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006020828403121561378257600080fd5b8151801515811461173657600080fd5b6001600160e01b03198316815281516000906137b5816004850160208701613506565b919091016004019392505050565b6080815260006137d6608083018761352a565b6020838203818501526137e98288612d01565b915083820360408501526137fd82876135d3565b915083820360608501528185518084528284019150828160051b85010183880160005b8381101561384e57601f1987840301855261383c83835161352a565b94860194925090850190600101613820565b50909b9a505050505050505050505056fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a2646970667358221220ddb3d07e0bd9778e7ee67146a1a2ce8218b11d73fd07f5b259ad590c3632d90164736f6c63430008170033", + "nonce": "0x5", + "chainId": "0x1" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0xe31b58", + "logs": [ + { + "address": "0x3ba040bc32352e2dc21f9a85c5573e84696a74dd", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockHash": "0x424b80dbcf901fc064a426c1364be06fa7e366e83686162e79943a7d06900be6", + "blockNumber": "0x1384fd5", + "blockTimestamp": "0x66b1bf4b", + "transactionHash": "0xdc4e90383be718d5a6ef2305385f2b96d8f5f819f05dfe88600cb2101d9c9952", + "transactionIndex": "0x2b", + "logIndex": "0x183", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000004000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xdc4e90383be718d5a6ef2305385f2b96d8f5f819f05dfe88600cb2101d9c9952", + "transactionIndex": "0x2b", + "blockHash": "0x424b80dbcf901fc064a426c1364be06fa7e366e83686162e79943a7d06900be6", + "blockNumber": "0x1384fd5", + "gasUsed": "0x3110d5", + "effectiveGasPrice": "0xc55e7d4f", + "from": "0xa62dddcc58e769bcfd2f9a7a61cdf331f18c2650", + "to": null, + "contractAddress": "0x3ba040bc32352e2dc21f9a85c5573e84696a74dd" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1722924899, + "chain": 1, + "commit": "72433aa" +} \ No newline at end of file From a49e795ec8432f3edc7a12aaf59b15b1a435b0d6 Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 8 Aug 2024 13:36:05 +0700 Subject: [PATCH 302/305] config: update gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9feb60e5..6aa403ac 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ dry-run/ dependencies deployments/**/exported_address -run-latest.json \ No newline at end of file +run-latest.json +local/ \ No newline at end of file From 1943ab3e95629053971bbab41753361c32f9515b Mon Sep 17 00:00:00 2001 From: nxqbao Date: Thu, 8 Aug 2024 14:34:36 +0700 Subject: [PATCH 303/305] resolve conflict --- script/factories/mainchain/factory-maptoken-mainchain.s.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/factories/mainchain/factory-maptoken-mainchain.s.sol b/script/factories/mainchain/factory-maptoken-mainchain.s.sol index 3bb2691e..d74c3eef 100644 --- a/script/factories/mainchain/factory-maptoken-mainchain.s.sol +++ b/script/factories/mainchain/factory-maptoken-mainchain.s.sol @@ -17,7 +17,7 @@ import { SignatureConsumer } from "@ronin/contracts/interfaces/consumers/Signatu import { MapTokenInfo } from "../../libraries/MapTokenInfo.sol"; import { LibCompanionNetwork } from "script/shared/libraries/LibCompanionNetwork.sol"; import { MainchainBridgeAdminUtils } from "test/helpers/MainchainBridgeAdminUtils.t.sol"; -import { MainchainBridgeManager } from "@ronin/contracts/mainchain/MainchainBridgeManager.sol"; +import { IMainchainBridgeManager } from "script/interfaces/IMainchainBridgeManager.sol"; import { LibProposal } from "script/shared/libraries/LibProposal.sol"; import { Network, TNetwork } from "../../utils/Network.sol"; import { IBridgeManager } from "@ronin/contracts/interfaces/bridge/IBridgeManager.sol"; @@ -51,7 +51,7 @@ abstract contract Factory__MapTokensMainchain is Migration { function _relayProposal(Proposal.ProposalDetail memory proposal) internal { MainchainBridgeAdminUtils mainchainProposalUtils = - new MainchainBridgeAdminUtils(2021, _governorPKs, MainchainBridgeManager(_mainchainBridgeManager), _governors[0]); + new MainchainBridgeAdminUtils(2021, _governorPKs, IMainchainBridgeManager(_mainchainBridgeManager), _governors[0]); Ballot.VoteType[] memory supports_ = new Ballot.VoteType[](_governors.length); require(_governors.length > 0 && _governors.length == _governorPKs.length, "Invalid governors information"); @@ -68,7 +68,7 @@ abstract contract Factory__MapTokensMainchain is Migration { } vm.broadcast(_specifiedCaller); - MainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, supports_, signatures); + IMainchainBridgeManager(_mainchainBridgeManager).relayProposal{ gas: gasAmounts }(proposal, supports_, signatures); } function _createAndVerifyProposalOnMainchain(uint256 chainId, uint256 nonce) internal returns (Proposal.ProposalDetail memory proposal) { From 0666b2c1383d859e0a047d3dccf0940a0481f4db Mon Sep 17 00:00:00 2001 From: Do Tu Date: Thu, 8 Aug 2024 15:03:48 +0700 Subject: [PATCH 304/305] chore: add RoninGatewayV3 mainnet-v3.2.2 deployment artifact --- .../ronin-mainnet/RoninGatewayV3Logic.json | 2961 +++-------------- 1 file changed, 414 insertions(+), 2547 deletions(-) diff --git a/deployments/ronin-mainnet/RoninGatewayV3Logic.json b/deployments/ronin-mainnet/RoninGatewayV3Logic.json index c0df86a4..69edb6c5 100644 --- a/deployments/ronin-mainnet/RoninGatewayV3Logic.json +++ b/deployments/ronin-mainnet/RoninGatewayV3Logic.json @@ -1,2180 +1,189 @@ { - "address": "0x1477DB6bF449B0eb1191a1F4023867ddCEadc504", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "voter", - "type": "address" - } - ], - "name": "ErrAlreadyVoted", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "ErrContractTypeNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "ErrERC20MintingFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ErrERC721MintingFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ErrEmptyArray", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "uint256", - "name": "actual", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - } - ], - "name": "ErrInvalidChainId", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidInfo", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidReceipt", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidReceiptKind", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidRequest", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrInvalidThreshold", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidTokenStandard", - "type": "error" - }, - { - "inputs": [], - "name": "ErrInvalidTrustedThreshold", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - } - ], - "name": "ErrLengthMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "ErrQueryForTooSmallQuantity", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "tokenInfo", - "type": "tuple" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "ErrTokenCouldNotTransfer", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "tokenInfo", - "type": "tuple" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "ErrTokenCouldNotTransferFrom", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "msgSig", - "type": "bytes4" - }, - { - "internalType": "enum RoleAccess", - "name": "expectedRole", - "type": "uint8" - } - ], - "name": "ErrUnauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "ErrUnsupportedStandard", - "type": "error" - }, - { - "inputs": [], - "name": "ErrUnsupportedToken", - "type": "error" - }, - { - "inputs": [], - "name": "ErrWithdrawalsMigrated", - "type": "error" - }, - { - "inputs": [], - "name": "ErrWithdrawnOnMainchainAlready", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ErrZeroCodeContract", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "ContractUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "bridgeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - } - ], - "name": "DepositVoted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "MainchainWithdrew", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "threshold", - "type": "uint256[]" - } - ], - "name": "MinimumThresholdsUpdated", - "type": "event" - }, - { - "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": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousDenominator", - "type": "uint256" - } - ], - "name": "ThresholdUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "roninTokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "mainchainTokens", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "enum Token.Standard[]", - "name": "standards", - "type": "uint8[]" - } - ], - "name": "TokenMapped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "numerator", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousDenominator", - "type": "uint256" - } - ], - "name": "TrustedThresholdUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "", - "type": "tuple" - } - ], - "name": "WithdrawalRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "receiptHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "indexed": false, - "internalType": "struct Transfer.Receipt", - "name": "", - "type": "tuple" - } - ], - "name": "WithdrawalSignaturesRequested", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "recipientAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Request[]", - "name": "_requests", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - } - ], - "name": "bulkRequestWithdrawalFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "withdrawals", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "bulkSubmitWithdrawalSignatures", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_voteWeight", - "type": "uint256" - } - ], - "name": "checkThreshold", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Receipt", - "name": "_receipt", - "type": "tuple" - } - ], - "name": "depositFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "depositVote", - "outputs": [ - { - "internalType": "enum VoteStatusConsumer.VoteStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "finalHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "expiredAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_depositId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_voter", - "type": "address" - } - ], - "name": "depositVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "emergencyPauser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum ContractType", - "name": "contractType", - "type": "uint8" - } - ], - "name": "getContract", - "outputs": [ - { - "internalType": "address", - "name": "contract_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_roninToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - } - ], - "name": "getMainchainToken", - "outputs": [ - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - } - ], - "internalType": "struct MappedTokenConsumer.MappedToken", - "name": "_token", - "type": "tuple" - } - ], - "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": [], - "name": "getThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "num_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "denom_", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTrustedThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "trustedNum_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "trustedDenom_", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "withdrawalId", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "operators", - "type": "address[]" - } - ], - "name": "getWithdrawalSignatures", - "outputs": [ - { - "internalType": "bytes[]", - "name": "_signatures", - "type": "bytes[]" - } - ], - "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": [ - { - "internalType": "address", - "name": "_roleSetter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_trustedNumerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_trustedDenominator", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "", - "type": "address[]" - }, - { - "internalType": "address[][2]", - "name": "_packedAddresses", - "type": "address[][2]" - }, - { - "internalType": "uint256[][2]", - "name": "_packedNumbers", - "type": "uint256[][2]" - }, - { - "internalType": "enum Token.Standard[]", - "name": "_standards", - "type": "uint8[]" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initializeV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "bridgeAdmin", - "type": "address" - } - ], - "name": "initializeV3", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_withdrawalId", - "type": "uint256" - } - ], - "name": "mainchainWithdrew", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "mainchainWithdrewVote", - "outputs": [ - { - "internalType": "enum VoteStatusConsumer.VoteStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "finalHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "expiredAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_withdrawalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_voter", - "type": "address" - } - ], - "name": "mainchainWithdrewVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_roninTokens", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "_mainchainTokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_chainIds", - "type": "uint256[]" - }, - { - "internalType": "enum Token.Standard[]", - "name": "_standards", - "type": "uint8[]" - } - ], - "name": "mapTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "minimumThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minimumVoteWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "recipientAddr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Request", - "name": "_request", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "_chainId", - "type": "uint256" - } - ], - "name": "requestWithdrawalFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_withdrawalId", - "type": "uint256" - } - ], - "name": "requestWithdrawalSignatures", - "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": "enum ContractType", - "name": "contractType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "setContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - } - ], - "name": "setEmergencyPauser", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_thresholds", - "type": "uint256[]" - } - ], - "name": "setMinimumThresholds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_denominator", - "type": "uint256" - } - ], - "name": "setThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_trustedNumerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_trustedDenominator", - "type": "uint256" - } - ], - "name": "setTrustedThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_withdrawalIds", - "type": "uint256[]" - } - ], - "name": "tryBulkAcknowledgeMainchainWithdrew", - "outputs": [ - { - "internalType": "bool[]", - "name": "_executedReceipts", - "type": "bool[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" - } - ], - "internalType": "struct Transfer.Receipt[]", - "name": "_receipts", - "type": "tuple[]" - } - ], - "name": "tryBulkDepositFor", - "outputs": [ - { - "internalType": "bool[]", - "name": "_executedReceipts", - "type": "bool[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "withdrawal", - "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "enum Transfer.Kind", - "name": "kind", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "mainchain", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "internalType": "struct Token.Owner", - "name": "ronin", - "type": "tuple" + "abi": "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bulkRequestWithdrawalFor\",\"inputs\":[{\"name\":\"requests\",\"type\":\"tuple[]\",\"internalType\":\"struct Transfer.Request[]\",\"components\":[{\"name\":\"recipientAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bulkSubmitWithdrawalSignatures\",\"inputs\":[{\"name\":\"withdrawals\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"signatures\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"_voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositFor\",\"inputs\":[{\"name\":\"_receipt\",\"type\":\"tuple\",\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"depositVote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"finalHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiredAt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositVoted\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_depositId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"emergencyPauser\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMainchainToken\",\"inputs\":[{\"name\":\"_roninToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"_token\",\"type\":\"tuple\",\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"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\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num_\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTrustedThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"trustedNum_\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"trustedDenom_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawalSignatures\",\"inputs\":[{\"name\":\"withdrawalId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"_signatures\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"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\":[{\"name\":\"_roleSetter\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_numerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_denominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_trustedNumerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_trustedDenominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_packedAddresses\",\"type\":\"address[][2]\",\"internalType\":\"address[][2]\"},{\"name\":\"_packedNumbers\",\"type\":\"uint256[][2]\",\"internalType\":\"uint256[][2]\"},{\"name\":\"_standards\",\"type\":\"uint8[]\",\"internalType\":\"enum TokenStandard[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeV2\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeV3\",\"inputs\":[{\"name\":\"bridgeAdmin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mainchainWithdrew\",\"inputs\":[{\"name\":\"_withdrawalId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mainchainWithdrewVote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"finalHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiredAt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mainchainWithdrewVoted\",\"inputs\":[{\"name\":\"_withdrawalId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mapTokens\",\"inputs\":[{\"name\":\"_roninTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_mainchainTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_chainIds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"_standards\",\"type\":\"uint8[]\",\"internalType\":\"enum TokenStandard[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"mapTokensWithMinThresholds\",\"inputs\":[{\"name\":\"roninTokens_\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"mainchainTokens_\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"chainIds_\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"standards_\",\"type\":\"uint8[]\",\"internalType\":\"enum TokenStandard[]\"},{\"name\":\"minimumThresholds_\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minimumThreshold\",\"inputs\":[{\"name\":\"mainchainToken\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonce\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onERC1155BatchReceived\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onERC1155Received\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"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\":\"renounceRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"requestWithdrawalFor\",\"inputs\":[{\"name\":\"_request\",\"type\":\"tuple\",\"internalType\":\"struct Transfer.Request\",\"components\":[{\"name\":\"recipientAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"requestWithdrawalSignatures\",\"inputs\":[{\"name\":\"_withdrawalId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"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\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setEmergencyPauser\",\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinimumThresholds\",\"inputs\":[{\"name\":\"mainchainTokens_\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"thresholds_\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"_numerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_denominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setTrustedThreshold\",\"inputs\":[{\"name\":\"_trustedNumerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_trustedDenominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"tryBulkAcknowledgeMainchainWithdrew\",\"inputs\":[{\"name\":\"_withdrawalIds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"_executedReceipts\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"tryBulkDepositFor\",\"inputs\":[{\"name\":\"receipts\",\"type\":\"tuple[]\",\"internalType\":\"struct Transfer.Receipt[]\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[{\"name\":\"_executedReceipts\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unmapTokens\",\"inputs\":[{\"name\":\"roninTokens_\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"chainIds_\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawal\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalStatVote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"finalHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiredAt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DepositVoted\",\"inputs\":[{\"name\":\"bridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Deposited\",\"inputs\":[{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"receipt\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MainchainWithdrew\",\"inputs\":[{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"receipt\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinimumThresholdsUpdated\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"threshold\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"}],\"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\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TokenMapped\",\"inputs\":[{\"name\":\"roninTokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"mainchainTokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"chainIds\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"},{\"name\":\"standards\",\"type\":\"uint8[]\",\"indexed\":false,\"internalType\":\"enum TokenStandard[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TokenUnmapped\",\"inputs\":[{\"name\":\"roninTokens\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"chainIds\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TrustedThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalRequested\",\"inputs\":[{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalSignaturesRequested\",\"inputs\":[{\"name\":\"receiptHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"components\":[{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"enum Transfer.Kind\"},{\"name\":\"mainchain\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"ronin\",\"type\":\"tuple\",\"internalType\":\"struct TokenOwner\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenAddr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"info\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrAlreadyVoted\",\"inputs\":[{\"name\":\"voter\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrERC1155MintingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrERC20MintingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrERC721MintingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrEmptyArray\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidChainId\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidInfo\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidReceipt\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidReceiptKind\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidTokenStandard\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidTrustedThreshold\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrQueryForTooSmallQuantity\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrTokenCouldNotTransfer\",\"inputs\":[{\"name\":\"tokenInfo\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrTokenCouldNotTransferFrom\",\"inputs\":[{\"name\":\"tokenInfo\",\"type\":\"tuple\",\"internalType\":\"struct TokenInfo\",\"components\":[{\"name\":\"erc\",\"type\":\"uint8\",\"internalType\":\"enum TokenStandard\"},{\"name\":\"id\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"quantity\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedStandard\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrUnsupportedToken\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrWithdrawalsMigrated\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrWithdrawnOnMainchainAlready\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + "absolutePath": "RoninGatewayV3.sol", + "address": "0xd2c2746db8ECc5E13b7F9CD0cC6eBA84A68B26ba", + "ast": "", + "blockNumber": 37030080, + "bytecode": "\"0x60806040523480156200001157600080fd5b506000805460ff19169055620000266200002c565b620000ee565b603754610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60375460ff9081161015620000ec576037805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6153cf80620000fe6000396000f3fe6080604052600436106102cd5760003560e01c8063835fc6ca11610175578063c28f7894116100dc578063e75235b811610095578063f23a6e611161006f578063f23a6e6114610988578063f668214a146109b4578063fa389659146109d4578063fc6574bc146109f4576102dc565b8063e75235b8146108fd578063ecc8364914610915578063f0ce418e14610942576102dc565b8063c28f789414610817578063ca15c8731461085d578063d547741f1461087d578063dafae4081461089d578063dbd2ef6c146108bd578063de981f1b146108dd576102dc565b8063a217fddf1161012e578063a217fddf14610746578063affed0e01461075b578063b9afa17714610771578063b9c3620914610791578063bc197c81146107b1578063bc7f0386146107ea576102dc565b8063835fc6ca146106805780638456cb59146106b1578063865e6fd3146106c65780639010d07c146106e657806391d14854146107065780639584a59214610726576102dc565b80633f4ba83a116102345780635c975abb116101ed57806364363f78116101c757806364363f781461061557806371706cbe1461063557806375535f861461064b5780637de5dedd1461066b576102dc565b80635c975abb146105bb5780635cd8a76b146105d35780635d6a9a90146105e8576102dc565b80633f4ba83a146104c557806347b56b2c146104da57806348e6a22c146104fa57806349cae6b51461051a5780634d92c4f01461053a5780635a7dd06a1461059b576102dc565b8063248a9ca311610286578063248a9ca3146103e75780632f2ff15d146104255780633101cfcb1461044557806336568abe146104655780633e4574ec146104855780633e70838b146104a5576102dc565b806301ffc9a7146102e4578063065b3adf146103195780630b1ff17f14610351578063109679ef1461037157806317892f961461039157806317fa2ea1146103ba576102dc565b366102dc576102da610a46565b005b6102da610a46565b3480156102f057600080fd5b506103046102ff366004613e54565b610a5f565b60405190151581526020015b60405180910390f35b34801561032557600080fd5b50600554610339906001600160a01b031681565b6040516001600160a01b039091168152602001610310565b34801561035d57600080fd5b506102da61036c366004613e7e565b610a7f565b34801561037d57600080fd5b506102da61038c366004613eaf565b610a96565b34801561039d57600080fd5b506078546079545b60408051928352602083019190915201610310565b3480156103c657600080fd5b506103da6103d5366004613f0c565b610ac9565b6040516103109190613f4d565b3480156103f357600080fd5b50610417610402366004613f87565b6000908152606b602052604090206001015490565b604051908152602001610310565b34801561043157600080fd5b506102da610440366004613fc0565b610e06565b34801561045157600080fd5b506102da610460366004613ff0565b610e30565b34801561047157600080fd5b506102da610480366004613fc0565b610edc565b34801561049157600080fd5b506103046104a0366004613fc0565b610f56565b3480156104b157600080fd5b506102da6104c0366004613ff0565b610f86565b3480156104d157600080fd5b506102da610fb0565b3480156104e657600080fd5b506102da6104f5366004613f87565b610fc2565b34801561050657600080fd5b506102da61051536600461400d565b61118d565b34801561052657600080fd5b506102da610535366004614078565b6111e2565b34801561054657600080fd5b5061058b610555366004614168565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b60405161031094939291906141a0565b3480156105a757600080fd5b506102da6105b63660046141d0565b611242565b3480156105c757600080fd5b5060005460ff16610304565b3480156105df57600080fd5b506102da6112a2565b3480156105f457600080fd5b5061060861060336600461424a565b6113a4565b6040516103109190614286565b34801561062157600080fd5b506102da61063036600461400d565b611448565b34801561064157600080fd5b50610417606e5481565b34801561065757600080fd5b506103a5610666366004614168565b611484565b34801561067757600080fd5b506104176114a5565b34801561068c57600080fd5b506106a061069b366004613f87565b6114bc565b60405161031095949392919061430f565b3480156106bd57600080fd5b506102da61158e565b3480156106d257600080fd5b506102da6106e1366004614365565b61159e565b3480156106f257600080fd5b50610339610701366004614168565b6115b9565b34801561071257600080fd5b50610304610721366004613fc0565b6115d1565b34801561073257600080fd5b506102da6107413660046143a2565b6115fc565b34801561075257600080fd5b50610417600081565b34801561076757600080fd5b5061041760045481565b34801561077d57600080fd5b506103da61078c36600461449b565b611749565b34801561079d57600080fd5b506102da6107ac366004614168565b611867565b3480156107bd57600080fd5b506107dd6107cc36600461467f565b63bc197c8160e01b95945050505050565b604051610310919061472c565b3480156107f657600080fd5b50610417610805366004613ff0565b60386020526000908152604090205481565b34801561082357600080fd5b5061058b610832366004613f87565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561086957600080fd5b50610417610878366004613f87565b611879565b34801561088957600080fd5b506102da610898366004613fc0565b611890565b3480156108a957600080fd5b506103046108b8366004613f87565b6118b5565b3480156108c957600080fd5b506102da6108d8366004614741565b6118e1565b3480156108e957600080fd5b506103396108f8366004614804565b611933565b34801561090957600080fd5b506001546002546103a5565b34801561092157600080fd5b5061093561093036600461481f565b6119ae565b60405161031091906148ba565b34801561094e57600080fd5b5061058b61095d366004613f87565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561099457600080fd5b506107dd6109a336600461491e565b63f23a6e6160e01b95945050505050565b3480156109c057600080fd5b506103046109cf366004613f87565b611b15565b3480156109e057600080fd5b506102da6109ef36600461400d565b611b43565b348015610a0057600080fd5b50610304610a0f366004614986565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b6000610a6a82611d32565b80610a795750610a7982611d57565b92915050565b610a87611d7c565b610a92823383611dc2565b5050565b610a9e611d7c565b610aa6611e91565b610ac6610ab836839003830183614a5d565b33610ac16114a5565b611f32565b50565b6060610ad3611e91565b336000610ade6114a5565b9050600084806001600160401b03811115610afb57610afb614510565b604051908082528060200260200182016040528015610b24578160200160208202803683370190505b5094506000610b336003611933565b905060005b82811015610dfa57888882818110610b5257610b52614aee565b905060200201359350816001600160a01b031663c7c4fea9600286896040518463ffffffff1660e01b8152600401610b8c93929190614b04565b600060405180830381600087803b158015610ba657600080fd5b505af1158015610bba573d6000803e3d6000fd5b50505050610bc784611b15565b15610bf1576001878281518110610be057610be0614aee565b911515602092830291909101909101525b600084815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610c3857610c3861418a565b6001811115610c4957610c4961418a565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff1690811115610ce157610ce161418a565b6002811115610cf257610cf261418a565b81526001820154602082015260029091015460409091015290525090506000610d1a82612239565b90506000610d2a848b8b85612303565b90506001816004811115610d4057610d4061418a565b03610deb57835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d7f91908c90600401614b2e565b600060405180830381600087803b158015610d9957600080fd5b505af1158015610dad573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610de2929190614b45565b60405180910390a15b50505050806001019050610b38565b50505050505092915050565b6000828152606b6020526040902060010154610e2181612336565b610e2b8383612340565b505050565b603754600390610100900460ff16158015610e52575060375460ff8083169116105b610e775760405162461bcd60e51b8152600401610e6e90614ba4565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e96600b83612362565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610f4c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610e6e565b610a928282612406565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f8e612428565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610fb8612482565b610fc06124f1565b565b610fca611d7c565b610fd381611b15565b15610ff1576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff16908111156110305761103061418a565b60018111156110415761104161418a565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff16908111156110d9576110d961418a565b60028111156110ea576110ea61418a565b815260018201546020820152600290910154604091820152915260608301510151919250504614611154576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610e6e565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61117e82612239565b82604051610ed0929190614b45565b611195612428565b828015806111a35750808214155b156111cf576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b6111db85858585612543565b5050505050565b6111ea612428565b600089900361121a576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b61122a8a8a8a8a8a8a8a8a612645565b6112368888848461286e565b50505050505050505050565b61124a611d7c565b81600081900361126d576040516316ee9d3b60e11b815260040160405180910390fd5b60005b818110156111db5761129a85858381811061128d5761128d614aee565b905060a002013385611dc2565b600101611270565b603754600290610100900460ff161580156112c4575060375460ff8083169116105b6112e05760405162461bcd60e51b8152600401610e6e90614ba4565b6037805461ffff191660ff83161761010017905560745461130c906008906001600160a01b0316612362565b607554611324906003906001600160a01b0316612362565b60775461133c90600a906001600160a01b0316612362565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660028111156113f8576113f861418a565b60028111156114095761140961418a565b815290546001600160a01b0361010090910481166020928301529082015191925016610a7957604051631b79f53b60e21b815260040160405180910390fd5b611450612428565b6000839003611472576040516316ee9d3b60e11b815260040160405180910390fd5b61147e8484848461286e565b50505050565b60008061148f612428565b6114998484612951565b915091505b9250929050565b60006114b76114b26129db565b612a48565b905090565b607160209081526000918252604091829020805460018201548451606080820187526002808601546001600160a01b03908116845260038701548116848901526004870154848a015288518084018a526005880154821681526006880154909116978101979097526007860154878901528751918201909752600885018054949760ff9485169793969395939492939192849216908111156115605761156061418a565b60028111156115715761157161418a565b815260200160018201548152602001600282015481525050905085565b611596612482565b610fc0612a7e565b6115a6612428565b6115af81612abb565b610a928282612362565b6000828152606c60205260408120610f7f9083612af1565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff161580801561161c5750603754600160ff909116105b806116365750303b158015611636575060375460ff166001145b6116525760405162461bcd60e51b8152600401610e6e90614ba4565b6037805460ff191660011790558015611675576037805461ff0019166101001790555b61168060008d612afd565b61168a8b8b612b07565b6116948989612951565b50600090506116a38680614bf2565b905011156116f5576116d66116b88680614bf2565b6116c56020890189614bf2565b6116cf8980614bf2565b8989612645565b6116f56116e38680614bf2565b6116f06020880188614bf2565b61286e565b801561173b576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b6060611753611d7c565b61175b611e91565b81806001600160401b0381111561177457611774614510565b60405190808252806020026020018201604052801561179d578160200160208202803683370190505b50915060006117aa6114a5565b90506117b4613de7565b60005b8381101561185d578686828181106117d1576117d1614aee565b905061016002018036038101906117e89190614a5d565b915060026040808401518101516000908152606f6020908152828220865183529052205460ff1660048111156118205761182061418a565b0361184a57600185828151811061183957611839614aee565b911515602092830291909101909101525b611855823385611f32565b6001016117b7565b5050505092915050565b61186f612428565b610a928282612b07565b6000818152606c60205260408120610a7990612b97565b6000828152606b60205260409020600101546118ab81612336565b610e2b8383612406565b60006118bf6129db565b6001546118cc9190614c51565b6002546118d99084614c51565b101592915050565b6118e9612428565b6000879003611919576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b6119298888888888888888612645565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561196a5761196a61418a565b60ff1681526020810191909152604001600020546001600160a01b03169050806119a9578160405163409140df60e11b8152600401610e6e9190614c68565b919050565b6060816001600160401b038111156119c8576119c8614510565b6040519080825280602002602001820160405280156119fb57816020015b60608152602001906001900390816119e65790505b50905060005b82811015611b0d57600085815260726020526040812090858584818110611a2a57611a2a614aee565b9050602002016020810190611a3f9190613ff0565b6001600160a01b03166001600160a01b031681526020019081526020016000208054611a6a90614c82565b80601f0160208091040260200160405190810160405280929190818152602001828054611a9690614c82565b8015611ae35780601f10611ab857610100808354040283529160200191611ae3565b820191906000526020600020905b815481529060010190602001808311611ac657829003601f168201915b5050505050828281518110611afa57611afa614aee565b6020908102919091010152600101611a01565b509392505050565b6000600260008381526070602052604090205460ff166004811115611b3c57611b3c61418a565b1492915050565b611b4b611d7c565b611b53611e91565b33838015801590611b6357508083145b611b8e576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b6000611b986114a5565b9050600080611ba76003611933565b905060005b8481101561123657898982818110611bc657611bc6614aee565b905060200201359250878782818110611be157611be1614aee565b9050602002810190611bf39190614cb6565b60008581526072602090815260408083206001600160a01b038c168452909152902091611c21919083614d4c565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611c539060019087908b90600401614b04565b600060405180830381600087803b158015611c6d57600080fd5b505af1158015611c81573d6000803e3d6000fd5b50505060008481526076602052604081209150611ca082898888612303565b90506001816004811115611cb657611cb661418a565b03611d2857815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611cf5906001908990600401614b2e565b600060405180830381600087803b158015611d0f57600080fd5b505af1158015611d23573d6000803e3d6000fd5b505050505b5050600101611bac565b60006001600160e01b03198216635a05180f60e01b1480610a795750610a7982612ba1565b60006001600160e01b03198216630271189760e51b1480610a795750610a7982611d32565b60005460ff1615610fc05760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610e6e565b611ddc611dd736859003850160408601614e0b565b612bd6565b611de583612c1a565b6000611e00611dfa6040860160208701613ff0565b836113a4565b80519091506002811115611e1657611e1661418a565b611e266060860160408701614e27565b6002811115611e3757611e3761418a565b14611e545760405162035e2b60ea1b815260040160405180910390fd5b611e8183611e686040870160208801613ff0565b611e7a36889003880160408901614e0b565b9190612c98565b6111db8483858460200151612e23565b611e9b600b611933565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611ee1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f059190614e42565b610fc0576000356001600160e01b0319166006604051620f948f60ea1b8152600401610e6e929190614e64565b82516080840151611f4290612bd6565b600084602001516001811115611f5a57611f5a61418a565b14611f785760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611fc6576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610e6e565b6000611fe28560600151602001518660400151604001516113a4565b6080860151519091506002811115611ffc57611ffc61418a565b8151600281111561200f5761200f61418a565b14801561203957508460400151602001516001600160a01b031681602001516001600160a01b0316145b6120565760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f602090815282822085835290529081209061208087612239565b9050600061209083888885612303565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b6459856040516120d791815260200190565b60405180910390a460006120eb6003611933565b905060018260048111156121015761210161418a565b036121cb57835460ff191660021784556060890151805160209091015160808b01516121309290916000612fb5565b885160405163114fc47560e11b81526001600160a01b0383169163229f88ea9161215f91600091600401614b2e565b600060405180830381600087803b15801561217957600080fd5b505af115801561218d573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524838a6040516121c2929190614b45565b60405180910390a15b885160405163c7c4fea960e01b81526001600160a01b0383169163c7c4fea9916121fc916000918d90600401614b04565b600060405180830381600087803b15801561221657600080fd5b505af115801561222a573d6000803e3d6000fd5b50505050505050505050505050565b60008061224983604001516131ce565b9050600061225a84606001516131ce565b905060006122ae8560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000612310858584613216565b600061231c86846132cc565b905061232a868583866133d0565b9150505b949350505050565b610ac6813361341c565b61234a8282613480565b6000828152606c60205260409020610e2b9082613506565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156123985761239861418a565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156123d9576123d961418a565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b612410828261351b565b6000828152606c60205260409020610e2b9082613582565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610fc0576000356001600160e01b0319166001604051620f948f60ea1b8152600401610e6e929190614e64565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806124c457506005546001600160a01b031633145b610fc0576000356001600160e01b0319166001604051620f948f60ea1b8152600401610e6e929190614e64565b6124f9613597565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b8260005b818110156126005760006073600088888581811061256757612567614aee565b905060200201602081019061257c9190613ff0565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008686858181106125b0576125b0614aee565b602090810292909201358352508181019290925260409081016000908120805461010090046001600160a01b0316825260389093529081205580546001600160a81b031916905550600101612547565b507fd60250f85788f0c76ead12a4b178663fd7dcfd27c172f341d09680150ad11c49858585856040516126369493929190614f0d565b60405180910390a15050505050565b86858114801561265457508084145b801561265f57508082145b61268a576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b60005b8881101561281d578787828181106126a7576126a7614aee565b90506020020160208101906126bc9190613ff0565b607360008c8c858181106126d2576126d2614aee565b90506020020160208101906126e79190613ff0565b6001600160a01b03166001600160a01b03168152602001908152602001600020600088888581811061271b5761271b614aee565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555083838281811061276957612769614aee565b905060200201602081019061277e9190614e27565b607360008c8c8581811061279457612794614aee565b90506020020160208101906127a99190613ff0565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008888858181106127dd576127dd614aee565b60209081029290920135835250810191909152604001600020805460ff191660018360028111156128105761281061418a565b021790555060010161268d565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401898989898989898960405161285b989796959493929190614f3f565b60405180910390a1505050505050505050565b82811461289c576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b60005b8381101561290d578282828181106128b9576128b9614aee565b90506020020135603860008787858181106128d6576128d6614aee565b90506020020160208101906128eb9190613ff0565b6001600160a01b0316815260208101919091526040016000205560010161289f565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da848484846040516129439493929190614f0d565b60405180910390a150505050565b600080828411156129755760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba910160405180910390a49250929050565b60006129e7600b611933565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a24573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b79190614fce565b6000600254600160025484600154612a609190614c51565b612a6a9190614fe7565b612a749190614ffa565b610a79919061500d565b612a86611d7c565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125263390565b806001600160a01b03163b600003610ac657604051630bfc64a360e21b81526001600160a01b0382166004820152602401610e6e565b6000610f7f83836135e0565b610a928282612340565b80821115612b36576000356001600160e01b0319166040516387f6f09560e01b8152600401610e6e919061472c565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b6000610a79825490565b60006001600160e01b03198216637965db0b60e01b1480610a7957506301ffc9a760e01b6001600160e01b0319831614610a79565b612bdf8161360a565b80612bee5750612bee81613641565b80612bfd5750612bfd81613669565b610ac65760405163034992a760e51b815260040160405180910390fd5b6000612c2c6060830160408401614e27565b6002811115612c3d57612c3d61418a565b148015612c7a575060386000612c596040840160208501613ff0565b6001600160a01b031681526020810191909152604001600020546080820135105b15610ac657604051636eff4a8560e11b815260040160405180910390fd5b600060608185516002811115612cb057612cb061418a565b03612d8b5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d17919061502f565b6000604051808303816000865af19150503d8060008114612d54576040519150601f19603f3d011682016040523d82523d6000602084013e612d59565b606091505b509092509050818015612d84575080511580612d84575080806020019051810190612d849190614e42565b9150612dfd565b600185516002811115612da057612da061418a565b03612db557612d848385308860200151613692565b600285516002811115612dca57612dca61418a565b03612de457612d8483853088602001518960400151613740565b6040516361e411a760e11b815260040160405180910390fd5b816111db5784843085604051639d2e4c6760e01b8152600401610e6e949392919061504b565b606e805460009182612e3483615081565b9091555090506000612e5b84838588612e52368c90038c018c61509a565b939291906137f4565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612e9a57612e9a61418a565b02179055506040828101518051600280850180546001600160a01b039384166001600160a01b03199182161790915560208085015160038801805491861691841691909117905593850151600487015560608701518051600588018054918616918416919091179055938401516006870180549190941691161790915591015160078301556080830151805160088401805492939092839160ff19909116906001908490811115612f4d57612f4d61418a565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612f9582612239565b82604051612fa4929190614b45565b60405180910390a150949350505050565b806001600160a01b0316826001600160a01b0316036130625760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061305d57806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561303957600080fd5b505af115801561304d573d6000803e3d6000fd5b505050505061305d848484613860565b61147e565b6000845160028111156130775761307761418a565b0361313d576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156130c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130e79190614fce565b9050846040015181101561312c5761310f833083886040015161310a9190614ffa565b6138df565b61312c57604051632f739fff60e11b815260040160405180910390fd5b613137858585613860565b5061147e565b6001845160028111156131525761315261418a565b036131835761316682848660200151613984565b61305d5760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156131985761319861418a565b03612de4576131b18284866020015187604001516139ab565b61305d576040516334b471a760e21b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000836003015411801561322e575042836003015411155b1561323f57825460ff191660041783555b6001600160a01b0382166000908152600284016020526040902054156132835760405163025fd59560e41b81526001600160a01b0383166004820152602401610e6e565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b60008060006132db600b611933565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015613318573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526133409190810190615155565b81519194509250905060005b8181101561185d578587600201600086848151811061336d5761336d614aee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036133c8578281815181106133ad576133ad614aee565b60200260200101516bffffffffffffffffffffffff16850194505b60010161334c565b60008383101580156133f757506000855460ff1660048111156133f5576133f561418a565b145b1561340f57845460ff19166001908117865585018290555b5050915460ff1692915050565b61342682826115d1565b610a925761343e816001600160a01b031660146139d4565b6134498360206139d4565b60405160200161345a92919061524d565b60408051601f198184030181529082905262461bcd60e51b8252610e6e916004016152c2565b61348a82826115d1565b610a92576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff191660011790556134c23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f7f836001600160a01b038416613b6f565b61352582826115d1565b15610a92576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f7f836001600160a01b038416613bbe565b60005460ff16610fc05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610e6e565b60008260000182815481106135f7576135f7614aee565b9060005260206000200154905092915050565b600080825160028111156136205761362061418a565b148015613631575060008260400151115b8015610a79575050602001511590565b60006001825160028111156136585761365861418a565b148015610a79575050604001511590565b60006002825160028111156136805761368061418a565b148015610a7957505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928716916136f29161502f565b6000604051808303816000865af19150503d806000811461372f576040519150601f19603f3d011682016040523d82523d6000602084013e613734565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613770908790879087908790604481016152d5565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b179052516137a5919061502f565b6000604051808303816000865af19150503d80600081146137e2576040519150601f19603f3d011682016040523d82523d6000602084013e6137e7565b606091505b5090979650505050505050565b6137fc613de7565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b600080845160028111156138765761387661418a565b036138915761388a82848660400151613cb1565b90506138bb565b6001845160028111156138a6576138a661418a565b03612de45761388a8230858760200151613692565b8061147e578383836040516341bd7d9160e11b8152600401610e6e9392919061530f565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b17905291516000928616916139379161502f565b6000604051808303816000865af19150503d8060008114613974576040519150601f19603f3d011682016040523d82523d6000602084013e613979565b606091505b509095945050505050565b600061399284308585613692565b905080610f7f576139a48484846138df565b9050610f7f565b60006139ba8530868686613740565b90508061232e576139cd85858585613d84565b905061232e565b606060006139e3836002614c51565b6139ee906002614fe7565b6001600160401b03811115613a0557613a05614510565b6040519080825280601f01601f191660200182016040528015613a2f576020820181803683370190505b509050600360fc1b81600081518110613a4a57613a4a614aee565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613a7957613a79614aee565b60200101906001600160f81b031916908160001a9053506000613a9d846002614c51565b613aa8906001614fe7565b90505b6001811115613b20576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613adc57613adc614aee565b1a60f81b828281518110613af257613af2614aee565b60200101906001600160f81b031916908160001a90535060049490941c93613b198161533f565b9050613aab565b508315610f7f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e6e565b6000818152600183016020526040812054613bb657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a79565b506000610a79565b60008181526001830160205260408120548015613ca7576000613be2600183614ffa565b8554909150600090613bf690600190614ffa565b9050818114613c5b576000866000018281548110613c1657613c16614aee565b9060005260206000200154905080876000018481548110613c3957613c39614aee565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613c6c57613c6c615356565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a79565b6000915050610a79565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613d0e919061502f565b6000604051808303816000865af19150503d8060008114613d4b576040519150601f19603f3d011682016040523d82523d6000602084013e613d50565b606091505b509092509050818015613d7b575080511580613d7b575080806020019051810190613d7b9190614e42565b95945050505050565b604080516000808252602082019092526001600160a01b03861690613db2908690869086906044810161536c565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b179052516136f2919061502f565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613e6657600080fd5b81356001600160e01b031981168114610f7f57600080fd5b60008082840360c0811215613e9257600080fd5b60a0811215613ea057600080fd5b50919360a08501359350915050565b60006101608284031215613ec257600080fd5b50919050565b60008083601f840112613eda57600080fd5b5081356001600160401b03811115613ef157600080fd5b6020830191508360208260051b850101111561149e57600080fd5b60008060208385031215613f1f57600080fd5b82356001600160401b03811115613f3557600080fd5b613f4185828601613ec8565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015613734578351151583529284019291840191600101613f69565b600060208284031215613f9957600080fd5b5035919050565b6001600160a01b0381168114610ac657600080fd5b80356119a981613fa0565b60008060408385031215613fd357600080fd5b823591506020830135613fe581613fa0565b809150509250929050565b60006020828403121561400257600080fd5b8135610f7f81613fa0565b6000806000806040858703121561402357600080fd5b84356001600160401b038082111561403a57600080fd5b61404688838901613ec8565b9096509450602087013591508082111561405f57600080fd5b5061406c87828801613ec8565b95989497509550505050565b60008060008060008060008060008060a08b8d03121561409757600080fd5b8a356001600160401b03808211156140ae57600080fd5b6140ba8e838f01613ec8565b909c509a5060208d01359150808211156140d357600080fd5b6140df8e838f01613ec8565b909a50985060408d01359150808211156140f857600080fd5b6141048e838f01613ec8565b909850965060608d013591508082111561411d57600080fd5b6141298e838f01613ec8565b909650945060808d013591508082111561414257600080fd5b5061414f8d828e01613ec8565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561417b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60808101600586106141b4576141b461418a565b9481526020810193909352604083019190915260609091015290565b6000806000604084860312156141e557600080fd5b83356001600160401b03808211156141fc57600080fd5b818601915086601f83011261421057600080fd5b81358181111561421f57600080fd5b87602060a08302850101111561423457600080fd5b6020928301989097509590910135949350505050565b6000806040838503121561425d57600080fd5b823561426881613fa0565b946020939093013593505050565b60038110610ac657610ac661418a565b8151604082019061429681614276565b82526020928301516001600160a01b0316929091019190915290565b600281106142c2576142c261418a565b9052565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b80516142f881614276565b825260208181015190830152604090810151910152565b858152610160810161432460208301876142b2565b61433160408301866142c6565b61433e60a08301856142c6565b61434c6101008301846142ed565b9695505050505050565b8035601081106119a957600080fd5b6000806040838503121561437857600080fd5b61438183614356565b91506020830135613fe581613fa0565b8060408101831015610a7957600080fd5b60008060008060008060008060008060006101208c8e0312156143c457600080fd5b6143cd8c613fb5565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e0135111561440457600080fd5b6144148e60a08f01358f01613ec8565b909750955060c08d013581101561442a57600080fd5b61443a8e60c08f01358f01614391565b94508060e08e0135111561444d57600080fd5b61445d8e60e08f01358f01614391565b9350806101008e0135111561447157600080fd5b506144838d6101008e01358e01613ec8565b81935080925050509295989b509295989b9093969950565b600080602083850312156144ae57600080fd5b82356001600160401b03808211156144c557600080fd5b818501915085601f8301126144d957600080fd5b8135818111156144e857600080fd5b866020610160830285010111156144fe57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171561454857614548614510565b60405290565b604051601f8201601f191681016001600160401b038111828210171561457657614576614510565b604052919050565b60006001600160401b0382111561459757614597614510565b5060051b60200190565b600082601f8301126145b257600080fd5b813560206145c76145c28361457e565b61454e565b8083825260208201915060208460051b8701019350868411156145e957600080fd5b602086015b8481101561460557803583529183019183016145ee565b509695505050505050565b600082601f83011261462157600080fd5b81356001600160401b0381111561463a5761463a614510565b61464d601f8201601f191660200161454e565b81815284602083860101111561466257600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561469757600080fd5b85356146a281613fa0565b945060208601356146b281613fa0565b935060408601356001600160401b03808211156146ce57600080fd5b6146da89838a016145a1565b945060608801359150808211156146f057600080fd5b6146fc89838a016145a1565b9350608088013591508082111561471257600080fd5b5061471f88828901614610565b9150509295509295909350565b6001600160e01b031991909116815260200190565b6000806000806000806000806080898b03121561475d57600080fd5b88356001600160401b038082111561477457600080fd5b6147808c838d01613ec8565b909a50985060208b013591508082111561479957600080fd5b6147a58c838d01613ec8565b909850965060408b01359150808211156147be57600080fd5b6147ca8c838d01613ec8565b909650945060608b01359150808211156147e357600080fd5b506147f08b828c01613ec8565b999c989b5096995094979396929594505050565b60006020828403121561481657600080fd5b610f7f82614356565b60008060006040848603121561483457600080fd5b8335925060208401356001600160401b0381111561485157600080fd5b61485d86828701613ec8565b9497909650939450505050565b60005b8381101561488557818101518382015260200161486d565b50506000910152565b600081518084526148a681602086016020860161486a565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b8281101561491157603f198886030184526148ff85835161488e565b945092850192908501906001016148e3565b5092979650505050505050565b600080600080600060a0868803121561493657600080fd5b853561494181613fa0565b9450602086013561495181613fa0565b9350604086013592506060860135915060808601356001600160401b0381111561497a57600080fd5b61471f88828901614610565b60008060006060848603121561499b57600080fd5b833592506020840135915060408401356149b481613fa0565b809150509250925092565b6000606082840312156149d157600080fd5b6149d9614526565b905081356149e681613fa0565b815260208201356149f681613fa0565b806020830152506040820135604082015292915050565b8035600381106119a957600080fd5b600060608284031215614a2e57600080fd5b614a36614526565b9050614a4182614a0d565b8152602082013560208201526040820135604082015292915050565b60006101608284031215614a7057600080fd5b60405160a081018181106001600160401b0382111715614a9257614a92614510565b60405282358152602083013560028110614aab57600080fd5b6020820152614abd84604085016149bf565b6040820152614acf8460a085016149bf565b6060820152614ae2846101008501614a1c565b60808201529392505050565b634e487b7160e01b600052603260045260246000fd5b60608101614b1185614276565b93815260208101929092526001600160a01b031660409091015290565b60408101614b3b84614276565b9281526020015290565b600061018082019050838252825160208301526020830151614b6a60408401826142b2565b506040830151614b7d60608401826142c6565b506060830151614b9060c08401826142c6565b506080830151611b0d6101208401826142ed565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e19843603018112614c0957600080fd5b8301803591506001600160401b03821115614c2357600080fd5b6020019150600581901b360382131561149e57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a7957610a79614c3b565b6020810160108310614c7c57614c7c61418a565b91905290565b600181811c90821680614c9657607f821691505b602082108103613ec257634e487b7160e01b600052602260045260246000fd5b6000808335601e19843603018112614ccd57600080fd5b8301803591506001600160401b03821115614ce757600080fd5b60200191503681900382131561149e57600080fd5b601f821115610e2b576000816000526020600020601f850160051c81016020861015614d255750805b601f850160051c820191505b81811015614d4457828155600101614d31565b505050505050565b6001600160401b03831115614d6357614d63614510565b614d7783614d718354614c82565b83614cfc565b6000601f841160018114614dab5760008515614d935750838201355b600019600387901b1c1916600186901b1783556111db565b600083815260209020601f19861690835b82811015614ddc5786850135825560209485019460019092019101614dbc565b5086821015614df95760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060608284031215614e1d57600080fd5b610f7f8383614a1c565b600060208284031215614e3957600080fd5b610f7f82614a0d565b600060208284031215614e5457600080fd5b81518015158114610f7f57600080fd5b6001600160e01b03198316815260408101600b8310614e8557614e8561418a565b8260208301529392505050565b8183526000602080850194508260005b85811015614ed0578135614eb581613fa0565b6001600160a01b031687529582019590820190600101614ea2565b509495945050505050565b81835260006001600160fb1b03831115614ef457600080fd5b8260051b80836020870137939093016020019392505050565b604081526000614f21604083018688614e92565b8281036020840152614f34818587614edb565b979650505050505050565b608081526000614f53608083018a8c614e92565b60208382036020850152614f68828a8c614e92565b91508382036040850152614f7d82888a614edb565b848103606086015285815286925060200160005b86811015614fbd57614fa284614a0d565b614fab81614276565b82529282019290820190600101614f91565b509c9b505050505050505050505050565b600060208284031215614fe057600080fd5b5051919050565b80820180821115610a7957610a79614c3b565b81810381811115610a7957610a79614c3b565b60008261502a57634e487b7160e01b600052601260045260246000fd5b500490565b6000825161504181846020870161486a565b9190910192915050565b60c0810161505982876142ed565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60006001820161509357615093614c3b565b5060010190565b600060a082840312156150ac57600080fd5b6150b4614526565b82356150bf81613fa0565b815260208301356150cf81613fa0565b60208201526150e18460408501614a1c565b60408201529392505050565b600082601f8301126150fe57600080fd5b8151602061510e6145c28361457e565b8083825260208201915060208460051b87010193508684111561513057600080fd5b602086015b8481101561460557805161514881613fa0565b8352918301918301615135565b60008060006060848603121561516a57600080fd5b83516001600160401b038082111561518157600080fd5b61518d878388016150ed565b94506020915081860151818111156151a457600080fd5b6151b0888289016150ed565b9450506040860151818111156151c557600080fd5b86019050601f810187136151d857600080fd5b80516151e66145c28261457e565b81815260059190911b8201830190838101908983111561520557600080fd5b928401925b8284101561523e5783516bffffffffffffffffffffffff8116811461522f5760008081fd5b8252928401929084019061520a565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161528581601785016020880161486a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516152b681602884016020880161486a565b01602801949350505050565b602081526000610f7f602083018461488e565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614f349083018461488e565b60a0810161531d82866142ed565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161534e5761534e614c3b565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b038516815283602082015282604082015260806060820152600061434c608083018461488e56fea2646970667358221220a59efe9d053716bc6dd068f341c820cae0b6f5a93c6064850afb969364c7eaea64736f6c63430008170033\"", + "callValue": 0, + "chainId": 2020, + "constructorArgs": "0x", + "contractName": "RoninGatewayV3", + "deployedBytecode": "\"0x6080604052600436106102cd5760003560e01c8063835fc6ca11610175578063c28f7894116100dc578063e75235b811610095578063f23a6e611161006f578063f23a6e6114610988578063f668214a146109b4578063fa389659146109d4578063fc6574bc146109f4576102dc565b8063e75235b8146108fd578063ecc8364914610915578063f0ce418e14610942576102dc565b8063c28f789414610817578063ca15c8731461085d578063d547741f1461087d578063dafae4081461089d578063dbd2ef6c146108bd578063de981f1b146108dd576102dc565b8063a217fddf1161012e578063a217fddf14610746578063affed0e01461075b578063b9afa17714610771578063b9c3620914610791578063bc197c81146107b1578063bc7f0386146107ea576102dc565b8063835fc6ca146106805780638456cb59146106b1578063865e6fd3146106c65780639010d07c146106e657806391d14854146107065780639584a59214610726576102dc565b80633f4ba83a116102345780635c975abb116101ed57806364363f78116101c757806364363f781461061557806371706cbe1461063557806375535f861461064b5780637de5dedd1461066b576102dc565b80635c975abb146105bb5780635cd8a76b146105d35780635d6a9a90146105e8576102dc565b80633f4ba83a146104c557806347b56b2c146104da57806348e6a22c146104fa57806349cae6b51461051a5780634d92c4f01461053a5780635a7dd06a1461059b576102dc565b8063248a9ca311610286578063248a9ca3146103e75780632f2ff15d146104255780633101cfcb1461044557806336568abe146104655780633e4574ec146104855780633e70838b146104a5576102dc565b806301ffc9a7146102e4578063065b3adf146103195780630b1ff17f14610351578063109679ef1461037157806317892f961461039157806317fa2ea1146103ba576102dc565b366102dc576102da610a46565b005b6102da610a46565b3480156102f057600080fd5b506103046102ff366004613e54565b610a5f565b60405190151581526020015b60405180910390f35b34801561032557600080fd5b50600554610339906001600160a01b031681565b6040516001600160a01b039091168152602001610310565b34801561035d57600080fd5b506102da61036c366004613e7e565b610a7f565b34801561037d57600080fd5b506102da61038c366004613eaf565b610a96565b34801561039d57600080fd5b506078546079545b60408051928352602083019190915201610310565b3480156103c657600080fd5b506103da6103d5366004613f0c565b610ac9565b6040516103109190613f4d565b3480156103f357600080fd5b50610417610402366004613f87565b6000908152606b602052604090206001015490565b604051908152602001610310565b34801561043157600080fd5b506102da610440366004613fc0565b610e06565b34801561045157600080fd5b506102da610460366004613ff0565b610e30565b34801561047157600080fd5b506102da610480366004613fc0565b610edc565b34801561049157600080fd5b506103046104a0366004613fc0565b610f56565b3480156104b157600080fd5b506102da6104c0366004613ff0565b610f86565b3480156104d157600080fd5b506102da610fb0565b3480156104e657600080fd5b506102da6104f5366004613f87565b610fc2565b34801561050657600080fd5b506102da61051536600461400d565b61118d565b34801561052657600080fd5b506102da610535366004614078565b6111e2565b34801561054657600080fd5b5061058b610555366004614168565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b60405161031094939291906141a0565b3480156105a757600080fd5b506102da6105b63660046141d0565b611242565b3480156105c757600080fd5b5060005460ff16610304565b3480156105df57600080fd5b506102da6112a2565b3480156105f457600080fd5b5061060861060336600461424a565b6113a4565b6040516103109190614286565b34801561062157600080fd5b506102da61063036600461400d565b611448565b34801561064157600080fd5b50610417606e5481565b34801561065757600080fd5b506103a5610666366004614168565b611484565b34801561067757600080fd5b506104176114a5565b34801561068c57600080fd5b506106a061069b366004613f87565b6114bc565b60405161031095949392919061430f565b3480156106bd57600080fd5b506102da61158e565b3480156106d257600080fd5b506102da6106e1366004614365565b61159e565b3480156106f257600080fd5b50610339610701366004614168565b6115b9565b34801561071257600080fd5b50610304610721366004613fc0565b6115d1565b34801561073257600080fd5b506102da6107413660046143a2565b6115fc565b34801561075257600080fd5b50610417600081565b34801561076757600080fd5b5061041760045481565b34801561077d57600080fd5b506103da61078c36600461449b565b611749565b34801561079d57600080fd5b506102da6107ac366004614168565b611867565b3480156107bd57600080fd5b506107dd6107cc36600461467f565b63bc197c8160e01b95945050505050565b604051610310919061472c565b3480156107f657600080fd5b50610417610805366004613ff0565b60386020526000908152604090205481565b34801561082357600080fd5b5061058b610832366004613f87565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561086957600080fd5b50610417610878366004613f87565b611879565b34801561088957600080fd5b506102da610898366004613fc0565b611890565b3480156108a957600080fd5b506103046108b8366004613f87565b6118b5565b3480156108c957600080fd5b506102da6108d8366004614741565b6118e1565b3480156108e957600080fd5b506103396108f8366004614804565b611933565b34801561090957600080fd5b506001546002546103a5565b34801561092157600080fd5b5061093561093036600461481f565b6119ae565b60405161031091906148ba565b34801561094e57600080fd5b5061058b61095d366004613f87565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b34801561099457600080fd5b506107dd6109a336600461491e565b63f23a6e6160e01b95945050505050565b3480156109c057600080fd5b506103046109cf366004613f87565b611b15565b3480156109e057600080fd5b506102da6109ef36600461400d565b611b43565b348015610a0057600080fd5b50610304610a0f366004614986565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b6000610a6a82611d32565b80610a795750610a7982611d57565b92915050565b610a87611d7c565b610a92823383611dc2565b5050565b610a9e611d7c565b610aa6611e91565b610ac6610ab836839003830183614a5d565b33610ac16114a5565b611f32565b50565b6060610ad3611e91565b336000610ade6114a5565b9050600084806001600160401b03811115610afb57610afb614510565b604051908082528060200260200182016040528015610b24578160200160208202803683370190505b5094506000610b336003611933565b905060005b82811015610dfa57888882818110610b5257610b52614aee565b905060200201359350816001600160a01b031663c7c4fea9600286896040518463ffffffff1660e01b8152600401610b8c93929190614b04565b600060405180830381600087803b158015610ba657600080fd5b505af1158015610bba573d6000803e3d6000fd5b50505050610bc784611b15565b15610bf1576001878281518110610be057610be0614aee565b911515602092830291909101909101525b600084815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610c3857610c3861418a565b6001811115610c4957610c4961418a565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff1690811115610ce157610ce161418a565b6002811115610cf257610cf261418a565b81526001820154602082015260029091015460409091015290525090506000610d1a82612239565b90506000610d2a848b8b85612303565b90506001816004811115610d4057610d4061418a565b03610deb57835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d7f91908c90600401614b2e565b600060405180830381600087803b158015610d9957600080fd5b505af1158015610dad573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610de2929190614b45565b60405180910390a15b50505050806001019050610b38565b50505050505092915050565b6000828152606b6020526040902060010154610e2181612336565b610e2b8383612340565b505050565b603754600390610100900460ff16158015610e52575060375460ff8083169116105b610e775760405162461bcd60e51b8152600401610e6e90614ba4565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e96600b83612362565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610f4c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610e6e565b610a928282612406565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f8e612428565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610fb8612482565b610fc06124f1565b565b610fca611d7c565b610fd381611b15565b15610ff1576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff16908111156110305761103061418a565b60018111156110415761104161418a565b815260408051606080820183526002858101546001600160a01b039081168452600387015481166020858101919091526004880154858701528087019490945284518084018652600588015482168152600688015490911693810193909352600786015483850152838501929092528251808201909352600885018054919094019391839160ff16908111156110d9576110d961418a565b60028111156110ea576110ea61418a565b815260018201546020820152600290910154604091820152915260608301510151919250504614611154576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610e6e565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61117e82612239565b82604051610ed0929190614b45565b611195612428565b828015806111a35750808214155b156111cf576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b6111db85858585612543565b5050505050565b6111ea612428565b600089900361121a576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b61122a8a8a8a8a8a8a8a8a612645565b6112368888848461286e565b50505050505050505050565b61124a611d7c565b81600081900361126d576040516316ee9d3b60e11b815260040160405180910390fd5b60005b818110156111db5761129a85858381811061128d5761128d614aee565b905060a002013385611dc2565b600101611270565b603754600290610100900460ff161580156112c4575060375460ff8083169116105b6112e05760405162461bcd60e51b8152600401610e6e90614ba4565b6037805461ffff191660ff83161761010017905560745461130c906008906001600160a01b0316612362565b607554611324906003906001600160a01b0316612362565b60775461133c90600a906001600160a01b0316612362565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660028111156113f8576113f861418a565b60028111156114095761140961418a565b815290546001600160a01b0361010090910481166020928301529082015191925016610a7957604051631b79f53b60e21b815260040160405180910390fd5b611450612428565b6000839003611472576040516316ee9d3b60e11b815260040160405180910390fd5b61147e8484848461286e565b50505050565b60008061148f612428565b6114998484612951565b915091505b9250929050565b60006114b76114b26129db565b612a48565b905090565b607160209081526000918252604091829020805460018201548451606080820187526002808601546001600160a01b03908116845260038701548116848901526004870154848a015288518084018a526005880154821681526006880154909116978101979097526007860154878901528751918201909752600885018054949760ff9485169793969395939492939192849216908111156115605761156061418a565b60028111156115715761157161418a565b815260200160018201548152602001600282015481525050905085565b611596612482565b610fc0612a7e565b6115a6612428565b6115af81612abb565b610a928282612362565b6000828152606c60205260408120610f7f9083612af1565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff161580801561161c5750603754600160ff909116105b806116365750303b158015611636575060375460ff166001145b6116525760405162461bcd60e51b8152600401610e6e90614ba4565b6037805460ff191660011790558015611675576037805461ff0019166101001790555b61168060008d612afd565b61168a8b8b612b07565b6116948989612951565b50600090506116a38680614bf2565b905011156116f5576116d66116b88680614bf2565b6116c56020890189614bf2565b6116cf8980614bf2565b8989612645565b6116f56116e38680614bf2565b6116f06020880188614bf2565b61286e565b801561173b576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b6060611753611d7c565b61175b611e91565b81806001600160401b0381111561177457611774614510565b60405190808252806020026020018201604052801561179d578160200160208202803683370190505b50915060006117aa6114a5565b90506117b4613de7565b60005b8381101561185d578686828181106117d1576117d1614aee565b905061016002018036038101906117e89190614a5d565b915060026040808401518101516000908152606f6020908152828220865183529052205460ff1660048111156118205761182061418a565b0361184a57600185828151811061183957611839614aee565b911515602092830291909101909101525b611855823385611f32565b6001016117b7565b5050505092915050565b61186f612428565b610a928282612b07565b6000818152606c60205260408120610a7990612b97565b6000828152606b60205260409020600101546118ab81612336565b610e2b8383612406565b60006118bf6129db565b6001546118cc9190614c51565b6002546118d99084614c51565b101592915050565b6118e9612428565b6000879003611919576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b6119298888888888888888612645565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f81111561196a5761196a61418a565b60ff1681526020810191909152604001600020546001600160a01b03169050806119a9578160405163409140df60e11b8152600401610e6e9190614c68565b919050565b6060816001600160401b038111156119c8576119c8614510565b6040519080825280602002602001820160405280156119fb57816020015b60608152602001906001900390816119e65790505b50905060005b82811015611b0d57600085815260726020526040812090858584818110611a2a57611a2a614aee565b9050602002016020810190611a3f9190613ff0565b6001600160a01b03166001600160a01b031681526020019081526020016000208054611a6a90614c82565b80601f0160208091040260200160405190810160405280929190818152602001828054611a9690614c82565b8015611ae35780601f10611ab857610100808354040283529160200191611ae3565b820191906000526020600020905b815481529060010190602001808311611ac657829003601f168201915b5050505050828281518110611afa57611afa614aee565b6020908102919091010152600101611a01565b509392505050565b6000600260008381526070602052604090205460ff166004811115611b3c57611b3c61418a565b1492915050565b611b4b611d7c565b611b53611e91565b33838015801590611b6357508083145b611b8e576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b6000611b986114a5565b9050600080611ba76003611933565b905060005b8481101561123657898982818110611bc657611bc6614aee565b905060200201359250878782818110611be157611be1614aee565b9050602002810190611bf39190614cb6565b60008581526072602090815260408083206001600160a01b038c168452909152902091611c21919083614d4c565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611c539060019087908b90600401614b04565b600060405180830381600087803b158015611c6d57600080fd5b505af1158015611c81573d6000803e3d6000fd5b50505060008481526076602052604081209150611ca082898888612303565b90506001816004811115611cb657611cb661418a565b03611d2857815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611cf5906001908990600401614b2e565b600060405180830381600087803b158015611d0f57600080fd5b505af1158015611d23573d6000803e3d6000fd5b505050505b5050600101611bac565b60006001600160e01b03198216635a05180f60e01b1480610a795750610a7982612ba1565b60006001600160e01b03198216630271189760e51b1480610a795750610a7982611d32565b60005460ff1615610fc05760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610e6e565b611ddc611dd736859003850160408601614e0b565b612bd6565b611de583612c1a565b6000611e00611dfa6040860160208701613ff0565b836113a4565b80519091506002811115611e1657611e1661418a565b611e266060860160408701614e27565b6002811115611e3757611e3761418a565b14611e545760405162035e2b60ea1b815260040160405180910390fd5b611e8183611e686040870160208801613ff0565b611e7a36889003880160408901614e0b565b9190612c98565b6111db8483858460200151612e23565b611e9b600b611933565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611ee1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f059190614e42565b610fc0576000356001600160e01b0319166006604051620f948f60ea1b8152600401610e6e929190614e64565b82516080840151611f4290612bd6565b600084602001516001811115611f5a57611f5a61418a565b14611f785760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611fc6576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610e6e565b6000611fe28560600151602001518660400151604001516113a4565b6080860151519091506002811115611ffc57611ffc61418a565b8151600281111561200f5761200f61418a565b14801561203957508460400151602001516001600160a01b031681602001516001600160a01b0316145b6120565760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f602090815282822085835290529081209061208087612239565b9050600061209083888885612303565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b6459856040516120d791815260200190565b60405180910390a460006120eb6003611933565b905060018260048111156121015761210161418a565b036121cb57835460ff191660021784556060890151805160209091015160808b01516121309290916000612fb5565b885160405163114fc47560e11b81526001600160a01b0383169163229f88ea9161215f91600091600401614b2e565b600060405180830381600087803b15801561217957600080fd5b505af115801561218d573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524838a6040516121c2929190614b45565b60405180910390a15b885160405163c7c4fea960e01b81526001600160a01b0383169163c7c4fea9916121fc916000918d90600401614b04565b600060405180830381600087803b15801561221657600080fd5b505af115801561222a573d6000803e3d6000fd5b50505050505050505050505050565b60008061224983604001516131ce565b9050600061225a84606001516131ce565b905060006122ae8560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b6000612310858584613216565b600061231c86846132cc565b905061232a868583866133d0565b9150505b949350505050565b610ac6813361341c565b61234a8282613480565b6000828152606c60205260409020610e2b9082613506565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f8111156123985761239861418a565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156123d9576123d961418a565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b612410828261351b565b6000828152606c60205260409020610e2b9082613582565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610fc0576000356001600160e01b0319166001604051620f948f60ea1b8152600401610e6e929190614e64565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806124c457506005546001600160a01b031633145b610fc0576000356001600160e01b0319166001604051620f948f60ea1b8152600401610e6e929190614e64565b6124f9613597565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b8260005b818110156126005760006073600088888581811061256757612567614aee565b905060200201602081019061257c9190613ff0565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008686858181106125b0576125b0614aee565b602090810292909201358352508181019290925260409081016000908120805461010090046001600160a01b0316825260389093529081205580546001600160a81b031916905550600101612547565b507fd60250f85788f0c76ead12a4b178663fd7dcfd27c172f341d09680150ad11c49858585856040516126369493929190614f0d565b60405180910390a15050505050565b86858114801561265457508084145b801561265f57508082145b61268a576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b60005b8881101561281d578787828181106126a7576126a7614aee565b90506020020160208101906126bc9190613ff0565b607360008c8c858181106126d2576126d2614aee565b90506020020160208101906126e79190613ff0565b6001600160a01b03166001600160a01b03168152602001908152602001600020600088888581811061271b5761271b614aee565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b0316021790555083838281811061276957612769614aee565b905060200201602081019061277e9190614e27565b607360008c8c8581811061279457612794614aee565b90506020020160208101906127a99190613ff0565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008888858181106127dd576127dd614aee565b60209081029290920135835250810191909152604001600020805460ff191660018360028111156128105761281061418a565b021790555060010161268d565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401898989898989898960405161285b989796959493929190614f3f565b60405180910390a1505050505050505050565b82811461289c576000356001600160e01b0319166040516306b5667560e21b8152600401610e6e919061472c565b60005b8381101561290d578282828181106128b9576128b9614aee565b90506020020135603860008787858181106128d6576128d6614aee565b90506020020160208101906128eb9190613ff0565b6001600160a01b0316815260208101919091526040016000205560010161289f565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da848484846040516129439493929190614f0d565b60405180910390a150505050565b600080828411156129755760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba910160405180910390a49250929050565b60006129e7600b611933565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a24573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b79190614fce565b6000600254600160025484600154612a609190614c51565b612a6a9190614fe7565b612a749190614ffa565b610a79919061500d565b612a86611d7c565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125263390565b806001600160a01b03163b600003610ac657604051630bfc64a360e21b81526001600160a01b0382166004820152602401610e6e565b6000610f7f83836135e0565b610a928282612340565b80821115612b36576000356001600160e01b0319166040516387f6f09560e01b8152600401610e6e919061472c565b6001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a450505050565b6000610a79825490565b60006001600160e01b03198216637965db0b60e01b1480610a7957506301ffc9a760e01b6001600160e01b0319831614610a79565b612bdf8161360a565b80612bee5750612bee81613641565b80612bfd5750612bfd81613669565b610ac65760405163034992a760e51b815260040160405180910390fd5b6000612c2c6060830160408401614e27565b6002811115612c3d57612c3d61418a565b148015612c7a575060386000612c596040840160208501613ff0565b6001600160a01b031681526020810191909152604001600020546080820135105b15610ac657604051636eff4a8560e11b815260040160405180910390fd5b600060608185516002811115612cb057612cb061418a565b03612d8b5760408581015181516001600160a01b03878116602483015230604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612d17919061502f565b6000604051808303816000865af19150503d8060008114612d54576040519150601f19603f3d011682016040523d82523d6000602084013e612d59565b606091505b509092509050818015612d84575080511580612d84575080806020019051810190612d849190614e42565b9150612dfd565b600185516002811115612da057612da061418a565b03612db557612d848385308860200151613692565b600285516002811115612dca57612dca61418a565b03612de457612d8483853088602001518960400151613740565b6040516361e411a760e11b815260040160405180910390fd5b816111db5784843085604051639d2e4c6760e01b8152600401610e6e949392919061504b565b606e805460009182612e3483615081565b9091555090506000612e5b84838588612e52368c90038c018c61509a565b939291906137f4565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612e9a57612e9a61418a565b02179055506040828101518051600280850180546001600160a01b039384166001600160a01b03199182161790915560208085015160038801805491861691841691909117905593850151600487015560608701518051600588018054918616918416919091179055938401516006870180549190941691161790915591015160078301556080830151805160088401805492939092839160ff19909116906001908490811115612f4d57612f4d61418a565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612f9582612239565b82604051612fa4929190614b45565b60405180910390a150949350505050565b806001600160a01b0316826001600160a01b0316036130625760408085015190516001600160a01b0385169180156108fc02916000818181858888f1935050505061305d57806001600160a01b031663d0e30db085604001516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561303957600080fd5b505af115801561304d573d6000803e3d6000fd5b505050505061305d848484613860565b61147e565b6000845160028111156130775761307761418a565b0361313d576040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156130c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130e79190614fce565b9050846040015181101561312c5761310f833083886040015161310a9190614ffa565b6138df565b61312c57604051632f739fff60e11b815260040160405180910390fd5b613137858585613860565b5061147e565b6001845160028111156131525761315261418a565b036131835761316682848660200151613984565b61305d5760405163c8e3a09f60e01b815260040160405180910390fd5b6002845160028111156131985761319861418a565b03612de4576131b18284866020015187604001516139ab565b61305d576040516334b471a760e21b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b6000836003015411801561322e575042836003015411155b1561323f57825460ff191660041783555b6001600160a01b0382166000908152600284016020526040902054156132835760405163025fd59560e41b81526001600160a01b0383166004820152602401610e6e565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b60008060006132db600b611933565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa158015613318573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526133409190810190615155565b81519194509250905060005b8181101561185d578587600201600086848151811061336d5761336d614aee565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036133c8578281815181106133ad576133ad614aee565b60200260200101516bffffffffffffffffffffffff16850194505b60010161334c565b60008383101580156133f757506000855460ff1660048111156133f5576133f561418a565b145b1561340f57845460ff19166001908117865585018290555b5050915460ff1692915050565b61342682826115d1565b610a925761343e816001600160a01b031660146139d4565b6134498360206139d4565b60405160200161345a92919061524d565b60408051601f198184030181529082905262461bcd60e51b8252610e6e916004016152c2565b61348a82826115d1565b610a92576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff191660011790556134c23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f7f836001600160a01b038416613b6f565b61352582826115d1565b15610a92576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f7f836001600160a01b038416613bbe565b60005460ff16610fc05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610e6e565b60008260000182815481106135f7576135f7614aee565b9060005260206000200154905092915050565b600080825160028111156136205761362061418a565b148015613631575060008260400151115b8015610a79575050602001511590565b60006001825160028111156136585761365861418a565b148015610a79575050604001511590565b60006002825160028111156136805761368061418a565b148015610a7957505060400151151590565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928716916136f29161502f565b6000604051808303816000865af19150503d806000811461372f576040519150601f19603f3d011682016040523d82523d6000602084013e613734565b606091505b50909695505050505050565b604080516000808252602082019092526001600160a01b03871690613770908790879087908790604481016152d5565b60408051601f198184030181529181526020820180516001600160e01b0316637921219560e11b179052516137a5919061502f565b6000604051808303816000865af19150503d80600081146137e2576040519150601f19603f3d011682016040523d82523d6000602084013e6137e7565b606091505b5090979650505050505050565b6137fc613de7565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b600080845160028111156138765761387661418a565b036138915761388a82848660400151613cb1565b90506138bb565b6001845160028111156138a6576138a661418a565b03612de45761388a8230858760200151613692565b8061147e578383836040516341bd7d9160e11b8152600401610e6e9392919061530f565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03166340c10f1960e01b17905291516000928616916139379161502f565b6000604051808303816000865af19150503d8060008114613974576040519150601f19603f3d011682016040523d82523d6000602084013e613979565b606091505b509095945050505050565b600061399284308585613692565b905080610f7f576139a48484846138df565b9050610f7f565b60006139ba8530868686613740565b90508061232e576139cd85858585613d84565b905061232e565b606060006139e3836002614c51565b6139ee906002614fe7565b6001600160401b03811115613a0557613a05614510565b6040519080825280601f01601f191660200182016040528015613a2f576020820181803683370190505b509050600360fc1b81600081518110613a4a57613a4a614aee565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613a7957613a79614aee565b60200101906001600160f81b031916908160001a9053506000613a9d846002614c51565b613aa8906001614fe7565b90505b6001811115613b20576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613adc57613adc614aee565b1a60f81b828281518110613af257613af2614aee565b60200101906001600160f81b031916908160001a90535060049490941c93613b198161533f565b9050613aab565b508315610f7f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e6e565b6000818152600183016020526040812054613bb657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a79565b506000610a79565b60008181526001830160205260408120548015613ca7576000613be2600183614ffa565b8554909150600090613bf690600190614ffa565b9050818114613c5b576000866000018281548110613c1657613c16614aee565b9060005260206000200154905080876000018481548110613c3957613c39614aee565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613c6c57613c6c615356565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a79565b6000915050610a79565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613d0e919061502f565b6000604051808303816000865af19150503d8060008114613d4b576040519150601f19603f3d011682016040523d82523d6000602084013e613d50565b606091505b509092509050818015613d7b575080511580613d7b575080806020019051810190613d7b9190614e42565b95945050505050565b604080516000808252602082019092526001600160a01b03861690613db2908690869086906044810161536c565b60408051601f198184030181529181526020820180516001600160e01b031663731133e960e01b179052516136f2919061502f565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613e6657600080fd5b81356001600160e01b031981168114610f7f57600080fd5b60008082840360c0811215613e9257600080fd5b60a0811215613ea057600080fd5b50919360a08501359350915050565b60006101608284031215613ec257600080fd5b50919050565b60008083601f840112613eda57600080fd5b5081356001600160401b03811115613ef157600080fd5b6020830191508360208260051b850101111561149e57600080fd5b60008060208385031215613f1f57600080fd5b82356001600160401b03811115613f3557600080fd5b613f4185828601613ec8565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015613734578351151583529284019291840191600101613f69565b600060208284031215613f9957600080fd5b5035919050565b6001600160a01b0381168114610ac657600080fd5b80356119a981613fa0565b60008060408385031215613fd357600080fd5b823591506020830135613fe581613fa0565b809150509250929050565b60006020828403121561400257600080fd5b8135610f7f81613fa0565b6000806000806040858703121561402357600080fd5b84356001600160401b038082111561403a57600080fd5b61404688838901613ec8565b9096509450602087013591508082111561405f57600080fd5b5061406c87828801613ec8565b95989497509550505050565b60008060008060008060008060008060a08b8d03121561409757600080fd5b8a356001600160401b03808211156140ae57600080fd5b6140ba8e838f01613ec8565b909c509a5060208d01359150808211156140d357600080fd5b6140df8e838f01613ec8565b909a50985060408d01359150808211156140f857600080fd5b6141048e838f01613ec8565b909850965060608d013591508082111561411d57600080fd5b6141298e838f01613ec8565b909650945060808d013591508082111561414257600080fd5b5061414f8d828e01613ec8565b915080935050809150509295989b9194979a5092959850565b6000806040838503121561417b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60808101600586106141b4576141b461418a565b9481526020810193909352604083019190915260609091015290565b6000806000604084860312156141e557600080fd5b83356001600160401b03808211156141fc57600080fd5b818601915086601f83011261421057600080fd5b81358181111561421f57600080fd5b87602060a08302850101111561423457600080fd5b6020928301989097509590910135949350505050565b6000806040838503121561425d57600080fd5b823561426881613fa0565b946020939093013593505050565b60038110610ac657610ac661418a565b8151604082019061429681614276565b82526020928301516001600160a01b0316929091019190915290565b600281106142c2576142c261418a565b9052565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b80516142f881614276565b825260208181015190830152604090810151910152565b858152610160810161432460208301876142b2565b61433160408301866142c6565b61433e60a08301856142c6565b61434c6101008301846142ed565b9695505050505050565b8035601081106119a957600080fd5b6000806040838503121561437857600080fd5b61438183614356565b91506020830135613fe581613fa0565b8060408101831015610a7957600080fd5b60008060008060008060008060008060006101208c8e0312156143c457600080fd5b6143cd8c613fb5565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e0135111561440457600080fd5b6144148e60a08f01358f01613ec8565b909750955060c08d013581101561442a57600080fd5b61443a8e60c08f01358f01614391565b94508060e08e0135111561444d57600080fd5b61445d8e60e08f01358f01614391565b9350806101008e0135111561447157600080fd5b506144838d6101008e01358e01613ec8565b81935080925050509295989b509295989b9093969950565b600080602083850312156144ae57600080fd5b82356001600160401b03808211156144c557600080fd5b818501915085601f8301126144d957600080fd5b8135818111156144e857600080fd5b866020610160830285010111156144fe57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171561454857614548614510565b60405290565b604051601f8201601f191681016001600160401b038111828210171561457657614576614510565b604052919050565b60006001600160401b0382111561459757614597614510565b5060051b60200190565b600082601f8301126145b257600080fd5b813560206145c76145c28361457e565b61454e565b8083825260208201915060208460051b8701019350868411156145e957600080fd5b602086015b8481101561460557803583529183019183016145ee565b509695505050505050565b600082601f83011261462157600080fd5b81356001600160401b0381111561463a5761463a614510565b61464d601f8201601f191660200161454e565b81815284602083860101111561466257600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561469757600080fd5b85356146a281613fa0565b945060208601356146b281613fa0565b935060408601356001600160401b03808211156146ce57600080fd5b6146da89838a016145a1565b945060608801359150808211156146f057600080fd5b6146fc89838a016145a1565b9350608088013591508082111561471257600080fd5b5061471f88828901614610565b9150509295509295909350565b6001600160e01b031991909116815260200190565b6000806000806000806000806080898b03121561475d57600080fd5b88356001600160401b038082111561477457600080fd5b6147808c838d01613ec8565b909a50985060208b013591508082111561479957600080fd5b6147a58c838d01613ec8565b909850965060408b01359150808211156147be57600080fd5b6147ca8c838d01613ec8565b909650945060608b01359150808211156147e357600080fd5b506147f08b828c01613ec8565b999c989b5096995094979396929594505050565b60006020828403121561481657600080fd5b610f7f82614356565b60008060006040848603121561483457600080fd5b8335925060208401356001600160401b0381111561485157600080fd5b61485d86828701613ec8565b9497909650939450505050565b60005b8381101561488557818101518382015260200161486d565b50506000910152565b600081518084526148a681602086016020860161486a565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b8281101561491157603f198886030184526148ff85835161488e565b945092850192908501906001016148e3565b5092979650505050505050565b600080600080600060a0868803121561493657600080fd5b853561494181613fa0565b9450602086013561495181613fa0565b9350604086013592506060860135915060808601356001600160401b0381111561497a57600080fd5b61471f88828901614610565b60008060006060848603121561499b57600080fd5b833592506020840135915060408401356149b481613fa0565b809150509250925092565b6000606082840312156149d157600080fd5b6149d9614526565b905081356149e681613fa0565b815260208201356149f681613fa0565b806020830152506040820135604082015292915050565b8035600381106119a957600080fd5b600060608284031215614a2e57600080fd5b614a36614526565b9050614a4182614a0d565b8152602082013560208201526040820135604082015292915050565b60006101608284031215614a7057600080fd5b60405160a081018181106001600160401b0382111715614a9257614a92614510565b60405282358152602083013560028110614aab57600080fd5b6020820152614abd84604085016149bf565b6040820152614acf8460a085016149bf565b6060820152614ae2846101008501614a1c565b60808201529392505050565b634e487b7160e01b600052603260045260246000fd5b60608101614b1185614276565b93815260208101929092526001600160a01b031660409091015290565b60408101614b3b84614276565b9281526020015290565b600061018082019050838252825160208301526020830151614b6a60408401826142b2565b506040830151614b7d60608401826142c6565b506060830151614b9060c08401826142c6565b506080830151611b0d6101208401826142ed565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e19843603018112614c0957600080fd5b8301803591506001600160401b03821115614c2357600080fd5b6020019150600581901b360382131561149e57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a7957610a79614c3b565b6020810160108310614c7c57614c7c61418a565b91905290565b600181811c90821680614c9657607f821691505b602082108103613ec257634e487b7160e01b600052602260045260246000fd5b6000808335601e19843603018112614ccd57600080fd5b8301803591506001600160401b03821115614ce757600080fd5b60200191503681900382131561149e57600080fd5b601f821115610e2b576000816000526020600020601f850160051c81016020861015614d255750805b601f850160051c820191505b81811015614d4457828155600101614d31565b505050505050565b6001600160401b03831115614d6357614d63614510565b614d7783614d718354614c82565b83614cfc565b6000601f841160018114614dab5760008515614d935750838201355b600019600387901b1c1916600186901b1783556111db565b600083815260209020601f19861690835b82811015614ddc5786850135825560209485019460019092019101614dbc565b5086821015614df95760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060608284031215614e1d57600080fd5b610f7f8383614a1c565b600060208284031215614e3957600080fd5b610f7f82614a0d565b600060208284031215614e5457600080fd5b81518015158114610f7f57600080fd5b6001600160e01b03198316815260408101600b8310614e8557614e8561418a565b8260208301529392505050565b8183526000602080850194508260005b85811015614ed0578135614eb581613fa0565b6001600160a01b031687529582019590820190600101614ea2565b509495945050505050565b81835260006001600160fb1b03831115614ef457600080fd5b8260051b80836020870137939093016020019392505050565b604081526000614f21604083018688614e92565b8281036020840152614f34818587614edb565b979650505050505050565b608081526000614f53608083018a8c614e92565b60208382036020850152614f68828a8c614e92565b91508382036040850152614f7d82888a614edb565b848103606086015285815286925060200160005b86811015614fbd57614fa284614a0d565b614fab81614276565b82529282019290820190600101614f91565b509c9b505050505050505050505050565b600060208284031215614fe057600080fd5b5051919050565b80820180821115610a7957610a79614c3b565b81810381811115610a7957610a79614c3b565b60008261502a57634e487b7160e01b600052601260045260246000fd5b500490565b6000825161504181846020870161486a565b9190910192915050565b60c0810161505982876142ed565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b60006001820161509357615093614c3b565b5060010190565b600060a082840312156150ac57600080fd5b6150b4614526565b82356150bf81613fa0565b815260208301356150cf81613fa0565b60208201526150e18460408501614a1c565b60408201529392505050565b600082601f8301126150fe57600080fd5b8151602061510e6145c28361457e565b8083825260208201915060208460051b87010193508684111561513057600080fd5b602086015b8481101561460557805161514881613fa0565b8352918301918301615135565b60008060006060848603121561516a57600080fd5b83516001600160401b038082111561518157600080fd5b61518d878388016150ed565b94506020915081860151818111156151a457600080fd5b6151b0888289016150ed565b9450506040860151818111156151c557600080fd5b86019050601f810187136151d857600080fd5b80516151e66145c28261457e565b81815260059190911b8201830190838101908983111561520557600080fd5b928401925b8284101561523e5783516bffffffffffffffffffffffff8116811461522f5760008081fd5b8252928401929084019061520a565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161528581601785016020880161486a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516152b681602884016020880161486a565b01602801949350505050565b602081526000610f7f602083018461488e565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090614f349083018461488e565b60a0810161531d82866142ed565b6001600160a01b03938416606083015291909216608090920191909152919050565b60008161534e5761534e614c3b565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60018060a01b038516815283602082015282604082015260806060820152600061434c608083018461488e56fea2646970667358221220a59efe9d053716bc6dd068f341c820cae0b6f5a93c6064850afb969364c7eaea64736f6c63430008170033\"", + "deployer": "0x08295771719b138a241F45023B13CC868D72827D", + "devdoc": { + "version": 1, + "kind": "dev", + "methods": { + "bulkRequestWithdrawalFor((address,address,(uint8,uint256,uint256))[],uint256)": { + "details": "Bulk requests withdrawals. Emits the `WithdrawalRequested` events." + }, + "bulkSubmitWithdrawalSignatures(uint256[],bytes[])": { + "details": "Submits withdrawal signatures. Requirements: - The method caller is a validator." + }, + "checkThreshold(uint256)": { + "details": "Checks whether the `_voteWeight` passes the threshold." + }, + "depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Deposits based on the receipt. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released." + }, + "depositVoted(uint256,uint256,address)": { + "details": "Returns whether the deposit is casted by the voter." + }, + "getContract(uint8)": { + "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", + "params": { + "contractType": "The role of the contract to retrieve." }, - { - "components": [ - { - "internalType": "enum Token.Standard", - "name": "erc", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "internalType": "struct Token.Info", - "name": "info", - "type": "tuple" + "returns": { + "contract_": "The address of the contract with the specified role." } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + }, + "getMainchainToken(address,uint256)": { + "details": "Returns mainchain token address. Reverts for unsupported token." + }, + "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." + }, + "getThreshold()": { + "details": "Returns the threshold." + }, + "getTrustedThreshold()": { + "details": "Returns the threshold about trusted org." + }, + "getWithdrawalSignatures(uint256,address[])": { + "details": "Returns withdrawal signatures." + }, + "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. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,uint256,uint256,uint256,uint256,address[],address[][2],uint256[][2],uint8[])": { + "details": "Initializes contract storage." + }, + "mainchainWithdrew(uint256)": { + "details": "Returns whether the withdrawal is done on mainchain." + }, + "mainchainWithdrewVoted(uint256,address)": { + "details": "Returns whether the mainchain withdrew is casted by the voter." + }, + "mapTokens(address[],address[],uint256[],uint8[])": { + "details": "Maps Ronin tokens to mainchain networks. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." + }, + "mapTokensWithMinThresholds(address[],address[],uint256[],uint8[],uint256[])": { + "details": "Maps Ronin tokens to mainchain networks with minimum withdrawal thresholds." + }, + "minimumVoteWeight()": { + "details": "Returns the minimum vote weight to pass the threshold." + }, + "pause()": { + "details": "Triggers paused state." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "requestWithdrawalFor((address,address,(uint8,uint256,uint256)),uint256)": { + "details": "Locks the assets and request withdrawal. Emits the `WithdrawalRequested` event." + }, + "requestWithdrawalSignatures(uint256)": { + "details": "Requests withdrawal signatures for a specific withdrawal. Emits the `WithdrawalSignaturesRequested` event." + }, + "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. May emit a {RoleRevoked} event." + }, + "setContract(uint8,address)": { + "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", + "params": { + "addr": "The address of the contract to set.", + "contractType": "The role of the contract to set." } - ], - "stateMutability": "view", - "type": "function" + }, + "setEmergencyPauser(address)": { + "details": "Grant emergency pauser role for `_addr`." + }, + "setMinimumThresholds(address[],uint256[])": { + "details": "Sets the minimum thresholds to withdraw. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `MinimumThresholdsUpdated` event." + }, + "setThreshold(uint256,uint256)": { + "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." + }, + "tryBulkAcknowledgeMainchainWithdrew(uint256[])": { + "details": "Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal vote is already done before. Requirements: - The method caller is a validator. Emits the `MainchainWithdrew` once the valid call passes the quorum threshold." + }, + "tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])": { + "details": "Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote is already done before. Reverts if the deposit is invalid or is voted by the validator again. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released." + }, + "unmapTokens(address[],uint256[])": { + "details": "Unmaps Ronin tokens and clears the minimum withdrawal thresholds." + }, + "unpause()": { + "details": "Triggers unpaused state." + } }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "withdrawalStatVote", - "outputs": [ - { - "internalType": "enum VoteStatusConsumer.VoteStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "finalHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "expiredAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "events": { + "ContractUpdated(uint8,address)": { + "details": "Emitted when a contract is updated." + }, + "DepositVoted(address,uint256,uint256,bytes32)": { + "details": "Emitted when a deposit is voted" + }, + "Deposited(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the assets are depositted" + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MainchainWithdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the assets are withdrawn on mainchain" + }, + "MinimumThresholdsUpdated(address[],uint256[])": { + "details": "Emitted when the minimum thresholds are updated" + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + }, + "TokenMapped(address[],address[],uint256[],uint8[])": { + "details": "Emitted when the tokens are mapped" + }, + "TokenUnmapped(address[],uint256[])": { + "details": "Emitted when the tokens are unmapped" + }, + "TrustedThresholdUpdated(uint256,uint256,uint256,uint256,uint256)": { + "details": "Emitted when the threshold is updated" + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + }, + "WithdrawalRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the withdrawal is requested" + }, + "WithdrawalSignaturesRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "details": "Emitted when the withdrawal signatures is requested" + } }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xbd0e0924e2b2d2a95610852713adb452357c372d48f11b865ff133a59b4d1384", - "receipt": { - "to": null, - "from": "0x4d58Ea7231c394d5804e8B06B1365915f906E27F", - "contractAddress": "0x1477DB6bF449B0eb1191a1F4023867ddCEadc504", - "transactionIndex": 0, - "gasUsed": "4320982", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3cb3f6c5e6502d1f547f4c04a7f403f31b02996a38a82d34c7813339761d999d", - "transactionHash": "0xbd0e0924e2b2d2a95610852713adb452357c372d48f11b865ff133a59b4d1384", - "logs": [], - "blockNumber": 28540007, - "cumulativeGasUsed": "4320982", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "8a10de68ec323e5be85b46f42143fc19", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"ErrAlreadyVoted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"ErrContractTypeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC20MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrERC721MintingFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrEmptyArray\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ErrInvalidChainId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidInfo\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceipt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidReceiptKind\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrInvalidThreshold\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTokenStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidTrustedThreshold\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"}],\"name\":\"ErrLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrQueryForTooSmallQuantity\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransfer\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"tokenInfo\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ErrTokenCouldNotTransferFrom\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"msgSig\",\"type\":\"bytes4\"},{\"internalType\":\"enum RoleAccess\",\"name\":\"expectedRole\",\"type\":\"uint8\"}],\"name\":\"ErrUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedStandard\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrUnsupportedToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrWithdrawalsMigrated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrWithdrawnOnMainchainAlready\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ErrZeroCodeContract\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"ContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bridgeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"}],\"name\":\"DepositVoted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"receipt\",\"type\":\"tuple\"}],\"name\":\"MainchainWithdrew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"threshold\",\"type\":\"uint256[]\"}],\"name\":\"MinimumThresholdsUpdated\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"ThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"roninTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"mainchainTokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"enum Token.Standard[]\",\"name\":\"standards\",\"type\":\"uint8[]\"}],\"name\":\"TokenMapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousDenominator\",\"type\":\"uint256\"}],\"name\":\"TrustedThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"WithdrawalRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiptHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"struct Transfer.Receipt\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"WithdrawalSignaturesRequested\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request[]\",\"name\":\"_requests\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"}],\"name\":\"bulkRequestWithdrawalFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"withdrawals\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"bulkSubmitWithdrawalSignatures\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_voteWeight\",\"type\":\"uint256\"}],\"name\":\"checkThreshold\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt\",\"name\":\"_receipt\",\"type\":\"tuple\"}],\"name\":\"depositFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"depositVote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"finalHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiredAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"depositVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contract_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_roninToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"}],\"name\":\"getMainchainToken\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"}],\"internalType\":\"struct MappedTokenConsumer.MappedToken\",\"name\":\"_token\",\"type\":\"tuple\"}],\"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\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"num_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denom_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTrustedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"trustedNum_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"trustedDenom_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"withdrawalId\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"getWithdrawalSignatures\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_signatures\",\"type\":\"bytes[]\"}],\"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\":[{\"internalType\":\"address\",\"name\":\"_roleSetter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_trustedNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_trustedDenominator\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"address[][2]\",\"name\":\"_packedAddresses\",\"type\":\"address[][2]\"},{\"internalType\":\"uint256[][2]\",\"name\":\"_packedNumbers\",\"type\":\"uint256[][2]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridgeAdmin\",\"type\":\"address\"}],\"name\":\"initializeV3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawalId\",\"type\":\"uint256\"}],\"name\":\"mainchainWithdrew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"mainchainWithdrewVote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"finalHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiredAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawalId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"mainchainWithdrewVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_roninTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_mainchainTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_chainIds\",\"type\":\"uint256[]\"},{\"internalType\":\"enum Token.Standard[]\",\"name\":\"_standards\",\"type\":\"uint8[]\"}],\"name\":\"mapTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minimumThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumVoteWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipientAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Request\",\"name\":\"_request\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawalFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawalId\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawalSignatures\",\"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\":\"enum ContractType\",\"name\":\"contractType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setEmergencyPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_thresholds\",\"type\":\"uint256[]\"}],\"name\":\"setMinimumThresholds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_denominator\",\"type\":\"uint256\"}],\"name\":\"setThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_trustedNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_trustedDenominator\",\"type\":\"uint256\"}],\"name\":\"setTrustedThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_withdrawalIds\",\"type\":\"uint256[]\"}],\"name\":\"tryBulkAcknowledgeMainchainWithdrew\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"_executedReceipts\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"internalType\":\"struct Transfer.Receipt[]\",\"name\":\"_receipts\",\"type\":\"tuple[]\"}],\"name\":\"tryBulkDepositFor\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"_executedReceipts\",\"type\":\"bool[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"enum Transfer.Kind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"mainchain\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Owner\",\"name\":\"ronin\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"enum Token.Standard\",\"name\":\"erc\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"internalType\":\"struct Token.Info\",\"name\":\"info\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalStatVote\",\"outputs\":[{\"internalType\":\"enum VoteStatusConsumer.VoteStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"finalHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiredAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ErrAlreadyVoted(address)\":[{\"details\":\"Error indicating that a voter has already voted.\",\"params\":{\"voter\":\"The address of the voter who has already voted.\"}}],\"ErrContractTypeNotFound(uint8)\":[{\"details\":\"Error of invalid role.\"}],\"ErrERC20MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC20 tokens has failed.\"}],\"ErrERC721MintingFailed()\":[{\"details\":\"Error indicating that the minting of ERC721 tokens has failed.\"}],\"ErrEmptyArray()\":[{\"details\":\"Error indicating that an array is empty when it should contain elements.\"}],\"ErrInvalidChainId(bytes4,uint256,uint256)\":[{\"details\":\"Error indicating that the chain ID is invalid.\",\"params\":{\"actual\":\"Current chain ID that executing function.\",\"expected\":\"Expected chain ID required for the tx to success.\",\"msgSig\":\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\"}}],\"ErrInvalidInfo()\":[{\"details\":\"Error indicating that the provided information is invalid.\"}],\"ErrInvalidReceipt()\":[{\"details\":\"Error indicating that a receipt is invalid.\"}],\"ErrInvalidReceiptKind()\":[{\"details\":\"Error indicating that a receipt kind is invalid.\"}],\"ErrInvalidRequest()\":[{\"details\":\"Error indicating that a request is invalid.\"}],\"ErrInvalidThreshold(bytes4)\":[{\"details\":\"Error indicating that the provided threshold is invalid for a specific function signature.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that the invalid threshold applies to.\"}}],\"ErrInvalidTokenStandard()\":[{\"details\":\"Error indicating that a token standard is invalid.\"}],\"ErrInvalidTrustedThreshold()\":[{\"details\":\"Error thrown when an invalid trusted threshold is specified.\"}],\"ErrLengthMismatch(bytes4)\":[{\"details\":\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\",\"params\":{\"msgSig\":\"The function signature (bytes4) that has a length mismatch.\"}}],\"ErrQueryForTooSmallQuantity()\":[{\"details\":\"Throwed when the ERC20 withdrawal quantity is less than the minimum threshold.\"}],\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\":[{\"details\":\"Error indicating that the `transfer` has failed.\",\"params\":{\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\":[{\"details\":\"Error indicating that the `transferFrom` has failed.\",\"params\":{\"from\":\"Owner of the token value.\",\"to\":\"Receiver of the token value.\",\"token\":\"Address of the token.\",\"tokenInfo\":\"Info of the token including ERC standard, id or quantity.\"}}],\"ErrUnauthorized(bytes4,uint8)\":[{\"details\":\"Error indicating that the caller is unauthorized to perform a specific function.\",\"params\":{\"expectedRole\":\"The role required to perform the function.\",\"msgSig\":\"The function signature (bytes4) that the caller is unauthorized to perform.\"}}],\"ErrUnsupportedStandard()\":[{\"details\":\"Error indicating that an unsupported standard is encountered.\"}],\"ErrUnsupportedToken()\":[{\"details\":\"Error indicating that a token is not supported.\"}],\"ErrWithdrawalsMigrated()\":[{\"details\":\"Error thrown when attempting to withdraw funds that have already been migrated.\"}],\"ErrWithdrawnOnMainchainAlready()\":[{\"details\":\"Error thrown when attempting to withdraw funds that have already been withdrawn on the mainchain.\"}],\"ErrZeroCodeContract(address)\":[{\"details\":\"Error of set to non-contract.\"}]},\"kind\":\"dev\",\"methods\":{\"bulkRequestWithdrawalFor((address,address,(uint8,uint256,uint256))[],uint256)\":{\"details\":\"Bulk requests withdrawals. Emits the `WithdrawalRequested` events.\"},\"bulkSubmitWithdrawalSignatures(uint256[],bytes[])\":{\"details\":\"Submits withdrawal signatures. Requirements: - The method caller is a validator.\"},\"checkThreshold(uint256)\":{\"details\":\"Checks whether the `_voteWeight` passes the threshold.\"},\"depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"details\":\"Deposits based on the receipt. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released.\"},\"depositVoted(uint256,uint256,address)\":{\"details\":\"Returns whether the deposit is casted by the voter.\"},\"getContract(uint8)\":{\"details\":\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\",\"params\":{\"contractType\":\"The role of the contract to retrieve.\"},\"returns\":{\"contract_\":\"The address of the contract with the specified role.\"}},\"getMainchainToken(address,uint256)\":{\"details\":\"Returns mainchain token address. Reverts for unsupported token.\"},\"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.\"},\"getThreshold()\":{\"details\":\"Returns the threshold.\"},\"getTrustedThreshold()\":{\"details\":\"Returns the threshold about trusted org.\"},\"getWithdrawalSignatures(uint256,address[])\":{\"details\":\"Returns withdrawal signatures.\"},\"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. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,uint256,uint256,uint256,uint256,address[],address[][2],uint256[][2],uint8[])\":{\"details\":\"Initializes contract storage.\"},\"mainchainWithdrew(uint256)\":{\"details\":\"Returns whether the withdrawal is done on mainchain.\"},\"mainchainWithdrewVoted(uint256,address)\":{\"details\":\"Returns whether the mainchain withdrew is casted by the voter.\"},\"mapTokens(address[],address[],uint256[],uint8[])\":{\"details\":\"Maps Ronin tokens to mainchain networks. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\"},\"minimumVoteWeight()\":{\"details\":\"Returns the minimum vote weight to pass the threshold.\"},\"pause()\":{\"details\":\"Triggers paused state.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"requestWithdrawalFor((address,address,(uint8,uint256,uint256)),uint256)\":{\"details\":\"Locks the assets and request withdrawal. Emits the `WithdrawalRequested` event.\"},\"requestWithdrawalSignatures(uint256)\":{\"details\":\"Requests withdrawal signatures for a specific withdrawal. Emits the `WithdrawalSignaturesRequested` event.\"},\"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. May emit a {RoleRevoked} event.\"},\"setContract(uint8,address)\":{\"details\":\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\",\"params\":{\"addr\":\"The address of the contract to set.\",\"contractType\":\"The role of the contract to set.\"}},\"setEmergencyPauser(address)\":{\"details\":\"Grant emergency pauser role for `_addr`.\"},\"setMinimumThresholds(address[],uint256[])\":{\"details\":\"Sets the minimum thresholds to withdraw. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `MinimumThresholdsUpdated` event.\"},\"setThreshold(uint256,uint256)\":{\"details\":\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"tryBulkAcknowledgeMainchainWithdrew(uint256[])\":{\"details\":\"Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal vote is already done before. Requirements: - The method caller is a validator. Emits the `MainchainWithdrew` once the valid call passes the quorum threshold.\"},\"tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])\":{\"details\":\"Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote is already done before. Reverts if the deposit is invalid or is voted by the validator again. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released.\"},\"unpause()\":{\"details\":\"Triggers unpaused state.\"}},\"stateVariables\":{\"____deprecated0\":{\"custom:deprecated\":\"Previously `_validatorContract` (non-zero value)\"},\"____deprecated1\":{\"custom:deprecated\":\"Previously `_bridgeTrackingContract` (non-zero value)\"},\"____deprecated2\":{\"custom:deprecated\":\"Previously `_trustedOrgContract` (non-zero value)\"},\"___deprecated4\":{\"custom:deprecated\":\"Previously `withdrawalMigrated` (non-zero value)\"},\"_mainchainToken\":{\"details\":\"Mapping from token address => chain id => mainchain token address\"},\"_withdrawalSig\":{\"details\":\"Mapping from withdrawal id => validator address => signatures\"},\"depositVote\":{\"details\":\"Mapping from chain id => deposit id => deposit vote\"},\"mainchainWithdrewVote\":{\"details\":\"Mapping from withdrawal id => mainchain withdrew vote\"},\"withdrawal\":{\"details\":\"Mapping from withdrawal id => withdrawal receipt\"},\"withdrawalCount\":{\"details\":\"Total withdrawal\"},\"withdrawalStatVote\":{\"details\":\"Mapping from withdrawal id => vote for recording withdrawal stats\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\":{\"notice\":\"The assets will be transferred whenever the valid call passes the quorum threshold.\"},\"tryBulkAcknowledgeMainchainWithdrew(uint256[])\":{\"notice\":\"Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\"},\"tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])\":{\"notice\":\"The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ronin/gateway/RoninGatewayV3.sol\":\"RoninGatewayV3\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\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 AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\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 virtual override 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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\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 * May emit a {RoleGranted} event.\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerable.sol\\\";\\nimport \\\"./AccessControl.sol\\\";\\nimport \\\"../utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\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 virtual override returns (address) {\\n return _roleMembers[role].at(index);\\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 virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n}\\n\",\"keccak256\":\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\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 {AccessControl-_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) external view returns (bool);\\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 {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\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) external;\\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) external;\\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) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControlEnumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerable is IAccessControl {\\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) external view returns (address);\\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) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 {ERC1967Proxy-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 *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.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 Pausable is Context {\\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 constructor() {\\n _paused = false;\\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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev 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 /**\\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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, 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 `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-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\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^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 *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\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 // 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) {\\n // 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 if (lastIndex != toDeleteIndex) {\\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] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\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 return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\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 * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\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 /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\",\"license\":\"MIT\"},\"contracts/extensions/GatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"../interfaces/IQuorum.sol\\\";\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\n\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\n uint256 internal _num;\\n uint256 internal _denom;\\n\\n address private ______deprecated;\\n uint256 public nonce;\\n\\n address public emergencyPauser;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[49] private ______gap;\\n\\n /**\\n * @dev Grant emergency pauser role for `_addr`.\\n */\\n function setEmergencyPauser(address _addr) external onlyAdmin {\\n emergencyPauser = _addr;\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\n return (_num, _denom);\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function setThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external virtual onlyAdmin returns (uint256, uint256) {\\n return _setThreshold(_numerator, _denominator);\\n }\\n\\n /**\\n * @dev Triggers paused state.\\n */\\n function pause() external {\\n _requireAuth();\\n _pause();\\n }\\n\\n /**\\n * @dev Triggers unpaused state.\\n */\\n function unpause() external {\\n _requireAuth();\\n _unpause();\\n }\\n\\n /**\\n * @inheritdoc IQuorum\\n */\\n function minimumVoteWeight() public view virtual returns (uint256) {\\n return _minimumVoteWeight(_getTotalWeight());\\n }\\n\\n /**\\n * @dev Sets threshold and returns the old one.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function _setThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) internal virtual returns (uint256 _previousNum, uint256 _previousDenom) {\\n if (_numerator > _denominator) revert ErrInvalidThreshold(msg.sig);\\n _previousNum = _num;\\n _previousDenom = _denom;\\n _num = _numerator;\\n _denom = _denominator;\\n unchecked {\\n emit ThresholdUpdated(nonce++, _numerator, _denominator, _previousNum, _previousDenom);\\n }\\n }\\n\\n /**\\n * @dev Returns minimum vote weight.\\n */\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\n return (_num * _totalWeight + _denom - 1) / _denom;\\n }\\n\\n /**\\n * @dev Internal method to check method caller.\\n *\\n * Requirements:\\n *\\n * - The method caller must be admin or pauser.\\n *\\n */\\n function _requireAuth() private view {\\n if (!(msg.sender == _getAdmin() || msg.sender == emergencyPauser)) {\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n }\\n\\n /**\\n * @dev Returns the total weight.\\n */\\n function _getTotalWeight() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0xfcb8d4fa4358387c477a40da4d8a5108c298f23333c4161ce939c1b27a09ffde\",\"license\":\"MIT\"},\"contracts/extensions/MinimumWithdrawal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./collections/HasProxyAdmin.sol\\\";\\nimport \\\"../libraries/Transfer.sol\\\";\\n\\nabstract contract MinimumWithdrawal is HasProxyAdmin {\\n /// @dev Throwed when the ERC20 withdrawal quantity is less than the minimum threshold.\\n error ErrQueryForTooSmallQuantity();\\n\\n /// @dev Emitted when the minimum thresholds are updated\\n event MinimumThresholdsUpdated(address[] tokens, uint256[] threshold);\\n\\n /// @dev Mapping from token address => minimum thresholds\\n mapping(address => uint256) public minimumThreshold;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n */\\n uint256[50] private ______gap;\\n\\n /**\\n * @dev Sets the minimum thresholds to withdraw.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `MinimumThresholdsUpdated` event.\\n *\\n */\\n function setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external virtual onlyAdmin {\\n if (_tokens.length == 0) revert ErrEmptyArray();\\n _setMinimumThresholds(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Sets minimum thresholds.\\n *\\n * Requirements:\\n * - The array lengths are equal.\\n *\\n * Emits the `MinimumThresholdsUpdated` event.\\n *\\n */\\n function _setMinimumThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) internal virtual {\\n if (_tokens.length != _thresholds.length) revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _tokens.length; ) {\\n minimumThreshold[_tokens[_i]] = _thresholds[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n emit MinimumThresholdsUpdated(_tokens, _thresholds);\\n }\\n\\n /**\\n * @dev Checks whether the request is larger than or equal to the minimum threshold.\\n */\\n function _checkWithdrawal(Transfer.Request calldata _request) internal view {\\n if (_request.info.erc == Token.Standard.ERC20 && _request.info.quantity < minimumThreshold[_request.tokenAddr]) {\\n revert ErrQueryForTooSmallQuantity();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xbbb1db4bcefff2b7cac574410f7716e6d61d461ab40ca453d5f988e971c480dc\",\"license\":\"MIT\"},\"contracts/extensions/TransparentUpgradeableProxyV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\";\\n\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {}\\n\\n /**\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\n *\\n * Requirements:\\n * - Only the admin can call this function.\\n *\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\n * reviewing the encoded data `_data` and the method which is called before using this.\\n *\\n */\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\n address _addr = _implementation();\\n assembly {\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch _result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6609392ea7d3174439b5715100bee82528fe6e4aff28927d48c27db8475e88c5\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { HasProxyAdmin } from \\\"./HasProxyAdmin.sol\\\";\\nimport \\\"../../interfaces/collections/IHasContracts.sol\\\";\\nimport { IdentityGuard } from \\\"../../utils/IdentityGuard.sol\\\";\\nimport { ErrUnexpectedInternalCall } from \\\"../../utils/CommonErrors.sol\\\";\\n\\n/**\\n * @title HasContracts\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\n */\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\n /// @dev value is equal to keccak256(\\\"@ronin.dpos.collections.HasContracts.slot\\\") - 1\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\n\\n /**\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\n * @param contractType The contract type that allowed to call\\n */\\n modifier onlyContract(ContractType contractType) virtual {\\n _requireContract(contractType);\\n _;\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function setContract(ContractType contractType, address addr) external virtual onlyAdmin {\\n _requireHasCode(addr);\\n _setContract(contractType, addr);\\n }\\n\\n /**\\n * @inheritdoc IHasContracts\\n */\\n function getContract(ContractType contractType) public view returns (address contract_) {\\n contract_ = _getContractMap()[uint8(contractType)];\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\n }\\n\\n /**\\n * @dev Internal function to set the address of a contract with a specific role.\\n * @param contractType The contract type of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function _setContract(ContractType contractType, address addr) internal virtual {\\n _getContractMap()[uint8(contractType)] = addr;\\n emit ContractUpdated(contractType, addr);\\n }\\n\\n /**\\n * @dev Internal function to access the mapping of contract addresses with roles.\\n * @return contracts_ The mapping of contract addresses with roles.\\n */\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\n assembly {\\n contracts_.slot := _STORAGE_SLOT\\n }\\n }\\n\\n /**\\n * @dev Internal function to check if the calling contract has a specific role.\\n * @param contractType The contract type that the calling contract must have.\\n * @dev Throws an error if the calling contract does not have the specified role.\\n */\\n function _requireContract(ContractType contractType) private view {\\n if (msg.sender != getContract(contractType)) {\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9e1dceb68827adfb8c8184662f29ab5fe14e292a632878150e3b0b6c61bc1dce\",\"license\":\"MIT\"},\"contracts/extensions/collections/HasProxyAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\";\\nimport \\\"../../utils/CommonErrors.sol\\\";\\n\\nabstract contract HasProxyAdmin {\\n // bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n modifier onlyAdmin() {\\n _requireAdmin();\\n _;\\n }\\n\\n /**\\n * @dev Returns proxy admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n function _requireAdmin() internal view {\\n if (msg.sender != _getAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\n }\\n}\\n\",\"keccak256\":\"0x0916021d04ea0c93c54978dc2fd46575fd2bd867369fbf9ce49f316939ddaf25\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20Mintable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.2;\\n\\ninterface IERC20Mintable {\\n function mint(address _to, uint256 _value) external returns (bool _success);\\n}\\n\",\"keccak256\":\"0x6632cb3345e581a0b7868d6ce9a883f55d107576f9557f500a042c8285e51005\",\"license\":\"MIT\"},\"contracts/interfaces/IERC721Mintable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IERC721Mintable {\\n function mint(address _to, uint256 _tokenId) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4f001516a2596c79c205a9e28de092aa866eb440040e78b8be9027451028f169\",\"license\":\"MIT\"},\"contracts/interfaces/IQuorum.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IQuorum {\\n /// @dev Emitted when the threshold is updated\\n event ThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n\\n /**\\n * @dev Returns the threshold.\\n */\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\n\\n /**\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\n */\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\n\\n /**\\n * @dev Returns the minimum vote weight to pass the threshold.\\n */\\n function minimumVoteWeight() external view returns (uint256);\\n\\n /**\\n * @dev Sets the threshold.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `ThresholdUpdated` event.\\n *\\n */\\n function setThreshold(\\n uint256 _numerator,\\n uint256 _denominator\\n ) external returns (uint256 _previousNum, uint256 _previousDenom);\\n}\\n\",\"keccak256\":\"0x6b7920b04a73a0e1ff7404aa1a3b5fc738fc0b6154839480f666fd69b55123f0\",\"license\":\"MIT\"},\"contracts/interfaces/IRoninGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../libraries/Transfer.sol\\\";\\nimport \\\"./consumers/MappedTokenConsumer.sol\\\";\\n\\ninterface IRoninGatewayV3 is MappedTokenConsumer {\\n /**\\n * @dev Error thrown when attempting to withdraw funds that have already been migrated.\\n */\\n error ErrWithdrawalsMigrated();\\n\\n /**\\n * @dev Error thrown when an invalid trusted threshold is specified.\\n */\\n error ErrInvalidTrustedThreshold();\\n\\n /**\\n * @dev Error thrown when attempting to withdraw funds that have already been withdrawn on the mainchain.\\n */\\n error ErrWithdrawnOnMainchainAlready();\\n\\n /// @dev Emitted when the assets are depositted\\n event Deposited(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal is requested\\n event WithdrawalRequested(bytes32 receiptHash, Transfer.Receipt);\\n /// @dev Emitted when the assets are withdrawn on mainchain\\n event MainchainWithdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\n /// @dev Emitted when the withdrawal signatures is requested\\n event WithdrawalSignaturesRequested(bytes32 receiptHash, Transfer.Receipt);\\n /// @dev Emitted when the tokens are mapped\\n event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, Token.Standard[] standards);\\n /// @dev Emitted when the threshold is updated\\n event TrustedThresholdUpdated(\\n uint256 indexed nonce,\\n uint256 indexed numerator,\\n uint256 indexed denominator,\\n uint256 previousNumerator,\\n uint256 previousDenominator\\n );\\n /// @dev Emitted when a deposit is voted\\n event DepositVoted(address indexed bridgeOperator, uint256 indexed id, uint256 indexed chainId, bytes32 receiptHash);\\n\\n /**\\n * @dev Returns withdrawal count.\\n */\\n function withdrawalCount() external view returns (uint256);\\n\\n /**\\n * @dev Returns withdrawal signatures.\\n */\\n function getWithdrawalSignatures(\\n uint256 _withdrawalId,\\n address[] calldata _validators\\n ) external view returns (bytes[] memory);\\n\\n /**\\n * @dev Deposits based on the receipt.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Deposited` once the assets are released.\\n *\\n * @notice The assets will be transferred whenever the valid call passes the quorum threshold.\\n *\\n */\\n function depositFor(Transfer.Receipt calldata _receipt) external;\\n\\n /**\\n * @dev Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal\\n * vote is already done before.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `MainchainWithdrew` once the valid call passes the quorum threshold.\\n *\\n * @notice Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the\\n * same time.\\n *\\n */\\n function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external returns (bool[] memory);\\n\\n /**\\n * @dev Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote\\n * is already done before. Reverts if the deposit is invalid or is voted by the validator again.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n * Emits the `Deposited` once the assets are released.\\n *\\n * @notice The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not\\n * reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\\n *\\n */\\n function tryBulkDepositFor(Transfer.Receipt[] calldata _receipts) external returns (bool[] memory);\\n\\n /**\\n * @dev Locks the assets and request withdrawal.\\n *\\n * Emits the `WithdrawalRequested` event.\\n *\\n */\\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external;\\n\\n /**\\n * @dev Bulk requests withdrawals.\\n *\\n * Emits the `WithdrawalRequested` events.\\n *\\n */\\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external;\\n\\n /**\\n * @dev Requests withdrawal signatures for a specific withdrawal.\\n *\\n * Emits the `WithdrawalSignaturesRequested` event.\\n *\\n */\\n function requestWithdrawalSignatures(uint256 _withdrawalId) external;\\n\\n /**\\n * @dev Submits withdrawal signatures.\\n *\\n * Requirements:\\n * - The method caller is a validator.\\n *\\n */\\n function bulkSubmitWithdrawalSignatures(uint256[] calldata _withdrawals, bytes[] calldata _signatures) external;\\n\\n /**\\n * @dev Maps Ronin tokens to mainchain networks.\\n *\\n * Requirement:\\n * - The method caller is admin.\\n * - The arrays have the same length and its length larger than 0.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function mapTokens(\\n address[] calldata _roninTokens,\\n address[] calldata _mainchainTokens,\\n uint256[] calldata chainIds,\\n Token.Standard[] calldata _standards\\n ) external;\\n\\n /**\\n * @dev Returns whether the deposit is casted by the voter.\\n */\\n function depositVoted(uint256 _chainId, uint256 _depositId, address _voter) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the mainchain withdrew is casted by the voter.\\n */\\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the withdrawal is done on mainchain.\\n */\\n function mainchainWithdrew(uint256 _withdrawalId) external view returns (bool);\\n\\n /**\\n * @dev Returns mainchain token address.\\n * Reverts for unsupported token.\\n */\\n function getMainchainToken(address _roninToken, uint256 _chainId) external view returns (MappedToken memory _token);\\n}\\n\",\"keccak256\":\"0x6434038ea1b762a0889dc6725e13ae793bec3c35a33f0edf91754b50a359f690\",\"license\":\"MIT\"},\"contracts/interfaces/IRoninTrustedOrganization.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IQuorum.sol\\\";\\n\\ninterface IRoninTrustedOrganization is IQuorum {\\n /**\\n * @dev Error indicating that a query for a duplicate entry was made.\\n */\\n error ErrQueryForDupplicated();\\n\\n /**\\n * @dev Error indicating that a query was made for a non-existent consensus address.\\n */\\n error ErrQueryForNonExistentConsensusAddress();\\n\\n /**\\n * @dev Error indicating that a bridge voter has already been added.\\n * @param voter The address of the bridge voter that is already added.\\n */\\n error ErrBridgeVoterIsAlreadyAdded(address voter);\\n\\n /**\\n * @dev Error indicating that a governor address has already been added.\\n * @param addr The address of the governor that is already added.\\n */\\n error ErrGovernorAddressIsAlreadyAdded(address addr);\\n\\n /**\\n * @dev Error indicating that a consensus address is not added.\\n * @param addr The address of the consensus contract that is not added.\\n */\\n error ErrConsensusAddressIsNotAdded(address addr);\\n\\n /**\\n * @dev Error indicating that a consensus address is already added.\\n * @param addr The address of the consensus contract that is already added.\\n */\\n error ErrConsensusAddressIsAlreadyAdded(address addr);\\n\\n struct TrustedOrganization {\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address to voting proposal\\n address governor;\\n // Address to voting bridge operators\\n address bridgeVoter;\\n // Its Weight\\n uint256 weight;\\n // The block that the organization was added\\n uint256 addedBlock;\\n }\\n\\n /// @dev Emitted when the trusted organization is added.\\n event TrustedOrganizationsAdded(TrustedOrganization[] orgs);\\n /// @dev Emitted when the trusted organization is updated.\\n event TrustedOrganizationsUpdated(TrustedOrganization[] orgs);\\n /// @dev Emitted when the trusted organization is removed.\\n event TrustedOrganizationsRemoved(address[] orgs);\\n\\n /**\\n * @dev Adds a list of addresses into the trusted organization.\\n *\\n * Requirements:\\n * - The weights should larger than 0.\\n * - The method caller is admin.\\n * - The field `addedBlock` should be blank.\\n *\\n * Emits the event `TrustedOrganizationAdded` once an organization is added.\\n *\\n */\\n function addTrustedOrganizations(TrustedOrganization[] calldata) external;\\n\\n /**\\n * @dev Updates weights for a list of existent trusted organization.\\n *\\n * Requirements:\\n * - The weights should larger than 0.\\n * - The method caller is admin.\\n *\\n * Emits the `TrustedOrganizationUpdated` event.\\n *\\n */\\n function updateTrustedOrganizations(TrustedOrganization[] calldata _list) external;\\n\\n /**\\n * @dev Removes a list of addresses from the trusted organization.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `TrustedOrganizationRemoved` once an organization is removed.\\n *\\n * @param _consensusAddrs The list of consensus addresses linked to corresponding trusted organization that to be removed.\\n */\\n function removeTrustedOrganizations(address[] calldata _consensusAddrs) external;\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function totalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a consensus.\\n */\\n function getConsensusWeight(address _consensusAddr) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a governor.\\n */\\n function getGovernorWeight(address _governor) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weight of a bridge voter.\\n */\\n function getBridgeVoterWeight(address _addr) external view returns (uint256);\\n\\n /**\\n * @dev Returns the weights of a list of consensus addresses.\\n */\\n function getConsensusWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the weights of a list of bridge voter addresses.\\n */\\n function getBridgeVoterWeights(address[] calldata _list) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns total weights of the consensus list.\\n */\\n function sumConsensusWeight(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorWeight(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns total weights of the bridge voter list.\\n */\\n function sumBridgeVoterWeight(address[] calldata _list) external view returns (uint256 _res);\\n\\n /**\\n * @dev Returns the trusted organization at `_index`.\\n */\\n function getTrustedOrganizationAt(uint256 _index) external view returns (TrustedOrganization memory);\\n\\n /**\\n * @dev Returns the number of trusted organizations.\\n */\\n function countTrustedOrganization() external view returns (uint256);\\n\\n /**\\n * @dev Returns all of the trusted organizations.\\n */\\n function getAllTrustedOrganizations() external view returns (TrustedOrganization[] memory);\\n\\n /**\\n * @dev Returns the trusted organization by consensus address.\\n *\\n * Reverts once the consensus address is non-existent.\\n */\\n function getTrustedOrganization(address _consensusAddr) external view returns (TrustedOrganization memory);\\n}\\n\",\"keccak256\":\"0x2eaef3332e209474b24574aeded61091e82a145fcbcf479577535c0cd210e1e5\",\"license\":\"MIT\"},\"contracts/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IWETH {\\n function deposit() external payable;\\n\\n function withdraw(uint256 _wad) external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8acead2ae4364dee80c9bc76d52cc04d3763105e1743728e67d237f816155142\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBridgeManagerEvents } from \\\"./events/IBridgeManagerEvents.sol\\\";\\n\\n/**\\n * @title IBridgeManager\\n * @dev The interface for managing bridge operators.\\n */\\ninterface IBridgeManager is IBridgeManagerEvents {\\n /**\\n * @dev The domain separator used for computing hash digests in the contract.\\n */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /**\\n * @dev Returns the total number of bridge operators.\\n * @return The total number of bridge operators.\\n */\\n function totalBridgeOperator() external view returns (uint256);\\n\\n /**\\n * @dev Checks if the given address is a bridge operator.\\n * @param addr The address to check.\\n * @return A boolean indicating whether the address is a bridge operator.\\n */\\n function isBridgeOperator(address addr) external view returns (bool);\\n\\n /**\\n * @dev Retrieves the full information of all registered bridge operators.\\n *\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\n *\\n * @return governors An array of addresses representing the governors of each bridge operator.\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\n *\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\n *\\n * Example Usage:\\n * ```\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\n * // Access individual information for each bridge operator.\\n * address governor = governors[i];\\n * address bridgeOperator = bridgeOperators[i];\\n * uint256 weight = weights[i];\\n * // ... (Process or use the information as required) ...\\n * }\\n * ```\\n *\\n */\\n function getFullBridgeOperatorInfos()\\n external\\n view\\n returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\n\\n /**\\n * @dev Returns total weights of the governor list.\\n */\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\n\\n /**\\n * @dev Returns total weights.\\n */\\n function getTotalWeight() external view returns (uint256);\\n\\n /**\\n * @dev Returns an array of all bridge operators.\\n * @return An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperators() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns an array of bridge operators correspoding to governor addresses.\\n * @return bridgeOperators_ An array containing the addresses of all bridge operators.\\n */\\n function getBridgeOperatorOf(address[] calldata gorvernors) external view returns (address[] memory bridgeOperators_);\\n\\n /**\\n * @dev Retrieves the governors corresponding to a given array of bridge operators.\\n * This external function allows external callers to obtain the governors associated with a given array of bridge operators.\\n * The function takes an input array `bridgeOperators` containing bridge operator addresses and returns an array of corresponding governors.\\n * @param bridgeOperators An array of bridge operator addresses for which governors are to be retrieved.\\n * @return governors An array of addresses representing the governors corresponding to the provided bridge operators.\\n */\\n function getGovernorsOf(address[] calldata bridgeOperators) external view returns (address[] memory governors);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific governor.\\n * @param governor The address of the governor to get the vote weight for.\\n * @return voteWeight The vote weight of the specified governor.\\n */\\n function getGovernorWeight(address governor) external view returns (uint96);\\n\\n /**\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\n * @return weight The vote weight of the specified bridge operator.\\n */\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\n\\n /**\\n * @dev Returns the weights of a list of governor addresses.\\n */\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\n\\n /**\\n * @dev Returns an array of all governors.\\n * @return An array containing the addresses of all governors.\\n */\\n function getGovernors() external view returns (address[] memory);\\n\\n /**\\n * @dev Adds multiple bridge operators.\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\n * @return addeds An array of booleans indicating whether each bridge operator was added successfully.\\n *\\n * Note: return boolean array `addeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {addeds} = await bridgeManagerContract.callStatic.addBridgeOperators(\\n * voteWeights,\\n * governors,\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => addeds[index]);\\n * const filteredWeights = weights.filter((_, index) => addeds[index]);\\n * const filteredGovernors = governors.filter((_, index) => addeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function addBridgeOperators(\\n uint96[] calldata voteWeights,\\n address[] calldata governors,\\n address[] calldata bridgeOperators\\n ) external returns (bool[] memory addeds);\\n\\n /**\\n * @dev Removes multiple bridge operators.\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\n * @return removeds An array of booleans indicating whether each bridge operator was removed successfully.\\n *\\n * * Note: return boolean array `removeds` indicates whether a group (voteWeight, governor, operator) are recorded.\\n * It is expected that FE/BE staticcall to the function first to get the return values and handle it correctly.\\n * Governors are expected to see the outcome of this function and decide if they want to vote for the proposal or not.\\n *\\n * Example Usage:\\n * Making an `eth_call` in ethers.js\\n * ```\\n * const {removeds} = await bridgeManagerContract.callStatic.removeBridgeOperators(\\n * bridgeOperators,\\n * // overriding the caller to the contract itself since we use `onlySelfCall` guard\\n * {from: bridgeManagerContract.address}\\n * )\\n * const filteredOperators = bridgeOperators.filter((_, index) => removeds[index]);\\n * // ... (Process or use the information as required) ...\\n * ```\\n */\\n function removeBridgeOperators(address[] calldata bridgeOperators) external returns (bool[] memory removeds);\\n\\n /**\\n * @dev Governor updates their corresponding governor and/or operator address.\\n * Requirements:\\n * - The caller must the governor of the operator that is requested changes.\\n * @param bridgeOperator The address of the bridge operator to update.\\n */\\n function updateBridgeOperator(address bridgeOperator) external;\\n}\\n\",\"keccak256\":\"0x9339ce2f14bc1e4d0e368a351506ff5735bcbc0a2e41aa633149198bbed76a60\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/IBridgeTracking.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeTracking {\\n struct Request {\\n VoteKind kind;\\n uint256 id;\\n }\\n\\n enum VoteKind {\\n Deposit,\\n Withdrawal,\\n MainchainWithdrawal\\n }\\n\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\n\\n /**\\n * @dev Returns the block that allow incomming mutable call.\\n */\\n function startedAtBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of votes at the specific period `_period`.\\n */\\n function totalVote(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots at the specific period `_period`.\\n */\\n function totalBallot(uint256 _period) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\n */\\n function getManyTotalBallots(\\n uint256 _period,\\n address[] calldata _bridgeOperators\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\n */\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\n\\n /**\\n * @dev Handles the request once it is approved.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\n\\n /**\\n * @dev Records vote for a receipt and a operator.\\n *\\n * Requirements:\\n * - The method caller is the bridge contract.\\n *\\n */\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\n}\\n\",\"keccak256\":\"0x092841025351341cf7ff9cbf0eb6ef78752ffd2b1af329cb6048996d20c789a9\",\"license\":\"MIT\"},\"contracts/interfaces/bridge/events/IBridgeManagerEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBridgeManagerEvents {\\n /**\\n * @dev The structure representing information about a bridge operator.\\n * @param addr The address of the bridge operator.\\n * @param voteWeight The vote weight assigned to the bridge operator.\\n */\\n struct BridgeOperatorInfo {\\n address addr;\\n uint96 voteWeight;\\n }\\n\\n /**\\n * @dev Emitted when new bridge operators are added.\\n * @param statuses The array of boolean values represents whether the corresponding bridge operator is added successfully.\\n * @param voteWeights The array of vote weights assigned to the added bridge operators.\\n * @param governors The array of addresses representing the governors associated with the added bridge operators.\\n * @param bridgeOperators The array of addresses representing the added bridge operators.\\n */\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when bridge operators are removed.\\n * @param statuses The array of boolean values representing the statuses of the removed bridge operators.\\n * @param bridgeOperators The array of addresses representing the removed bridge operators.\\n */\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\n\\n /**\\n * @dev Emitted when a bridge operator is updated.\\n * @param governor The address of the governor initiating the update.\\n * @param fromBridgeOperator The address of the bridge operator being updated.\\n * @param toBridgeOperator The updated address of the bridge operator.\\n */\\n event BridgeOperatorUpdated(\\n address indexed governor,\\n address indexed fromBridgeOperator,\\n address indexed toBridgeOperator\\n );\\n}\\n\",\"keccak256\":\"0x217fff41c4a9ca72d142c5a2120bb1b5e67bf5bf5aa0f6128450116aebc07b8d\",\"license\":\"MIT\"},\"contracts/interfaces/collections/IHasContracts.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport { ContractType } from \\\"../../utils/ContractType.sol\\\";\\n\\ninterface IHasContracts {\\n /// @dev Error of invalid role.\\n error ErrContractTypeNotFound(ContractType contractType);\\n\\n /// @dev Emitted when a contract is updated.\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\n\\n /**\\n * @dev Returns the address of a contract with a specific role.\\n * Throws an error if no contract is set for the specified role.\\n *\\n * @param contractType The role of the contract to retrieve.\\n * @return contract_ The address of the contract with the specified role.\\n */\\n function getContract(ContractType contractType) external view returns (address contract_);\\n\\n /**\\n * @dev Sets the address of a contract with a specific role.\\n * Emits the event {ContractUpdated}.\\n * @param contractType The role of the contract to set.\\n * @param addr The address of the contract to set.\\n */\\n function setContract(ContractType contractType, address addr) external;\\n}\\n\",\"keccak256\":\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/MappedTokenConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../libraries/Token.sol\\\";\\n\\ninterface MappedTokenConsumer {\\n struct MappedToken {\\n Token.Standard erc;\\n address tokenAddr;\\n }\\n}\\n\",\"keccak256\":\"0xfa220e968221af9b789e6c1dc4133631e90600c4a2bd63b7f01e96cb01f13e9b\",\"license\":\"MIT\"},\"contracts/interfaces/consumers/VoteStatusConsumer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface VoteStatusConsumer {\\n enum VoteStatus {\\n Pending,\\n Approved,\\n Executed,\\n Rejected,\\n Expired\\n }\\n}\\n\",\"keccak256\":\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ICandidateManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ICandidateManager {\\n struct ValidatorCandidate {\\n // Admin of the candidate\\n address admin;\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\n address consensusAddr;\\n // Address that receives mining reward of the validator\\n address payable treasuryAddr;\\n // Address of the bridge operator corresponding to the candidate\\n address ______deprecatedbridgeOperatorAddr;\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\n // Values in range [0; 100_00] stands for 0-100%\\n uint256 commissionRate;\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\n uint256 revokingTimestamp;\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\n uint256 topupDeadline;\\n }\\n\\n struct CommissionSchedule {\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\n uint256 effectiveTimestamp;\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\n uint256 commissionRate;\\n }\\n\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\n /// @dev Emitted when the validator candidate is granted.\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\n /// @dev Emitted when the validator candidate is revoked.\\n event CandidatesRevoked(address[] consensusAddrs);\\n\\n /// @dev Emitted when a schedule for updating commission rate is set.\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\n /// @dev Emitted when the commission rate of a validator is updated.\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\n\\n /// @dev Error of exceeding maximum number of candidates.\\n error ErrExceedsMaxNumberOfCandidate();\\n /// @dev Error of querying for already existent candidate.\\n error ErrExistentCandidate();\\n /// @dev Error of querying for non-existent candidate.\\n error ErrNonExistentCandidate();\\n /// @dev Error of candidate admin already exists.\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\n /// @dev Error of treasury already exists.\\n error ErrExistentTreasury(address _treasuryAddr);\\n /// @dev Error of invalid commission rate.\\n error ErrInvalidCommissionRate();\\n /// @dev Error of invalid effective days onwards.\\n error ErrInvalidEffectiveDaysOnwards();\\n /// @dev Error of invalid min effective days onwards.\\n error ErrInvalidMinEffectiveDaysOnwards();\\n /// @dev Error of already requested revoking candidate before.\\n error ErrAlreadyRequestedRevokingCandidate();\\n /// @dev Error of commission change schedule exists.\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\n /// @dev Error of trusted org cannot renounce.\\n error ErrTrustedOrgCannotRenounce();\\n\\n /**\\n * @dev Returns the maximum number of validator candidate.\\n */\\n function maxValidatorCandidate() external view returns (uint256);\\n\\n /**\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\n */\\n function minEffectiveDaysOnward() external view returns (uint256);\\n\\n /**\\n * @dev Sets the maximum number of validator candidate.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MaxValidatorCandidateUpdated` event.\\n *\\n */\\n function setMaxValidatorCandidate(uint256) external;\\n\\n /**\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\n *\\n */\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\n\\n /**\\n * @dev Grants a validator candidate.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateGranted`.\\n *\\n */\\n function execApplyValidatorCandidate(\\n address _admin,\\n address _consensusAddr,\\n address payable _treasuryAddr,\\n uint256 _commissionRate\\n ) external;\\n\\n /**\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\n *\\n */\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\n\\n /**\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\n *\\n * Requirements:\\n * - The method caller is the staking contract.\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\n * - The `_rate` must be in range of [0_00; 100_00].\\n *\\n * Emits the event `CommissionRateUpdateScheduled`.\\n *\\n */\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\n\\n /**\\n * @dev Returns whether the address is a validator (candidate).\\n */\\n function isValidatorCandidate(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns the validator candidate.\\n */\\n function getValidatorCandidates() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns all candidate info.\\n */\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\n\\n /**\\n * @dev Returns the info of a candidate.\\n */\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\n\\n /**\\n * @dev Returns whether the address is the candidate admin.\\n */\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\n\\n /**\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\n */\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\n}\\n\",\"keccak256\":\"0x97dae7e2ed43c21c48200581501bfa065c7836299306ba2e7f39896c3a22ef2d\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ICoinbaseExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ISlashingExecution.sol\\\";\\n\\ninterface ICoinbaseExecution is ISlashingExecution {\\n enum BlockRewardDeprecatedType {\\n UNKNOWN,\\n UNAVAILABILITY,\\n AFTER_BAILOUT\\n }\\n\\n /// @dev Emitted when the validator set is updated\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\n /// @dev Emitted when the bridge operator set is updated.\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\n\\n /// @dev Emitted when the reward of the block producer is deprecated.\\n event BlockRewardDeprecated(\\n address indexed coinbaseAddr,\\n uint256 rewardAmount,\\n BlockRewardDeprecatedType deprecatedType\\n );\\n /// @dev Emitted when the block reward is submitted.\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\n\\n /// @dev Emitted when the block producer reward is distributed.\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\n event MiningRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the bridge operator reward is distributed.\\n event BridgeOperatorRewardDistributed(\\n address indexed consensusAddr,\\n address indexed bridgeOperator,\\n address indexed recipientAddr,\\n uint256 amount\\n );\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\n event BridgeOperatorRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed bridgeOperator,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the fast finality reward is distributed.\\n event FastFinalityRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\n /// @dev Emitted when the contract fails when distributing the fast finality reward.\\n event FastFinalityRewardDistributionFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 amount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\n event StakingRewardDistributionFailed(\\n uint256 totalAmount,\\n address[] consensusAddrs,\\n uint256[] amounts,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the epoch is wrapped up.\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\n\\n /// @dev Error of only allowed at the end of epoch\\n error ErrAtEndOfEpochOnly();\\n /// @dev Error of query for already wrapped up epoch\\n error ErrAlreadyWrappedEpoch();\\n\\n /**\\n * @dev Submits reward of the current block.\\n *\\n * Requirements:\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\n *\\n */\\n function submitBlockReward() external payable;\\n\\n /**\\n * @dev Wraps up the current epoch.\\n *\\n * Requirements:\\n * - The method must be called when the current epoch is ending.\\n * - The epoch is not wrapped yet.\\n * - The method caller is coinbase.\\n *\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\n * Emits the event `WrappedUpEpoch`.\\n *\\n */\\n function wrapUpEpoch() external payable;\\n}\\n\",\"keccak256\":\"0x22f546add63b1b6e62929bdd4052fa032af55ebf50981dc22d208fe53ad1b0a3\",\"license\":\"MIT\"},\"contracts/interfaces/validator/IEmergencyExit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IEmergencyExit {\\n /// @dev Emitted when the fund is locked from an emergency exit request\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\n event EmergencyExitLockedFundReleased(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 unlockedAmount\\n );\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\n event EmergencyExitLockedFundReleasingFailed(\\n address indexed consensusAddr,\\n address indexed recipient,\\n uint256 unlockedAmount,\\n uint256 contractBalance\\n );\\n\\n /// @dev Emitted when the emergency exit locked amount is updated.\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\n /// @dev Emitted when the emergency expiry duration is updated.\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\n\\n /// @dev Error of already requested emergency exit before.\\n error ErrAlreadyRequestedEmergencyExit();\\n\\n /**\\n * @dev Returns the amount of RON to lock from a consensus address.\\n */\\n function emergencyExitLockedAmount() external returns (uint256);\\n\\n /**\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\n */\\n function emergencyExpiryDuration() external returns (uint256);\\n\\n /**\\n * @dev Sets the amount of RON to lock from a consensus address.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\n *\\n */\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\n\\n /**\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\n *\\n */\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\n\\n /**\\n * @dev Unlocks fund for emergency exit request.\\n *\\n * Requirements:\\n * - The method caller is admin.\\n *\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\n *\\n */\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\n\\n /**\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\n *\\n * Requirements:\\n * - The method caller is staking contract.\\n *\\n */\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\n}\\n\",\"keccak256\":\"0x45161abd1e3db83052a06889a0e3a7a5e7ee3306478601d58ac4ed32ccaa75ad\",\"license\":\"MIT\"},\"contracts/interfaces/validator/IRoninValidatorSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./ICandidateManager.sol\\\";\\nimport \\\"./info-fragments/ICommonInfo.sol\\\";\\nimport \\\"./ICoinbaseExecution.sol\\\";\\nimport \\\"./ISlashingExecution.sol\\\";\\nimport \\\"./IEmergencyExit.sol\\\";\\n\\ninterface IRoninValidatorSet is\\n ICandidateManager,\\n ICommonInfo,\\n ISlashingExecution,\\n ICoinbaseExecution,\\n IEmergencyExit\\n{}\\n\",\"keccak256\":\"0x813f34747aea4dfb53bbc147abf8dbe5999ce73111c2db99bcb3efb4cf75bb3d\",\"license\":\"MIT\"},\"contracts/interfaces/validator/ISlashingExecution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ISlashingExecution {\\n /// @dev Emitted when the validator is punished.\\n event ValidatorPunished(\\n address indexed consensusAddr,\\n uint256 indexed period,\\n uint256 jailedUntil,\\n uint256 deductedStakingAmount,\\n bool blockProducerRewardDeprecated,\\n bool bridgeOperatorRewardDeprecated\\n );\\n /// @dev Emitted when the validator get out of jail by bailout.\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\n\\n /// @dev Error of cannot bailout due to high tier slash.\\n error ErrCannotBailout(address validator);\\n\\n /**\\n * @dev Finalize the slash request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorPunished`.\\n *\\n */\\n function execSlash(address validatorAddr, uint256 newJailedUntil, uint256 slashAmount, bool cannotBailout) external;\\n\\n /**\\n * @dev Finalize the bailout request from slash indicator contract.\\n *\\n * Requirements:\\n * - The method caller is slash indicator contract.\\n *\\n * Emits the event `ValidatorUnjailed`.\\n *\\n */\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\n}\\n\",\"keccak256\":\"0xac0b772f2fca9dafd7cc6742f91b442f9f545bf9472185b8d817fe045b680193\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/ICommonInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"./IJailingInfo.sol\\\";\\nimport \\\"./ITimingInfo.sol\\\";\\nimport \\\"./IValidatorInfoV2.sol\\\";\\n\\ninterface ICommonInfo is ITimingInfo, IJailingInfo, IValidatorInfoV2 {\\n struct EmergencyExitInfo {\\n uint256 lockedAmount;\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\n uint256 recyclingAt;\\n }\\n\\n /// @dev Emitted when the deprecated reward is withdrawn.\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\n\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\n error ErrUnauthorizedReceiveRON();\\n /// @dev Error thrown when queries for a non existent info.\\n error NonExistentRecyclingInfo();\\n\\n /**\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\n */\\n function totalDeprecatedReward() external view returns (uint256);\\n\\n /**\\n * @dev Returns the emergency exit request.\\n */\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\n}\\n\",\"keccak256\":\"0x3fdfa86da33b889e5153075ffc028d6b0c607480a96b532fbbbc48ac7bbf27c9\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/IJailingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface IJailingInfo {\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkJailed(address) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeft(\\n address _addr\\n ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\n */\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\n */\\n function getJailedTimeLeftAtBlock(\\n address _addr,\\n uint256 _blockNum\\n ) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\n\\n /**\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\n */\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\n */\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\n\\n /**\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\n */\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2b1846b05ca1d636299fb929c1bd7b392b236f5e3f7aa3e7eea2c6d57b8836fb\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/ITimingInfo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\ninterface ITimingInfo {\\n /**\\n * @dev Returns the block that validator set was updated.\\n */\\n function getLastUpdatedBlock() external view returns (uint256);\\n\\n /**\\n * @dev Returns the number of blocks in a epoch.\\n */\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\n\\n /**\\n * @dev Returns the epoch index from the block number.\\n */\\n function epochOf(uint256 _block) external view returns (uint256);\\n\\n /**\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\n */\\n function epochEndingAt(uint256 _block) external view returns (bool);\\n\\n /**\\n * @dev Tries to get the period index from the epoch number.\\n */\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\n\\n /**\\n * @dev Returns whether the period ending at the current block number.\\n */\\n function isPeriodEnding() external view returns (bool);\\n\\n /**\\n * @dev Returns the period index from the current block.\\n */\\n function currentPeriod() external view returns (uint256);\\n\\n /**\\n * @dev Returns the block number that the current period starts at.\\n */\\n function currentPeriodStartAtBlock() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\",\"license\":\"MIT\"},\"contracts/interfaces/validator/info-fragments/IValidatorInfoV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.9;\\n\\nimport \\\"../../../libraries/EnumFlags.sol\\\";\\n\\ninterface IValidatorInfoV2 {\\n /**\\n * @dev Error thrown when an invalid maximum prioritized validator number is provided.\\n */\\n error ErrInvalidMaxPrioritizedValidatorNumber();\\n\\n /// @dev Emitted when the number of max validator is updated.\\n event MaxValidatorNumberUpdated(uint256);\\n /// @dev Emitted when the number of reserved slots for prioritized validators is updated.\\n event MaxPrioritizedValidatorNumberUpdated(uint256);\\n\\n /**\\n * @dev Returns the maximum number of validators in the epoch.\\n */\\n function maxValidatorNumber() external view returns (uint256 _maximumValidatorNumber);\\n\\n /**\\n * @dev Returns the number of reserved slots for prioritized validators.\\n */\\n function maxPrioritizedValidatorNumber() external view returns (uint256 _maximumPrioritizedValidatorNumber);\\n\\n /**\\n * @dev Returns the current validator list.\\n */\\n function getValidators() external view returns (address[] memory _validatorList);\\n\\n /**\\n * @dev Returns the current block producer list.\\n */\\n function getBlockProducers() external view returns (address[] memory);\\n\\n /**\\n * @dev Returns whether the address is block producer or not.\\n */\\n function isBlockProducer(address _addr) external view returns (bool);\\n\\n /**\\n * @dev Returns total numbers of the block producers.\\n */\\n function totalBlockProducer() external view returns (uint256);\\n\\n /**\\n * @dev Updates the max validator number\\n *\\n * Requirements:\\n * - The method caller is admin\\n *\\n * Emits the event `MaxValidatorNumberUpdated`\\n *\\n */\\n function setMaxValidatorNumber(uint256 _maxValidatorNumber) external;\\n\\n /**\\n * @dev Updates the number of reserved slots for prioritized validators\\n *\\n * Requirements:\\n * - The method caller is admin\\n *\\n * Emits the event `MaxPrioritizedValidatorNumberUpdated`\\n *\\n */\\n function setMaxPrioritizedValidatorNumber(uint256 _maxPrioritizedValidatorNumber) external;\\n}\\n\",\"keccak256\":\"0x6823181ac93ea3320e6ebfb456624afda59ac2acb480de5c774783983c8f4749\",\"license\":\"MIT\"},\"contracts/libraries/AddressArrayUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressArrayUtils {\\n /**\\n * @dev Error thrown when a duplicated element is detected in an array.\\n * @param msgSig The function signature that invoke the error.\\n */\\n error ErrDuplicated(bytes4 msgSig);\\n\\n /**\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\n * @param A Array to search\\n * @return Returns true if duplicate, false otherwise\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n if (A.length == 0) {\\n return false;\\n }\\n unchecked {\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (A[i] == A[j]) {\\n return true;\\n }\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @dev Returns whether two arrays of addresses are equal or not.\\n */\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\n // Hashing two arrays and compare their hash\\n assembly {\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\n yes_ := eq(_thisHash, _otherHash)\\n }\\n }\\n\\n /**\\n * @dev Return the concatenated array from a and b.\\n */\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\n uint256 lengthA = a.length;\\n uint256 lengthB = b.length;\\n unchecked {\\n c = new address[](lengthA + lengthB);\\n }\\n uint256 i;\\n for (; i < lengthA; ) {\\n c[i] = a[i];\\n unchecked {\\n ++i;\\n }\\n }\\n for (uint256 j; j < lengthB; ) {\\n c[i] = b[j];\\n unchecked {\\n ++i;\\n ++j;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf760162653a85d6e1b24df4d33c74076f778470112f421a02050fb981242001\",\"license\":\"UNLICENSED\"},\"contracts/libraries/EnumFlags.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This library implements checking flag of an enumerated value.\\n * The originated idea is inherited from [Enum.HashFlag(Enum)](https://learn.microsoft.com/en-us/dotnet/api/system.enum.hasflag?view=net-6.0) method of C#.\\n */\\nlibrary EnumFlags {\\n enum ValidatorFlag {\\n None, // bit(00)\\n BlockProducer, // bit(01)\\n DeprecatedBridgeOperator, // bit(10)\\n Both // bit(11)\\n }\\n\\n function isNone(ValidatorFlag _value) internal pure returns (bool) {\\n return uint8(_value) == 0;\\n }\\n\\n /**\\n * @dev Checks if `_value` has `_flag`.\\n */\\n function hasFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (bool) {\\n return (uint8(_value) & uint8(_flag)) != 0;\\n }\\n\\n /**\\n * @dev Calculate new value of `_value` after adding `_flag`.\\n */\\n function addFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\\n return ValidatorFlag(uint8(_value) | uint8(_flag));\\n }\\n\\n /**\\n * @dev Calculate new value of `_value` after remove `_flag`.\\n */\\n function removeFlag(ValidatorFlag _value, ValidatorFlag _flag) internal pure returns (ValidatorFlag) {\\n return ValidatorFlag(uint8(_value) & ~uint8(_flag));\\n }\\n}\\n\",\"keccak256\":\"0xa712f0d1a323ee39f23eb3ee3278b4ec25fe2e536b1ccc629578c66f277c088d\",\"license\":\"UNLICENSED\"},\"contracts/libraries/IsolatedGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"../interfaces/consumers/VoteStatusConsumer.sol\\\";\\nimport \\\"../utils/CommonErrors.sol\\\";\\n\\nlibrary IsolatedGovernance {\\n struct Vote {\\n VoteStatusConsumer.VoteStatus status;\\n bytes32 finalHash;\\n /// @dev Mapping from voter => receipt hash\\n mapping(address => bytes32) voteHashOf;\\n /// @dev The timestamp that voting is expired (no expiration=0)\\n uint256 expiredAt;\\n /// @dev The timestamp that voting is created\\n uint256 createdAt;\\n /// @dev The list of voters\\n address[] voters;\\n }\\n\\n /**\\n * @dev Casts vote for the receipt with the receipt hash `_hash`.\\n *\\n * Requirements:\\n * - The voter has not voted for the round.\\n *\\n */\\n function castVote(Vote storage _v, address _voter, bytes32 _hash) internal {\\n if (_v.expiredAt > 0 && _v.expiredAt <= block.timestamp) {\\n _v.status = VoteStatusConsumer.VoteStatus.Expired;\\n }\\n\\n if (voted(_v, _voter)) revert ErrAlreadyVoted(_voter);\\n\\n _v.voteHashOf[_voter] = _hash;\\n _v.voters.push(_voter);\\n }\\n\\n /**\\n * @dev Updates vote with the requirement of minimum vote weight.\\n */\\n function syncVoteStatus(\\n Vote storage _v,\\n uint256 _minimumVoteWeight,\\n uint256 _votedWeightForHash,\\n bytes32 _hash\\n ) internal returns (VoteStatusConsumer.VoteStatus _status) {\\n if (_votedWeightForHash >= _minimumVoteWeight && _v.status == VoteStatusConsumer.VoteStatus.Pending) {\\n _v.status = VoteStatusConsumer.VoteStatus.Approved;\\n _v.finalHash = _hash;\\n }\\n\\n return _v.status;\\n }\\n\\n /**\\n * @dev Returns the list of vote's addresses that voted for the hash `_hash`.\\n */\\n function filterByHash(Vote storage _v, bytes32 _hash) internal view returns (address[] memory _voters) {\\n uint256 _count;\\n _voters = new address[](_v.voters.length);\\n\\n unchecked {\\n for (uint _i; _i < _voters.length; ++_i) {\\n address _voter = _v.voters[_i];\\n if (_v.voteHashOf[_voter] == _hash) {\\n _voters[_count++] = _voter;\\n }\\n }\\n }\\n\\n assembly {\\n mstore(_voters, _count)\\n }\\n }\\n\\n /**\\n * @dev Returns whether the voter casted for the proposal.\\n */\\n function voted(Vote storage _v, address _voter) internal view returns (bool) {\\n return _v.voteHashOf[_voter] != bytes32(0);\\n }\\n}\\n\",\"keccak256\":\"0xa6a1e04b914580c099ac87f65ec24c35445eee34809e3decf1c57b6c52942d36\",\"license\":\"MIT\"},\"contracts/libraries/Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"../interfaces/IWETH.sol\\\";\\n\\nlibrary Token {\\n /// @dev Error indicating that the provided information is invalid.\\n error ErrInvalidInfo();\\n\\n /// @dev Error indicating that the minting of ERC20 tokens has failed.\\n error ErrERC20MintingFailed();\\n\\n /// @dev Error indicating that the minting of ERC721 tokens has failed.\\n error ErrERC721MintingFailed();\\n\\n /// @dev Error indicating that an unsupported standard is encountered.\\n error ErrUnsupportedStandard();\\n\\n /**\\n * @dev Error indicating that the `transfer` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\n error ErrTokenCouldNotTransfer(Info tokenInfo, address to, address token);\\n\\n /**\\n * @dev Error indicating that the `transferFrom` has failed.\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\n * @param from Owner of the token value.\\n * @param to Receiver of the token value.\\n * @param token Address of the token.\\n */\\n error ErrTokenCouldNotTransferFrom(Info tokenInfo, address from, address to, address token);\\n\\n enum Standard {\\n ERC20,\\n ERC721\\n }\\n\\n struct Info {\\n Standard erc;\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\n // For ERC721: the quantity must be 0.\\n uint256 id;\\n uint256 quantity;\\n }\\n\\n // keccak256(\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\");\\n bytes32 public constant INFO_TYPE_HASH = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Info memory _info) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(INFO_TYPE_HASH, _info.erc, _info.id, _info.quantity))\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, INFO_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_info)) // _info.erc\\n mstore(add(ptr, 0x40), mload(add(_info, 0x20))) // _info.id\\n mstore(add(ptr, 0x60), mload(add(_info, 0x40))) // _info.quantity\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n\\n /**\\n * @dev Validates the token info.\\n */\\n function validate(Info memory _info) internal pure {\\n if (\\n !((_info.erc == Standard.ERC20 && _info.quantity > 0 && _info.id == 0) ||\\n (_info.erc == Standard.ERC721 && _info.quantity == 0))\\n ) revert ErrInvalidInfo();\\n }\\n\\n /**\\n * @dev Transfer asset from.\\n *\\n * Requirements:\\n * - The `_from` address must approve for the contract using this library.\\n *\\n */\\n function transferFrom(Info memory _info, address _from, address _to, address _token) internal {\\n bool _success;\\n bytes memory _data;\\n if (_info.erc == Standard.ERC20) {\\n (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, _from, _to, _info.quantity));\\n _success = _success && (_data.length == 0 || abi.decode(_data, (bool)));\\n } else if (_info.erc == Standard.ERC721) {\\n // bytes4(keccak256(\\\"transferFrom(address,address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x23b872dd, _from, _to, _info.id));\\n } else revert ErrUnsupportedStandard();\\n\\n if (!_success) revert ErrTokenCouldNotTransferFrom(_info, _from, _to, _token);\\n }\\n\\n /**\\n * @dev Transfers ERC721 token and returns the result.\\n */\\n function tryTransferERC721(address _token, address _to, uint256 _id) internal returns (bool _success) {\\n (_success, ) = _token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, address(this), _to, _id));\\n }\\n\\n /**\\n * @dev Transfers ERC20 token and returns the result.\\n */\\n function tryTransferERC20(address _token, address _to, uint256 _quantity) internal returns (bool _success) {\\n bytes memory _data;\\n (_success, _data) = _token.call(abi.encodeWithSelector(IERC20.transfer.selector, _to, _quantity));\\n _success = _success && (_data.length == 0 || abi.decode(_data, (bool)));\\n }\\n\\n /**\\n * @dev Transfer assets from current address to `_to` address.\\n */\\n function transfer(Info memory _info, address _to, address _token) internal {\\n bool _success;\\n if (_info.erc == Standard.ERC20) {\\n _success = tryTransferERC20(_token, _to, _info.quantity);\\n } else if (_info.erc == Standard.ERC721) {\\n _success = tryTransferERC721(_token, _to, _info.id);\\n } else revert ErrUnsupportedStandard();\\n\\n if (!_success) revert ErrTokenCouldNotTransfer(_info, _to, _token);\\n }\\n\\n /**\\n * @dev Tries minting and transfering assets.\\n *\\n * @notice Prioritizes transfer native token if the token is wrapped.\\n *\\n */\\n function handleAssetTransfer(\\n Info memory _info,\\n address payable _to,\\n address _token,\\n IWETH _wrappedNativeToken\\n ) internal {\\n bool _success;\\n if (_token == address(_wrappedNativeToken)) {\\n // Try sending the native token before transferring the wrapped token\\n if (!_to.send(_info.quantity)) {\\n _wrappedNativeToken.deposit{ value: _info.quantity }();\\n transfer(_info, _to, _token);\\n }\\n } else if (_info.erc == Token.Standard.ERC20) {\\n uint256 _balance = IERC20(_token).balanceOf(address(this));\\n\\n if (_balance < _info.quantity) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, address(this), _info.quantity - _balance));\\n if (!_success) revert ErrERC20MintingFailed();\\n }\\n\\n transfer(_info, _to, _token);\\n } else if (_info.erc == Token.Standard.ERC721) {\\n if (!tryTransferERC721(_token, _to, _info.id)) {\\n // bytes4(keccak256(\\\"mint(address,uint256)\\\"))\\n (_success, ) = _token.call(abi.encodeWithSelector(0x40c10f19, _to, _info.id));\\n if (!_success) revert ErrERC721MintingFailed();\\n }\\n } else revert ErrUnsupportedStandard();\\n }\\n\\n struct Owner {\\n address addr;\\n address tokenAddr;\\n uint256 chainId;\\n }\\n\\n // keccak256(\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\n\\n /**\\n * @dev Returns ownership struct hash.\\n */\\n function hash(Owner memory _owner) internal pure returns (bytes32 digest) {\\n // keccak256(abi.encode(OWNER_TYPE_HASH, _owner.addr, _owner.tokenAddr, _owner.chainId))\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, OWNER_TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_owner)) // _owner.addr\\n mstore(add(ptr, 0x40), mload(add(_owner, 0x20))) // _owner.tokenAddr\\n mstore(add(ptr, 0x60), mload(add(_owner, 0x40))) // _owner.chainId\\n digest := keccak256(ptr, 0x80)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8d11e48d878ba37ea2ca7395dceaa5591bb9ba2d4e5fdac1565760456e104991\",\"license\":\"MIT\"},\"contracts/libraries/Transfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./Token.sol\\\";\\n\\nlibrary Transfer {\\n using ECDSA for bytes32;\\n\\n enum Kind {\\n Deposit,\\n Withdrawal\\n }\\n\\n struct Request {\\n // For deposit request: Recipient address on Ronin network\\n // For withdrawal request: Recipient address on mainchain network\\n address recipientAddr;\\n // Token address to deposit/withdraw\\n // Value 0: native token\\n address tokenAddr;\\n Token.Info info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the deposit receipt.\\n */\\n function into_deposit_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _roninTokenAddr,\\n uint256 _roninChainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Deposit;\\n _receipt.mainchain.addr = _requester;\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\n _receipt.mainchain.chainId = block.chainid;\\n _receipt.ronin.addr = _request.recipientAddr;\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\n _receipt.ronin.chainId = _roninChainId;\\n _receipt.info = _request.info;\\n }\\n\\n /**\\n * @dev Converts the transfer request into the withdrawal receipt.\\n */\\n function into_withdrawal_receipt(\\n Request memory _request,\\n address _requester,\\n uint256 _id,\\n address _mainchainTokenAddr,\\n uint256 _mainchainId\\n ) internal view returns (Receipt memory _receipt) {\\n _receipt.id = _id;\\n _receipt.kind = Kind.Withdrawal;\\n _receipt.ronin.addr = _requester;\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\n _receipt.ronin.chainId = block.chainid;\\n _receipt.mainchain.addr = _request.recipientAddr;\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\n _receipt.mainchain.chainId = _mainchainId;\\n _receipt.info = _request.info;\\n }\\n\\n struct Receipt {\\n uint256 id;\\n Kind kind;\\n Token.Owner mainchain;\\n Token.Owner ronin;\\n Token.Info info;\\n }\\n\\n // keccak256(\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\");\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\n\\n /**\\n * @dev Returns token info struct hash.\\n */\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\n bytes32 hashedReceiptMainchain = Token.hash(_receipt.mainchain);\\n bytes32 hashedReceiptRonin = Token.hash(_receipt.ronin);\\n bytes32 hashedReceiptInfo = Token.hash(_receipt.info);\\n\\n /*\\n * return\\n * keccak256(\\n * abi.encode(\\n * TYPE_HASH,\\n * _receipt.id,\\n * _receipt.kind,\\n * Token.hash(_receipt.mainchain),\\n * Token.hash(_receipt.ronin),\\n * Token.hash(_receipt.info)\\n * )\\n * );\\n */\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, TYPE_HASH)\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\n digest := keccak256(ptr, 0xc0)\\n }\\n }\\n\\n /**\\n * @dev Returns the receipt digest.\\n */\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\n }\\n}\\n\",\"keccak256\":\"0xe73e11942bcae9034abc2058e9976a583e3518bdfeefa863e97cb6e51edf4522\",\"license\":\"MIT\"},\"contracts/ronin/gateway/RoninGatewayV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\";\\nimport \\\"../../extensions/GatewayV3.sol\\\";\\nimport \\\"../../extensions/collections/HasContracts.sol\\\";\\nimport \\\"../../extensions/MinimumWithdrawal.sol\\\";\\nimport \\\"../../interfaces/IERC20Mintable.sol\\\";\\nimport \\\"../../interfaces/IERC721Mintable.sol\\\";\\nimport \\\"../../interfaces/bridge/IBridgeTracking.sol\\\";\\nimport \\\"../../interfaces/IRoninGatewayV3.sol\\\";\\nimport \\\"../../interfaces/IRoninTrustedOrganization.sol\\\";\\nimport \\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\";\\nimport \\\"../../interfaces/validator/IRoninValidatorSet.sol\\\";\\nimport \\\"../../libraries/IsolatedGovernance.sol\\\";\\nimport \\\"../../interfaces/bridge/IBridgeManager.sol\\\";\\n\\ncontract RoninGatewayV3 is\\n GatewayV3,\\n Initializable,\\n MinimumWithdrawal,\\n AccessControlEnumerable,\\n VoteStatusConsumer,\\n IRoninGatewayV3,\\n HasContracts\\n{\\n using Token for Token.Info;\\n using Transfer for Transfer.Request;\\n using Transfer for Transfer.Receipt;\\n using IsolatedGovernance for IsolatedGovernance.Vote;\\n\\n /// @custom:deprecated Previously `withdrawalMigrated` (non-zero value)\\n bool private ___deprecated4;\\n /// @dev Total withdrawal\\n uint256 public withdrawalCount;\\n /// @dev Mapping from chain id => deposit id => deposit vote\\n mapping(uint256 => mapping(uint256 => IsolatedGovernance.Vote)) public depositVote;\\n /// @dev Mapping from withdrawal id => mainchain withdrew vote\\n mapping(uint256 => IsolatedGovernance.Vote) public mainchainWithdrewVote;\\n /// @dev Mapping from withdrawal id => withdrawal receipt\\n mapping(uint256 => Transfer.Receipt) public withdrawal;\\n /// @dev Mapping from withdrawal id => validator address => signatures\\n mapping(uint256 => mapping(address => bytes)) internal _withdrawalSig;\\n /// @dev Mapping from token address => chain id => mainchain token address\\n mapping(address => mapping(uint256 => MappedToken)) internal _mainchainToken;\\n\\n /// @custom:deprecated Previously `_validatorContract` (non-zero value)\\n address private ____deprecated0;\\n /// @custom:deprecated Previously `_bridgeTrackingContract` (non-zero value)\\n address private ____deprecated1;\\n\\n /// @dev Mapping from withdrawal id => vote for recording withdrawal stats\\n mapping(uint256 => IsolatedGovernance.Vote) public withdrawalStatVote;\\n\\n /// @custom:deprecated Previously `_trustedOrgContract` (non-zero value)\\n address private ____deprecated2;\\n\\n uint256 internal _trustedNum;\\n uint256 internal _trustedDenom;\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n receive() external payable {\\n _fallback();\\n }\\n\\n modifier onlyBridgeOperator() {\\n _requireBridgeOperator();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the method caller is not bridge operator.\\n */\\n function _requireBridgeOperator() internal view {\\n if (!IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).isBridgeOperator(msg.sender))\\n revert ErrUnauthorized(msg.sig, RoleAccess.__DEPRECATED_BRIDGE_OPERATOR);\\n }\\n\\n /**\\n * @dev Initializes contract storage.\\n */\\n function initialize(\\n address _roleSetter,\\n uint256 _numerator,\\n uint256 _denominator,\\n uint256 _trustedNumerator,\\n uint256 _trustedDenominator,\\n address[] calldata /* _withdrawalMigrators */,\\n // _packedAddresses[0]: roninTokens\\n // _packedAddresses[1]: mainchainTokens\\n address[][2] calldata _packedAddresses,\\n // _packedNumbers[0]: chainIds\\n // _packedNumbers[1]: minimumThresholds\\n uint256[][2] calldata _packedNumbers,\\n Token.Standard[] calldata _standards\\n ) external virtual initializer {\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\n _setThreshold(_numerator, _denominator);\\n _setTrustedThreshold(_trustedNumerator, _trustedDenominator);\\n if (_packedAddresses[0].length > 0) {\\n _mapTokens(_packedAddresses[0], _packedAddresses[1], _packedNumbers[0], _standards);\\n _setMinimumThresholds(_packedAddresses[0], _packedNumbers[1]);\\n }\\n }\\n\\n function initializeV2() external reinitializer(2) {\\n _setContract(ContractType.VALIDATOR, ____deprecated0);\\n _setContract(ContractType.BRIDGE_TRACKING, ____deprecated1);\\n _setContract(ContractType.RONIN_TRUSTED_ORGANIZATION, ____deprecated2);\\n delete ____deprecated0;\\n delete ____deprecated1;\\n delete ____deprecated2;\\n }\\n\\n function initializeV3(address bridgeAdmin) external reinitializer(3) {\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeAdmin);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function getWithdrawalSignatures(\\n uint256 withdrawalId,\\n address[] calldata operators\\n ) external view returns (bytes[] memory _signatures) {\\n _signatures = new bytes[](operators.length);\\n for (uint256 _i = 0; _i < operators.length; ) {\\n _signatures[_i] = _withdrawalSig[withdrawalId][operators[_i]];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function depositFor(Transfer.Receipt calldata _receipt) external whenNotPaused onlyBridgeOperator {\\n address _sender = msg.sender;\\n _depositFor(_receipt, _sender, minimumVoteWeight());\\n IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)).recordVote(\\n IBridgeTracking.VoteKind.Deposit,\\n _receipt.id,\\n _sender\\n );\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function tryBulkAcknowledgeMainchainWithdrew(\\n uint256[] calldata _withdrawalIds\\n ) external onlyBridgeOperator returns (bool[] memory _executedReceipts) {\\n address _governor = msg.sender;\\n uint256 _minVoteWeight = minimumVoteWeight();\\n\\n uint256 _withdrawalId;\\n _executedReceipts = new bool[](_withdrawalIds.length);\\n IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\n for (uint256 _i; _i < _withdrawalIds.length; ) {\\n _withdrawalId = _withdrawalIds[_i];\\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId, _governor);\\n if (mainchainWithdrew(_withdrawalId)) {\\n _executedReceipts[_i] = true;\\n } else {\\n IsolatedGovernance.Vote storage _vote = mainchainWithdrewVote[_withdrawalId];\\n Transfer.Receipt memory _withdrawal = withdrawal[_withdrawalId];\\n bytes32 _hash = _withdrawal.hash();\\n VoteStatus _status = _castIsolatedVote(_vote, _governor, _minVoteWeight, _hash);\\n if (_status == VoteStatus.Approved) {\\n _vote.status = VoteStatus.Executed;\\n _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, _withdrawalId);\\n emit MainchainWithdrew(_hash, _withdrawal);\\n }\\n }\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function tryBulkDepositFor(\\n Transfer.Receipt[] calldata _receipts\\n ) external whenNotPaused onlyBridgeOperator returns (bool[] memory _executedReceipts) {\\n address _sender = msg.sender;\\n\\n Transfer.Receipt memory _receipt;\\n _executedReceipts = new bool[](_receipts.length);\\n uint256 _minVoteWeight = minimumVoteWeight();\\n IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\n for (uint256 _i; _i < _receipts.length; ) {\\n _receipt = _receipts[_i];\\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, _receipt.id, _sender);\\n if (depositVote[_receipt.mainchain.chainId][_receipt.id].status == VoteStatus.Executed) {\\n _executedReceipts[_i] = true;\\n } else {\\n _depositFor(_receipt, _sender, _minVoteWeight);\\n }\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external whenNotPaused {\\n _requestWithdrawalFor(_request, msg.sender, _chainId);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external whenNotPaused {\\n if (_requests.length == 0) revert ErrEmptyArray();\\n\\n for (uint256 _i; _i < _requests.length; ) {\\n _requestWithdrawalFor(_requests[_i], msg.sender, _chainId);\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function requestWithdrawalSignatures(uint256 _withdrawalId) external whenNotPaused {\\n if (mainchainWithdrew(_withdrawalId)) revert ErrWithdrawnOnMainchainAlready();\\n\\n Transfer.Receipt memory _receipt = withdrawal[_withdrawalId];\\n if (_receipt.ronin.chainId != block.chainid) {\\n revert ErrInvalidChainId(msg.sig, _receipt.ronin.chainId, block.chainid);\\n }\\n\\n emit WithdrawalSignaturesRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function bulkSubmitWithdrawalSignatures(\\n uint256[] calldata withdrawals,\\n bytes[] calldata signatures\\n ) external whenNotPaused onlyBridgeOperator {\\n address operator = msg.sender;\\n\\n if (!(withdrawals.length > 0 && withdrawals.length == signatures.length)) {\\n revert ErrLengthMismatch(msg.sig);\\n }\\n\\n uint256 _minVoteWeight = minimumVoteWeight();\\n\\n uint256 id;\\n IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\n for (uint256 _i; _i < withdrawals.length; ) {\\n id = withdrawals[_i];\\n _withdrawalSig[id][operator] = signatures[_i];\\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Withdrawal, id, operator);\\n\\n IsolatedGovernance.Vote storage _proposal = withdrawalStatVote[id];\\n VoteStatus _status = _castIsolatedVote(_proposal, operator, _minVoteWeight, bytes32(id));\\n if (_status == VoteStatus.Approved) {\\n _proposal.status = VoteStatus.Executed;\\n _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Withdrawal, id);\\n }\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function mapTokens(\\n address[] calldata _roninTokens,\\n address[] calldata _mainchainTokens,\\n uint256[] calldata _chainIds,\\n Token.Standard[] calldata _standards\\n ) external onlyAdmin {\\n if (_roninTokens.length == 0) revert ErrLengthMismatch(msg.sig);\\n _mapTokens(_roninTokens, _mainchainTokens, _chainIds, _standards);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function depositVoted(uint256 _chainId, uint256 _depositId, address _voter) external view returns (bool) {\\n return depositVote[_chainId][_depositId].voted(_voter);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool) {\\n return mainchainWithdrewVote[_withdrawalId].voted(_voter);\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function mainchainWithdrew(uint256 _withdrawalId) public view returns (bool) {\\n return mainchainWithdrewVote[_withdrawalId].status == VoteStatus.Executed;\\n }\\n\\n /**\\n * @inheritdoc IRoninGatewayV3\\n */\\n function getMainchainToken(address _roninToken, uint256 _chainId) public view returns (MappedToken memory _token) {\\n _token = _mainchainToken[_roninToken][_chainId];\\n if (_token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\n }\\n\\n /**\\n * @dev Maps Ronin tokens to mainchain networks.\\n *\\n * Requirement:\\n * - The arrays have the same length.\\n *\\n * Emits the `TokenMapped` event.\\n *\\n */\\n function _mapTokens(\\n address[] calldata _roninTokens,\\n address[] calldata _mainchainTokens,\\n uint256[] calldata _chainIds,\\n Token.Standard[] calldata _standards\\n ) internal {\\n if (!(_roninTokens.length == _mainchainTokens.length && _roninTokens.length == _chainIds.length))\\n revert ErrLengthMismatch(msg.sig);\\n\\n for (uint256 _i; _i < _roninTokens.length; ) {\\n _mainchainToken[_roninTokens[_i]][_chainIds[_i]].tokenAddr = _mainchainTokens[_i];\\n _mainchainToken[_roninTokens[_i]][_chainIds[_i]].erc = _standards[_i];\\n\\n unchecked {\\n ++_i;\\n }\\n }\\n\\n emit TokenMapped(_roninTokens, _mainchainTokens, _chainIds, _standards);\\n }\\n\\n /**\\n * @dev Deposits based on the receipt.\\n *\\n * Emits the `Deposited` once the assets are released.\\n *\\n */\\n function _depositFor(Transfer.Receipt memory receipt, address operator, uint256 minVoteWeight) internal {\\n uint256 id = receipt.id;\\n receipt.info.validate();\\n if (receipt.kind != Transfer.Kind.Deposit) revert ErrInvalidReceiptKind();\\n\\n if (receipt.ronin.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, receipt.ronin.chainId, block.chainid);\\n\\n MappedToken memory _token = getMainchainToken(receipt.ronin.tokenAddr, receipt.mainchain.chainId);\\n\\n if (!(_token.erc == receipt.info.erc && _token.tokenAddr == receipt.mainchain.tokenAddr))\\n revert ErrInvalidReceipt();\\n\\n IsolatedGovernance.Vote storage _proposal = depositVote[receipt.mainchain.chainId][id];\\n bytes32 _receiptHash = receipt.hash();\\n VoteStatus _status = _castIsolatedVote(_proposal, operator, minVoteWeight, _receiptHash);\\n emit DepositVoted(operator, id, receipt.mainchain.chainId, _receiptHash);\\n if (_status == VoteStatus.Approved) {\\n _proposal.status = VoteStatus.Executed;\\n receipt.info.handleAssetTransfer(payable(receipt.ronin.addr), receipt.ronin.tokenAddr, IWETH(address(0)));\\n IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING)).handleVoteApproved(\\n IBridgeTracking.VoteKind.Deposit,\\n receipt.id\\n );\\n emit Deposited(_receiptHash, receipt);\\n }\\n }\\n\\n /**\\n * @dev Locks the assets and request withdrawal.\\n *\\n * Requirements:\\n * - The token info is valid.\\n *\\n * Emits the `WithdrawalRequested` event.\\n *\\n */\\n function _requestWithdrawalFor(Transfer.Request calldata _request, address _requester, uint256 _chainId) internal {\\n _request.info.validate();\\n _checkWithdrawal(_request);\\n MappedToken memory _token = getMainchainToken(_request.tokenAddr, _chainId);\\n if (_request.info.erc != _token.erc) revert ErrInvalidTokenStandard();\\n\\n _request.info.transferFrom(_requester, address(this), _request.tokenAddr);\\n _storeAsReceipt(_request, _chainId, _requester, _token.tokenAddr);\\n }\\n\\n /**\\n * @dev Stores the withdrawal request as a receipt.\\n *\\n * Emits the `WithdrawalRequested` event.\\n *\\n */\\n function _storeAsReceipt(\\n Transfer.Request calldata _request,\\n uint256 _chainId,\\n address _requester,\\n address _mainchainTokenAddr\\n ) internal returns (uint256 _withdrawalId) {\\n _withdrawalId = withdrawalCount++;\\n Transfer.Receipt memory _receipt = _request.into_withdrawal_receipt(\\n _requester,\\n _withdrawalId,\\n _mainchainTokenAddr,\\n _chainId\\n );\\n withdrawal[_withdrawalId] = _receipt;\\n emit WithdrawalRequested(_receipt.hash(), _receipt);\\n }\\n\\n /**\\n * @dev Don't send me RON.\\n */\\n function _fallback() internal virtual {\\n revert ErrInvalidRequest();\\n }\\n\\n /**\\n * @inheritdoc GatewayV3\\n */\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\n return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getTotalWeight();\\n }\\n\\n /**\\n * @dev Casts and updates the vote result.\\n *\\n * Requirements:\\n * - The vote is not finalized.\\n * - The voter has not voted for the round.\\n *\\n */\\n function _castIsolatedVote(\\n IsolatedGovernance.Vote storage _v,\\n address _voter,\\n uint256 _minVoteWeight,\\n bytes32 _hash\\n ) internal virtual returns (VoteStatus _status) {\\n _v.castVote(_voter, _hash);\\n uint256 _totalWeight = _getVoteWeight(_v, _hash);\\n return _v.syncVoteStatus(_minVoteWeight, _totalWeight, _hash);\\n }\\n\\n /**\\n * @dev Returns the vote weight for a specified hash.\\n */\\n function _getVoteWeight(\\n IsolatedGovernance.Vote storage _v,\\n bytes32 _hash\\n ) internal view returns (uint256 _totalWeight) {\\n (, address[] memory bridgeOperators, uint96[] memory weights) = IBridgeManager(\\n getContract(ContractType.BRIDGE_MANAGER)\\n ).getFullBridgeOperatorInfos();\\n uint256 length = bridgeOperators.length;\\n unchecked {\\n for (uint _i; _i < length; ++_i) {\\n if (_v.voteHashOf[bridgeOperators[_i]] == _hash) {\\n _totalWeight += weights[_i];\\n }\\n }\\n }\\n }\\n\\n function setTrustedThreshold(\\n uint256 _trustedNumerator,\\n uint256 _trustedDenominator\\n ) external virtual onlyAdmin returns (uint256, uint256) {\\n return _setTrustedThreshold(_trustedNumerator, _trustedDenominator);\\n }\\n\\n /**\\n * @dev Returns the threshold about trusted org.\\n */\\n function getTrustedThreshold() external view virtual returns (uint256 trustedNum_, uint256 trustedDenom_) {\\n return (_trustedNum, _trustedDenom);\\n }\\n\\n /**\\n * @dev Sets trusted threshold and returns the old one.\\n *\\n * Emits the `TrustedThresholdUpdated` event.\\n *\\n */\\n function _setTrustedThreshold(\\n uint256 _trustedNumerator,\\n uint256 _trustedDenominator\\n ) internal virtual returns (uint256 _previousTrustedNum, uint256 _previousTrustedDenom) {\\n if (_trustedNumerator > _trustedDenominator) revert ErrInvalidTrustedThreshold();\\n\\n _previousTrustedNum = _num;\\n _previousTrustedDenom = _denom;\\n _trustedNum = _trustedNumerator;\\n _trustedDenom = _trustedDenominator;\\n unchecked {\\n emit TrustedThresholdUpdated(\\n nonce++,\\n _trustedNumerator,\\n _trustedDenominator,\\n _previousTrustedNum,\\n _previousTrustedDenom\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns minimum trusted vote weight.\\n */\\n function _minimumTrustedVoteWeight(uint256 _totalTrustedWeight) internal view virtual returns (uint256) {\\n return (_trustedNum * _totalTrustedWeight + _trustedDenom - 1) / _trustedDenom;\\n }\\n}\\n\",\"keccak256\":\"0xad743e1947dbbf5f258e86858d0a0a2722f0de3987fb2a89f0de6779124494df\",\"license\":\"MIT\"},\"contracts/utils/CommonErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ContractType } from \\\"./ContractType.sol\\\";\\nimport { RoleAccess } from \\\"./RoleAccess.sol\\\";\\n\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\n/**\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\n */\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\n/**\\n * @dev Error raised when a bridge operator update operation fails.\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\n */\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\n/**\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\n */\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\n/**\\n * @dev The error indicating an unsupported interface.\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\n * @param addr The address where the unsupported interface was encountered.\\n */\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\n/**\\n * @dev Error thrown when the return data from a callback function is invalid.\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\n * @param register The address of the register where the callback function was invoked.\\n * @param returnData The invalid return data received from the callback function.\\n */\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\n/**\\n * @dev Error of set to non-contract.\\n */\\nerror ErrZeroCodeContract(address addr);\\n/**\\n * @dev Error indicating that arguments are invalid.\\n */\\nerror ErrInvalidArguments(bytes4 msgSig);\\n/**\\n * @dev Error indicating that given address is null when it should not.\\n */\\nerror ErrZeroAddress(bytes4 msgSig);\\n/**\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\n */\\nerror ErrInvalidThreshold(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a function can only be called by the contract itself.\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\n */\\nerror ErrOnlySelfCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n * @param expectedRole The role required to perform the function.\\n */\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\n */\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\n * @param msgSig The function signature (bytes4).\\n * @param expectedContractType The contract type required to perform the function.\\n * @param actual The actual address that called to the function.\\n */\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\n\\n/**\\n * @dev Error indicating that an array is empty when it should contain elements.\\n */\\nerror ErrEmptyArray();\\n\\n/**\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\n */\\nerror ErrLengthMismatch(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a proxy call to an external contract has failed.\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\n */\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\n\\n/**\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\n */\\nerror ErrCallPrecompiled(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a native token transfer has failed.\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\n */\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that an order is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\n */\\nerror ErrInvalidOrder(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the chain ID is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\n * @param actual Current chain ID that executing function.\\n * @param expected Expected chain ID required for the tx to success.\\n */\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\n\\n/**\\n * @dev Error indicating that a vote type is not supported.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\n */\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that the proposal nonce is invalid.\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\n */\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a voter has already voted.\\n * @param voter The address of the voter who has already voted.\\n */\\nerror ErrAlreadyVoted(address voter);\\n\\n/**\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\n */\\nerror ErrInvalidSignatures(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a relay call has failed.\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\n */\\nerror ErrRelayFailed(bytes4 msgSig);\\n/**\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\n */\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\n\\n/**\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\n */\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\n\\n/**\\n * @dev Error indicating that a request is invalid.\\n */\\nerror ErrInvalidRequest();\\n\\n/**\\n * @dev Error indicating that a token standard is invalid.\\n */\\nerror ErrInvalidTokenStandard();\\n\\n/**\\n * @dev Error indicating that a token is not supported.\\n */\\nerror ErrUnsupportedToken();\\n\\n/**\\n * @dev Error indicating that a receipt kind is invalid.\\n */\\nerror ErrInvalidReceiptKind();\\n\\n/**\\n * @dev Error indicating that a receipt is invalid.\\n */\\nerror ErrInvalidReceipt();\\n\\n/**\\n * @dev Error indicating that an address is not payable.\\n */\\nerror ErrNonpayableAddress(address);\\n\\n/**\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\n */\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\n\\n/**\\n * @dev Error thrown when an invalid vote hash is provided.\\n */\\nerror ErrInvalidVoteHash();\\n\\n/**\\n * @dev Error thrown when querying for an empty vote.\\n */\\nerror ErrQueryForEmptyVote();\\n\\n/**\\n * @dev Error thrown when querying for an expired vote.\\n */\\nerror ErrQueryForExpiredVote();\\n\\n/**\\n * @dev Error thrown when querying for a non-existent vote.\\n */\\nerror ErrQueryForNonExistentVote();\\n\\n/**\\n * @dev Error indicating that the method is only called once per block.\\n */\\nerror ErrOncePerBlock();\\n\\n/**\\n * @dev Error of method caller must be coinbase\\n */\\nerror ErrCallerMustBeCoinbase();\\n\",\"keccak256\":\"0x22942c8fea2d1ca863ac1f9c1662d714b8ac0856684e36f8aaf19508648c1053\",\"license\":\"MIT\"},\"contracts/utils/ContractType.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum ContractType {\\n /* 0 */ UNKNOWN,\\n /* 1 */ PAUSE_ENFORCER,\\n /* 2 */ BRIDGE,\\n /* 3 */ BRIDGE_TRACKING,\\n /* 4 */ GOVERNANCE_ADMIN,\\n /* 5 */ MAINTENANCE,\\n /* 6 */ SLASH_INDICATOR,\\n /* 7 */ STAKING_VESTING,\\n /* 8 */ VALIDATOR,\\n /* 9 */ STAKING,\\n /* 10 */ RONIN_TRUSTED_ORGANIZATION,\\n /* 11 */ BRIDGE_MANAGER,\\n /* 12 */ BRIDGE_SLASH,\\n /* 13 */ BRIDGE_REWARD,\\n /* 14 */ FAST_FINALITY_TRACKING,\\n /* 15 */ PROFILE\\n}\\n\",\"keccak256\":\"0x7f547a44265f4c4b03d8971f7fc5eaa2e6064ea8cd509c1b761108f9800dab68\",\"license\":\"MIT\"},\"contracts/utils/IdentityGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { AddressArrayUtils } from \\\"../libraries/AddressArrayUtils.sol\\\";\\nimport { IERC165 } from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport { TransparentUpgradeableProxyV2 } from \\\"../extensions/TransparentUpgradeableProxyV2.sol\\\";\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\"./CommonErrors.sol\\\";\\n\\nabstract contract IdentityGuard {\\n using AddressArrayUtils for address[];\\n\\n /// @dev value is equal to keccak256(abi.encode())\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\n\\n /**\\n * @dev Modifier to restrict functions to only be called by this contract.\\n * @dev Reverts if the caller is not this contract.\\n */\\n modifier onlySelfCall() virtual {\\n _requireSelfCall();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\n *\\n * Requirements:\\n * - The elements in the `arr` array must not contain any duplicates.\\n */\\n modifier nonDuplicate(address[] memory arr) virtual {\\n _requireNonDuplicate(arr);\\n _;\\n }\\n\\n /**\\n * @dev Internal method to check the method caller.\\n * @dev Reverts if the method caller is not this contract.\\n */\\n function _requireSelfCall() internal view virtual {\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to check if a contract address has code.\\n * @param addr The address of the contract to check.\\n * @dev Throws an error if the contract address has no code.\\n */\\n function _requireHasCode(address addr) internal view {\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\n }\\n\\n /**\\n * @dev Checks if an address is zero and reverts if it is.\\n * @param addr The address to check.\\n */\\n function _requireNonZeroAddress(address addr) internal pure {\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\n }\\n\\n /**\\n * @dev Check if arr is empty and revert if it is.\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\n * @param arr The array of addresses to check.\\n */\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\n }\\n\\n /**\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\n * @notice This method only works with non-state EOA accounts\\n */\\n function _requireCreatedEOA(address addr) internal view {\\n _requireNonZeroAddress(addr);\\n bytes32 codehash = addr.codehash;\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\n }\\n\\n /**\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\n *\\n * @param contractAddr The address of the contract to check for interface support.\\n * @param interfaceId The interface ID to check for support.\\n */\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\n if (!success) {\\n (success, returnOrRevertData) = contractAddr.staticcall(\\n abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams))\\n );\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\n }\\n}\\n\",\"keccak256\":\"0x2d0dfcef3636945bc1785c1fa5a05f5203c79cbb81b2eee92a3ac6a2378c2ce5\",\"license\":\"MIT\"},\"contracts/utils/RoleAccess.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum RoleAccess {\\n /* 0 */ UNKNOWN,\\n /* 1 */ ADMIN,\\n /* 2 */ COINBASE,\\n /* 3 */ GOVERNOR,\\n /* 4 */ CANDIDATE_ADMIN,\\n /* 5 */ WITHDRAWAL_MIGRATOR,\\n /* 6 */ __DEPRECATED_BRIDGE_OPERATOR,\\n /* 7 */ BLOCK_PRODUCER,\\n /* 8 */ VALIDATOR_CANDIDATE,\\n /* 9 */ CONSENSUS,\\n /* 10 */ TREASURY\\n}\\n\",\"keccak256\":\"0x7da4631824b53be17e246102ad59458f91f2395710561ac9bface18d35fb2502\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506000805460ff19169055614d2b8061002a6000396000f3fe6080604052600436106102815760003560e01c8063835fc6ca1161014f578063c28f7894116100c1578063e75235b81161007a578063e75235b814610838578063ecc8364914610850578063f0ce418e1461087d578063f668214a146108c3578063fa389659146108e3578063fc6574bc1461090357610290565b8063c28f789414610752578063ca15c87314610798578063d547741f146107b8578063dafae408146107d8578063dbd2ef6c146107f8578063de981f1b1461081857610290565b80639584a592116101135780639584a5921461069a578063a217fddf146106ba578063affed0e0146106cf578063b9afa177146106e5578063b9c3620914610705578063bc7f03861461072557610290565b8063835fc6ca146105f45780638456cb5914610625578063865e6fd31461063a5780639010d07c1461065a57806391d148541461067a57610290565b80633e70838b116101f35780635cd8a76b116101ac5780635cd8a76b146105475780635d6a9a901461055c57806364363f781461058957806371706cbe146105a957806375535f86146105bf5780637de5dedd146105df57610290565b80633e70838b146104595780633f4ba83a1461047957806347b56b2c1461048e5780634d92c4f0146104ae5780635a7dd06a1461050f5780635c975abb1461052f57610290565b806317fa2ea11161024557806317fa2ea11461036e578063248a9ca31461039b5780632f2ff15d146103d95780633101cfcb146103f957806336568abe146104195780633e4574ec1461043957610290565b806301ffc9a714610298578063065b3adf146102cd5780630b1ff17f14610305578063109679ef1461032557806317892f961461034557610290565b366102905761028e610955565b005b61028e610955565b3480156102a457600080fd5b506102b86102b3366004613afa565b61096e565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506005546102ed906001600160a01b031681565b6040516001600160a01b0390911681526020016102c4565b34801561031157600080fd5b5061028e610320366004613b24565b610999565b34801561033157600080fd5b5061028e610340366004613b55565b6109b0565b34801561035157600080fd5b506078546079545b604080519283526020830191909152016102c4565b34801561037a57600080fd5b5061038e610389366004613bb2565b610a55565b6040516102c49190613bf3565b3480156103a757600080fd5b506103cb6103b6366004613c39565b6000908152606b602052604090206001015490565b6040519081526020016102c4565b3480156103e557600080fd5b5061028e6103f4366004613c72565b610d92565b34801561040557600080fd5b5061028e610414366004613ca2565b610dbc565b34801561042557600080fd5b5061028e610434366004613c72565b610e68565b34801561044557600080fd5b506102b8610454366004613c72565b610ee2565b34801561046557600080fd5b5061028e610474366004613ca2565b610f12565b34801561048557600080fd5b5061028e610f3c565b34801561049a57600080fd5b5061028e6104a9366004613c39565b610f4e565b3480156104ba57600080fd5b506104ff6104c9366004613cbf565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b6040516102c49493929190613cf7565b34801561051b57600080fd5b5061028e61052a366004613d27565b611119565b34801561053b57600080fd5b5060005460ff166102b8565b34801561055357600080fd5b5061028e61117e565b34801561056857600080fd5b5061057c610577366004613da1565b611280565b6040516102c49190613ddd565b34801561059557600080fd5b5061028e6105a4366004613e09565b611324565b3480156105b557600080fd5b506103cb606e5481565b3480156105cb57600080fd5b506103596105da366004613cbf565b61135a565b3480156105eb57600080fd5b506103cb61137b565b34801561060057600080fd5b5061061461060f366004613c39565b611392565b6040516102c4959493929190613ebd565b34801561063157600080fd5b5061028e611464565b34801561064657600080fd5b5061028e610655366004613f0b565b611474565b34801561066657600080fd5b506102ed610675366004613cbf565b61148f565b34801561068657600080fd5b506102b8610695366004613c72565b6114a7565b3480156106a657600080fd5b5061028e6106b5366004613f48565b6114d2565b3480156106c657600080fd5b506103cb600081565b3480156106db57600080fd5b506103cb60045481565b3480156106f157600080fd5b5061038e610700366004614041565b611621565b34801561071157600080fd5b50610359610720366004613cbf565b6117b3565b34801561073157600080fd5b506103cb610740366004613ca2565b60386020526000908152604090205481565b34801561075e57600080fd5b506104ff61076d366004613c39565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156107a457600080fd5b506103cb6107b3366004613c39565b6117c8565b3480156107c457600080fd5b5061028e6107d3366004613c72565b6117df565b3480156107e457600080fd5b506102b86107f3366004613c39565b611804565b34801561080457600080fd5b5061028e6108133660046140b6565b611830565b34801561082457600080fd5b506102ed610833366004614179565b611882565b34801561084457600080fd5b50600154600254610359565b34801561085c57600080fd5b5061087061086b366004614194565b6118fd565b6040516102c4919061422f565b34801561088957600080fd5b506104ff610898366004613c39565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156108cf57600080fd5b506102b86108de366004613c39565b611a64565b3480156108ef57600080fd5b5061028e6108fe366004613e09565b611a92565b34801561090f57600080fd5b506102b861091e366004614291565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b60006001600160e01b03198216635a05180f60e01b1480610993575061099382611c8b565b92915050565b6109a1611cc0565b6109ac823383611d06565b5050565b6109b8611cc0565b6109c0611dde565b336109e16109d3368490038401846143d8565b826109dc61137b565b611e7f565b6109eb6003611882565b60405163c7c4fea960e01b81526001600160a01b03919091169063c7c4fea990610a1f906000908635908690600401614479565b600060405180830381600087803b158015610a3957600080fd5b505af1158015610a4d573d6000803e3d6000fd5b505050505050565b6060610a5f611dde565b336000610a6a61137b565b90506000846001600160401b03811115610a8657610a866142ca565b604051908082528060200260200182016040528015610aaf578160200160208202803683370190505b5093506000610abe6003611882565b905060005b86811015610d8757878782818110610add57610add6144a6565b905060200201359250816001600160a01b031663c7c4fea9600285886040518463ffffffff1660e01b8152600401610b1793929190614479565b600060405180830381600087803b158015610b3157600080fd5b505af1158015610b45573d6000803e3d6000fd5b50505050610b5283611a64565b15610b80576001868281518110610b6b57610b6b6144a6565b91151560209283029190910190910152610d7f565b600083815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610bc757610bc7613ce1565b6001811115610bd857610bd8613ce1565b8152604080516060808201835260028501546001600160a01b039081168352600386015481166020848101919091526004870154848601528086019390935283518083018552600587015482168152600687015490911692810192909252600785015482840152828401919091528151808201909252600884018054919093019290829060ff166001811115610c7057610c70613ce1565b6001811115610c8157610c81613ce1565b81526001820154602082015260029091015460409091015290525090506000610ca982612120565b90506000610cb9848a8a856121ea565b90506001816004811115610ccf57610ccf613ce1565b03610d7a57835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d0e91908b906004016144bc565b600060405180830381600087803b158015610d2857600080fd5b505af1158015610d3c573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610d719291906144d7565b60405180910390a15b505050505b600101610ac3565b505050505092915050565b6000828152606b6020526040902060010154610dad8161221b565b610db78383612228565b505050565b603754600390610100900460ff16158015610dde575060375460ff8083169116105b610e035760405162461bcd60e51b8152600401610dfa90614538565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e22600b8361224a565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610ed85760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610dfa565b6109ac82826122ee565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f1a612310565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610f4461236a565b610f4c6123d9565b565b610f56611cc0565b610f5f81611a64565b15610f7d576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff1690811115610fbc57610fbc613ce1565b6001811115610fcd57610fcd613ce1565b8152604080516060808201835260028501546001600160a01b039081168352600386015481166020848101919091526004870154848601528086019390935283518083018552600587015482168152600687015490911692810192909252600785015482840152828401919091528151808201909252600884018054919093019290829060ff16600181111561106557611065613ce1565b600181111561107657611076613ce1565b8152600182015460208201526002909101546040918201529152606083015101519192505046146110e0576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610dfa565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61110a82612120565b82604051610e5c9291906144d7565b611121611cc0565b6000829003611143576040516316ee9d3b60e11b815260040160405180910390fd5b60005b8281101561117857611170848483818110611163576111636144a6565b905060a002013384611d06565b600101611146565b50505050565b603754600290610100900460ff161580156111a0575060375460ff8083169116105b6111bc5760405162461bcd60e51b8152600401610dfa90614538565b6037805461ffff191660ff8316176101001790556074546111e8906008906001600160a01b031661224a565b607554611200906003906001600160a01b031661224a565b60775461121890600a906001600160a01b031661224a565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660018111156112d4576112d4613ce1565b60018111156112e5576112e5613ce1565b815290546001600160a01b036101009091048116602092830152908201519192501661099357604051631b79f53b60e21b815260040160405180910390fd5b61132c612310565b600083900361134e576040516316ee9d3b60e11b815260040160405180910390fd5b6111788484848461242b565b600080611365612310565b61136f848461250e565b915091505b9250929050565b600061138d611388612599565b612606565b905090565b607160209081526000918252604091829020805460018083015485516060808201885260028601546001600160a01b03908116835260038701548116838901526004870154838a015288518083018a526005880154821681526006880154909116978101979097526007860154878901528751908101909752600885018054949760ff93841697929692959294909391928492169081111561143657611436613ce1565b600181111561144757611447613ce1565b815260200160018201548152602001600282015481525050905085565b61146c61236a565b610f4c61263c565b61147c612310565b61148581612679565b6109ac828261224a565b6000828152606c60205260408120610f0b90836126af565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff16158080156114f25750603754600160ff909116105b8061150c5750303b15801561150c575060375460ff166001145b6115285760405162461bcd60e51b8152600401610dfa90614538565b6037805460ff19166001179055801561154b576037805461ff0019166101001790555b61155660008d6126bb565b6115608b8b6126c5565b505061156c898961250e565b506000905061157b8680614586565b905011156115cd576115ae6115908680614586565b61159d6020890189614586565b6115a78980614586565b8989612751565b6115cd6115bb8680614586565b6115c86020880188614586565b61242b565b8015611613576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b606061162b611cc0565b611633611dde565b3361163c613a8d565b836001600160401b03811115611654576116546142ca565b60405190808252806020026020018201604052801561167d578160200160208202803683370190505b509250600061168a61137b565b905060006116986003611882565b905060005b86811015610d87578787828181106116b7576116b76144a6565b905061016002018036038101906116ce91906143d8565b805160405163c7c4fea960e01b81529195506001600160a01b0384169163c7c4fea99161170391600091908a90600401614479565b600060405180830381600087803b15801561171d57600080fd5b505af1158015611731573d6000803e3d6000fd5b506002925061173e915050565b6040808601518101516000908152606f6020908152828220885183529052205460ff16600481111561177257611772613ce1565b036117a057600186828151811061178b5761178b6144a6565b911515602092830291909101909101526117ab565b6117ab848685611e7f565b60010161169d565b6000806117be612310565b61136f84846126c5565b6000818152606c602052604081206109939061295a565b6000828152606b60205260409020600101546117fa8161221b565b610db783836122ee565b600061180e612599565b60015461181b91906145e5565b60025461182890846145e5565b101592915050565b611838612310565b6000879003611868576000356001600160e01b0319166040516306b5667560e21b8152600401610dfa91906145fc565b6118788888888888888888612751565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156118b9576118b9613ce1565b60ff1681526020810191909152604001600020546001600160a01b03169050806118f8578160405163409140df60e11b8152600401610dfa9190614611565b919050565b6060816001600160401b03811115611917576119176142ca565b60405190808252806020026020018201604052801561194a57816020015b60608152602001906001900390816119355790505b50905060005b82811015611a5c57600085815260726020526040812090858584818110611979576119796144a6565b905060200201602081019061198e9190613ca2565b6001600160a01b03166001600160a01b0316815260200190815260200160002080546119b99061462b565b80601f01602080910402602001604051908101604052809291908181526020018280546119e59061462b565b8015611a325780601f10611a0757610100808354040283529160200191611a32565b820191906000526020600020905b815481529060010190602001808311611a1557829003601f168201915b5050505050828281518110611a4957611a496144a6565b6020908102919091010152600101611950565b509392505050565b6000600260008381526070602052604090205460ff166004811115611a8b57611a8b613ce1565b1492915050565b611a9a611cc0565b611aa2611dde565b338315801590611ab157508382145b611adc576000356001600160e01b0319166040516306b5667560e21b8152600401610dfa91906145fc565b6000611ae661137b565b9050600080611af56003611882565b905060005b87811015611c8057888882818110611b1457611b146144a6565b905060200201359250868682818110611b2f57611b2f6144a6565b9050602002810190611b41919061465f565b60008581526072602090815260408083206001600160a01b038b168452909152902091611b6f9190836146eb565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611ba19060019087908a90600401614479565b600060405180830381600087803b158015611bbb57600080fd5b505af1158015611bcf573d6000803e3d6000fd5b50505060008481526076602052604081209150611bee828888886121ea565b90506001816004811115611c0457611c04613ce1565b03611c7657815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611c439060019089906004016144bc565b600060405180830381600087803b158015611c5d57600080fd5b505af1158015611c71573d6000803e3d6000fd5b505050505b5050600101611afa565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b148061099357506301ffc9a760e01b6001600160e01b0319831614610993565b60005460ff1615610f4c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610dfa565b611d20611d1b368590038501604086016147aa565b612964565b611d29836129df565b6000611d44611d3e6040860160208701613ca2565b83611280565b80519091506001811115611d5a57611d5a613ce1565b611d6a60608601604087016147c6565b6001811115611d7b57611d7b613ce1565b14611d985760405162035e2b60ea1b815260040160405180910390fd5b611dc78330611dad6040880160208901613ca2565b611dbf36899003890160408a016147aa565b929190612a5d565b611dd78483858460200151612c5c565b5050505050565b611de8600b611882565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5291906147e3565b610f4c576000356001600160e01b0319166006604051620f948f60ea1b8152600401610dfa929190614805565b82516080840151611e8f90612964565b600084602001516001811115611ea757611ea7613ce1565b14611ec55760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611f13576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610dfa565b6000611f2f856060015160200151866040015160400151611280565b6080860151519091506001811115611f4957611f49613ce1565b81516001811115611f5c57611f5c613ce1565b148015611f8657508460400151602001516001600160a01b031681602001516001600160a01b0316145b611fa35760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f6020908152828220858352905290812090611fcd87612120565b90506000611fdd838888856121ea565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b64598560405161202491815260200190565b60405180910390a4600181600481111561204057612040613ce1565b0361187857825460ff191660021783556060880151805160209091015160808a015161206f9290916000612de6565b6120796003611882565b885160405163114fc47560e11b81526001600160a01b03929092169163229f88ea916120ab91600091906004016144bc565b600060405180830381600087803b1580156120c557600080fd5b505af11580156120d9573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524828960405161210e9291906144d7565b60405180910390a15050505050505050565b6000806121308360400151613102565b905060006121418460600151613102565b905060006121958560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b60006121f785858461314a565b60006122038684613200565b90506122118685838661330e565b9695505050505050565b612225813361335a565b50565b61223282826133be565b6000828152606c60205260409020610db79082613444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561228057612280613ce1565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156122c1576122c1613ce1565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6122f88282613459565b6000828152606c60205260409020610db790826134c0565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f4c576000356001600160e01b0319166001604051620f948f60ea1b8152600401610dfa929190614805565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806123ac57506005546001600160a01b031633145b610f4c576000356001600160e01b0319166001604051620f948f60ea1b8152600401610dfa929190614805565b6123e16134d5565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b828114612459576000356001600160e01b0319166040516306b5667560e21b8152600401610dfa91906145fc565b60005b838110156124ca57828282818110612476576124766144a6565b9050602002013560386000878785818110612493576124936144a6565b90506020020160208101906124a89190613ca2565b6001600160a01b0316815260208101919091526040016000205560010161245c565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da8484848460405161250094939291906148a1565b60405180910390a150505050565b600080828411156125325760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba91015b60405180910390a49250929050565b60006125a5600b611882565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d91906148d3565b600060025460016002548460015461261e91906145e5565b61262891906148ec565b61263291906148ff565b6109939190614912565b612644611cc0565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861240e3390565b806001600160a01b03163b60000361222557604051630bfc64a360e21b81526001600160a01b0382166004820152602401610dfa565b6000610f0b838361351e565b6109ac8282612228565b600080828411156126f7576000356001600160e01b0319166040516387f6f09560e01b8152600401610dfa91906145fc565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910161258a565b868514801561275f57508683145b61278a576000356001600160e01b0319166040516306b5667560e21b8152600401610dfa91906145fc565b60005b8781101561291c578686828181106127a7576127a76144a6565b90506020020160208101906127bc9190613ca2565b607360008b8b858181106127d2576127d26144a6565b90506020020160208101906127e79190613ca2565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087878581811061281b5761281b6144a6565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b03160217905550828282818110612869576128696144a6565b905060200201602081019061287e91906147c6565b607360008b8b85818110612894576128946144a6565b90506020020160208101906128a99190613ca2565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008787858181106128dd576128dd6144a6565b60209081029290920135835250810191909152604001600020805460ff19166001838181111561290f5761290f613ce1565b021790555060010161278d565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401888888888888888860405161210e989796959493929190614934565b6000610993825490565b60008151600181111561297957612979613ce1565b14801561298a575060008160400151115b801561299857506020810151155b806129c257506001815160018111156129b3576129b3613ce1565b1480156129c257506040810151155b6122255760405163034992a760e51b815260040160405180910390fd5b60006129f160608301604084016147c6565b6001811115612a0257612a02613ce1565b148015612a3f575060386000612a1e6040840160208501613ca2565b6001600160a01b031681526020810191909152604001600020546080820135105b1561222557604051636eff4a8560e11b815260040160405180910390fd5b600060608186516001811115612a7557612a75613ce1565b03612b525760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612ade91906149c3565b6000604051808303816000865af19150503d8060008114612b1b576040519150601f19603f3d011682016040523d82523d6000602084013e612b20565b606091505b509092509050818015612b4b575080511580612b4b575080806020019051810190612b4b91906147e3565b9150612c36565b600186516001811115612b6757612b67613ce1565b03612c1d57602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612bd091906149c3565b6000604051808303816000865af19150503d8060008114612c0d576040519150601f19603f3d011682016040523d82523d6000602084013e612c12565b606091505b505080925050612c36565b6040516361e411a760e11b815260040160405180910390fd5b81610a4d5785858585604051639d2e4c6760e01b8152600401610dfa94939291906149df565b606e805460009182612c6d83614a15565b9091555090506000612c9484838588612c8b368c90038c018c614a2e565b93929190613548565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612cd357612cd3613ce1565b021790555060408281015180516002840180546001600160a01b039283166001600160a01b03199182161790915560208084015160038701805491851691841691909117905592840151600486015560608601518051600587018054918516918416919091179055928301516006860180549190931691161790550151600782015560808201518051600883018054909190829060ff191660018381811115612d7e57612d7e613ce1565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612dc682612120565b82604051612dd59291906144d7565b60405180910390a150949350505050565b6000816001600160a01b0316836001600160a01b031603612e955760408086015190516001600160a01b0386169180156108fc02916000818181858888f19350505050612e9057816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e6c57600080fd5b505af1158015612e80573d6000803e3d6000fd5b5050505050612e908585856135b4565b611dd7565b600085516001811115612eaa57612eaa613ce1565b03613013576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1a91906148d3565b9050856040015181101561300257836001600160a01b03166340c10f1930838960400151612f4891906148ff565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612f9c91906149c3565b6000604051808303816000865af19150503d8060008114612fd9576040519150601f19603f3d011682016040523d82523d6000602084013e612fde565b606091505b5050809250508161300257604051632f739fff60e11b815260040160405180910390fd5b61300d8686866135b4565b50611dd7565b60018551600181111561302857613028613ce1565b03612c1d5761303c83858760200151613632565b612e9057602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b179052519185169161309c91906149c3565b6000604051808303816000865af19150503d80600081146130d9576040519150601f19603f3d011682016040523d82523d6000602084013e6130de565b606091505b50508091505080612e905760405163c8e3a09f60e01b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b60008360030154118015613162575042836003015411155b1561317357825460ff191660041783555b6001600160a01b0382166000908152600284016020526040902054156131b75760405163025fd59560e41b81526001600160a01b0383166004820152602401610dfa565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b600080600061320f600b611882565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa15801561324c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526132749190810190614b18565b81519194509250905060005b8181101561330457858760020160008684815181106132a1576132a16144a6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036132fc578281815181106132e1576132e16144a6565b60200260200101516bffffffffffffffffffffffff16850194505b600101613280565b5050505092915050565b600083831015801561333557506000855460ff16600481111561333357613333613ce1565b145b1561334d57845460ff19166001908117865585018290555b5050915460ff1692915050565b61336482826114a7565b6109ac5761337c816001600160a01b031660146136dd565b6133878360206136dd565b604051602001613398929190614c10565b60408051601f198184030181529082905262461bcd60e51b8252610dfa91600401614c85565b6133c882826114a7565b6109ac576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff191660011790556134003390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f0b836001600160a01b038416613878565b61346382826114a7565b156109ac576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f0b836001600160a01b0384166138c7565b60005460ff16610f4c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610dfa565b6000826000018281548110613535576135356144a6565b9060005260206000200154905092915050565b613550613a8d565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b600080845160018111156135ca576135ca613ce1565b036135e5576135de828486604001516139ba565b905061360e565b6001845160018111156135fa576135fa613ce1565b03612c1d576135de82848660200151613632565b80611178578383836040516341bd7d9160e11b8152600401610dfa93929190614c98565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092861691613690916149c3565b6000604051808303816000865af19150503d80600081146136cd576040519150601f19603f3d011682016040523d82523d6000602084013e6136d2565b606091505b509095945050505050565b606060006136ec8360026145e5565b6136f79060026148ec565b6001600160401b0381111561370e5761370e6142ca565b6040519080825280601f01601f191660200182016040528015613738576020820181803683370190505b509050600360fc1b81600081518110613753576137536144a6565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613782576137826144a6565b60200101906001600160f81b031916908160001a90535060006137a68460026145e5565b6137b19060016148ec565b90505b6001811115613829576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106137e5576137e56144a6565b1a60f81b8282815181106137fb576137fb6144a6565b60200101906001600160f81b031916908160001a90535060049490941c9361382281614cc8565b90506137b4565b508315610f0b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610dfa565b60008181526001830160205260408120546138bf57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610993565b506000610993565b600081815260018301602052604081205480156139b05760006138eb6001836148ff565b85549091506000906138ff906001906148ff565b905081811461396457600086600001828154811061391f5761391f6144a6565b9060005260206000200154905080876000018481548110613942576139426144a6565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061397557613975614cdf565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610993565b6000915050610993565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613a1791906149c3565b6000604051808303816000865af19150503d8060008114613a54576040519150601f19603f3d011682016040523d82523d6000602084013e613a59565b606091505b509092509050818015613a84575080511580613a84575080806020019051810190613a8491906147e3565b95945050505050565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613b0c57600080fd5b81356001600160e01b031981168114610f0b57600080fd5b60008082840360c0811215613b3857600080fd5b60a0811215613b4657600080fd5b50919360a08501359350915050565b60006101608284031215613b6857600080fd5b50919050565b60008083601f840112613b8057600080fd5b5081356001600160401b03811115613b9757600080fd5b6020830191508360208260051b850101111561137457600080fd5b60008060208385031215613bc557600080fd5b82356001600160401b03811115613bdb57600080fd5b613be785828601613b6e565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015613c2d578351151583529284019291840191600101613c0f565b50909695505050505050565b600060208284031215613c4b57600080fd5b5035919050565b6001600160a01b038116811461222557600080fd5b80356118f881613c52565b60008060408385031215613c8557600080fd5b823591506020830135613c9781613c52565b809150509250929050565b600060208284031215613cb457600080fd5b8135610f0b81613c52565b60008060408385031215613cd257600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6080810160058610613d0b57613d0b613ce1565b9481526020810193909352604083019190915260609091015290565b600080600060408486031215613d3c57600080fd5b83356001600160401b0380821115613d5357600080fd5b818601915086601f830112613d6757600080fd5b813581811115613d7657600080fd5b87602060a083028501011115613d8b57600080fd5b6020928301989097509590910135949350505050565b60008060408385031215613db457600080fd5b8235613dbf81613c52565b946020939093013593505050565b6002811061222557612225613ce1565b81516040820190613ded81613dcd565b82526020928301516001600160a01b0316929091019190915290565b60008060008060408587031215613e1f57600080fd5b84356001600160401b0380821115613e3657600080fd5b613e4288838901613b6e565b90965094506020870135915080821115613e5b57600080fd5b50613e6887828801613b6e565b95989497509550505050565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b8051613ea681613dcd565b825260208181015190830152604090810151910152565b8581526101608101613ece86613dcd565b856020830152613ee16040830186613e74565b613eee60a0830185613e74565b612211610100830184613e9b565b8035601081106118f857600080fd5b60008060408385031215613f1e57600080fd5b613f2783613efc565b91506020830135613c9781613c52565b806040810183101561099357600080fd5b60008060008060008060008060008060006101208c8e031215613f6a57600080fd5b613f738c613c67565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e01351115613faa57600080fd5b613fba8e60a08f01358f01613b6e565b909750955060c08d0135811015613fd057600080fd5b613fe08e60c08f01358f01613f37565b94508060e08e01351115613ff357600080fd5b6140038e60e08f01358f01613f37565b9350806101008e0135111561401757600080fd5b506140298d6101008e01358e01613b6e565b81935080925050509295989b509295989b9093969950565b6000806020838503121561405457600080fd5b82356001600160401b038082111561406b57600080fd5b818501915085601f83011261407f57600080fd5b81358181111561408e57600080fd5b866020610160830285010111156140a457600080fd5b60209290920196919550909350505050565b6000806000806000806000806080898b0312156140d257600080fd5b88356001600160401b03808211156140e957600080fd5b6140f58c838d01613b6e565b909a50985060208b013591508082111561410e57600080fd5b61411a8c838d01613b6e565b909850965060408b013591508082111561413357600080fd5b61413f8c838d01613b6e565b909650945060608b013591508082111561415857600080fd5b506141658b828c01613b6e565b999c989b5096995094979396929594505050565b60006020828403121561418b57600080fd5b610f0b82613efc565b6000806000604084860312156141a957600080fd5b8335925060208401356001600160401b038111156141c657600080fd5b6141d286828701613b6e565b9497909650939450505050565b60005b838110156141fa5781810151838201526020016141e2565b50506000910152565b6000815180845261421b8160208601602086016141df565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561428457603f19888603018452614272858351614203565b94509285019290850190600101614256565b5092979650505050505050565b6000806000606084860312156142a657600080fd5b833592506020840135915060408401356142bf81613c52565b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614302576143026142ca565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614330576143306142ca565b604052919050565b6002811061222557600080fd5b60006060828403121561435757600080fd5b61435f6142e0565b9050813561436c81613c52565b8152602082013561437c81613c52565b806020830152506040820135604082015292915050565b6000606082840312156143a557600080fd5b6143ad6142e0565b905081356143ba81614338565b80825250602082013560208201526040820135604082015292915050565b600061016082840312156143eb57600080fd5b60405160a081018181106001600160401b038211171561440d5761440d6142ca565b60405282358152602083013561442281614338565b60208201526144348460408501614345565b60408201526144468460a08501614345565b6060820152614459846101008501614393565b60808201529392505050565b6003811061447557614475613ce1565b9052565b606081016144878286614465565b60208201939093526001600160a01b0391909116604090910152919050565b634e487b7160e01b600052603260045260246000fd5b604081016144ca8285614465565b8260208301529392505050565b6000610180820190508382528251602083015260208301516144f881613dcd565b8060408401525060408301516145116060840182613e74565b50606083015161452460c0840182613e74565b506080830151611a5c610120840182613e9b565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e1984360301811261459d57600080fd5b8301803591506001600160401b038211156145b757600080fd5b6020019150600581901b360382131561137457600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610993576109936145cf565b6001600160e01b031991909116815260200190565b602081016010831061462557614625613ce1565b91905290565b600181811c9082168061463f57607f821691505b602082108103613b6857634e487b7160e01b600052602260045260246000fd5b6000808335601e1984360301811261467657600080fd5b8301803591506001600160401b0382111561469057600080fd5b60200191503681900382131561137457600080fd5b601f821115610db757600081815260208120601f850160051c810160208610156146cc5750805b601f850160051c820191505b81811015610a4d578281556001016146d8565b6001600160401b03831115614702576147026142ca565b61471683614710835461462b565b836146a5565b6000601f84116001811461474a57600085156147325750838201355b600019600387901b1c1916600186901b178355611dd7565b600083815260209020601f19861690835b8281101561477b578685013582556020948501946001909201910161475b565b50868210156147985760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000606082840312156147bc57600080fd5b610f0b8383614393565b6000602082840312156147d857600080fd5b8135610f0b81614338565b6000602082840312156147f557600080fd5b81518015158114610f0b57600080fd5b6001600160e01b03198316815260408101600b83106144ca576144ca613ce1565b8183526000602080850194508260005b8581101561486457813561484981613c52565b6001600160a01b031687529582019590820190600101614836565b509495945050505050565b81835260006001600160fb1b0383111561488857600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006148b5604083018688614826565b82810360208401526148c881858761486f565b979650505050505050565b6000602082840312156148e557600080fd5b5051919050565b80820180821115610993576109936145cf565b81810381811115610993576109936145cf565b60008261492f57634e487b7160e01b600052601260045260246000fd5b500490565b608081526000614948608083018a8c614826565b60208382038185015261495c828a8c614826565b9150838203604085015261497182888a61486f565b8481036060860152858152869250810160005b868110156149b257833561499781614338565b6149a081613dcd565b82529282019290820190600101614984565b509c9b505050505050505050505050565b600082516149d58184602087016141df565b9190910192915050565b60c081016149ed8287613e9b565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b600060018201614a2757614a276145cf565b5060010190565b600060a08284031215614a4057600080fd5b614a486142e0565b8235614a5381613c52565b81526020830135614a6381613c52565b6020820152614a758460408501614393565b60408201529392505050565b60006001600160401b03821115614a9a57614a9a6142ca565b5060051b60200190565b600082601f830112614ab557600080fd5b81516020614aca614ac583614a81565b614308565b82815260059290921b84018101918181019086841115614ae957600080fd5b8286015b84811015614b0d578051614b0081613c52565b8352918301918301614aed565b509695505050505050565b600080600060608486031215614b2d57600080fd5b83516001600160401b0380821115614b4457600080fd5b614b5087838801614aa4565b9450602091508186015181811115614b6757600080fd5b614b7388828901614aa4565b945050604086015181811115614b8857600080fd5b86019050601f81018713614b9b57600080fd5b8051614ba9614ac582614a81565b81815260059190911b82018301908381019089831115614bc857600080fd5b928401925b82841015614c015783516bffffffffffffffffffffffff81168114614bf25760008081fd5b82529284019290840190614bcd565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614c488160178501602088016141df565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614c798160288401602088016141df565b01602801949350505050565b602081526000610f0b6020830184614203565b60a08101614ca68286613e9b565b6001600160a01b03938416606083015291909216608090920191909152919050565b600081614cd757614cd76145cf565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec5e4d67a54601fd535977c8db3ac6acad4decf9c225f2e4583ebaf312358ccc64736f6c63430008110033", - "deployedBytecode": "0x6080604052600436106102815760003560e01c8063835fc6ca1161014f578063c28f7894116100c1578063e75235b81161007a578063e75235b814610838578063ecc8364914610850578063f0ce418e1461087d578063f668214a146108c3578063fa389659146108e3578063fc6574bc1461090357610290565b8063c28f789414610752578063ca15c87314610798578063d547741f146107b8578063dafae408146107d8578063dbd2ef6c146107f8578063de981f1b1461081857610290565b80639584a592116101135780639584a5921461069a578063a217fddf146106ba578063affed0e0146106cf578063b9afa177146106e5578063b9c3620914610705578063bc7f03861461072557610290565b8063835fc6ca146105f45780638456cb5914610625578063865e6fd31461063a5780639010d07c1461065a57806391d148541461067a57610290565b80633e70838b116101f35780635cd8a76b116101ac5780635cd8a76b146105475780635d6a9a901461055c57806364363f781461058957806371706cbe146105a957806375535f86146105bf5780637de5dedd146105df57610290565b80633e70838b146104595780633f4ba83a1461047957806347b56b2c1461048e5780634d92c4f0146104ae5780635a7dd06a1461050f5780635c975abb1461052f57610290565b806317fa2ea11161024557806317fa2ea11461036e578063248a9ca31461039b5780632f2ff15d146103d95780633101cfcb146103f957806336568abe146104195780633e4574ec1461043957610290565b806301ffc9a714610298578063065b3adf146102cd5780630b1ff17f14610305578063109679ef1461032557806317892f961461034557610290565b366102905761028e610955565b005b61028e610955565b3480156102a457600080fd5b506102b86102b3366004613afa565b61096e565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506005546102ed906001600160a01b031681565b6040516001600160a01b0390911681526020016102c4565b34801561031157600080fd5b5061028e610320366004613b24565b610999565b34801561033157600080fd5b5061028e610340366004613b55565b6109b0565b34801561035157600080fd5b506078546079545b604080519283526020830191909152016102c4565b34801561037a57600080fd5b5061038e610389366004613bb2565b610a55565b6040516102c49190613bf3565b3480156103a757600080fd5b506103cb6103b6366004613c39565b6000908152606b602052604090206001015490565b6040519081526020016102c4565b3480156103e557600080fd5b5061028e6103f4366004613c72565b610d92565b34801561040557600080fd5b5061028e610414366004613ca2565b610dbc565b34801561042557600080fd5b5061028e610434366004613c72565b610e68565b34801561044557600080fd5b506102b8610454366004613c72565b610ee2565b34801561046557600080fd5b5061028e610474366004613ca2565b610f12565b34801561048557600080fd5b5061028e610f3c565b34801561049a57600080fd5b5061028e6104a9366004613c39565b610f4e565b3480156104ba57600080fd5b506104ff6104c9366004613cbf565b606f602090815260009283526040808420909152908252902080546001820154600383015460049093015460ff90921692909184565b6040516102c49493929190613cf7565b34801561051b57600080fd5b5061028e61052a366004613d27565b611119565b34801561053b57600080fd5b5060005460ff166102b8565b34801561055357600080fd5b5061028e61117e565b34801561056857600080fd5b5061057c610577366004613da1565b611280565b6040516102c49190613ddd565b34801561059557600080fd5b5061028e6105a4366004613e09565b611324565b3480156105b557600080fd5b506103cb606e5481565b3480156105cb57600080fd5b506103596105da366004613cbf565b61135a565b3480156105eb57600080fd5b506103cb61137b565b34801561060057600080fd5b5061061461060f366004613c39565b611392565b6040516102c4959493929190613ebd565b34801561063157600080fd5b5061028e611464565b34801561064657600080fd5b5061028e610655366004613f0b565b611474565b34801561066657600080fd5b506102ed610675366004613cbf565b61148f565b34801561068657600080fd5b506102b8610695366004613c72565b6114a7565b3480156106a657600080fd5b5061028e6106b5366004613f48565b6114d2565b3480156106c657600080fd5b506103cb600081565b3480156106db57600080fd5b506103cb60045481565b3480156106f157600080fd5b5061038e610700366004614041565b611621565b34801561071157600080fd5b50610359610720366004613cbf565b6117b3565b34801561073157600080fd5b506103cb610740366004613ca2565b60386020526000908152604090205481565b34801561075e57600080fd5b506104ff61076d366004613c39565b607660205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156107a457600080fd5b506103cb6107b3366004613c39565b6117c8565b3480156107c457600080fd5b5061028e6107d3366004613c72565b6117df565b3480156107e457600080fd5b506102b86107f3366004613c39565b611804565b34801561080457600080fd5b5061028e6108133660046140b6565b611830565b34801561082457600080fd5b506102ed610833366004614179565b611882565b34801561084457600080fd5b50600154600254610359565b34801561085c57600080fd5b5061087061086b366004614194565b6118fd565b6040516102c4919061422f565b34801561088957600080fd5b506104ff610898366004613c39565b607060205260009081526040902080546001820154600383015460049093015460ff90921692909184565b3480156108cf57600080fd5b506102b86108de366004613c39565b611a64565b3480156108ef57600080fd5b5061028e6108fe366004613e09565b611a92565b34801561090f57600080fd5b506102b861091e366004614291565b6000928352606f602090815260408085209385529281528284206001600160a01b0392909216845260029091019052902054151590565b60405163129c2ce160e31b815260040160405180910390fd5b60006001600160e01b03198216635a05180f60e01b1480610993575061099382611c8b565b92915050565b6109a1611cc0565b6109ac823383611d06565b5050565b6109b8611cc0565b6109c0611dde565b336109e16109d3368490038401846143d8565b826109dc61137b565b611e7f565b6109eb6003611882565b60405163c7c4fea960e01b81526001600160a01b03919091169063c7c4fea990610a1f906000908635908690600401614479565b600060405180830381600087803b158015610a3957600080fd5b505af1158015610a4d573d6000803e3d6000fd5b505050505050565b6060610a5f611dde565b336000610a6a61137b565b90506000846001600160401b03811115610a8657610a866142ca565b604051908082528060200260200182016040528015610aaf578160200160208202803683370190505b5093506000610abe6003611882565b905060005b86811015610d8757878782818110610add57610add6144a6565b905060200201359250816001600160a01b031663c7c4fea9600285886040518463ffffffff1660e01b8152600401610b1793929190614479565b600060405180830381600087803b158015610b3157600080fd5b505af1158015610b45573d6000803e3d6000fd5b50505050610b5283611a64565b15610b80576001868281518110610b6b57610b6b6144a6565b91151560209283029190910190910152610d7f565b600083815260706020908152604080832060718352818420825160a081019093528054835260018082015492959491929184019160ff1690811115610bc757610bc7613ce1565b6001811115610bd857610bd8613ce1565b8152604080516060808201835260028501546001600160a01b039081168352600386015481166020848101919091526004870154848601528086019390935283518083018552600587015482168152600687015490911692810192909252600785015482840152828401919091528151808201909252600884018054919093019290829060ff166001811115610c7057610c70613ce1565b6001811115610c8157610c81613ce1565b81526001820154602082015260029091015460409091015290525090506000610ca982612120565b90506000610cb9848a8a856121ea565b90506001816004811115610ccf57610ccf613ce1565b03610d7a57835460ff19166002908117855560405163114fc47560e11b81526001600160a01b0388169163229f88ea91610d0e91908b906004016144bc565b600060405180830381600087803b158015610d2857600080fd5b505af1158015610d3c573d6000803e3d6000fd5b505050507f62520d049932cdee872e9b3c59c0f6073637147e5e9bc8b050b062430eaf5c9f8284604051610d719291906144d7565b60405180910390a15b505050505b600101610ac3565b505050505092915050565b6000828152606b6020526040902060010154610dad8161221b565b610db78383612228565b505050565b603754600390610100900460ff16158015610dde575060375460ff8083169116105b610e035760405162461bcd60e51b8152600401610dfa90614538565b60405180910390fd5b6037805461ffff191660ff831617610100179055610e22600b8361224a565b6037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b6001600160a01b0381163314610ed85760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610dfa565b6109ac82826122ee565b60008281526070602090815260408083206001600160a01b038516845260020190915281205415155b9392505050565b610f1a612310565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610f4461236a565b610f4c6123d9565b565b610f56611cc0565b610f5f81611a64565b15610f7d576040516327ddf84960e11b815260040160405180910390fd5b6000818152607160209081526040808320815160a0810190925280548252600180820154929391929184019160ff1690811115610fbc57610fbc613ce1565b6001811115610fcd57610fcd613ce1565b8152604080516060808201835260028501546001600160a01b039081168352600386015481166020848101919091526004870154848601528086019390935283518083018552600587015482168152600687015490911692810192909252600785015482840152828401919091528151808201909252600884018054919093019290829060ff16600181111561106557611065613ce1565b600181111561107657611076613ce1565b8152600182015460208201526002909101546040918201529152606083015101519192505046146110e0576060810151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610dfa565b7f04e8cbd836dea43a2dc7eb19de345cca3a8e6978a2ef5225d924775500f67c7c61110a82612120565b82604051610e5c9291906144d7565b611121611cc0565b6000829003611143576040516316ee9d3b60e11b815260040160405180910390fd5b60005b8281101561117857611170848483818110611163576111636144a6565b905060a002013384611d06565b600101611146565b50505050565b603754600290610100900460ff161580156111a0575060375460ff8083169116105b6111bc5760405162461bcd60e51b8152600401610dfa90614538565b6037805461ffff191660ff8316176101001790556074546111e8906008906001600160a01b031661224a565b607554611200906003906001600160a01b031661224a565b60775461121890600a906001600160a01b031661224a565b607480546001600160a01b031990811690915560758054821690556077805490911690556037805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b604080518082018252600080825260208083018290526001600160a01b038616825260738152838220858352905282902082518084019093528054919291829060ff1660018111156112d4576112d4613ce1565b60018111156112e5576112e5613ce1565b815290546001600160a01b036101009091048116602092830152908201519192501661099357604051631b79f53b60e21b815260040160405180910390fd5b61132c612310565b600083900361134e576040516316ee9d3b60e11b815260040160405180910390fd5b6111788484848461242b565b600080611365612310565b61136f848461250e565b915091505b9250929050565b600061138d611388612599565b612606565b905090565b607160209081526000918252604091829020805460018083015485516060808201885260028601546001600160a01b03908116835260038701548116838901526004870154838a015288518083018a526005880154821681526006880154909116978101979097526007860154878901528751908101909752600885018054949760ff93841697929692959294909391928492169081111561143657611436613ce1565b600181111561144757611447613ce1565b815260200160018201548152602001600282015481525050905085565b61146c61236a565b610f4c61263c565b61147c612310565b61148581612679565b6109ac828261224a565b6000828152606c60205260408120610f0b90836126af565b6000918252606b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b603754610100900460ff16158080156114f25750603754600160ff909116105b8061150c5750303b15801561150c575060375460ff166001145b6115285760405162461bcd60e51b8152600401610dfa90614538565b6037805460ff19166001179055801561154b576037805461ff0019166101001790555b61155660008d6126bb565b6115608b8b6126c5565b505061156c898961250e565b506000905061157b8680614586565b905011156115cd576115ae6115908680614586565b61159d6020890189614586565b6115a78980614586565b8989612751565b6115cd6115bb8680614586565b6115c86020880188614586565b61242b565b8015611613576037805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b606061162b611cc0565b611633611dde565b3361163c613a8d565b836001600160401b03811115611654576116546142ca565b60405190808252806020026020018201604052801561167d578160200160208202803683370190505b509250600061168a61137b565b905060006116986003611882565b905060005b86811015610d87578787828181106116b7576116b76144a6565b905061016002018036038101906116ce91906143d8565b805160405163c7c4fea960e01b81529195506001600160a01b0384169163c7c4fea99161170391600091908a90600401614479565b600060405180830381600087803b15801561171d57600080fd5b505af1158015611731573d6000803e3d6000fd5b506002925061173e915050565b6040808601518101516000908152606f6020908152828220885183529052205460ff16600481111561177257611772613ce1565b036117a057600186828151811061178b5761178b6144a6565b911515602092830291909101909101526117ab565b6117ab848685611e7f565b60010161169d565b6000806117be612310565b61136f84846126c5565b6000818152606c602052604081206109939061295a565b6000828152606b60205260409020600101546117fa8161221b565b610db783836122ee565b600061180e612599565b60015461181b91906145e5565b60025461182890846145e5565b101592915050565b611838612310565b6000879003611868576000356001600160e01b0319166040516306b5667560e21b8152600401610dfa91906145fc565b6118788888888888888888612751565b5050505050505050565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156118b9576118b9613ce1565b60ff1681526020810191909152604001600020546001600160a01b03169050806118f8578160405163409140df60e11b8152600401610dfa9190614611565b919050565b6060816001600160401b03811115611917576119176142ca565b60405190808252806020026020018201604052801561194a57816020015b60608152602001906001900390816119355790505b50905060005b82811015611a5c57600085815260726020526040812090858584818110611979576119796144a6565b905060200201602081019061198e9190613ca2565b6001600160a01b03166001600160a01b0316815260200190815260200160002080546119b99061462b565b80601f01602080910402602001604051908101604052809291908181526020018280546119e59061462b565b8015611a325780601f10611a0757610100808354040283529160200191611a32565b820191906000526020600020905b815481529060010190602001808311611a1557829003601f168201915b5050505050828281518110611a4957611a496144a6565b6020908102919091010152600101611950565b509392505050565b6000600260008381526070602052604090205460ff166004811115611a8b57611a8b613ce1565b1492915050565b611a9a611cc0565b611aa2611dde565b338315801590611ab157508382145b611adc576000356001600160e01b0319166040516306b5667560e21b8152600401610dfa91906145fc565b6000611ae661137b565b9050600080611af56003611882565b905060005b87811015611c8057888882818110611b1457611b146144a6565b905060200201359250868682818110611b2f57611b2f6144a6565b9050602002810190611b41919061465f565b60008581526072602090815260408083206001600160a01b038b168452909152902091611b6f9190836146eb565b5060405163c7c4fea960e01b81526001600160a01b0383169063c7c4fea990611ba19060019087908a90600401614479565b600060405180830381600087803b158015611bbb57600080fd5b505af1158015611bcf573d6000803e3d6000fd5b50505060008481526076602052604081209150611bee828888886121ea565b90506001816004811115611c0457611c04613ce1565b03611c7657815460ff1916600217825560405163114fc47560e11b81526001600160a01b0385169063229f88ea90611c439060019089906004016144bc565b600060405180830381600087803b158015611c5d57600080fd5b505af1158015611c71573d6000803e3d6000fd5b505050505b5050600101611afa565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b148061099357506301ffc9a760e01b6001600160e01b0319831614610993565b60005460ff1615610f4c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610dfa565b611d20611d1b368590038501604086016147aa565b612964565b611d29836129df565b6000611d44611d3e6040860160208701613ca2565b83611280565b80519091506001811115611d5a57611d5a613ce1565b611d6a60608601604087016147c6565b6001811115611d7b57611d7b613ce1565b14611d985760405162035e2b60ea1b815260040160405180910390fd5b611dc78330611dad6040880160208901613ca2565b611dbf36899003890160408a016147aa565b929190612a5d565b611dd78483858460200151612c5c565b5050505050565b611de8600b611882565b604051635a02d57960e11b81523360048201526001600160a01b03919091169063b405aaf290602401602060405180830381865afa158015611e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5291906147e3565b610f4c576000356001600160e01b0319166006604051620f948f60ea1b8152600401610dfa929190614805565b82516080840151611e8f90612964565b600084602001516001811115611ea757611ea7613ce1565b14611ec55760405163182f3d8760e11b815260040160405180910390fd5b4684606001516040015114611f13576060840151604090810151905163092048d160e11b81526001600160e01b03196000351660048201526024810191909152466044820152606401610dfa565b6000611f2f856060015160200151866040015160400151611280565b6080860151519091506001811115611f4957611f49613ce1565b81516001811115611f5c57611f5c613ce1565b148015611f8657508460400151602001516001600160a01b031681602001516001600160a01b0316145b611fa35760405163f4b8742f60e01b815260040160405180910390fd5b6040808601518101516000908152606f6020908152828220858352905290812090611fcd87612120565b90506000611fdd838888856121ea565b905087604001516040015185886001600160a01b03167f48c4262ed68beb92fe5d7d48d70772e49cd50c317937dea60a99f15f794b64598560405161202491815260200190565b60405180910390a4600181600481111561204057612040613ce1565b0361187857825460ff191660021783556060880151805160209091015160808a015161206f9290916000612de6565b6120796003611882565b885160405163114fc47560e11b81526001600160a01b03929092169163229f88ea916120ab91600091906004016144bc565b600060405180830381600087803b1580156120c557600080fd5b505af11580156120d9573d6000803e3d6000fd5b505050507f8d20d8121a34dded9035ff5b43e901c142824f7a22126392992c353c37890524828960405161210e9291906144d7565b60405180910390a15050505050505050565b6000806121308360400151613102565b905060006121418460600151613102565b905060006121958560800151604080517f1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d815282516020808301919091528301518183015291015160608201526080902090565b604080517fb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea815287516020808301919091529097015190870152606086019390935250608084015260a08301525060c0902090565b60006121f785858461314a565b60006122038684613200565b90506122118685838661330e565b9695505050505050565b612225813361335a565b50565b61223282826133be565b6000828152606c60205260409020610db79082613444565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561228057612280613ce1565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156122c1576122c1613ce1565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b6122f88282613459565b6000828152606c60205260409020610db790826134c0565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314610f4c576000356001600160e01b0319166001604051620f948f60ea1b8152600401610dfa929190614805565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314806123ac57506005546001600160a01b031633145b610f4c576000356001600160e01b0319166001604051620f948f60ea1b8152600401610dfa929190614805565b6123e16134d5565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b828114612459576000356001600160e01b0319166040516306b5667560e21b8152600401610dfa91906145fc565b60005b838110156124ca57828282818110612476576124766144a6565b9050602002013560386000878785818110612493576124936144a6565b90506020020160208101906124a89190613ca2565b6001600160a01b0316815260208101919091526040016000205560010161245c565b507f6f52f53a938df83439fa4c6055c7df0a6906d621aa6dfa4708187037fdfc41da8484848460405161250094939291906148a1565b60405180910390a150505050565b600080828411156125325760405163964a4d2760e01b815260040160405180910390fd5b505060018054600254607885905560798490556004805493840190556040805183815260208101839052929391928592879290917feac82d4d949d2d4f77f96aa68ab6b1bb750da73f14e55d41a1b93f387471ecba91015b60405180910390a49250929050565b60006125a5600b611882565b6001600160a01b03166306aba0e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d91906148d3565b600060025460016002548460015461261e91906145e5565b61262891906148ec565b61263291906148ff565b6109939190614912565b612644611cc0565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861240e3390565b806001600160a01b03163b60000361222557604051630bfc64a360e21b81526001600160a01b0382166004820152602401610dfa565b6000610f0b838361351e565b6109ac8282612228565b600080828411156126f7576000356001600160e01b0319166040516387f6f09560e01b8152600401610dfa91906145fc565b50506001805460028054858455908490556004805493840190556040805183815260208101839052929391928592879290917f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910161258a565b868514801561275f57508683145b61278a576000356001600160e01b0319166040516306b5667560e21b8152600401610dfa91906145fc565b60005b8781101561291c578686828181106127a7576127a76144a6565b90506020020160208101906127bc9190613ca2565b607360008b8b858181106127d2576127d26144a6565b90506020020160208101906127e79190613ca2565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087878581811061281b5761281b6144a6565b90506020020135815260200190815260200160002060000160016101000a8154816001600160a01b0302191690836001600160a01b03160217905550828282818110612869576128696144a6565b905060200201602081019061287e91906147c6565b607360008b8b85818110612894576128946144a6565b90506020020160208101906128a99190613ca2565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008787858181106128dd576128dd6144a6565b60209081029290920135835250810191909152604001600020805460ff19166001838181111561290f5761290f613ce1565b021790555060010161278d565b507f2544bff60c6d5b84946e06804af9f84e150bbee85238dbdee79efca4e0adf401888888888888888860405161210e989796959493929190614934565b6000610993825490565b60008151600181111561297957612979613ce1565b14801561298a575060008160400151115b801561299857506020810151155b806129c257506001815160018111156129b3576129b3613ce1565b1480156129c257506040810151155b6122255760405163034992a760e51b815260040160405180910390fd5b60006129f160608301604084016147c6565b6001811115612a0257612a02613ce1565b148015612a3f575060386000612a1e6040840160208501613ca2565b6001600160a01b031681526020810191909152604001600020546080820135105b1561222557604051636eff4a8560e11b815260040160405180910390fd5b600060608186516001811115612a7557612a75613ce1565b03612b525760408681015181516001600160a01b038881166024830152878116604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b03166323b872dd60e01b179052915191851691612ade91906149c3565b6000604051808303816000865af19150503d8060008114612b1b576040519150601f19603f3d011682016040523d82523d6000602084013e612b20565b606091505b509092509050818015612b4b575080511580612b4b575080806020019051810190612b4b91906147e3565b9150612c36565b600186516001811115612b6757612b67613ce1565b03612c1d57602086810151604080516001600160a01b0389811660248301528881166044830152606480830194909452825180830390940184526084909101825292820180516001600160e01b03166323b872dd60e01b1790525191851691612bd091906149c3565b6000604051808303816000865af19150503d8060008114612c0d576040519150601f19603f3d011682016040523d82523d6000602084013e612c12565b606091505b505080925050612c36565b6040516361e411a760e11b815260040160405180910390fd5b81610a4d5785858585604051639d2e4c6760e01b8152600401610dfa94939291906149df565b606e805460009182612c6d83614a15565b9091555090506000612c9484838588612c8b368c90038c018c614a2e565b93929190613548565b60008381526071602090815260409091208251815590820151600180830180549495508594909160ff19909116908381811115612cd357612cd3613ce1565b021790555060408281015180516002840180546001600160a01b039283166001600160a01b03199182161790915560208084015160038701805491851691841691909117905592840151600486015560608601518051600587018054918516918416919091179055928301516006860180549190931691161790550151600782015560808201518051600883018054909190829060ff191660018381811115612d7e57612d7e613ce1565b0217905550602082015181600101556040820151816002015550509050507ff313c253a5be72c29d0deb2c8768a9543744ac03d6b3cafd50cc976f1c2632fc612dc682612120565b82604051612dd59291906144d7565b60405180910390a150949350505050565b6000816001600160a01b0316836001600160a01b031603612e955760408086015190516001600160a01b0386169180156108fc02916000818181858888f19350505050612e9057816001600160a01b031663d0e30db086604001516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e6c57600080fd5b505af1158015612e80573d6000803e3d6000fd5b5050505050612e908585856135b4565b611dd7565b600085516001811115612eaa57612eaa613ce1565b03613013576040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015612ef6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f1a91906148d3565b9050856040015181101561300257836001600160a01b03166340c10f1930838960400151612f4891906148ff565b6040516001600160a01b03909216602483015260448201526064016040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612f9c91906149c3565b6000604051808303816000865af19150503d8060008114612fd9576040519150601f19603f3d011682016040523d82523d6000602084013e612fde565b606091505b5050809250508161300257604051632f739fff60e11b815260040160405180910390fd5b61300d8686866135b4565b50611dd7565b60018551600181111561302857613028613ce1565b03612c1d5761303c83858760200151613632565b612e9057602085810151604080516001600160a01b038881166024830152604480830194909452825180830390940184526064909101825292820180516001600160e01b03166340c10f1960e01b179052519185169161309c91906149c3565b6000604051808303816000865af19150503d80600081146130d9576040519150601f19603f3d011682016040523d82523d6000602084013e6130de565b606091505b50508091505080612e905760405163c8e3a09f60e01b815260040160405180910390fd5b604080517f353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764815282516020808301919091528301518183015291015160608201526080902090565b60008360030154118015613162575042836003015411155b1561317357825460ff191660041783555b6001600160a01b0382166000908152600284016020526040902054156131b75760405163025fd59560e41b81526001600160a01b0383166004820152602401610dfa565b6001600160a01b039091166000818152600284016020908152604082209390935560059093018054600181018255908452919092200180546001600160a01b0319169091179055565b600080600061320f600b611882565b6001600160a01b031663c441c4a86040518163ffffffff1660e01b8152600401600060405180830381865afa15801561324c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526132749190810190614b18565b81519194509250905060005b8181101561330457858760020160008684815181106132a1576132a16144a6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054036132fc578281815181106132e1576132e16144a6565b60200260200101516bffffffffffffffffffffffff16850194505b600101613280565b5050505092915050565b600083831015801561333557506000855460ff16600481111561333357613333613ce1565b145b1561334d57845460ff19166001908117865585018290555b5050915460ff1692915050565b61336482826114a7565b6109ac5761337c816001600160a01b031660146136dd565b6133878360206136dd565b604051602001613398929190614c10565b60408051601f198184030181529082905262461bcd60e51b8252610dfa91600401614c85565b6133c882826114a7565b6109ac576000828152606b602090815260408083206001600160a01b03851684529091529020805460ff191660011790556134003390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f0b836001600160a01b038416613878565b61346382826114a7565b156109ac576000828152606b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f0b836001600160a01b0384166138c7565b60005460ff16610f4c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610dfa565b6000826000018281548110613535576135356144a6565b9060005260206000200154905092915050565b613550613a8d565b92835260016020808501919091526060840180516001600160a01b0396871690528682015181519087169083015251466040918201528651818601805191881690915280519490961693909101929092529251810192909252910151608082015290565b600080845160018111156135ca576135ca613ce1565b036135e5576135de828486604001516139ba565b905061360e565b6001845160018111156135fa576135fa613ce1565b03612c1d576135de82848660200151613632565b80611178578383836040516341bd7d9160e11b8152600401610dfa93929190614c98565b604080513060248201526001600160a01b038481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092861691613690916149c3565b6000604051808303816000865af19150503d80600081146136cd576040519150601f19603f3d011682016040523d82523d6000602084013e6136d2565b606091505b509095945050505050565b606060006136ec8360026145e5565b6136f79060026148ec565b6001600160401b0381111561370e5761370e6142ca565b6040519080825280601f01601f191660200182016040528015613738576020820181803683370190505b509050600360fc1b81600081518110613753576137536144a6565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613782576137826144a6565b60200101906001600160f81b031916908160001a90535060006137a68460026145e5565b6137b19060016148ec565b90505b6001811115613829576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106137e5576137e56144a6565b1a60f81b8282815181106137fb576137fb6144a6565b60200101906001600160f81b031916908160001a90535060049490941c9361382281614cc8565b90506137b4565b508315610f0b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610dfa565b60008181526001830160205260408120546138bf57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610993565b506000610993565b600081815260018301602052604081205480156139b05760006138eb6001836148ff565b85549091506000906138ff906001906148ff565b905081811461396457600086600001828154811061391f5761391f6144a6565b9060005260206000200154905080876000018481548110613942576139426144a6565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061397557613975614cdf565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610993565b6000915050610993565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009260609290871691613a1791906149c3565b6000604051808303816000865af19150503d8060008114613a54576040519150601f19603f3d011682016040523d82523d6000602084013e613a59565b606091505b509092509050818015613a84575080511580613a84575080806020019051810190613a8491906147e3565b95945050505050565b6040805160a08101825260008082526020808301829052835160608082018652838252818301849052818601849052848601919091528451808201865283815280830184905280860184905281850152845190810185528281529081018290529283015290608082015290565b600060208284031215613b0c57600080fd5b81356001600160e01b031981168114610f0b57600080fd5b60008082840360c0811215613b3857600080fd5b60a0811215613b4657600080fd5b50919360a08501359350915050565b60006101608284031215613b6857600080fd5b50919050565b60008083601f840112613b8057600080fd5b5081356001600160401b03811115613b9757600080fd5b6020830191508360208260051b850101111561137457600080fd5b60008060208385031215613bc557600080fd5b82356001600160401b03811115613bdb57600080fd5b613be785828601613b6e565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015613c2d578351151583529284019291840191600101613c0f565b50909695505050505050565b600060208284031215613c4b57600080fd5b5035919050565b6001600160a01b038116811461222557600080fd5b80356118f881613c52565b60008060408385031215613c8557600080fd5b823591506020830135613c9781613c52565b809150509250929050565b600060208284031215613cb457600080fd5b8135610f0b81613c52565b60008060408385031215613cd257600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6080810160058610613d0b57613d0b613ce1565b9481526020810193909352604083019190915260609091015290565b600080600060408486031215613d3c57600080fd5b83356001600160401b0380821115613d5357600080fd5b818601915086601f830112613d6757600080fd5b813581811115613d7657600080fd5b87602060a083028501011115613d8b57600080fd5b6020928301989097509590910135949350505050565b60008060408385031215613db457600080fd5b8235613dbf81613c52565b946020939093013593505050565b6002811061222557612225613ce1565b81516040820190613ded81613dcd565b82526020928301516001600160a01b0316929091019190915290565b60008060008060408587031215613e1f57600080fd5b84356001600160401b0380821115613e3657600080fd5b613e4288838901613b6e565b90965094506020870135915080821115613e5b57600080fd5b50613e6887828801613b6e565b95989497509550505050565b80516001600160a01b03908116835260208083015190911690830152604090810151910152565b8051613ea681613dcd565b825260208181015190830152604090810151910152565b8581526101608101613ece86613dcd565b856020830152613ee16040830186613e74565b613eee60a0830185613e74565b612211610100830184613e9b565b8035601081106118f857600080fd5b60008060408385031215613f1e57600080fd5b613f2783613efc565b91506020830135613c9781613c52565b806040810183101561099357600080fd5b60008060008060008060008060008060006101208c8e031215613f6a57600080fd5b613f738c613c67565b9a5060208c0135995060408c0135985060608c0135975060808c013596506001600160401b038060a08e01351115613faa57600080fd5b613fba8e60a08f01358f01613b6e565b909750955060c08d0135811015613fd057600080fd5b613fe08e60c08f01358f01613f37565b94508060e08e01351115613ff357600080fd5b6140038e60e08f01358f01613f37565b9350806101008e0135111561401757600080fd5b506140298d6101008e01358e01613b6e565b81935080925050509295989b509295989b9093969950565b6000806020838503121561405457600080fd5b82356001600160401b038082111561406b57600080fd5b818501915085601f83011261407f57600080fd5b81358181111561408e57600080fd5b866020610160830285010111156140a457600080fd5b60209290920196919550909350505050565b6000806000806000806000806080898b0312156140d257600080fd5b88356001600160401b03808211156140e957600080fd5b6140f58c838d01613b6e565b909a50985060208b013591508082111561410e57600080fd5b61411a8c838d01613b6e565b909850965060408b013591508082111561413357600080fd5b61413f8c838d01613b6e565b909650945060608b013591508082111561415857600080fd5b506141658b828c01613b6e565b999c989b5096995094979396929594505050565b60006020828403121561418b57600080fd5b610f0b82613efc565b6000806000604084860312156141a957600080fd5b8335925060208401356001600160401b038111156141c657600080fd5b6141d286828701613b6e565b9497909650939450505050565b60005b838110156141fa5781810151838201526020016141e2565b50506000910152565b6000815180845261421b8160208601602086016141df565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561428457603f19888603018452614272858351614203565b94509285019290850190600101614256565b5092979650505050505050565b6000806000606084860312156142a657600080fd5b833592506020840135915060408401356142bf81613c52565b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614302576143026142ca565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614330576143306142ca565b604052919050565b6002811061222557600080fd5b60006060828403121561435757600080fd5b61435f6142e0565b9050813561436c81613c52565b8152602082013561437c81613c52565b806020830152506040820135604082015292915050565b6000606082840312156143a557600080fd5b6143ad6142e0565b905081356143ba81614338565b80825250602082013560208201526040820135604082015292915050565b600061016082840312156143eb57600080fd5b60405160a081018181106001600160401b038211171561440d5761440d6142ca565b60405282358152602083013561442281614338565b60208201526144348460408501614345565b60408201526144468460a08501614345565b6060820152614459846101008501614393565b60808201529392505050565b6003811061447557614475613ce1565b9052565b606081016144878286614465565b60208201939093526001600160a01b0391909116604090910152919050565b634e487b7160e01b600052603260045260246000fd5b604081016144ca8285614465565b8260208301529392505050565b6000610180820190508382528251602083015260208301516144f881613dcd565b8060408401525060408301516145116060840182613e74565b50606083015161452460c0840182613e74565b506080830151611a5c610120840182613e9b565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6000808335601e1984360301811261459d57600080fd5b8301803591506001600160401b038211156145b757600080fd5b6020019150600581901b360382131561137457600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610993576109936145cf565b6001600160e01b031991909116815260200190565b602081016010831061462557614625613ce1565b91905290565b600181811c9082168061463f57607f821691505b602082108103613b6857634e487b7160e01b600052602260045260246000fd5b6000808335601e1984360301811261467657600080fd5b8301803591506001600160401b0382111561469057600080fd5b60200191503681900382131561137457600080fd5b601f821115610db757600081815260208120601f850160051c810160208610156146cc5750805b601f850160051c820191505b81811015610a4d578281556001016146d8565b6001600160401b03831115614702576147026142ca565b61471683614710835461462b565b836146a5565b6000601f84116001811461474a57600085156147325750838201355b600019600387901b1c1916600186901b178355611dd7565b600083815260209020601f19861690835b8281101561477b578685013582556020948501946001909201910161475b565b50868210156147985760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000606082840312156147bc57600080fd5b610f0b8383614393565b6000602082840312156147d857600080fd5b8135610f0b81614338565b6000602082840312156147f557600080fd5b81518015158114610f0b57600080fd5b6001600160e01b03198316815260408101600b83106144ca576144ca613ce1565b8183526000602080850194508260005b8581101561486457813561484981613c52565b6001600160a01b031687529582019590820190600101614836565b509495945050505050565b81835260006001600160fb1b0383111561488857600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006148b5604083018688614826565b82810360208401526148c881858761486f565b979650505050505050565b6000602082840312156148e557600080fd5b5051919050565b80820180821115610993576109936145cf565b81810381811115610993576109936145cf565b60008261492f57634e487b7160e01b600052601260045260246000fd5b500490565b608081526000614948608083018a8c614826565b60208382038185015261495c828a8c614826565b9150838203604085015261497182888a61486f565b8481036060860152858152869250810160005b868110156149b257833561499781614338565b6149a081613dcd565b82529282019290820190600101614984565b509c9b505050505050505050505050565b600082516149d58184602087016141df565b9190910192915050565b60c081016149ed8287613e9b565b6001600160a01b0394851660608301529284166080820152921660a090920191909152919050565b600060018201614a2757614a276145cf565b5060010190565b600060a08284031215614a4057600080fd5b614a486142e0565b8235614a5381613c52565b81526020830135614a6381613c52565b6020820152614a758460408501614393565b60408201529392505050565b60006001600160401b03821115614a9a57614a9a6142ca565b5060051b60200190565b600082601f830112614ab557600080fd5b81516020614aca614ac583614a81565b614308565b82815260059290921b84018101918181019086841115614ae957600080fd5b8286015b84811015614b0d578051614b0081613c52565b8352918301918301614aed565b509695505050505050565b600080600060608486031215614b2d57600080fd5b83516001600160401b0380821115614b4457600080fd5b614b5087838801614aa4565b9450602091508186015181811115614b6757600080fd5b614b7388828901614aa4565b945050604086015181811115614b8857600080fd5b86019050601f81018713614b9b57600080fd5b8051614ba9614ac582614a81565b81815260059190911b82018301908381019089831115614bc857600080fd5b928401925b82841015614c015783516bffffffffffffffffffffffff81168114614bf25760008081fd5b82529284019290840190614bcd565b80955050505050509250925092565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614c488160178501602088016141df565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614c798160288401602088016141df565b01602801949350505050565b602081526000610f0b6020830184614203565b60a08101614ca68286613e9b565b6001600160a01b03938416606083015291909216608090920191909152919050565b600081614cd757614cd76145cf565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220ec5e4d67a54601fd535977c8db3ac6acad4decf9c225f2e4583ebaf312358ccc64736f6c63430008110033", - "devdoc": { "errors": { "ErrAlreadyVoted(address)": [ { @@ -2189,6 +198,11 @@ "details": "Error of invalid role." } ], + "ErrERC1155MintingFailed()": [ + { + "details": "Error indicating that the mint of ERC1155 tokens has failed." + } + ], "ErrERC20MintingFailed()": [ { "details": "Error indicating that the minting of ERC20 tokens has failed." @@ -2277,7 +291,7 @@ ], "ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)": [ { - "details": "Error indicating that the `transferFrom` has failed.", + "details": "Error indicating that the `handleAssetIn` has failed.", "params": { "from": "Owner of the token value.", "to": "Receiver of the token value.", @@ -2320,379 +334,216 @@ "details": "Error of set to non-contract." } ] - }, - "kind": "dev", - "methods": { - "bulkRequestWithdrawalFor((address,address,(uint8,uint256,uint256))[],uint256)": { - "details": "Bulk requests withdrawals. Emits the `WithdrawalRequested` events." - }, - "bulkSubmitWithdrawalSignatures(uint256[],bytes[])": { - "details": "Submits withdrawal signatures. Requirements: - The method caller is a validator." - }, - "checkThreshold(uint256)": { - "details": "Checks whether the `_voteWeight` passes the threshold." - }, - "depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { - "details": "Deposits based on the receipt. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released." - }, - "depositVoted(uint256,uint256,address)": { - "details": "Returns whether the deposit is casted by the voter." - }, - "getContract(uint8)": { - "details": "Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.", - "params": { - "contractType": "The role of the contract to retrieve." - }, - "returns": { - "contract_": "The address of the contract with the specified role." - } - }, - "getMainchainToken(address,uint256)": { - "details": "Returns mainchain token address. Reverts for unsupported token." - }, - "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." - }, - "getThreshold()": { - "details": "Returns the threshold." - }, - "getTrustedThreshold()": { - "details": "Returns the threshold about trusted org." - }, - "getWithdrawalSignatures(uint256,address[])": { - "details": "Returns withdrawal signatures." - }, - "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. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "initialize(address,uint256,uint256,uint256,uint256,address[],address[][2],uint256[][2],uint8[])": { - "details": "Initializes contract storage." - }, - "mainchainWithdrew(uint256)": { - "details": "Returns whether the withdrawal is done on mainchain." - }, - "mainchainWithdrewVoted(uint256,address)": { - "details": "Returns whether the mainchain withdrew is casted by the voter." - }, - "mapTokens(address[],address[],uint256[],uint8[])": { - "details": "Maps Ronin tokens to mainchain networks. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event." - }, - "minimumVoteWeight()": { - "details": "Returns the minimum vote weight to pass the threshold." - }, - "pause()": { - "details": "Triggers paused state." - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." - }, - "requestWithdrawalFor((address,address,(uint8,uint256,uint256)),uint256)": { - "details": "Locks the assets and request withdrawal. Emits the `WithdrawalRequested` event." - }, - "requestWithdrawalSignatures(uint256)": { - "details": "Requests withdrawal signatures for a specific withdrawal. Emits the `WithdrawalSignaturesRequested` event." - }, - "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. May emit a {RoleRevoked} event." - }, - "setContract(uint8,address)": { - "details": "Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.", - "params": { - "addr": "The address of the contract to set.", - "contractType": "The role of the contract to set." - } - }, - "setEmergencyPauser(address)": { - "details": "Grant emergency pauser role for `_addr`." - }, - "setMinimumThresholds(address[],uint256[])": { - "details": "Sets the minimum thresholds to withdraw. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `MinimumThresholdsUpdated` event." - }, - "setThreshold(uint256,uint256)": { - "details": "Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event." - }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, - "tryBulkAcknowledgeMainchainWithdrew(uint256[])": { - "details": "Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal vote is already done before. Requirements: - The method caller is a validator. Emits the `MainchainWithdrew` once the valid call passes the quorum threshold." - }, - "tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])": { - "details": "Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote is already done before. Reverts if the deposit is invalid or is voted by the validator again. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released." - }, - "unpause()": { - "details": "Triggers unpaused state." - } - }, - "stateVariables": { - "____deprecated0": { - "custom:deprecated": "Previously `_validatorContract` (non-zero value)" - }, - "____deprecated1": { - "custom:deprecated": "Previously `_bridgeTrackingContract` (non-zero value)" - }, - "____deprecated2": { - "custom:deprecated": "Previously `_trustedOrgContract` (non-zero value)" - }, - "___deprecated4": { - "custom:deprecated": "Previously `withdrawalMigrated` (non-zero value)" - }, - "_mainchainToken": { - "details": "Mapping from token address => chain id => mainchain token address" - }, - "_withdrawalSig": { - "details": "Mapping from withdrawal id => validator address => signatures" - }, - "depositVote": { - "details": "Mapping from chain id => deposit id => deposit vote" - }, - "mainchainWithdrewVote": { - "details": "Mapping from withdrawal id => mainchain withdrew vote" - }, - "withdrawal": { - "details": "Mapping from withdrawal id => withdrawal receipt" - }, - "withdrawalCount": { - "details": "Total withdrawal" - }, - "withdrawalStatVote": { - "details": "Mapping from withdrawal id => vote for recording withdrawal stats" - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { - "notice": "The assets will be transferred whenever the valid call passes the quorum threshold." - }, - "tryBulkAcknowledgeMainchainWithdrew(uint256[])": { - "notice": "Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time." - }, - "tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])": { - "notice": "The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time." - } - }, - "version": 1 + } }, + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrAlreadyVoted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrERC1155MintingFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrERC20MintingFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrERC721MintingFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrEmptyArray\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ErrInvalidChainId\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInfo\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidReceipt\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidReceiptKind\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidRequest\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidTokenStandard\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidTrustedThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrQueryForTooSmallQuantity\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"tokenInfo\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"token\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrTokenCouldNotTransfer\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"tokenInfo\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"from\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"to\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"token\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrTokenCouldNotTransferFrom\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrUnsupportedStandard\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrUnsupportedToken\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrWithdrawalsMigrated\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrWithdrawnOnMainchainAlready\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeOperator\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"DepositVoted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"receipt\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"Deposited\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"receipt\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"MainchainWithdrew\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"tokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"threshold\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"MinimumThresholdsUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"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\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"roninTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"mainchainTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"chainIds\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum TokenStandard[]\\\",\\\"name\\\":\\\"standards\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"TokenMapped\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"roninTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"chainIds\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"TokenUnmapped\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"TrustedThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"Unpaused\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"WithdrawalRequested\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"receiptHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"WithdrawalSignaturesRequested\\\",\\\"type\\\":\\\"event\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"fallback\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DEFAULT_ADMIN_ROLE\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"recipientAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct Transfer.Request[]\\\",\\\"name\\\":\\\"requests\\\",\\\"type\\\":\\\"tuple[]\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"bulkRequestWithdrawalFor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"withdrawals\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"bulkSubmitWithdrawalSignatures\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct Transfer.Receipt\\\",\\\"name\\\":\\\"_receipt\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"depositFor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"depositVote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"finalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiredAt\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"createdAt\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_depositId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"depositVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"emergencyPauser\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_roninToken\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getMainchainToken\\\",\\\"outputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"}],\\\"internalType\\\":\\\"struct MappedTokenConsumer.MappedToken\\\",\\\"name\\\":\\\"_token\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"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\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num_\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom_\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getTrustedThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"trustedNum_\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"trustedDenom_\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"withdrawalId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"operators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"getWithdrawalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"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\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_roleSetter\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_trustedNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_trustedDenominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[][2]\\\",\\\"name\\\":\\\"_packedAddresses\\\",\\\"type\\\":\\\"address[][2]\\\"},{\\\"internalType\\\":\\\"uint256[][2]\\\",\\\"name\\\":\\\"_packedNumbers\\\",\\\"type\\\":\\\"uint256[][2]\\\"},{\\\"internalType\\\":\\\"enum TokenStandard[]\\\",\\\"name\\\":\\\"_standards\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"initialize\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"initializeV2\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeAdmin\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"initializeV3\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_withdrawalId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"mainchainWithdrew\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"mainchainWithdrewVote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"finalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiredAt\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"createdAt\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_withdrawalId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"mainchainWithdrewVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_roninTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_mainchainTokens\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"_chainIds\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"enum TokenStandard[]\\\",\\\"name\\\":\\\"_standards\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"mapTokens\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"roninTokens_\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"mainchainTokens_\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"chainIds_\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"enum TokenStandard[]\\\",\\\"name\\\":\\\"standards_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"minimumThresholds_\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"mapTokensWithMinThresholds\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"mainchainToken\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"minimumThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"nonce\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"onERC1155BatchReceived\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"onERC1155Received\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"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\\\":\\\"bytes32\\\",\\\"name\\\":\\\"role\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"account\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"renounceRole\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"recipientAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct Transfer.Request\\\",\\\"name\\\":\\\"_request\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"requestWithdrawalFor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_withdrawalId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"requestWithdrawalSignatures\\\",\\\"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\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setEmergencyPauser\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"mainchainTokens_\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"thresholds_\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"setMinimumThresholds\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_denominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_trustedNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_trustedDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setTrustedThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"supportsInterface\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"_withdrawalIds\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"tryBulkAcknowledgeMainchainWithdrew\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"_executedReceipts\\\",\\\"type\\\":\\\"bool[]\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct Transfer.Receipt[]\\\",\\\"name\\\":\\\"receipts\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"tryBulkDepositFor\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"_executedReceipts\\\",\\\"type\\\":\\\"bool[]\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"roninTokens_\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"chainIds_\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"unmapTokens\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"withdrawal\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"enum Transfer.Kind\\\",\\\"name\\\":\\\"kind\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"mainchain\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"tokenAddr\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenOwner\\\",\\\"name\\\":\\\"ronin\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"enum TokenStandard\\\",\\\"name\\\":\\\"erc\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"quantity\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"internalType\\\":\\\"struct TokenInfo\\\",\\\"name\\\":\\\"info\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"withdrawalCount\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"withdrawalStatVote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"finalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiredAt\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"createdAt\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"stateMutability\\\":\\\"payable\\\",\\\"type\\\":\\\"receive\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrAlreadyVoted(address)\\\":[{\\\"details\\\":\\\"Error indicating that a voter has already voted.\\\",\\\"params\\\":{\\\"voter\\\":\\\"The address of the voter who has already voted.\\\"}}],\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrERC1155MintingFailed()\\\":[{\\\"details\\\":\\\"Error indicating that the mint of ERC1155 tokens has failed.\\\"}],\\\"ErrERC20MintingFailed()\\\":[{\\\"details\\\":\\\"Error indicating that the minting of ERC20 tokens has failed.\\\"}],\\\"ErrERC721MintingFailed()\\\":[{\\\"details\\\":\\\"Error indicating that the minting of ERC721 tokens has failed.\\\"}],\\\"ErrEmptyArray()\\\":[{\\\"details\\\":\\\"Error indicating that an array is empty when it should contain elements.\\\"}],\\\"ErrInvalidChainId(bytes4,uint256,uint256)\\\":[{\\\"details\\\":\\\"Error indicating that the chain ID is invalid.\\\",\\\"params\\\":{\\\"actual\\\":\\\"Current chain ID that executing function.\\\",\\\"expected\\\":\\\"Expected chain ID required for the tx to success.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\"}}],\\\"ErrInvalidInfo()\\\":[{\\\"details\\\":\\\"Error indicating that the provided information is invalid.\\\"}],\\\"ErrInvalidReceipt()\\\":[{\\\"details\\\":\\\"Error indicating that a receipt is invalid.\\\"}],\\\"ErrInvalidReceiptKind()\\\":[{\\\"details\\\":\\\"Error indicating that a receipt kind is invalid.\\\"}],\\\"ErrInvalidRequest()\\\":[{\\\"details\\\":\\\"Error indicating that a request is invalid.\\\"}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidTokenStandard()\\\":[{\\\"details\\\":\\\"Error indicating that a token standard is invalid.\\\"}],\\\"ErrInvalidTrustedThreshold()\\\":[{\\\"details\\\":\\\"Error thrown when an invalid trusted threshold is specified.\\\"}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrQueryForTooSmallQuantity()\\\":[{\\\"details\\\":\\\"Throwed when the ERC20 withdrawal quantity is less than the minimum threshold.\\\"}],\\\"ErrTokenCouldNotTransfer((uint8,uint256,uint256),address,address)\\\":[{\\\"details\\\":\\\"Error indicating that the `transfer` has failed.\\\",\\\"params\\\":{\\\"to\\\":\\\"Receiver of the token value.\\\",\\\"token\\\":\\\"Address of the token.\\\",\\\"tokenInfo\\\":\\\"Info of the token including ERC standard, id or quantity.\\\"}}],\\\"ErrTokenCouldNotTransferFrom((uint8,uint256,uint256),address,address,address)\\\":[{\\\"details\\\":\\\"Error indicating that the `handleAssetIn` has failed.\\\",\\\"params\\\":{\\\"from\\\":\\\"Owner of the token value.\\\",\\\"to\\\":\\\"Receiver of the token value.\\\",\\\"token\\\":\\\"Address of the token.\\\",\\\"tokenInfo\\\":\\\"Info of the token including ERC standard, id or quantity.\\\"}}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnsupportedStandard()\\\":[{\\\"details\\\":\\\"Error indicating that an unsupported standard is encountered.\\\"}],\\\"ErrUnsupportedToken()\\\":[{\\\"details\\\":\\\"Error indicating that a token is not supported.\\\"}],\\\"ErrWithdrawalsMigrated()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to withdraw funds that have already been migrated.\\\"}],\\\"ErrWithdrawnOnMainchainAlready()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to withdraw funds that have already been withdrawn on the mainchain.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"DepositVoted(address,uint256,uint256,bytes32)\\\":{\\\"details\\\":\\\"Emitted when a deposit is voted\\\"},\\\"Deposited(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Emitted when the assets are depositted\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"MainchainWithdrew(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Emitted when the assets are withdrawn on mainchain\\\"},\\\"MinimumThresholdsUpdated(address[],uint256[])\\\":{\\\"details\\\":\\\"Emitted when the minimum thresholds are updated\\\"},\\\"Paused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is triggered by `account`.\\\"},\\\"RoleAdminChanged(bytes32,bytes32,bytes32)\\\":{\\\"details\\\":\\\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\\\"},\\\"RoleGranted(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\\\"},\\\"RoleRevoked(bytes32,address,address)\\\":{\\\"details\\\":\\\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"},\\\"TokenMapped(address[],address[],uint256[],uint8[])\\\":{\\\"details\\\":\\\"Emitted when the tokens are mapped\\\"},\\\"TokenUnmapped(address[],uint256[])\\\":{\\\"details\\\":\\\"Emitted when the tokens are unmapped\\\"},\\\"TrustedThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"},\\\"Unpaused(address)\\\":{\\\"details\\\":\\\"Emitted when the pause is lifted by `account`.\\\"},\\\"WithdrawalRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Emitted when the withdrawal is requested\\\"},\\\"WithdrawalSignaturesRequested(bytes32,(uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Emitted when the withdrawal signatures is requested\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"bulkRequestWithdrawalFor((address,address,(uint8,uint256,uint256))[],uint256)\\\":{\\\"details\\\":\\\"Bulk requests withdrawals. Emits the `WithdrawalRequested` events.\\\"},\\\"bulkSubmitWithdrawalSignatures(uint256[],bytes[])\\\":{\\\"details\\\":\\\"Submits withdrawal signatures. Requirements: - The method caller is a validator.\\\"},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"details\\\":\\\"Deposits based on the receipt. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released.\\\"},\\\"depositVoted(uint256,uint256,address)\\\":{\\\"details\\\":\\\"Returns whether the deposit is casted by the voter.\\\"},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getMainchainToken(address,uint256)\\\":{\\\"details\\\":\\\"Returns mainchain token address. Reverts for unsupported token.\\\"},\\\"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.\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"getTrustedThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold about trusted org.\\\"},\\\"getWithdrawalSignatures(uint256,address[])\\\":{\\\"details\\\":\\\"Returns withdrawal signatures.\\\"},\\\"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. May emit a {RoleGranted} event.\\\"},\\\"hasRole(bytes32,address)\\\":{\\\"details\\\":\\\"Returns `true` if `account` has been granted `role`.\\\"},\\\"initialize(address,uint256,uint256,uint256,uint256,address[],address[][2],uint256[][2],uint8[])\\\":{\\\"details\\\":\\\"Initializes contract storage.\\\"},\\\"mainchainWithdrew(uint256)\\\":{\\\"details\\\":\\\"Returns whether the withdrawal is done on mainchain.\\\"},\\\"mainchainWithdrewVoted(uint256,address)\\\":{\\\"details\\\":\\\"Returns whether the mainchain withdrew is casted by the voter.\\\"},\\\"mapTokens(address[],address[],uint256[],uint8[])\\\":{\\\"details\\\":\\\"Maps Ronin tokens to mainchain networks. Requirement: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `TokenMapped` event.\\\"},\\\"mapTokensWithMinThresholds(address[],address[],uint256[],uint8[],uint256[])\\\":{\\\"details\\\":\\\"Maps Ronin tokens to mainchain networks with minimum withdrawal thresholds.\\\"},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"pause()\\\":{\\\"details\\\":\\\"Triggers paused state.\\\"},\\\"paused()\\\":{\\\"details\\\":\\\"Returns true if the contract is paused, and false otherwise.\\\"},\\\"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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\\\"},\\\"requestWithdrawalFor((address,address,(uint8,uint256,uint256)),uint256)\\\":{\\\"details\\\":\\\"Locks the assets and request withdrawal. Emits the `WithdrawalRequested` event.\\\"},\\\"requestWithdrawalSignatures(uint256)\\\":{\\\"details\\\":\\\"Requests withdrawal signatures for a specific withdrawal. Emits the `WithdrawalSignaturesRequested` event.\\\"},\\\"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. May emit a {RoleRevoked} event.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setEmergencyPauser(address)\\\":{\\\"details\\\":\\\"Grant emergency pauser role for `_addr`.\\\"},\\\"setMinimumThresholds(address[],uint256[])\\\":{\\\"details\\\":\\\"Sets the minimum thresholds to withdraw. Requirements: - The method caller is admin. - The arrays have the same length and its length larger than 0. Emits the `MinimumThresholdsUpdated` event.\\\"},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\\\"},\\\"tryBulkAcknowledgeMainchainWithdrew(uint256[])\\\":{\\\"details\\\":\\\"Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal vote is already done before. Requirements: - The method caller is a validator. Emits the `MainchainWithdrew` once the valid call passes the quorum threshold.\\\"},\\\"tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])\\\":{\\\"details\\\":\\\"Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote is already done before. Reverts if the deposit is invalid or is voted by the validator again. Requirements: - The method caller is a validator. Emits the `Deposited` once the assets are released.\\\"},\\\"unmapTokens(address[],uint256[])\\\":{\\\"details\\\":\\\"Unmaps Ronin tokens and clears the minimum withdrawal thresholds.\\\"},\\\"unpause()\\\":{\\\"details\\\":\\\"Triggers unpaused state.\\\"}},\\\"stateVariables\\\":{\\\"____deprecated0\\\":{\\\"custom:deprecated\\\":\\\"Previously `_validatorContract` (non-zero value)\\\"},\\\"____deprecated1\\\":{\\\"custom:deprecated\\\":\\\"Previously `_bridgeTrackingContract` (non-zero value)\\\"},\\\"____deprecated2\\\":{\\\"custom:deprecated\\\":\\\"Previously `_trustedOrgContract` (non-zero value)\\\"},\\\"___deprecated4\\\":{\\\"custom:deprecated\\\":\\\"Previously `withdrawalMigrated` (non-zero value)\\\"},\\\"_mainchainToken\\\":{\\\"details\\\":\\\"Mapping from token address => chain id => mainchain token address\\\"},\\\"_withdrawalSig\\\":{\\\"details\\\":\\\"Mapping from withdrawal id => validator address => signatures\\\"},\\\"depositVote\\\":{\\\"details\\\":\\\"Mapping from chain id => deposit id => deposit vote\\\"},\\\"mainchainWithdrewVote\\\":{\\\"details\\\":\\\"Mapping from withdrawal id => mainchain withdrew vote\\\"},\\\"withdrawal\\\":{\\\"details\\\":\\\"Mapping from withdrawal id => withdrawal receipt\\\"},\\\"withdrawalCount\\\":{\\\"details\\\":\\\"Total withdrawal\\\"},\\\"withdrawalStatVote\\\":{\\\"details\\\":\\\"Mapping from withdrawal id => vote for recording withdrawal stats\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))\\\":{\\\"notice\\\":\\\"The assets will be transferred whenever the valid call passes the quorum threshold.\\\"},\\\"tryBulkAcknowledgeMainchainWithdrew(uint256[])\\\":{\\\"notice\\\":\\\"Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\\\"},\\\"tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])\\\":{\\\"notice\\\":\\\"The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/ronin/gateway/RoninGatewayV3.sol\\\":\\\"RoninGatewayV3\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"./IERC1155Receiver.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC1155MetadataURI.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the basic standard multi-token.\\\\n * See https://eips.ethereum.org/EIPS/eip-1155\\\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\\\n using Address for address;\\\\n\\\\n // Mapping from token ID to account balances\\\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\\\n\\\\n // Mapping from account to operator approvals\\\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\\\n\\\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\\\n string private _uri;\\\\n\\\\n /**\\\\n * @dev See {_setURI}.\\\\n */\\\\n constructor(string memory uri_) {\\\\n _setURI(uri_);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\\\n return\\\\n interfaceId == type(IERC1155).interfaceId ||\\\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\\\n super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155MetadataURI-uri}.\\\\n *\\\\n * This implementation returns the same URI for *all* token types. It relies\\\\n * on the token type ID substitution mechanism\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\\\n *\\\\n * Clients calling this function must replace the `\\\\\\\\{id\\\\\\\\}` substring with the\\\\n * actual token type ID.\\\\n */\\\\n function uri(uint256) public view virtual override returns (string memory) {\\\\n return _uri;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-balanceOf}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `account` cannot be the zero address.\\\\n */\\\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\\\n require(account != address(0), \\\\\\\"ERC1155: address zero is not a valid owner\\\\\\\");\\\\n return _balances[id][account];\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-balanceOfBatch}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `accounts` and `ids` must have the same length.\\\\n */\\\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\\\n public\\\\n view\\\\n virtual\\\\n override\\\\n returns (uint256[] memory)\\\\n {\\\\n require(accounts.length == ids.length, \\\\\\\"ERC1155: accounts and ids length mismatch\\\\\\\");\\\\n\\\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\\\n\\\\n for (uint256 i = 0; i < accounts.length; ++i) {\\\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\\\n }\\\\n\\\\n return batchBalances;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-setApprovalForAll}.\\\\n */\\\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\\\n _setApprovalForAll(_msgSender(), operator, approved);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-isApprovedForAll}.\\\\n */\\\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\\\n return _operatorApprovals[account][operator];\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-safeTransferFrom}.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) public virtual override {\\\\n require(\\\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n _safeTransferFrom(from, to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\\\n */\\\\n function safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) public virtual override {\\\\n require(\\\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: transfer to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: insufficient balance for transfer\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n _balances[id][to] += amount;\\\\n\\\\n emit TransferSingle(operator, from, to, id, amount);\\\\n\\\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC1155: transfer to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n for (uint256 i = 0; i < ids.length; ++i) {\\\\n uint256 id = ids[i];\\\\n uint256 amount = amounts[i];\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: insufficient balance for transfer\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n _balances[id][to] += amount;\\\\n }\\\\n\\\\n emit TransferBatch(operator, from, to, ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\\\n * substitution mechanism\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\\\n *\\\\n * By this mechanism, any occurrence of the `\\\\\\\\{id\\\\\\\\}` substring in either the\\\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\\\n * clients with the token type ID.\\\\n *\\\\n * For example, the `https://token-cdn-domain/\\\\\\\\{id\\\\\\\\}.json` URI would be\\\\n * interpreted by clients as\\\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\\\n * for token type ID 0x4cce0.\\\\n *\\\\n * See {uri}.\\\\n *\\\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\\\n * this function emits no events.\\\\n */\\\\n function _setURI(string memory newuri) internal virtual {\\\\n _uri = newuri;\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _mint(\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: mint to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _balances[id][to] += amount;\\\\n emit TransferSingle(operator, address(0), to, id, amount);\\\\n\\\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _mintBatch(\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: mint to the zero address\\\\\\\");\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n for (uint256 i = 0; i < ids.length; i++) {\\\\n _balances[ids[i]][to] += amounts[i];\\\\n }\\\\n\\\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `from` must have at least `amount` tokens of token type `id`.\\\\n */\\\\n function _burn(\\\\n address from,\\\\n uint256 id,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC1155: burn from the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n\\\\n emit TransferSingle(operator, from, address(0), id, amount);\\\\n\\\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n */\\\\n function _burnBatch(\\\\n address from,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC1155: burn from the zero address\\\\\\\");\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n\\\\n for (uint256 i = 0; i < ids.length; i++) {\\\\n uint256 id = ids[i];\\\\n uint256 amount = amounts[i];\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n }\\\\n\\\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Approve `operator` to operate on all of `owner` tokens\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n */\\\\n function _setApprovalForAll(\\\\n address owner,\\\\n address operator,\\\\n bool approved\\\\n ) internal virtual {\\\\n require(owner != operator, \\\\\\\"ERC1155: setting approval status for self\\\\\\\");\\\\n _operatorApprovals[owner][operator] = approved;\\\\n emit ApprovalForAll(owner, operator, approved);\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before any token transfer. This includes minting\\\\n * and burning, as well as batched variants.\\\\n *\\\\n * The same hook is called on both single and batched variants. For single\\\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\\\n *\\\\n * Calling conditions (for each `id` and `amount` pair):\\\\n *\\\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\\\n * of token type `id` will be transferred to `to`.\\\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\\\n * for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\\\n * will be burned.\\\\n * - `from` and `to` are never both zero.\\\\n * - `ids` and `amounts` have the same, non-zero length.\\\\n *\\\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after any token transfer. This includes minting\\\\n * and burning, as well as batched variants.\\\\n *\\\\n * The same hook is called on both single and batched variants. For single\\\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\\\n *\\\\n * Calling conditions (for each `id` and `amount` pair):\\\\n *\\\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\\\n * of token type `id` will be transferred to `to`.\\\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\\\n * for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\\\n * will be burned.\\\\n * - `from` and `to` are never both zero.\\\\n * - `ids` and `amounts` have the same, non-zero length.\\\\n *\\\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\\\n */\\\\n function _afterTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {}\\\\n\\\\n function _doSafeTransferAcceptanceCheck(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) private {\\\\n if (to.isContract()) {\\\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\\\n revert(\\\\\\\"ERC1155: ERC1155Receiver rejected tokens\\\\\\\");\\\\n }\\\\n } catch Error(string memory reason) {\\\\n revert(reason);\\\\n } catch {\\\\n revert(\\\\\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\\\\\");\\\\n }\\\\n }\\\\n }\\\\n\\\\n function _doSafeBatchTransferAcceptanceCheck(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) private {\\\\n if (to.isContract()) {\\\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\\\n bytes4 response\\\\n ) {\\\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\\\n revert(\\\\\\\"ERC1155: ERC1155Receiver rejected tokens\\\\\\\");\\\\n }\\\\n } catch Error(string memory reason) {\\\\n revert(reason);\\\\n } catch {\\\\n revert(\\\\\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\\\\\");\\\\n }\\\\n }\\\\n }\\\\n\\\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\\\n uint256[] memory array = new uint256[](1);\\\\n array[0] = element;\\\\n\\\\n return array;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ninterface IERC1155 is IERC165 {\\\\n /**\\\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\\\n */\\\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\\\n\\\\n /**\\\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\\\n * transfers.\\\\n */\\\\n event TransferBatch(\\\\n address indexed operator,\\\\n address indexed from,\\\\n address indexed to,\\\\n uint256[] ids,\\\\n uint256[] values\\\\n );\\\\n\\\\n /**\\\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\\\n * `approved`.\\\\n */\\\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\\\n\\\\n /**\\\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\\\n *\\\\n * If an {URI} event was emitted for `id`, the standard\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\\\n * returned by {IERC1155MetadataURI-uri}.\\\\n */\\\\n event URI(string value, uint256 indexed id);\\\\n\\\\n /**\\\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `account` cannot be the zero address.\\\\n */\\\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `accounts` and `ids` must have the same length.\\\\n */\\\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\\\n external\\\\n view\\\\n returns (uint256[] memory);\\\\n\\\\n /**\\\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `operator` cannot be the caller.\\\\n */\\\\n function setApprovalForAll(address operator, bool approved) external;\\\\n\\\\n /**\\\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\\\n *\\\\n * See {setApprovalForAll}.\\\\n */\\\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes calldata data\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] calldata ids,\\\\n uint256[] calldata amounts,\\\\n bytes calldata data\\\\n ) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev _Available since v3.1._\\\\n */\\\\ninterface IERC1155Receiver is IERC165 {\\\\n /**\\\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\\\n *\\\\n * NOTE: To accept the transfer, this must return\\\\n * `bytes4(keccak256(\\\\\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\\\\\"))`\\\\n * (i.e. 0xf23a6e61, or its own function selector).\\\\n *\\\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\\\n * @param from The address which previously owned the token\\\\n * @param id The ID of the token being transferred\\\\n * @param value The amount of tokens being transferred\\\\n * @param data Additional data with no specified format\\\\n * @return `bytes4(keccak256(\\\\\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\\\\\"))` if transfer is allowed\\\\n */\\\\n function onERC1155Received(\\\\n address operator,\\\\n address from,\\\\n uint256 id,\\\\n uint256 value,\\\\n bytes calldata data\\\\n ) external returns (bytes4);\\\\n\\\\n /**\\\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\\\n * been updated.\\\\n *\\\\n * NOTE: To accept the transfer(s), this must return\\\\n * `bytes4(keccak256(\\\\\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\\\\\"))`\\\\n * (i.e. 0xbc197c81, or its own function selector).\\\\n *\\\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\\\n * @param from The address which previously owned the token\\\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\\\n * @param data Additional data with no specified format\\\\n * @return `bytes4(keccak256(\\\\\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\\\\\"))` if transfer is allowed\\\\n */\\\\n function onERC1155BatchReceived(\\\\n address operator,\\\\n address from,\\\\n uint256[] calldata ids,\\\\n uint256[] calldata values,\\\\n bytes calldata data\\\\n ) external returns (bytes4);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\\\n * own tokens and those that they have been approved to use.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Burnable is ERC1155 {\\\\n function burn(\\\\n address account,\\\\n uint256 id,\\\\n uint256 value\\\\n ) public virtual {\\\\n require(\\\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n\\\\n _burn(account, id, value);\\\\n }\\\\n\\\\n function burnBatch(\\\\n address account,\\\\n uint256[] memory ids,\\\\n uint256[] memory values\\\\n ) public virtual {\\\\n require(\\\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n\\\\n _burnBatch(account, ids, values);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\\\n /**\\\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n require(!paused(), \\\\\\\"ERC1155Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC1155.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ninterface IERC1155MetadataURI is IERC1155 {\\\\n /**\\\\n * @dev Returns the URI for token type `id`.\\\\n *\\\\n * If the `\\\\\\\\{id\\\\\\\\}` substring is present in the URI, it must be replaced by\\\\n * clients with the actual token type ID.\\\\n */\\\\n function uri(uint256 id) external view returns (string memory);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC1155Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC1155Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC1155} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\\\n * deploys the contract.\\\\n */\\\\n constructor(string memory uri) ERC1155(uri) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\\\n *\\\\n * See {ERC1155-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n\\\\n _mint(to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\\\n */\\\\n function mintBatch(\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n\\\\n _mintBatch(to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId)\\\\n public\\\\n view\\\\n virtual\\\\n override(AccessControlEnumerable, ERC1155)\\\\n returns (bool)\\\\n {\\\\n return super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./ERC1155Receiver.sol\\\\\\\";\\\\n\\\\n/**\\\\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\\\\n *\\\\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\\\\n * stuck.\\\\n *\\\\n * @dev _Available since v3.1._\\\\n */\\\\ncontract ERC1155Holder is ERC1155Receiver {\\\\n function onERC1155Received(\\\\n address,\\\\n address,\\\\n uint256,\\\\n uint256,\\\\n bytes memory\\\\n ) public virtual override returns (bytes4) {\\\\n return this.onERC1155Received.selector;\\\\n }\\\\n\\\\n function onERC1155BatchReceived(\\\\n address,\\\\n address,\\\\n uint256[] memory,\\\\n uint256[] memory,\\\\n bytes memory\\\\n ) public virtual override returns (bytes4) {\\\\n return this.onERC1155BatchReceived.selector;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2e024ca51ce5abe16c0d34e6992a1104f356e2244eb4ccbec970435e8b3405e3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Receiver.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC1155Receiver.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3dd5e1a66a56f30302108a1da97d677a42b1daa60e503696b2bcbbf3e4c95bcb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Required interface of an ERC721 compliant contract.\\\\n */\\\\ninterface IERC721 is IERC165 {\\\\n /**\\\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\\\n */\\\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\\\n\\\\n /**\\\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\\\n */\\\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\\\n\\\\n /**\\\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\\\n */\\\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\\\n\\\\n /**\\\\n * @dev Returns the number of tokens in ``owner``'s account.\\\\n */\\\\n function balanceOf(address owner) external view returns (uint256 balance);\\\\n\\\\n /**\\\\n * @dev Returns the owner of the `tokenId` token.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `tokenId` must exist.\\\\n */\\\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\\\n\\\\n /**\\\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must exist and be owned by `from`.\\\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId,\\\\n bytes calldata data\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must exist and be owned by `from`.\\\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Transfers `tokenId` token from `from` to `to`.\\\\n *\\\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must be owned by `from`.\\\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\\\n * The approval is cleared when the token is transferred.\\\\n *\\\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The caller must own the token or be an approved operator.\\\\n * - `tokenId` must exist.\\\\n *\\\\n * Emits an {Approval} event.\\\\n */\\\\n function approve(address to, uint256 tokenId) external;\\\\n\\\\n /**\\\\n * @dev Approve or remove `operator` as an operator for the caller.\\\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The `operator` cannot be the caller.\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n */\\\\n function setApprovalForAll(address operator, bool _approved) external;\\\\n\\\\n /**\\\\n * @dev Returns the account approved for `tokenId` token.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `tokenId` must exist.\\\\n */\\\\n function getApproved(uint256 tokenId) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\\\n *\\\\n * See {setApprovalForAll}\\\\n */\\\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/GatewayV3.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/security/Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IQuorum.sol\\\\\\\";\\\\nimport \\\\\\\"./collections/HasProxyAdmin.sol\\\\\\\";\\\\n\\\\nabstract contract GatewayV3 is HasProxyAdmin, Pausable, IQuorum {\\\\n uint256 internal _num;\\\\n uint256 internal _denom;\\\\n\\\\n address private ______deprecated;\\\\n uint256 public nonce;\\\\n\\\\n address public emergencyPauser;\\\\n\\\\n /**\\\\n * @dev This empty reserved space is put in place to allow future versions to add new\\\\n * variables without shifting down storage in the inheritance chain.\\\\n */\\\\n uint256[49] private ______gap;\\\\n\\\\n /**\\\\n * @dev Grant emergency pauser role for `_addr`.\\\\n */\\\\n function setEmergencyPauser(address _addr) external onlyProxyAdmin {\\\\n emergencyPauser = _addr;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() external view virtual returns (uint256 num_, uint256 denom_) {\\\\n return (_num, _denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view virtual returns (bool) {\\\\n return _voteWeight * _denom >= _num * _getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 _numerator, uint256 _denominator) external virtual onlyProxyAdmin {\\\\n return _setThreshold(_numerator, _denominator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Triggers paused state.\\\\n */\\\\n function pause() external {\\\\n _requireAuth();\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Triggers unpaused state.\\\\n */\\\\n function unpause() external {\\\\n _requireAuth();\\\\n _unpause();\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n return _minimumVoteWeight(_getTotalWeight());\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom) revert ErrInvalidThreshold(msg.sig);\\\\n uint256 prevNum = _num;\\\\n uint256 prevDenom = _denom;\\\\n _num = num;\\\\n _denom = denom;\\\\n unchecked {\\\\n emit ThresholdUpdated(nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns minimum vote weight.\\\\n */\\\\n function _minimumVoteWeight(uint256 _totalWeight) internal view virtual returns (uint256) {\\\\n return (_num * _totalWeight + _denom - 1) / _denom;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check method caller.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The method caller must be admin or pauser.\\\\n *\\\\n */\\\\n function _requireAuth() private view {\\\\n if (!(msg.sender == _getProxyAdmin() || msg.sender == emergencyPauser)) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the total weight.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x010a0021a377e4b23a4f56269b9c6e3e3fc2684897928ff9b9da1b47c3f07baf\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/MinimumWithdrawal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./collections/HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../libraries/Transfer.sol\\\\\\\";\\\\n\\\\nabstract contract MinimumWithdrawal is HasProxyAdmin {\\\\n /// @dev Throwed when the ERC20 withdrawal quantity is less than the minimum threshold.\\\\n error ErrQueryForTooSmallQuantity();\\\\n\\\\n /// @dev Emitted when the minimum thresholds are updated\\\\n event MinimumThresholdsUpdated(address[] tokens, uint256[] threshold);\\\\n\\\\n /// @dev Mapping from mainchain token address => minimum thresholds\\\\n mapping(address mainchainToken => uint256) public minimumThreshold;\\\\n\\\\n /**\\\\n * @dev This empty reserved space is put in place to allow future versions to add new\\\\n * variables without shifting down storage in the inheritance chain.\\\\n */\\\\n uint256[50] private ______gap;\\\\n\\\\n /**\\\\n * @dev Sets the minimum thresholds to withdraw.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `MinimumThresholdsUpdated` event.\\\\n *\\\\n */\\\\n function setMinimumThresholds(address[] calldata mainchainTokens_, uint256[] calldata thresholds_) external virtual onlyProxyAdmin {\\\\n if (mainchainTokens_.length == 0) revert ErrEmptyArray();\\\\n _setMinimumThresholds(mainchainTokens_, thresholds_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets minimum thresholds.\\\\n *\\\\n * Requirements:\\\\n * - The array lengths are equal.\\\\n *\\\\n * Emits the `MinimumThresholdsUpdated` event.\\\\n *\\\\n */\\\\n function _setMinimumThresholds(address[] calldata mainchainTokens_, uint256[] calldata thresholds_) internal virtual {\\\\n if (mainchainTokens_.length != thresholds_.length) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n for (uint256 i; i < mainchainTokens_.length; ++i) {\\\\n minimumThreshold[mainchainTokens_[i]] = thresholds_[i];\\\\n }\\\\n emit MinimumThresholdsUpdated(mainchainTokens_, thresholds_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks whether the request is larger than or equal to the minimum threshold.\\\\n */\\\\n function _checkWithdrawal(Transfer.Request calldata _request) internal view {\\\\n if (_request.info.erc == TokenStandard.ERC20 && _request.info.quantity < minimumThreshold[_request.tokenAddr]) {\\\\n revert ErrQueryForTooSmallQuantity();\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x25292436a877420bbd07418ccc4c8923b08d10625deed0b3fbdb6d9fc969a48d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IERC20Mintable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.2;\\\\n\\\\ninterface IERC20Mintable {\\\\n function mint(address _to, uint256 _value) external returns (bool _success);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6632cb3345e581a0b7868d6ce9a883f55d107576f9557f500a042c8285e51005\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IERC721Mintable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IERC721Mintable {\\\\n function mint(address _to, uint256 _tokenId) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x4f001516a2596c79c205a9e28de092aa866eb440040e78b8be9027451028f169\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IRoninGatewayV3.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../libraries/Transfer.sol\\\\\\\";\\\\nimport \\\\\\\"./consumers/MappedTokenConsumer.sol\\\\\\\";\\\\n\\\\ninterface IRoninGatewayV3 is MappedTokenConsumer {\\\\n /**\\\\n * @dev Error thrown when attempting to withdraw funds that have already been migrated.\\\\n */\\\\n error ErrWithdrawalsMigrated();\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid trusted threshold is specified.\\\\n */\\\\n error ErrInvalidTrustedThreshold();\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to withdraw funds that have already been withdrawn on the mainchain.\\\\n */\\\\n error ErrWithdrawnOnMainchainAlready();\\\\n\\\\n /// @dev Emitted when the assets are depositted\\\\n event Deposited(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the withdrawal is requested\\\\n event WithdrawalRequested(bytes32 receiptHash, Transfer.Receipt);\\\\n /// @dev Emitted when the assets are withdrawn on mainchain\\\\n event MainchainWithdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the withdrawal signatures is requested\\\\n event WithdrawalSignaturesRequested(bytes32 receiptHash, Transfer.Receipt);\\\\n /// @dev Emitted when the tokens are mapped\\\\n event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, TokenStandard[] standards);\\\\n /// @dev Emitted when the tokens are unmapped\\\\n event TokenUnmapped(address[] roninTokens, uint256[] chainIds);\\\\n /// @dev Emitted when the threshold is updated\\\\n event TrustedThresholdUpdated(\\\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\\\n );\\\\n /// @dev Emitted when a deposit is voted\\\\n event DepositVoted(address indexed bridgeOperator, uint256 indexed id, uint256 indexed chainId, bytes32 receiptHash);\\\\n\\\\n /**\\\\n * @dev Returns withdrawal count.\\\\n */\\\\n function withdrawalCount() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns withdrawal signatures.\\\\n */\\\\n function getWithdrawalSignatures(uint256 _withdrawalId, address[] calldata _validators) external view returns (bytes[] memory);\\\\n\\\\n /**\\\\n * @dev Deposits based on the receipt.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n * Emits the `Deposited` once the assets are released.\\\\n *\\\\n * @notice The assets will be transferred whenever the valid call passes the quorum threshold.\\\\n *\\\\n */\\\\n function depositFor(Transfer.Receipt calldata _receipt) external;\\\\n\\\\n /**\\\\n * @dev Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal\\\\n * vote is already done before.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n * Emits the `MainchainWithdrew` once the valid call passes the quorum threshold.\\\\n *\\\\n * @notice Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the\\\\n * same time.\\\\n *\\\\n */\\\\n function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external returns (bool[] memory);\\\\n\\\\n /**\\\\n * @dev Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote\\\\n * is already done before. Reverts if the deposit is invalid or is voted by the validator again.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n * Emits the `Deposited` once the assets are released.\\\\n *\\\\n * @notice The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not\\\\n * reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\\\\n *\\\\n */\\\\n function tryBulkDepositFor(Transfer.Receipt[] calldata _receipts) external returns (bool[] memory);\\\\n\\\\n /**\\\\n * @dev Locks the assets and request withdrawal.\\\\n *\\\\n * Emits the `WithdrawalRequested` event.\\\\n *\\\\n */\\\\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external;\\\\n\\\\n /**\\\\n * @dev Bulk requests withdrawals.\\\\n *\\\\n * Emits the `WithdrawalRequested` events.\\\\n *\\\\n */\\\\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external;\\\\n\\\\n /**\\\\n * @dev Requests withdrawal signatures for a specific withdrawal.\\\\n *\\\\n * Emits the `WithdrawalSignaturesRequested` event.\\\\n *\\\\n */\\\\n function requestWithdrawalSignatures(uint256 _withdrawalId) external;\\\\n\\\\n /**\\\\n * @dev Submits withdrawal signatures.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n */\\\\n function bulkSubmitWithdrawalSignatures(uint256[] calldata _withdrawals, bytes[] calldata _signatures) external;\\\\n\\\\n /**\\\\n * @dev Maps Ronin tokens to mainchain networks.\\\\n *\\\\n * Requirement:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `TokenMapped` event.\\\\n *\\\\n */\\\\n function mapTokens(\\\\n address[] calldata _roninTokens,\\\\n address[] calldata _mainchainTokens,\\\\n uint256[] calldata chainIds,\\\\n TokenStandard[] calldata _standards\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Maps Ronin tokens to mainchain networks with minimum withdrawal thresholds.\\\\n */\\\\n function mapTokensWithMinThresholds(\\\\n address[] calldata roninTokens_,\\\\n address[] calldata mainchainTokens_,\\\\n uint256[] calldata chainIds_,\\\\n TokenStandard[] calldata standards_,\\\\n uint256[] calldata minimumThresholds_\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Unmaps Ronin tokens and clears the minimum withdrawal thresholds.\\\\n */\\\\n function unmapTokens(address[] calldata roninTokens_, uint256[] calldata chainIds_) external;\\\\n\\\\n /**\\\\n * @dev Returns whether the deposit is casted by the voter.\\\\n */\\\\n function depositVoted(uint256 _chainId, uint256 _depositId, address _voter) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns whether the mainchain withdrew is casted by the voter.\\\\n */\\\\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns whether the withdrawal is done on mainchain.\\\\n */\\\\n function mainchainWithdrew(uint256 _withdrawalId) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns mainchain token address.\\\\n * Reverts for unsupported token.\\\\n */\\\\n function getMainchainToken(address _roninToken, uint256 _chainId) external view returns (MappedToken memory _token);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x974de31ffb8b9dc56677edf5f8b852571a640cd4d1d39a589cca2c76436859cb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IWETH.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IWETH {\\\\n event Transfer(address indexed src, address indexed dst, uint wad);\\\\n\\\\n function deposit() external payable;\\\\n\\\\n function transfer(address dst, uint wad) external returns (bool);\\\\n\\\\n function approve(address guy, uint wad) external returns (bool);\\\\n\\\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\\\n\\\\n function withdraw(uint256 _wad) external;\\\\n\\\\n function balanceOf(address) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeTracking.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeTracking {\\\\n struct Request {\\\\n VoteKind kind;\\\\n uint256 id;\\\\n }\\\\n\\\\n enum VoteKind {\\\\n Deposit,\\\\n Withdrawal,\\\\n MainchainWithdrawal\\\\n }\\\\n\\\\n event ExternalCallFailed(address indexed to, bytes4 indexed msgSig, bytes reason);\\\\n\\\\n /**\\\\n * @dev Returns the block that allow incomming mutable call.\\\\n */\\\\n function startedAtBlock() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns the total number of votes at the specific period `_period`.\\\\n */\\\\n function totalVote(uint256 _period) external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns the total number of ballots at the specific period `_period`.\\\\n */\\\\n function totalBallot(uint256 _period) external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns the total number of ballots of bridge operators at the specific period `_period`.\\\\n */\\\\n function getManyTotalBallots(uint256 _period, address[] calldata _bridgeOperators) external view returns (uint256[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the total number of ballots of a bridge operator at the specific period `_period`.\\\\n */\\\\n function totalBallotOf(uint256 _period, address _bridgeOperator) external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Handles the request once it is approved.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is the bridge contract.\\\\n *\\\\n */\\\\n function handleVoteApproved(VoteKind _kind, uint256 _requestId) external;\\\\n\\\\n /**\\\\n * @dev Records vote for a receipt and a operator.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is the bridge contract.\\\\n *\\\\n */\\\\n function recordVote(VoteKind _kind, uint256 _requestId, address _operator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x53ac425ff6efebc200030ceef302c2871a4b2edfcc5e512ce326aa704989ff7a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/MappedTokenConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/LibTokenInfo.sol\\\\\\\";\\\\n\\\\ninterface MappedTokenConsumer {\\\\n struct MappedToken {\\\\n TokenStandard erc;\\\\n address tokenAddr;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/VoteStatusConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface VoteStatusConsumer {\\\\n enum VoteStatus {\\\\n Pending,\\\\n Approved,\\\\n Executed,\\\\n Rejected,\\\\n Expired\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/validator/ICandidateManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\ninterface ICandidateManager {\\\\n struct ValidatorCandidate {\\\\n // Admin of the candidate\\\\n address admin;\\\\n // Address of the validator that produces block, e.g. block.coinbase. This is so-called validator address.\\\\n address consensusAddr;\\\\n // Address that receives mining reward of the validator\\\\n address payable treasuryAddr;\\\\n // Address of the bridge operator corresponding to the candidate\\\\n address ______deprecatedbridgeOperatorAddr;\\\\n // The percentage of reward that validators can be received, the rest goes to the delegators.\\\\n // Values in range [0; 100_00] stands for 0-100%\\\\n uint256 commissionRate;\\\\n // The timestamp that scheduled to revoke the candidate (no schedule=0)\\\\n uint256 revokingTimestamp;\\\\n // The deadline that the candidate must top up staking amount to keep it larger than or equal to the threshold (no deadline=0)\\\\n uint256 topupDeadline;\\\\n }\\\\n\\\\n struct CommissionSchedule {\\\\n // The timestamp that the commission schedule gets affected (no schedule=0).\\\\n uint256 effectiveTimestamp;\\\\n // The new commission rate. Value is in range [0; 100_00], stands for 0-100%\\\\n uint256 commissionRate;\\\\n }\\\\n\\\\n /// @dev Emitted when the maximum number of validator candidates is updated.\\\\n event MaxValidatorCandidateUpdated(uint256 threshold);\\\\n /// @dev Emitted when the min offset to the effective date of commission rate change is updated.\\\\n event MinEffectiveDaysOnwardsUpdated(uint256 numOfDays);\\\\n /// @dev Emitted when the validator candidate is granted.\\\\n event CandidateGranted(address indexed consensusAddr, address indexed treasuryAddr, address indexed admin);\\\\n /// @dev Emitted when the revoking timestamp of a candidate is updated.\\\\n event CandidateRevokingTimestampUpdated(address indexed consensusAddr, uint256 revokingTimestamp);\\\\n /// @dev Emitted when the topup deadline of a candidate is updated.\\\\n event CandidateTopupDeadlineUpdated(address indexed consensusAddr, uint256 topupDeadline);\\\\n /// @dev Emitted when the validator candidate is revoked.\\\\n event CandidatesRevoked(address[] consensusAddrs);\\\\n\\\\n /// @dev Emitted when a schedule for updating commission rate is set.\\\\n event CommissionRateUpdateScheduled(address indexed consensusAddr, uint256 effectiveTimestamp, uint256 rate);\\\\n /// @dev Emitted when the commission rate of a validator is updated.\\\\n event CommissionRateUpdated(address indexed consensusAddr, uint256 rate);\\\\n\\\\n /// @dev Error of exceeding maximum number of candidates.\\\\n error ErrExceedsMaxNumberOfCandidate();\\\\n /// @dev Error of querying for already existent candidate.\\\\n error ErrExistentCandidate();\\\\n /// @dev Error of querying for non-existent candidate.\\\\n error ErrNonExistentCandidate();\\\\n /// @dev Error of candidate admin already exists.\\\\n error ErrExistentCandidateAdmin(address _candidateAdminAddr);\\\\n /// @dev Error of treasury already exists.\\\\n error ErrExistentTreasury(address _treasuryAddr);\\\\n /// @dev Error of invalid commission rate.\\\\n error ErrInvalidCommissionRate();\\\\n /// @dev Error of invalid effective days onwards.\\\\n error ErrInvalidEffectiveDaysOnwards();\\\\n /// @dev Error of invalid min effective days onwards.\\\\n error ErrInvalidMinEffectiveDaysOnwards();\\\\n /// @dev Error of already requested revoking candidate before.\\\\n error ErrAlreadyRequestedRevokingCandidate();\\\\n /// @dev Error of commission change schedule exists.\\\\n error ErrAlreadyRequestedUpdatingCommissionRate();\\\\n /// @dev Error of trusted org cannot renounce.\\\\n error ErrTrustedOrgCannotRenounce();\\\\n\\\\n /**\\\\n * @dev Returns the maximum number of validator candidate.\\\\n */\\\\n function maxValidatorCandidate() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns the minimum number of days to the effective date of commission rate change.\\\\n */\\\\n function minEffectiveDaysOnward() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the maximum number of validator candidate.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `MaxValidatorCandidateUpdated` event.\\\\n *\\\\n */\\\\n function setMaxValidatorCandidate(uint256) external;\\\\n\\\\n /**\\\\n * @dev Sets the minimum number of days to the effective date of commision rate change.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `MinEffectiveDaysOnwardsUpdated` event.\\\\n *\\\\n */\\\\n function setMinEffectiveDaysOnwards(uint256 _numOfDays) external;\\\\n\\\\n /**\\\\n * @dev Grants a validator candidate.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is staking contract.\\\\n *\\\\n * Emits the event `CandidateGranted`.\\\\n *\\\\n */\\\\n function execApplyValidatorCandidate(address _admin, address _consensusAddr, address payable _treasuryAddr, uint256 _commissionRate) external;\\\\n\\\\n /**\\\\n * @dev Requests to revoke a validator candidate in next `_secsLeft` seconds.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is staking contract.\\\\n *\\\\n * Emits the event `CandidateRevokingTimestampUpdated`.\\\\n *\\\\n */\\\\n function execRequestRenounceCandidate(address, uint256 _secsLeft) external;\\\\n\\\\n /**\\\\n * @dev Fallback function of `CandidateStaking-requestUpdateCommissionRate`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is the staking contract.\\\\n * - The `_effectiveTimestamp` must be the beginning of a UTC day, and at least from 7 days onwards\\\\n * - The `_rate` must be in range of [0_00; 100_00].\\\\n *\\\\n * Emits the event `CommissionRateUpdateScheduled`.\\\\n *\\\\n */\\\\n function execRequestUpdateCommissionRate(address _consensusAddr, uint256 _effectiveTimestamp, uint256 _rate) external;\\\\n\\\\n /**\\\\n * @dev Returns whether the address is a validator (candidate).\\\\n */\\\\n function isValidatorCandidate(address _addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the validator candidate.\\\\n */\\\\n function getValidatorCandidates() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns all candidate info.\\\\n */\\\\n function getCandidateInfos() external view returns (ValidatorCandidate[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the info of a candidate.\\\\n */\\\\n function getCandidateInfo(address _candidate) external view returns (ValidatorCandidate memory);\\\\n\\\\n /**\\\\n * @dev Returns whether the address is the candidate admin.\\\\n */\\\\n function isCandidateAdmin(address _candidate, address _admin) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the schedule of changing commission rate of a candidate address.\\\\n */\\\\n function getCommissionChangeSchedule(address _candidate) external view returns (CommissionSchedule memory);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x37b15d36774a3f18291e85efa9df6caaf52b8fa751a8222a3ac8f467656950c1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/validator/ICoinbaseExecution.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport \\\\\\\"./ISlashingExecution.sol\\\\\\\";\\\\n\\\\ninterface ICoinbaseExecution is ISlashingExecution {\\\\n enum BlockRewardDeprecatedType {\\\\n UNKNOWN,\\\\n UNAVAILABILITY,\\\\n AFTER_BAILOUT\\\\n }\\\\n\\\\n /// @dev Emitted when the validator set is updated\\\\n event ValidatorSetUpdated(uint256 indexed period, address[] consensusAddrs);\\\\n /// @dev Emitted when the bridge operator set is updated, to mirror the in-jail and maintaining status of the validator.\\\\n event BlockProducerSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] consensusAddrs);\\\\n /// @dev Emitted when the bridge operator set is updated.\\\\n event BridgeOperatorSetUpdated(uint256 indexed period, uint256 indexed epoch, address[] bridgeOperators);\\\\n\\\\n /// @dev Emitted when the reward of the block producer is deprecated.\\\\n event BlockRewardDeprecated(address indexed coinbaseAddr, uint256 rewardAmount, BlockRewardDeprecatedType deprecatedType);\\\\n /// @dev Emitted when the block reward is submitted.\\\\n event BlockRewardSubmitted(address indexed coinbaseAddr, uint256 submittedAmount, uint256 bonusAmount);\\\\n\\\\n /// @dev Emitted when the block producer reward is distributed.\\\\n event MiningRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\\\n /// @dev Emitted when the contract fails when distributing the block producer reward.\\\\n event MiningRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\\\n\\\\n /// @dev Emitted when the bridge operator reward is distributed.\\\\n event BridgeOperatorRewardDistributed(address indexed consensusAddr, address indexed bridgeOperator, address indexed recipientAddr, uint256 amount);\\\\n /// @dev Emitted when the contract fails when distributing the bridge operator reward.\\\\n event BridgeOperatorRewardDistributionFailed(\\\\n address indexed consensusAddr, address indexed bridgeOperator, address indexed recipient, uint256 amount, uint256 contractBalance\\\\n );\\\\n\\\\n /// @dev Emitted when the fast finality reward is distributed.\\\\n event FastFinalityRewardDistributed(address indexed consensusAddr, address indexed recipient, uint256 amount);\\\\n /// @dev Emitted when the contract fails when distributing the fast finality reward.\\\\n event FastFinalityRewardDistributionFailed(address indexed consensusAddr, address indexed recipient, uint256 amount, uint256 contractBalance);\\\\n\\\\n /// @dev Emitted when the amount of RON reward is distributed to staking contract.\\\\n event StakingRewardDistributed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts);\\\\n /// @dev Emitted when the contracts fails when distributing the amount of RON to the staking contract.\\\\n event StakingRewardDistributionFailed(uint256 totalAmount, address[] consensusAddrs, uint256[] amounts, uint256 contractBalance);\\\\n\\\\n /// @dev Emitted when the epoch is wrapped up.\\\\n event WrappedUpEpoch(uint256 indexed periodNumber, uint256 indexed epochNumber, bool periodEnding);\\\\n\\\\n /// @dev Error of only allowed at the end of epoch\\\\n error ErrAtEndOfEpochOnly();\\\\n /// @dev Error of query for already wrapped up epoch\\\\n error ErrAlreadyWrappedEpoch();\\\\n\\\\n /**\\\\n * @dev Submits reward of the current block.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is coinbase.\\\\n *\\\\n * Emits the event `MiningRewardDeprecated` if the coinbase is slashed or no longer be a block producer.\\\\n * Emits the event `BlockRewardSubmitted` for the valid call.\\\\n *\\\\n */\\\\n function submitBlockReward() external payable;\\\\n\\\\n /**\\\\n * @dev Wraps up the current epoch.\\\\n *\\\\n * Requirements:\\\\n * - The method must be called when the current epoch is ending.\\\\n * - The epoch is not wrapped yet.\\\\n * - The method caller is coinbase.\\\\n *\\\\n * Emits the event `MiningRewardDistributed` when some validator has reward distributed.\\\\n * Emits the event `StakingRewardDistributed` when some staking pool has reward distributed.\\\\n * Emits the event `BlockProducerSetUpdated` when the epoch is wrapped up.\\\\n * Emits the event `BridgeOperatorSetUpdated` when the epoch is wrapped up at period ending.\\\\n * Emits the event `ValidatorSetUpdated` when the epoch is wrapped up at period ending, and the validator set gets updated.\\\\n * Emits the event `WrappedUpEpoch`.\\\\n *\\\\n */\\\\n function wrapUpEpoch() external payable;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3030ef01bb0277f8607fb3b6358a4cd1d75f6a756e5c884153fbf94f0a16b4d4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/validator/IEmergencyExit.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\ninterface IEmergencyExit {\\\\n /// @dev Emitted when the fund is locked from an emergency exit request\\\\n event EmergencyExitRequested(address indexed consensusAddr, uint256 lockedAmount);\\\\n /// @dev Emitted when the fund that locked from an emergency exit request is transferred to the recipient.\\\\n event EmergencyExitLockedFundReleased(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount);\\\\n /// @dev Emitted when the fund that locked from an emergency exit request is failed to transferred back.\\\\n event EmergencyExitLockedFundReleasingFailed(address indexed consensusAddr, address indexed recipient, uint256 unlockedAmount, uint256 contractBalance);\\\\n\\\\n /// @dev Emitted when the emergency exit locked amount is updated.\\\\n event EmergencyExitLockedAmountUpdated(uint256 amount);\\\\n /// @dev Emitted when the emergency expiry duration is updated.\\\\n event EmergencyExpiryDurationUpdated(uint256 amount);\\\\n\\\\n /// @dev Error of already requested emergency exit before.\\\\n error ErrAlreadyRequestedEmergencyExit();\\\\n\\\\n /**\\\\n * @dev Returns the amount of RON to lock from a consensus address.\\\\n */\\\\n function emergencyExitLockedAmount() external returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns the duration that an emergency request is expired and the fund will be recycled.\\\\n */\\\\n function emergencyExpiryDuration() external returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the amount of RON to lock from a consensus address.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the event `EmergencyExitLockedAmountUpdated`.\\\\n *\\\\n */\\\\n function setEmergencyExitLockedAmount(uint256 _emergencyExitLockedAmount) external;\\\\n\\\\n /**\\\\n * @dev Sets the duration that an emergency request is expired and the fund will be recycled.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the event `EmergencyExpiryDurationUpdated`.\\\\n *\\\\n */\\\\n function setEmergencyExpiryDuration(uint256 _emergencyExpiryDuration) external;\\\\n\\\\n /**\\\\n * @dev Unlocks fund for emergency exit request.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the event `EmergencyExitLockedFundReleased` if the fund is successfully unlocked.\\\\n * Emits the event `EmergencyExitLockedFundReleasingFailed` if the fund is failed to unlock.\\\\n *\\\\n */\\\\n function execReleaseLockedFundForEmergencyExitRequest(address _consensusAddr, address payable _recipient) external;\\\\n\\\\n /**\\\\n * @dev Fallback function of `IStaking-requestEmergencyExit`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is staking contract.\\\\n *\\\\n */\\\\n function execEmergencyExit(address _consensusAddr, uint256 _secLeftToRevoke) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2df640817e7fb957f923dd583e82be9610a8441735b69519db5bd9457683bec2\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/validator/IRoninValidatorSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport \\\\\\\"./ICandidateManager.sol\\\\\\\";\\\\nimport \\\\\\\"./info-fragments/ICommonInfo.sol\\\\\\\";\\\\nimport \\\\\\\"./ICoinbaseExecution.sol\\\\\\\";\\\\nimport \\\\\\\"./ISlashingExecution.sol\\\\\\\";\\\\nimport \\\\\\\"./IEmergencyExit.sol\\\\\\\";\\\\n\\\\ninterface IRoninValidatorSet is ICandidateManager, ICommonInfo, ISlashingExecution, ICoinbaseExecution, IEmergencyExit { }\\\\n\\\",\\\"keccak256\\\":\\\"0x5ae53ab78a38d9c59d74b4723ead82146bc402874ebbdc90b70ce084516e010f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/validator/ISlashingExecution.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\ninterface ISlashingExecution {\\\\n /// @dev Emitted when the validator is punished.\\\\n event ValidatorPunished(\\\\n address indexed consensusAddr,\\\\n uint256 indexed period,\\\\n uint256 jailedUntil,\\\\n uint256 deductedStakingAmount,\\\\n bool blockProducerRewardDeprecated,\\\\n bool bridgeOperatorRewardDeprecated\\\\n );\\\\n /// @dev Emitted when the validator get out of jail by bailout.\\\\n event ValidatorUnjailed(address indexed validator, uint256 period);\\\\n\\\\n /// @dev Error of cannot bailout due to high tier slash.\\\\n error ErrCannotBailout(address validator);\\\\n\\\\n /**\\\\n * @dev Finalize the slash request from slash indicator contract.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is slash indicator contract.\\\\n *\\\\n * Emits the event `ValidatorPunished`.\\\\n *\\\\n */\\\\n function execSlash(address validatorAddr, uint256 newJailedUntil, uint256 slashAmount, bool cannotBailout) external;\\\\n\\\\n /**\\\\n * @dev Finalize the bailout request from slash indicator contract.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is slash indicator contract.\\\\n *\\\\n * Emits the event `ValidatorUnjailed`.\\\\n *\\\\n */\\\\n function execBailOut(address _validatorAddr, uint256 _period) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xac0b772f2fca9dafd7cc6742f91b442f9f545bf9472185b8d817fe045b680193\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/validator/info-fragments/ICommonInfo.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport \\\\\\\"./IJailingInfo.sol\\\\\\\";\\\\nimport \\\\\\\"./ITimingInfo.sol\\\\\\\";\\\\n\\\\ninterface ICommonInfo is ITimingInfo, IJailingInfo {\\\\n struct EmergencyExitInfo {\\\\n uint256 lockedAmount;\\\\n // The timestamp that this locked amount will be recycled to staking vesting contract\\\\n uint256 recyclingAt;\\\\n }\\\\n\\\\n /// @dev Emitted when the deprecated reward is withdrawn.\\\\n event DeprecatedRewardRecycled(address indexed recipientAddr, uint256 amount);\\\\n /// @dev Emitted when the deprecated reward withdrawal is failed\\\\n event DeprecatedRewardRecycleFailed(address indexed recipientAddr, uint256 amount, uint256 balance);\\\\n\\\\n /// @dev Error thrown when receives RON from neither staking vesting contract nor staking contract\\\\n error ErrUnauthorizedReceiveRON();\\\\n /// @dev Error thrown when queries for a non existent info.\\\\n error NonExistentRecyclingInfo();\\\\n\\\\n /**\\\\n * @dev Returns the total deprecated reward, which includes reward that is not sent for slashed validators and unsastified bridge operators\\\\n */\\\\n function totalDeprecatedReward() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns the emergency exit request.\\\\n */\\\\n function getEmergencyExitInfo(address _consensusAddr) external view returns (EmergencyExitInfo memory);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x4a215273f535697ecf54a97c8fd9de9c666ca64b88dafe7ab60b2903f71ffb41\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/validator/info-fragments/IJailingInfo.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\ninterface IJailingInfo {\\\\n /**\\\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) during the current period.\\\\n */\\\\n function checkJailed(address) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns whether the validator are put in jail and the number of block and epoch that he still is in the jail.\\\\n */\\\\n function getJailedTimeLeft(address _addr) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\\\n\\\\n /**\\\\n * @dev Returns whether the validator are put in jail (cannot join the set of validators) at a specific block.\\\\n */\\\\n function checkJailedAtBlock(address _addr, uint256 _blockNum) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns whether the validator are put in jail at a specific block and the number of block and epoch that he still is in the jail.\\\\n */\\\\n function getJailedTimeLeftAtBlock(address _addr, uint256 _blockNum) external view returns (bool isJailed_, uint256 blockLeft_, uint256 epochLeft_);\\\\n\\\\n /**\\\\n * @dev Returns whether the validators are put in jail (cannot join the set of validators) during the current period.\\\\n */\\\\n function checkManyJailed(address[] calldata) external view returns (bool[] memory);\\\\n\\\\n /**\\\\n * @dev Returns whether the incoming reward of the block producer is deprecated during the current period.\\\\n */\\\\n function checkMiningRewardDeprecated(address _blockProducer) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns whether the incoming reward of the block producer is deprecated during a specific period.\\\\n */\\\\n function checkMiningRewardDeprecatedAtPeriod(address _blockProducer, uint256 _period) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd83e85bea11509406213b8d06956b33238d27fa1b5e555c1f064bdfd41d6d216\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/validator/info-fragments/ITimingInfo.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\ninterface ITimingInfo {\\\\n /**\\\\n * @dev Returns the block that validator set was updated.\\\\n */\\\\n function getLastUpdatedBlock() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns the number of blocks in a epoch.\\\\n */\\\\n function numberOfBlocksInEpoch() external view returns (uint256 _numberOfBlocks);\\\\n\\\\n /**\\\\n * @dev Returns the epoch index from the block number.\\\\n */\\\\n function epochOf(uint256 _block) external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns whether the epoch ending is at the block number `_block`.\\\\n */\\\\n function epochEndingAt(uint256 _block) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Tries to get the period index from the epoch number.\\\\n */\\\\n function tryGetPeriodOfEpoch(uint256 _epoch) external view returns (bool _filled, uint256 _periodNumber);\\\\n\\\\n /**\\\\n * @dev Returns whether the period ending at the current block number.\\\\n */\\\\n function isPeriodEnding() external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the period index from the current block.\\\\n */\\\\n function currentPeriod() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns the block number that the current period starts at.\\\\n */\\\\n function currentPeriodStartAtBlock() external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x77b86a68149389fed0eb0c5b8d56f278d3bd103ba64f504697d709b24c3212d5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/IsolatedGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nlibrary IsolatedGovernance {\\\\n struct Vote {\\\\n VoteStatusConsumer.VoteStatus status;\\\\n bytes32 finalHash;\\\\n /// @dev Mapping from voter => receipt hash\\\\n mapping(address => bytes32) voteHashOf;\\\\n /// @dev The timestamp that voting is expired (no expiration=0)\\\\n uint256 expiredAt;\\\\n /// @dev The timestamp that voting is created\\\\n uint256 createdAt;\\\\n /// @dev The list of voters\\\\n address[] voters;\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for the receipt with the receipt hash `_hash`.\\\\n *\\\\n * Requirements:\\\\n * - The voter has not voted for the round.\\\\n *\\\\n */\\\\n function castVote(Vote storage _v, address _voter, bytes32 _hash) internal {\\\\n if (_v.expiredAt > 0 && _v.expiredAt <= block.timestamp) {\\\\n _v.status = VoteStatusConsumer.VoteStatus.Expired;\\\\n }\\\\n\\\\n if (voted(_v, _voter)) revert ErrAlreadyVoted(_voter);\\\\n\\\\n _v.voteHashOf[_voter] = _hash;\\\\n _v.voters.push(_voter);\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates vote with the requirement of minimum vote weight.\\\\n */\\\\n function syncVoteStatus(\\\\n Vote storage _v,\\\\n uint256 _minimumVoteWeight,\\\\n uint256 _votedWeightForHash,\\\\n bytes32 _hash\\\\n ) internal returns (VoteStatusConsumer.VoteStatus _status) {\\\\n if (_votedWeightForHash >= _minimumVoteWeight && _v.status == VoteStatusConsumer.VoteStatus.Pending) {\\\\n _v.status = VoteStatusConsumer.VoteStatus.Approved;\\\\n _v.finalHash = _hash;\\\\n }\\\\n\\\\n return _v.status;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the list of vote's addresses that voted for the hash `_hash`.\\\\n */\\\\n function filterByHash(Vote storage _v, bytes32 _hash) internal view returns (address[] memory _voters) {\\\\n uint256 _count;\\\\n _voters = new address[](_v.voters.length);\\\\n\\\\n unchecked {\\\\n for (uint _i; _i < _voters.length; ++_i) {\\\\n address _voter = _v.voters[_i];\\\\n if (_v.voteHashOf[_voter] == _hash) {\\\\n _voters[_count++] = _voter;\\\\n }\\\\n }\\\\n }\\\\n\\\\n assembly {\\\\n mstore(_voters, _count)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter casted for the proposal.\\\\n */\\\\n function voted(Vote storage _v, address _voter) internal view returns (bool) {\\\\n return _v.voteHashOf[_voter] != bytes32(0);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a1e04b914580c099ac87f65ec24c35445eee34809e3decf1c57b6c52942d36\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/LibTokenInfo.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IWETH.sol\\\\\\\";\\\\n\\\\nenum TokenStandard {\\\\n ERC20,\\\\n ERC721,\\\\n ERC1155\\\\n}\\\\n\\\\nstruct TokenInfo {\\\\n TokenStandard erc;\\\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\\\n // For ERC721: the quantity must be 0.\\\\n uint256 id;\\\\n uint256 quantity;\\\\n}\\\\n\\\\n/**\\\\n * @dev Error indicating that the `transfer` has failed.\\\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\\\n * @param to Receiver of the token value.\\\\n * @param token Address of the token.\\\\n */\\\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\\\n\\\\n/**\\\\n * @dev Error indicating that the `handleAssetIn` has failed.\\\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\\\n * @param from Owner of the token value.\\\\n * @param to Receiver of the token value.\\\\n * @param token Address of the token.\\\\n */\\\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\\\n\\\\n/// @dev Error indicating that the provided information is invalid.\\\\nerror ErrInvalidInfo();\\\\n\\\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\\\nerror ErrERC20MintingFailed();\\\\n\\\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\\\nerror ErrERC721MintingFailed();\\\\n\\\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\\\nerror ErrERC1155TransferFailed();\\\\n\\\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\\\nerror ErrERC1155MintingFailed();\\\\n\\\\n/// @dev Error indicating that an unsupported standard is encountered.\\\\nerror ErrUnsupportedStandard();\\\\n\\\\nlibrary LibTokenInfo {\\\\n /**\\\\n *\\\\n * HASH\\\\n *\\\\n */\\\\n\\\\n // keccak256(\\\\\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\\\\\");\\\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\\\n\\\\n /**\\\\n * @dev Returns token info struct hash.\\\\n */\\\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\\\n digest := keccak256(ptr, 0x80)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * VALIDATE\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Validates the token info.\\\\n */\\\\n function validate(TokenInfo memory self) internal pure {\\\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\\\n revert ErrInvalidInfo();\\\\n }\\\\n }\\\\n\\\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\\\n }\\\\n\\\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\\\n }\\\\n\\\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * TRANSFER IN/OUT METHOD\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfer asset in.\\\\n *\\\\n * Requirements:\\\\n * - The `_from` address must approve for the contract using this library.\\\\n *\\\\n */\\\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\\\n bool success;\\\\n bytes memory data;\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\\\n } else if (self.erc == TokenStandard.ERC721) {\\\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\\\n } else if (self.erc == TokenStandard.ERC1155) {\\\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\\\n } else {\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\\\n *\\\\n * @notice Prioritizes transfer native token if the token is wrapped.\\\\n *\\\\n */\\\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\\\n if (token == address(wrappedNativeToken)) {\\\\n // Try sending the native token before transferring the wrapped token\\\\n if (!to.send(self.quantity)) {\\\\n wrappedNativeToken.deposit{ value: self.quantity }();\\\\n _transferTokenOut(self, to, token);\\\\n }\\\\n\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n uint256 balance = IERC20(token).balanceOf(address(this));\\\\n if (balance < self.quantity) {\\\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\\\n }\\\\n\\\\n _transferTokenOut(self, to, token);\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC721) {\\\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\\\n revert ErrERC721MintingFailed();\\\\n }\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC1155) {\\\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\\\n revert ErrERC1155MintingFailed();\\\\n }\\\\n return;\\\\n }\\\\n\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * TRANSFER HELPERS\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfer assets from current address to `_to` address.\\\\n */\\\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\\\n bool success;\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n success = _tryTransferERC20(token, to, self.quantity);\\\\n } else if (self.erc == TokenStandard.ERC721) {\\\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\\\n } else {\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-20\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers ERC20 token and returns the result.\\\\n */\\\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\\\n bytes memory data;\\\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC20 token and returns the result.\\\\n */\\\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\\\n // bytes4(keccak256(\\\\\\\"mint(address,uint256)\\\\\\\"))\\\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-721\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\\\n * @return success Returns `false` if both transfer and mint are failed.\\\\n */\\\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\\\n success = _tryTransferFromERC721(token, address(this), to, id);\\\\n if (!success) {\\\\n return _tryMintERC721(token, to, id);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers ERC721 token and returns the result.\\\\n */\\\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC721 token and returns the result.\\\\n */\\\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\\\n // bytes4(keccak256(\\\\\\\"mint(address,uint256)\\\\\\\"))\\\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-1155\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\\\n * @return success Returns `false` if both transfer and mint are failed.\\\\n */\\\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\\\n if (!success) {\\\\n return _tryMintERC1155(token, to, id, amount);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers ERC1155 token and returns the result.\\\\n */\\\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC1155 token and returns the result.\\\\n */\\\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/LibTokenOwner.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nstruct TokenOwner {\\\\n address addr;\\\\n address tokenAddr;\\\\n uint256 chainId;\\\\n}\\\\n\\\\nlibrary LibTokenOwner {\\\\n // keccak256(\\\\\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\\\\\");\\\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\\\n\\\\n /**\\\\n * @dev Returns ownership struct hash.\\\\n */\\\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, OWNER_TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\\\n digest := keccak256(ptr, 0x80)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Transfer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./LibTokenInfo.sol\\\\\\\";\\\\nimport \\\\\\\"./LibTokenOwner.sol\\\\\\\";\\\\n\\\\nlibrary Transfer {\\\\n using ECDSA for bytes32;\\\\n using LibTokenOwner for TokenOwner;\\\\n using LibTokenInfo for TokenInfo;\\\\n\\\\n enum Kind {\\\\n Deposit,\\\\n Withdrawal\\\\n }\\\\n\\\\n struct Request {\\\\n // For deposit request: Recipient address on Ronin network\\\\n // For withdrawal request: Recipient address on mainchain network\\\\n address recipientAddr;\\\\n // Token address to deposit/withdraw\\\\n // Value 0: native token\\\\n address tokenAddr;\\\\n TokenInfo info;\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts the transfer request into the deposit receipt.\\\\n */\\\\n function into_deposit_receipt(\\\\n Request memory _request,\\\\n address _requester,\\\\n uint256 _id,\\\\n address _roninTokenAddr,\\\\n uint256 _roninChainId\\\\n ) internal view returns (Receipt memory _receipt) {\\\\n _receipt.id = _id;\\\\n _receipt.kind = Kind.Deposit;\\\\n _receipt.mainchain.addr = _requester;\\\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\\\n _receipt.mainchain.chainId = block.chainid;\\\\n _receipt.ronin.addr = _request.recipientAddr;\\\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\\\n _receipt.ronin.chainId = _roninChainId;\\\\n _receipt.info = _request.info;\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts the transfer request into the withdrawal receipt.\\\\n */\\\\n function into_withdrawal_receipt(\\\\n Request memory _request,\\\\n address _requester,\\\\n uint256 _id,\\\\n address _mainchainTokenAddr,\\\\n uint256 _mainchainId\\\\n ) internal view returns (Receipt memory _receipt) {\\\\n _receipt.id = _id;\\\\n _receipt.kind = Kind.Withdrawal;\\\\n _receipt.ronin.addr = _requester;\\\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\\\n _receipt.ronin.chainId = block.chainid;\\\\n _receipt.mainchain.addr = _request.recipientAddr;\\\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\\\n _receipt.mainchain.chainId = _mainchainId;\\\\n _receipt.info = _request.info;\\\\n }\\\\n\\\\n struct Receipt {\\\\n uint256 id;\\\\n Kind kind;\\\\n TokenOwner mainchain;\\\\n TokenOwner ronin;\\\\n TokenInfo info;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\\\\\");\\\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\\\n\\\\n /**\\\\n * @dev Returns token info struct hash.\\\\n */\\\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * _receipt.id,\\\\n * _receipt.kind,\\\\n * Token.hash(_receipt.mainchain),\\\\n * Token.hash(_receipt.ronin),\\\\n * Token.hash(_receipt.info)\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\\\n digest := keccak256(ptr, 0xc0)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the receipt digest.\\\\n */\\\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/ronin/gateway/RoninGatewayV3.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol\\\\\\\";\\\\nimport \\\\\\\"../../extensions/GatewayV3.sol\\\\\\\";\\\\nimport \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../../extensions/MinimumWithdrawal.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/IERC20Mintable.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/IERC721Mintable.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/bridge/IBridgeTracking.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/IRoninGatewayV3.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/validator/IRoninValidatorSet.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/IsolatedGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\n\\\\ncontract RoninGatewayV3 is\\\\n GatewayV3,\\\\n Initializable,\\\\n MinimumWithdrawal,\\\\n AccessControlEnumerable,\\\\n ERC1155Holder,\\\\n VoteStatusConsumer,\\\\n IRoninGatewayV3,\\\\n HasContracts\\\\n{\\\\n using LibTokenInfo for TokenInfo;\\\\n using Transfer for Transfer.Request;\\\\n using Transfer for Transfer.Receipt;\\\\n using IsolatedGovernance for IsolatedGovernance.Vote;\\\\n\\\\n /// @custom:deprecated Previously `withdrawalMigrated` (non-zero value)\\\\n bool private ___deprecated4;\\\\n /// @dev Total withdrawal\\\\n uint256 public withdrawalCount;\\\\n /// @dev Mapping from chain id => deposit id => deposit vote\\\\n mapping(uint256 => mapping(uint256 => IsolatedGovernance.Vote)) public depositVote;\\\\n /// @dev Mapping from withdrawal id => mainchain withdrew vote\\\\n mapping(uint256 => IsolatedGovernance.Vote) public mainchainWithdrewVote;\\\\n /// @dev Mapping from withdrawal id => withdrawal receipt\\\\n mapping(uint256 => Transfer.Receipt) public withdrawal;\\\\n /// @dev Mapping from withdrawal id => validator address => signatures\\\\n mapping(uint256 => mapping(address => bytes)) internal _withdrawalSig;\\\\n /// @dev Mapping from token address => chain id => mainchain token address\\\\n mapping(address => mapping(uint256 => MappedToken)) internal _mainchainToken;\\\\n\\\\n /// @custom:deprecated Previously `_validatorContract` (non-zero value)\\\\n address private ____deprecated0;\\\\n /// @custom:deprecated Previously `_bridgeTrackingContract` (non-zero value)\\\\n address private ____deprecated1;\\\\n\\\\n /// @dev Mapping from withdrawal id => vote for recording withdrawal stats\\\\n mapping(uint256 => IsolatedGovernance.Vote) public withdrawalStatVote;\\\\n\\\\n /// @custom:deprecated Previously `_trustedOrgContract` (non-zero value)\\\\n address private ____deprecated2;\\\\n\\\\n uint256 internal _trustedNum;\\\\n uint256 internal _trustedDenom;\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n fallback() external payable {\\\\n _fallback();\\\\n }\\\\n\\\\n receive() external payable {\\\\n _fallback();\\\\n }\\\\n\\\\n modifier onlyBridgeOperator() {\\\\n _requireBridgeOperator();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Reverts if the method caller is not bridge operator.\\\\n */\\\\n function _requireBridgeOperator() internal view {\\\\n if (!IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).isBridgeOperator(msg.sender)) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.__DEPRECATED_BRIDGE_OPERATOR);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Initializes contract storage.\\\\n */\\\\n function initialize(\\\\n address _roleSetter,\\\\n uint256 _numerator,\\\\n uint256 _denominator,\\\\n uint256 _trustedNumerator,\\\\n uint256 _trustedDenominator,\\\\n address[] calldata, /* _withdrawalMigrators */\\\\n // _packedAddresses[0]: roninTokens\\\\n // _packedAddresses[1]: mainchainTokens\\\\n address[][2] calldata _packedAddresses,\\\\n // _packedNumbers[0]: chainIds\\\\n // _packedNumbers[1]: minimumThresholds\\\\n uint256[][2] calldata _packedNumbers,\\\\n TokenStandard[] calldata _standards\\\\n ) external virtual initializer {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _roleSetter);\\\\n _setThreshold(_numerator, _denominator);\\\\n _setTrustedThreshold(_trustedNumerator, _trustedDenominator);\\\\n if (_packedAddresses[0].length > 0) {\\\\n _mapTokens(_packedAddresses[0], _packedAddresses[1], _packedNumbers[0], _standards);\\\\n _setMinimumThresholds(_packedAddresses[0], _packedNumbers[1]);\\\\n }\\\\n }\\\\n\\\\n function initializeV2() external reinitializer(2) {\\\\n _setContract(ContractType.VALIDATOR, ____deprecated0);\\\\n _setContract(ContractType.BRIDGE_TRACKING, ____deprecated1);\\\\n _setContract(ContractType.RONIN_TRUSTED_ORGANIZATION, ____deprecated2);\\\\n delete ____deprecated0;\\\\n delete ____deprecated1;\\\\n delete ____deprecated2;\\\\n }\\\\n\\\\n function initializeV3(address bridgeAdmin) external reinitializer(3) {\\\\n _setContract(ContractType.BRIDGE_MANAGER, bridgeAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function getWithdrawalSignatures(uint256 withdrawalId, address[] calldata operators) external view returns (bytes[] memory _signatures) {\\\\n _signatures = new bytes[](operators.length);\\\\n for (uint256 _i = 0; _i < operators.length;) {\\\\n _signatures[_i] = _withdrawalSig[withdrawalId][operators[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function depositFor(Transfer.Receipt calldata _receipt) external whenNotPaused onlyBridgeOperator {\\\\n _depositFor(_receipt, msg.sender, minimumVoteWeight());\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external onlyBridgeOperator returns (bool[] memory _executedReceipts) {\\\\n address governor = msg.sender;\\\\n uint256 minVoteWeight = minimumVoteWeight();\\\\n\\\\n uint256 withdrawalId;\\\\n uint length = _withdrawalIds.length;\\\\n\\\\n _executedReceipts = new bool[](length);\\\\n IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\\\n\\\\n for (uint256 i; i < length; ++i) {\\\\n withdrawalId = _withdrawalIds[i];\\\\n bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId, governor);\\\\n\\\\n // Mark the withdrawal is executed\\\\n if (mainchainWithdrew(withdrawalId)) {\\\\n _executedReceipts[i] = true;\\\\n }\\\\n\\\\n // Process all votes, not early-exit to track all votes in BridgeTracking\\\\n IsolatedGovernance.Vote storage _vote = mainchainWithdrewVote[withdrawalId];\\\\n Transfer.Receipt memory _withdrawal = withdrawal[withdrawalId];\\\\n bytes32 _hash = _withdrawal.hash();\\\\n VoteStatus _status = _castIsolatedVote(_vote, governor, minVoteWeight, _hash);\\\\n if (_status == VoteStatus.Approved) {\\\\n _vote.status = VoteStatus.Executed;\\\\n bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.MainchainWithdrawal, withdrawalId);\\\\n emit MainchainWithdrew(_hash, _withdrawal);\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function tryBulkDepositFor(Transfer.Receipt[] calldata receipts) external whenNotPaused onlyBridgeOperator returns (bool[] memory _executedReceipts) {\\\\n uint length = receipts.length;\\\\n _executedReceipts = new bool[](length);\\\\n uint256 minVoteWeight = minimumVoteWeight();\\\\n\\\\n Transfer.Receipt memory iReceipt;\\\\n for (uint i; i < length; ++i) {\\\\n iReceipt = receipts[i];\\\\n if (depositVote[iReceipt.mainchain.chainId][iReceipt.id].status == VoteStatus.Executed) {\\\\n _executedReceipts[i] = true;\\\\n }\\\\n\\\\n // Process all votes, not early-exit to track all votes in BridgeTracking\\\\n _depositFor(iReceipt, msg.sender, minVoteWeight);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external whenNotPaused {\\\\n _requestWithdrawalFor(_request, msg.sender, _chainId);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata requests, uint256 chainId) external whenNotPaused {\\\\n uint length = requests.length;\\\\n if (length == 0) revert ErrEmptyArray();\\\\n\\\\n for (uint i; i < length; ++i) {\\\\n _requestWithdrawalFor(requests[i], msg.sender, chainId);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function requestWithdrawalSignatures(uint256 _withdrawalId) external whenNotPaused {\\\\n if (mainchainWithdrew(_withdrawalId)) revert ErrWithdrawnOnMainchainAlready();\\\\n\\\\n Transfer.Receipt memory _receipt = withdrawal[_withdrawalId];\\\\n if (_receipt.ronin.chainId != block.chainid) {\\\\n revert ErrInvalidChainId(msg.sig, _receipt.ronin.chainId, block.chainid);\\\\n }\\\\n\\\\n emit WithdrawalSignaturesRequested(_receipt.hash(), _receipt);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function bulkSubmitWithdrawalSignatures(uint256[] calldata withdrawals, bytes[] calldata signatures) external whenNotPaused onlyBridgeOperator {\\\\n address operator = msg.sender;\\\\n\\\\n uint length = withdrawals.length;\\\\n if (!(length > 0 && length == signatures.length)) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n uint256 _minVoteWeight = minimumVoteWeight();\\\\n\\\\n uint256 id;\\\\n IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\\\n for (uint i; i < length; ++i) {\\\\n id = withdrawals[i];\\\\n _withdrawalSig[id][operator] = signatures[i];\\\\n _bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Withdrawal, id, operator);\\\\n\\\\n IsolatedGovernance.Vote storage _proposal = withdrawalStatVote[id];\\\\n VoteStatus _status = _castIsolatedVote(_proposal, operator, _minVoteWeight, bytes32(id));\\\\n if (_status == VoteStatus.Approved) {\\\\n _proposal.status = VoteStatus.Executed;\\\\n _bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Withdrawal, id);\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function mapTokens(\\\\n address[] calldata _roninTokens,\\\\n address[] calldata _mainchainTokens,\\\\n uint256[] calldata _chainIds,\\\\n TokenStandard[] calldata _standards\\\\n ) external onlyProxyAdmin {\\\\n if (_roninTokens.length == 0) revert ErrLengthMismatch(msg.sig);\\\\n _mapTokens(_roninTokens, _mainchainTokens, _chainIds, _standards);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function mapTokensWithMinThresholds(\\\\n address[] calldata roninTokens_,\\\\n address[] calldata mainchainTokens_,\\\\n uint256[] calldata chainIds_,\\\\n TokenStandard[] calldata standards_,\\\\n uint256[] calldata minimumThresholds_\\\\n ) external onlyProxyAdmin {\\\\n if (roninTokens_.length == 0) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n _mapTokens(roninTokens_, mainchainTokens_, chainIds_, standards_);\\\\n _setMinimumThresholds(mainchainTokens_, minimumThresholds_);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function unmapTokens(address[] calldata roninTokens_, uint256[] calldata chainIds_) external onlyProxyAdmin {\\\\n uint length = roninTokens_.length;\\\\n if (length == 0 || length != chainIds_.length) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n _unmapTokensAndMinWithdrawals(roninTokens_, chainIds_);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function depositVoted(uint256 _chainId, uint256 _depositId, address _voter) external view returns (bool) {\\\\n return depositVote[_chainId][_depositId].voted(_voter);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool) {\\\\n return mainchainWithdrewVote[_withdrawalId].voted(_voter);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function mainchainWithdrew(uint256 _withdrawalId) public view returns (bool) {\\\\n return mainchainWithdrewVote[_withdrawalId].status == VoteStatus.Executed;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IRoninGatewayV3\\\\n */\\\\n function getMainchainToken(address _roninToken, uint256 _chainId) public view returns (MappedToken memory _token) {\\\\n _token = _mainchainToken[_roninToken][_chainId];\\\\n if (_token.tokenAddr == address(0)) revert ErrUnsupportedToken();\\\\n }\\\\n\\\\n /**\\\\n * @dev Maps Ronin tokens to mainchain networks.\\\\n *\\\\n * Requirement:\\\\n * - The arrays have the same length.\\\\n *\\\\n * Emits the `TokenMapped` event.\\\\n *\\\\n */\\\\n function _mapTokens(\\\\n address[] calldata _roninTokens,\\\\n address[] calldata _mainchainTokens,\\\\n uint256[] calldata _chainIds,\\\\n TokenStandard[] calldata _standards\\\\n ) internal {\\\\n uint length = _roninTokens.length;\\\\n if (!(length == _mainchainTokens.length && length == _chainIds.length && length == _standards.length)) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n for (uint256 _i; _i < _roninTokens.length;) {\\\\n _mainchainToken[_roninTokens[_i]][_chainIds[_i]].tokenAddr = _mainchainTokens[_i];\\\\n _mainchainToken[_roninTokens[_i]][_chainIds[_i]].erc = _standards[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n\\\\n emit TokenMapped(_roninTokens, _mainchainTokens, _chainIds, _standards);\\\\n }\\\\n\\\\n /**\\\\n * @dev Unmaps tokens and minimum withdrawals by removing mapping (roninToken => chainId => mainchainToken) and minimumThreshold.\\\\n *\\\\n * Emits the `TokenUnmapped` event.\\\\n */\\\\n function _unmapTokensAndMinWithdrawals(address[] calldata roninTokens_, uint256[] calldata chainIds_) internal {\\\\n uint length = roninTokens_.length;\\\\n for (uint i; i < length; ++i) {\\\\n MappedToken storage $_iToken = _mainchainToken[roninTokens_[i]][chainIds_[i]];\\\\n\\\\n delete minimumThreshold[$_iToken.tokenAddr];\\\\n delete $_iToken.erc;\\\\n delete $_iToken.tokenAddr;\\\\n }\\\\n\\\\n emit TokenUnmapped(roninTokens_, chainIds_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Deposits based on the receipt.\\\\n *\\\\n * Emits the `Deposited` once the assets are released.\\\\n *\\\\n */\\\\n function _depositFor(Transfer.Receipt memory receipt, address operator, uint256 minVoteWeight) internal {\\\\n uint256 id = receipt.id;\\\\n receipt.info.validate();\\\\n if (receipt.kind != Transfer.Kind.Deposit) revert ErrInvalidReceiptKind();\\\\n if (receipt.ronin.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, receipt.ronin.chainId, block.chainid);\\\\n\\\\n MappedToken memory token = getMainchainToken(receipt.ronin.tokenAddr, receipt.mainchain.chainId);\\\\n\\\\n if (!(token.erc == receipt.info.erc && token.tokenAddr == receipt.mainchain.tokenAddr)) {\\\\n revert ErrInvalidReceipt();\\\\n }\\\\n\\\\n IsolatedGovernance.Vote storage _proposal = depositVote[receipt.mainchain.chainId][id];\\\\n bytes32 _receiptHash = receipt.hash();\\\\n VoteStatus status = _castIsolatedVote(_proposal, operator, minVoteWeight, _receiptHash);\\\\n emit DepositVoted(operator, id, receipt.mainchain.chainId, _receiptHash);\\\\n\\\\n // Transfer assets and handle when the vote is approved.\\\\n IBridgeTracking bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));\\\\n if (status == VoteStatus.Approved) {\\\\n _proposal.status = VoteStatus.Executed;\\\\n receipt.info.handleAssetOut(payable(receipt.ronin.addr), receipt.ronin.tokenAddr, IWETH(address(0)));\\\\n bridgeTrackingContract.handleVoteApproved(IBridgeTracking.VoteKind.Deposit, receipt.id);\\\\n emit Deposited(_receiptHash, receipt);\\\\n }\\\\n\\\\n // Announce to BridgeTracking to record the vote, after marking the VoteStatus as Executed.\\\\n bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Deposit, receipt.id, operator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the assets and request withdrawal.\\\\n *\\\\n * Requirements:\\\\n * - The token info is valid.\\\\n *\\\\n * Emits the `WithdrawalRequested` event.\\\\n *\\\\n */\\\\n function _requestWithdrawalFor(Transfer.Request calldata _request, address _requester, uint256 _chainId) internal {\\\\n _request.info.validate();\\\\n _checkWithdrawal(_request);\\\\n MappedToken memory _token = getMainchainToken(_request.tokenAddr, _chainId);\\\\n if (_request.info.erc != _token.erc) revert ErrInvalidTokenStandard();\\\\n\\\\n _request.info.handleAssetIn(_requester, _request.tokenAddr);\\\\n _storeAsReceipt(_request, _chainId, _requester, _token.tokenAddr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores the withdrawal request as a receipt.\\\\n *\\\\n * Emits the `WithdrawalRequested` event.\\\\n *\\\\n */\\\\n function _storeAsReceipt(\\\\n Transfer.Request calldata _request,\\\\n uint256 _chainId,\\\\n address _requester,\\\\n address _mainchainTokenAddr\\\\n ) internal returns (uint256 _withdrawalId) {\\\\n _withdrawalId = withdrawalCount++;\\\\n Transfer.Receipt memory _receipt = _request.into_withdrawal_receipt(_requester, _withdrawalId, _mainchainTokenAddr, _chainId);\\\\n withdrawal[_withdrawalId] = _receipt;\\\\n emit WithdrawalRequested(_receipt.hash(), _receipt);\\\\n }\\\\n\\\\n /**\\\\n * @dev Don't send me RON.\\\\n */\\\\n function _fallback() internal virtual {\\\\n revert ErrInvalidRequest();\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc GatewayV3\\\\n */\\\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\\\n return IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts and updates the vote result.\\\\n *\\\\n * Requirements:\\\\n * - The vote is not finalized.\\\\n * - The voter has not voted for the round.\\\\n *\\\\n */\\\\n function _castIsolatedVote(\\\\n IsolatedGovernance.Vote storage _v,\\\\n address _voter,\\\\n uint256 _minVoteWeight,\\\\n bytes32 _hash\\\\n ) internal virtual returns (VoteStatus _status) {\\\\n _v.castVote(_voter, _hash);\\\\n uint256 _totalWeight = _getVoteWeight(_v, _hash);\\\\n return _v.syncVoteStatus(_minVoteWeight, _totalWeight, _hash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the vote weight for a specified hash.\\\\n */\\\\n function _getVoteWeight(IsolatedGovernance.Vote storage _v, bytes32 _hash) internal view returns (uint256 _totalWeight) {\\\\n (, address[] memory bridgeOperators, uint96[] memory weights) = IBridgeManager(getContract(ContractType.BRIDGE_MANAGER)).getFullBridgeOperatorInfos();\\\\n uint256 length = bridgeOperators.length;\\\\n unchecked {\\\\n for (uint _i; _i < length; ++_i) {\\\\n if (_v.voteHashOf[bridgeOperators[_i]] == _hash) {\\\\n _totalWeight += weights[_i];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n function setTrustedThreshold(uint256 _trustedNumerator, uint256 _trustedDenominator) external virtual onlyProxyAdmin returns (uint256, uint256) {\\\\n return _setTrustedThreshold(_trustedNumerator, _trustedDenominator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the threshold about trusted org.\\\\n */\\\\n function getTrustedThreshold() external view virtual returns (uint256 trustedNum_, uint256 trustedDenom_) {\\\\n return (_trustedNum, _trustedDenom);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets trusted threshold and returns the old one.\\\\n *\\\\n * Emits the `TrustedThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setTrustedThreshold(\\\\n uint256 _trustedNumerator,\\\\n uint256 _trustedDenominator\\\\n ) internal virtual returns (uint256 _previousTrustedNum, uint256 _previousTrustedDenom) {\\\\n if (_trustedNumerator > _trustedDenominator) revert ErrInvalidTrustedThreshold();\\\\n\\\\n _previousTrustedNum = _num;\\\\n _previousTrustedDenom = _denom;\\\\n _trustedNum = _trustedNumerator;\\\\n _trustedDenom = _trustedDenominator;\\\\n unchecked {\\\\n emit TrustedThresholdUpdated(nonce++, _trustedNumerator, _trustedDenominator, _previousTrustedNum, _previousTrustedDenom);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns minimum trusted vote weight.\\\\n */\\\\n function _minimumTrustedVoteWeight(uint256 _totalTrustedWeight) internal view virtual returns (uint256) {\\\\n return (_trustedNum * _totalTrustedWeight + _trustedDenom - 1) / _trustedDenom;\\\\n }\\\\n\\\\n function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, ERC1155Receiver) returns (bool) {\\\\n return AccessControlEnumerable.supportsInterface(interfaceId) || ERC1155Receiver.supportsInterface(interfaceId);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa7d82600675a776cf507c09a7330554c2c372d7e1f76cd822d9b057036140e2c\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 39, "storageLayout": { "storage": [ { - "astId": 1286, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 52696, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_paused", "offset": 0, "slot": "0", "type": "t_bool" }, { - "astId": 3249, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 109039, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_num", "offset": 0, "slot": "1", "type": "t_uint256" }, { - "astId": 3251, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 109041, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_denom", "offset": 0, "slot": "2", "type": "t_uint256" }, { - "astId": 3253, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 109043, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "______deprecated", "offset": 0, "slot": "3", "type": "t_address" }, { - "astId": 3255, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 109045, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "nonce", "offset": 0, "slot": "4", "type": "t_uint256" }, { - "astId": 3257, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 109047, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "emergencyPauser", "offset": 0, "slot": "5", "type": "t_address" }, { - "astId": 3262, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 109052, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "______gap", "offset": 0, "slot": "6", "type": "t_array(t_uint256)49_storage" }, { - "astId": 1124, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 52534, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_initialized", "offset": 0, "slot": "55", "type": "t_uint8" }, { - "astId": 1127, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 52537, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_initializing", "offset": 1, "slot": "55", "type": "t_bool" }, { - "astId": 3791, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 109266, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "minimumThreshold", "offset": 0, "slot": "56", "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 3796, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 109271, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "______gap", "offset": 0, "slot": "57", "type": "t_array(t_uint256)50_storage" }, { - "astId": 24, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 51434, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_roles", "offset": 0, "slot": "107", - "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" + "type": "t_mapping(t_bytes32,t_struct(RoleData)51429_storage)" }, { - "astId": 338, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 51748, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_roleMembers", "offset": 0, "slot": "108", - "type": "t_mapping(t_bytes32,t_struct(AddressSet)2949_storage)" + "type": "t_mapping(t_bytes32,t_struct(AddressSet)58404_storage)" }, { - "astId": 26899, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127703, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "___deprecated4", "offset": 0, "slot": "109", "type": "t_bool" }, { - "astId": 26902, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127706, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "withdrawalCount", "offset": 0, "slot": "110", "type": "t_uint256" }, { - "astId": 26910, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127714, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "depositVote", "offset": 0, "slot": "111", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(Vote)14520_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(Vote)117603_storage))" }, { - "astId": 26916, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127720, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "mainchainWithdrewVote", "offset": 0, "slot": "112", - "type": "t_mapping(t_uint256,t_struct(Vote)14520_storage)" + "type": "t_mapping(t_uint256,t_struct(Vote)117603_storage)" }, { - "astId": 26922, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127726, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "withdrawal", "offset": 0, "slot": "113", - "type": "t_mapping(t_uint256,t_struct(Receipt)15871_storage)" + "type": "t_mapping(t_uint256,t_struct(Receipt)119799_storage)" }, { - "astId": 26929, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127733, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_withdrawalSig", "offset": 0, "slot": "114", "type": "t_mapping(t_uint256,t_mapping(t_address,t_bytes_storage))" }, { - "astId": 26937, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127741, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_mainchainToken", "offset": 0, "slot": "115", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(MappedToken)11895_storage))" + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(MappedToken)116310_storage))" }, { - "astId": 26940, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127744, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "____deprecated0", "offset": 0, "slot": "116", "type": "t_address" }, { - "astId": 26943, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127747, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "____deprecated1", "offset": 0, "slot": "117", "type": "t_address" }, { - "astId": 26949, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127753, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "withdrawalStatVote", "offset": 0, "slot": "118", - "type": "t_mapping(t_uint256,t_struct(Vote)14520_storage)" + "type": "t_mapping(t_uint256,t_struct(Vote)117603_storage)" }, { - "astId": 26952, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127756, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "____deprecated2", "offset": 0, "slot": "119", "type": "t_address" }, { - "astId": 26954, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127758, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_trustedNum", "offset": 0, "slot": "120", "type": "t_uint256" }, { - "astId": 26956, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 127760, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_trustedDenom", "offset": 0, "slot": "121", @@ -2706,28 +557,28 @@ "numberOfBytes": "20" }, "t_array(t_address)dyn_storage": { - "base": "t_address", "encoding": "dynamic_array", "label": "address[]", - "numberOfBytes": "32" + "numberOfBytes": "32", + "base": "t_address" }, "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", "encoding": "dynamic_array", "label": "bytes32[]", - "numberOfBytes": "32" + "numberOfBytes": "32", + "base": "t_bytes32" }, "t_array(t_uint256)49_storage": { - "base": "t_uint256", "encoding": "inplace", "label": "uint256[49]", - "numberOfBytes": "1568" + "numberOfBytes": "1568", + "base": "t_uint256" }, "t_array(t_uint256)50_storage": { - "base": "t_uint256", "encoding": "inplace", "label": "uint256[50]", - "numberOfBytes": "1600" + "numberOfBytes": "1600", + "base": "t_uint256" }, "t_bool": { "encoding": "inplace", @@ -2744,17 +595,17 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_enum(Kind)15668": { + "t_enum(Kind)119596": { "encoding": "inplace", "label": "enum Transfer.Kind", "numberOfBytes": "1" }, - "t_enum(Standard)15187": { + "t_enum(TokenStandard)117922": { "encoding": "inplace", - "label": "enum Token.Standard", + "label": "enum TokenStandard", "numberOfBytes": "1" }, - "t_enum(VoteStatus)11922": { + "t_enum(VoteStatus)116329": { "encoding": "inplace", "label": "enum VoteStatusConsumer.VoteStatus", "numberOfBytes": "1" @@ -2780,12 +631,12 @@ "numberOfBytes": "32", "value": "t_bytes_storage" }, - "t_mapping(t_address,t_mapping(t_uint256,t_struct(MappedToken)11895_storage))": { + "t_mapping(t_address,t_mapping(t_uint256,t_struct(MappedToken)116310_storage))": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => mapping(uint256 => struct MappedTokenConsumer.MappedToken))", "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(MappedToken)11895_storage)" + "value": "t_mapping(t_uint256,t_struct(MappedToken)116310_storage)" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -2794,19 +645,19 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_mapping(t_bytes32,t_struct(AddressSet)2949_storage)": { + "t_mapping(t_bytes32,t_struct(AddressSet)58404_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)2949_storage" + "value": "t_struct(AddressSet)58404_storage" }, - "t_mapping(t_bytes32,t_struct(RoleData)19_storage)": { + "t_mapping(t_bytes32,t_struct(RoleData)51429_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct AccessControl.RoleData)", "numberOfBytes": "32", - "value": "t_struct(RoleData)19_storage" + "value": "t_struct(RoleData)51429_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -2822,281 +673,281 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_bytes_storage)" }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(Vote)14520_storage))": { + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(Vote)117603_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(uint256 => struct IsolatedGovernance.Vote))", "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(Vote)14520_storage)" + "value": "t_mapping(t_uint256,t_struct(Vote)117603_storage)" }, - "t_mapping(t_uint256,t_struct(MappedToken)11895_storage)": { + "t_mapping(t_uint256,t_struct(MappedToken)116310_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct MappedTokenConsumer.MappedToken)", "numberOfBytes": "32", - "value": "t_struct(MappedToken)11895_storage" + "value": "t_struct(MappedToken)116310_storage" }, - "t_mapping(t_uint256,t_struct(Receipt)15871_storage)": { + "t_mapping(t_uint256,t_struct(Receipt)119799_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct Transfer.Receipt)", "numberOfBytes": "32", - "value": "t_struct(Receipt)15871_storage" + "value": "t_struct(Receipt)119799_storage" }, - "t_mapping(t_uint256,t_struct(Vote)14520_storage)": { + "t_mapping(t_uint256,t_struct(Vote)117603_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct IsolatedGovernance.Vote)", "numberOfBytes": "32", - "value": "t_struct(Vote)14520_storage" + "value": "t_struct(Vote)117603_storage" }, - "t_struct(AddressSet)2949_storage": { + "t_struct(AddressSet)58404_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", + "numberOfBytes": "64", "members": [ { - "astId": 2948, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 58403, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)2648_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Info)15195_storage": { - "encoding": "inplace", - "label": "struct Token.Info", - "members": [ - { - "astId": 15190, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", - "label": "erc", - "offset": 0, - "slot": "0", - "type": "t_enum(Standard)15187" - }, - { - "astId": 15192, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", - "label": "id", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 15194, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", - "label": "quantity", - "offset": 0, - "slot": "2", - "type": "t_uint256" + "type": "t_struct(Set)58103_storage" } - ], - "numberOfBytes": "96" + ] }, - "t_struct(MappedToken)11895_storage": { + "t_struct(MappedToken)116310_storage": { "encoding": "inplace", "label": "struct MappedTokenConsumer.MappedToken", + "numberOfBytes": "32", "members": [ { - "astId": 11892, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 116307, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "erc", "offset": 0, "slot": "0", - "type": "t_enum(Standard)15187" + "type": "t_enum(TokenStandard)117922" }, { - "astId": 11894, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 116309, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "tokenAddr", "offset": 1, "slot": "0", "type": "t_address" } - ], - "numberOfBytes": "32" - }, - "t_struct(Owner)15642_storage": { - "encoding": "inplace", - "label": "struct Token.Owner", - "members": [ - { - "astId": 15637, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", - "label": "addr", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 15639, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", - "label": "tokenAddr", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 15641, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", - "label": "chainId", - "offset": 0, - "slot": "2", - "type": "t_uint256" - } - ], - "numberOfBytes": "96" + ] }, - "t_struct(Receipt)15871_storage": { + "t_struct(Receipt)119799_storage": { "encoding": "inplace", "label": "struct Transfer.Receipt", + "numberOfBytes": "352", "members": [ { - "astId": 15858, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 119786, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "id", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 15861, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 119789, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "kind", "offset": 0, "slot": "1", - "type": "t_enum(Kind)15668" + "type": "t_enum(Kind)119596" }, { - "astId": 15864, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 119792, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "mainchain", "offset": 0, "slot": "2", - "type": "t_struct(Owner)15642_storage" + "type": "t_struct(TokenOwner)119086_storage" }, { - "astId": 15867, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 119795, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "ronin", "offset": 0, "slot": "5", - "type": "t_struct(Owner)15642_storage" + "type": "t_struct(TokenOwner)119086_storage" }, { - "astId": 15870, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 119798, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "info", "offset": 0, "slot": "8", - "type": "t_struct(Info)15195_storage" + "type": "t_struct(TokenInfo)117930_storage" } - ], - "numberOfBytes": "352" + ] }, - "t_struct(RoleData)19_storage": { + "t_struct(RoleData)51429_storage": { "encoding": "inplace", "label": "struct AccessControl.RoleData", + "numberOfBytes": "64", "members": [ { - "astId": 16, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 51426, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "members", "offset": 0, "slot": "0", "type": "t_mapping(t_address,t_bool)" }, { - "astId": 18, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 51428, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "adminRole", "offset": 0, "slot": "1", "type": "t_bytes32" } - ], - "numberOfBytes": "64" + ] }, - "t_struct(Set)2648_storage": { + "t_struct(Set)58103_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", + "numberOfBytes": "64", "members": [ { - "astId": 2643, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 58098, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_values", "offset": 0, "slot": "0", "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 2647, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 58102, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "_indexes", "offset": 0, "slot": "1", "type": "t_mapping(t_bytes32,t_uint256)" } - ], - "numberOfBytes": "64" + ] + }, + "t_struct(TokenInfo)117930_storage": { + "encoding": "inplace", + "label": "struct TokenInfo", + "numberOfBytes": "96", + "members": [ + { + "astId": 117925, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "erc", + "offset": 0, + "slot": "0", + "type": "t_enum(TokenStandard)117922" + }, + { + "astId": 117927, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "id", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 117929, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "quantity", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ] + }, + "t_struct(TokenOwner)119086_storage": { + "encoding": "inplace", + "label": "struct TokenOwner", + "numberOfBytes": "96", + "members": [ + { + "astId": 119081, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "addr", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 119083, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "tokenAddr", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 119085, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "label": "chainId", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ] }, - "t_struct(Vote)14520_storage": { + "t_struct(Vote)117603_storage": { "encoding": "inplace", "label": "struct IsolatedGovernance.Vote", + "numberOfBytes": "192", "members": [ { - "astId": 14502, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 117585, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "status", "offset": 0, "slot": "0", - "type": "t_enum(VoteStatus)11922" + "type": "t_enum(VoteStatus)116329" }, { - "astId": 14504, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 117587, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "finalHash", "offset": 0, "slot": "1", "type": "t_bytes32" }, { - "astId": 14509, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 117592, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "voteHashOf", "offset": 0, "slot": "2", "type": "t_mapping(t_address,t_bytes32)" }, { - "astId": 14512, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 117595, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "expiredAt", "offset": 0, "slot": "3", "type": "t_uint256" }, { - "astId": 14515, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 117598, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "createdAt", "offset": 0, "slot": "4", "type": "t_uint256" }, { - "astId": 14519, - "contract": "contracts/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", + "astId": 117602, + "contract": "src/ronin/gateway/RoninGatewayV3.sol:RoninGatewayV3", "label": "voters", "offset": 0, "slot": "5", "type": "t_array(t_address)dyn_storage" } - ], - "numberOfBytes": "192" + ] }, "t_uint256": { "encoding": "inplace", @@ -3109,5 +960,21 @@ "numberOfBytes": "1" } } + }, + "timestamp": 1722925214, + "userdoc": { + "version": 1, + "kind": "user", + "methods": { + "depositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256)))": { + "notice": "The assets will be transferred whenever the valid call passes the quorum threshold." + }, + "tryBulkAcknowledgeMainchainWithdrew(uint256[])": { + "notice": "Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time." + }, + "tryBulkDepositFor((uint256,uint8,(address,address,uint256),(address,address,uint256),(uint8,uint256,uint256))[])": { + "notice": "The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time." + } + } } } \ No newline at end of file From 5a584073659bb2ca79a92313f2ddafc83965181b Mon Sep 17 00:00:00 2001 From: Do Tu Date: Thu, 8 Aug 2024 15:08:09 +0700 Subject: [PATCH 305/305] chore: add RoninBridgeManager mainnet-v3.2.2 deployment artifact --- .../RoninBridgeManagerLogic.json | 113 ++++++++---------- 1 file changed, 50 insertions(+), 63 deletions(-) diff --git a/deployments/ronin-mainnet/RoninBridgeManagerLogic.json b/deployments/ronin-mainnet/RoninBridgeManagerLogic.json index 2b4d0b41..3fba77d3 100644 --- a/deployments/ronin-mainnet/RoninBridgeManagerLogic.json +++ b/deployments/ronin-mainnet/RoninBridgeManagerLogic.json @@ -1,10 +1,16 @@ { - "abi": "[{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addBridgeOperators\",\"inputs\":[{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castGlobalProposalBySignatures\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castProposalBySignatures\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castProposalVoteForCurrentNetwork\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"support\",\"type\":\"uint8\",\"internalType\":\"enum Ballot.VoteType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deleteExpired\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"execute\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executeGlobal\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getBridgeOperatorWeight\",\"inputs\":[{\"name\":\"bridgeOperator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperators\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCallbackRegisters\",\"inputs\":[],\"outputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFullBridgeOperatorInfos\",\"inputs\":[],\"outputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalProposalSignatures\",\"inputs\":[{\"name\":\"round_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"voters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorOf\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeight\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeights\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernors\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorOf\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalExpiryDuration\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalSignatures\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"_voters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_supports\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"_signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalProposalVoted\",\"inputs\":[{\"name\":\"round_\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isBridgeOperator\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposalVoted\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"propose\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeGlobal\",\"inputs\":[{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeGlobalProposalStructAndCastVotes\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeProposalForCurrentNetwork\",\"inputs\":[{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"support\",\"type\":\"uint8\",\"internalType\":\"enum Ballot.VoteType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeProposalStructAndCastVotes\",\"inputs\":[{\"name\":\"_proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"_supports\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"_signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeBridgeOperators\",\"inputs\":[{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolveTargets\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"}],\"outputs\":[{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"round\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinRequiredGovernor\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sumGovernorsWeight\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"sum\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalBridgeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unregisterCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateManyTargetOption\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"vote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"againstVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"forVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BridgeOperatorAddingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorRemovingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorUpdated\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsAdded\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"indexed\":false,\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsRemoved\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallbackRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalProposalCreated\",\"inputs\":[{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"globalProposalHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"globalProposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinRequiredGovernorUpdated\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Notified\",\"inputs\":[{\"name\":\"callData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"registers\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalApproved\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalCreated\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExecuted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"successCalls\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpired\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpiryDurationChanged\",\"inputs\":[{\"name\":\"duration\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalRejected\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalVoted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"voter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"support\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TargetOptionUpdated\",\"inputs\":[{\"name\":\"targetOption\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrAlreadyVoted\",\"inputs\":[{\"name\":\"voter\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrBelowMinRequiredGovernors\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrCurrentProposalIsNotCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrDuplicated\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrExistOneInternalCallFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"callData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotFound\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotMatch\",\"inputs\":[{\"name\":\"required\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrInsufficientGas\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidArguments\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidChainId\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidExecutor\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidExpiryTimestamp\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidInput\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidOrder\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidProposal\",\"inputs\":[{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidProposalNonce\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidSignatures\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidVoteWeight\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLooseProposalInternallyRevert\",\"inputs\":[{\"name\":\"callIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"revertMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrOnlySelfCall\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOperatorNotFound\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrProposalNotApproved\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrQueryForEmptyVote\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedVoteType\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrVoteIsFinalized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroAddress\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", - "address": "0xacE8Be70b25ac65b7c2ccd15EE3C5E8b2F2a12D3", - "blockNumber": 36831093, - "bytecode": "\"0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615f2b80620000f46000396000f3fe608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fada5ab5800bf4e9bcf7778daed87fd94e994cf8b0e146958844535dcc724d8664736f6c63430008170033\"", + "abi": "[{\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addBridgeOperators\",\"inputs\":[{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castGlobalProposalBySignatures\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castProposalBySignatures\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"castProposalVoteForCurrentNetwork\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"support\",\"type\":\"uint8\",\"internalType\":\"enum Ballot.VoteType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkThreshold\",\"inputs\":[{\"name\":\"voteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"execute\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executeGlobal\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getBridgeOperatorWeight\",\"inputs\":[{\"name\":\"bridgeOperator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBridgeOperators\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCallbackRegisters\",\"inputs\":[],\"outputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}],\"outputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFullBridgeOperatorInfos\",\"inputs\":[],\"outputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalProposalSignatures\",\"inputs\":[{\"name\":\"round_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"voters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorOf\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeight\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernorWeights\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"weights\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGovernors\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorOf\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposalSignatures\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"_voters\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_supports\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"_signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalProposalVoted\",\"inputs\":[{\"name\":\"round_\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hotfix__mapToken_setMinimumThresholds_registerCallbacks\",\"inputs\":[{\"name\":\"newGwImpl\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isBridgeOperator\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minimumVoteWeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposalVoted\",\"inputs\":[{\"name\":\"_chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_round\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_voter\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"propose\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeGlobal\",\"inputs\":[{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeGlobalProposalStructAndCastVotes\",\"inputs\":[{\"name\":\"globalProposal\",\"type\":\"tuple\",\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"supports_\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeProposalForCurrentNetwork\",\"inputs\":[{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"support\",\"type\":\"uint8\",\"internalType\":\"enum Ballot.VoteType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proposeProposalStructAndCastVotes\",\"inputs\":[{\"name\":\"_proposal\",\"type\":\"tuple\",\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"_supports\",\"type\":\"uint8[]\",\"internalType\":\"enum Ballot.VoteType[]\"},{\"name\":\"_signatures\",\"type\":\"tuple[]\",\"internalType\":\"struct SignatureConsumer.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeBridgeOperators\",\"inputs\":[{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolveTargets\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"}],\"outputs\":[{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"round\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setContract\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinRequiredGovernor\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setThreshold\",\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sumGovernorsWeight\",\"inputs\":[{\"name\":\"governors\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"sum\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalBridgeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unregisterCallbacks\",\"inputs\":[{\"name\":\"registers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateManyTargetOption\",\"inputs\":[{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"vote\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enum VoteStatusConsumer.VoteStatus\"},{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"againstVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"forVoteWeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BridgeOperatorAddingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorRemovingFailed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorUpdated\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"fromBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"toBridgeOperator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsAdded\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"voteWeights\",\"type\":\"uint96[]\",\"indexed\":false,\"internalType\":\"uint96[]\"},{\"name\":\"governors\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BridgeOperatorsRemoved\",\"inputs\":[{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"bridgeOperators\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallbackRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ContractUpdated\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum ContractType\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalProposalCreated\",\"inputs\":[{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"globalProposalHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"globalProposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct GlobalProposal.GlobalProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targetOptions\",\"type\":\"uint8[]\",\"internalType\":\"enum GlobalProposal.TargetOption[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinRequiredGovernorUpdated\",\"inputs\":[{\"name\":\"min\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Notified\",\"inputs\":[{\"name\":\"callData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"registers\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"address[]\"},{\"name\":\"statuses\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalApproved\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalCreated\",\"inputs\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"round\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"proposal\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"struct Proposal.ProposalDetail\",\"components\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expiryTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"executor\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"targets\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"values\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"calldatas\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"gasAmounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"creator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExecuted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"successCalls\",\"type\":\"bool[]\",\"indexed\":false,\"internalType\":\"bool[]\"},{\"name\":\"returnDatas\",\"type\":\"bytes[]\",\"indexed\":false,\"internalType\":\"bytes[]\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpired\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalExpiryDurationChanged\",\"inputs\":[{\"name\":\"duration\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalRejected\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposalVoted\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"voter\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"support\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enum Ballot.VoteType\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TargetOptionUpdated\",\"inputs\":[{\"name\":\"targetOption\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enum GlobalProposal.TargetOption\"},{\"name\":\"addr\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ThresholdUpdated\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"numerator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"denominator\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"previousNumerator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"previousDenominator\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ErrAlreadyVoted\",\"inputs\":[{\"name\":\"voter\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrBelowMinRequiredGovernors\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrContractTypeNotFound\",\"inputs\":[{\"name\":\"contractType\",\"type\":\"uint8\",\"internalType\":\"enum ContractType\"}]},{\"type\":\"error\",\"name\":\"ErrCurrentProposalIsNotCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrDuplicated\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrExistOneInternalCallFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"callData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotFound\",\"inputs\":[{\"name\":\"governor\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrGovernorNotMatch\",\"inputs\":[{\"name\":\"required\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrInsufficientGas\",\"inputs\":[{\"name\":\"proposalHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidArguments\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidChainId\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidExpiryTimestamp\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidInput\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrInvalidOrder\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidProposal\",\"inputs\":[{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidProposalNonce\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidSignatures\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidThreshold\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrInvalidVoteWeight\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLengthMismatch\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrLooseProposalInternallyRevert\",\"inputs\":[{\"name\":\"callIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"revertMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ErrOnlySelfCall\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrOperatorNotFound\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnauthorized\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expectedRole\",\"type\":\"uint8\",\"internalType\":\"enum RoleAccess\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ErrUnsupportedVoteType\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrVoteIsFinalized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ErrZeroAddress\",\"inputs\":[{\"name\":\"msgSig\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"ErrZeroCodeContract\",\"inputs\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + "absolutePath": "RoninBridgeManager.sol", + "address": "0x5D4050D8D1e5FC6E8e19E268B5C30d88cFD22aA7", + "ast": "", + "blockNumber": 37030081, + "bytecode": "\"0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615dd580620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102745760003560e01c806397d6ae1611610151578063bc9e0a55116100c3578063dafae40811610087578063dafae408146105dc578063dd1f8914146105ef578063de981f1b14610602578063e75235b814610615578063e9c0349814610632578063f80b53521461064557600080fd5b8063bc9e0a551461057c578063c441c4a81461058a578063cc7e6b3b146105a1578063d0a50db0146105c1578063d78392f8146105c957600080fd5b8063aee1767f11610115578063aee1767f146104c0578063b384abef146104d3578063b405aaf21461052e578063b5d6e11014610541578063b9c3620914610556578063bc4e068f1461056957600080fd5b806397d6ae161461046c5780639b19dbfd1461047f5780639ca55b7114610487578063a54f8a091461049a578063a64a8380146104ad57600080fd5b80633644e515116101ea578063828fc1a1116101ae578063828fc1a1146103e2578063865e6fd3146103f557806386ccbf1214610408578063901979d51461041b57806390264e59146104465780639570abab1461045957600080fd5b80633644e515146103825780636a61b16c1461038b5780637de5dedd1461039c5780637f7fe058146103a4578063800eaab3146103cf57600080fd5b80631c905e391161023c5780631c905e39146102e45780631f425338146103065780632c5e6520146103195780632d6d7d731461033c57806334d5f37b1461034f57806335da81211461036f57600080fd5b806301a5f43f1461027957806306aba0e11461028e5780630a44fa43146102a95780630f7c3189146102bc57806315702f05146102d1575b600080fd5b61028c6102873660046149f1565b61064d565b005b6102966106fc565b6040519081526020015b60405180910390f35b6102966102b7366004614a8a565b61070b565b6102c4610790565b6040516102a09190614b10565b61028c6102df366004614b3a565b6107a9565b6102f76102f2366004614c28565b6108b3565b6040516102a093929190614c74565b61028c610314366004614a8a565b6108cf565b61032c610327366004614d27565b61096a565b60405190151581526020016102a0565b6102c461034a366004614a8a565b610981565b61029661035d366004614d5c565b60026020526000908152604090205481565b61028c61037d366004614a8a565b6109c8565b61029660015481565b61028c610399366004614d88565b50565b610296610a10565b6103b76103b2366004614dbc565b610a66565b6040516001600160a01b0390911681526020016102a0565b61028c6103dd366004614edf565b610ae7565b61032c6103f0366004614fa5565b610b1f565b61028c610403366004614fe0565b610b2d565b61028c61041636600461504e565b610b48565b61042e610429366004614dbc565b610b55565b6040516001600160601b0390911681526020016102a0565b61028c6104543660046150f4565b610b8b565b61028c61046736600461512f565b610b94565b61028c61047a36600461504e565b610ba9565b6102c4610bc0565b61028c610495366004614dbc565b610c2b565b61028c6104a836600461521e565b61135d565b61028c6104bb366004614d5c565b611379565b6103b76104ce366004614dbc565b61138a565b61051d6104e1366004614c28565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102a0959493929190615262565b61032c61053c366004614dbc565b61139c565b61028c61054f3660046150f4565b5050505050565b61028c610564366004614c28565b6113d4565b6102f7610577366004614d5c565b6113e6565b61028c610399366004615297565b610592611403565b6040516102a093929190615305565b6105b46105af366004614a8a565b6114dd565b6040516102a09190615348565b61029661151b565b61042e6105d7366004614dbc565b61152e565b61032c6105ea366004614d5c565b611539565b61028c6105fd36600461535b565b61158b565b6103b761061036600461544d565b611698565b61061d611713565b604080519283526020830191909152016102a0565b61028c610640366004614a8a565b61175b565b6102c46117a4565b610655611807565b6106f386868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a028281018201909352898252909350899250889182918501908490808284376000920191909152505060408051602080890282810182019093528882529093508892508791829185019084908082843760009201919091525061186392505050565b50505050505050565b6000610706611bc5565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061074c9250839150611bd89050565b610788848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611c0d92505050565b949350505050565b6060610706600080516020615d80833981519152611c92565b6107b233611c9f565b6108a56040518061010001604052806107ca8e611ce1565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016108658688615533565b8152602001848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505091525033611d91565b505050505050505050505050565b60608060606108c28585611e91565b9250925092509250925092565b6108d7611807565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506109169250839150611bd89050565b600080516020615d8083398151915260005b8381101561054f5761096185858381811061094557610945615540565b905060200201602081019061095a9190614dbc565b839061227a565b50600101610928565b600061097784848461228f565b90505b9392505050565b60606109bf838380806020026020016040519081016040528093929190818152602001838360200280828437600092018290525092506122c5915050565b90505b92915050565b6109d0611807565b610a0c82828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061241892505050565b5050565b600080610a1b6124d5565b9050600080610a28611713565b9150915080600182856004015485610a40919061556c565b610a4a9190615583565b610a549190615596565b610a5e91906155a9565b935050505090565b6000806000610a7c610a766124d5565b856124f9565b9150915081610aae5760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b610ab66124d5565b6001018181548110610aca57610aca615540565b6000918252602090912001546001600160a01b0316949350505050565b333014610b15576000356001600160e01b0319166040516307337e1960e41b8152600401610aa591906155cb565b610a0c828261255e565b60006109bf6000848461228f565b610b35611807565b610b3e81612607565b610a0c828261263d565b61054f85858585856126e1565b600080610b606124d5565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b61054f33611c9f565b610b9d33611c9f565b50505050505050505050565b610bb233611c9f565b61054f858585858533612783565b6060610bca6124d5565b600101805480602002602001604051908101604052809291908181526020018280548015610c2157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c03575b5050505050905090565b610c33611807565b466107e414610c7c5760405162461bcd60e51b815260206004820152601560248201527413db9b1e481bdb881c9bdb9a5b8b5b585a5b9b995d605a1b6044820152606401610aa5565b6040516001600160a01b0382166024820152730cf8ff40a508bdbc39fbe1bb679dcba64e65c7df90600090829060440160408051601f198184030181529181526020820180516001600160e01b0316631b2ce7f360e11b17905251610ce19190615604565b6000604051808303816000865af19150503d8060008114610d1e576040519150601f19603f3d011682016040523d82523d6000602084013e610d23565b606091505b5050905080610d595760405162461bcd60e51b8152602060048201526002602482015261043360f41b6044820152606401610aa5565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905073c13948b5325c11279f5b6cba67957581d374e0f082600081518110610dc657610dc6615540565b60200260200101906001600160a01b031690816001600160a01b031681525050600181600081518110610dfb57610dfb615540565b602002602001018181525050836001600160a01b03168282604051602401610e24929190615651565b60408051601f198184030181529181526020820180516001600160e01b0316631239a88b60e21b17905251610e5c91906024016156ab565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251610e919190615604565b6000604051808303816000865af19150503d8060008114610ece576040519150601f19603f3d011682016040523d82523d6000602084013e610ed3565b606091505b50508093505082610f0b5760405162461bcd60e51b8152602060048201526002602482015261433360f01b6044820152606401610aa5565b604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337505060408051600180825281830190925292935060009291506020808301908036833750506040805160018082528183019092529293506000929150602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050737e73630f81647bcfd7b1f2c04c1c662d17d4577e85600081518110610fe157610fe1615540565b60200260200101906001600160a01b031690816001600160a01b031681525050732260fac5e5542a773aa44fbcfedf7c193bc2c5998460008151811061102957611029615540565b60200260200101906001600160a01b031690816001600160a01b03168152505060018360008151811061105e5761105e615540565b60200260200101818152505060008260008151811061107f5761107f615540565b6020026020010190600281111561109857611098614c4a565b908160028111156110ab576110ab614c4a565b8152505061413c816000815181106110c5576110c5615540565b602002602001018181525050886001600160a01b0316858585856040516024016110f294939291906156be565b60408051601f198184030181529181526020820180516001600160e01b03166336f4bbdb60e21b1790525161112a91906024016156ab565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161115f9190615604565b6000604051808303816000865af19150503d806000811461119c576040519150601f19603f3d011682016040523d82523d6000602084013e6111a1565b606091505b505080985050876111d95760405162461bcd60e51b8152602060048201526002602482015261433160f01b6044820152606401610aa5565b886001600160a01b031684826040516024016111f6929190615651565b60408051601f198184030181529181526020820180516001600160e01b0316630c86c7ef60e31b1790525161122e91906024016156ab565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516112639190615604565b6000604051808303816000865af19150503d80600081146112a0576040519150601f19603f3d011682016040523d82523d6000602084013e6112a5565b606091505b505080985050876112dd5760405162461bcd60e51b8152602060048201526002602482015261219960f11b6044820152606401610aa5565b6040805160018082528183019092526000916020808301908036833701905050905073273cda3afe17eb7bcb028b058382a9010ae82b248160008151811061132757611327615540565b60200260200101906001600160a01b031690816001600160a01b03168152505061135081612418565b5050505050505050505050565b61136633611c9f565b610a0c33611373846157ce565b836127a2565b611381611807565b610399816128c1565b60006113958261292e565b5092915050565b6000806113a76124d5565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6113dc611807565b610a0c82826129ae565b60608060606113f6600085611e91565b9250925092509193909250565b606080606060006114126124d5565b80546040805160208084028201810190925282815292935083919083018282801561146657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611448575b50505050509350806001018054806020026020016040519081016040528092919081815260200182805480156114c557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116114a7575b505050505092506114d584612ab0565b915050909192565b60606109bf838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612ab092505050565b60006115256124d5565b60010154919050565b60006109c282612b95565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00611564611bc5565b8160010154611573919061556c565b6002820154611582908561556c565b10159392505050565b61159433611c9f565b60006040518061010001604052806115ab46611ce1565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c9182918501908490808284376000920191909152505050908252506020016116468789615533565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061168c8133611d91565b506108a53382846127a2565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156116cf576116cf614c4a565b60ff1681526020810191909152604001600020546001600160a01b031690508061170e578160405163409140df60e11b8152600401610aa591906158b4565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b611763611807565b61179f828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612bca92505050565b505050565b60606117ae6124d5565b805460408051602080840282018101909252828152929190830182828015610c21576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c03575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314611861576000356001600160e01b0319166001604051620f948f60ea1b8152600401610aa59291906158ce565b565b606061186f8383612fb0565b61187881611bd8565b60006118826124d5565b8451875191925090811480156118985750855181145b6118c3576000356001600160e01b0319166040516306b5667560e21b8152600401610aa591906155cb565b806001600160401b038111156118db576118db614dd7565b604051908082528060200260200182016040528015611904578160200160208202803683370190505b50935080600003611916575050611bbd565b60008060008060005b85811015611b29578a818151811061193957611939615540565b6020026020010151945089818151811061195557611955615540565b602002602001015193508b818151811061197157611971615540565b60200260200101519250611984856130ba565b61198d846130ba565b826001600160601b03166000036119c5576000356001600160e01b031916604051637f11b8a360e11b8152600401610aa591906155cb565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692611a1d9290811691166158fc565b611a2791906158fc565b611a3191906158fc565b6001600160601b0316600014898281518110611a4f57611a4f615540565b602002602001019015159081151581525050888181518110611a7357611a73615540565b602002602001015115611b21578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c019094529020805490911682179055611b1e9083615583565b91505b60010161191f565b5080866004016000828254611b3e9190615583565b9091555050604051611b79906347c28ec560e11b90611b65908c908f908d9060200161594f565b6040516020818303038152906040526130ef565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c604051611bae9493929190615988565b60405180910390a15050505050505b509392505050565b6000611bcf6124d5565b60040154905090565b611be18161311c565b15610399576000356001600160e01b031916604051630d697db160e11b8152600401610aa591906155cb565b600081611c1981611bd8565b6000611c236124d5565b905060005b8451811015611c8a57816002016000868381518110611c4957611c49615540565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611c80906001600160601b031685615583565b9350600101611c28565b505050919050565b6060600061097a836131bb565b611ca881612b95565b6001600160601b0316600003610399576000356001600160e01b0319166003604051620f948f60ea1b8152600401610aa59291906158ce565b60008181526002602052604081205490819003611d105750600090815260026020526040902060019081905590565b6000828152600360209081526040808320848452909152812090611d3382613217565b905080611d8a576000825460ff166004811115611d5257611d52614c4a565b03611d705760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b6020820151600090808203611dcc576000356001600160e01b03191660004660405163092048d160e11b8152600401610aa5939291906159d5565b600454611dda90859061342c565b6000611de5856134cd565b9050611df082611ce1565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314611e4d576000356001600160e01b03191660405163d4cec26960e01b8152600401610aa591906155cb565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051611e81929190615a51565b60405180910390a4505092915050565b60008281526003602090815260408083208484529091528120600481015460058201546060938493849390929091611ec98284615583565b9050806001600160401b03811115611ee357611ee3614dd7565b604051908082528060200260200182016040528015611f0c578160200160208202803683370190505b509550806001600160401b03811115611f2757611f27614dd7565b604051908082528060200260200182016040528015611f7257816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611f455790505b509450806001600160401b03811115611f8d57611f8d614dd7565b604051908082528060200260200182016040528015611fb6578160200160208202803683370190505b50965060005b8381101561210b576000878281518110611fd857611fd8615540565b60200260200101906001811115611ff157611ff1614c4a565b9081600181111561200457612004614c4a565b90525060008a81526003602090815260408083208c84529091528120600487018054600790920192918490811061203d5761203d615540565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061209b5761209b615540565b60200260200101819052508460040181815481106120bb576120bb615540565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106120eb576120eb615540565b6001600160a01b0390921660209283029190910190910152600101611fbc565b5060005b8281101561226e576001876121248684615583565b8151811061213457612134615540565b6020026020010190600181111561214d5761214d614c4a565b9081600181111561216057612160614c4a565b90525060008a81526003602090815260408083208c84529091528120600587018054600790920192918490811061219957612199615540565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866121ee8684615583565b815181106121fe576121fe615540565b602002602001018190525084600501818154811061221e5761221e615540565b6000918252602090912001546001600160a01b03168861223e8684615583565b8151811061224e5761224e615540565b6001600160a01b039092166020928302919091019091015260010161210f565b50505050509250925092565b60006109bf836001600160a01b038416613617565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff16610977565b606082516001600160401b038111156122e0576122e0614dd7565b604051908082528060200260200182016040528015612309578160200160208202803683370190505b50905060005b8351811015611395576005600085838151811061232e5761232e615540565b6020026020010151600581111561234757612347614c4a565b600581111561235857612358614c4a565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061238c5761238c615540565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156123e4575060006001600160a01b03168282815181106123d1576123d1615540565b60200260200101516001600160a01b0316145b15612410576000356001600160e01b03191660405163053265f160e01b8152600401610aa591906155cb565b60010161230f565b8061242281611bd8565b600080516020615d80833981519152600080805b85518110156124cd5785818151811061245157612451615540565b6020026020010151925061246483612607565b612475836312c0151560e21b61370a565b61247f848461389d565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101612436565b505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b845481101561254c5784818154811061251a5761251a615540565b6000918252602090912001546001600160a01b039081169085160361254457600192509050612557565b6001016124ff565b506000600019915091505b9250929050565b60005b825181101561179f57306001600160a01b031682828151811061258657612586615540565b60200260200101516001600160a01b0316036125c3576000356001600160e01b03191660405163053265f160e01b8152600401610aa591906155cb565b6125ff8382815181106125d8576125d8615540565b60200260200101518383815181106125f2576125f2615540565b60200260200101516138b2565b600101612561565b806001600160a01b03163b60000361039957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610aa5565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561267357612673614c4a565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156126b4576126b4614c4a565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006126f46126ef876157ce565b6134cd565b60208088013560009081526003825260408082208a3583529092522060010154909150811461276257602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610aa5918391600401918252602082015260400190565b6124cd61276e876157ce565b8686868661277e6126ef8d6157ce565b613945565b61279561278f876157ce565b82611d91565b506124cd61276e876157ce565b468260200151146127db57602082015160405163092048d160e11b8152610aa5916001600160e01b0319600035169146906004016159d5565b60006127e6836134cd565b6020808501516000908152600382526040808220875183529092522060010154909150811461285457602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610aa5918391600401918252602082015260400190565b600061285e613c76565b905060008161286b613c80565b6128759190615596565b612880906001615583565b60408051606081018252600080825260208201819052918101919091529091506128b7868685858b866128b28e613c8a565b613ca4565b5050505050505050565b60038110156128e3576040516305f4dee960e31b815260040160405180910390fd5b60006128ed6124d5565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b60008060008061294861293f6124d5565b600101866124f9565b9150915081612975576040516326527e1760e01b81526001600160a01b0386166004820152602401610aa5565b61297d6124d5565b80548290811061298f5761298f615540565b6000918252602090912001546001600160a01b03169590945092505050565b808211806129bd575060018111155b156129e9576000356001600160e01b0319166040516387f6f09560e01b8152600401610aa591906155cb565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000612a6c83615b1c565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000612abc6124d5565b905082516001600160401b03811115612ad757612ad7614dd7565b604051908082528060200260200182016040528015612b00578160200160208202803683370190505b50915060005b8351811015611d8a57816002016000858381518110612b2757612b27615540565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612b7557612b75615540565b6001600160601b0390921660209283029190910190910152600101612b06565b6000612b9f6124d5565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081612bd681611bd8565b6000612be06124d5565b8451909150806001600160401b03811115612bfd57612bfd614dd7565b604051908082528060200260200182016040528015612c26578160200160208202803683370190505b50935080600003612c38575050612faa565b60058201548254612c4a908390615596565b1015612c695760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612f3057898181518110612c8c57612c8c615540565b60200260200101519350612c9f8461292e565b9095509150612cad856130ba565b612cb6846130ba565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612d0a57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612d1c57612d1c615540565b602002602001019015159081151581525050888181518110612d4057612d40615540565b602002602001015115612f28576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612d8390600190615596565b9050886000018181548110612d9a57612d9a615540565b60009182526020909120015489546001600160a01b03909116908a9086908110612dc657612dc6615540565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612e0057612e00615b35565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612e6057612e60615540565b60009182526020909120015460018a0180546001600160a01b039092169186908110612e8e57612e8e615540565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612ecf57612ecf615b35565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612f238286615583565b945050505b600101612c72565b5081866004016000828254612f459190615596565b9091555050604051612f6a90636242a4ef60e11b90611b65908c908c90602001615b4b565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612f9b929190615b70565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612fd257612fd2614dd7565b604051908082528060200260200182016040528015612ffb578160200160208202803683370190505b50925060005b828110156130555785818151811061301b5761301b615540565b602002602001015184828151811061303557613035615540565b6001600160a01b0390921660209283029190910190910152600101613001565b60005b828110156130b05785818151811061307257613072615540565b602002602001015185838151811061308c5761308c615540565b6001600160a01b039092166020928302919091019091015260019182019101613058565b5050505092915050565b6001600160a01b038116610399576000356001600160e01b03191660405163104c66df60e31b8152600401610aa591906155cb565b6130f98282614001565b610a0c573382826040516319b5fdcb60e31b8152600401610aa593929190615b95565b6000815160000361312f57506000919050565b60005b60018351038110156131b257600181015b83518110156131a95783818151811061315e5761315e615540565b60200260200101516001600160a01b031684838151811061318157613181615540565b60200260200101516001600160a01b0316036131a1575060019392505050565b600101613143565b50600101613132565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561320b57602002820191906000526020600020905b8154815260200190600101908083116131f7575b50505050509050919050565b600080825460ff16600481111561323057613230614c4a565b148015613241575042826006015411155b9050801561170e5760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b600483015481101561332d578260080160008460040183815481106132a1576132a1615540565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106132ea576132ea615540565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161327a565b5060005b60058301548110156133e45782600801600084600501838154811061335857613358615540565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106133a1576133a1615540565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613331565b50815460ff19168255600060018301819055600283018190556003830181905561341290600484019061497b565b61342060058301600061497b565b60006006830155919050565b600082608001515111801561344a57508160a0015151826080015151145b801561345f57508160c0015151826080015151145b801561347457508160e0015151826080015151145b61349f576000356001600160e01b0319166040516306b5667560e21b8152600401610aa591906155cb565b6134a98142615583565b82604001511115610a0c5760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b038111156134fb576134fb614dd7565b604051908082528060200260200182016040528015613524578160200160208202803683370190505b5060e086015190915060005b8251811015613583578660c00151818151811061354f5761354f615540565b60200260200101518051906020012083828151811061357057613570615540565b6020908102919091010152600101613530565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6000818152600183016020526040812054801561370057600061363b600183615596565b855490915060009061364f90600190615596565b90508181146136b457600086600001828154811061366f5761366f615540565b906000526020600020015490508087600001848154811061369257613692615540565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806136c5576136c5615b35565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109c2565b60009150506109c2565b60008160405160240161371d91906155cb565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b03861690613766908590615604565b600060405180830381855afa9150503d80600081146137a1576040519150601f19603f3d011682016040523d82523d6000602084013e6137a6565b606091505b50915091508161386857846001600160a01b0316836040516024016137cb91906156ab565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516138009190615604565b600060405180830381855afa9150503d806000811461383b576040519150601f19603f3d011682016040523d82523d6000602084013e613840565b606091505b5090925090508161386857838560405163069d427960e11b8152600401610aa5929190615bc9565b8080602001905181019061387c9190615bec565b61054f57838560405163069d427960e11b8152600401610aa5929190615bc9565b60006109bf836001600160a01b038416614333565b80600560008460058111156138c9576138c9614c4a565b60058111156138da576138da614c4a565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561391857613918614c4a565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061395357508382145b61397e576000356001600160e01b0319166040516306b5667560e21b8152600401610aa591906155cb565b6000613a0b61398c60015490565b6139cb846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b90506000613a5a613a1b60015490565b6139cb856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000613a66613c76565b9050600081613a73613c80565b613a7d9190615596565b613a88906001615583565b90506000805b878110156108a5573660008a8a84818110613aab57613aab615540565b606002919091019250600090508d8d85818110613aca57613aca615540565b9050602002016020810190613adf9190615c0e565b6001811115613af057613af0614c4a565b03613b1c57613b1588613b066020850185615c3a565b84602001358560400135614382565b9050613b93565b60018d8d85818110613b3057613b30615540565b9050602002016020810190613b459190615c0e565b6001811115613b5657613b56614c4a565b03613b6c57613b1587613b066020850185615c3a565b6000356001600160e01b031916604051630612418f60e11b8152600401610aa591906155cb565b806001600160a01b0316846001600160a01b031610613bd3576000356001600160e01b031916604051635d3dcd3160e01b8152600401610aa591906155cb565b8093506000613be182613c8a565b905080600003613c12576000356001600160e01b03191660405163726b3acb60e01b8152600401610aa591906155cb565b613c558f8f8f87818110613c2857613c28615540565b9050602002016020810190613c3d9190615c0e565b898986613c4f368a90038a018a615c55565b87613ca4565b15613c68575050505050505050506124cd565b836001019350505050613a8e565b6000610706610a10565b60006107066106fc565b6000613c9582612b95565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613ccc81613217565b15613cdd5760019350505050613ff6565b6020808c01516000908152600290915260409020548214613d1f576000356001600160e01b03191660405163d4cec26960e01b8152600401610aa591906155cb565b6000815460ff166004811115613d3757613d37614c4a565b14613d55576040516322de95ff60e21b815260040160405180910390fd5b6001600160a01b038716600090815260088201602052604090205460ff1615613d9c5760405163025fd59560e41b81526001600160a01b0388166004820152602401610aa5565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613dd75750604086015115155b80613de55750855160ff1615155b15613e2c576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613e6c929190615cb5565b60405180910390a3600080808c6001811115613e8a57613e8a614c4a565b03613edf576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613ed2908490615583565b9250508190559150613f44565b60018c6001811115613ef357613ef3614c4a565b03613b6c576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613f3b908490615583565b92505081905590505b8a8210613faa57825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613fa557613fa5838e6143aa565b613ff0565b898110613ff057825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b6001600061401c600080516020615d80833981519152611c92565b805190915060008190036140315750506109c2565b6000816001600160401b0381111561404b5761404b614dd7565b604051908082528060200260200182016040528015614074578160200160208202803683370190505b5090506000826001600160401b0381111561409157614091614dd7565b6040519080825280602002602001820160405280156140c457816020015b60608152602001906001900390816140af5790505b509050600087876040516020016140dc929190615cc3565b604051602081830303815290604052905060008160405160240161410091906156ab565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b858110156142e95786818151811061414957614149615540565b60200260200101516001600160a01b0316836040516141689190615604565b6000604051808303816000865af19150503d80600081146141a5576040519150601f19603f3d011682016040523d82523d6000602084013e6141aa565b606091505b508683815181106141bd576141bd615540565b602002602001018684815181106141d6576141d6615540565b60200260200101829052821515151581525050508481815181106141fc576141fc615540565b60200260200101516142e15786818151811061421a5761421a615540565b60200260200101516001600160a01b0316826040516142399190615604565b6000604051808303816000865af19150503d8060008114614276576040519150601f19603f3d011682016040523d82523d6000602084013e61427b565b606091505b5086838151811061428e5761428e615540565b602002602001018684815181106142a7576142a7615540565b60200260200101829052821515151581525050508780156142de57508481815181106142d5576142d5615540565b60200260200101515b97505b60010161412f565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161431f9493929190615cf4565b60405180910390a150505050505092915050565b600081815260018301602052604081205461437a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109c2565b5060006109c2565b600080600061439387878787614417565b915091506143a081614504565b5095945050505050565b6143b3816146ba565b15610a0c57815460ff191660021782556000806143cf836146d4565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051614409929190615d41565b60405180910390a250505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561444e57506000905060036144fb565b8460ff16601b1415801561446657508460ff16601c14155b1561447757506000905060046144fb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156144cb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166144f4576000600192509250506144fb565b9150600090505b94509492505050565b600081600481111561451857614518614c4a565b036145205750565b600181600481111561453457614534614c4a565b036145815760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610aa5565b600281600481111561459557614595614c4a565b036145e25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610aa5565b60038160048111156145f6576145f6614c4a565b0361464e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610aa5565b600481600481111561466257614662614c4a565b036103995760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610aa5565b60008160200151600014806109c257505060200151461490565b6060806146e0836146ba565b61471257602083015160405163092048d160e11b8152610aa5916001600160e01b0319600035169146906004016159d5565b8260800151516001600160401b0381111561472f5761472f614dd7565b604051908082528060200260200182016040528015614758578160200160208202803683370190505b5091508260800151516001600160401b0381111561477857614778614dd7565b6040519080825280602002602001820160405280156147ab57816020015b60608152602001906001900390816147965790505b50905060005b836080015151811015614975578360e0015181815181106147d4576147d4615540565b60200260200101515a11614807576147eb846134cd565b6040516307aec4ab60e21b8152600401610aa591815260200190565b8360800151818151811061481d5761481d615540565b60200260200101516001600160a01b03168460a00151828151811061484457614844615540565b60200260200101518560e00151838151811061486257614862615540565b6020026020010151908660c00151848151811061488157614881615540565b60200260200101516040516148969190615604565b600060405180830381858888f193505050503d80600081146148d4576040519150601f19603f3d011682016040523d82523d6000602084013e6148d9565b606091505b508483815181106148ec576148ec615540565b6020026020010184848151811061490557614905615540565b602002602001018290528215151515815250505082818151811061492b5761492b615540565b602002602001015161496d578082828151811061494a5761494a615540565b60200260200101516040516376df417560e11b8152600401610aa5929190615d66565b6001016147b1565b50915091565b508054600082559060005260206000209081019061039991905b808211156149a95760008155600101614995565b5090565b60008083601f8401126149bf57600080fd5b5081356001600160401b038111156149d657600080fd5b6020830191508360208260051b850101111561255757600080fd5b60008060008060008060608789031215614a0a57600080fd5b86356001600160401b0380821115614a2157600080fd5b614a2d8a838b016149ad565b90985096506020890135915080821115614a4657600080fd5b614a528a838b016149ad565b90965094506040890135915080821115614a6b57600080fd5b50614a7889828a016149ad565b979a9699509497509295939492505050565b60008060208385031215614a9d57600080fd5b82356001600160401b03811115614ab357600080fd5b614abf858286016149ad565b90969095509350505050565b60008151808452602080850194506020840160005b83811015614b055781516001600160a01b031687529582019590820190600101614ae0565b509495945050505050565b6020815260006109bf6020830184614acb565b80356001600160a01b038116811461170e57600080fd5b600080600080600080600080600080600060e08c8e031215614b5b57600080fd5b8b359a5060208c01359950614b7260408d01614b23565b98506001600160401b038060608e01351115614b8d57600080fd5b614b9d8e60608f01358f016149ad565b909950975060808d0135811015614bb357600080fd5b614bc38e60808f01358f016149ad565b909750955060a08d0135811015614bd957600080fd5b614be98e60a08f01358f016149ad565b909550935060c08d0135811015614bff57600080fd5b50614c108d60c08e01358e016149ad565b81935080925050509295989b509295989b9093969950565b60008060408385031215614c3b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c7057614c70614c4a565b9052565b60006060808352614c886060840187614acb565b83810360208581019190915286518083528782019282019060005b81811015614cc657614cb6838651614c60565b9383019391830191600101614ca3565b50506040925085810360408701528087518083528383019150838901925060005b81811015614d17578351805160ff1684528581015186850152860151868401529284019291860191600101614ce7565b50909a9950505050505050505050565b600080600060608486031215614d3c57600080fd5b8335925060208401359150614d5360408501614b23565b90509250925092565b600060208284031215614d6e57600080fd5b5035919050565b60006101008284031215612faa57600080fd5b600060208284031215614d9a57600080fd5b81356001600160401b03811115614db057600080fd5b61078884828501614d75565b600060208284031215614dce57600080fd5b6109bf82614b23565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614e1057614e10614dd7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614e3e57614e3e614dd7565b604052919050565b60006001600160401b03821115614e5f57614e5f614dd7565b5060051b60200190565b600082601f830112614e7a57600080fd5b81356020614e8f614e8a83614e46565b614e16565b8083825260208201915060208460051b870101935086841115614eb157600080fd5b602086015b84811015614ed457614ec781614b23565b8352918301918301614eb6565b509695505050505050565b60008060408385031215614ef257600080fd5b82356001600160401b0380821115614f0957600080fd5b818501915085601f830112614f1d57600080fd5b81356020614f2d614e8a83614e46565b82815260059290921b84018101918181019089841115614f4c57600080fd5b948201945b83861015614f7857853560068110614f695760008081fd5b82529482019490820190614f51565b96505086013592505080821115614f8e57600080fd5b50614f9b85828601614e69565b9150509250929050565b60008060408385031215614fb857600080fd5b82359150614fc860208401614b23565b90509250929050565b80356010811061170e57600080fd5b60008060408385031215614ff357600080fd5b614ffc83614fd1565b9150614fc860208401614b23565b60008083601f84011261501c57600080fd5b5081356001600160401b0381111561503357600080fd5b60208301915083602060608302850101111561255757600080fd5b60008060008060006060868803121561506657600080fd5b85356001600160401b038082111561507d57600080fd5b61508989838a01614d75565b9650602088013591508082111561509f57600080fd5b6150ab89838a016149ad565b909650945060408801359150808211156150c457600080fd5b506150d18882890161500a565b969995985093965092949392505050565b600060e08284031215612faa57600080fd5b60008060008060006060868803121561510c57600080fd5b85356001600160401b038082111561512357600080fd5b61508989838a016150e2565b60008060008060008060008060008060c08b8d03121561514e57600080fd5b8a35995061515e60208c01614b23565b985060408b01356001600160401b038082111561517a57600080fd5b6151868e838f016149ad565b909a50985060608d013591508082111561519f57600080fd5b6151ab8e838f016149ad565b909850965060808d01359150808211156151c457600080fd5b6151d08e838f016149ad565b909650945060a08d01359150808211156151e957600080fd5b506151f68d828e016149ad565b915080935050809150509295989b9194979a5092959850565b80356002811061170e57600080fd5b6000806040838503121561523157600080fd5b82356001600160401b0381111561524757600080fd5b61525385828601614d75565b925050614fc86020840161520f565b60a081016005871061527657615276614c4a565b95815260208101949094526040840192909252606083015260809091015290565b6000602082840312156152a957600080fd5b81356001600160401b038111156152bf57600080fd5b610788848285016150e2565b60008151808452602080850194506020840160005b83811015614b055781516001600160601b0316875295820195908201906001016152e0565b6060815260006153186060830186614acb565b828103602084015261532a8186614acb565b9050828103604084015261533e81856152cb565b9695505050505050565b6020815260006109bf60208301846152cb565b600080600080600080600080600080600060e08c8e03121561537c57600080fd5b8b359a5061538c60208d01614b23565b99506001600160401b038060408e013511156153a757600080fd5b6153b78e60408f01358f016149ad565b909a50985060608d01358110156153cd57600080fd5b6153dd8e60608f01358f016149ad565b909850965060808d01358110156153f357600080fd5b6154038e60808f01358f016149ad565b909650945060a08d013581101561541957600080fd5b5061542a8d60a08e01358e016149ad565b909350915061543b60c08d0161520f565b90509295989b509295989b9093969950565b60006020828403121561545f57600080fd5b6109bf82614fd1565b6000615476614e8a84614e46565b8381529050602080820190600585901b84018681111561549557600080fd5b845b818110156155285780356001600160401b03808211156154b75760008081fd5b8188019150601f8a818401126154cd5760008081fd5b8235828111156154df576154df614dd7565b6154f0818301601f19168801614e16565b92508083528b8782860101111561550957600091508182fd5b8087850188850137600090830187015250855250928201928201615497565b505050509392505050565b60006109bf368484615468565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176109c2576109c2615556565b808201808211156109c2576109c2615556565b818103818111156109c2576109c2615556565b6000826155c657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60005b838110156155fb5781810151838201526020016155e3565b50506000910152565b600082516156168184602087016155e0565b9190910192915050565b60008151808452602080850194506020840160005b83811015614b0557815187529582019590820190600101615635565b6040815260006156646040830185614acb565b82810360208401526156768185615620565b95945050505050565b600081518084526156978160208601602086016155e0565b601f01601f19169290920160200192915050565b6020815260006109bf602083018461567f565b6080815260006156d16080830187614acb565b602083820360208501526156e58288614acb565b915083820360408501526156f98287615620565b84810360608601528551808252602080880194509091019060005b818110156157405784516003811061572e5761572e614c4a565b83529383019391830191600101615714565b50909998505050505050505050565b600082601f83011261576057600080fd5b81356020615770614e8a83614e46565b8083825260208201915060208460051b87010193508684111561579257600080fd5b602086015b84811015614ed45780358352918301918301615797565b600082601f8301126157bf57600080fd5b6109bf83833560208501615468565b600061010082360312156157e157600080fd5b6157e9614ded565b82358152602083013560208201526040830135604082015261580d60608401614b23565b606082015260808301356001600160401b038082111561582c57600080fd5b61583836838701614e69565b608084015260a085013591508082111561585157600080fd5b61585d3683870161574f565b60a084015260c085013591508082111561587657600080fd5b615882368387016157ae565b60c084015260e085013591508082111561589b57600080fd5b506158a83682860161574f565b60e08301525092915050565b60208101601083106158c8576158c8614c4a565b91905290565b6001600160e01b03198316815260408101600b83106158ef576158ef614c4a565b8260208301529392505050565b6001600160601b0381811683821601908082111561139557611395615556565b60008151808452602080850194506020840160005b83811015614b05578151151587529582019590820190600101615931565b6060815260006159626060830186614acb565b828103602084015261597481866152cb565b9050828103604084015261533e818561591c565b60808152600061599b608083018761591c565b82810360208401526159ad81876152cb565b905082810360408401526159c18186614acb565b90508281036060840152613ff68185614acb565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a4457601f19868403018952615a3283835161567f565b98840198925090830190600101615a16565b5090979650505050505050565b6040815282516040820152602083015160608201526040830151608082015260006060840151615a8c60a08401826001600160a01b03169052565b5060808401516101008060c0850152615aa9610140850183614acb565b915060a0860151603f19808685030160e0870152615ac78483615620565b935060c08801519150808685030183870152615ae384836159f7565b935060e0880151925080868503016101208701525050615b038282615620565b9250505061097a60208301846001600160a01b03169052565b600060018201615b2e57615b2e615556565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615b5e6040830185614acb565b8281036020840152615676818561591c565b604081526000615b83604083018561591c565b82810360208401526156768185614acb565b6001600160a01b03841681526001600160e01b0319831660208201526060604082018190526000906156769083018461567f565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615bfe57600080fd5b8151801515811461097a57600080fd5b600060208284031215615c2057600080fd5b6109bf8261520f565b803560ff8116811461170e57600080fd5b600060208284031215615c4c57600080fd5b6109bf82615c29565b600060608284031215615c6757600080fd5b604051606081018181106001600160401b0382111715615c8957615c89614dd7565b604052615c9583615c29565b815260208301356020820152604083013560408201528091505092915050565b604081016158ef8285614c60565b6001600160e01b0319831681528151600090615ce68160048501602087016155e0565b919091016004019392505050565b608081526000615d07608083018761567f565b8281036020840152615d198187614acb565b90508281036040840152615d2d818661591c565b90508281036060840152613ff681856159f7565b604081526000615d54604083018561591c565b828103602084015261567681856159f7565b828152604060208201526000610977604083018461567f56fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212203aeb859a29338b321b84771c92456d2e11aa2e5f0edd2f9bd7402157ea320cc164736f6c63430008170033\"", + "callValue": 0, + "chainId": 2020, + "constructorArgs": "0x", "contractName": "RoninBridgeManager", - "deployedBytecode": "\"0x608060405234801561001057600080fd5b506004361061020f5760003560e01c806301a5f43f1461021457806306aba0e1146102295780630a44fa43146102445780630f7c31891461025757806315702f051461026c5780631c905e391461027f5780631f425338146102a15780632c5e6520146102b45780632d6d7d73146102d757806334d5f37b146102ea57806335da81211461030a5780633644e5151461031d5780636a61b16c146103265780637de5dedd146103395780637f7fe05814610341578063800eaab314610361578063828fc1a114610374578063865e6fd31461038757806386ccbf121461039a578063901979d5146103ad57806390264e59146103d85780639570abab146103eb57806397d6ae16146103fe5780639a7d3382146104115780639b19dbfd14610424578063a54f8a091461042c578063a64a83801461043f578063aee1767f14610452578063b384abef14610465578063b405aaf2146104c0578063b5d6e110146104d3578063b9c36209146104e6578063bc4e068f146104f9578063bc96180b1461050c578063bc9e0a5514610514578063c441c4a814610527578063cc7e6b3b1461053e578063d0a50db01461055e578063d78392f814610566578063dafae40814610579578063dd1f89141461058c578063de981f1b1461059f578063e75235b8146105b2578063e9c03498146105c8578063f80b5352146105db575b600080fd5b61022761022236600461497a565b6105e3565b005b610231610692565b6040519081526020015b60405180910390f35b610231610252366004614a13565b6106a1565b61025f610726565b60405161023b9190614aa6565b61022761027a366004614ad0565b610738565b61029261028d366004614bbe565b610842565b60405161023b93929190614c0a565b6102276102af366004614a13565b61085e565b6102c76102c2366004614cbd565b6108fd565b604051901515815260200161023b565b61025f6102e5366004614a13565b61090a565b6102316102f8366004614cf2565b60026020526000908152604090205481565b610227610318366004614a13565b610951565b61023160015481565b610227610334366004614d1e565b610999565b6102316109ae565b61035461034f366004614d52565b610a04565b60405161023b9190614d6d565b61022761036f366004614f18565b610a80565b6102c7610382366004614f7b565b610ab8565b610227610395366004614fb6565b610ac6565b6102276103a8366004615024565b610ae1565b6103c06103bb366004614d52565b610aee565b6040516001600160601b03909116815260200161023b565b6102276103e63660046150ca565b610b24565b6102276103f9366004615105565b610b43565b61022761040c366004615024565b610bda565b61022761041f366004614bbe565b610bf1565b61025f610c3e565b61022761043a3660046151f4565b610ca9565b61022761044d366004614cf2565b610cc5565b610354610460366004614d52565b610cd6565b6104af610473366004614bbe565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b60405161023b959493929190615238565b6102c76104ce366004614d52565b610ce8565b6102276104e13660046150ca565b610d20565b6102276104f4366004614bbe565b610d2d565b610292610507366004614cf2565b610d3f565b600454610231565b61022761052236600461526d565b610d5c565b61052f610dbb565b60405161023b939291906152db565b61055161054c366004614a13565b610e95565b60405161023b9190615314565b610231610ed3565b6103c0610574366004614d52565b610ee6565b6102c7610587366004614cf2565b610ef1565b61022761059a366004615327565b610f2d565b6103546105ad366004615419565b61103a565b6105ba61109c565b60405161023b929190615434565b6102276105d6366004614a13565b6110be565b61025f611107565b6105eb61116a565b61068986868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506111c692505050565b50505050505050565b600061069c611528565b905090565b60008282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106e2925083915061153b9050565b61071e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061157092505050565b949350505050565b606061069c6107336115f5565b611619565b6107413361162d565b6108346040518061010001604052806107598e61166f565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016107f4868861550d565b815260200184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509152503361171f565b505050505050505050505050565b6060806060610851858561181e565b9250925092509250925092565b61086661116a565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108a5925083915061153b9050565b60006108af6115f5565b905060005b838110156108f6576108ed8585838181106108d1576108d161551a565b90506020020160208101906108e69190614d52565b8390611bf5565b506001016108b4565b5050505050565b600061071e848484611c0a565b606061094883838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509250611c2d915050565b90505b92915050565b61095961116a565b610995828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611d8092505050565b5050565b6109ab6109a5826155af565b33611e33565b50565b6000806109b9611eff565b90506000806109c661109c565b91509150806001828560040154856109de91906156ab565b6109e891906156c2565b6109f291906156d5565b6109fc91906156e8565b935050505090565b6000806000610a1a610a14611eff565b85611f23565b9150915081610a47578360405163141e2e1f60e11b8152600401610a3e9190614d6d565b60405180910390fd5b610a4f611eff565b6001018181548110610a6357610a6361551a565b6000918252602090912001546001600160a01b0316949350505050565b333014610aae576000356001600160e01b0319166040516307337e1960e41b8152600401610a3e919061570a565b6109958282611f88565b600061094860008484611c0a565b610ace61116a565b610ad781612031565b610995828261205e565b6108f685858585856120e9565b600080610af9611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b610b2d3361162d565b610b3b858585858533612182565b505050505050565b610b4c3361162d565b610bce8a89898c8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b9392508b91508c905061550d565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503392506121c1915050565b50505050505050505050565b610be33361162d565b6108f685858585853361231b565b600082815260036020908152604080832084845290915281206001810154909103610c2f5760405163713b099760e11b815260040160405180910390fd5b610c388161233a565b50505050565b6060610c48611eff565b600101805480602002602001604051908101604052809291908181526020018280548015610c9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c81575b5050505050905090565b610cb23361162d565b61099533610cbf846155af565b8361254f565b610ccd61116a565b6109ab8161264f565b6000610ce1826126bc565b5092915050565b600080610cf3611eff565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6108f68585858585612733565b610d3561116a565b61099582826127e9565b6060806060610d4f60008561181e565b9250925092509193909250565b6109ab6109a5610dac610d72606085018561571f565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525060019250611c2d915050565b610db584615768565b9061289b565b60608060606000610dca611eff565b805460408051602080840282018101909252828152929350839190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b5050505050935080600101805480602002602001604051908101604052809291908181526020018280548015610e7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e5f575b50505050509250610e8d846129a1565b915050909192565b60606109488383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506129a192505050565b6000610edd611eff565b60010154919050565b600061094b82612a86565b600080610efc612abb565b9050610f06611528565b8160010154610f1591906156ab565b6002820154610f2490856156ab565b10159392505050565b610f363361162d565b6000604051806101000160405280610f4d4661166f565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c918291850190849080828437600092019190915250505090825250602001610fe8878961550d565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061102e813361171f565b5061083433828461254f565b6000611044612adf565b600083600f81111561105857611058614be0565b60ff1681526020810191909152604001600020546001600160a01b0316905080611097578160405163409140df60e11b8152600401610a3e9190615843565b919050565b60008060006110a9612abb565b90508060010154816002015492509250509091565b6110c661116a565b611102828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b0392505050565b505050565b6060611111611eff565b805460408051602080840282018101909252828152929190830182828015610c9f576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c81575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031633146111c4576000356001600160e01b0319166001604051620f948f60ea1b8152600401610a3e92919061585d565b565b60606111d28383612ee9565b6111db8161153b565b60006111e5611eff565b8451875191925090811480156111fb5750855181145b611226576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b806001600160401b0381111561123e5761123e614d81565b604051908082528060200260200182016040528015611267578160200160208202803683370190505b50935080600003611279575050611520565b60008060008060005b8581101561148c578a818151811061129c5761129c61551a565b602002602001015194508981815181106112b8576112b861551a565b602002602001015193508b81815181106112d4576112d461551a565b602002602001015192506112e785612ff3565b6112f084612ff3565b826001600160601b0316600003611328576000356001600160e01b031916604051637f11b8a360e11b8152600401610a3e919061570a565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b03938416939182169261138092908116911661588b565b61138a919061588b565b611394919061588b565b6001600160601b03166000148982815181106113b2576113b261551a565b6020026020010190151590811515815250508881815181106113d6576113d661551a565b602002602001015115611484578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c01909452902080549091168217905561148190836156c2565b91505b600101611282565b50808660040160008282546114a191906156c2565b90915550506040516114dc906347c28ec560e11b906114c8908c908f908d906020016158de565b604051602081830303815290604052613028565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c6040516115119493929190615917565b60405180910390a15050505050505b509392505050565b6000611532611eff565b60040154905090565b61154481613055565b156109ab576000356001600160e01b031916604051630d697db160e11b8152600401610a3e919061570a565b60008161157c8161153b565b6000611586611eff565b905060005b84518110156115ed578160020160008683815181106115ac576115ac61551a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546115e3906001600160601b0316856156c2565b935060010161158b565b505050919050565b7f5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd97624090565b60606000611626836130f4565b9392505050565b61163681612a86565b6001600160601b03166000036109ab576000356001600160e01b0319166003604051620f948f60ea1b8152600401610a3e92919061585d565b6000818152600260205260408120549081900361169e5750600090815260026020526040902060019081905590565b60008281526003602090815260408083208484529091528120906116c18261233a565b905080611718576000825460ff1660048111156116e0576116e0614be0565b036116fe5760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b602082015160009080820361175a576000356001600160e01b03191660004660405163092048d160e11b8152600401610a3e93929190615964565b600454611768908590613150565b6000611773856131f1565b905061177e8261166f565b600083815260036020908152604080832084845290915290819020908701519194506117ab91839061333b565b845183146117da576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa4888860405161180e929190615aff565b60405180910390a4505092915050565b6000828152600360209081526040808320848452909152812060048101546005820154606093849384939092909161185682846156c2565b9050806001600160401b0381111561187057611870614d81565b604051908082528060200260200182016040528015611899578160200160208202803683370190505b509550806001600160401b038111156118b4576118b4614d81565b6040519080825280602002602001820160405280156118ed57816020015b6118da614896565b8152602001906001900390816118d25790505b509450806001600160401b0381111561190857611908614d81565b604051908082528060200260200182016040528015611931578160200160208202803683370190505b50965060005b83811015611a865760008782815181106119535761195361551a565b6020026020010190600181111561196c5761196c614be0565b9081600181111561197f5761197f614be0565b90525060008a81526003602090815260408083208c8452909152812060048701805460079092019291849081106119b8576119b861551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff16815260018201549381019390935260020154908201528651879083908110611a1657611a1661551a565b6020026020010181905250846004018181548110611a3657611a3661551a565b9060005260206000200160009054906101000a90046001600160a01b0316888281518110611a6657611a6661551a565b6001600160a01b0390921660209283029190910190910152600101611937565b5060005b82811015611be957600187611a9f86846156c2565b81518110611aaf57611aaf61551a565b60200260200101906001811115611ac857611ac8614be0565b90816001811115611adb57611adb614be0565b90525060008a81526003602090815260408083208c845290915281206005870180546007909201929184908110611b1457611b1461551a565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff168152600182015493810193909352600201549082015286611b6986846156c2565b81518110611b7957611b7961551a565b6020026020010181905250846005018181548110611b9957611b9961551a565b6000918252602090912001546001600160a01b031688611bb986846156c2565b81518110611bc957611bc961551a565b6001600160a01b0390921660209283029190910190910152600101611a8a565b50505050509250925092565b6000610948836001600160a01b03841661334b565b6000838152600360209081526040808320858452909152812061071e908361343e565b606082516001600160401b03811115611c4857611c48614d81565b604051908082528060200260200182016040528015611c71578160200160208202803683370190505b50905060005b8351811015610ce15760056000858381518110611c9657611c9661551a565b60200260200101516005811115611caf57611caf614be0565b6005811115611cc057611cc0614be0565b815260200190815260200160002060009054906101000a90046001600160a01b0316828281518110611cf457611cf461551a565b60200260200101906001600160a01b031690816001600160a01b031681525050828015611d4c575060006001600160a01b0316828281518110611d3957611d3961551a565b60200260200101516001600160a01b0316145b15611d78576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b600101611c77565b80611d8a8161153b565b6000611d946115f5565b905060008060005b8551811015610b3b57858181518110611db757611db761551a565b60200260200101519250611dca83612031565b611ddb836312c0151560e21b613460565b611de584846135f3565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101611d9c565b6000611e3e836131f1565b602080850151600090815260038252604080822087518352909252206001810154919250908214611e89576001810154604051632bee7fdb60e21b8152610a3e918491600401615434565b6001815460ff166004811115611ea157611ea1614be0565b14611ebf57604051632c2f3bdf60e01b815260040160405180910390fd5b83606001516001600160a01b0316836001600160a01b031614611ef55760405163e61090ab60e01b815260040160405180910390fd5b610c388185613608565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b8454811015611f7657848181548110611f4457611f4461551a565b6000918252602090912001546001600160a01b0390811690851603611f6e57600192509050611f81565b600101611f29565b506000600019915091505b9250929050565b60005b825181101561110257306001600160a01b0316828281518110611fb057611fb061551a565b60200260200101516001600160a01b031603611fed576000356001600160e01b03191660405163053265f160e01b8152600401610a3e919061570a565b6120298382815181106120025761200261551a565b602002602001015183838151811061201c5761201c61551a565b6020026020010151613675565b600101611f8b565b806001600160a01b03163b6000036109ab5780604051630bfc64a360e21b8152600401610a3e9190614d6d565b80612067612adf565b600084600f81111561207b5761207b614be0565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156120bc576120bc614be0565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006120fc6120f7876155af565b6131f1565b60208088013560009081526003825260408082208a3583529092522060010154909150811461216157602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610b3b61216d876155af565b8686868661217d6120f78d6155af565b613708565b61218a6148b6565b61219c61219688615768565b836139d1565b90506121b7818787878761217d6121b28e615768565b613abe565b9695505050505050565b60006121cd600061166f565b905060006040518060e001604052808381526020018b8152602001886001600160a01b031681526020018a8a80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250505060208083018a905260408084018a9052606090930188905282518c820281810183019094528c8152939450909261228d92612286928e918e9182919085019084908082843760009201919091525060019250611c2d915050565b839061289b565b90506122a46004548261315090919063ffffffff16565b60006122af826131f1565b6000858152600080516020615ed6833981519152602052604090209091506122d890828e61333b565b8084600080516020615eb6833981519152846122f387613abe565b878a6040516123059493929190615b6a565b60405180910390a3505050505050505050505050565b61232d612327876155af565b8261171f565b50610b3b61216d876155af565b600080825460ff16600481111561235357612353614be0565b148015612364575042826006015411155b905080156110975760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b6004830154811015612450578260080160008460040183815481106123c4576123c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19169055600484018054600786019291908490811061240d5761240d61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161239d565b5060005b60058301548110156125075782600801600084600501838154811061247b5761247b61551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106124c4576124c461551a565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501612454565b50815460ff191682556000600183018190556002830181905560038301819055612535906004840190614904565b612543600583016000614904565b60006006830155919050565b4682602001511461258857602082015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b6000612593836131f1565b602080850151600090815260038252604080822087518352909252206001015490915081146125f857602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b6000612602613bfd565b905060008161260f613c07565b61261991906156d5565b6126249060016156c2565b905061262e614896565b612645868685858b866126408e613c11565b613c2b565b5050505050505050565b6003811015612671576040516305f4dee960e31b815260040160405180910390fd5b600061267b611eff565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b6000806000806126d66126cd611eff565b60010186611f23565b91509150816126fa57846040516326527e1760e01b8152600401610a3e9190614d6d565b612702611eff565b8054829081106127145761271461551a565b6000918252602090912001546001600160a01b03169590945092505050565b6000612751612748610d72606089018961571f565b610db588615768565b9050600061275e826131f1565b60008080526003602090815284518252600080516020615ed68339815191529052604090206001015490915081146127d55760008080526003602090815283518252600080516020615ed68339815191529052604090819020600101549051632bee7fdb60e21b8152610a3e918391600401615434565b610689828787878761217d6121b28e615768565b808211806127f8575060018111155b15612824576000356001600160e01b0319166040516387f6f09560e01b8152600401610a3e919061570a565b600061282e612abb565b600181018054600283018054928790558590558254929350918490869085600061285783615c23565b919050557f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8858560405161288c929190615434565b60405180910390a45050505050565b6128a36148b6565b8251815260006020808301919091528301516040808301919091528301516001600160a01b0316606080830191909152830151516001600160401b038111156128ee576128ee614d81565b604051908082528060200260200182016040528015612917578160200160208202803683370190505b5060808083019190915283015160a08083019190915283015160c08083019190915283015160e082015260005b836060015151811015610ce1578281815181106129635761296361551a565b6020026020010151826080015182815181106129815761298161551a565b6001600160a01b0390921660209283029190910190910152600101612944565b606060006129ad611eff565b905082516001600160401b038111156129c8576129c8614d81565b6040519080825280602002602001820160405280156129f1578160200160208202803683370190505b50915060005b835181101561171857816002016000858381518110612a1857612a1861551a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612a6657612a6661551a565b6001600160601b03909216602092830291909101909101526001016129f7565b6000612a90611eff565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0090565b7fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb90565b606081612b0f8161153b565b6000612b19611eff565b8451909150806001600160401b03811115612b3657612b36614d81565b604051908082528060200260200182016040528015612b5f578160200160208202803683370190505b50935080600003612b71575050612ee3565b60058201548254612b839083906156d5565b1015612ba25760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612e6957898181518110612bc557612bc561551a565b60200260200101519350612bd8846126bc565b9095509150612be685612ff3565b612bef84612ff3565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612c4357506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612c5557612c5561551a565b602002602001019015159081151581525050888181518110612c7957612c7961551a565b602002602001015115612e61576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612cbc906001906156d5565b9050886000018181548110612cd357612cd361551a565b60009182526020909120015489546001600160a01b03909116908a9086908110612cff57612cff61551a565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612d3957612d39615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612d9957612d9961551a565b60009182526020909120015460018a0180546001600160a01b039092169186908110612dc757612dc761551a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612e0857612e08615c3c565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612e5c82866156c2565b945050505b600101612bab565b5081866004016000828254612e7e91906156d5565b9091555050604051612ea390636242a4ef60e11b906114c8908c908c90602001615c52565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612ed4929190615c77565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612f0b57612f0b614d81565b604051908082528060200260200182016040528015612f34578160200160208202803683370190505b50925060005b82811015612f8e57858181518110612f5457612f5461551a565b6020026020010151848281518110612f6e57612f6e61551a565b6001600160a01b0390921660209283029190910190910152600101612f3a565b60005b82811015612fe957858181518110612fab57612fab61551a565b6020026020010151858381518110612fc557612fc561551a565b6001600160a01b039092166020928302919091019091015260019182019101612f91565b5050505092915050565b6001600160a01b0381166109ab576000356001600160e01b03191660405163104c66df60e31b8152600401610a3e919061570a565b6130328282613f6b565b610995573382826040516319b5fdcb60e31b8152600401610a3e93929190615c9c565b6000815160000361306857506000919050565b60005b60018351038110156130eb57600181015b83518110156130e2578381815181106130975761309761551a565b60200260200101516001600160a01b03168483815181106130ba576130ba61551a565b60200260200101516001600160a01b0316036130da575060019392505050565b60010161307c565b5060010161306b565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561314457602002820191906000526020600020905b815481526020019060010190808311613130575b50505050509050919050565b600082608001515111801561316e57508160a0015151826080015151145b801561318357508160c0015151826080015151145b801561319857508160e0015151826080015151145b6131c3576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b6131cd81426156c2565b826040015111156109955760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b0381111561321f5761321f614d81565b604051908082528060200260200182016040528015613248578160200160208202803683370190505b5060e086015190915060005b82518110156132a7578660c0015181815181106132735761327361551a565b6020026020010151805190602001208382815181106132945761329461551a565b6020908102919091010152600101613254565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6001830191909155600690910155565b6000818152600183016020526040812054801561343457600061336f6001836156d5565b8554909150600090613383906001906156d5565b90508181146133e85760008660000182815481106133a3576133a361551a565b90600052602060002001549050808760000184815481106133c6576133c661551a565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806133f9576133f9615c3c565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061094b565b600091505061094b565b6001600160a01b03166000908152600891909101602052604090205460ff1690565b600081604051602401613473919061570a565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b038616906134bc908590615cd0565b600060405180830381855afa9150503d80600081146134f7576040519150601f19603f3d011682016040523d82523d6000602084013e6134fc565b606091505b5091509150816135be57846001600160a01b0316836040516024016135219190615cec565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516135569190615cd0565b600060405180830381855afa9150503d8060008114613591576040519150601f19603f3d011682016040523d82523d6000602084013e613596565b606091505b509092509050816135be57838560405163069d427960e11b8152600401610a3e929190615cff565b808060200190518101906135d29190615d22565b6108f657838560405163069d427960e11b8152600401610a3e929190615cff565b6000610948836001600160a01b038416614291565b613611816142e0565b1561099557815460ff1916600217825560008061362d836142fa565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051613667929190615d44565b60405180910390a250505050565b806005600084600581111561368c5761368c614be0565b600581111561369d5761369d614be0565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b0392831617905581168260058111156136db576136db614be0565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061371657508382145b613741576000356001600160e01b0319166040516306b5667560e21b8152600401610a3e919061570a565b600061379a61374f60015490565b61375a8460006145a1565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006137b56137aa60015490565b61375a8560016145a1565b905060006137c1613bfd565b90506000816137ce613c07565b6137d891906156d5565b6137e39060016156c2565b90506000805b87811015610834573660008a8a848181106138065761380661551a565b606002919091019250600090508d8d858181106138255761382561551a565b905060200201602081019061383a9190615d69565b600181111561384b5761384b614be0565b0361387757613870886138616020850185615d95565b846020013585604001356145da565b90506138ee565b60018d8d8581811061388b5761388b61551a565b90506020020160208101906138a09190615d69565b60018111156138b1576138b1614be0565b036138c757613870876138616020850185615d95565b6000356001600160e01b031916604051630612418f60e11b8152600401610a3e919061570a565b806001600160a01b0316846001600160a01b03161061392e576000356001600160e01b031916604051635d3dcd3160e01b8152600401610a3e919061570a565b809350600061393c82613c11565b90508060000361396d576000356001600160e01b03191660405163726b3acb60e01b8152600401610a3e919061570a565b6139b08f8f8f878181106139835761398361551a565b90506020020160208101906139989190615d69565b8989866139aa368a90038a018a615db0565b87613c2b565b156139c357505050505050505050610b3b565b8360010193505050506137e9565b6139d96148b6565b6139f26139eb84606001516001611c2d565b849061289b565b9050613a096004548261315090919063ffffffff16565b6000613a14826131f1565b90506000613a22600061166f565b6000818152600080516020615ed68339815191526020908152604090912090870151919250613a5291849061333b565b82518114613a81576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b8181600080516020615eb683398151915285613a9c89613abe565b8989604051613aae9493929190615b6a565b60405180910390a3505092915050565b6080810151606082015160a083015151600092919083906001600160401b03811115613aec57613aec614d81565b604051908082528060200260200182016040528015613b15578160200160208202803683370190505b5060c086015190915060005b8251811015613b74578660a001518181518110613b4057613b4061551a565b602002602001015180519060200120838281518110613b6157613b6161551a565b6020908102919091010152600101613b21565b50604080517fde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a8152875160208083019190915280890151828401529790910151606082015283518702938701939093206080840152835186029386019390932060a0830152805185029085012060c082015281518402919093012060e083015250610100902090565b600061069c6109ae565b600061069c610692565b6000613c1c82612a86565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613c538161233a565b15613c645760019350505050613f60565b6020808c01516000908152600290915260409020548214613ca6576000356001600160e01b03191660405163d4cec26960e01b8152600401610a3e919061570a565b6000815460ff166004811115613cbe57613cbe614be0565b14613cdc576040516322de95ff60e21b815260040160405180910390fd5b613ce6818861343e565b15613d06578660405163025fd59560e41b8152600401610a3e9190614d6d565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613d415750604086015115155b80613d4f5750855160ff1615155b15613d96576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613dd6929190615e10565b60405180910390a3600080808c6001811115613df457613df4614be0565b03613e49576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613e3c9084906156c2565b9250508190559150613eae565b60018c6001811115613e5d57613e5d614be0565b036138c7576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613ea59084906156c2565b92505081905590505b8a8210613f1457825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613f0f57613f0f838e613608565b613f5a565b898110613f5a57825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b60016000613f7a6107336115f5565b80519091506000819003613f8f57505061094b565b6000816001600160401b03811115613fa957613fa9614d81565b604051908082528060200260200182016040528015613fd2578160200160208202803683370190505b5090506000826001600160401b03811115613fef57613fef614d81565b60405190808252806020026020018201604052801561402257816020015b606081526020019060019003908161400d5790505b5090506000878760405160200161403a929190615e1e565b604051602081830303815290604052905060008160405160240161405e9190615cec565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b85811015614247578681815181106140a7576140a761551a565b60200260200101516001600160a01b0316836040516140c69190615cd0565b6000604051808303816000865af19150503d8060008114614103576040519150601f19603f3d011682016040523d82523d6000602084013e614108565b606091505b5086838151811061411b5761411b61551a565b602002602001018684815181106141345761413461551a565b602002602001018290528215151515815250505084818151811061415a5761415a61551a565b602002602001015161423f578681815181106141785761417861551a565b60200260200101516001600160a01b0316826040516141979190615cd0565b6000604051808303816000865af19150503d80600081146141d4576040519150601f19603f3d011682016040523d82523d6000602084013e6141d9565b606091505b508683815181106141ec576141ec61551a565b602002602001018684815181106142055761420561551a565b602002602001018290528215151515815250505087801561423c57508481815181106142335761423361551a565b60200260200101515b97505b60010161408d565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161427d9493929190615e4f565b60405180910390a150505050505092915050565b60008181526001830160205260408120546142d85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561094b565b50600061094b565b600081602001516000148061094b57505060200151461490565b606080614306836142e0565b61433857602083015160405163092048d160e11b8152610a3e916001600160e01b031960003516914690600401615964565b8260800151516001600160401b0381111561435557614355614d81565b60405190808252806020026020018201604052801561437e578160200160208202803683370190505b5091508260800151516001600160401b0381111561439e5761439e614d81565b6040519080825280602002602001820160405280156143d157816020015b60608152602001906001900390816143bc5790505b50905060005b83608001515181101561459b578360e0015181815181106143fa576143fa61551a565b60200260200101515a1161442d57614411846131f1565b6040516307aec4ab60e21b8152600401610a3e91815260200190565b836080015181815181106144435761444361551a565b60200260200101516001600160a01b03168460a00151828151811061446a5761446a61551a565b60200260200101518560e0015183815181106144885761448861551a565b6020026020010151908660c0015184815181106144a7576144a761551a565b60200260200101516040516144bc9190615cd0565b600060405180830381858888f193505050503d80600081146144fa576040519150601f19603f3d011682016040523d82523d6000602084013e6144ff565b606091505b508483815181106145125761451261551a565b6020026020010184848151811061452b5761452b61551a565b60200260200101829052821515151581525050508281815181106145515761455161551a565b602002602001015161459357808282815181106145705761457061551a565b60200260200101516040516376df417560e11b8152600401610a3e929190615e9c565b6001016143d7565b50915091565b604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60008060006145eb87878787614602565b915091506145f8816146e5565b5095945050505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561462f57506000905060036146dc565b8460ff16601b1415801561464757508460ff16601c14155b1561465857506000905060046146dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156146ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166146d5576000600192509250506146dc565b9150600090505b94509492505050565b60008160048111156146f9576146f9614be0565b036147015750565b600181600481111561471557614715614be0565b0361475d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610a3e565b600281600481111561477157614771614be0565b036147be5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a3e565b60038160048111156147d2576147d2614be0565b0361482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a3e565b600481600481111561483e5761483e614be0565b036109ab5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a3e565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060008152602001600081526020016000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001606081525090565b50805460008255906000526020600020908101906109ab91905b80821115614932576000815560010161491e565b5090565b60008083601f84011261494857600080fd5b5081356001600160401b0381111561495f57600080fd5b6020830191508360208260051b8501011115611f8157600080fd5b6000806000806000806060878903121561499357600080fd5b86356001600160401b03808211156149aa57600080fd5b6149b68a838b01614936565b909850965060208901359150808211156149cf57600080fd5b6149db8a838b01614936565b909650945060408901359150808211156149f457600080fd5b50614a0189828a01614936565b979a9699509497509295939492505050565b60008060208385031215614a2657600080fd5b82356001600160401b03811115614a3c57600080fd5b614a4885828601614936565b90969095509350505050565b6001600160a01b03169052565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160a01b031687529582019590820190600101614a76565b509495945050505050565b6020815260006109486020830184614a61565b80356001600160a01b038116811461109757600080fd5b600080600080600080600080600080600060e08c8e031215614af157600080fd5b8b359a5060208c01359950614b0860408d01614ab9565b98506001600160401b0360608d0135811015614b2357600080fd5b614b338e60608f01358f01614936565b909950975060808d0135811015614b4957600080fd5b614b598e60808f01358f01614936565b909750955060a08d0135811015614b6f57600080fd5b614b7f8e60a08f01358f01614936565b909550935060c08d0135811015614b9557600080fd5b50614ba68d60c08e01358e01614936565b81935080925050509295989b509295989b9093969950565b60008060408385031215614bd157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c0657614c06614be0565b9052565b60006060808352614c1e6060840187614a61565b83810360208581019190915286518083528782019282019060005b81811015614c5c57614c4c838651614bf6565b9383019391830191600101614c39565b50506040925085810360408701528087518083528383019150838901925060005b81811015614cad578351805160ff1684528581015186850152860151868401529284019291860191600101614c7d565b50909a9950505050505050505050565b600080600060608486031215614cd257600080fd5b8335925060208401359150614ce960408501614ab9565b90509250925092565b600060208284031215614d0457600080fd5b5035919050565b60006101008284031215612ee357600080fd5b600060208284031215614d3057600080fd5b81356001600160401b03811115614d4657600080fd5b61071e84828501614d0b565b600060208284031215614d6457600080fd5b61094882614ab9565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614dba57614dba614d81565b60405290565b60405160e081016001600160401b0381118282101715614dba57614dba614d81565b604051601f8201601f191681016001600160401b0381118282101715614e0a57614e0a614d81565b604052919050565b60006001600160401b03821115614e2b57614e2b614d81565b5060051b60200190565b600082601f830112614e4657600080fd5b81356020614e5b614e5683614e12565b614de2565b8083825260208201915060208460051b870101935086841115614e7d57600080fd5b602086015b84811015614ea757803560068110614e9a5760008081fd5b8352918301918301614e82565b509695505050505050565b600082601f830112614ec357600080fd5b81356020614ed3614e5683614e12565b8083825260208201915060208460051b870101935086841115614ef557600080fd5b602086015b84811015614ea757614f0b81614ab9565b8352918301918301614efa565b60008060408385031215614f2b57600080fd5b82356001600160401b0380821115614f4257600080fd5b614f4e86838701614e35565b93506020850135915080821115614f6457600080fd5b50614f7185828601614eb2565b9150509250929050565b60008060408385031215614f8e57600080fd5b82359150614f9e60208401614ab9565b90509250929050565b80356010811061109757600080fd5b60008060408385031215614fc957600080fd5b614fd283614fa7565b9150614f9e60208401614ab9565b60008083601f840112614ff257600080fd5b5081356001600160401b0381111561500957600080fd5b602083019150836020606083028501011115611f8157600080fd5b60008060008060006060868803121561503c57600080fd5b85356001600160401b038082111561505357600080fd5b61505f89838a01614d0b565b9650602088013591508082111561507557600080fd5b61508189838a01614936565b9096509450604088013591508082111561509a57600080fd5b506150a788828901614fe0565b969995985093965092949392505050565b600060e08284031215612ee357600080fd5b6000806000806000606086880312156150e257600080fd5b85356001600160401b03808211156150f957600080fd5b61505f89838a016150b8565b60008060008060008060008060008060c08b8d03121561512457600080fd5b8a35995061513460208c01614ab9565b985060408b01356001600160401b038082111561515057600080fd5b61515c8e838f01614936565b909a50985060608d013591508082111561517557600080fd5b6151818e838f01614936565b909850965060808d013591508082111561519a57600080fd5b6151a68e838f01614936565b909650945060a08d01359150808211156151bf57600080fd5b506151cc8d828e01614936565b915080935050809150509295989b9194979a5092959850565b80356002811061109757600080fd5b6000806040838503121561520757600080fd5b82356001600160401b0381111561521d57600080fd5b61522985828601614d0b565b925050614f9e602084016151e5565b60a081016005871061524c5761524c614be0565b95815260208101949094526040840192909252606083015260809091015290565b60006020828403121561527f57600080fd5b81356001600160401b0381111561529557600080fd5b61071e848285016150b8565b60008151808452602080850194506020840160005b83811015614a9b5781516001600160601b0316875295820195908201906001016152b6565b6060815260006152ee6060830186614a61565b82810360208401526153008186614a61565b905082810360408401526121b781856152a1565b60208152600061094860208301846152a1565b600080600080600080600080600080600060e08c8e03121561534857600080fd5b8b359a5061535860208d01614ab9565b99506001600160401b0360408d013581101561537357600080fd5b6153838e60408f01358f01614936565b909a50985060608d013581101561539957600080fd5b6153a98e60608f01358f01614936565b909850965060808d01358110156153bf57600080fd5b6153cf8e60808f01358f01614936565b909650945060a08d01358110156153e557600080fd5b506153f68d60a08e01358e01614936565b909350915061540760c08d016151e5565b90509295989b509295989b9093969950565b60006020828403121561542b57600080fd5b61094882614fa7565b918252602082015260400190565b6000615450614e5684614e12565b8381529050602080820190600585901b84018681111561546f57600080fd5b845b818110156155025780356001600160401b03808211156154915760008081fd5b8188019150601f8a818401126154a75760008081fd5b8235828111156154b9576154b9614d81565b6154ca818301601f19168801614de2565b92508083528b878286010111156154e357600091508182fd5b8087850188850137600090830187015250855250928201928201615471565b505050509392505050565b6000610948368484615442565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261554157600080fd5b81356020615551614e5683614e12565b8083825260208201915060208460051b87010193508684111561557357600080fd5b602086015b84811015614ea75780358352918301918301615578565b600082601f8301126155a057600080fd5b61094883833560208501615442565b600061010082360312156155c257600080fd5b6155ca614d97565b8235815260208301356020820152604083013560408201526155ee60608401614ab9565b606082015260808301356001600160401b038082111561560d57600080fd5b61561936838701614eb2565b608084015260a085013591508082111561563257600080fd5b61563e36838701615530565b60a084015260c085013591508082111561565757600080fd5b6156633683870161558f565b60c084015260e085013591508082111561567c57600080fd5b5061568936828601615530565b60e08301525092915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761094b5761094b615695565b8082018082111561094b5761094b615695565b8181038181111561094b5761094b615695565b60008261570557634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b6000808335601e1984360301811261573657600080fd5b8301803591506001600160401b0382111561575057600080fd5b6020019150600581901b3603821315611f8157600080fd5b600060e0823603121561577a57600080fd5b615782614dc0565b823581526020830135602082015261579c60408401614ab9565b604082015260608301356001600160401b03808211156157bb57600080fd5b6157c736838701614e35565b606084015260808501359150808211156157e057600080fd5b6157ec36838701615530565b608084015260a085013591508082111561580557600080fd5b6158113683870161558f565b60a084015260c085013591508082111561582a57600080fd5b5061583736828601615530565b60c08301525092915050565b602081016010831061585757615857614be0565b91905290565b6001600160e01b03198316815260408101600b831061587e5761587e614be0565b8260208301529392505050565b6001600160601b03818116838216019080821115610ce157610ce1615695565b60008151808452602080850194506020840160005b83811015614a9b5781511515875295820195908201906001016158c0565b6060815260006158f16060830186614a61565b828103602084015261590381866152a1565b905082810360408401526121b781856158ab565b60808152600061592a60808301876158ab565b828103602084015261593c81876152a1565b905082810360408401526159508186614a61565b90508281036060840152613f608185614a61565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008151808452602080850194506020840160005b83811015614a9b5781518752958201959082019060010161599b565b60005b838110156159d25781810151838201526020016159ba565b50506000910152565b600081518084526159f38160208601602086016159b7565b601f01601f19169290920160200192915050565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a5457601f19868403018952615a428383516159db565b98840198925090830190600101615a26565b5090979650505050505050565b60006101008251845260208301516020850152604083015160408501526060830151615a906060860182614a54565b506080830151816080860152615aa882860182614a61565b91505060a083015184820360a0860152615ac28282615986565b91505060c083015184820360c0860152615adc8282615a07565b91505060e083015184820360e0860152615af68282615986565b95945050505050565b604081526000615b126040830185615a61565b905060018060a01b03831660208301529392505050565b60008151808452602080850194506020840160005b83811015614a9b57815160068110615b5857615b58614be0565b87529582019590820190600101615b3e565b608081526000615b7d6080830187615a61565b8560208401528281036040840152845181526020850151602082015260018060a01b036040860151166040820152606085015160e06060830152615bc460e0830182615b29565b905060808601518282036080840152615bdd8282615986565b91505060a086015182820360a0840152615bf78282615a07565b91505060c086015182820360c0840152615c118282615986565b9350505050615af66060830184614a54565b600060018201615c3557615c35615695565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615c656040830185614a61565b8281036020840152615af681856158ab565b604081526000615c8a60408301856158ab565b8281036020840152615af68185614a61565b6001600160a01b03841681526001600160e01b031983166020820152606060408201819052600090615af6908301846159db565b60008251615ce28184602087016159b7565b9190910192915050565b60208152600061094860208301846159db565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615d3457600080fd5b8151801515811461162657600080fd5b604081526000615d5760408301856158ab565b8281036020840152615af68185615a07565b600060208284031215615d7b57600080fd5b610948826151e5565b803560ff8116811461109757600080fd5b600060208284031215615da757600080fd5b61094882615d84565b600060608284031215615dc257600080fd5b604051606081016001600160401b0381118282101715615de457615de4614d81565b604052615df083615d84565b815260208301356020820152604083013560408201528091505092915050565b6040810161587e8285614bf6565b6001600160e01b0319831681528151600090615e418160048501602087016159b7565b919091016004019392505050565b608081526000615e6260808301876159db565b8281036020840152615e748187614a61565b90508281036040840152615e8881866158ab565b90508281036060840152613f608185615a07565b82815260406020820152600061071e60408301846159db56fee5af2d3fb7bcab8f865476bc675bf1bbb8b5a749c827ee1cd215dc9c2b8f92d73617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa2646970667358221220fada5ab5800bf4e9bcf7778daed87fd94e994cf8b0e146958844535dcc724d8664736f6c63430008170033\"", + "deployedBytecode": "\"0x608060405234801561001057600080fd5b50600436106102745760003560e01c806397d6ae1611610151578063bc9e0a55116100c3578063dafae40811610087578063dafae408146105dc578063dd1f8914146105ef578063de981f1b14610602578063e75235b814610615578063e9c0349814610632578063f80b53521461064557600080fd5b8063bc9e0a551461057c578063c441c4a81461058a578063cc7e6b3b146105a1578063d0a50db0146105c1578063d78392f8146105c957600080fd5b8063aee1767f11610115578063aee1767f146104c0578063b384abef146104d3578063b405aaf21461052e578063b5d6e11014610541578063b9c3620914610556578063bc4e068f1461056957600080fd5b806397d6ae161461046c5780639b19dbfd1461047f5780639ca55b7114610487578063a54f8a091461049a578063a64a8380146104ad57600080fd5b80633644e515116101ea578063828fc1a1116101ae578063828fc1a1146103e2578063865e6fd3146103f557806386ccbf1214610408578063901979d51461041b57806390264e59146104465780639570abab1461045957600080fd5b80633644e515146103825780636a61b16c1461038b5780637de5dedd1461039c5780637f7fe058146103a4578063800eaab3146103cf57600080fd5b80631c905e391161023c5780631c905e39146102e45780631f425338146103065780632c5e6520146103195780632d6d7d731461033c57806334d5f37b1461034f57806335da81211461036f57600080fd5b806301a5f43f1461027957806306aba0e11461028e5780630a44fa43146102a95780630f7c3189146102bc57806315702f05146102d1575b600080fd5b61028c6102873660046149f1565b61064d565b005b6102966106fc565b6040519081526020015b60405180910390f35b6102966102b7366004614a8a565b61070b565b6102c4610790565b6040516102a09190614b10565b61028c6102df366004614b3a565b6107a9565b6102f76102f2366004614c28565b6108b3565b6040516102a093929190614c74565b61028c610314366004614a8a565b6108cf565b61032c610327366004614d27565b61096a565b60405190151581526020016102a0565b6102c461034a366004614a8a565b610981565b61029661035d366004614d5c565b60026020526000908152604090205481565b61028c61037d366004614a8a565b6109c8565b61029660015481565b61028c610399366004614d88565b50565b610296610a10565b6103b76103b2366004614dbc565b610a66565b6040516001600160a01b0390911681526020016102a0565b61028c6103dd366004614edf565b610ae7565b61032c6103f0366004614fa5565b610b1f565b61028c610403366004614fe0565b610b2d565b61028c61041636600461504e565b610b48565b61042e610429366004614dbc565b610b55565b6040516001600160601b0390911681526020016102a0565b61028c6104543660046150f4565b610b8b565b61028c61046736600461512f565b610b94565b61028c61047a36600461504e565b610ba9565b6102c4610bc0565b61028c610495366004614dbc565b610c2b565b61028c6104a836600461521e565b61135d565b61028c6104bb366004614d5c565b611379565b6103b76104ce366004614dbc565b61138a565b61051d6104e1366004614c28565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460069093015460ff909216939092909185565b6040516102a0959493929190615262565b61032c61053c366004614dbc565b61139c565b61028c61054f3660046150f4565b5050505050565b61028c610564366004614c28565b6113d4565b6102f7610577366004614d5c565b6113e6565b61028c610399366004615297565b610592611403565b6040516102a093929190615305565b6105b46105af366004614a8a565b6114dd565b6040516102a09190615348565b61029661151b565b61042e6105d7366004614dbc565b61152e565b61032c6105ea366004614d5c565b611539565b61028c6105fd36600461535b565b61158b565b6103b761061036600461544d565b611698565b61061d611713565b604080519283526020830191909152016102a0565b61028c610640366004614a8a565b61175b565b6102c46117a4565b610655611807565b6106f386868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a028281018201909352898252909350899250889182918501908490808284376000920191909152505060408051602080890282810182019093528882529093508892508791829185019084908082843760009201919091525061186392505050565b50505050505050565b6000610706611bc5565b905090565b600082828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061074c9250839150611bd89050565b610788848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611c0d92505050565b949350505050565b6060610706600080516020615d80833981519152611c92565b6107b233611c9f565b6108a56040518061010001604052806107ca8e611ce1565b81526020018d81526020018c81526020018b6001600160a01b031681526020018a8a808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208a810282810182019093528a82529283019290918b918b9182918501908490808284376000920191909152505050908252506020016108658688615533565b8152602001848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505091525033611d91565b505050505050505050505050565b60608060606108c28585611e91565b9250925092509250925092565b6108d7611807565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506109169250839150611bd89050565b600080516020615d8083398151915260005b8381101561054f5761096185858381811061094557610945615540565b905060200201602081019061095a9190614dbc565b839061227a565b50600101610928565b600061097784848461228f565b90505b9392505050565b60606109bf838380806020026020016040519081016040528093929190818152602001838360200280828437600092018290525092506122c5915050565b90505b92915050565b6109d0611807565b610a0c82828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061241892505050565b5050565b600080610a1b6124d5565b9050600080610a28611713565b9150915080600182856004015485610a40919061556c565b610a4a9190615583565b610a549190615596565b610a5e91906155a9565b935050505090565b6000806000610a7c610a766124d5565b856124f9565b9150915081610aae5760405163141e2e1f60e11b81526001600160a01b03851660048201526024015b60405180910390fd5b610ab66124d5565b6001018181548110610aca57610aca615540565b6000918252602090912001546001600160a01b0316949350505050565b333014610b15576000356001600160e01b0319166040516307337e1960e41b8152600401610aa591906155cb565b610a0c828261255e565b60006109bf6000848461228f565b610b35611807565b610b3e81612607565b610a0c828261263d565b61054f85858585856126e1565b600080610b606124d5565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b031690565b61054f33611c9f565b610b9d33611c9f565b50505050505050505050565b610bb233611c9f565b61054f858585858533612783565b6060610bca6124d5565b600101805480602002602001604051908101604052809291908181526020018280548015610c2157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c03575b5050505050905090565b610c33611807565b466107e414610c7c5760405162461bcd60e51b815260206004820152601560248201527413db9b1e481bdb881c9bdb9a5b8b5b585a5b9b995d605a1b6044820152606401610aa5565b6040516001600160a01b0382166024820152730cf8ff40a508bdbc39fbe1bb679dcba64e65c7df90600090829060440160408051601f198184030181529181526020820180516001600160e01b0316631b2ce7f360e11b17905251610ce19190615604565b6000604051808303816000865af19150503d8060008114610d1e576040519150601f19603f3d011682016040523d82523d6000602084013e610d23565b606091505b5050905080610d595760405162461bcd60e51b8152602060048201526002602482015261043360f41b6044820152606401610aa5565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905073c13948b5325c11279f5b6cba67957581d374e0f082600081518110610dc657610dc6615540565b60200260200101906001600160a01b031690816001600160a01b031681525050600181600081518110610dfb57610dfb615540565b602002602001018181525050836001600160a01b03168282604051602401610e24929190615651565b60408051601f198184030181529181526020820180516001600160e01b0316631239a88b60e21b17905251610e5c91906024016156ab565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b17905251610e919190615604565b6000604051808303816000865af19150503d8060008114610ece576040519150601f19603f3d011682016040523d82523d6000602084013e610ed3565b606091505b50508093505082610f0b5760405162461bcd60e51b8152602060048201526002602482015261433360f01b6044820152606401610aa5565b604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337505060408051600180825281830190925292935060009291506020808301908036833750506040805160018082528183019092529293506000929150602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050737e73630f81647bcfd7b1f2c04c1c662d17d4577e85600081518110610fe157610fe1615540565b60200260200101906001600160a01b031690816001600160a01b031681525050732260fac5e5542a773aa44fbcfedf7c193bc2c5998460008151811061102957611029615540565b60200260200101906001600160a01b031690816001600160a01b03168152505060018360008151811061105e5761105e615540565b60200260200101818152505060008260008151811061107f5761107f615540565b6020026020010190600281111561109857611098614c4a565b908160028111156110ab576110ab614c4a565b8152505061413c816000815181106110c5576110c5615540565b602002602001018181525050886001600160a01b0316858585856040516024016110f294939291906156be565b60408051601f198184030181529181526020820180516001600160e01b03166336f4bbdb60e21b1790525161112a91906024016156ab565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b1790525161115f9190615604565b6000604051808303816000865af19150503d806000811461119c576040519150601f19603f3d011682016040523d82523d6000602084013e6111a1565b606091505b505080985050876111d95760405162461bcd60e51b8152602060048201526002602482015261433160f01b6044820152606401610aa5565b886001600160a01b031684826040516024016111f6929190615651565b60408051601f198184030181529181526020820180516001600160e01b0316630c86c7ef60e31b1790525161122e91906024016156ab565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516112639190615604565b6000604051808303816000865af19150503d80600081146112a0576040519150601f19603f3d011682016040523d82523d6000602084013e6112a5565b606091505b505080985050876112dd5760405162461bcd60e51b8152602060048201526002602482015261219960f11b6044820152606401610aa5565b6040805160018082528183019092526000916020808301908036833701905050905073273cda3afe17eb7bcb028b058382a9010ae82b248160008151811061132757611327615540565b60200260200101906001600160a01b031690816001600160a01b03168152505061135081612418565b5050505050505050505050565b61136633611c9f565b610a0c33611373846157ce565b836127a2565b611381611807565b610399816128c1565b60006113958261292e565b5092915050565b6000806113a76124d5565b6001600160a01b0390931660009081526003909301602052505060409020546001600160601b0316151590565b6113dc611807565b610a0c82826129ae565b60608060606113f6600085611e91565b9250925092509193909250565b606080606060006114126124d5565b80546040805160208084028201810190925282815292935083919083018282801561146657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611448575b50505050509350806001018054806020026020016040519081016040528092919081815260200182805480156114c557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116114a7575b505050505092506114d584612ab0565b915050909192565b60606109bf838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612ab092505050565b60006115256124d5565b60010154919050565b60006109c282612b95565b60007ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00611564611bc5565b8160010154611573919061556c565b6002820154611582908561556c565b10159392505050565b61159433611c9f565b60006040518061010001604052806115ab46611ce1565b81526020014681526020018d81526020018c6001600160a01b031681526020018b8b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c9182918501908490808284376000920191909152505050908252506020016116468789615533565b81526020018585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250905061168c8133611d91565b506108a53382846127a2565b60007fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600083600f8111156116cf576116cf614c4a565b60ff1681526020810191909152604001600020546001600160a01b031690508061170e578160405163409140df60e11b8152600401610aa591906158b4565b919050565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f01547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f02549091565b611763611807565b61179f828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612bca92505050565b505050565b60606117ae6124d5565b805460408051602080840282018101909252828152929190830182828015610c21576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c03575050505050905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b03163314611861576000356001600160e01b0319166001604051620f948f60ea1b8152600401610aa59291906158ce565b565b606061186f8383612fb0565b61187881611bd8565b60006118826124d5565b8451875191925090811480156118985750855181145b6118c3576000356001600160e01b0319166040516306b5667560e21b8152600401610aa591906155cb565b806001600160401b038111156118db576118db614dd7565b604051908082528060200260200182016040528015611904578160200160208202803683370190505b50935080600003611916575050611bbd565b60008060008060005b85811015611b29578a818151811061193957611939615540565b6020026020010151945089818151811061195557611955615540565b602002602001015193508b818151811061197157611971615540565b60200260200101519250611984856130ba565b61198d846130ba565b826001600160601b03166000036119c5576000356001600160e01b031916604051637f11b8a360e11b8152600401610aa591906155cb565b6001600160a01b03808616600081815260038a01602090815260408083205494891683528083205460028d0190925280832054938352909120546001600160601b039384169391821692611a1d9290811691166158fc565b611a2791906158fc565b611a3191906158fc565b6001600160601b0316600014898281518110611a4f57611a4f615540565b602002602001019015159081151581525050888181518110611a7357611a73615540565b602002602001015115611b21578654600181810189556000898152602080822090930180546001600160a01b03808b166001600160a01b0319928316811790935591835260028c018552604080842080546001600160601b038b166001600160601b03199182168117909255868f018054978801815586528786209096018054948c1694909316841790925591835260038c019094529020805490911682179055611b1e9083615583565b91505b60010161191f565b5080866004016000828254611b3e9190615583565b9091555050604051611b79906347c28ec560e11b90611b65908c908f908d9060200161594f565b6040516020818303038152906040526130ef565b7f897810999654e525e272b5909785c4d0ceaee1bbf9c87d9091a37558b0423b78888c8c8c604051611bae9493929190615988565b60405180910390a15050505050505b509392505050565b6000611bcf6124d5565b60040154905090565b611be18161311c565b15610399576000356001600160e01b031916604051630d697db160e11b8152600401610aa591906155cb565b600081611c1981611bd8565b6000611c236124d5565b905060005b8451811015611c8a57816002016000868381518110611c4957611c49615540565b6020908102919091018101516001600160a01b0316825281019190915260400160002054611c80906001600160601b031685615583565b9350600101611c28565b505050919050565b6060600061097a836131bb565b611ca881612b95565b6001600160601b0316600003610399576000356001600160e01b0319166003604051620f948f60ea1b8152600401610aa59291906158ce565b60008181526002602052604081205490819003611d105750600090815260026020526040902060019081905590565b6000828152600360209081526040808320848452909152812090611d3382613217565b905080611d8a576000825460ff166004811115611d5257611d52614c4a565b03611d705760405163757a436360e01b815260040160405180910390fd5b600084815260026020526040902080546001019081905592505b5050919050565b6020820151600090808203611dcc576000356001600160e01b03191660004660405163092048d160e11b8152600401610aa5939291906159d5565b600454611dda90859061342c565b6000611de5856134cd565b9050611df082611ce1565b6000838152600360209081526040808320848452909152908190209087015160018201849055600690910155925084518314611e4d576000356001600160e01b03191660405163d4cec26960e01b8152600401610aa591906155cb565b8083837fd1221ffb98610024a29755d7db3c71692310f43a7cfcce7ee488a8c7e9e0bfa48888604051611e81929190615a51565b60405180910390a4505092915050565b60008281526003602090815260408083208484529091528120600481015460058201546060938493849390929091611ec98284615583565b9050806001600160401b03811115611ee357611ee3614dd7565b604051908082528060200260200182016040528015611f0c578160200160208202803683370190505b509550806001600160401b03811115611f2757611f27614dd7565b604051908082528060200260200182016040528015611f7257816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611f455790505b509450806001600160401b03811115611f8d57611f8d614dd7565b604051908082528060200260200182016040528015611fb6578160200160208202803683370190505b50965060005b8381101561210b576000878281518110611fd857611fd8615540565b60200260200101906001811115611ff157611ff1614c4a565b9081600181111561200457612004614c4a565b90525060008a81526003602090815260408083208c84529091528120600487018054600790920192918490811061203d5761203d615540565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152865187908390811061209b5761209b615540565b60200260200101819052508460040181815481106120bb576120bb615540565b9060005260206000200160009054906101000a90046001600160a01b03168882815181106120eb576120eb615540565b6001600160a01b0390921660209283029190910190910152600101611fbc565b5060005b8281101561226e576001876121248684615583565b8151811061213457612134615540565b6020026020010190600181111561214d5761214d614c4a565b9081600181111561216057612160614c4a565b90525060008a81526003602090815260408083208c84529091528120600587018054600790920192918490811061219957612199615540565b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff1681526001820154938101939093526002015490820152866121ee8684615583565b815181106121fe576121fe615540565b602002602001018190525084600501818154811061221e5761221e615540565b6000918252602090912001546001600160a01b03168861223e8684615583565b8151811061224e5761224e615540565b6001600160a01b039092166020928302919091019091015260010161210f565b50505050509250925092565b60006109bf836001600160a01b038416613617565b600083815260036020908152604080832085845282528083206001600160a01b038516845260080190915281205460ff16610977565b606082516001600160401b038111156122e0576122e0614dd7565b604051908082528060200260200182016040528015612309578160200160208202803683370190505b50905060005b8351811015611395576005600085838151811061232e5761232e615540565b6020026020010151600581111561234757612347614c4a565b600581111561235857612358614c4a565b815260200190815260200160002060009054906101000a90046001600160a01b031682828151811061238c5761238c615540565b60200260200101906001600160a01b031690816001600160a01b0316815250508280156123e4575060006001600160a01b03168282815181106123d1576123d1615540565b60200260200101516001600160a01b0316145b15612410576000356001600160e01b03191660405163053265f160e01b8152600401610aa591906155cb565b60010161230f565b8061242281611bd8565b600080516020615d80833981519152600080805b85518110156124cd5785818151811061245157612451615540565b6020026020010151925061246483612607565b612475836312c0151560e21b61370a565b61247f848461389d565b604080516001600160a01b038616815282151560208201529193507fb85c58eeff9fe423669ae0841666f4c8499e8731b8275eb462e4fa1720ec420e910160405180910390a1600101612436565b505050505050565b7fc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc3830090565b60008060005b845481101561254c5784818154811061251a5761251a615540565b6000918252602090912001546001600160a01b039081169085160361254457600192509050612557565b6001016124ff565b506000600019915091505b9250929050565b60005b825181101561179f57306001600160a01b031682828151811061258657612586615540565b60200260200101516001600160a01b0316036125c3576000356001600160e01b03191660405163053265f160e01b8152600401610aa591906155cb565b6125ff8382815181106125d8576125d8615540565b60200260200101518383815181106125f2576125f2615540565b60200260200101516138b2565b600101612561565b806001600160a01b03163b60000361039957604051630bfc64a360e21b81526001600160a01b0382166004820152602401610aa5565b807fdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb600084600f81111561267357612673614c4a565b60ff168152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600f8111156126b4576126b4614c4a565b6040517f865d1c228a8ea13709cfe61f346f7ff67f1bbd4a18ff31ad3e7147350d317c5990600090a35050565b60006126f46126ef876157ce565b6134cd565b60208088013560009081526003825260408082208a3583529092522060010154909150811461276257602080870135600090815260038252604080822089358352909252819020600101549051632bee7fdb60e21b8152610aa5918391600401918252602082015260400190565b6124cd61276e876157ce565b8686868661277e6126ef8d6157ce565b613945565b61279561278f876157ce565b82611d91565b506124cd61276e876157ce565b468260200151146127db57602082015160405163092048d160e11b8152610aa5916001600160e01b0319600035169146906004016159d5565b60006127e6836134cd565b6020808501516000908152600382526040808220875183529092522060010154909150811461285457602080840151600090815260038252604080822086518352909252819020600101549051632bee7fdb60e21b8152610aa5918391600401918252602082015260400190565b600061285e613c76565b905060008161286b613c80565b6128759190615596565b612880906001615583565b60408051606081018252600080825260208201819052918101919091529091506128b7868685858b866128b28e613c8a565b613ca4565b5050505050505050565b60038110156128e3576040516305f4dee960e31b815260040160405180910390fd5b60006128ed6124d5565b600581018390556040518381529091507f22d5bb5059ffe2949a098666fc198587200c8118483074120d3ca7050c7753f19060200160405180910390a15050565b60008060008061294861293f6124d5565b600101866124f9565b9150915081612975576040516326527e1760e01b81526001600160a01b0386166004820152602401610aa5565b61297d6124d5565b80548290811061298f5761298f615540565b6000918252602090912001546001600160a01b03169590945092505050565b808211806129bd575060018111155b156129e9576000356001600160e01b0319166040516387f6f09560e01b8152600401610aa591906155cb565b7ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f0180547ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f028054928590558390557ff3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00805490929084908690856000612a6c83615b1c565b9091555060408051868152602081018690527f976f8a9c5bdf8248dec172376d6e2b80a8e3df2f0328e381c6db8e1cf138c0f8910160405180910390a45050505050565b60606000612abc6124d5565b905082516001600160401b03811115612ad757612ad7614dd7565b604051908082528060200260200182016040528015612b00578160200160208202803683370190505b50915060005b8351811015611d8a57816002016000858381518110612b2757612b27615540565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160601b0316838281518110612b7557612b75615540565b6001600160601b0390921660209283029190910190910152600101612b06565b6000612b9f6124d5565b6001600160a01b0390921660009081526002929092016020525060409020546001600160601b031690565b606081612bd681611bd8565b6000612be06124d5565b8451909150806001600160401b03811115612bfd57612bfd614dd7565b604051908082528060200260200182016040528015612c26578160200160208202803683370190505b50935080600003612c38575050612faa565b60058201548254612c4a908390615596565b1015612c695760405163b2e765cb60e01b815260040160405180910390fd5b60008060008060005b85811015612f3057898181518110612c8c57612c8c615540565b60200260200101519350612c9f8461292e565b9095509150612cad856130ba565b612cb6846130ba565b6001600160a01b03851660009081526002880160205260409020546001600160601b031615801590612d0a57506001600160a01b03841660009081526003880160205260409020546001600160601b031615155b898281518110612d1c57612d1c615540565b602002602001019015159081151581525050888181518110612d4057612d40615540565b602002602001015115612f28576001600160a01b038516600090815260028801602052604081205488546001600160601b039091169190612d8390600190615596565b9050886000018181548110612d9a57612d9a615540565b60009182526020909120015489546001600160a01b03909116908a9086908110612dc657612dc6615540565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790558854899080612e0057612e00615b35565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038916825260028b0190526040902080546001600160601b031916905560018901805482908110612e6057612e60615540565b60009182526020909120015460018a0180546001600160a01b039092169186908110612e8e57612e8e615540565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600101805480612ecf57612ecf615b35565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260038b0190526040902080546001600160601b0319169055612f238286615583565b945050505b600101612c72565b5081866004016000828254612f459190615596565b9091555050604051612f6a90636242a4ef60e11b90611b65908c908c90602001615b4b565b7fdf3dcd7987202f64648f3acdbf12401e3a2bb23e77e19f99826b5475cbb86369888a604051612f9b929190615b70565b60405180910390a15050505050505b50919050565b81518151606091908082016001600160401b03811115612fd257612fd2614dd7565b604051908082528060200260200182016040528015612ffb578160200160208202803683370190505b50925060005b828110156130555785818151811061301b5761301b615540565b602002602001015184828151811061303557613035615540565b6001600160a01b0390921660209283029190910190910152600101613001565b60005b828110156130b05785818151811061307257613072615540565b602002602001015185838151811061308c5761308c615540565b6001600160a01b039092166020928302919091019091015260019182019101613058565b5050505092915050565b6001600160a01b038116610399576000356001600160e01b03191660405163104c66df60e31b8152600401610aa591906155cb565b6130f98282614001565b610a0c573382826040516319b5fdcb60e31b8152600401610aa593929190615b95565b6000815160000361312f57506000919050565b60005b60018351038110156131b257600181015b83518110156131a95783818151811061315e5761315e615540565b60200260200101516001600160a01b031684838151811061318157613181615540565b60200260200101516001600160a01b0316036131a1575060019392505050565b600101613143565b50600101613132565b50600092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561320b57602002820191906000526020600020905b8154815260200190600101908083116131f7575b50505050509050919050565b600080825460ff16600481111561323057613230614c4a565b148015613241575042826006015411155b9050801561170e5760018201546040517f58f98006a7f2f253f8ae8f8b7cec9008ca05359633561cd7c22f3005682d4a5590600090a260005b600483015481101561332d578260080160008460040183815481106132a1576132a1615540565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560048401805460078601929190849081106132ea576132ea615540565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018181018390556002909101919091550161327a565b5060005b60058301548110156133e45782600801600084600501838154811061335857613358615540565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916905560058401805460078601929190849081106133a1576133a1615540565b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff19168155600181810183905560029091019190915501613331565b50815460ff19168255600060018301819055600283018190556003830181905561341290600484019061497b565b61342060058301600061497b565b60006006830155919050565b600082608001515111801561344a57508160a0015151826080015151145b801561345f57508160c0015151826080015151145b801561347457508160e0015151826080015151145b61349f576000356001600160e01b0319166040516306b5667560e21b8152600401610aa591906155cb565b6134a98142615583565b82604001511115610a0c5760405163ad89be9d60e01b815260040160405180910390fd5b60a0810151608082015160c083015151600092919083906001600160401b038111156134fb576134fb614dd7565b604051908082528060200260200182016040528015613524578160200160208202803683370190505b5060e086015190915060005b8251811015613583578660c00151818151811061354f5761354f615540565b60200260200101518051906020012083828151811061357057613570615540565b6020908102919091010152600101613530565b50604080517f1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee1281528751602080830191909152808901518284015291880151606080830191909152909701516080880152835181029381019390932060a0870152835183029383019390932060c0860152805182029082012060e08501528151810291012061010083015250610120902090565b6000818152600183016020526040812054801561370057600061363b600183615596565b855490915060009061364f90600190615596565b90508181146136b457600086600001828154811061366f5761366f615540565b906000526020600020015490508087600001848154811061369257613692615540565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806136c5576136c5615b35565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109c2565b60009150506109c2565b60008160405160240161371d91906155cb565b60408051601f198184030181529181526020820180516001600160e01b03166301ffc9a760e01b1790525190915060009081906001600160a01b03861690613766908590615604565b600060405180830381855afa9150503d80600081146137a1576040519150601f19603f3d011682016040523d82523d6000602084013e6137a6565b606091505b50915091508161386857846001600160a01b0316836040516024016137cb91906156ab565b60408051601f198184030181529181526020820180516001600160e01b03166325da93a560e11b179052516138009190615604565b600060405180830381855afa9150503d806000811461383b576040519150601f19603f3d011682016040523d82523d6000602084013e613840565b606091505b5090925090508161386857838560405163069d427960e11b8152600401610aa5929190615bc9565b8080602001905181019061387c9190615bec565b61054f57838560405163069d427960e11b8152600401610aa5929190615bc9565b60006109bf836001600160a01b038416614333565b80600560008460058111156138c9576138c9614c4a565b60058111156138da576138da614c4a565b8152602081019190915260400160002080546001600160a01b0319166001600160a01b03928316179055811682600581111561391857613918614c4a565b6040517f356c8c57e9e84b99b1cb58b13c985b2c979f78cbdf4d0fa70fe2a98bb09a099d90600090a35050565b831580159061395357508382145b61397e576000356001600160e01b0319166040516306b5667560e21b8152600401610aa591906155cb565b6000613a0b61398c60015490565b6139cb846000604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b90506000613a5a613a1b60015490565b6139cb856001604080517fd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2815260208101939093528201526060902090565b90506000613a66613c76565b9050600081613a73613c80565b613a7d9190615596565b613a88906001615583565b90506000805b878110156108a5573660008a8a84818110613aab57613aab615540565b606002919091019250600090508d8d85818110613aca57613aca615540565b9050602002016020810190613adf9190615c0e565b6001811115613af057613af0614c4a565b03613b1c57613b1588613b066020850185615c3a565b84602001358560400135614382565b9050613b93565b60018d8d85818110613b3057613b30615540565b9050602002016020810190613b459190615c0e565b6001811115613b5657613b56614c4a565b03613b6c57613b1587613b066020850185615c3a565b6000356001600160e01b031916604051630612418f60e11b8152600401610aa591906155cb565b806001600160a01b0316846001600160a01b031610613bd3576000356001600160e01b031916604051635d3dcd3160e01b8152600401610aa591906155cb565b8093506000613be182613c8a565b905080600003613c12576000356001600160e01b03191660405163726b3acb60e01b8152600401610aa591906155cb565b613c558f8f8f87818110613c2857613c28615540565b9050602002016020810190613c3d9190615c0e565b898986613c4f368a90038a018a615c55565b87613ca4565b15613c68575050505050505050506124cd565b836001019350505050613a8e565b6000610706610a10565b60006107066106fc565b6000613c9582612b95565b6001600160601b031692915050565b60208088015188516000828152600384526040808220838352909452928320613ccc81613217565b15613cdd5760019350505050613ff6565b6020808c01516000908152600290915260409020548214613d1f576000356001600160e01b03191660405163d4cec26960e01b8152600401610aa591906155cb565b6000815460ff166004811115613d3757613d37614c4a565b14613d55576040516322de95ff60e21b815260040160405180910390fd5b6001600160a01b038716600090815260088201602052604090205460ff1615613d9c5760405163025fd59560e41b81526001600160a01b0388166004820152602401610aa5565b6001600160a01b03871660009081526008820160209081526040909120805460ff19166001179055860151151580613dd75750604086015115155b80613de55750855160ff1615155b15613e2c576001600160a01b03871660009081526007820160209081526040918290208851815460ff191660ff909116178155908801516001820155908701516002909101555b866001600160a01b031681600101547f1203f9e81c814a35f5f4cc24087b2a24c6fb7986a9f1406b68a9484882c93a238c88604051613e6c929190615cb5565b60405180910390a3600080808c6001811115613e8a57613e8a614c4a565b03613edf576004830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600384018054899290613ed2908490615583565b9250508190559150613f44565b60018c6001811115613ef357613ef3614c4a565b03613b6c576005830180546001810182556000918252602082200180546001600160a01b0319166001600160a01b038c16179055600284018054899290613f3b908490615583565b92505081905590505b8a8210613faa57825460ff19166001908117845580840154604051919750907f5c819725ea53655a3b898f3df59b66489761935454e9212ca1e5ebd759953d0b90600090a260608d01516001600160a01b0316613fa557613fa5838e6143aa565b613ff0565b898110613ff057825460ff19166003178355600180840154604051919750907f55295d4ce992922fa2e5ffbf3a3dcdb367de0a15e125ace083456017fd22060f90600090a25b50505050505b979650505050505050565b6001600061401c600080516020615d80833981519152611c92565b805190915060008190036140315750506109c2565b6000816001600160401b0381111561404b5761404b614dd7565b604051908082528060200260200182016040528015614074578160200160208202803683370190505b5090506000826001600160401b0381111561409157614091614dd7565b6040519080825280602002602001820160405280156140c457816020015b60608152602001906001900390816140af5790505b509050600087876040516020016140dc929190615cc3565b604051602081830303815290604052905060008160405160240161410091906156ab565b60408051601f198184030181529190526020810180516001600160e01b03166325da93a560e11b179052905060005b858110156142e95786818151811061414957614149615540565b60200260200101516001600160a01b0316836040516141689190615604565b6000604051808303816000865af19150503d80600081146141a5576040519150601f19603f3d011682016040523d82523d6000602084013e6141aa565b606091505b508683815181106141bd576141bd615540565b602002602001018684815181106141d6576141d6615540565b60200260200101829052821515151581525050508481815181106141fc576141fc615540565b60200260200101516142e15786818151811061421a5761421a615540565b60200260200101516001600160a01b0316826040516142399190615604565b6000604051808303816000865af19150503d8060008114614276576040519150601f19603f3d011682016040523d82523d6000602084013e61427b565b606091505b5086838151811061428e5761428e615540565b602002602001018684815181106142a7576142a7615540565b60200260200101829052821515151581525050508780156142de57508481815181106142d5576142d5615540565b60200260200101515b97505b60010161412f565b507fc0b07a27e66788f39cc91405f012f34066b16f31b4bda9438c52f2dae0cc5b638287868660405161431f9493929190615cf4565b60405180910390a150505050505092915050565b600081815260018301602052604081205461437a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109c2565b5060006109c2565b600080600061439387878787614417565b915091506143a081614504565b5095945050505050565b6143b3816146ba565b15610a0c57815460ff191660021782556000806143cf836146d4565b9150915083600101547fe134987599ae266ec90edeff1b26125b287dbb57b10822649432d1bb26537fba8383604051614409929190615d41565b60405180910390a250505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561444e57506000905060036144fb565b8460ff16601b1415801561446657508460ff16601c14155b1561447757506000905060046144fb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156144cb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166144f4576000600192509250506144fb565b9150600090505b94509492505050565b600081600481111561451857614518614c4a565b036145205750565b600181600481111561453457614534614c4a565b036145815760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610aa5565b600281600481111561459557614595614c4a565b036145e25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610aa5565b60038160048111156145f6576145f6614c4a565b0361464e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610aa5565b600481600481111561466257614662614c4a565b036103995760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610aa5565b60008160200151600014806109c257505060200151461490565b6060806146e0836146ba565b61471257602083015160405163092048d160e11b8152610aa5916001600160e01b0319600035169146906004016159d5565b8260800151516001600160401b0381111561472f5761472f614dd7565b604051908082528060200260200182016040528015614758578160200160208202803683370190505b5091508260800151516001600160401b0381111561477857614778614dd7565b6040519080825280602002602001820160405280156147ab57816020015b60608152602001906001900390816147965790505b50905060005b836080015151811015614975578360e0015181815181106147d4576147d4615540565b60200260200101515a11614807576147eb846134cd565b6040516307aec4ab60e21b8152600401610aa591815260200190565b8360800151818151811061481d5761481d615540565b60200260200101516001600160a01b03168460a00151828151811061484457614844615540565b60200260200101518560e00151838151811061486257614862615540565b6020026020010151908660c00151848151811061488157614881615540565b60200260200101516040516148969190615604565b600060405180830381858888f193505050503d80600081146148d4576040519150601f19603f3d011682016040523d82523d6000602084013e6148d9565b606091505b508483815181106148ec576148ec615540565b6020026020010184848151811061490557614905615540565b602002602001018290528215151515815250505082818151811061492b5761492b615540565b602002602001015161496d578082828151811061494a5761494a615540565b60200260200101516040516376df417560e11b8152600401610aa5929190615d66565b6001016147b1565b50915091565b508054600082559060005260206000209081019061039991905b808211156149a95760008155600101614995565b5090565b60008083601f8401126149bf57600080fd5b5081356001600160401b038111156149d657600080fd5b6020830191508360208260051b850101111561255757600080fd5b60008060008060008060608789031215614a0a57600080fd5b86356001600160401b0380821115614a2157600080fd5b614a2d8a838b016149ad565b90985096506020890135915080821115614a4657600080fd5b614a528a838b016149ad565b90965094506040890135915080821115614a6b57600080fd5b50614a7889828a016149ad565b979a9699509497509295939492505050565b60008060208385031215614a9d57600080fd5b82356001600160401b03811115614ab357600080fd5b614abf858286016149ad565b90969095509350505050565b60008151808452602080850194506020840160005b83811015614b055781516001600160a01b031687529582019590820190600101614ae0565b509495945050505050565b6020815260006109bf6020830184614acb565b80356001600160a01b038116811461170e57600080fd5b600080600080600080600080600080600060e08c8e031215614b5b57600080fd5b8b359a5060208c01359950614b7260408d01614b23565b98506001600160401b038060608e01351115614b8d57600080fd5b614b9d8e60608f01358f016149ad565b909950975060808d0135811015614bb357600080fd5b614bc38e60808f01358f016149ad565b909750955060a08d0135811015614bd957600080fd5b614be98e60a08f01358f016149ad565b909550935060c08d0135811015614bff57600080fd5b50614c108d60c08e01358e016149ad565b81935080925050509295989b509295989b9093969950565b60008060408385031215614c3b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b60028110614c7057614c70614c4a565b9052565b60006060808352614c886060840187614acb565b83810360208581019190915286518083528782019282019060005b81811015614cc657614cb6838651614c60565b9383019391830191600101614ca3565b50506040925085810360408701528087518083528383019150838901925060005b81811015614d17578351805160ff1684528581015186850152860151868401529284019291860191600101614ce7565b50909a9950505050505050505050565b600080600060608486031215614d3c57600080fd5b8335925060208401359150614d5360408501614b23565b90509250925092565b600060208284031215614d6e57600080fd5b5035919050565b60006101008284031215612faa57600080fd5b600060208284031215614d9a57600080fd5b81356001600160401b03811115614db057600080fd5b61078884828501614d75565b600060208284031215614dce57600080fd5b6109bf82614b23565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715614e1057614e10614dd7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614e3e57614e3e614dd7565b604052919050565b60006001600160401b03821115614e5f57614e5f614dd7565b5060051b60200190565b600082601f830112614e7a57600080fd5b81356020614e8f614e8a83614e46565b614e16565b8083825260208201915060208460051b870101935086841115614eb157600080fd5b602086015b84811015614ed457614ec781614b23565b8352918301918301614eb6565b509695505050505050565b60008060408385031215614ef257600080fd5b82356001600160401b0380821115614f0957600080fd5b818501915085601f830112614f1d57600080fd5b81356020614f2d614e8a83614e46565b82815260059290921b84018101918181019089841115614f4c57600080fd5b948201945b83861015614f7857853560068110614f695760008081fd5b82529482019490820190614f51565b96505086013592505080821115614f8e57600080fd5b50614f9b85828601614e69565b9150509250929050565b60008060408385031215614fb857600080fd5b82359150614fc860208401614b23565b90509250929050565b80356010811061170e57600080fd5b60008060408385031215614ff357600080fd5b614ffc83614fd1565b9150614fc860208401614b23565b60008083601f84011261501c57600080fd5b5081356001600160401b0381111561503357600080fd5b60208301915083602060608302850101111561255757600080fd5b60008060008060006060868803121561506657600080fd5b85356001600160401b038082111561507d57600080fd5b61508989838a01614d75565b9650602088013591508082111561509f57600080fd5b6150ab89838a016149ad565b909650945060408801359150808211156150c457600080fd5b506150d18882890161500a565b969995985093965092949392505050565b600060e08284031215612faa57600080fd5b60008060008060006060868803121561510c57600080fd5b85356001600160401b038082111561512357600080fd5b61508989838a016150e2565b60008060008060008060008060008060c08b8d03121561514e57600080fd5b8a35995061515e60208c01614b23565b985060408b01356001600160401b038082111561517a57600080fd5b6151868e838f016149ad565b909a50985060608d013591508082111561519f57600080fd5b6151ab8e838f016149ad565b909850965060808d01359150808211156151c457600080fd5b6151d08e838f016149ad565b909650945060a08d01359150808211156151e957600080fd5b506151f68d828e016149ad565b915080935050809150509295989b9194979a5092959850565b80356002811061170e57600080fd5b6000806040838503121561523157600080fd5b82356001600160401b0381111561524757600080fd5b61525385828601614d75565b925050614fc86020840161520f565b60a081016005871061527657615276614c4a565b95815260208101949094526040840192909252606083015260809091015290565b6000602082840312156152a957600080fd5b81356001600160401b038111156152bf57600080fd5b610788848285016150e2565b60008151808452602080850194506020840160005b83811015614b055781516001600160601b0316875295820195908201906001016152e0565b6060815260006153186060830186614acb565b828103602084015261532a8186614acb565b9050828103604084015261533e81856152cb565b9695505050505050565b6020815260006109bf60208301846152cb565b600080600080600080600080600080600060e08c8e03121561537c57600080fd5b8b359a5061538c60208d01614b23565b99506001600160401b038060408e013511156153a757600080fd5b6153b78e60408f01358f016149ad565b909a50985060608d01358110156153cd57600080fd5b6153dd8e60608f01358f016149ad565b909850965060808d01358110156153f357600080fd5b6154038e60808f01358f016149ad565b909650945060a08d013581101561541957600080fd5b5061542a8d60a08e01358e016149ad565b909350915061543b60c08d0161520f565b90509295989b509295989b9093969950565b60006020828403121561545f57600080fd5b6109bf82614fd1565b6000615476614e8a84614e46565b8381529050602080820190600585901b84018681111561549557600080fd5b845b818110156155285780356001600160401b03808211156154b75760008081fd5b8188019150601f8a818401126154cd5760008081fd5b8235828111156154df576154df614dd7565b6154f0818301601f19168801614e16565b92508083528b8782860101111561550957600091508182fd5b8087850188850137600090830187015250855250928201928201615497565b505050509392505050565b60006109bf368484615468565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176109c2576109c2615556565b808201808211156109c2576109c2615556565b818103818111156109c2576109c2615556565b6000826155c657634e487b7160e01b600052601260045260246000fd5b500490565b6001600160e01b031991909116815260200190565b60005b838110156155fb5781810151838201526020016155e3565b50506000910152565b600082516156168184602087016155e0565b9190910192915050565b60008151808452602080850194506020840160005b83811015614b0557815187529582019590820190600101615635565b6040815260006156646040830185614acb565b82810360208401526156768185615620565b95945050505050565b600081518084526156978160208601602086016155e0565b601f01601f19169290920160200192915050565b6020815260006109bf602083018461567f565b6080815260006156d16080830187614acb565b602083820360208501526156e58288614acb565b915083820360408501526156f98287615620565b84810360608601528551808252602080880194509091019060005b818110156157405784516003811061572e5761572e614c4a565b83529383019391830191600101615714565b50909998505050505050505050565b600082601f83011261576057600080fd5b81356020615770614e8a83614e46565b8083825260208201915060208460051b87010193508684111561579257600080fd5b602086015b84811015614ed45780358352918301918301615797565b600082601f8301126157bf57600080fd5b6109bf83833560208501615468565b600061010082360312156157e157600080fd5b6157e9614ded565b82358152602083013560208201526040830135604082015261580d60608401614b23565b606082015260808301356001600160401b038082111561582c57600080fd5b61583836838701614e69565b608084015260a085013591508082111561585157600080fd5b61585d3683870161574f565b60a084015260c085013591508082111561587657600080fd5b615882368387016157ae565b60c084015260e085013591508082111561589b57600080fd5b506158a83682860161574f565b60e08301525092915050565b60208101601083106158c8576158c8614c4a565b91905290565b6001600160e01b03198316815260408101600b83106158ef576158ef614c4a565b8260208301529392505050565b6001600160601b0381811683821601908082111561139557611395615556565b60008151808452602080850194506020840160005b83811015614b05578151151587529582019590820190600101615931565b6060815260006159626060830186614acb565b828103602084015261597481866152cb565b9050828103604084015261533e818561591c565b60808152600061599b608083018761591c565b82810360208401526159ad81876152cb565b905082810360408401526159c18186614acb565b90508281036060840152613ff68185614acb565b6001600160e01b03199390931683526020830191909152604082015260600190565b60008282518085526020808601955060208260051b8401016020860160005b84811015615a4457601f19868403018952615a3283835161567f565b98840198925090830190600101615a16565b5090979650505050505050565b6040815282516040820152602083015160608201526040830151608082015260006060840151615a8c60a08401826001600160a01b03169052565b5060808401516101008060c0850152615aa9610140850183614acb565b915060a0860151603f19808685030160e0870152615ac78483615620565b935060c08801519150808685030183870152615ae384836159f7565b935060e0880151925080868503016101208701525050615b038282615620565b9250505061097a60208301846001600160a01b03169052565b600060018201615b2e57615b2e615556565b5060010190565b634e487b7160e01b600052603160045260246000fd5b604081526000615b5e6040830185614acb565b8281036020840152615676818561591c565b604081526000615b83604083018561591c565b82810360208401526156768185614acb565b6001600160a01b03841681526001600160e01b0319831660208201526060604082018190526000906156769083018461567f565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b600060208284031215615bfe57600080fd5b8151801515811461097a57600080fd5b600060208284031215615c2057600080fd5b6109bf8261520f565b803560ff8116811461170e57600080fd5b600060208284031215615c4c57600080fd5b6109bf82615c29565b600060608284031215615c6757600080fd5b604051606081018181106001600160401b0382111715615c8957615c89614dd7565b604052615c9583615c29565b815260208301356020820152604083013560408201528091505092915050565b604081016158ef8285614c60565b6001600160e01b0319831681528151600090615ce68160048501602087016155e0565b919091016004019392505050565b608081526000615d07608083018761567f565b8281036020840152615d198187614acb565b90508281036040840152615d2d818661591c565b90508281036060840152613ff681856159f7565b604081526000615d54604083018561591c565b828103602084015261567681856159f7565b828152604060208201526000610977604083018461567f56fe5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240a26469706673582212203aeb859a29338b321b84771c92456d2e11aa2e5f0edd2f9bd7402157ea320cc164736f6c63430008170033\"", + "deployer": "0x08295771719b138a241F45023B13CC868D72827D", "devdoc": { "version": 1, "kind": "dev", @@ -28,9 +34,6 @@ "checkThreshold(uint256)": { "details": "Checks whether the `_voteWeight` passes the threshold." }, - "deleteExpired(uint256,uint256)": { - "details": "Deletes the expired proposal by its chainId and nonce, without creating a new proposal. Requirements: - The proposal is already created." - }, "execute((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]))": { "details": "See {CoreGovernance-_executeWithCaller}." }, @@ -102,9 +105,6 @@ "getOperatorOf(address)": { "details": "Returns the corresponding `operator` of a `governor`." }, - "getProposalExpiryDuration()": { - "details": "Returns the expiry duration for a new proposal." - }, "getProposalSignatures(uint256,uint256)": { "details": "See {CommonGovernanceProposal-_getProposalSignatures}" }, @@ -303,11 +303,6 @@ } } ], - "ErrInvalidExecutor()": [ - { - "details": "Error of the caller is not the specified executor." - } - ], "ErrInvalidExpiryTimestamp()": [ { "details": "Error thrown when an invalid expiry timestamp is provided." @@ -383,16 +378,6 @@ } } ], - "ErrProposalNotApproved()": [ - { - "details": "Error of proposal is not approved for executing." - } - ], - "ErrQueryForEmptyVote()": [ - { - "details": "Error thrown when querying for an empty vote." - } - ], "ErrUnauthorized(bytes4,uint8)": [ { "details": "Error indicating that the caller is unauthorized to perform a specific function.", @@ -436,11 +421,13 @@ ] } }, - "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrAlreadyVoted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrBelowMinRequiredGovernors\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrCurrentProposalIsNotCompleted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrDuplicated\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrExistOneInternalCallFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"required\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotMatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ErrInsufficientGas\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidArguments\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ErrInvalidChainId\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidExecutor\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidExpiryTimestamp\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInput\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidOrder\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ErrInvalidProposal\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidProposalNonce\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidSignatures\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidVoteWeight\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"callIndex\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"revertMsg\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrLooseProposalInternallyRevert\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrOnlySelfCall\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrOperatorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrProposalNotApproved\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrQueryForEmptyVote\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrUnsupportedInterface\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrUnsupportedVoteType\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrVoteIsFinalized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrZeroAddress\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorAddingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorRemovingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"fromBridgeOperator\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"toBridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"CallbackRegistered\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"globalProposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GlobalProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"MinRequiredGovernorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"Notified\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalApproved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"successCalls\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"ProposalExecuted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalExpired\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"duration\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalExpiryDurationChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalRejected\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalVoted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption\\\",\\\"name\\\":\\\"targetOption\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"TargetOptionUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DOMAIN_SEPARATOR\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"addBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"castGlobalProposalBySignatures\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"castProposalBySignatures\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"castProposalVoteForCurrentNetwork\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"deleteExpired\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"execute\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"executeGlobal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getBridgeOperatorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getBridgeOperators\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getCallbackRegisters\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getFullBridgeOperatorInfos\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round_\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getGlobalProposalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"voters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"getGovernorWeights\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getGovernors\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getOperatorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getProposalExpiryDuration\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getProposalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_voters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"_supports\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getTotalWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round_\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"globalProposalVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"proposalVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"propose\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"proposeGlobal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"proposeGlobalProposalStructAndCastVotes\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"proposeProposalForCurrentNetwork\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"_proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"_supports\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"proposeProposalStructAndCastVotes\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"removeBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"resolveTargets\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"round\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setMinRequiredGovernor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"sumGovernorsWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"sum\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"unregisterCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"updateManyTargetOption\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"vote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"hash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"againstVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"forVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrAlreadyVoted(address)\\\":[{\\\"details\\\":\\\"Error indicating that a voter has already voted.\\\",\\\"params\\\":{\\\"voter\\\":\\\"The address of the voter who has already voted.\\\"}}],\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrCurrentProposalIsNotCompleted()\\\":[{\\\"details\\\":\\\"Error thrown when the current proposal is not completed.\\\"}],\\\"ErrDuplicated(bytes4)\\\":[{\\\"details\\\":\\\"Error thrown when a duplicated element is detected in an array.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature that invoke the error.\\\"}}],\\\"ErrInsufficientGas(bytes32)\\\":[{\\\"details\\\":\\\"Error thrown when there is insufficient gas to execute a function.\\\"}],\\\"ErrInvalidArguments(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that arguments are invalid.\\\"}],\\\"ErrInvalidChainId(bytes4,uint256,uint256)\\\":[{\\\"details\\\":\\\"Error indicating that the chain ID is invalid.\\\",\\\"params\\\":{\\\"actual\\\":\\\"Current chain ID that executing function.\\\",\\\"expected\\\":\\\"Expected chain ID required for the tx to success.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\"}}],\\\"ErrInvalidExecutor()\\\":[{\\\"details\\\":\\\"Error of the caller is not the specified executor.\\\"}],\\\"ErrInvalidExpiryTimestamp()\\\":[{\\\"details\\\":\\\"Error thrown when an invalid expiry timestamp is provided.\\\"}],\\\"ErrInvalidOrder(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that an order is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid order.\\\"}}],\\\"ErrInvalidProposal(bytes32,bytes32)\\\":[{\\\"details\\\":\\\"Error thrown when an invalid proposal is encountered.\\\",\\\"params\\\":{\\\"actual\\\":\\\"The actual value of the proposal.\\\",\\\"expected\\\":\\\"The expected value of the proposal.\\\"}}],\\\"ErrInvalidProposalNonce(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the proposal nonce is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\"}}],\\\"ErrInvalidSignatures(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a signature is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid signature.\\\"}}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidVoteWeight(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote weight is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid vote weight.\\\"}}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrLooseProposalInternallyRevert(uint256,bytes)\\\":[{\\\"details\\\":\\\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\"}],\\\"ErrOnlySelfCall(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a function can only be called by the contract itself.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that can only be called by the contract itself.\\\"}}],\\\"ErrProposalNotApproved()\\\":[{\\\"details\\\":\\\"Error of proposal is not approved for executing.\\\"}],\\\"ErrQueryForEmptyVote()\\\":[{\\\"details\\\":\\\"Error thrown when querying for an empty vote.\\\"}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnsupportedInterface(bytes4,address)\\\":[{\\\"details\\\":\\\"The error indicating an unsupported interface.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address where the unsupported interface was encountered.\\\",\\\"interfaceId\\\":\\\"The bytes4 interface identifier that is not supported.\\\"}}],\\\"ErrUnsupportedVoteType(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote type is not supported.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\"}}],\\\"ErrVoteIsFinalized()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to interact with a finalized vote.\\\"}],\\\"ErrZeroAddress(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that given address is null when it should not.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"BridgeOperatorAddingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to add.\\\"},\\\"BridgeOperatorRemovingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to remove.\\\"},\\\"BridgeOperatorUpdated(address,address,address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is updated.\\\"},\\\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Emitted when new bridge operators are added.\\\"},\\\"BridgeOperatorsRemoved(bool[],address[])\\\":{\\\"details\\\":\\\"Emitted when bridge operators are removed.\\\"},\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"MinRequiredGovernorUpdated(uint256)\\\":{\\\"details\\\":\\\"Emitted when the minimum number of required governors is updated.\\\"},\\\"Notified(bytes,address[],bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the contract notifies multiple registers with statuses and return data.\\\"},\\\"ProposalApproved(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the proposal is approved\\\"},\\\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"ProposalExecuted(bytes32,bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the proposal is executed\\\"},\\\"ProposalExpired(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is expired\\\"},\\\"ProposalExpiryDurationChanged(uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal expiry duration is changed.\\\"},\\\"ProposalRejected(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is reject\\\"},\\\"ProposalVoted(bytes32,address,uint8,uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal is voted\\\"},\\\"TargetOptionUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when the target options are updated\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addBridgeOperators(uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Adds multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to add.\\\",\\\"governors\\\":\\\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\"}},\\\"castGlobalProposalBySignatures((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_castGlobalProposalBySignatures`.\\\"},\\\"castProposalBySignatures((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_castProposalBySignatures`.\\\"},\\\"castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8)\\\":{\\\"details\\\":\\\"Casts vote for a proposal on the current network. Requirements: - The method caller is governor.\\\"},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"deleteExpired(uint256,uint256)\\\":{\\\"details\\\":\\\"Deletes the expired proposal by its chainId and nonce, without creating a new proposal. Requirements: - The proposal is already created.\\\"},\\\"execute((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]))\\\":{\\\"details\\\":\\\"See {CoreGovernance-_executeWithCaller}.\\\"},\\\"executeGlobal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]))\\\":{\\\"details\\\":\\\"See {GlobalCoreGovernance-_executeWithCaller}.\\\"},\\\"getBridgeOperatorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific bridge operator.\\\",\\\"params\\\":{\\\"bridgeOperator\\\":\\\"The address of the bridge operator to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"The vote weight of the specified bridge operator.\\\"}},\\\"getBridgeOperators()\\\":{\\\"details\\\":\\\"Returns an array of all bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all bridge operators.\\\"}},\\\"getCallbackRegisters()\\\":{\\\"details\\\":\\\"Retrieves the addresses of registered callbacks.\\\",\\\"returns\\\":{\\\"registers\\\":\\\"An array containing the addresses of registered callbacks.\\\"}},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getFullBridgeOperatorInfos()\\\":{\\\"details\\\":\\\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\",\\\"returns\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the registered bridge operators.\\\",\\\"governors\\\":\\\"An array of addresses representing the governors of each bridge operator.\\\",\\\"weights\\\":\\\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\\\"}},\\\"getGlobalProposalSignatures(uint256)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_getProposalSignatures}\\\"},\\\"getGovernorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `governor` of a `operator`.\\\"},\\\"getGovernorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific governor.\\\",\\\"params\\\":{\\\"governor\\\":\\\"The address of the governor to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"voteWeight The vote weight of the specified governor.\\\"}},\\\"getGovernorWeights(address[])\\\":{\\\"details\\\":\\\"Returns the weights of a list of governor addresses.\\\"},\\\"getGovernors()\\\":{\\\"details\\\":\\\"Returns an array of all governors.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all governors.\\\"}},\\\"getOperatorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `operator` of a `governor`.\\\"},\\\"getProposalExpiryDuration()\\\":{\\\"details\\\":\\\"Returns the expiry duration for a new proposal.\\\"},\\\"getProposalSignatures(uint256,uint256)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_getProposalSignatures}\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"getTotalWeight()\\\":{\\\"details\\\":\\\"Returns total weights.\\\"},\\\"globalProposalVoted(uint256,address)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_proposalVoted}\\\"},\\\"isBridgeOperator(address)\\\":{\\\"details\\\":\\\"Checks if the given address is a bridge operator.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address to check.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"A boolean indicating whether the address is a bridge operator.\\\"}},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"proposalVoted(uint256,uint256,address)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_proposalVoted}\\\"},\\\"propose(uint256,uint256,address,address[],uint256[],bytes[],uint256[])\\\":{\\\"details\\\":\\\"See `CoreGovernance-_proposeProposal`. Requirements: - The method caller is governor.\\\"},\\\"proposeGlobal(uint256,address,uint8[],uint256[],bytes[],uint256[])\\\":{\\\"details\\\":\\\"See `CoreGovernance-_proposeGlobal`. Requirements: - The method caller is governor.\\\"},\\\"proposeGlobalProposalStructAndCastVotes((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. Requirements: - The method caller is governor.\\\"},\\\"proposeProposalForCurrentNetwork(uint256,address,address[],uint256[],bytes[],uint256[],uint8)\\\":{\\\"details\\\":\\\"Proposes and casts vote for a proposal on the current network. Requirements: - The method caller is governor. - The proposal is for the current network.\\\"},\\\"proposeProposalStructAndCastVotes((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_proposeProposalStructAndCastVotes`. Requirements: - The method caller is governor. - The proposal is for the current network.\\\"},\\\"registerCallbacks(address[])\\\":{\\\"details\\\":\\\"Registers multiple callbacks with the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to register.\\\"}},\\\"removeBridgeOperators(address[])\\\":{\\\"details\\\":\\\"Removes multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to remove.\\\"}},\\\"resolveTargets(uint8[])\\\":{\\\"details\\\":\\\"Returns corresponding address of target options. Return address(0) on non-existent target.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setMinRequiredGovernor(uint256)\\\":{\\\"details\\\":\\\"Self-call to update the minimum required governor.\\\",\\\"params\\\":{\\\"min\\\":\\\"The minimum number, this must not less than 3.\\\"}},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\\\"},\\\"sumGovernorsWeight(address[])\\\":{\\\"details\\\":\\\"Returns total weights of the governor list.\\\"},\\\"totalBridgeOperator()\\\":{\\\"details\\\":\\\"Returns the total number of bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"The total number of bridge operators.\\\"}},\\\"unregisterCallbacks(address[])\\\":{\\\"details\\\":\\\"Unregisters multiple callbacks from the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to unregister.\\\"}},\\\"updateManyTargetOption(uint8[],address[])\\\":{\\\"details\\\":\\\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"errors\\\":{\\\"ErrBelowMinRequiredGovernors()\\\":[{\\\"notice\\\":\\\"Error indicating that the governors list will go below minimum number of required governor.\\\"}],\\\"ErrGovernorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying governor\\\"}],\\\"ErrGovernorNotMatch(address,address)\\\":[{\\\"notice\\\":\\\"Error indicating that the msg.sender is not match the required governor\\\"}],\\\"ErrInvalidInput()\\\":[{\\\"notice\\\":\\\"Common invalid input error\\\"}],\\\"ErrOperatorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying operator\\\"}]},\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"round(uint256)\\\":{\\\"notice\\\":\\\"chain id = 0 for global proposal\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/ronin/gateway/RoninBridgeManager.sol\\\":\\\"RoninBridgeManager\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":1},\\\"remappings\\\":[\\\":@fdk-0.3.1-beta/=dependencies/@fdk-0.3.1-beta/\\\",\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":sample-projects/=node_modules/hardhat/sample-projects/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\\\\\"./BridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IHasContracts, HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\n\\\\nimport { IBridgeManager } from \\\\\\\"../../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\nimport { AddressArrayUtils } from \\\\\\\"../../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"../../utils/RoleAccess.sol\\\\\\\";\\\\nimport { TUint256Slot } from \\\\\\\"../../types/Types.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"./BridgeManagerQuorum.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n struct BridgeManagerStorage {\\\\n /// @notice List of the governors.\\\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\\\n address[] _governors;\\\\n address[] _operators;\\\\n /// @dev Mapping from address to the governor weight\\\\n mapping(address governor => uint96 weight) _governorWeight;\\\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\\\n mapping(address operator => uint96 weight) _operatorWeight;\\\\n /// @dev Total weight of all governors / operators.\\\\n uint256 _totalWeight;\\\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\\\n uint256 _minRequiredGovernor;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerStorageLocation\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n bytes32 public DOMAIN_SEPARATOR;\\\\n\\\\n modifier onlyGovernor() virtual {\\\\n _requireGovernor(msg.sender);\\\\n _;\\\\n }\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n function __BridgeManager_init(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n __BridgeManagerQuorum_init_unchained(num, denom);\\\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n function __BridgeManager_init_unchained(\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n _setContract(ContractType.BRIDGE, bridgeContract);\\\\n\\\\n DOMAIN_SEPARATOR = keccak256(\\\\n abi.encode(\\\\n keccak256(\\\\\\\"EIP712Domain(string name,string version,bytes32 salt)\\\\\\\"),\\\\n keccak256(\\\\\\\"BridgeManager\\\\\\\"), // name hash\\\\n keccak256(\\\\\\\"3\\\\\\\"), // version hash\\\\n keccak256(abi.encode(\\\\\\\"BRIDGE_MANAGER\\\\\\\", roninChainId)) // salt\\\\n )\\\\n );\\\\n\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n _setMinRequiredGovernor(3);\\\\n }\\\\n\\\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerStorageLocation\\\\n }\\\\n }\\\\n\\\\n // ===================== CONFIG ========================\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\\\n _setMinRequiredGovernor(min);\\\\n }\\\\n\\\\n function _setMinRequiredGovernor(uint min) internal {\\\\n if (min < 3) revert ErrInvalidInput();\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n $._minRequiredGovernor = min;\\\\n emit MinRequiredGovernorUpdated(min);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the caller has governor role access.\\\\n */\\\\n function _requireGovernor(address addr) internal view {\\\\n if (_getGovernorWeight(addr) == 0) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\\\n }\\\\n }\\\\n\\\\n // ===================== WEIGHTS METHOD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getTotalWeight() public view returns (uint256) {\\\\n return _totalWeight();\\\\n }\\\\n\\\\n function _totalWeight() internal view override returns (uint256) {\\\\n return _getBridgeManagerStorage()._totalWeight;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weights of a given array of governors.\\\\n */\\\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n weights = new uint96[](governors.length);\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n weights[i] = $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\\\n weight = _getGovernorWeight(governor);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\\\n */\\\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\\\n return _getBridgeManagerStorage()._governorWeight[governor];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\\\n sum = _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\\\n * @param governors The non-duplicated input.\\\\n */\\\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n sum += $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n return $._operatorWeight[bridgeOperator];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n (uint256 numerator, uint256 denominator) = getThreshold();\\\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\\\n }\\\\n\\\\n // ===================== MANAGER CRUD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _removeBridgeOperators(bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to add bridge operators.\\\\n *\\\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to add bridge operators.\\\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\\\n *\\\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\\\n */\\\\n function _addBridgeOperators(\\\\n uint96[] memory voteWeights,\\\\n address[] memory newGovernors,\\\\n address[] memory newOperators\\\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = newOperators.length;\\\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\\\n addeds = new bool[](length);\\\\n\\\\n // simply skip add operations if inputs are empty.\\\\n if (length == 0) return addeds;\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint96 iVoteWeight;\\\\n uint256 accumulatedWeight;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iGovernor = newGovernors[i];\\\\n iOperator = newOperators[i];\\\\n iVoteWeight = voteWeights[i];\\\\n\\\\n // Check non-zero inputs\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n\\\\n // Check not yet added operators\\\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\\\n\\\\n // Only add the valid operator\\\\n if (addeds[i]) {\\\\n // Add governor to list, update governor weight\\\\n $._governors.push(iGovernor);\\\\n $._governorWeight[iGovernor] = iVoteWeight;\\\\n\\\\n // Add operator to list, update governor weight\\\\n $._operators.push(iOperator);\\\\n $._operatorWeight[iOperator] = iVoteWeight;\\\\n\\\\n accumulatedWeight += iVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight += accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\\\n\\\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to remove bridge operators.\\\\n *\\\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to remove bridge operators.\\\\n *\\\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\\\n */\\\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = removingOperators.length;\\\\n removeds = new bool[](length);\\\\n\\\\n // simply skip remove operations if inputs are empty.\\\\n if (length == 0) return removeds;\\\\n if ($._governors.length - length < $._minRequiredGovernor) {\\\\n revert ErrBelowMinRequiredGovernors();\\\\n }\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint256 accumulatedWeight;\\\\n uint idx;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iOperator = removingOperators[i];\\\\n\\\\n // Check non-zero inputs\\\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n\\\\n // Check existing operators\\\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\\\n\\\\n // Only remove the valid operator\\\\n if (removeds[i]) {\\\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\\\n\\\\n // Remove governor from list, update governor weight\\\\n uint lastIdx = $._governors.length - 1;\\\\n $._governors[idx] = $._governors[lastIdx];\\\\n $._governors.pop();\\\\n delete $._governorWeight[iGovernor];\\\\n\\\\n // Remove operator from list, update operator weight\\\\n $._operators[idx] = $._operators[lastIdx];\\\\n $._operators.pop();\\\\n delete $._operatorWeight[iOperator];\\\\n\\\\n accumulatedWeight += removingVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight -= accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\\\n\\\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\\\n }\\\\n\\\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\\\n for (uint i; i < $_array.length; i++) {\\\\n if (addr == $_array[i]) {\\\\n return (true, i);\\\\n }\\\\n }\\\\n\\\\n return (false, type(uint256).max);\\\\n }\\\\n\\\\n // ================= MANAGER VIEW METHODS =============\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256) {\\\\n return _getBridgeManagerStorage()._operators.length;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n return $._operatorWeight[addr] > 0;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._operators;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernors() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._governors;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator) {\\\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\\\n if (!found) revert ErrGovernorNotFound(governor);\\\\n\\\\n return _getBridgeManagerStorage()._operators[idx];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor) {\\\\n (governor,) = _getGovernorOf(operator);\\\\n }\\\\n\\\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\\\n if (!found) revert ErrOperatorNotFound(operator);\\\\n\\\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n governors = $._governors;\\\\n bridgeOperators = $._operators;\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { EnumerableSet } from \\\\\\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\\\\\";\\\\nimport { IBridgeManagerCallbackRegister } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title BridgeManagerCallbackRegister\\\\n * @dev A contract that manages callback registrations and execution for a bridge.\\\\n */\\\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n /**\\\\n * @dev Storage slot for the address set of callback registers.\\\\n * @dev Value is equal to keccak256(\\\\\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\\\\\") - 1.\\\\n */\\\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\\\n\\\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\\\n _registerCallbacks(callbackRegisters);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\\\n _registerCallbacks(registers);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n _callbackRegisters.remove(registers[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\\\n registers = _getCallbackRegisters().values();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to register multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n address register;\\\\n bool regSuccess;\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n register = registers[i];\\\\n\\\\n _requireHasCode(register);\\\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\\\n\\\\n regSuccess = _callbackRegisters.add(register);\\\\n\\\\n emit CallbackRegistered(register, regSuccess);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\\\n */\\\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\\\n * @param callbackFnSig The function signature of the callback method.\\\\n * @param inputs The data to pass to the callback method.\\\\n * @return allSuccess Return true if all internal calls are success\\\\n */\\\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\\\n allSuccess = true;\\\\n\\\\n address[] memory registers = _getCallbackRegisters().values();\\\\n uint256 length = registers.length;\\\\n if (length == 0) return allSuccess;\\\\n\\\\n bool[] memory successes = new bool[](length);\\\\n bytes[] memory returnDatas = new bytes[](length);\\\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n // First, attempt to call normally\\\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\\\n\\\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\\\n if (!successes[i]) {\\\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\\\n allSuccess = allSuccess && successes[i];\\\\n }\\\\n }\\\\n\\\\n emit Notified(callData, registers, successes, returnDatas);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the address set of callback registers.\\\\n * @return callbackRegisters The storage reference to the callback registers.\\\\n */\\\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IQuorum } from \\\\\\\"../../interfaces/IQuorum.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\\\n struct BridgeManagerQuorumStorage {\\\\n uint256 _nonce;\\\\n uint256 _numerator;\\\\n uint256 _denominator;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerQuorumStorage\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\\\n\\\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n $._nonce = 1;\\\\n\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerQuorumStorage\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n return ($._numerator, $._denominator);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\\\n\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n uint256 prevNum = $._numerator;\\\\n uint256 prevDenom = $._denominator;\\\\n\\\\n $._numerator = num;\\\\n $._denominator = denom;\\\\n\\\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n\\\\n function _totalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/CoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Ballot.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\n\\\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to interact with a finalized vote.\\\\n */\\\\n error ErrVoteIsFinalized();\\\\n\\\\n /**\\\\n * @dev Error thrown when the current proposal is not completed.\\\\n */\\\\n error ErrCurrentProposalIsNotCompleted();\\\\n\\\\n struct ProposalVote {\\\\n VoteStatus status;\\\\n bytes32 hash;\\\\n uint256 againstVoteWeight; // Total weight of against votes\\\\n uint256 forVoteWeight; // Total weight of for votes\\\\n address[] forVoteds; // Array of addresses voting for\\\\n address[] againstVoteds; // Array of addresses voting against\\\\n uint256 expiryTimestamp;\\\\n mapping(address => Signature) sig;\\\\n mapping(address => bool) voted;\\\\n }\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\\\n /// @dev Emitted when the proposal is voted\\\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\\\n /// @dev Emitted when the proposal is approved\\\\n event ProposalApproved(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is reject\\\\n event ProposalRejected(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is expired\\\\n event ProposalExpired(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the proposal is executed\\\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\\\n /// @dev Emitted when the proposal expiry duration is changed.\\\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\\\n\\\\n /// @dev Mapping from chain id => vote round\\\\n /// @notice chain id = 0 for global proposal\\\\n mapping(uint256 => uint256) public round;\\\\n /// @dev Mapping from chain id => vote round => proposal vote\\\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\\\n\\\\n uint256 internal _proposalExpiryDuration;\\\\n\\\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\\\n __CoreGovernance_init_unchained(expiryDuration);\\\\n }\\\\n\\\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\\\n _setProposalExpiryDuration(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\\\n * if it is expired and not increase the `_round`.\\\\n */\\\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\\\n _round = round[_chainId];\\\\n // Skip checking for the first ever round\\\\n if (_round == 0) {\\\\n _round = round[_chainId] = 1;\\\\n } else {\\\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\\\n if (!_isExpired) {\\\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\\\n unchecked {\\\\n _round = ++round[_chainId];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\\\n */\\\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\\\n _vote.hash = _proposalHash;\\\\n _vote.expiryTimestamp = _expiryTimestamp;\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The chain id is not equal to 0.\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `ProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\\\n uint256 chainId = proposal.chainId;\\\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n round_ = _createVotingRound(chainId);\\\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the round.\\\\n * - The vote is not finalized.\\\\n * - The voter has not voted for the round.\\\\n *\\\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\\\n * proposal is approved, executed or rejected.\\\\n *\\\\n */\\\\n function _castVote(\\\\n Proposal.ProposalDetail memory proposal,\\\\n Ballot.VoteType support,\\\\n uint256 minimumForVoteWeight,\\\\n uint256 minimumAgainstVoteWeight,\\\\n address voter,\\\\n Signature memory signature,\\\\n uint256 voterWeight\\\\n ) internal virtual returns (bool done) {\\\\n uint256 chainId = proposal.chainId;\\\\n uint256 round_ = proposal.nonce;\\\\n ProposalVote storage _vote = vote[chainId][round_];\\\\n\\\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\\\n return true;\\\\n }\\\\n\\\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\\\n\\\\n _vote.voted[voter] = true;\\\\n // Stores the signature if it is not empty\\\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\\\n _vote.sig[voter] = signature;\\\\n }\\\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\\\n\\\\n uint256 _forVoteWeight;\\\\n uint256 _againstVoteWeight;\\\\n if (support == Ballot.VoteType.For) {\\\\n _vote.forVoteds.push(voter);\\\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\\\n } else if (support == Ballot.VoteType.Against) {\\\\n _vote.againstVoteds.push(voter);\\\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_forVoteWeight >= minimumForVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n if (proposal.isAutoExecute()) {\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev The specified executor executes the proposal on an approved proposal.\\\\n */\\\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\\\n bytes32 proposalHash = proposal.hash();\\\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\\\n\\\\n if (_vote.hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\\\n }\\\\n\\\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\\\n\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n\\\\n /**\\\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\\\n *\\\\n * Emits the event `ProposalExpired` if the vote is expired.\\\\n *\\\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\\\n * before or it will emit an unexpected event of `ProposalExpired`.\\\\n */\\\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\\\n\\\\n if (isExpired) {\\\\n emit ProposalExpired(proposalVote.hash);\\\\n\\\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n delete proposalVote.status;\\\\n delete proposalVote.hash;\\\\n delete proposalVote.againstVoteWeight;\\\\n delete proposalVote.forVoteWeight;\\\\n delete proposalVote.forVoteds;\\\\n delete proposalVote.againstVoteds;\\\\n delete proposalVote.expiryTimestamp;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\\\n */\\\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\\\n if (proposal.executable()) {\\\\n vote_.status = VoteStatus.Executed;\\\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the expiry duration for a new proposal.\\\\n */\\\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\\\n _proposalExpiryDuration = expiryDuration;\\\\n emit ProposalExpiryDurationChanged(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter casted for the proposal.\\\\n */\\\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\\\n return vote_.voted[voter];\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns total weight from validators.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns minimum vote to pass a proposal.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\\\n */\\\\n function _getChainType() internal view virtual returns (ChainType);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"./CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event GlobalProposalCreated(\\\\n uint256 indexed round,\\\\n bytes32 indexed proposalHash,\\\\n Proposal.ProposalDetail proposal,\\\\n bytes32 globalProposalHash,\\\\n GlobalProposal.GlobalProposalDetail globalProposal,\\\\n address creator\\\\n );\\\\n\\\\n /// @dev Emitted when the target options are updated\\\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\\\n\\\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\\\n }\\\\n\\\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\\\n _updateManyTargetOption(targetOptions, addrs);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes for a global proposal.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n address executor,\\\\n uint256[] memory values,\\\\n bytes[] memory calldatas,\\\\n uint256[] memory gasAmounts,\\\\n address creator\\\\n ) internal virtual {\\\\n uint256 round_ = _createVotingRound(0);\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes global proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobalStruct(\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\\\n address creator\\\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n uint256 round_ = _createVotingRound(0);\\\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\\\n\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\\\n */\\\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal helper of {resolveTargets}.\\\\n *\\\\n * @param strict When the param is set to `true`, revert on non-existent target.\\\\n */\\\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\\\n targets = new address[](targetOptions.length);\\\\n\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n *\\\\n * Requirement:\\\\n * - Only allow self-call through proposal.\\\\n *\\\\n */\\\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\\\n // HACK: Cannot reuse the existing library due to too deep stack\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n _updateManyTargetOption(targetOptions, targets);\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n */\\\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\\\n _updateTargetOption(targetOptions[i], targets[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates `targetOption` to `target`.\\\\n *\\\\n * Requirement:\\\\n * - Emit a `TargetOptionUpdated` event.\\\\n */\\\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\\\n _targetOptionsMap[targetOption] = target;\\\\n emit TargetOptionUpdated(targetOption, target);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract CommonGovernanceProposal is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Casts votes by signatures.\\\\n *\\\\n * Note: This method does not verify the proposal hash with the vote hash. Please consider checking it before.\\\\n *\\\\n */\\\\n function _castVotesBySignatures(\\\\n Proposal.ProposalDetail memory _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n bytes32 proposalHash\\\\n ) internal {\\\\n if (!(_supports.length != 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\\\n\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n\\\\n address _lastSigner;\\\\n\\\\n for (uint256 _i; _i < _signatures.length;) {\\\\n Signature calldata _sig;\\\\n address _signer;\\\\n _sig = _signatures[_i];\\\\n\\\\n if (_supports[_i] == Ballot.VoteType.For) {\\\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\\\n } else if (_supports[_i] == Ballot.VoteType.Against) {\\\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\\\n _lastSigner = _signer;\\\\n\\\\n uint256 _weight = _getWeight(_signer);\\\\n\\\\n if (_weight == 0) revert ErrInvalidSignatures(msg.sig);\\\\n\\\\n if (_castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)) {\\\\n return;\\\\n }\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the voted signatures for the proposals.\\\\n *\\\\n * Note: The signatures can be empty in case the proposal is voted on the current network.\\\\n *\\\\n */\\\\n function _getProposalSignatures(\\\\n uint256 _chainId,\\\\n uint256 _round\\\\n ) internal view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\\\n ProposalVote storage _vote = vote[_chainId][_round];\\\\n\\\\n uint256 _forLength = _vote.forVoteds.length;\\\\n uint256 _againstLength = _vote.againstVoteds.length;\\\\n uint256 _voterLength = _forLength + _againstLength;\\\\n\\\\n _supports = new Ballot.VoteType[](_voterLength);\\\\n _signatures = new Signature[](_voterLength);\\\\n _voters = new address[](_voterLength);\\\\n for (uint256 _i; _i < _forLength;) {\\\\n _supports[_i] = Ballot.VoteType.For;\\\\n _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]];\\\\n _voters[_i] = _vote.forVoteds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < _againstLength;) {\\\\n _supports[_i + _forLength] = Ballot.VoteType.Against;\\\\n _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]];\\\\n _voters[_i + _forLength] = _vote.againstVoteds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\\\n */\\\\n function _proposalVoted(uint256 _chainId, uint256 _round, address _voter) internal view returns (bool) {\\\\n return _voted(vote[_chainId][_round], _voter);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the weight of a governor.\\\\n */\\\\n function _getWeight(address _governor) internal view virtual returns (uint256);\\\\n\\\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa7fbe65047096bcf4269cfe42e4529eb9a8bbbf93aff9207edd46b04e9661949\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../GlobalCoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceProposal.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Proposes and casts votes for a global proposal by signatures.\\\\n */\\\\n function _proposeGlobalProposalStructAndCastVotes(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures,\\\\n address creator\\\\n ) internal returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = _proposeGlobalStruct(globalProposal, creator);\\\\n _castVotesBySignatures(proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts votes for a global proposal by signatures.\\\\n */\\\\n function _castGlobalProposalBySignatures(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) internal {\\\\n Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n\\\\n bytes32 proposalHash = _proposal.hash();\\\\n if (vote[0][_proposal.nonce].hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, vote[0][_proposal.nonce].hash);\\\\n }\\\\n\\\\n _castVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\\\n */\\\\n function getGlobalProposalSignatures(uint256 round_)\\\\n external\\\\n view\\\\n returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures)\\\\n {\\\\n return _getProposalSignatures(0, round_);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\\\n */\\\\n function globalProposalVoted(uint256 round_, address voter) external view returns (bool) {\\\\n return _proposalVoted(0, round_, voter);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3905efdfd61681db17bcc392cf93d6571e94bf752f813eacd2504662241231c8\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceProposal.sol\\\\\\\";\\\\n\\\\nabstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Proposes a proposal struct and casts votes by signature.\\\\n */\\\\n function _proposeProposalStructAndCastVotes(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n address _creator\\\\n ) internal {\\\\n _proposeProposalStruct(_proposal, _creator);\\\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes a proposal struct and casts votes by signature.\\\\n */\\\\n function _castProposalBySignatures(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures\\\\n ) internal {\\\\n bytes32 _proposalHash = _proposal.hash();\\\\n\\\\n if (vote[_proposal.chainId][_proposal.nonce].hash != _proposalHash) {\\\\n revert ErrInvalidProposal(_proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\\\n }\\\\n\\\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev See `castProposalVoteForCurrentNetwork`.\\\\n */\\\\n function _castProposalVoteForCurrentNetwork(address _voter, Proposal.ProposalDetail memory _proposal, Ballot.VoteType _support) internal {\\\\n if (_proposal.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid);\\\\n\\\\n bytes32 proposalHash = _proposal.hash();\\\\n if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\\\n }\\\\n\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n Signature memory _emptySignature;\\\\n _castVote(_proposal, _support, _minimumForVoteWeight, _minimumAgainstVoteWeight, _voter, _emptySignature, _getWeight(_voter));\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\\\n */\\\\n function getProposalSignatures(\\\\n uint256 _chainId,\\\\n uint256 _round\\\\n ) external view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\\\n return _getProposalSignatures(_chainId, _round);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\\\n */\\\\n function proposalVoted(uint256 _chainId, uint256 _round, address _voter) external view returns (bool) {\\\\n return _proposalVoted(_chainId, _round, _voter);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x820788183e3300ede4a19be84a3d7c991ac579017f78a098b26d1bbebc411ec4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallback.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManagerCallback\\\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\\\n */\\\\ninterface IBridgeManagerCallback is IERC165 {\\\\n /**\\\\n * @dev Handles the event when bridge operators are added.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\\\n\\\\n /**\\\\n * @dev Handles the event when bridge operators are removed.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerCallbackRegister {\\\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\\\n\\\\n event CallbackRegistered(address, bool);\\\\n /**\\\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\\\n */\\\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\\\n\\\\n /**\\\\n * @dev Retrieves the addresses of registered callbacks.\\\\n * @return registers An array containing the addresses of registered callbacks.\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers);\\\\n\\\\n /**\\\\n * @dev Registers multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external;\\\\n\\\\n /**\\\\n * @dev Unregisters multiple callbacks from the bridge.\\\\n * @param registers The array of callback addresses to unregister.\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/ChainTypeConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface ChainTypeConsumer {\\\\n enum ChainType {\\\\n RoninChain,\\\\n Mainchain\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/SignatureConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface SignatureConsumer {\\\\n struct Signature {\\\\n uint8 v;\\\\n bytes32 r;\\\\n bytes32 s;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/VoteStatusConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface VoteStatusConsumer {\\\\n enum VoteStatus {\\\\n Pending,\\\\n Approved,\\\\n Executed,\\\\n Rejected,\\\\n Expired\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/Ballot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\n\\\\nlibrary Ballot {\\\\n using ECDSA for bytes32;\\\\n\\\\n enum VoteType {\\\\n For,\\\\n Against\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Ballot(bytes32 proposalHash,uint8 support)\\\\\\\");\\\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\\\n\\\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, BALLOT_TYPEHASH)\\\\n mstore(add(ptr, 0x20), _proposalHash)\\\\n mstore(add(ptr, 0x40), _support)\\\\n digest := keccak256(ptr, 0x60)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/GlobalProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./Proposal.sol\\\\\\\";\\\\n\\\\nlibrary GlobalProposal {\\\\n /**\\\\n * @dev Error thrown when attempting to interact with an unsupported target.\\\\n */\\\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\\\n\\\\n enum TargetOption {\\\\n BridgeManager, // 0\\\\n GatewayContract, // 1\\\\n BridgeReward, // 2\\\\n BridgeSlash, // 3\\\\n BridgeTracking, // 4\\\\n PauseEnforcer // 5\\\\n\\\\n }\\\\n\\\\n struct GlobalProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n uint256 expiryTimestamp;\\\\n address executor;\\\\n TargetOption[] targetOptions;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = self.values;\\\\n TargetOption[] memory targets = self.targetOptions;\\\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\\\n uint256[] memory gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length;) {\\\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\\\n\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * proposal.nonce,\\\\n * proposal.expiryTimestamp,\\\\n * proposal.executor,\\\\n * targetsHash,\\\\n * valuesHash,\\\\n * calldatasHash,\\\\n * gasAmountsHash\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0x80), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x100)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts into the normal proposal.\\\\n */\\\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\\\n detail_.nonce = self.nonce;\\\\n detail_.chainId = 0;\\\\n detail_.expiryTimestamp = self.expiryTimestamp;\\\\n detail_.executor = self.executor;\\\\n\\\\n detail_.targets = new address[](self.targetOptions.length);\\\\n detail_.values = self.values;\\\\n detail_.calldatas = self.calldatas;\\\\n detail_.gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\\\n detail_.targets[i] = targets[i];\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Proposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nlibrary Proposal {\\\\n /**\\\\n * @dev Error thrown when there is insufficient gas to execute a function.\\\\n */\\\\n error ErrInsufficientGas(bytes32 proposalHash);\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\\\n */\\\\n error ErrInvalidExpiryTimestamp();\\\\n\\\\n /**\\\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\\n */\\\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\\\n\\\\n struct ProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n // Value 0: all chain should run this proposal\\\\n // Other values: only specific chain has to execute\\\\n uint256 chainId;\\\\n uint256 expiryTimestamp;\\\\n // The address that execute the proposal after the proposal passes.\\\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\\\n address executor;\\\\n address[] targets;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\\\n\\\\n /**\\\\n * @dev Validates the proposal.\\\\n */\\\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\\\n if (\\\\n !(\\\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\\\n && proposal.targets.length == proposal.gasAmounts.length\\\\n )\\\\n ) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\\\n revert ErrInvalidExpiryTimestamp();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = proposal.values;\\\\n address[] memory targets = proposal.targets;\\\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length; ++i) {\\\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\\\n }\\\\n\\\\n // return\\\\n // keccak256(\\\\n // abi.encode(\\\\n // TYPE_HASH,\\\\n // proposal.nonce,\\\\n // proposal.chainId,\\\\n // proposal.expiryTimestamp\\\\n // proposal.executor\\\\n // targetsHash,\\\\n // valuesHash,\\\\n // calldatasHash,\\\\n // gasAmountsHash\\\\n // )\\\\n // );\\\\n // /\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0x100), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x120)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\\\n */\\\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\\\n return proposal.executor == address(0);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is executable for the current chain.\\\\n *\\\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\\\n *\\\\n */\\\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal.\\\\n */\\\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\\\n\\\\n successCalls = new bool[](proposal.targets.length);\\\\n returnDatas = new bytes[](proposal.targets.length);\\\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\\\n\\\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\\\n\\\\n if (!successCalls[i]) {\\\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/ronin/gateway/RoninBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from \\\\\\\"../../extensions/bridge-operator-governance/BridgeManager.sol\\\\\\\";\\\\nimport {\\\\n Ballot,\\\\n GlobalProposal,\\\\n Proposal,\\\\n CommonGovernanceProposal,\\\\n GovernanceProposal\\\\n} from \\\\\\\"../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\\\\\";\\\\nimport {\\\\n CoreGovernance,\\\\n GlobalCoreGovernance,\\\\n GlobalGovernanceProposal\\\\n} from \\\\\\\"../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\\\\\";\\\\nimport { VoteStatusConsumer } from \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\ncontract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * CURRENT NETWORK\\\\n */\\\\n\\\\n /**\\\\n * @dev See `CoreGovernance-_proposeProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function propose(\\\\n uint256 chainId,\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n address[] calldata targets,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts\\\\n ) external onlyGovernor {\\\\n _proposeProposalStruct(\\\\n Proposal.ProposalDetail({\\\\n nonce: _createVotingRound(chainId),\\\\n chainId: chainId,\\\\n expiryTimestamp: expiryTimestamp,\\\\n executor: executor,\\\\n targets: targets,\\\\n values: values,\\\\n calldatas: calldatas,\\\\n gasAmounts: gasAmounts\\\\n }),\\\\n msg.sender\\\\n );\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_proposeProposalStructAndCastVotes`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n * - The proposal is for the current network.\\\\n *\\\\n */\\\\n function proposeProposalStructAndCastVotes(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures\\\\n ) external onlyGovernor {\\\\n _proposeProposalStructAndCastVotes(_proposal, _supports, _signatures, msg.sender);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes and casts vote for a proposal on the current network.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n * - The proposal is for the current network.\\\\n *\\\\n */\\\\n function proposeProposalForCurrentNetwork(\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n address[] calldata targets,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts,\\\\n Ballot.VoteType support\\\\n ) external onlyGovernor {\\\\n Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({\\\\n nonce: _createVotingRound(block.chainid),\\\\n chainId: block.chainid,\\\\n expiryTimestamp: expiryTimestamp,\\\\n executor: executor,\\\\n targets: targets,\\\\n values: values,\\\\n calldatas: calldatas,\\\\n gasAmounts: gasAmounts\\\\n });\\\\n _proposeProposalStruct(proposal, msg.sender);\\\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for a proposal on the current network.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function castProposalVoteForCurrentNetwork(Proposal.ProposalDetail calldata proposal, Ballot.VoteType support) external onlyGovernor {\\\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_castProposalBySignatures`.\\\\n */\\\\n function castProposalBySignatures(Proposal.ProposalDetail calldata proposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures) external {\\\\n _castProposalBySignatures(proposal, supports_, signatures);\\\\n }\\\\n\\\\n /**\\\\n * GLOBAL NETWORK\\\\n */\\\\n\\\\n /**\\\\n * @dev See `CoreGovernance-_proposeGlobal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts\\\\n ) external onlyGovernor {\\\\n _proposeGlobal({\\\\n expiryTimestamp: expiryTimestamp,\\\\n executor: executor,\\\\n targetOptions: targetOptions,\\\\n values: values,\\\\n calldatas: calldatas,\\\\n gasAmounts: gasAmounts,\\\\n creator: msg.sender\\\\n });\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function proposeGlobalProposalStructAndCastVotes(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor {\\\\n _proposeGlobalProposalStructAndCastVotes({ globalProposal: globalProposal, supports_: supports_, signatures: signatures, creator: msg.sender });\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_castGlobalProposalBySignatures`.\\\\n */\\\\n function castGlobalProposalBySignatures(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external {\\\\n _castGlobalProposalBySignatures({ globalProposal: globalProposal, supports_: supports_, signatures: signatures });\\\\n }\\\\n\\\\n /**\\\\n * COMMON METHODS\\\\n */\\\\n\\\\n /**\\\\n * @dev See {CoreGovernance-_executeWithCaller}.\\\\n */\\\\n function execute(Proposal.ProposalDetail calldata proposal) external {\\\\n _executeWithCaller(proposal, msg.sender);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {GlobalCoreGovernance-_executeWithCaller}.\\\\n */\\\\n function executeGlobal(GlobalProposal.GlobalProposalDetail calldata globalProposal) external {\\\\n _executeWithCaller({\\\\n proposal: globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true })),\\\\n caller: msg.sender\\\\n });\\\\n }\\\\n\\\\n /**\\\\n * @dev Deletes the expired proposal by its chainId and nonce, without creating a new proposal.\\\\n *\\\\n * Requirements:\\\\n * - The proposal is already created.\\\\n *\\\\n */\\\\n function deleteExpired(uint256 _chainId, uint256 _round) external {\\\\n ProposalVote storage _vote = vote[_chainId][_round];\\\\n if (_vote.hash == 0) revert ErrQueryForEmptyVote();\\\\n\\\\n _tryDeleteExpiredVotingRound(_vote);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the expiry duration for a new proposal.\\\\n */\\\\n function getProposalExpiryDuration() external view returns (uint256) {\\\\n return _proposalExpiryDuration;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the chain type of the contract.\\\\n * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain).\\\\n */\\\\n function _getChainType() internal pure override returns (ChainType) {\\\\n return ChainType.RoninChain;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the total weights of all governors.\\\\n * @return The total weights of all governors combined.\\\\n */\\\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\\\n return getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the minimum vote weight required for governance actions.\\\\n * @return The minimum vote weight required for governance actions.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\\\\n return minimumVoteWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weight of a specific governor.\\\\n * @param _governor The address of the governor to get the vote weight for.\\\\n * @return The vote weight of the specified governor.\\\\n */\\\\n function _getWeight(address _governor) internal view virtual override returns (uint256) {\\\\n return _getGovernorWeight(_governor);\\\\n }\\\\n\\\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\\\n return DOMAIN_SEPARATOR;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x012d5f995b9225da312c6175f03c6f25c6a70168428106bee495108f0ee8ec99\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/Types.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { LibTUint256Slot } from \\\\\\\"./operations/LibTUint256Slot.sol\\\\\\\";\\\\n\\\\ntype TUint256Slot is bytes32;\\\\n\\\\nusing {\\\\n LibTUint256Slot.add,\\\\n LibTUint256Slot.sub,\\\\n LibTUint256Slot.mul,\\\\n LibTUint256Slot.div,\\\\n LibTUint256Slot.load,\\\\n LibTUint256Slot.store,\\\\n LibTUint256Slot.addAssign,\\\\n LibTUint256Slot.subAssign,\\\\n LibTUint256Slot.preDecrement,\\\\n LibTUint256Slot.postDecrement,\\\\n LibTUint256Slot.preIncrement,\\\\n LibTUint256Slot.postIncrement\\\\n} for TUint256Slot global;\\\\n\\\",\\\"keccak256\\\":\\\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/operations/LibTUint256Slot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { TUint256Slot } from \\\\\\\"../Types.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title LibTUint256Slot\\\\n * @dev Library for handling unsigned 256-bit integers.\\\\n */\\\\nlibrary LibTUint256Slot {\\\\n /// @dev value is equal to bytes4(keccak256(\\\\\\\"Panic(uint256)\\\\\\\"))\\\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\\\n /// @dev error code for {Arithmetic over/underflow} error\\\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\\\n /// @dev error code for {Division or modulo by 0} error\\\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\\\n\\\\n /**\\\\n * @dev Loads the value of the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @return val The loaded value.\\\\n */\\\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\\\n assembly {\\\\n val := sload(self)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a value into the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to be stored.\\\\n */\\\\n function store(TUint256Slot self, uint256 other) internal {\\\\n assembly {\\\\n sstore(self, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Multiplies the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to multiply by.\\\\n * @return res The resulting value after multiplication.\\\\n */\\\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n if iszero(iszero(storedVal)) {\\\\n res := mul(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if iszero(eq(other, div(res, storedVal))) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Divides the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to divide by.\\\\n * @return res The resulting value after division.\\\\n */\\\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n // revert if divide by zero\\\\n if iszero(other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, DIVISION_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n res := div(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction.\\\\n */\\\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n\\\\n // Underflow check\\\\n if lt(storedVal, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n\\\\n res := sub(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition.\\\\n */\\\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n res := add(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if lt(res, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after incrementing.\\\\n */\\\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = addAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The original value before incrementing.\\\\n */\\\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res + 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after decrementing.\\\\n */\\\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = subAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value before decrementing.\\\\n */\\\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res - 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition and storage.\\\\n */\\\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = add(self, other));\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction and storage.\\\\n */\\\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = sub(self, other));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "isFoundry": true, + "metadata": "\"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.23+commit.f704f362\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrAlreadyVoted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrBelowMinRequiredGovernors\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrContractTypeNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrCurrentProposalIsNotCompleted\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrDuplicated\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrExistOneInternalCallFailed\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"required\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"sender\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrGovernorNotMatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ErrInsufficientGas\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidArguments\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ErrInvalidChainId\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidExpiryTimestamp\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrInvalidInput\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidOrder\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"actual\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"expected\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ErrInvalidProposal\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidProposalNonce\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidSignatures\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidThreshold\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrInvalidVoteWeight\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrLengthMismatch\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"callIndex\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"revertMsg\\\",\\\"type\\\":\\\"bytes\\\"}],\\\"name\\\":\\\"ErrLooseProposalInternallyRevert\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrOnlySelfCall\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrOperatorNotFound\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"enum RoleAccess\\\",\\\"name\\\":\\\"expectedRole\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"ErrUnauthorized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"interfaceId\\\",\\\"type\\\":\\\"bytes4\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrUnsupportedInterface\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrUnsupportedVoteType\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"ErrVoteIsFinalized\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes4\\\",\\\"name\\\":\\\"msgSig\\\",\\\"type\\\":\\\"bytes4\\\"}],\\\"name\\\":\\\"ErrZeroAddress\\\",\\\"type\\\":\\\"error\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ErrZeroCodeContract\\\",\\\"type\\\":\\\"error\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorAddingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorRemovingFailed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"fromBridgeOperator\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"toBridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"BridgeOperatorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"BridgeOperatorsRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"CallbackRegistered\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ContractUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"globalProposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GlobalProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"Initialized\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"MinRequiredGovernorUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"callData\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"statuses\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"Notified\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalApproved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"indexed\\\":false,\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"creator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"ProposalCreated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool[]\\\",\\\"name\\\":\\\"successCalls\\\",\\\"type\\\":\\\"bool[]\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"returnDatas\\\",\\\"type\\\":\\\"bytes[]\\\"}],\\\"name\\\":\\\"ProposalExecuted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalExpired\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"duration\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalExpiryDurationChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ProposalRejected\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"proposalHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ProposalVoted\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption\\\",\\\"name\\\":\\\"targetOption\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"TargetOptionUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"numerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denominator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousNumerator\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"previousDenominator\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"ThresholdUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"DOMAIN_SEPARATOR\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"voteWeights\\\",\\\"type\\\":\\\"uint96[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"addBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"castGlobalProposalBySignatures\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"castProposalBySignatures\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"castProposalVoteForCurrentNetwork\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"voteWeight\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"checkThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"proposal\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"execute\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"executeGlobal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"bridgeOperator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getBridgeOperatorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getBridgeOperators\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getCallbackRegisters\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"getContract\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"contract_\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getFullBridgeOperatorInfos\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round_\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getGlobalProposalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"voters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getGovernorWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96\\\",\\\"name\\\":\\\"weight\\\",\\\"type\\\":\\\"uint96\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"getGovernorWeights\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint96[]\\\",\\\"name\\\":\\\"weights\\\",\\\"type\\\":\\\"uint96[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getGovernors\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"governor\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"getOperatorOf\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"operator\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"getProposalSignatures\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"_voters\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"_supports\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getThreshold\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"getTotalWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"round_\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"globalProposalVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newGwImpl\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"hotfix__mapToken_setMinimumThresholds_registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"isBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"minimumVoteWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"_round\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_voter\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"proposalVoted\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"propose\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"name\\\":\\\"proposeGlobal\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct GlobalProposal.GlobalProposalDetail\\\",\\\"name\\\":\\\"globalProposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"supports_\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"proposeGlobalProposalStructAndCastVotes\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType\\\",\\\"name\\\":\\\"support\\\",\\\"type\\\":\\\"uint8\\\"}],\\\"name\\\":\\\"proposeProposalForCurrentNetwork\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"executor\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"values\\\",\\\"type\\\":\\\"uint256[]\\\"},{\\\"internalType\\\":\\\"bytes[]\\\",\\\"name\\\":\\\"calldatas\\\",\\\"type\\\":\\\"bytes[]\\\"},{\\\"internalType\\\":\\\"uint256[]\\\",\\\"name\\\":\\\"gasAmounts\\\",\\\"type\\\":\\\"uint256[]\\\"}],\\\"internalType\\\":\\\"struct Proposal.ProposalDetail\\\",\\\"name\\\":\\\"_proposal\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"enum Ballot.VoteType[]\\\",\\\"name\\\":\\\"_supports\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint8\\\",\\\"name\\\":\\\"v\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"r\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"s\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct SignatureConsumer.Signature[]\\\",\\\"name\\\":\\\"_signatures\\\",\\\"type\\\":\\\"tuple[]\\\"}],\\\"name\\\":\\\"proposeProposalStructAndCastVotes\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"registerCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"bridgeOperators\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"removeBridgeOperators\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"}],\\\"name\\\":\\\"resolveTargets\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"round\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum ContractType\\\",\\\"name\\\":\\\"contractType\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"addr\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setContract\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"min\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setMinRequiredGovernor\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"num\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"denom\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"setThreshold\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"governors\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"sumGovernorsWeight\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"sum\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"totalBridgeOperator\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"registers\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"unregisterCallbacks\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"enum GlobalProposal.TargetOption[]\\\",\\\"name\\\":\\\"targetOptions\\\",\\\"type\\\":\\\"uint8[]\\\"},{\\\"internalType\\\":\\\"address[]\\\",\\\"name\\\":\\\"targets\\\",\\\"type\\\":\\\"address[]\\\"}],\\\"name\\\":\\\"updateManyTargetOption\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"name\\\":\\\"vote\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"enum VoteStatusConsumer.VoteStatus\\\",\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"uint8\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"hash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"againstVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"forVoteWeight\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"expiryTimestamp\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"errors\\\":{\\\"ErrAlreadyVoted(address)\\\":[{\\\"details\\\":\\\"Error indicating that a voter has already voted.\\\",\\\"params\\\":{\\\"voter\\\":\\\"The address of the voter who has already voted.\\\"}}],\\\"ErrContractTypeNotFound(uint8)\\\":[{\\\"details\\\":\\\"Error of invalid role.\\\"}],\\\"ErrCurrentProposalIsNotCompleted()\\\":[{\\\"details\\\":\\\"Error thrown when the current proposal is not completed.\\\"}],\\\"ErrDuplicated(bytes4)\\\":[{\\\"details\\\":\\\"Error thrown when a duplicated element is detected in an array.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature that invoke the error.\\\"}}],\\\"ErrInsufficientGas(bytes32)\\\":[{\\\"details\\\":\\\"Error thrown when there is insufficient gas to execute a function.\\\"}],\\\"ErrInvalidArguments(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that arguments are invalid.\\\"}],\\\"ErrInvalidChainId(bytes4,uint256,uint256)\\\":[{\\\"details\\\":\\\"Error indicating that the chain ID is invalid.\\\",\\\"params\\\":{\\\"actual\\\":\\\"Current chain ID that executing function.\\\",\\\"expected\\\":\\\"Expected chain ID required for the tx to success.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\"}}],\\\"ErrInvalidExpiryTimestamp()\\\":[{\\\"details\\\":\\\"Error thrown when an invalid expiry timestamp is provided.\\\"}],\\\"ErrInvalidOrder(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that an order is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid order.\\\"}}],\\\"ErrInvalidProposal(bytes32,bytes32)\\\":[{\\\"details\\\":\\\"Error thrown when an invalid proposal is encountered.\\\",\\\"params\\\":{\\\"actual\\\":\\\"The actual value of the proposal.\\\",\\\"expected\\\":\\\"The expected value of the proposal.\\\"}}],\\\"ErrInvalidProposalNonce(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the proposal nonce is invalid.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\"}}],\\\"ErrInvalidSignatures(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a signature is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid signature.\\\"}}],\\\"ErrInvalidThreshold(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that the provided threshold is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that the invalid threshold applies to.\\\"}}],\\\"ErrInvalidVoteWeight(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote weight is invalid for a specific function signature.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that encountered an invalid vote weight.\\\"}}],\\\"ErrLengthMismatch(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that has a length mismatch.\\\"}}],\\\"ErrLooseProposalInternallyRevert(uint256,bytes)\\\":[{\\\"details\\\":\\\"Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\"}],\\\"ErrOnlySelfCall(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a function can only be called by the contract itself.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) that can only be called by the contract itself.\\\"}}],\\\"ErrUnauthorized(bytes4,uint8)\\\":[{\\\"details\\\":\\\"Error indicating that the caller is unauthorized to perform a specific function.\\\",\\\"params\\\":{\\\"expectedRole\\\":\\\"The role required to perform the function.\\\",\\\"msgSig\\\":\\\"The function signature (bytes4) that the caller is unauthorized to perform.\\\"}}],\\\"ErrUnsupportedInterface(bytes4,address)\\\":[{\\\"details\\\":\\\"The error indicating an unsupported interface.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address where the unsupported interface was encountered.\\\",\\\"interfaceId\\\":\\\"The bytes4 interface identifier that is not supported.\\\"}}],\\\"ErrUnsupportedVoteType(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that a vote type is not supported.\\\",\\\"params\\\":{\\\"msgSig\\\":\\\"The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\"}}],\\\"ErrVoteIsFinalized()\\\":[{\\\"details\\\":\\\"Error thrown when attempting to interact with a finalized vote.\\\"}],\\\"ErrZeroAddress(bytes4)\\\":[{\\\"details\\\":\\\"Error indicating that given address is null when it should not.\\\"}],\\\"ErrZeroCodeContract(address)\\\":[{\\\"details\\\":\\\"Error of set to non-contract.\\\"}]},\\\"events\\\":{\\\"BridgeOperatorAddingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to add.\\\"},\\\"BridgeOperatorRemovingFailed(address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is failed to remove.\\\"},\\\"BridgeOperatorUpdated(address,address,address)\\\":{\\\"details\\\":\\\"Emitted when a bridge operator is updated.\\\"},\\\"BridgeOperatorsAdded(bool[],uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Emitted when new bridge operators are added.\\\"},\\\"BridgeOperatorsRemoved(bool[],address[])\\\":{\\\"details\\\":\\\"Emitted when bridge operators are removed.\\\"},\\\"ContractUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when a contract is updated.\\\"},\\\"GlobalProposalCreated(uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),bytes32,(uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"Initialized(uint8)\\\":{\\\"details\\\":\\\"Triggered when the contract has been initialized or reinitialized.\\\"},\\\"MinRequiredGovernorUpdated(uint256)\\\":{\\\"details\\\":\\\"Emitted when the minimum number of required governors is updated.\\\"},\\\"Notified(bytes,address[],bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the contract notifies multiple registers with statuses and return data.\\\"},\\\"ProposalApproved(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the proposal is approved\\\"},\\\"ProposalCreated(uint256,uint256,bytes32,(uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),address)\\\":{\\\"details\\\":\\\"Emitted when a proposal is created\\\"},\\\"ProposalExecuted(bytes32,bool[],bytes[])\\\":{\\\"details\\\":\\\"Emitted when the proposal is executed\\\"},\\\"ProposalExpired(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is expired\\\"},\\\"ProposalExpiryDurationChanged(uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal expiry duration is changed.\\\"},\\\"ProposalRejected(bytes32)\\\":{\\\"details\\\":\\\"Emitted when the vote is reject\\\"},\\\"ProposalVoted(bytes32,address,uint8,uint256)\\\":{\\\"details\\\":\\\"Emitted when the proposal is voted\\\"},\\\"TargetOptionUpdated(uint8,address)\\\":{\\\"details\\\":\\\"Emitted when the target options are updated\\\"},\\\"ThresholdUpdated(uint256,uint256,uint256,uint256,uint256)\\\":{\\\"details\\\":\\\"Emitted when the threshold is updated\\\"}},\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addBridgeOperators(uint96[],address[],address[])\\\":{\\\"details\\\":\\\"Adds multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to add.\\\",\\\"governors\\\":\\\"An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\"}},\\\"castGlobalProposalBySignatures((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_castGlobalProposalBySignatures`.\\\"},\\\"castProposalBySignatures((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_castProposalBySignatures`.\\\"},\\\"castProposalVoteForCurrentNetwork((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8)\\\":{\\\"details\\\":\\\"Casts vote for a proposal on the current network. Requirements: - The method caller is governor.\\\"},\\\"checkThreshold(uint256)\\\":{\\\"details\\\":\\\"Checks whether the `_voteWeight` passes the threshold.\\\"},\\\"execute((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]))\\\":{\\\"details\\\":\\\"See {CoreGovernance-_executeWithCaller}.\\\"},\\\"executeGlobal((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]))\\\":{\\\"details\\\":\\\"See {GlobalCoreGovernance-_executeWithCaller}.\\\"},\\\"getBridgeOperatorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific bridge operator.\\\",\\\"params\\\":{\\\"bridgeOperator\\\":\\\"The address of the bridge operator to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"The vote weight of the specified bridge operator.\\\"}},\\\"getBridgeOperators()\\\":{\\\"details\\\":\\\"Returns an array of all bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all bridge operators.\\\"}},\\\"getCallbackRegisters()\\\":{\\\"details\\\":\\\"Retrieves the addresses of registered callbacks.\\\",\\\"returns\\\":{\\\"registers\\\":\\\"An array containing the addresses of registered callbacks.\\\"}},\\\"getContract(uint8)\\\":{\\\"details\\\":\\\"Returns the address of a contract with a specific role. Throws an error if no contract is set for the specified role.\\\",\\\"params\\\":{\\\"contractType\\\":\\\"The role of the contract to retrieve.\\\"},\\\"returns\\\":{\\\"contract_\\\":\\\"The address of the contract with the specified role.\\\"}},\\\"getFullBridgeOperatorInfos()\\\":{\\\"details\\\":\\\"Retrieves the full information of all registered bridge operators. This external function allows external callers to obtain the full information of all the registered bridge operators. The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\",\\\"returns\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the registered bridge operators.\\\",\\\"governors\\\":\\\"An array of addresses representing the governors of each bridge operator.\\\",\\\"weights\\\":\\\"An array of uint256 values representing the vote weights of each bridge operator. Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator. Example Usage: ``` (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos(); for (uint256 i = 0; i < bridgeOperators.length; i++) { // Access individual information for each bridge operator. address governor = governors[i]; address bridgeOperator = bridgeOperators[i]; uint256 weight = weights[i]; // ... (Process or use the information as required) ... } ```\\\"}},\\\"getGlobalProposalSignatures(uint256)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_getProposalSignatures}\\\"},\\\"getGovernorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `governor` of a `operator`.\\\"},\\\"getGovernorWeight(address)\\\":{\\\"details\\\":\\\"External function to retrieve the vote weight of a specific governor.\\\",\\\"params\\\":{\\\"governor\\\":\\\"The address of the governor to get the vote weight for.\\\"},\\\"returns\\\":{\\\"weight\\\":\\\"voteWeight The vote weight of the specified governor.\\\"}},\\\"getGovernorWeights(address[])\\\":{\\\"details\\\":\\\"Returns the weights of a list of governor addresses.\\\"},\\\"getGovernors()\\\":{\\\"details\\\":\\\"Returns an array of all governors.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"An array containing the addresses of all governors.\\\"}},\\\"getOperatorOf(address)\\\":{\\\"details\\\":\\\"Returns the corresponding `operator` of a `governor`.\\\"},\\\"getProposalSignatures(uint256,uint256)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_getProposalSignatures}\\\"},\\\"getThreshold()\\\":{\\\"details\\\":\\\"Returns the threshold.\\\"},\\\"getTotalWeight()\\\":{\\\"details\\\":\\\"Returns total weights.\\\"},\\\"globalProposalVoted(uint256,address)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_proposalVoted}\\\"},\\\"isBridgeOperator(address)\\\":{\\\"details\\\":\\\"Checks if the given address is a bridge operator.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address to check.\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"A boolean indicating whether the address is a bridge operator.\\\"}},\\\"minimumVoteWeight()\\\":{\\\"details\\\":\\\"Returns the minimum vote weight to pass the threshold.\\\"},\\\"proposalVoted(uint256,uint256,address)\\\":{\\\"details\\\":\\\"See {CommonGovernanceProposal-_proposalVoted}\\\"},\\\"propose(uint256,uint256,address,address[],uint256[],bytes[],uint256[])\\\":{\\\"details\\\":\\\"See `CoreGovernance-_proposeProposal`. Requirements: - The method caller is governor.\\\"},\\\"proposeGlobal(uint256,address,uint8[],uint256[],bytes[],uint256[])\\\":{\\\"details\\\":\\\"See `CoreGovernance-_proposeGlobal`. Requirements: - The method caller is governor.\\\"},\\\"proposeGlobalProposalStructAndCastVotes((uint256,uint256,address,uint8[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`. Requirements: - The method caller is governor.\\\"},\\\"proposeProposalForCurrentNetwork(uint256,address,address[],uint256[],bytes[],uint256[],uint8)\\\":{\\\"details\\\":\\\"Proposes and casts vote for a proposal on the current network. Requirements: - The method caller is governor. - The proposal is for the current network.\\\"},\\\"proposeProposalStructAndCastVotes((uint256,uint256,uint256,address,address[],uint256[],bytes[],uint256[]),uint8[],(uint8,bytes32,bytes32)[])\\\":{\\\"details\\\":\\\"See `GovernanceProposal-_proposeProposalStructAndCastVotes`. Requirements: - The method caller is governor. - The proposal is for the current network.\\\"},\\\"registerCallbacks(address[])\\\":{\\\"details\\\":\\\"Registers multiple callbacks with the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to register.\\\"}},\\\"removeBridgeOperators(address[])\\\":{\\\"details\\\":\\\"Removes multiple bridge operators.\\\",\\\"params\\\":{\\\"bridgeOperators\\\":\\\"An array of addresses representing the bridge operators to remove.\\\"}},\\\"resolveTargets(uint8[])\\\":{\\\"details\\\":\\\"Returns corresponding address of target options. Return address(0) on non-existent target.\\\"},\\\"setContract(uint8,address)\\\":{\\\"details\\\":\\\"Sets the address of a contract with a specific role. Emits the event {ContractUpdated}.\\\",\\\"params\\\":{\\\"addr\\\":\\\"The address of the contract to set.\\\",\\\"contractType\\\":\\\"The role of the contract to set.\\\"}},\\\"setMinRequiredGovernor(uint256)\\\":{\\\"details\\\":\\\"Self-call to update the minimum required governor.\\\",\\\"params\\\":{\\\"min\\\":\\\"The minimum number, this must not less than 3.\\\"}},\\\"setThreshold(uint256,uint256)\\\":{\\\"details\\\":\\\"Sets the threshold. Requirements: - The method caller is admin. Emits the `ThresholdUpdated` event.\\\"},\\\"sumGovernorsWeight(address[])\\\":{\\\"details\\\":\\\"Returns total weights of the governor list.\\\"},\\\"totalBridgeOperator()\\\":{\\\"details\\\":\\\"Returns the total number of bridge operators.\\\",\\\"returns\\\":{\\\"_0\\\":\\\"The total number of bridge operators.\\\"}},\\\"unregisterCallbacks(address[])\\\":{\\\"details\\\":\\\"Unregisters multiple callbacks from the bridge.\\\",\\\"params\\\":{\\\"registers\\\":\\\"The array of callback addresses to unregister.\\\"}},\\\"updateManyTargetOption(uint8[],address[])\\\":{\\\"details\\\":\\\"Updates list of `targetOptions` to `targets`. Requirement: - Only allow self-call through proposal.\\\"}},\\\"version\\\":1},\\\"userdoc\\\":{\\\"errors\\\":{\\\"ErrBelowMinRequiredGovernors()\\\":[{\\\"notice\\\":\\\"Error indicating that the governors list will go below minimum number of required governor.\\\"}],\\\"ErrGovernorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying governor\\\"}],\\\"ErrGovernorNotMatch(address,address)\\\":[{\\\"notice\\\":\\\"Error indicating that the msg.sender is not match the required governor\\\"}],\\\"ErrInvalidInput()\\\":[{\\\"notice\\\":\\\"Common invalid input error\\\"}],\\\"ErrOperatorNotFound(address)\\\":[{\\\"notice\\\":\\\"Error indicating that cannot find the querying operator\\\"}]},\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"round(uint256)\\\":{\\\"notice\\\":\\\"chain id = 0 for global proposal\\\"}},\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/ronin/gateway/RoninBridgeManager.sol\\\":\\\"RoninBridgeManager\\\"},\\\"evmVersion\\\":\\\"istanbul\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"ipfs\\\",\\\"useLiteralContent\\\":true},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":@fdk/=dependencies/@fdk-0.3.1-beta/script/\\\",\\\":@openzeppelin/=lib/openzeppelin-contracts/\\\",\\\":@prb/math/=lib/prb-math/\\\",\\\":@prb/test/=lib/prb-test/src/\\\",\\\":@ronin/contracts/=src/\\\",\\\":@ronin/script/=script/\\\",\\\":@ronin/test/=test/\\\",\\\":ds-test/=lib/prb-math/lib/forge-std/lib/ds-test/src/\\\",\\\":forge-std/=dependencies/@fdk-0.3.1-beta/dependencies/@forge-std-1.9.1/src/\\\",\\\":hardhat/=node_modules/hardhat/\\\",\\\":openzeppelin-contracts/=lib/openzeppelin-contracts/\\\",\\\":prb-math/=lib/prb-math/src/\\\",\\\":prb-test/=lib/prb-test/src/\\\",\\\":solady/=dependencies/@fdk-0.3.1-beta/dependencies/@solady-0.0.228/src/\\\"]},\\\"sources\\\":{\\\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/Strings.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Contract module that allows children to implement role-based access\\\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\\\n * members except through off-chain means by accessing the contract event logs. Some\\\\n * applications may benefit from on-chain enumerability, for those cases see\\\\n * {AccessControlEnumerable}.\\\\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 AccessControl is Context, IAccessControl, ERC165 {\\\\n struct RoleData {\\\\n mapping(address => bool) 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 Modifier that checks that an account has a specific role. Reverts\\\\n * with a standardized message including the required role.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n *\\\\n * _Available since v4.1._\\\\n */\\\\n modifier onlyRole(bytes32 role) {\\\\n _checkRole(role);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns `true` if `account` has been granted `role`.\\\\n */\\\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\\\n return _roles[role].members[account];\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\\\n *\\\\n * Format of the revert message is described in {_checkRole}.\\\\n *\\\\n * _Available since v4.6._\\\\n */\\\\n function _checkRole(bytes32 role) internal view virtual {\\\\n _checkRole(role, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Revert with a standard message if `account` is missing `role`.\\\\n *\\\\n * The format of the revert reason is given by the following regular expression:\\\\n *\\\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\\\n */\\\\n function _checkRole(bytes32 role, address account) internal view virtual {\\\\n if (!hasRole(role, account)) {\\\\n revert(\\\\n string(\\\\n abi.encodePacked(\\\\n \\\\\\\"AccessControl: account \\\\\\\",\\\\n Strings.toHexString(uint160(account), 20),\\\\n \\\\\\\" is missing role \\\\\\\",\\\\n Strings.toHexString(uint256(role), 32)\\\\n )\\\\n )\\\\n );\\\\n }\\\\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 virtual override 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 * May emit a {RoleGranted} event.\\\\n */\\\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 * May emit a {RoleRevoked} event.\\\\n */\\\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\\\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 revoked `role`, emits a {RoleRevoked}\\\\n * event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must be `account`.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function renounceRole(bytes32 role, address account) public virtual override {\\\\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 * May emit a {RoleGranted} event.\\\\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 * NOTE: This function is deprecated in favor of {_grantRole}.\\\\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 bytes32 previousAdminRole = getRoleAdmin(role);\\\\n _roles[role].adminRole = adminRole;\\\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\\\n }\\\\n\\\\n /**\\\\n * @dev Grants `role` to `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleGranted} event.\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual {\\\\n if (!hasRole(role, account)) {\\\\n _roles[role].members[account] = true;\\\\n emit RoleGranted(role, account, _msgSender());\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Revokes `role` from `account`.\\\\n *\\\\n * Internal function without access restriction.\\\\n *\\\\n * May emit a {RoleRevoked} event.\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual {\\\\n if (hasRole(role, account)) {\\\\n _roles[role].members[account] = false;\\\\n emit RoleRevoked(role, account, _msgSender());\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5b35d8e68aeaccc685239bd9dd79b9ba01a0357930f8a3307ab85511733d9724\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/AccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"./AccessControl.sol\\\\\\\";\\\\nimport \\\\\\\"../utils/structs/EnumerableSet.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\\\n */\\\\nabstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);\\\\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 virtual override returns (address) {\\\\n return _roleMembers[role].at(index);\\\\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 virtual override returns (uint256) {\\\\n return _roleMembers[role].length();\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_grantRole} to track enumerable memberships\\\\n */\\\\n function _grantRole(bytes32 role, address account) internal virtual override {\\\\n super._grantRole(role, account);\\\\n _roleMembers[role].add(account);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload {_revokeRole} to track enumerable memberships\\\\n */\\\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\\\n super._revokeRole(role, account);\\\\n _roleMembers[role].remove(account);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x13f5e15f2a0650c0b6aaee2ef19e89eaf4870d6e79662d572a393334c1397247\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControl {\\\\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 {AccessControl-_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) external view returns (bool);\\\\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 {AccessControl-_setRoleAdmin}.\\\\n */\\\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\\\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) external;\\\\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) external;\\\\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) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/access/IAccessControlEnumerable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IAccessControl.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\\\n */\\\\ninterface IAccessControlEnumerable is IAccessControl {\\\\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) external view returns (address);\\\\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) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xba4459ab871dfa300f5212c6c30178b63898c03533a1ede28436f11546626676\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\\\n * proxy whose upgrades are fully controlled by the current implementation.\\\\n */\\\\ninterface IERC1822Proxiable {\\\\n /**\\\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\\\n * address.\\\\n *\\\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\\\n * function revert if invoked through a proxy.\\\\n */\\\\n function proxiableUUID() external view returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Proxy.sol\\\\\\\";\\\\nimport \\\\\\\"./ERC1967Upgrade.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\\\n * implementation behind the proxy.\\\\n */\\\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\\\n /**\\\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\\\n *\\\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\\\n */\\\\n constructor(address _logic, bytes memory _data) payable {\\\\n _upgradeToAndCall(_logic, _data, false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _implementation() internal view virtual override returns (address impl) {\\\\n return ERC1967Upgrade._getImplementation();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Upgrade.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../beacon/IBeacon.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/draft-IERC1822.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/StorageSlot.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This abstract contract provides getters and event emitting update functions for\\\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\\\n *\\\\n * _Available since v4.1._\\\\n *\\\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\\\n */\\\\nabstract contract ERC1967Upgrade {\\\\n // This is the keccak-256 hash of \\\\\\\"eip1967.proxy.rollback\\\\\\\" subtracted by 1\\\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\\\n\\\\n /**\\\\n * @dev Storage slot with the address of the current implementation.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.implementation\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n\\\\n /**\\\\n * @dev Emitted when the implementation is upgraded.\\\\n */\\\\n event Upgraded(address indexed implementation);\\\\n\\\\n /**\\\\n * @dev Returns the current implementation address.\\\\n */\\\\n function _getImplementation() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 implementation slot.\\\\n */\\\\n function _setImplementation(address newImplementation) private {\\\\n require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeTo(address newImplementation) internal {\\\\n _setImplementation(newImplementation);\\\\n emit Upgraded(newImplementation);\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCall(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _upgradeTo(newImplementation);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(newImplementation, data);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\\\n *\\\\n * Emits an {Upgraded} event.\\\\n */\\\\n function _upgradeToAndCallUUPS(\\\\n address newImplementation,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\\\n _setImplementation(newImplementation);\\\\n } else {\\\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\\\n require(slot == _IMPLEMENTATION_SLOT, \\\\\\\"ERC1967Upgrade: unsupported proxiableUUID\\\\\\\");\\\\n } catch {\\\\n revert(\\\\\\\"ERC1967Upgrade: new implementation is not UUPS\\\\\\\");\\\\n }\\\\n _upgradeToAndCall(newImplementation, data, forceCall);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Storage slot with the admin of the contract.\\\\n * This is the keccak-256 hash of \\\\\\\"eip1967.proxy.admin\\\\\\\" subtracted by 1, and is\\\\n * validated in the constructor.\\\\n */\\\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n /**\\\\n * @dev Emitted when the admin account has changed.\\\\n */\\\\n event AdminChanged(address previousAdmin, address newAdmin);\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _getAdmin() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new address in the EIP1967 admin slot.\\\\n */\\\\n function _setAdmin(address newAdmin) private {\\\\n require(newAdmin != address(0), \\\\\\\"ERC1967: new admin is the zero address\\\\\\\");\\\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n */\\\\n function _changeAdmin(address newAdmin) internal {\\\\n emit AdminChanged(_getAdmin(), newAdmin);\\\\n _setAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\\\n */\\\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\\\n\\\\n /**\\\\n * @dev Emitted when the beacon is upgraded.\\\\n */\\\\n event BeaconUpgraded(address indexed beacon);\\\\n\\\\n /**\\\\n * @dev Returns the current beacon.\\\\n */\\\\n function _getBeacon() internal view returns (address) {\\\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\\\n */\\\\n function _setBeacon(address newBeacon) private {\\\\n require(Address.isContract(newBeacon), \\\\\\\"ERC1967: new beacon is not a contract\\\\\\\");\\\\n require(\\\\n Address.isContract(IBeacon(newBeacon).implementation()),\\\\n \\\\\\\"ERC1967: beacon implementation is not a contract\\\\\\\"\\\\n );\\\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\\\n }\\\\n\\\\n /**\\\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\\\n *\\\\n * Emits a {BeaconUpgraded} event.\\\\n */\\\\n function _upgradeBeaconToAndCall(\\\\n address newBeacon,\\\\n bytes memory data,\\\\n bool forceCall\\\\n ) internal {\\\\n _setBeacon(newBeacon);\\\\n emit BeaconUpgraded(newBeacon);\\\\n if (data.length > 0 || forceCall) {\\\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\\\n * be specified by overriding the virtual {_implementation} function.\\\\n *\\\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\\\n * different contract through the {_delegate} function.\\\\n *\\\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\\\n */\\\\nabstract contract Proxy {\\\\n /**\\\\n * @dev Delegates the current call to `implementation`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _delegate(address implementation) internal virtual {\\\\n assembly {\\\\n // Copy msg.data. We take full control of memory in this inline assembly\\\\n // block because it will not return to Solidity code. We overwrite the\\\\n // Solidity scratch pad at memory position 0.\\\\n calldatacopy(0, 0, calldatasize())\\\\n\\\\n // Call the implementation.\\\\n // out and outsize are 0 because we don't know the size yet.\\\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\\\n\\\\n // Copy the returned data.\\\\n returndatacopy(0, 0, returndatasize())\\\\n\\\\n switch result\\\\n // delegatecall returns 0 on error.\\\\n case 0 {\\\\n revert(0, returndatasize())\\\\n }\\\\n default {\\\\n return(0, returndatasize())\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\\\n * and {_fallback} should delegate.\\\\n */\\\\n function _implementation() internal view virtual returns (address);\\\\n\\\\n /**\\\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\\\n *\\\\n * This function does not return to its internal call site, it will return directly to the external caller.\\\\n */\\\\n function _fallback() internal virtual {\\\\n _beforeFallback();\\\\n _delegate(_implementation());\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\\\n * function in the contract matches the call data.\\\\n */\\\\n fallback() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\\\n * is empty.\\\\n */\\\\n receive() external payable virtual {\\\\n _fallback();\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\\\n *\\\\n * If overridden should call `super._beforeFallback()`.\\\\n */\\\\n function _beforeFallback() internal virtual {}\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\\\n */\\\\ninterface IBeacon {\\\\n /**\\\\n * @dev Must return an address that can be used as a delegate call target.\\\\n *\\\\n * {BeaconProxy} will check that this address is a contract.\\\\n */\\\\n function implementation() external view returns (address);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1967/ERC1967Proxy.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\\\n *\\\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\\\n * clashing], which can potentially be used in an attack, this contract uses the\\\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\\\n * things that go hand in hand:\\\\n *\\\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\\\n * that call matches one of the admin functions exposed by the proxy itself.\\\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\\\n * \\\\\\\"admin cannot fallback to proxy target\\\\\\\".\\\\n *\\\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\\\n * to sudden errors when trying to call a function from the proxy implementation.\\\\n *\\\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\\\n */\\\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\\\n /**\\\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\\\n */\\\\n constructor(\\\\n address _logic,\\\\n address admin_,\\\\n bytes memory _data\\\\n ) payable ERC1967Proxy(_logic, _data) {\\\\n _changeAdmin(admin_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\\\n */\\\\n modifier ifAdmin() {\\\\n if (msg.sender == _getAdmin()) {\\\\n _;\\\\n } else {\\\\n _fallback();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\\\n */\\\\n function admin() external ifAdmin returns (address admin_) {\\\\n admin_ = _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current implementation.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\\\n *\\\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\\\n */\\\\n function implementation() external ifAdmin returns (address implementation_) {\\\\n implementation_ = _implementation();\\\\n }\\\\n\\\\n /**\\\\n * @dev Changes the admin of the proxy.\\\\n *\\\\n * Emits an {AdminChanged} event.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\\\n */\\\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\\\n _changeAdmin(newAdmin);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\\\n */\\\\n function upgradeTo(address newImplementation) external ifAdmin {\\\\n _upgradeToAndCall(newImplementation, bytes(\\\\\\\"\\\\\\\"), false);\\\\n }\\\\n\\\\n /**\\\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\\\n * proxied contract.\\\\n *\\\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\\\n */\\\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\\\n _upgradeToAndCall(newImplementation, data, true);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the current admin.\\\\n */\\\\n function _admin() internal view virtual returns (address) {\\\\n return _getAdmin();\\\\n }\\\\n\\\\n /**\\\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\\\n */\\\\n function _beforeFallback() internal virtual override {\\\\n require(msg.sender != _getAdmin(), \\\\\\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\\\\\");\\\\n super._beforeFallback();\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa6a787e7a901af6511e19aa53e1a00352db215a011d2c7a438d0582dd5da76f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\\\n\\\\npragma solidity ^0.8.2;\\\\n\\\\nimport \\\\\\\"../../utils/Address.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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\\\n * reused. This mechanism prevents re-execution of each \\\\\\\"step\\\\\\\" but allows the creation of new initialization steps in\\\\n * case an upgrade adds a module that needs to be initialized.\\\\n *\\\\n * For example:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * contract MyToken is ERC20Upgradeable {\\\\n * function initialize() initializer public {\\\\n * __ERC20_init(\\\\\\\"MyToken\\\\\\\", \\\\\\\"MTK\\\\\\\");\\\\n * }\\\\n * }\\\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\\\n * function initializeV2() reinitializer(2) public {\\\\n * __ERC20Permit_init(\\\\\\\"MyToken\\\\\\\");\\\\n * }\\\\n * }\\\\n * ```\\\\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 {ERC1967Proxy-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 *\\\\n * [CAUTION]\\\\n * ====\\\\n * Avoid leaving a contract uninitialized.\\\\n *\\\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\\\n *\\\\n * [.hljs-theme-light.nopadding]\\\\n * ```\\\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\\\n * constructor() {\\\\n * _disableInitializers();\\\\n * }\\\\n * ```\\\\n * ====\\\\n */\\\\nabstract contract Initializable {\\\\n /**\\\\n * @dev Indicates that the contract has been initialized.\\\\n * @custom:oz-retyped-from bool\\\\n */\\\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\\\n */\\\\n event Initialized(uint8 version);\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\\\n */\\\\n modifier initializer() {\\\\n bool isTopLevelCall = !_initializing;\\\\n require(\\\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\\\n \\\\\\\"Initializable: contract is already initialized\\\\\\\"\\\\n );\\\\n _initialized = 1;\\\\n if (isTopLevelCall) {\\\\n _initializing = true;\\\\n }\\\\n _;\\\\n if (isTopLevelCall) {\\\\n _initializing = false;\\\\n emit Initialized(1);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\\\n * used to initialize parent contracts.\\\\n *\\\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\\\n * initialization.\\\\n *\\\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\\\n * a contract, executing them in the right order is up to the developer or operator.\\\\n */\\\\n modifier reinitializer(uint8 version) {\\\\n require(!_initializing && _initialized < version, \\\\\\\"Initializable: contract is already initialized\\\\\\\");\\\\n _initialized = version;\\\\n _initializing = true;\\\\n _;\\\\n _initializing = false;\\\\n emit Initialized(version);\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\\\n */\\\\n modifier onlyInitializing() {\\\\n require(_initializing, \\\\\\\"Initializable: contract is not initializing\\\\\\\");\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\\\n * through proxies.\\\\n */\\\\n function _disableInitializers() internal virtual {\\\\n require(!_initializing, \\\\\\\"Initializable: contract is initializing\\\\\\\");\\\\n if (_initialized < type(uint8).max) {\\\\n _initialized = type(uint8).max;\\\\n emit Initialized(type(uint8).max);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x2a21b14ff90012878752f230d3ffd5c3405e5938d06c97a7d89c0a64561d0d66\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/security/Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../utils/Context.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 Pausable is Context {\\\\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 constructor() {\\\\n _paused = false;\\\\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 _requireNotPaused();\\\\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 _requirePaused();\\\\n _;\\\\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 Throws if the contract is paused.\\\\n */\\\\n function _requireNotPaused() internal view virtual {\\\\n require(!paused(), \\\\\\\"Pausable: paused\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Throws if the contract is not paused.\\\\n */\\\\n function _requirePaused() internal view virtual {\\\\n require(paused(), \\\\\\\"Pausable: not paused\\\\\\\");\\\\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}\\\\n\\\",\\\"keccak256\\\":\\\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"./IERC1155Receiver.sol\\\\\\\";\\\\nimport \\\\\\\"./extensions/IERC1155MetadataURI.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Address.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/Context.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/introspection/ERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the basic standard multi-token.\\\\n * See https://eips.ethereum.org/EIPS/eip-1155\\\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\\\n using Address for address;\\\\n\\\\n // Mapping from token ID to account balances\\\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\\\n\\\\n // Mapping from account to operator approvals\\\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\\\n\\\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\\\n string private _uri;\\\\n\\\\n /**\\\\n * @dev See {_setURI}.\\\\n */\\\\n constructor(string memory uri_) {\\\\n _setURI(uri_);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\\\n return\\\\n interfaceId == type(IERC1155).interfaceId ||\\\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\\\n super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155MetadataURI-uri}.\\\\n *\\\\n * This implementation returns the same URI for *all* token types. It relies\\\\n * on the token type ID substitution mechanism\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\\\n *\\\\n * Clients calling this function must replace the `\\\\\\\\{id\\\\\\\\}` substring with the\\\\n * actual token type ID.\\\\n */\\\\n function uri(uint256) public view virtual override returns (string memory) {\\\\n return _uri;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-balanceOf}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `account` cannot be the zero address.\\\\n */\\\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\\\n require(account != address(0), \\\\\\\"ERC1155: address zero is not a valid owner\\\\\\\");\\\\n return _balances[id][account];\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-balanceOfBatch}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `accounts` and `ids` must have the same length.\\\\n */\\\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\\\n public\\\\n view\\\\n virtual\\\\n override\\\\n returns (uint256[] memory)\\\\n {\\\\n require(accounts.length == ids.length, \\\\\\\"ERC1155: accounts and ids length mismatch\\\\\\\");\\\\n\\\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\\\n\\\\n for (uint256 i = 0; i < accounts.length; ++i) {\\\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\\\n }\\\\n\\\\n return batchBalances;\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-setApprovalForAll}.\\\\n */\\\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\\\n _setApprovalForAll(_msgSender(), operator, approved);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-isApprovedForAll}.\\\\n */\\\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\\\n return _operatorApprovals[account][operator];\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-safeTransferFrom}.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) public virtual override {\\\\n require(\\\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n _safeTransferFrom(from, to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\\\n */\\\\n function safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) public virtual override {\\\\n require(\\\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: transfer to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: insufficient balance for transfer\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n _balances[id][to] += amount;\\\\n\\\\n emit TransferSingle(operator, from, to, id, amount);\\\\n\\\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n require(to != address(0), \\\\\\\"ERC1155: transfer to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n for (uint256 i = 0; i < ids.length; ++i) {\\\\n uint256 id = ids[i];\\\\n uint256 amount = amounts[i];\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: insufficient balance for transfer\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n _balances[id][to] += amount;\\\\n }\\\\n\\\\n emit TransferBatch(operator, from, to, ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\\\n * substitution mechanism\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\\\n *\\\\n * By this mechanism, any occurrence of the `\\\\\\\\{id\\\\\\\\}` substring in either the\\\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\\\n * clients with the token type ID.\\\\n *\\\\n * For example, the `https://token-cdn-domain/\\\\\\\\{id\\\\\\\\}.json` URI would be\\\\n * interpreted by clients as\\\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\\\n * for token type ID 0x4cce0.\\\\n *\\\\n * See {uri}.\\\\n *\\\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\\\n * this function emits no events.\\\\n */\\\\n function _setURI(string memory newuri) internal virtual {\\\\n _uri = newuri;\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _mint(\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: mint to the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _balances[id][to] += amount;\\\\n emit TransferSingle(operator, address(0), to, id, amount);\\\\n\\\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function _mintBatch(\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {\\\\n require(to != address(0), \\\\\\\"ERC1155: mint to the zero address\\\\\\\");\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n for (uint256 i = 0; i < ids.length; i++) {\\\\n _balances[ids[i]][to] += amounts[i];\\\\n }\\\\n\\\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\\\n\\\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `from` must have at least `amount` tokens of token type `id`.\\\\n */\\\\n function _burn(\\\\n address from,\\\\n uint256 id,\\\\n uint256 amount\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC1155: burn from the zero address\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n uint256[] memory ids = _asSingletonArray(id);\\\\n uint256[] memory amounts = _asSingletonArray(amount);\\\\n\\\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n\\\\n emit TransferSingle(operator, from, address(0), id, amount);\\\\n\\\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n */\\\\n function _burnBatch(\\\\n address from,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts\\\\n ) internal virtual {\\\\n require(from != address(0), \\\\\\\"ERC1155: burn from the zero address\\\\\\\");\\\\n require(ids.length == amounts.length, \\\\\\\"ERC1155: ids and amounts length mismatch\\\\\\\");\\\\n\\\\n address operator = _msgSender();\\\\n\\\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n\\\\n for (uint256 i = 0; i < ids.length; i++) {\\\\n uint256 id = ids[i];\\\\n uint256 amount = amounts[i];\\\\n\\\\n uint256 fromBalance = _balances[id][from];\\\\n require(fromBalance >= amount, \\\\\\\"ERC1155: burn amount exceeds balance\\\\\\\");\\\\n unchecked {\\\\n _balances[id][from] = fromBalance - amount;\\\\n }\\\\n }\\\\n\\\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\\\n\\\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\\\\\"\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Approve `operator` to operate on all of `owner` tokens\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n */\\\\n function _setApprovalForAll(\\\\n address owner,\\\\n address operator,\\\\n bool approved\\\\n ) internal virtual {\\\\n require(owner != operator, \\\\\\\"ERC1155: setting approval status for self\\\\\\\");\\\\n _operatorApprovals[owner][operator] = approved;\\\\n emit ApprovalForAll(owner, operator, approved);\\\\n }\\\\n\\\\n /**\\\\n * @dev Hook that is called before any token transfer. This includes minting\\\\n * and burning, as well as batched variants.\\\\n *\\\\n * The same hook is called on both single and batched variants. For single\\\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\\\n *\\\\n * Calling conditions (for each `id` and `amount` pair):\\\\n *\\\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\\\n * of token type `id` will be transferred to `to`.\\\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\\\n * for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\\\n * will be burned.\\\\n * - `from` and `to` are never both zero.\\\\n * - `ids` and `amounts` have the same, non-zero length.\\\\n *\\\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {}\\\\n\\\\n /**\\\\n * @dev Hook that is called after any token transfer. This includes minting\\\\n * and burning, as well as batched variants.\\\\n *\\\\n * The same hook is called on both single and batched variants. For single\\\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\\\n *\\\\n * Calling conditions (for each `id` and `amount` pair):\\\\n *\\\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\\\n * of token type `id` will be transferred to `to`.\\\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\\\n * for `to`.\\\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\\\n * will be burned.\\\\n * - `from` and `to` are never both zero.\\\\n * - `ids` and `amounts` have the same, non-zero length.\\\\n *\\\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\\\n */\\\\n function _afterTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual {}\\\\n\\\\n function _doSafeTransferAcceptanceCheck(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) private {\\\\n if (to.isContract()) {\\\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\\\n revert(\\\\\\\"ERC1155: ERC1155Receiver rejected tokens\\\\\\\");\\\\n }\\\\n } catch Error(string memory reason) {\\\\n revert(reason);\\\\n } catch {\\\\n revert(\\\\\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\\\\\");\\\\n }\\\\n }\\\\n }\\\\n\\\\n function _doSafeBatchTransferAcceptanceCheck(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) private {\\\\n if (to.isContract()) {\\\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\\\n bytes4 response\\\\n ) {\\\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\\\n revert(\\\\\\\"ERC1155: ERC1155Receiver rejected tokens\\\\\\\");\\\\n }\\\\n } catch Error(string memory reason) {\\\\n revert(reason);\\\\n } catch {\\\\n revert(\\\\\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\\\\\");\\\\n }\\\\n }\\\\n }\\\\n\\\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\\\n uint256[] memory array = new uint256[](1);\\\\n array[0] = element;\\\\n\\\\n return array;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ninterface IERC1155 is IERC165 {\\\\n /**\\\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\\\n */\\\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\\\n\\\\n /**\\\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\\\n * transfers.\\\\n */\\\\n event TransferBatch(\\\\n address indexed operator,\\\\n address indexed from,\\\\n address indexed to,\\\\n uint256[] ids,\\\\n uint256[] values\\\\n );\\\\n\\\\n /**\\\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\\\n * `approved`.\\\\n */\\\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\\\n\\\\n /**\\\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\\\n *\\\\n * If an {URI} event was emitted for `id`, the standard\\\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\\\n * returned by {IERC1155MetadataURI-uri}.\\\\n */\\\\n event URI(string value, uint256 indexed id);\\\\n\\\\n /**\\\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `account` cannot be the zero address.\\\\n */\\\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `accounts` and `ids` must have the same length.\\\\n */\\\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\\\n external\\\\n view\\\\n returns (uint256[] memory);\\\\n\\\\n /**\\\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `operator` cannot be the caller.\\\\n */\\\\n function setApprovalForAll(address operator, bool approved) external;\\\\n\\\\n /**\\\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\\\n *\\\\n * See {setApprovalForAll}.\\\\n */\\\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\\\n *\\\\n * Emits a {TransferSingle} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `to` cannot be the zero address.\\\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes calldata data\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\\\n *\\\\n * Emits a {TransferBatch} event.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `ids` and `amounts` must have the same length.\\\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\\\n * acceptance magic value.\\\\n */\\\\n function safeBatchTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256[] calldata ids,\\\\n uint256[] calldata amounts,\\\\n bytes calldata data\\\\n ) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev _Available since v3.1._\\\\n */\\\\ninterface IERC1155Receiver is IERC165 {\\\\n /**\\\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\\\n *\\\\n * NOTE: To accept the transfer, this must return\\\\n * `bytes4(keccak256(\\\\\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\\\\\"))`\\\\n * (i.e. 0xf23a6e61, or its own function selector).\\\\n *\\\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\\\n * @param from The address which previously owned the token\\\\n * @param id The ID of the token being transferred\\\\n * @param value The amount of tokens being transferred\\\\n * @param data Additional data with no specified format\\\\n * @return `bytes4(keccak256(\\\\\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\\\\\"))` if transfer is allowed\\\\n */\\\\n function onERC1155Received(\\\\n address operator,\\\\n address from,\\\\n uint256 id,\\\\n uint256 value,\\\\n bytes calldata data\\\\n ) external returns (bytes4);\\\\n\\\\n /**\\\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\\\n * been updated.\\\\n *\\\\n * NOTE: To accept the transfer(s), this must return\\\\n * `bytes4(keccak256(\\\\\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\\\\\"))`\\\\n * (i.e. 0xbc197c81, or its own function selector).\\\\n *\\\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\\\n * @param from The address which previously owned the token\\\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\\\n * @param data Additional data with no specified format\\\\n * @return `bytes4(keccak256(\\\\\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\\\\\"))` if transfer is allowed\\\\n */\\\\n function onERC1155BatchReceived(\\\\n address operator,\\\\n address from,\\\\n uint256[] calldata ids,\\\\n uint256[] calldata values,\\\\n bytes calldata data\\\\n ) external returns (bytes4);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\\\n * own tokens and those that they have been approved to use.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Burnable is ERC1155 {\\\\n function burn(\\\\n address account,\\\\n uint256 id,\\\\n uint256 value\\\\n ) public virtual {\\\\n require(\\\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n\\\\n _burn(account, id, value);\\\\n }\\\\n\\\\n function burnBatch(\\\\n address account,\\\\n uint256[] memory ids,\\\\n uint256[] memory values\\\\n ) public virtual {\\\\n require(\\\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\\\n \\\\\\\"ERC1155: caller is not token owner nor approved\\\\\\\"\\\\n );\\\\n\\\\n _burnBatch(account, ids, values);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"../../../security/Pausable.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\\\n *\\\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\\\n * period, or having an emergency switch for freezing all token transfers in the\\\\n * event of a large bug.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\\\n /**\\\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the contract must not be paused.\\\\n */\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual override {\\\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n\\\\n require(!paused(), \\\\\\\"ERC1155Pausable: token transfer while paused\\\\\\\");\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../IERC1155.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\ninterface IERC1155MetadataURI is IERC1155 {\\\\n /**\\\\n * @dev Returns the URI for token type `id`.\\\\n *\\\\n * If the `\\\\\\\\{id\\\\\\\\}` substring is present in the URI, it must be replaced by\\\\n * clients with the actual token type ID.\\\\n */\\\\n function uri(uint256 id) external view returns (string memory);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../ERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC1155Burnable.sol\\\\\\\";\\\\nimport \\\\\\\"../extensions/ERC1155Pausable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../access/AccessControlEnumerable.sol\\\\\\\";\\\\nimport \\\\\\\"../../../utils/Context.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev {ERC1155} token, including:\\\\n *\\\\n * - ability for holders to burn (destroy) their tokens\\\\n * - a minter role that allows for token minting (creation)\\\\n * - a pauser role that allows to stop all token transfers\\\\n *\\\\n * This contract uses {AccessControl} to lock permissioned functions using the\\\\n * different roles - head to its documentation for details.\\\\n *\\\\n * The account that deploys the contract will be granted the minter and pauser\\\\n * roles, as well as the default admin role, which will let it grant both minter\\\\n * and pauser roles to other accounts.\\\\n *\\\\n * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._\\\\n */\\\\ncontract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable {\\\\n bytes32 public constant MINTER_ROLE = keccak256(\\\\\\\"MINTER_ROLE\\\\\\\");\\\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\\\\\"PAUSER_ROLE\\\\\\\");\\\\n\\\\n /**\\\\n * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that\\\\n * deploys the contract.\\\\n */\\\\n constructor(string memory uri) ERC1155(uri) {\\\\n _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());\\\\n\\\\n _setupRole(MINTER_ROLE, _msgSender());\\\\n _setupRole(PAUSER_ROLE, _msgSender());\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates `amount` new tokens for `to`, of token type `id`.\\\\n *\\\\n * See {ERC1155-_mint}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `MINTER_ROLE`.\\\\n */\\\\n function mint(\\\\n address to,\\\\n uint256 id,\\\\n uint256 amount,\\\\n bytes memory data\\\\n ) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n\\\\n _mint(to, id, amount, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.\\\\n */\\\\n function mintBatch(\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) public virtual {\\\\n require(hasRole(MINTER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have minter role to mint\\\\\\\");\\\\n\\\\n _mintBatch(to, ids, amounts, data);\\\\n }\\\\n\\\\n /**\\\\n * @dev Pauses all token transfers.\\\\n *\\\\n * See {ERC1155Pausable} and {Pausable-_pause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function pause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have pauser role to pause\\\\\\\");\\\\n _pause();\\\\n }\\\\n\\\\n /**\\\\n * @dev Unpauses all token transfers.\\\\n *\\\\n * See {ERC1155Pausable} and {Pausable-_unpause}.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the caller must have the `PAUSER_ROLE`.\\\\n */\\\\n function unpause() public virtual {\\\\n require(hasRole(PAUSER_ROLE, _msgSender()), \\\\\\\"ERC1155PresetMinterPauser: must have pauser role to unpause\\\\\\\");\\\\n _unpause();\\\\n }\\\\n\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId)\\\\n public\\\\n view\\\\n virtual\\\\n override(AccessControlEnumerable, ERC1155)\\\\n returns (bool)\\\\n {\\\\n return super.supportsInterface(interfaceId);\\\\n }\\\\n\\\\n function _beforeTokenTransfer(\\\\n address operator,\\\\n address from,\\\\n address to,\\\\n uint256[] memory ids,\\\\n uint256[] memory amounts,\\\\n bytes memory data\\\\n ) internal virtual override(ERC1155, ERC1155Pausable) {\\\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x775e248004d21e0666740534a732daa9f17ceeee660ded876829e98a3a62b657\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\\\n */\\\\ninterface IERC20 {\\\\n /**\\\\n * @dev 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 /**\\\\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 `to`.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transfer(address to, 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 `from` to `to` using the\\\\n * allowance mechanism. `amount` is then deducted from the caller's\\\\n * allowance.\\\\n *\\\\n * Returns a boolean value indicating whether the operation succeeded.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 amount\\\\n ) external returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Required interface of an ERC721 compliant contract.\\\\n */\\\\ninterface IERC721 is IERC165 {\\\\n /**\\\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\\\n */\\\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\\\n\\\\n /**\\\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\\\n */\\\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\\\n\\\\n /**\\\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\\\n */\\\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\\\n\\\\n /**\\\\n * @dev Returns the number of tokens in ``owner``'s account.\\\\n */\\\\n function balanceOf(address owner) external view returns (uint256 balance);\\\\n\\\\n /**\\\\n * @dev Returns the owner of the `tokenId` token.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `tokenId` must exist.\\\\n */\\\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\\\n\\\\n /**\\\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must exist and be owned by `from`.\\\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId,\\\\n bytes calldata data\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must exist and be owned by `from`.\\\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function safeTransferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Transfers `tokenId` token from `from` to `to`.\\\\n *\\\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `from` cannot be the zero address.\\\\n * - `to` cannot be the zero address.\\\\n * - `tokenId` token must be owned by `from`.\\\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\\\n *\\\\n * Emits a {Transfer} event.\\\\n */\\\\n function transferFrom(\\\\n address from,\\\\n address to,\\\\n uint256 tokenId\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\\\n * The approval is cleared when the token is transferred.\\\\n *\\\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The caller must own the token or be an approved operator.\\\\n * - `tokenId` must exist.\\\\n *\\\\n * Emits an {Approval} event.\\\\n */\\\\n function approve(address to, uint256 tokenId) external;\\\\n\\\\n /**\\\\n * @dev Approve or remove `operator` as an operator for the caller.\\\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - The `operator` cannot be the caller.\\\\n *\\\\n * Emits an {ApprovalForAll} event.\\\\n */\\\\n function setApprovalForAll(address operator, bool _approved) external;\\\\n\\\\n /**\\\\n * @dev Returns the account approved for `tokenId` token.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `tokenId` must exist.\\\\n */\\\\n function getApproved(uint256 tokenId) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\\\n *\\\\n * See {setApprovalForAll}\\\\n */\\\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Address.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\\\n\\\\npragma solidity ^0.8.1;\\\\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 * [IMPORTANT]\\\\n * ====\\\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\\\n *\\\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\\\n * constructor.\\\\n * ====\\\\n */\\\\n function isContract(address account) internal view returns (bool) {\\\\n // This method relies on extcodesize/address.code.length, which returns 0\\\\n // for contracts in construction, since the code is only stored at the end\\\\n // of the constructor execution.\\\\n\\\\n return account.code.length > 0;\\\\n }\\\\n\\\\n /**\\\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\\\n * `recipient`, forwarding all available gas and reverting on errors.\\\\n *\\\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\\\n * imposed by `transfer`, making them unable to receive funds via\\\\n * `transfer`. {sendValue} removes this limitation.\\\\n *\\\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\\\n *\\\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\\\n * taken to not create reentrancy vulnerabilities. Consider using\\\\n * {ReentrancyGuard} or the\\\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\\\n */\\\\n function sendValue(address payable recipient, uint256 amount) internal {\\\\n require(address(this).balance >= amount, \\\\\\\"Address: insufficient balance\\\\\\\");\\\\n\\\\n (bool success, ) = recipient.call{value: amount}(\\\\\\\"\\\\\\\");\\\\n require(success, \\\\\\\"Address: unable to send value, recipient may have reverted\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Performs a Solidity function call using a low level `call`. A\\\\n * plain `call` is an unsafe replacement for a function call: use this\\\\n * function instead.\\\\n *\\\\n * If `target` reverts with a revert reason, it is bubbled up by this\\\\n * function (like regular Solidity function calls).\\\\n *\\\\n * Returns the raw returned data. To convert to the expected return value,\\\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - `target` must be a contract.\\\\n * - calling `target` with `data` must not revert.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionCall(target, data, \\\\\\\"Address: low-level call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, 0, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but also transferring `value` wei to `target`.\\\\n *\\\\n * Requirements:\\\\n *\\\\n * - the calling contract must have an ETH balance of at least `value`.\\\\n * - the called Solidity function must be `payable`.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value\\\\n ) internal returns (bytes memory) {\\\\n return functionCallWithValue(target, data, value, \\\\\\\"Address: low-level call with value failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\\\n *\\\\n * _Available since v3.1._\\\\n */\\\\n function functionCallWithValue(\\\\n address target,\\\\n bytes memory data,\\\\n uint256 value,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(address(this).balance >= value, \\\\\\\"Address: insufficient balance for call\\\\\\\");\\\\n require(isContract(target), \\\\\\\"Address: call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\\\n return functionStaticCall(target, data, \\\\\\\"Address: low-level static call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a static call.\\\\n *\\\\n * _Available since v3.3._\\\\n */\\\\n function functionStaticCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal view returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: static call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.staticcall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\\\n return functionDelegateCall(target, data, \\\\\\\"Address: low-level delegate call failed\\\\\\\");\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\\\n * but performing a delegate call.\\\\n *\\\\n * _Available since v3.4._\\\\n */\\\\n function functionDelegateCall(\\\\n address target,\\\\n bytes memory data,\\\\n string memory errorMessage\\\\n ) internal returns (bytes memory) {\\\\n require(isContract(target), \\\\\\\"Address: delegate call to non-contract\\\\\\\");\\\\n\\\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\\\n return verifyCallResult(success, returndata, errorMessage);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\\\n * revert reason using the provided one.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function verifyCallResult(\\\\n bool success,\\\\n bytes memory returndata,\\\\n string memory errorMessage\\\\n ) internal pure returns (bytes memory) {\\\\n if (success) {\\\\n return returndata;\\\\n } else {\\\\n // Look for revert reason and bubble it up if present\\\\n if (returndata.length > 0) {\\\\n // The easiest way to bubble the revert reason is using memory via assembly\\\\n /// @solidity memory-safe-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\\\":\\\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Context.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Provides information about the current execution context, including the\\\\n * sender of the transaction and its data. While these are generally available\\\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\\\n * manner, since when dealing with meta-transactions the account sending and\\\\n * paying for execution may not be the actual sender (as far as an application\\\\n * is concerned).\\\\n *\\\\n * This contract is only required for intermediate, library-like contracts.\\\\n */\\\\nabstract contract Context {\\\\n function _msgSender() internal view virtual returns (address) {\\\\n return msg.sender;\\\\n }\\\\n\\\\n function _msgData() internal view virtual returns (bytes calldata) {\\\\n return msg.data;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Library for reading and writing primitive types to specific storage slots.\\\\n *\\\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\\\n *\\\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\\\n *\\\\n * Example usage to set ERC1967 implementation slot:\\\\n * ```\\\\n * contract ERC1967 {\\\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\\\n *\\\\n * function _getImplementation() internal view returns (address) {\\\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\\\n * }\\\\n *\\\\n * function _setImplementation(address newImplementation) internal {\\\\n * require(Address.isContract(newImplementation), \\\\\\\"ERC1967: new implementation is not a contract\\\\\\\");\\\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\\\n * }\\\\n * }\\\\n * ```\\\\n *\\\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\\\n */\\\\nlibrary StorageSlot {\\\\n struct AddressSlot {\\\\n address value;\\\\n }\\\\n\\\\n struct BooleanSlot {\\\\n bool value;\\\\n }\\\\n\\\\n struct Bytes32Slot {\\\\n bytes32 value;\\\\n }\\\\n\\\\n struct Uint256Slot {\\\\n uint256 value;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\\\n */\\\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\\\n */\\\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\\\n */\\\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\\\n */\\\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r.slot := slot\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev String operations.\\\\n */\\\\nlibrary Strings {\\\\n bytes16 private constant _HEX_SYMBOLS = \\\\\\\"0123456789abcdef\\\\\\\";\\\\n uint8 private constant _ADDRESS_LENGTH = 20;\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\\\n */\\\\n function toString(uint256 value) internal pure returns (string memory) {\\\\n // Inspired by OraclizeAPI's implementation - MIT licence\\\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\\\n\\\\n if (value == 0) {\\\\n return \\\\\\\"0\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 digits;\\\\n while (temp != 0) {\\\\n digits++;\\\\n temp /= 10;\\\\n }\\\\n bytes memory buffer = new bytes(digits);\\\\n while (value != 0) {\\\\n digits -= 1;\\\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\\\n value /= 10;\\\\n }\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(uint256 value) internal pure returns (string memory) {\\\\n if (value == 0) {\\\\n return \\\\\\\"0x00\\\\\\\";\\\\n }\\\\n uint256 temp = value;\\\\n uint256 length = 0;\\\\n while (temp != 0) {\\\\n length++;\\\\n temp >>= 8;\\\\n }\\\\n return toHexString(value, length);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\\\n */\\\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\\\n bytes memory buffer = new bytes(2 * length + 2);\\\\n buffer[0] = \\\\\\\"0\\\\\\\";\\\\n buffer[1] = \\\\\\\"x\\\\\\\";\\\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\\\n value >>= 4;\\\\n }\\\\n require(value == 0, \\\\\\\"Strings: hex length insufficient\\\\\\\");\\\\n return string(buffer);\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\\\n */\\\\n function toHexString(address addr) internal pure returns (string memory) {\\\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../Strings.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\\\n *\\\\n * These functions can be used to verify that a message was signed by the holder\\\\n * of the private keys of a given address.\\\\n */\\\\nlibrary ECDSA {\\\\n enum RecoverError {\\\\n NoError,\\\\n InvalidSignature,\\\\n InvalidSignatureLength,\\\\n InvalidSignatureS,\\\\n InvalidSignatureV\\\\n }\\\\n\\\\n function _throwError(RecoverError error) private pure {\\\\n if (error == RecoverError.NoError) {\\\\n return; // no error: do nothing\\\\n } else if (error == RecoverError.InvalidSignature) {\\\\n revert(\\\\\\\"ECDSA: invalid signature\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureLength) {\\\\n revert(\\\\\\\"ECDSA: invalid signature length\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureS) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 's' value\\\\\\\");\\\\n } else if (error == RecoverError.InvalidSignatureV) {\\\\n revert(\\\\\\\"ECDSA: invalid signature 'v' value\\\\\\\");\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature` or error string. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n *\\\\n * Documentation for signature generation:\\\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\\\n if (signature.length == 65) {\\\\n bytes32 r;\\\\n bytes32 s;\\\\n uint8 v;\\\\n // ecrecover takes the signature parameters, and the only way to get them\\\\n // currently is to use assembly.\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n r := mload(add(signature, 0x20))\\\\n s := mload(add(signature, 0x40))\\\\n v := byte(0, mload(add(signature, 0x60)))\\\\n }\\\\n return tryRecover(hash, v, r, s);\\\\n } else {\\\\n return (address(0), RecoverError.InvalidSignatureLength);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the address that signed a hashed message (`hash`) with\\\\n * `signature`. This address can then be used for verification purposes.\\\\n *\\\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\\\n * this function rejects them by requiring the `s` value to be in the lower\\\\n * half order, and the `v` value to be either 27 or 28.\\\\n *\\\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\\\n * verification to be secure: it is possible to craft signatures that\\\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\\\n * this is by receiving a hash of the original message (which may otherwise\\\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\\\n */\\\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\\\n *\\\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address, RecoverError) {\\\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\\\n return tryRecover(hash, v, r, s);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\\\n *\\\\n * _Available since v4.2._\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n bytes32 r,\\\\n bytes32 vs\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n *\\\\n * _Available since v4.3._\\\\n */\\\\n function tryRecover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address, RecoverError) {\\\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\\\n // the valid range for s in (301): 0 < s < secp256k1n \\\\u00f7 2 + 1, and for v in (302): v \\\\u2208 {27, 28}. Most\\\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\\\n //\\\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\\\n // these malleable signatures as well.\\\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\\\n return (address(0), RecoverError.InvalidSignatureS);\\\\n }\\\\n if (v != 27 && v != 28) {\\\\n return (address(0), RecoverError.InvalidSignatureV);\\\\n }\\\\n\\\\n // If the signature is valid (and not malleable), return the signer address\\\\n address signer = ecrecover(hash, v, r, s);\\\\n if (signer == address(0)) {\\\\n return (address(0), RecoverError.InvalidSignature);\\\\n }\\\\n\\\\n return (signer, RecoverError.NoError);\\\\n }\\\\n\\\\n /**\\\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\\\n * `r` and `s` signature fields separately.\\\\n */\\\\n function recover(\\\\n bytes32 hash,\\\\n uint8 v,\\\\n bytes32 r,\\\\n bytes32 s\\\\n ) internal pure returns (address) {\\\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\\\n _throwError(error);\\\\n return recovered;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\\\n // 32 is the length in bytes of hash,\\\\n // enforced by the type signature above\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n32\\\\\\\", hash));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\\\n * produces hash corresponding to the one signed with the\\\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\\\n * JSON-RPC method as part of EIP-191.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19Ethereum Signed Message:\\\\\\\\n\\\\\\\", Strings.toString(s.length), s));\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\\\n * to the one signed with the\\\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\\\n * JSON-RPC method as part of EIP-712.\\\\n *\\\\n * See {recover}.\\\\n */\\\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\\\n return keccak256(abi.encodePacked(\\\\\\\"\\\\\\\\x19\\\\\\\\x01\\\\\\\", domainSeparator, structHash));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xdb7f5c28fc61cda0bd8ab60ce288e206b791643bcd3ba464a70cbec18895a2f5\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @dev Implementation of the {IERC165} interface.\\\\n *\\\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\\\n * for the additional interface id that will be supported. For example:\\\\n *\\\\n * ```solidity\\\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\\\n * }\\\\n * ```\\\\n *\\\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\\\n */\\\\nabstract contract ERC165 is IERC165 {\\\\n /**\\\\n * @dev See {IERC165-supportsInterface}.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\\\n return interfaceId == type(IERC165).interfaceId;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\n/**\\\\n * @dev Interface of the ERC165 standard, as defined in the\\\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\\\n *\\\\n * Implementers can declare support of contract interfaces, which can then be\\\\n * queried by others ({ERC165Checker}).\\\\n *\\\\n * For an implementation, see {ERC165}.\\\\n */\\\\ninterface IERC165 {\\\\n /**\\\\n * @dev Returns true if this contract implements the interface defined by\\\\n * `interfaceId`. See the corresponding\\\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\\\n * to learn more about how these ids are created.\\\\n *\\\\n * This function call must use less than 30 000 gas.\\\\n */\\\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\\\n\\\\npragma solidity ^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 *\\\\n * [WARNING]\\\\n * ====\\\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\\\n *\\\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\\\n * ====\\\\n */\\\\nlibrary EnumerableSet {\\\\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 // 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) {\\\\n // 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 if (lastIndex != toDeleteIndex) {\\\\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] = valueIndex; // Replace lastValue's index to valueIndex\\\\n }\\\\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 return set._values[index];\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\\\n return set._values;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\\\n return _values(set._inner);\\\\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 * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n address[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\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 /**\\\\n * @dev Return the entire set in an array\\\\n *\\\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\\\n */\\\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\\\n bytes32[] memory store = _values(set._inner);\\\\n uint256[] memory result;\\\\n\\\\n /// @solidity memory-safe-assembly\\\\n assembly {\\\\n result := store\\\\n }\\\\n\\\\n return result;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x5050943b32b6a8f282573d166b2e9d87ab7eb4dbba4ab6acf36ecb54fe6995e4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/MinimumWithdrawal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./collections/HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../libraries/Transfer.sol\\\\\\\";\\\\n\\\\nabstract contract MinimumWithdrawal is HasProxyAdmin {\\\\n /// @dev Throwed when the ERC20 withdrawal quantity is less than the minimum threshold.\\\\n error ErrQueryForTooSmallQuantity();\\\\n\\\\n /// @dev Emitted when the minimum thresholds are updated\\\\n event MinimumThresholdsUpdated(address[] tokens, uint256[] threshold);\\\\n\\\\n /// @dev Mapping from mainchain token address => minimum thresholds\\\\n mapping(address mainchainToken => uint256) public minimumThreshold;\\\\n\\\\n /**\\\\n * @dev This empty reserved space is put in place to allow future versions to add new\\\\n * variables without shifting down storage in the inheritance chain.\\\\n */\\\\n uint256[50] private ______gap;\\\\n\\\\n /**\\\\n * @dev Sets the minimum thresholds to withdraw.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `MinimumThresholdsUpdated` event.\\\\n *\\\\n */\\\\n function setMinimumThresholds(address[] calldata mainchainTokens_, uint256[] calldata thresholds_) external virtual onlyProxyAdmin {\\\\n if (mainchainTokens_.length == 0) revert ErrEmptyArray();\\\\n _setMinimumThresholds(mainchainTokens_, thresholds_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets minimum thresholds.\\\\n *\\\\n * Requirements:\\\\n * - The array lengths are equal.\\\\n *\\\\n * Emits the `MinimumThresholdsUpdated` event.\\\\n *\\\\n */\\\\n function _setMinimumThresholds(address[] calldata mainchainTokens_, uint256[] calldata thresholds_) internal virtual {\\\\n if (mainchainTokens_.length != thresholds_.length) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n for (uint256 i; i < mainchainTokens_.length; ++i) {\\\\n minimumThreshold[mainchainTokens_[i]] = thresholds_[i];\\\\n }\\\\n emit MinimumThresholdsUpdated(mainchainTokens_, thresholds_);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks whether the request is larger than or equal to the minimum threshold.\\\\n */\\\\n function _checkWithdrawal(Transfer.Request calldata _request) internal view {\\\\n if (_request.info.erc == TokenStandard.ERC20 && _request.info.quantity < minimumThreshold[_request.tokenAddr]) {\\\\n revert ErrQueryForTooSmallQuantity();\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x25292436a877420bbd07418ccc4c8923b08d10625deed0b3fbdb6d9fc969a48d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/TransparentUpgradeableProxyV2.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\\\\\\\";\\\\n\\\\ncontract TransparentUpgradeableProxyV2 is TransparentUpgradeableProxy {\\\\n constructor(address _logic, address admin_, bytes memory _data) payable TransparentUpgradeableProxy(_logic, admin_, _data) { }\\\\n\\\\n /**\\\\n * @dev Calls a function from the current implementation as specified by `_data`, which should be an encoded function call.\\\\n *\\\\n * Requirements:\\\\n * - Only the admin can call this function.\\\\n *\\\\n * Note: The proxy admin is not allowed to interact with the proxy logic through the fallback function to avoid\\\\n * triggering some unexpected logic. This is to allow the administrator to explicitly call the proxy, please consider\\\\n * reviewing the encoded data `_data` and the method which is called before using this.\\\\n *\\\\n */\\\\n function functionDelegateCall(bytes memory _data) public payable ifAdmin {\\\\n address _addr = _implementation();\\\\n assembly {\\\\n let _result := delegatecall(gas(), _addr, add(_data, 32), mload(_data), 0, 0)\\\\n returndatacopy(0, 0, returndatasize())\\\\n switch _result\\\\n case 0 { revert(0, returndatasize()) }\\\\n default { return(0, returndatasize()) }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x45fc7b71d09da99414b977a56e586b3604670d865e5f36f395d5c98bc4ba64af\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback, BridgeManagerCallbackRegister } from \\\\\\\"./BridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IHasContracts, HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\n\\\\nimport { IBridgeManager } from \\\\\\\"../../interfaces/bridge/IBridgeManager.sol\\\\\\\";\\\\nimport { AddressArrayUtils } from \\\\\\\"../../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"../../utils/RoleAccess.sol\\\\\\\";\\\\nimport { TUint256Slot } from \\\\\\\"../../types/Types.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"./BridgeManagerQuorum.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManager is IBridgeManager, BridgeManagerQuorum, BridgeManagerCallbackRegister {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n struct BridgeManagerStorage {\\\\n /// @notice List of the governors.\\\\n /// @dev We do not use EnumerableSet here to maintain identical order of `governors` and `operators`. If `.contains` is needed, use the corresponding weight mapping.\\\\n address[] _governors;\\\\n address[] _operators;\\\\n /// @dev Mapping from address to the governor weight\\\\n mapping(address governor => uint96 weight) _governorWeight;\\\\n /// @dev Mapping from address to the operator weight. This must always be identical `_governorWeight`.\\\\n mapping(address operator => uint96 weight) _operatorWeight;\\\\n /// @dev Total weight of all governors / operators.\\\\n uint256 _totalWeight;\\\\n /// @dev The minimum number of governors that must exist in the contract, to avoid the contract become non-accessible.\\\\n uint256 _minRequiredGovernor;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerStorageLocation\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerStorageLocation = 0xc648703095712c0419b6431ae642c061f0a105ac2d7c3d9604061ef4ebc38300;\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n bytes32 public DOMAIN_SEPARATOR;\\\\n\\\\n modifier onlyGovernor() virtual {\\\\n _requireGovernor(msg.sender);\\\\n _;\\\\n }\\\\n\\\\n constructor() {\\\\n _disableInitializers();\\\\n }\\\\n\\\\n function __BridgeManager_init(\\\\n uint256 num,\\\\n uint256 denom,\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory callbackRegisters,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n __BridgeManagerQuorum_init_unchained(num, denom);\\\\n __BridgeManagerCallbackRegister_init_unchained(callbackRegisters);\\\\n __BridgeManager_init_unchained(roninChainId, bridgeContract, bridgeOperators, governors, voteWeights);\\\\n }\\\\n\\\\n function __BridgeManager_init_unchained(\\\\n uint256 roninChainId,\\\\n address bridgeContract,\\\\n address[] memory bridgeOperators,\\\\n address[] memory governors,\\\\n uint96[] memory voteWeights\\\\n ) internal onlyInitializing {\\\\n _setContract(ContractType.BRIDGE, bridgeContract);\\\\n\\\\n DOMAIN_SEPARATOR = keccak256(\\\\n abi.encode(\\\\n keccak256(\\\\\\\"EIP712Domain(string name,string version,bytes32 salt)\\\\\\\"),\\\\n keccak256(\\\\\\\"BridgeManager\\\\\\\"), // name hash\\\\n keccak256(\\\\\\\"3\\\\\\\"), // version hash\\\\n keccak256(abi.encode(\\\\\\\"BRIDGE_MANAGER\\\\\\\", roninChainId)) // salt\\\\n )\\\\n );\\\\n\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n _setMinRequiredGovernor(3);\\\\n }\\\\n\\\\n function _getBridgeManagerStorage() private pure returns (BridgeManagerStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerStorageLocation\\\\n }\\\\n }\\\\n\\\\n // ===================== CONFIG ========================\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external override onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function setMinRequiredGovernor(uint min) external override onlyProxyAdmin {\\\\n _setMinRequiredGovernor(min);\\\\n }\\\\n\\\\n function _setMinRequiredGovernor(uint min) internal {\\\\n if (min < 3) revert ErrInvalidInput();\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n $._minRequiredGovernor = min;\\\\n emit MinRequiredGovernorUpdated(min);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the caller has governor role access.\\\\n */\\\\n function _requireGovernor(address addr) internal view {\\\\n if (_getGovernorWeight(addr) == 0) {\\\\n revert ErrUnauthorized(msg.sig, RoleAccess.GOVERNOR);\\\\n }\\\\n }\\\\n\\\\n // ===================== WEIGHTS METHOD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getTotalWeight() public view returns (uint256) {\\\\n return _totalWeight();\\\\n }\\\\n\\\\n function _totalWeight() internal view override returns (uint256) {\\\\n return _getBridgeManagerStorage()._totalWeight;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights) {\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weights of a given array of governors.\\\\n */\\\\n function _getGovernorWeights(address[] memory governors) internal view returns (uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n weights = new uint96[](governors.length);\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n weights[i] = $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96 weight) {\\\\n weight = _getGovernorWeight(governor);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the vote weight of a specific governor.\\\\n */\\\\n function _getGovernorWeight(address governor) internal view returns (uint96) {\\\\n return _getBridgeManagerStorage()._governorWeight[governor];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view nonDuplicate(governors) returns (uint256 sum) {\\\\n sum = _sumGovernorsWeight(governors);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to calculate the sum of vote weights for a given array of governors.\\\\n * @param governors The non-duplicated input.\\\\n */\\\\n function _sumGovernorsWeight(address[] memory governors) internal view nonDuplicate(governors) returns (uint256 sum) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n for (uint256 i; i < governors.length; i++) {\\\\n sum += $._governorWeight[governors[i]];\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n return $._operatorWeight[bridgeOperator];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function minimumVoteWeight() public view virtual returns (uint256) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n (uint256 numerator, uint256 denominator) = getThreshold();\\\\n return (numerator * $._totalWeight + denominator - 1) / denominator;\\\\n }\\\\n\\\\n // ===================== MANAGER CRUD ========================\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _addBridgeOperators(voteWeights, governors, bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external onlyProxyAdmin {\\\\n _removeBridgeOperators(bridgeOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to add bridge operators.\\\\n *\\\\n * This function adds the specified `bridgeOperators` to the bridge operator set and establishes the associated mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to add bridge operators.\\\\n * - The lengths of `voteWeights`, `governors`, and `bridgeOperators` arrays must be equal.\\\\n *\\\\n * @return addeds An array of boolean values indicating whether each bridge operator was successfully added.\\\\n */\\\\n function _addBridgeOperators(\\\\n uint96[] memory voteWeights,\\\\n address[] memory newGovernors,\\\\n address[] memory newOperators\\\\n ) internal nonDuplicate(newGovernors.extend(newOperators)) returns (bool[] memory addeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = newOperators.length;\\\\n if (!(length == voteWeights.length && length == newGovernors.length)) revert ErrLengthMismatch(msg.sig);\\\\n addeds = new bool[](length);\\\\n\\\\n // simply skip add operations if inputs are empty.\\\\n if (length == 0) return addeds;\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint96 iVoteWeight;\\\\n uint256 accumulatedWeight;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iGovernor = newGovernors[i];\\\\n iOperator = newOperators[i];\\\\n iVoteWeight = voteWeights[i];\\\\n\\\\n // Check non-zero inputs\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n if (iVoteWeight == 0) revert ErrInvalidVoteWeight(msg.sig);\\\\n\\\\n // Check not yet added operators\\\\n addeds[i] = ($._governorWeight[iGovernor] + $._governorWeight[iOperator] + $._operatorWeight[iOperator] + $._operatorWeight[iGovernor]) == 0;\\\\n\\\\n // Only add the valid operator\\\\n if (addeds[i]) {\\\\n // Add governor to list, update governor weight\\\\n $._governors.push(iGovernor);\\\\n $._governorWeight[iGovernor] = iVoteWeight;\\\\n\\\\n // Add operator to list, update governor weight\\\\n $._operators.push(iOperator);\\\\n $._operatorWeight[iOperator] = iVoteWeight;\\\\n\\\\n accumulatedWeight += iVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight += accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsAdded.selector, abi.encode(newOperators, voteWeights, addeds));\\\\n\\\\n emit BridgeOperatorsAdded(addeds, voteWeights, newGovernors, newOperators);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to remove bridge operators.\\\\n *\\\\n * This function removes the specified `bridgeOperators` from the bridge operator set and related mappings.\\\\n *\\\\n * Requirements:\\\\n * - The caller must have the necessary permission to remove bridge operators.\\\\n *\\\\n * @param removingOperators An array of addresses representing the bridge operators to be removed.\\\\n * @return removeds An array of boolean values indicating whether each bridge operator was successfully removed.\\\\n */\\\\n function _removeBridgeOperators(address[] memory removingOperators) internal nonDuplicate(removingOperators) returns (bool[] memory removeds) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n uint256 length = removingOperators.length;\\\\n removeds = new bool[](length);\\\\n\\\\n // simply skip remove operations if inputs are empty.\\\\n if (length == 0) return removeds;\\\\n if ($._governors.length - length < $._minRequiredGovernor) {\\\\n revert ErrBelowMinRequiredGovernors();\\\\n }\\\\n\\\\n address iGovernor;\\\\n address iOperator;\\\\n uint256 accumulatedWeight;\\\\n uint idx;\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n iOperator = removingOperators[i];\\\\n\\\\n // Check non-zero inputs\\\\n (iGovernor, idx) = _getGovernorOf(iOperator);\\\\n _requireNonZeroAddress(iGovernor);\\\\n _requireNonZeroAddress(iOperator);\\\\n\\\\n // Check existing operators\\\\n removeds[i] = $._governorWeight[iGovernor] > 0 && $._operatorWeight[iOperator] > 0;\\\\n\\\\n // Only remove the valid operator\\\\n if (removeds[i]) {\\\\n uint removingVoteWeight = $._governorWeight[iGovernor];\\\\n\\\\n // Remove governor from list, update governor weight\\\\n uint lastIdx = $._governors.length - 1;\\\\n $._governors[idx] = $._governors[lastIdx];\\\\n $._governors.pop();\\\\n delete $._governorWeight[iGovernor];\\\\n\\\\n // Remove operator from list, update operator weight\\\\n $._operators[idx] = $._operators[lastIdx];\\\\n $._operators.pop();\\\\n delete $._operatorWeight[iOperator];\\\\n\\\\n accumulatedWeight += removingVoteWeight;\\\\n }\\\\n }\\\\n\\\\n $._totalWeight -= accumulatedWeight;\\\\n\\\\n _notifyRegisters(IBridgeManagerCallback.onBridgeOperatorsRemoved.selector, abi.encode(removingOperators, removeds));\\\\n\\\\n emit BridgeOperatorsRemoved(removeds, removingOperators);\\\\n }\\\\n\\\\n function _findInArray(address[] storage $_array, address addr) internal view returns (bool found, uint idx) {\\\\n for (uint i; i < $_array.length; i++) {\\\\n if (addr == $_array[i]) {\\\\n return (true, i);\\\\n }\\\\n }\\\\n\\\\n return (false, type(uint256).max);\\\\n }\\\\n\\\\n // ================= MANAGER VIEW METHODS =============\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256) {\\\\n return _getBridgeManagerStorage()._operators.length;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n return $._operatorWeight[addr] > 0;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._operators;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernors() external view returns (address[] memory) {\\\\n return _getBridgeManagerStorage()._governors;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator) {\\\\n (bool found, uint idx) = _findInArray(_getBridgeManagerStorage()._governors, governor);\\\\n if (!found) revert ErrGovernorNotFound(governor);\\\\n\\\\n return _getBridgeManagerStorage()._operators[idx];\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor) {\\\\n (governor,) = _getGovernorOf(operator);\\\\n }\\\\n\\\\n function _getGovernorOf(address operator) internal view returns (address governor, uint idx) {\\\\n (bool found, uint foundId) = _findInArray(_getBridgeManagerStorage()._operators, operator);\\\\n if (!found) revert ErrOperatorNotFound(operator);\\\\n\\\\n return (_getBridgeManagerStorage()._governors[foundId], foundId);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManager\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights) {\\\\n BridgeManagerStorage storage $ = _getBridgeManagerStorage();\\\\n\\\\n governors = $._governors;\\\\n bridgeOperators = $._operators;\\\\n weights = _getGovernorWeights(governors);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa66d73d33f953f3262714999043f99fb7b7542d1d29c481e376d9ecd2b15b28b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { EnumerableSet } from \\\\\\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\\\\\";\\\\nimport { IBridgeManagerCallbackRegister } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\\\\\";\\\\nimport { IBridgeManagerCallback } from \\\\\\\"../../interfaces/bridge/IBridgeManagerCallback.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2, IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title BridgeManagerCallbackRegister\\\\n * @dev A contract that manages callback registrations and execution for a bridge.\\\\n */\\\\nabstract contract BridgeManagerCallbackRegister is IBridgeManagerCallbackRegister, IdentityGuard, Initializable, HasContracts {\\\\n using EnumerableSet for EnumerableSet.AddressSet;\\\\n\\\\n /**\\\\n * @dev Storage slot for the address set of callback registers.\\\\n * @dev Value is equal to keccak256(\\\\\\\"@ronin.dpos.gateway.BridgeAdmin.callbackRegisters.slot\\\\\\\") - 1.\\\\n */\\\\n bytes32 private constant CALLBACK_REGISTERS_SLOT = 0x5da136eb38f8d8e354915fc8a767c0dc81d49de5fb65d5477122a82ddd976240;\\\\n\\\\n function __BridgeManagerCallbackRegister_init_unchained(address[] memory callbackRegisters) internal onlyInitializing {\\\\n _registerCallbacks(callbackRegisters);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external onlyProxyAdmin {\\\\n _registerCallbacks(registers);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external onlyProxyAdmin nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n _callbackRegisters.remove(registers[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IBridgeManagerCallbackRegister\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers) {\\\\n registers = _getCallbackRegisters().values();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to register multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function _registerCallbacks(address[] memory registers) internal nonDuplicate(registers) {\\\\n EnumerableSet.AddressSet storage _callbackRegisters = _getCallbackRegisters();\\\\n address register;\\\\n bool regSuccess;\\\\n\\\\n for (uint256 i; i < registers.length; i++) {\\\\n register = registers[i];\\\\n\\\\n _requireHasCode(register);\\\\n _requireSupportsInterface(register, type(IBridgeManagerCallback).interfaceId);\\\\n\\\\n regSuccess = _callbackRegisters.add(register);\\\\n\\\\n emit CallbackRegistered(register, regSuccess);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Same as {_notifyRegistersUnsafe} but revert when there at least one failed internal call.\\\\n */\\\\n function _notifyRegisters(bytes4 callbackFnSig, bytes memory inputs) internal {\\\\n if (!_notifyRegistersUnsafe(callbackFnSig, inputs)) {\\\\n revert ErrExistOneInternalCallFailed(msg.sender, callbackFnSig, inputs);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to notify all registered callbacks with the provided function signature and data.\\\\n * @param callbackFnSig The function signature of the callback method.\\\\n * @param inputs The data to pass to the callback method.\\\\n * @return allSuccess Return true if all internal calls are success\\\\n */\\\\n function _notifyRegistersUnsafe(bytes4 callbackFnSig, bytes memory inputs) internal returns (bool allSuccess) {\\\\n allSuccess = true;\\\\n\\\\n address[] memory registers = _getCallbackRegisters().values();\\\\n uint256 length = registers.length;\\\\n if (length == 0) return allSuccess;\\\\n\\\\n bool[] memory successes = new bool[](length);\\\\n bytes[] memory returnDatas = new bytes[](length);\\\\n bytes memory callData = abi.encodePacked(callbackFnSig, inputs);\\\\n bytes memory proxyCallData = abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (callData));\\\\n\\\\n for (uint256 i; i < length; i++) {\\\\n // First, attempt to call normally\\\\n (successes[i], returnDatas[i]) = registers[i].call(callData);\\\\n\\\\n // If cannot call normally, attempt to call as the recipient is the proxy, and this caller is its admin.\\\\n if (!successes[i]) {\\\\n (successes[i], returnDatas[i]) = registers[i].call(proxyCallData);\\\\n allSuccess = allSuccess && successes[i];\\\\n }\\\\n }\\\\n\\\\n emit Notified(callData, registers, successes, returnDatas);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to retrieve the address set of callback registers.\\\\n * @return callbackRegisters The storage reference to the callback registers.\\\\n */\\\\n function _getCallbackRegisters() internal pure returns (EnumerableSet.AddressSet storage callbackRegisters) {\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n callbackRegisters.slot := CALLBACK_REGISTERS_SLOT\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xee1c849d6b50cda917d6c918a23116cc288488958f58ef215707204e7c2f847f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/bridge-operator-governance/BridgeManagerQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.23;\\\\n\\\\nimport { Initializable } from \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport { IQuorum } from \\\\\\\"../../interfaces/IQuorum.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { HasContracts } from \\\\\\\"../../extensions/collections/HasContracts.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract BridgeManagerQuorum is IQuorum, IdentityGuard, Initializable, HasContracts {\\\\n struct BridgeManagerQuorumStorage {\\\\n uint256 _nonce;\\\\n uint256 _numerator;\\\\n uint256 _denominator;\\\\n }\\\\n\\\\n // keccak256(abi.encode(uint256(keccak256(\\\\\\\"ronin.storage.BridgeManagerQuorumStorage\\\\\\\")) - 1)) & ~bytes32(uint256(0xff))\\\\n bytes32 private constant $$_BridgeManagerQuorumStorage = 0xf3019750f3837257cd40d215c9cc111e92586d2855a1e7e25d959613ed013f00;\\\\n\\\\n function __BridgeManagerQuorum_init_unchained(uint256 num, uint256 denom) internal onlyInitializing {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n $._nonce = 1;\\\\n\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n function _getBridgeManagerQuorumStorage() private pure returns (BridgeManagerQuorumStorage storage $) {\\\\n assembly {\\\\n $.slot := $$_BridgeManagerQuorumStorage\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function setThreshold(uint256 num, uint256 denom) external override onlyProxyAdmin {\\\\n _setThreshold(num, denom);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function getThreshold() public view virtual returns (uint256 num, uint256 denom) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n return ($._numerator, $._denominator);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IQuorum\\\\n */\\\\n function checkThreshold(uint256 voteWeight) external view virtual returns (bool) {\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n return voteWeight * $._denominator >= $._numerator * _totalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets threshold and returns the old one.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function _setThreshold(uint256 num, uint256 denom) internal virtual {\\\\n if (num > denom || denom <= 1) revert ErrInvalidThreshold(msg.sig);\\\\n\\\\n BridgeManagerQuorumStorage storage $ = _getBridgeManagerQuorumStorage();\\\\n\\\\n uint256 prevNum = $._numerator;\\\\n uint256 prevDenom = $._denominator;\\\\n\\\\n $._numerator = num;\\\\n $._denominator = denom;\\\\n\\\\n emit ThresholdUpdated($._nonce++, num, denom, prevNum, prevDenom);\\\\n }\\\\n\\\\n function _totalWeight() internal view virtual returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd49face0efa89eac09d2d6a5eb69598fd706ba1aac8d431b22212643a507b74e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { HasProxyAdmin } from \\\\\\\"./HasProxyAdmin.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/collections/IHasContracts.sol\\\\\\\";\\\\nimport { IdentityGuard } from \\\\\\\"../../utils/IdentityGuard.sol\\\\\\\";\\\\nimport { ErrUnexpectedInternalCall } from \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title HasContracts\\\\n * @dev A contract that provides functionality to manage multiple contracts with different roles.\\\\n */\\\\nabstract contract HasContracts is HasProxyAdmin, IHasContracts, IdentityGuard {\\\\n /// @dev value is equal to keccak256(\\\\\\\"@ronin.dpos.collections.HasContracts.slot\\\\\\\") - 1\\\\n bytes32 private constant _STORAGE_SLOT = 0xdea3103d22025c269050bea94c0c84688877f12fa22b7e6d2d5d78a9a49aa1cb;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict access to functions only to contracts with a specific role.\\\\n * @param contractType The contract type that allowed to call\\\\n */\\\\n modifier onlyContract(ContractType contractType) virtual {\\\\n _requireContract(contractType);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function setContract(ContractType contractType, address addr) external virtual onlyProxyAdmin {\\\\n _requireHasCode(addr);\\\\n _setContract(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @inheritdoc IHasContracts\\\\n */\\\\n function getContract(ContractType contractType) public view returns (address contract_) {\\\\n contract_ = _getContractMap()[uint8(contractType)];\\\\n if (contract_ == address(0)) revert ErrContractTypeNotFound(contractType);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to set the address of a contract with a specific role.\\\\n * @param contractType The contract type of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function _setContract(ContractType contractType, address addr) internal virtual {\\\\n _getContractMap()[uint8(contractType)] = addr;\\\\n emit ContractUpdated(contractType, addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to access the mapping of contract addresses with roles.\\\\n * @return contracts_ The mapping of contract addresses with roles.\\\\n */\\\\n function _getContractMap() private pure returns (mapping(uint8 => address) storage contracts_) {\\\\n assembly {\\\\n contracts_.slot := _STORAGE_SLOT\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if the calling contract has a specific role.\\\\n * @param contractType The contract type that the calling contract must have.\\\\n * @dev Throws an error if the calling contract does not have the specified role.\\\\n */\\\\n function _requireContract(ContractType contractType) private view {\\\\n if (msg.sender != getContract(contractType)) {\\\\n revert ErrUnexpectedInternalCall(msg.sig, contractType, msg.sender);\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xf7dbefa31230e6e4bd319f02d94893cbfd07ee12a0e016f5fadc57660df01891\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/collections/HasProxyAdmin.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/StorageSlot.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract HasProxyAdmin {\\\\n // bytes32(uint256(keccak256(\\\\\\\"eip1967.proxy.admin\\\\\\\")) - 1));\\\\n bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\\\n\\\\n modifier onlyProxyAdmin() {\\\\n _requireProxyAdmin();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns proxy admin.\\\\n */\\\\n function _getProxyAdmin() internal view virtual returns (address) {\\\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\\\n }\\\\n\\\\n function _requireProxyAdmin() internal view {\\\\n if (msg.sender != _getProxyAdmin()) revert ErrUnauthorized(msg.sig, RoleAccess.ADMIN);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xad3db02c99a960b60151f2ad45eed46073d14fe1ed861f496c7aeefacbbc528e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/CoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/proxy/utils/Initializable.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/Ballot.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/ChainTypeConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/SignatureConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\n\\\\nabstract contract CoreGovernance is Initializable, SignatureConsumer, VoteStatusConsumer, ChainTypeConsumer {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to interact with a finalized vote.\\\\n */\\\\n error ErrVoteIsFinalized();\\\\n\\\\n /**\\\\n * @dev Error thrown when the current proposal is not completed.\\\\n */\\\\n error ErrCurrentProposalIsNotCompleted();\\\\n\\\\n struct ProposalVote {\\\\n VoteStatus status;\\\\n bytes32 hash;\\\\n uint256 againstVoteWeight; // Total weight of against votes\\\\n uint256 forVoteWeight; // Total weight of for votes\\\\n address[] forVoteds; // Array of addresses voting for\\\\n address[] againstVoteds; // Array of addresses voting against\\\\n uint256 expiryTimestamp;\\\\n mapping(address => Signature) sig;\\\\n mapping(address => bool) voted;\\\\n }\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event ProposalCreated(uint256 indexed chainId, uint256 indexed round, bytes32 indexed proposalHash, Proposal.ProposalDetail proposal, address creator);\\\\n /// @dev Emitted when the proposal is voted\\\\n event ProposalVoted(bytes32 indexed proposalHash, address indexed voter, Ballot.VoteType support, uint256 weight);\\\\n /// @dev Emitted when the proposal is approved\\\\n event ProposalApproved(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is reject\\\\n event ProposalRejected(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the vote is expired\\\\n event ProposalExpired(bytes32 indexed proposalHash);\\\\n /// @dev Emitted when the proposal is executed\\\\n event ProposalExecuted(bytes32 indexed proposalHash, bool[] successCalls, bytes[] returnDatas);\\\\n /// @dev Emitted when the proposal expiry duration is changed.\\\\n event ProposalExpiryDurationChanged(uint256 indexed duration);\\\\n\\\\n /// @dev Mapping from chain id => vote round\\\\n /// @notice chain id = 0 for global proposal\\\\n mapping(uint256 => uint256) public round;\\\\n /// @dev Mapping from chain id => vote round => proposal vote\\\\n mapping(uint256 => mapping(uint256 => ProposalVote)) public vote;\\\\n\\\\n uint256 internal _proposalExpiryDuration;\\\\n\\\\n function __CoreGovernance_init(uint256 expiryDuration) internal onlyInitializing {\\\\n __CoreGovernance_init_unchained(expiryDuration);\\\\n }\\\\n\\\\n function __CoreGovernance_init_unchained(uint256 expiryDuration) internal onlyInitializing {\\\\n _setProposalExpiryDuration(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Creates new voting round by calculating the `_round` number of chain `_chainId`.\\\\n * Increases the `_round` number if the previous one is not expired. Delete the previous proposal\\\\n * if it is expired and not increase the `_round`.\\\\n */\\\\n function _createVotingRound(uint256 _chainId) internal returns (uint256 _round) {\\\\n _round = round[_chainId];\\\\n // Skip checking for the first ever round\\\\n if (_round == 0) {\\\\n _round = round[_chainId] = 1;\\\\n } else {\\\\n ProposalVote storage _latestProposalVote = vote[_chainId][_round];\\\\n bool _isExpired = _tryDeleteExpiredVotingRound(_latestProposalVote);\\\\n // Skip increasing round number if the latest round is expired, allow the vote to be overridden\\\\n if (!_isExpired) {\\\\n if (_latestProposalVote.status == VoteStatus.Pending) revert ErrCurrentProposalIsNotCompleted();\\\\n unchecked {\\\\n _round = ++round[_chainId];\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Saves new round voting for the proposal `_proposalHash` of chain `_chainId`.\\\\n */\\\\n function _saveVotingRound(ProposalVote storage _vote, bytes32 _proposalHash, uint256 _expiryTimestamp) internal {\\\\n _vote.hash = _proposalHash;\\\\n _vote.expiryTimestamp = _expiryTimestamp;\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The chain id is not equal to 0.\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `ProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeProposalStruct(Proposal.ProposalDetail memory proposal, address creator) internal virtual returns (uint256 round_) {\\\\n uint256 chainId = proposal.chainId;\\\\n if (chainId == 0) revert ErrInvalidChainId(msg.sig, 0, block.chainid);\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n round_ = _createVotingRound(chainId);\\\\n _saveVotingRound(vote[chainId][round_], proposalHash, proposal.expiryTimestamp);\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit ProposalCreated(chainId, round_, proposalHash, proposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for the proposal with data and returns whether the voting is done.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the round.\\\\n * - The vote is not finalized.\\\\n * - The voter has not voted for the round.\\\\n *\\\\n * Emits the `ProposalVoted` event. Emits the `ProposalApproved`, `ProposalExecuted` or `ProposalRejected` once the\\\\n * proposal is approved, executed or rejected.\\\\n *\\\\n */\\\\n function _castVote(\\\\n Proposal.ProposalDetail memory proposal,\\\\n Ballot.VoteType support,\\\\n uint256 minimumForVoteWeight,\\\\n uint256 minimumAgainstVoteWeight,\\\\n address voter,\\\\n Signature memory signature,\\\\n uint256 voterWeight\\\\n ) internal virtual returns (bool done) {\\\\n uint256 chainId = proposal.chainId;\\\\n uint256 round_ = proposal.nonce;\\\\n ProposalVote storage _vote = vote[chainId][round_];\\\\n\\\\n if (_tryDeleteExpiredVotingRound(_vote)) {\\\\n return true;\\\\n }\\\\n\\\\n if (round[proposal.chainId] != round_) revert ErrInvalidProposalNonce(msg.sig);\\\\n if (_vote.status != VoteStatus.Pending) revert ErrVoteIsFinalized();\\\\n if (_voted(_vote, voter)) revert ErrAlreadyVoted(voter);\\\\n\\\\n _vote.voted[voter] = true;\\\\n // Stores the signature if it is not empty\\\\n if (signature.r > 0 || signature.s > 0 || signature.v > 0) {\\\\n _vote.sig[voter] = signature;\\\\n }\\\\n emit ProposalVoted(_vote.hash, voter, support, voterWeight);\\\\n\\\\n uint256 _forVoteWeight;\\\\n uint256 _againstVoteWeight;\\\\n if (support == Ballot.VoteType.For) {\\\\n _vote.forVoteds.push(voter);\\\\n _forVoteWeight = _vote.forVoteWeight += voterWeight;\\\\n } else if (support == Ballot.VoteType.Against) {\\\\n _vote.againstVoteds.push(voter);\\\\n _againstVoteWeight = _vote.againstVoteWeight += voterWeight;\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_forVoteWeight >= minimumForVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Approved;\\\\n emit ProposalApproved(_vote.hash);\\\\n if (proposal.isAutoExecute()) {\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n } else if (_againstVoteWeight >= minimumAgainstVoteWeight) {\\\\n done = true;\\\\n _vote.status = VoteStatus.Rejected;\\\\n emit ProposalRejected(_vote.hash);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev The specified executor executes the proposal on an approved proposal.\\\\n */\\\\n function _executeWithCaller(Proposal.ProposalDetail memory proposal, address caller) internal {\\\\n bytes32 proposalHash = proposal.hash();\\\\n ProposalVote storage _vote = vote[proposal.chainId][proposal.nonce];\\\\n\\\\n if (_vote.hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, _vote.hash);\\\\n }\\\\n\\\\n if (_vote.status != VoteStatus.Approved) revert ErrProposalNotApproved();\\\\n if (caller != proposal.executor) revert ErrInvalidExecutor();\\\\n\\\\n _tryExecute(_vote, proposal);\\\\n }\\\\n\\\\n /**\\\\n * @dev When the contract is on Ronin chain, checks whether the proposal is expired and delete it if is expired.\\\\n *\\\\n * Emits the event `ProposalExpired` if the vote is expired.\\\\n *\\\\n * Note: This function assumes the vote `_proposalVote` is already created, consider verifying the vote's existence\\\\n * before or it will emit an unexpected event of `ProposalExpired`.\\\\n */\\\\n function _tryDeleteExpiredVotingRound(ProposalVote storage proposalVote) internal returns (bool isExpired) {\\\\n isExpired = _getChainType() == ChainType.RoninChain && proposalVote.status == VoteStatus.Pending && proposalVote.expiryTimestamp <= block.timestamp;\\\\n\\\\n if (isExpired) {\\\\n emit ProposalExpired(proposalVote.hash);\\\\n\\\\n for (uint256 _i; _i < proposalVote.forVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.forVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.forVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < proposalVote.againstVoteds.length;) {\\\\n delete proposalVote.voted[proposalVote.againstVoteds[_i]];\\\\n delete proposalVote.sig[proposalVote.againstVoteds[_i]];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n delete proposalVote.status;\\\\n delete proposalVote.hash;\\\\n delete proposalVote.againstVoteWeight;\\\\n delete proposalVote.forVoteWeight;\\\\n delete proposalVote.forVoteds;\\\\n delete proposalVote.againstVoteds;\\\\n delete proposalVote.expiryTimestamp;\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal and update the vote status once the proposal is executable.\\\\n */\\\\n function _tryExecute(ProposalVote storage vote_, Proposal.ProposalDetail memory proposal) internal {\\\\n if (proposal.executable()) {\\\\n vote_.status = VoteStatus.Executed;\\\\n (bool[] memory _successCalls, bytes[] memory _returnDatas) = proposal.execute();\\\\n emit ProposalExecuted(vote_.hash, _successCalls, _returnDatas);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Sets the expiry duration for a new proposal.\\\\n */\\\\n function _setProposalExpiryDuration(uint256 expiryDuration) internal {\\\\n _proposalExpiryDuration = expiryDuration;\\\\n emit ProposalExpiryDurationChanged(expiryDuration);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter casted for the proposal.\\\\n */\\\\n function _voted(ProposalVote storage vote_, address voter) internal view returns (bool) {\\\\n return vote_.voted[voter];\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns total weight from validators.\\\\n */\\\\n function _getTotalWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns minimum vote to pass a proposal.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns current context is running on whether Ronin chain or on mainchain.\\\\n */\\\\n function _getChainType() internal view virtual returns (ChainType);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa8dfef02fbfbda8ec1cc681a59719d1d570fb8b652f6775b7d9af9c3e32fed26\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/GlobalCoreGovernance.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../../libraries/GlobalProposal.sol\\\\\\\";\\\\nimport \\\\\\\"./CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalCoreGovernance is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n mapping(GlobalProposal.TargetOption => address) internal _targetOptionsMap;\\\\n\\\\n /// @dev Emitted when a proposal is created\\\\n event GlobalProposalCreated(\\\\n uint256 indexed round,\\\\n bytes32 indexed proposalHash,\\\\n Proposal.ProposalDetail proposal,\\\\n bytes32 globalProposalHash,\\\\n GlobalProposal.GlobalProposalDetail globalProposal,\\\\n address creator\\\\n );\\\\n\\\\n /// @dev Emitted when the target options are updated\\\\n event TargetOptionUpdated(GlobalProposal.TargetOption indexed targetOption, address indexed addr);\\\\n\\\\n function __GlobalCoreGovernance_init(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n __GlobalCoreGovernance_init_unchained(targetOptions, addrs);\\\\n }\\\\n\\\\n function __GlobalCoreGovernance_init_unchained(GlobalProposal.TargetOption[] memory targetOptions, address[] memory addrs) internal onlyInitializing {\\\\n _updateTargetOption(GlobalProposal.TargetOption.BridgeManager, address(this));\\\\n _updateManyTargetOption(targetOptions, addrs);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes for a global proposal.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n address executor,\\\\n uint256[] memory values,\\\\n bytes[] memory calldatas,\\\\n uint256[] memory gasAmounts,\\\\n address creator\\\\n ) internal virtual {\\\\n uint256 round_ = _createVotingRound(0);\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal =\\\\n GlobalProposal.GlobalProposalDetail(round_, expiryTimestamp, executor, targetOptions, values, calldatas, gasAmounts);\\\\n Proposal.ProposalDetail memory proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n _saveVotingRound(vote[0][round_], proposalHash, expiryTimestamp);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes global proposal struct.\\\\n *\\\\n * Requirements:\\\\n * - The proposal nonce is equal to the new round.\\\\n *\\\\n * Emits the `GlobalProposalCreated` event.\\\\n *\\\\n */\\\\n function _proposeGlobalStruct(\\\\n GlobalProposal.GlobalProposalDetail memory globalProposal,\\\\n address creator\\\\n ) internal virtual returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n proposal.validate(_proposalExpiryDuration);\\\\n\\\\n bytes32 proposalHash = proposal.hash();\\\\n uint256 round_ = _createVotingRound(0);\\\\n _saveVotingRound(vote[0][round_], proposalHash, globalProposal.expiryTimestamp);\\\\n\\\\n if (round_ != proposal.nonce) revert ErrInvalidProposalNonce(msg.sig);\\\\n emit GlobalProposalCreated(round_, proposalHash, proposal, globalProposal.hash(), globalProposal, creator);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns corresponding address of target options. Return address(0) on non-existent target.\\\\n */\\\\n function resolveTargets(GlobalProposal.TargetOption[] calldata targetOptions) external view returns (address[] memory targets) {\\\\n return _resolveTargets({ targetOptions: targetOptions, strict: false });\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal helper of {resolveTargets}.\\\\n *\\\\n * @param strict When the param is set to `true`, revert on non-existent target.\\\\n */\\\\n function _resolveTargets(GlobalProposal.TargetOption[] memory targetOptions, bool strict) internal view returns (address[] memory targets) {\\\\n targets = new address[](targetOptions.length);\\\\n\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n targets[i] = _targetOptionsMap[targetOptions[i]];\\\\n if (strict && targets[i] == address(0)) revert ErrInvalidArguments(msg.sig);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n *\\\\n * Requirement:\\\\n * - Only allow self-call through proposal.\\\\n *\\\\n */\\\\n function updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) external {\\\\n // HACK: Cannot reuse the existing library due to too deep stack\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n _updateManyTargetOption(targetOptions, targets);\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates list of `targetOptions` to `targets`.\\\\n */\\\\n function _updateManyTargetOption(GlobalProposal.TargetOption[] memory targetOptions, address[] memory targets) internal {\\\\n for (uint256 i; i < targetOptions.length; ++i) {\\\\n if (targets[i] == address(this)) revert ErrInvalidArguments(msg.sig);\\\\n _updateTargetOption(targetOptions[i], targets[i]);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Updates `targetOption` to `target`.\\\\n *\\\\n * Requirement:\\\\n * - Emit a `TargetOptionUpdated` event.\\\\n */\\\\n function _updateTargetOption(GlobalProposal.TargetOption targetOption, address target) internal {\\\\n _targetOptionsMap[targetOption] = target;\\\\n emit TargetOptionUpdated(targetOption, target);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe5db4e1b31d9ff83e8962d17a815d39e72f5945023e6309172d875b47d5a1c3d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/CommonGovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\n\\\\nabstract contract CommonGovernanceProposal is CoreGovernance {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Casts votes by signatures.\\\\n *\\\\n * Note: This method does not verify the proposal hash with the vote hash. Please consider checking it before.\\\\n *\\\\n */\\\\n function _castVotesBySignatures(\\\\n Proposal.ProposalDetail memory _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n bytes32 proposalHash\\\\n ) internal {\\\\n if (!(_supports.length != 0 && _supports.length == _signatures.length)) revert ErrLengthMismatch(msg.sig);\\\\n\\\\n bytes32 _forDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.For));\\\\n bytes32 _againstDigest = ECDSA.toTypedDataHash(_proposalDomainSeparator(), Ballot.hash(proposalHash, Ballot.VoteType.Against));\\\\n\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n\\\\n address _lastSigner;\\\\n\\\\n for (uint256 _i; _i < _signatures.length;) {\\\\n Signature calldata _sig;\\\\n address _signer;\\\\n _sig = _signatures[_i];\\\\n\\\\n if (_supports[_i] == Ballot.VoteType.For) {\\\\n _signer = ECDSA.recover(_forDigest, _sig.v, _sig.r, _sig.s);\\\\n } else if (_supports[_i] == Ballot.VoteType.Against) {\\\\n _signer = ECDSA.recover(_againstDigest, _sig.v, _sig.r, _sig.s);\\\\n } else {\\\\n revert ErrUnsupportedVoteType(msg.sig);\\\\n }\\\\n\\\\n if (_lastSigner >= _signer) revert ErrInvalidOrder(msg.sig);\\\\n _lastSigner = _signer;\\\\n\\\\n uint256 _weight = _getWeight(_signer);\\\\n\\\\n if (_weight == 0) revert ErrInvalidSignatures(msg.sig);\\\\n\\\\n if (_castVote(_proposal, _supports[_i], _minimumForVoteWeight, _minimumAgainstVoteWeight, _signer, _sig, _weight)) {\\\\n return;\\\\n }\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the voted signatures for the proposals.\\\\n *\\\\n * Note: The signatures can be empty in case the proposal is voted on the current network.\\\\n *\\\\n */\\\\n function _getProposalSignatures(\\\\n uint256 _chainId,\\\\n uint256 _round\\\\n ) internal view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\\\n ProposalVote storage _vote = vote[_chainId][_round];\\\\n\\\\n uint256 _forLength = _vote.forVoteds.length;\\\\n uint256 _againstLength = _vote.againstVoteds.length;\\\\n uint256 _voterLength = _forLength + _againstLength;\\\\n\\\\n _supports = new Ballot.VoteType[](_voterLength);\\\\n _signatures = new Signature[](_voterLength);\\\\n _voters = new address[](_voterLength);\\\\n for (uint256 _i; _i < _forLength;) {\\\\n _supports[_i] = Ballot.VoteType.For;\\\\n _signatures[_i] = vote[_chainId][_round].sig[_vote.forVoteds[_i]];\\\\n _voters[_i] = _vote.forVoteds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n for (uint256 _i; _i < _againstLength;) {\\\\n _supports[_i + _forLength] = Ballot.VoteType.Against;\\\\n _signatures[_i + _forLength] = vote[_chainId][_round].sig[_vote.againstVoteds[_i]];\\\\n _voters[_i + _forLength] = _vote.againstVoteds[_i];\\\\n\\\\n unchecked {\\\\n ++_i;\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the voter `_voter` casted vote for the proposal.\\\\n */\\\\n function _proposalVoted(uint256 _chainId, uint256 _round, address _voter) internal view returns (bool) {\\\\n return _voted(vote[_chainId][_round], _voter);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the weight of a governor.\\\\n */\\\\n function _getWeight(address _governor) internal view virtual returns (uint256);\\\\n\\\\n function _proposalDomainSeparator() internal view virtual returns (bytes32);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa7fbe65047096bcf4269cfe42e4529eb9a8bbbf93aff9207edd46b04e9661949\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../../libraries/Proposal.sol\\\\\\\";\\\\nimport \\\\\\\"../GlobalCoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceProposal.sol\\\\\\\";\\\\n\\\\nabstract contract GlobalGovernanceProposal is GlobalCoreGovernance, CommonGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n /**\\\\n * @dev Proposes and casts votes for a global proposal by signatures.\\\\n */\\\\n function _proposeGlobalProposalStructAndCastVotes(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures,\\\\n address creator\\\\n ) internal returns (Proposal.ProposalDetail memory proposal) {\\\\n proposal = _proposeGlobalStruct(globalProposal, creator);\\\\n _castVotesBySignatures(proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts votes for a global proposal by signatures.\\\\n */\\\\n function _castGlobalProposalBySignatures(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) internal {\\\\n Proposal.ProposalDetail memory _proposal = globalProposal.intoProposalDetail(_resolveTargets({ targetOptions: globalProposal.targetOptions, strict: true }));\\\\n\\\\n bytes32 proposalHash = _proposal.hash();\\\\n if (vote[0][_proposal.nonce].hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, vote[0][_proposal.nonce].hash);\\\\n }\\\\n\\\\n _castVotesBySignatures(_proposal, supports_, signatures, globalProposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\\\n */\\\\n function getGlobalProposalSignatures(uint256 round_)\\\\n external\\\\n view\\\\n returns (address[] memory voters, Ballot.VoteType[] memory supports_, Signature[] memory signatures)\\\\n {\\\\n return _getProposalSignatures(0, round_);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\\\n */\\\\n function globalProposalVoted(uint256 round_, address voter) external view returns (bool) {\\\\n return _proposalVoted(0, round_, voter);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x3905efdfd61681db17bcc392cf93d6571e94bf752f813eacd2504662241231c8\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../CoreGovernance.sol\\\\\\\";\\\\nimport \\\\\\\"./CommonGovernanceProposal.sol\\\\\\\";\\\\n\\\\nabstract contract GovernanceProposal is CoreGovernance, CommonGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n\\\\n /**\\\\n * @dev Proposes a proposal struct and casts votes by signature.\\\\n */\\\\n function _proposeProposalStructAndCastVotes(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures,\\\\n address _creator\\\\n ) internal {\\\\n _proposeProposalStruct(_proposal, _creator);\\\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes a proposal struct and casts votes by signature.\\\\n */\\\\n function _castProposalBySignatures(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures\\\\n ) internal {\\\\n bytes32 _proposalHash = _proposal.hash();\\\\n\\\\n if (vote[_proposal.chainId][_proposal.nonce].hash != _proposalHash) {\\\\n revert ErrInvalidProposal(_proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\\\n }\\\\n\\\\n _castVotesBySignatures(_proposal, _supports, _signatures, _proposal.hash());\\\\n }\\\\n\\\\n /**\\\\n * @dev See `castProposalVoteForCurrentNetwork`.\\\\n */\\\\n function _castProposalVoteForCurrentNetwork(address _voter, Proposal.ProposalDetail memory _proposal, Ballot.VoteType _support) internal {\\\\n if (_proposal.chainId != block.chainid) revert ErrInvalidChainId(msg.sig, _proposal.chainId, block.chainid);\\\\n\\\\n bytes32 proposalHash = _proposal.hash();\\\\n if (vote[_proposal.chainId][_proposal.nonce].hash != proposalHash) {\\\\n revert ErrInvalidProposal(proposalHash, vote[_proposal.chainId][_proposal.nonce].hash);\\\\n }\\\\n\\\\n uint256 _minimumForVoteWeight = _getMinimumVoteWeight();\\\\n uint256 _minimumAgainstVoteWeight = _getTotalWeight() - _minimumForVoteWeight + 1;\\\\n Signature memory _emptySignature;\\\\n _castVote(_proposal, _support, _minimumForVoteWeight, _minimumAgainstVoteWeight, _voter, _emptySignature, _getWeight(_voter));\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_getProposalSignatures}\\\\n */\\\\n function getProposalSignatures(\\\\n uint256 _chainId,\\\\n uint256 _round\\\\n ) external view returns (address[] memory _voters, Ballot.VoteType[] memory _supports, Signature[] memory _signatures) {\\\\n return _getProposalSignatures(_chainId, _round);\\\\n }\\\\n\\\\n /**\\\\n * @dev See {CommonGovernanceProposal-_proposalVoted}\\\\n */\\\\n function proposalVoted(uint256 _chainId, uint256 _round, address _voter) external view returns (bool) {\\\\n return _proposalVoted(_chainId, _round, _voter);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x820788183e3300ede4a19be84a3d7c991ac579017f78a098b26d1bbebc411ec4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IQuorum.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IQuorum {\\\\n /// @dev Emitted when the threshold is updated\\\\n event ThresholdUpdated(uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator);\\\\n\\\\n /**\\\\n * @dev Returns the threshold.\\\\n */\\\\n function getThreshold() external view returns (uint256 _num, uint256 _denom);\\\\n\\\\n /**\\\\n * @dev Checks whether the `_voteWeight` passes the threshold.\\\\n */\\\\n function checkThreshold(uint256 _voteWeight) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns the minimum vote weight to pass the threshold.\\\\n */\\\\n function minimumVoteWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Sets the threshold.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is admin.\\\\n *\\\\n * Emits the `ThresholdUpdated` event.\\\\n *\\\\n */\\\\n function setThreshold(uint256 numerator, uint256 denominator) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc924e9480f59acc9bc8c033f05d3be9451de5cee0c224d76d4542fa5b67fa10f\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IRoninGatewayV3.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../libraries/Transfer.sol\\\\\\\";\\\\nimport \\\\\\\"./consumers/MappedTokenConsumer.sol\\\\\\\";\\\\n\\\\ninterface IRoninGatewayV3 is MappedTokenConsumer {\\\\n /**\\\\n * @dev Error thrown when attempting to withdraw funds that have already been migrated.\\\\n */\\\\n error ErrWithdrawalsMigrated();\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid trusted threshold is specified.\\\\n */\\\\n error ErrInvalidTrustedThreshold();\\\\n\\\\n /**\\\\n * @dev Error thrown when attempting to withdraw funds that have already been withdrawn on the mainchain.\\\\n */\\\\n error ErrWithdrawnOnMainchainAlready();\\\\n\\\\n /// @dev Emitted when the assets are depositted\\\\n event Deposited(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the withdrawal is requested\\\\n event WithdrawalRequested(bytes32 receiptHash, Transfer.Receipt);\\\\n /// @dev Emitted when the assets are withdrawn on mainchain\\\\n event MainchainWithdrew(bytes32 receiptHash, Transfer.Receipt receipt);\\\\n /// @dev Emitted when the withdrawal signatures is requested\\\\n event WithdrawalSignaturesRequested(bytes32 receiptHash, Transfer.Receipt);\\\\n /// @dev Emitted when the tokens are mapped\\\\n event TokenMapped(address[] roninTokens, address[] mainchainTokens, uint256[] chainIds, TokenStandard[] standards);\\\\n /// @dev Emitted when the tokens are unmapped\\\\n event TokenUnmapped(address[] roninTokens, uint256[] chainIds);\\\\n /// @dev Emitted when the threshold is updated\\\\n event TrustedThresholdUpdated(\\\\n uint256 indexed nonce, uint256 indexed numerator, uint256 indexed denominator, uint256 previousNumerator, uint256 previousDenominator\\\\n );\\\\n /// @dev Emitted when a deposit is voted\\\\n event DepositVoted(address indexed bridgeOperator, uint256 indexed id, uint256 indexed chainId, bytes32 receiptHash);\\\\n\\\\n /**\\\\n * @dev Returns withdrawal count.\\\\n */\\\\n function withdrawalCount() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns withdrawal signatures.\\\\n */\\\\n function getWithdrawalSignatures(uint256 _withdrawalId, address[] calldata _validators) external view returns (bytes[] memory);\\\\n\\\\n /**\\\\n * @dev Deposits based on the receipt.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n * Emits the `Deposited` once the assets are released.\\\\n *\\\\n * @notice The assets will be transferred whenever the valid call passes the quorum threshold.\\\\n *\\\\n */\\\\n function depositFor(Transfer.Receipt calldata _receipt) external;\\\\n\\\\n /**\\\\n * @dev Marks the withdrawals are done on mainchain and returns the boolean array indicating whether the withdrawal\\\\n * vote is already done before.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n * Emits the `MainchainWithdrew` once the valid call passes the quorum threshold.\\\\n *\\\\n * @notice Not reverting to avoid unnecessary failed transactions because the validators can send transactions at the\\\\n * same time.\\\\n *\\\\n */\\\\n function tryBulkAcknowledgeMainchainWithdrew(uint256[] calldata _withdrawalIds) external returns (bool[] memory);\\\\n\\\\n /**\\\\n * @dev Tries bulk deposits based on the receipts and returns the boolean array indicating whether the deposit vote\\\\n * is already done before. Reverts if the deposit is invalid or is voted by the validator again.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n * Emits the `Deposited` once the assets are released.\\\\n *\\\\n * @notice The assets will be transferred whenever the valid call for the receipt passes the quorum threshold. Not\\\\n * reverting to avoid unnecessary failed transactions because the validators can send transactions at the same time.\\\\n *\\\\n */\\\\n function tryBulkDepositFor(Transfer.Receipt[] calldata _receipts) external returns (bool[] memory);\\\\n\\\\n /**\\\\n * @dev Locks the assets and request withdrawal.\\\\n *\\\\n * Emits the `WithdrawalRequested` event.\\\\n *\\\\n */\\\\n function requestWithdrawalFor(Transfer.Request calldata _request, uint256 _chainId) external;\\\\n\\\\n /**\\\\n * @dev Bulk requests withdrawals.\\\\n *\\\\n * Emits the `WithdrawalRequested` events.\\\\n *\\\\n */\\\\n function bulkRequestWithdrawalFor(Transfer.Request[] calldata _requests, uint256 _chainId) external;\\\\n\\\\n /**\\\\n * @dev Requests withdrawal signatures for a specific withdrawal.\\\\n *\\\\n * Emits the `WithdrawalSignaturesRequested` event.\\\\n *\\\\n */\\\\n function requestWithdrawalSignatures(uint256 _withdrawalId) external;\\\\n\\\\n /**\\\\n * @dev Submits withdrawal signatures.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is a validator.\\\\n *\\\\n */\\\\n function bulkSubmitWithdrawalSignatures(uint256[] calldata _withdrawals, bytes[] calldata _signatures) external;\\\\n\\\\n /**\\\\n * @dev Maps Ronin tokens to mainchain networks.\\\\n *\\\\n * Requirement:\\\\n * - The method caller is admin.\\\\n * - The arrays have the same length and its length larger than 0.\\\\n *\\\\n * Emits the `TokenMapped` event.\\\\n *\\\\n */\\\\n function mapTokens(\\\\n address[] calldata _roninTokens,\\\\n address[] calldata _mainchainTokens,\\\\n uint256[] calldata chainIds,\\\\n TokenStandard[] calldata _standards\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Maps Ronin tokens to mainchain networks with minimum withdrawal thresholds.\\\\n */\\\\n function mapTokensWithMinThresholds(\\\\n address[] calldata roninTokens_,\\\\n address[] calldata mainchainTokens_,\\\\n uint256[] calldata chainIds_,\\\\n TokenStandard[] calldata standards_,\\\\n uint256[] calldata minimumThresholds_\\\\n ) external;\\\\n\\\\n /**\\\\n * @dev Unmaps Ronin tokens and clears the minimum withdrawal thresholds.\\\\n */\\\\n function unmapTokens(address[] calldata roninTokens_, uint256[] calldata chainIds_) external;\\\\n\\\\n /**\\\\n * @dev Returns whether the deposit is casted by the voter.\\\\n */\\\\n function depositVoted(uint256 _chainId, uint256 _depositId, address _voter) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns whether the mainchain withdrew is casted by the voter.\\\\n */\\\\n function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns whether the withdrawal is done on mainchain.\\\\n */\\\\n function mainchainWithdrew(uint256 _withdrawalId) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Returns mainchain token address.\\\\n * Reverts for unsupported token.\\\\n */\\\\n function getMainchainToken(address _roninToken, uint256 _chainId) external view returns (MappedToken memory _token);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x974de31ffb8b9dc56677edf5f8b852571a640cd4d1d39a589cca2c76436859cb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/IWETH.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IWETH {\\\\n event Transfer(address indexed src, address indexed dst, uint wad);\\\\n\\\\n function deposit() external payable;\\\\n\\\\n function transfer(address dst, uint wad) external returns (bool);\\\\n\\\\n function approve(address guy, uint wad) external returns (bool);\\\\n\\\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\\\n\\\\n function withdraw(uint256 _wad) external;\\\\n\\\\n function balanceOf(address) external view returns (uint256);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x000700e2b9c1985d53bb1cdba435f0f3d7b48e76e596e7dbbdfec1da47131415\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IBridgeManagerEvents } from \\\\\\\"./events/IBridgeManagerEvents.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManager\\\\n * @dev The interface for managing bridge operators.\\\\n */\\\\ninterface IBridgeManager is IBridgeManagerEvents {\\\\n /// @notice Error indicating that cannot find the querying operator\\\\n error ErrOperatorNotFound(address operator);\\\\n /// @notice Error indicating that cannot find the querying governor\\\\n error ErrGovernorNotFound(address governor);\\\\n /// @notice Error indicating that the msg.sender is not match the required governor\\\\n error ErrGovernorNotMatch(address required, address sender);\\\\n /// @notice Error indicating that the governors list will go below minimum number of required governor.\\\\n error ErrBelowMinRequiredGovernors();\\\\n /// @notice Common invalid input error\\\\n error ErrInvalidInput();\\\\n\\\\n /**\\\\n * @dev The domain separator used for computing hash digests in the contract.\\\\n */\\\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\\\n\\\\n /**\\\\n * @dev Returns the total number of bridge operators.\\\\n * @return The total number of bridge operators.\\\\n */\\\\n function totalBridgeOperator() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Checks if the given address is a bridge operator.\\\\n * @param addr The address to check.\\\\n * @return A boolean indicating whether the address is a bridge operator.\\\\n */\\\\n function isBridgeOperator(address addr) external view returns (bool);\\\\n\\\\n /**\\\\n * @dev Retrieves the full information of all registered bridge operators.\\\\n *\\\\n * This external function allows external callers to obtain the full information of all the registered bridge operators.\\\\n * The returned arrays include the addresses of governors, bridge operators, and their corresponding vote weights.\\\\n *\\\\n * @return governors An array of addresses representing the governors of each bridge operator.\\\\n * @return bridgeOperators An array of addresses representing the registered bridge operators.\\\\n * @return weights An array of uint256 values representing the vote weights of each bridge operator.\\\\n *\\\\n * Note: The length of each array will be the same, and the order of elements corresponds to the same bridge operator.\\\\n *\\\\n * Example Usage:\\\\n * ```\\\\n * (address[] memory governors, address[] memory bridgeOperators, uint256[] memory weights) = getFullBridgeOperatorInfos();\\\\n * for (uint256 i = 0; i < bridgeOperators.length; i++) {\\\\n * // Access individual information for each bridge operator.\\\\n * address governor = governors[i];\\\\n * address bridgeOperator = bridgeOperators[i];\\\\n * uint256 weight = weights[i];\\\\n * // ... (Process or use the information as required) ...\\\\n * }\\\\n * ```\\\\n *\\\\n */\\\\n function getFullBridgeOperatorInfos() external view returns (address[] memory governors, address[] memory bridgeOperators, uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns total weights of the governor list.\\\\n */\\\\n function sumGovernorsWeight(address[] calldata governors) external view returns (uint256 sum);\\\\n\\\\n /**\\\\n * @dev Returns total weights.\\\\n */\\\\n function getTotalWeight() external view returns (uint256);\\\\n\\\\n /**\\\\n * @dev Returns an array of all bridge operators.\\\\n * @return An array containing the addresses of all bridge operators.\\\\n */\\\\n function getBridgeOperators() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `operator` of a `governor`.\\\\n */\\\\n function getOperatorOf(address governor) external view returns (address operator);\\\\n\\\\n /**\\\\n * @dev Returns the corresponding `governor` of a `operator`.\\\\n */\\\\n function getGovernorOf(address operator) external view returns (address governor);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific governor.\\\\n * @param governor The address of the governor to get the vote weight for.\\\\n * @return voteWeight The vote weight of the specified governor.\\\\n */\\\\n function getGovernorWeight(address governor) external view returns (uint96);\\\\n\\\\n /**\\\\n * @dev External function to retrieve the vote weight of a specific bridge operator.\\\\n * @param bridgeOperator The address of the bridge operator to get the vote weight for.\\\\n * @return weight The vote weight of the specified bridge operator.\\\\n */\\\\n function getBridgeOperatorWeight(address bridgeOperator) external view returns (uint96 weight);\\\\n\\\\n /**\\\\n * @dev Returns the weights of a list of governor addresses.\\\\n */\\\\n function getGovernorWeights(address[] calldata governors) external view returns (uint96[] memory weights);\\\\n\\\\n /**\\\\n * @dev Returns an array of all governors.\\\\n * @return An array containing the addresses of all governors.\\\\n */\\\\n function getGovernors() external view returns (address[] memory);\\\\n\\\\n /**\\\\n * @dev Adds multiple bridge operators.\\\\n * @param governors An array of addresses of hot/cold wallets for bridge operator to update their node address.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to add.\\\\n */\\\\n function addBridgeOperators(uint96[] calldata voteWeights, address[] calldata governors, address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Removes multiple bridge operators.\\\\n * @param bridgeOperators An array of addresses representing the bridge operators to remove.\\\\n */\\\\n function removeBridgeOperators(address[] calldata bridgeOperators) external;\\\\n\\\\n /**\\\\n * @dev Self-call to update the minimum required governor.\\\\n * @param min The minimum number, this must not less than 3.\\\\n */\\\\n function setMinRequiredGovernor(uint min) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xefc46318a240371031e77ef3c355e2c18432e4479145378de6782277f9b44923\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallback.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title IBridgeManagerCallback\\\\n * @dev Interface for the callback functions to be implemented by the Bridge Manager contract.\\\\n */\\\\ninterface IBridgeManagerCallback is IERC165 {\\\\n /**\\\\n * @dev Handles the event when bridge operators are added.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param addeds The corresponding boolean values indicating whether the operators were added or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsAdded(address[] memory bridgeOperators, uint96[] calldata weights, bool[] memory addeds) external returns (bytes4 selector);\\\\n\\\\n /**\\\\n * @dev Handles the event when bridge operators are removed.\\\\n * @param bridgeOperators The addresses of the bridge operators.\\\\n * @param removeds The corresponding boolean values indicating whether the operators were removed or not.\\\\n * @return selector The selector of the function being called.\\\\n */\\\\n function onBridgeOperatorsRemoved(address[] memory bridgeOperators, bool[] memory removeds) external returns (bytes4 selector);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x6c8ce7e2478e28c5ed5e6f5d8305a77d6d5f9125a47adfb77632940b9a0f3625\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/IBridgeManagerCallbackRegister.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerCallbackRegister {\\\\n error ErrExistOneInternalCallFailed(address sender, bytes4 msgSig, bytes callData);\\\\n\\\\n event CallbackRegistered(address, bool);\\\\n /**\\\\n * @dev Emitted when the contract notifies multiple registers with statuses and return data.\\\\n */\\\\n event Notified(bytes callData, address[] registers, bool[] statuses, bytes[] returnDatas);\\\\n\\\\n /**\\\\n * @dev Retrieves the addresses of registered callbacks.\\\\n * @return registers An array containing the addresses of registered callbacks.\\\\n */\\\\n function getCallbackRegisters() external view returns (address[] memory registers);\\\\n\\\\n /**\\\\n * @dev Registers multiple callbacks with the bridge.\\\\n * @param registers The array of callback addresses to register.\\\\n */\\\\n function registerCallbacks(address[] calldata registers) external;\\\\n\\\\n /**\\\\n * @dev Unregisters multiple callbacks from the bridge.\\\\n * @param registers The array of callback addresses to unregister.\\\\n */\\\\n function unregisterCallbacks(address[] calldata registers) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x493f7a40fc058eb6654a636316be99c2ddd9ee26ee215ff86c7107a7fa20ff97\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/bridge/events/IBridgeManagerEvents.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface IBridgeManagerEvents {\\\\n /**\\\\n * @dev Emitted when new bridge operators are added.\\\\n */\\\\n event BridgeOperatorsAdded(bool[] statuses, uint96[] voteWeights, address[] governors, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to add.\\\\n */\\\\n event BridgeOperatorAddingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when bridge operators are removed.\\\\n */\\\\n event BridgeOperatorsRemoved(bool[] statuses, address[] bridgeOperators);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is failed to remove.\\\\n */\\\\n event BridgeOperatorRemovingFailed(address indexed operator);\\\\n\\\\n /**\\\\n * @dev Emitted when a bridge operator is updated.\\\\n */\\\\n event BridgeOperatorUpdated(address indexed governor, address indexed fromBridgeOperator, address indexed toBridgeOperator);\\\\n\\\\n /**\\\\n * @dev Emitted when the minimum number of required governors is updated.\\\\n */\\\\n event MinRequiredGovernorUpdated(uint min);\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x38bc3709c98a7c08fb9b6fa3e07a725903dcb0bd07de8a828bac6c3bcf7d997d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/collections/IHasContracts.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\n\\\\npragma solidity ^0.8.9;\\\\n\\\\nimport { ContractType } from \\\\\\\"../../utils/ContractType.sol\\\\\\\";\\\\n\\\\ninterface IHasContracts {\\\\n /// @dev Error of invalid role.\\\\n error ErrContractTypeNotFound(ContractType contractType);\\\\n\\\\n /// @dev Emitted when a contract is updated.\\\\n event ContractUpdated(ContractType indexed contractType, address indexed addr);\\\\n\\\\n /**\\\\n * @dev Returns the address of a contract with a specific role.\\\\n * Throws an error if no contract is set for the specified role.\\\\n *\\\\n * @param contractType The role of the contract to retrieve.\\\\n * @return contract_ The address of the contract with the specified role.\\\\n */\\\\n function getContract(ContractType contractType) external view returns (address contract_);\\\\n\\\\n /**\\\\n * @dev Sets the address of a contract with a specific role.\\\\n * Emits the event {ContractUpdated}.\\\\n * @param contractType The role of the contract to set.\\\\n * @param addr The address of the contract to set.\\\\n */\\\\n function setContract(ContractType contractType, address addr) external;\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x99d8213d857e30d367155abd15dc42730afdfbbac3a22dfb3b95ffea2083a92e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/ChainTypeConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface ChainTypeConsumer {\\\\n enum ChainType {\\\\n RoninChain,\\\\n Mainchain\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe0d20e00c8d237f8e0fb881abf1ff1ef114173bcb428f06f689c581666a22db7\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/MappedTokenConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"../../libraries/LibTokenInfo.sol\\\\\\\";\\\\n\\\\ninterface MappedTokenConsumer {\\\\n struct MappedToken {\\\\n TokenStandard erc;\\\\n address tokenAddr;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xc53dcba9dc7d950ab6561149f76b45617ddbce5037e4c86ea00b976018bbfde1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/SignatureConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface SignatureConsumer {\\\\n struct Signature {\\\\n uint8 v;\\\\n bytes32 r;\\\\n bytes32 s;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xd370e350722067097dec1a5c31bda6e47e83417fa5c3288293bb910028cd136b\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/interfaces/consumers/VoteStatusConsumer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\ninterface VoteStatusConsumer {\\\\n enum VoteStatus {\\\\n Pending,\\\\n Approved,\\\\n Executed,\\\\n Rejected,\\\\n Expired\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xa5045232c0c053fcf31fb3fe71942344444159c48d5f1b2063dbb06b6a1c9752\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/AddressArrayUtils.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: UNLICENSED\\\\n\\\\npragma solidity ^0.8.0;\\\\n\\\\nlibrary AddressArrayUtils {\\\\n /**\\\\n * @dev Error thrown when a duplicated element is detected in an array.\\\\n * @param msgSig The function signature that invoke the error.\\\\n */\\\\n error ErrDuplicated(bytes4 msgSig);\\\\n\\\\n /**\\\\n * @dev Returns whether or not there's a duplicate. Runs in O(n^2).\\\\n * @param A Array to search\\\\n * @return Returns true if duplicate, false otherwise\\\\n */\\\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\\\n if (A.length == 0) {\\\\n return false;\\\\n }\\\\n unchecked {\\\\n for (uint256 i = 0; i < A.length - 1; i++) {\\\\n for (uint256 j = i + 1; j < A.length; j++) {\\\\n if (A[i] == A[j]) {\\\\n return true;\\\\n }\\\\n }\\\\n }\\\\n }\\\\n return false;\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether two arrays of addresses are equal or not.\\\\n */\\\\n function isEqual(address[] memory _this, address[] memory _other) internal pure returns (bool yes_) {\\\\n // Hashing two arrays and compare their hash\\\\n assembly {\\\\n let _thisHash := keccak256(add(_this, 32), mul(mload(_this), 32))\\\\n let _otherHash := keccak256(add(_other, 32), mul(mload(_other), 32))\\\\n yes_ := eq(_thisHash, _otherHash)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Return the concatenated array from a and b.\\\\n */\\\\n function extend(address[] memory a, address[] memory b) internal pure returns (address[] memory c) {\\\\n uint256 lengthA = a.length;\\\\n uint256 lengthB = b.length;\\\\n unchecked {\\\\n c = new address[](lengthA + lengthB);\\\\n }\\\\n uint256 i;\\\\n for (; i < lengthA;) {\\\\n c[i] = a[i];\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n for (uint256 j; j < lengthB;) {\\\\n c[i] = b[j];\\\\n unchecked {\\\\n ++i;\\\\n ++j;\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xce5d578861167da47a965c8a0e1592b808aad6eb79ccb1873bf2e2280ddb85ee\\\",\\\"license\\\":\\\"UNLICENSED\\\"},\\\"src/libraries/Ballot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\n\\\\nlibrary Ballot {\\\\n using ECDSA for bytes32;\\\\n\\\\n enum VoteType {\\\\n For,\\\\n Against\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Ballot(bytes32 proposalHash,uint8 support)\\\\\\\");\\\\n bytes32 private constant BALLOT_TYPEHASH = 0xd900570327c4c0df8dd6bdd522b7da7e39145dd049d2fd4602276adcd511e3c2;\\\\n\\\\n function hash(bytes32 _proposalHash, VoteType _support) internal pure returns (bytes32 digest) {\\\\n // return keccak256(abi.encode(BALLOT_TYPEHASH, _proposalHash, _support));\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, BALLOT_TYPEHASH)\\\\n mstore(add(ptr, 0x20), _proposalHash)\\\\n mstore(add(ptr, 0x40), _support)\\\\n digest := keccak256(ptr, 0x60)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xaa1e66bcd86baa6f18c7c5e9b67496535f229cbd2e2ecb4c66bcbfed2b1365de\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/GlobalProposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"./Proposal.sol\\\\\\\";\\\\n\\\\nlibrary GlobalProposal {\\\\n /**\\\\n * @dev Error thrown when attempting to interact with an unsupported target.\\\\n */\\\\n error ErrUnsupportedTarget(bytes32 proposalHash, uint256 targetNumber);\\\\n\\\\n enum TargetOption {\\\\n BridgeManager, // 0\\\\n GatewayContract, // 1\\\\n BridgeReward, // 2\\\\n BridgeSlash, // 3\\\\n BridgeTracking, // 4\\\\n PauseEnforcer // 5\\\\n\\\\n }\\\\n\\\\n struct GlobalProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n uint256 expiryTimestamp;\\\\n address executor;\\\\n TargetOption[] targetOptions;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"GlobalProposalDetail(uint256 nonce,uint256 expiryTimestamp,address executor,uint8[] targetOptions,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0xde480f0c53a3651c08fbab1dffbc45fe574f31188827fe52cb9035da9fe57e4a;\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(GlobalProposalDetail memory self) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = self.values;\\\\n TargetOption[] memory targets = self.targetOptions;\\\\n bytes32[] memory calldataHashList = new bytes32[](self.calldatas.length);\\\\n uint256[] memory gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length;) {\\\\n calldataHashList[i] = keccak256(self.calldatas[i]);\\\\n\\\\n unchecked {\\\\n ++i;\\\\n }\\\\n }\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * proposal.nonce,\\\\n * proposal.expiryTimestamp,\\\\n * proposal.executor,\\\\n * targetsHash,\\\\n * valuesHash,\\\\n * calldatasHash,\\\\n * gasAmountsHash\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(self)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0x80), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x100)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts into the normal proposal.\\\\n */\\\\n function intoProposalDetail(GlobalProposalDetail memory self, address[] memory targets) internal pure returns (Proposal.ProposalDetail memory detail_) {\\\\n detail_.nonce = self.nonce;\\\\n detail_.chainId = 0;\\\\n detail_.expiryTimestamp = self.expiryTimestamp;\\\\n detail_.executor = self.executor;\\\\n\\\\n detail_.targets = new address[](self.targetOptions.length);\\\\n detail_.values = self.values;\\\\n detail_.calldatas = self.calldatas;\\\\n detail_.gasAmounts = self.gasAmounts;\\\\n\\\\n for (uint256 i; i < self.targetOptions.length; ++i) {\\\\n detail_.targets[i] = targets[i];\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x76d362e1a4c8ef6d1aac45aae0f443a218cb256176ad5fbe952b2ff7c2132e6e\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/LibTokenInfo.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol\\\\\\\";\\\\nimport \\\\\\\"../interfaces/IWETH.sol\\\\\\\";\\\\n\\\\nenum TokenStandard {\\\\n ERC20,\\\\n ERC721,\\\\n ERC1155\\\\n}\\\\n\\\\nstruct TokenInfo {\\\\n TokenStandard erc;\\\\n // For ERC20: the id must be 0 and the quantity is larger than 0.\\\\n // For ERC721: the quantity must be 0.\\\\n uint256 id;\\\\n uint256 quantity;\\\\n}\\\\n\\\\n/**\\\\n * @dev Error indicating that the `transfer` has failed.\\\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\\\n * @param to Receiver of the token value.\\\\n * @param token Address of the token.\\\\n */\\\\nerror ErrTokenCouldNotTransfer(TokenInfo tokenInfo, address to, address token);\\\\n\\\\n/**\\\\n * @dev Error indicating that the `handleAssetIn` has failed.\\\\n * @param tokenInfo Info of the token including ERC standard, id or quantity.\\\\n * @param from Owner of the token value.\\\\n * @param to Receiver of the token value.\\\\n * @param token Address of the token.\\\\n */\\\\nerror ErrTokenCouldNotTransferFrom(TokenInfo tokenInfo, address from, address to, address token);\\\\n\\\\n/// @dev Error indicating that the provided information is invalid.\\\\nerror ErrInvalidInfo();\\\\n\\\\n/// @dev Error indicating that the minting of ERC20 tokens has failed.\\\\nerror ErrERC20MintingFailed();\\\\n\\\\n/// @dev Error indicating that the minting of ERC721 tokens has failed.\\\\nerror ErrERC721MintingFailed();\\\\n\\\\n/// @dev Error indicating that the transfer of ERC1155 tokens has failed.\\\\nerror ErrERC1155TransferFailed();\\\\n\\\\n/// @dev Error indicating that the mint of ERC1155 tokens has failed.\\\\nerror ErrERC1155MintingFailed();\\\\n\\\\n/// @dev Error indicating that an unsupported standard is encountered.\\\\nerror ErrUnsupportedStandard();\\\\n\\\\nlibrary LibTokenInfo {\\\\n /**\\\\n *\\\\n * HASH\\\\n *\\\\n */\\\\n\\\\n // keccak256(\\\\\\\"TokenInfo(uint8 erc,uint256 id,uint256 quantity)\\\\\\\");\\\\n bytes32 public constant INFO_TYPE_HASH_SINGLE = 0x1e2b74b2a792d5c0f0b6e59b037fa9d43d84fbb759337f0112fcc15ca414fc8d;\\\\n\\\\n /**\\\\n * @dev Returns token info struct hash.\\\\n */\\\\n function hash(TokenInfo memory self) internal pure returns (bytes32 digest) {\\\\n // keccak256(abi.encode(INFO_TYPE_HASH_SINGLE, info.erc, info.id, info.quantity))\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, INFO_TYPE_HASH_SINGLE)\\\\n mstore(add(ptr, 0x20), mload(self)) // info.erc\\\\n mstore(add(ptr, 0x40), mload(add(self, 0x20))) // info.id\\\\n mstore(add(ptr, 0x60), mload(add(self, 0x40))) // info.quantity\\\\n digest := keccak256(ptr, 0x80)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * VALIDATE\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Validates the token info.\\\\n */\\\\n function validate(TokenInfo memory self) internal pure {\\\\n if (!(_checkERC20(self) || _checkERC721(self) || _checkERC1155(self))) {\\\\n revert ErrInvalidInfo();\\\\n }\\\\n }\\\\n\\\\n function _checkERC20(TokenInfo memory self) private pure returns (bool) {\\\\n return (self.erc == TokenStandard.ERC20 && self.quantity > 0 && self.id == 0);\\\\n }\\\\n\\\\n function _checkERC721(TokenInfo memory self) private pure returns (bool) {\\\\n return (self.erc == TokenStandard.ERC721 && self.quantity == 0);\\\\n }\\\\n\\\\n function _checkERC1155(TokenInfo memory self) private pure returns (bool res) {\\\\n // Only validate the quantity, because id of ERC-1155 can be 0.\\\\n return (self.erc == TokenStandard.ERC1155 && self.quantity > 0);\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * TRANSFER IN/OUT METHOD\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfer asset in.\\\\n *\\\\n * Requirements:\\\\n * - The `_from` address must approve for the contract using this library.\\\\n *\\\\n */\\\\n function handleAssetIn(TokenInfo memory self, address from, address token) internal {\\\\n bool success;\\\\n bytes memory data;\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, address(this), self.quantity));\\\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\\\n } else if (self.erc == TokenStandard.ERC721) {\\\\n success = _tryTransferFromERC721(token, from, address(this), self.id);\\\\n } else if (self.erc == TokenStandard.ERC1155) {\\\\n success = _tryTransferFromERC1155(token, from, address(this), self.id, self.quantity);\\\\n } else {\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n if (!success) revert ErrTokenCouldNotTransferFrom(self, from, address(this), token);\\\\n }\\\\n\\\\n /**\\\\n * @dev Tries transfer assets out, or mint the assets if cannot transfer.\\\\n *\\\\n * @notice Prioritizes transfer native token if the token is wrapped.\\\\n *\\\\n */\\\\n function handleAssetOut(TokenInfo memory self, address payable to, address token, IWETH wrappedNativeToken) internal {\\\\n if (token == address(wrappedNativeToken)) {\\\\n // Try sending the native token before transferring the wrapped token\\\\n if (!to.send(self.quantity)) {\\\\n wrappedNativeToken.deposit{ value: self.quantity }();\\\\n _transferTokenOut(self, to, token);\\\\n }\\\\n\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n uint256 balance = IERC20(token).balanceOf(address(this));\\\\n if (balance < self.quantity) {\\\\n if (!_tryMintERC20(token, address(this), self.quantity - balance)) revert ErrERC20MintingFailed();\\\\n }\\\\n\\\\n _transferTokenOut(self, to, token);\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC721) {\\\\n if (!_tryTransferOutOrMintERC721(token, to, self.id)) {\\\\n revert ErrERC721MintingFailed();\\\\n }\\\\n return;\\\\n }\\\\n\\\\n if (self.erc == TokenStandard.ERC1155) {\\\\n if (!_tryTransferOutOrMintERC1155(token, to, self.id, self.quantity)) {\\\\n revert ErrERC1155MintingFailed();\\\\n }\\\\n return;\\\\n }\\\\n\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n /**\\\\n *\\\\n * TRANSFER HELPERS\\\\n *\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfer assets from current address to `_to` address.\\\\n */\\\\n function _transferTokenOut(TokenInfo memory self, address to, address token) private {\\\\n bool success;\\\\n if (self.erc == TokenStandard.ERC20) {\\\\n success = _tryTransferERC20(token, to, self.quantity);\\\\n } else if (self.erc == TokenStandard.ERC721) {\\\\n success = _tryTransferFromERC721(token, address(this), to, self.id);\\\\n } else {\\\\n revert ErrUnsupportedStandard();\\\\n }\\\\n\\\\n if (!success) revert ErrTokenCouldNotTransfer(self, to, token);\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-20\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers ERC20 token and returns the result.\\\\n */\\\\n function _tryTransferERC20(address token, address to, uint256 quantity) private returns (bool success) {\\\\n bytes memory data;\\\\n (success, data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, quantity));\\\\n success = success && (data.length == 0 || abi.decode(data, (bool)));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC20 token and returns the result.\\\\n */\\\\n function _tryMintERC20(address token, address to, uint256 quantity) private returns (bool success) {\\\\n // bytes4(keccak256(\\\\\\\"mint(address,uint256)\\\\\\\"))\\\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, quantity));\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-721\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers the ERC721 token out. If the transfer failed, mints the ERC721.\\\\n * @return success Returns `false` if both transfer and mint are failed.\\\\n */\\\\n function _tryTransferOutOrMintERC721(address token, address to, uint256 id) private returns (bool success) {\\\\n success = _tryTransferFromERC721(token, address(this), to, id);\\\\n if (!success) {\\\\n return _tryMintERC721(token, to, id);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers ERC721 token and returns the result.\\\\n */\\\\n function _tryTransferFromERC721(address token, address from, address to, uint256 id) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeWithSelector(IERC721.transferFrom.selector, from, to, id));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC721 token and returns the result.\\\\n */\\\\n function _tryMintERC721(address token, address to, uint256 id) private returns (bool success) {\\\\n // bytes4(keccak256(\\\\\\\"mint(address,uint256)\\\\\\\"))\\\\n (success,) = token.call(abi.encodeWithSelector(0x40c10f19, to, id));\\\\n }\\\\n\\\\n /**\\\\n * TRANSFER ERC-1155\\\\n */\\\\n\\\\n /**\\\\n * @dev Transfers the ERC1155 token out. If the transfer failed, mints the ERC11555.\\\\n * @return success Returns `false` if both transfer and mint are failed.\\\\n */\\\\n function _tryTransferOutOrMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n success = _tryTransferFromERC1155(token, address(this), to, id, amount);\\\\n if (!success) {\\\\n return _tryMintERC1155(token, to, id, amount);\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Transfers ERC1155 token and returns the result.\\\\n */\\\\n function _tryTransferFromERC1155(address token, address from, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeCall(IERC1155.safeTransferFrom, (from, to, id, amount, new bytes(0))));\\\\n }\\\\n\\\\n /**\\\\n * @dev Mints ERC1155 token and returns the result.\\\\n */\\\\n function _tryMintERC1155(address token, address to, uint256 id, uint256 amount) private returns (bool success) {\\\\n (success,) = token.call(abi.encodeCall(ERC1155PresetMinterPauser.mint, (to, id, amount, new bytes(0))));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x56b413a42c6c39a51dc1737e735d1623b89ecdf00bacd960f70b3f18ccaa6de2\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/LibTokenOwner.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nstruct TokenOwner {\\\\n address addr;\\\\n address tokenAddr;\\\\n uint256 chainId;\\\\n}\\\\n\\\\nlibrary LibTokenOwner {\\\\n // keccak256(\\\\\\\"TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\\\\\");\\\\n bytes32 public constant OWNER_TYPE_HASH = 0x353bdd8d69b9e3185b3972e08b03845c0c14a21a390215302776a7a34b0e8764;\\\\n\\\\n /**\\\\n * @dev Returns ownership struct hash.\\\\n */\\\\n function hash(TokenOwner memory owner) internal pure returns (bytes32 digest) {\\\\n // keccak256(abi.encode(OWNER_TYPE_HASH, owner.addr, owner.tokenAddr, owner.chainId))\\\\n assembly (\\\\\\\"memory-safe\\\\\\\") {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, OWNER_TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(owner)) // owner.addr\\\\n mstore(add(ptr, 0x40), mload(add(owner, 0x20))) // owner.tokenAddr\\\\n mstore(add(ptr, 0x60), mload(add(owner, 0x40))) // owner.chainId\\\\n digest := keccak256(ptr, 0x80)\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xb104fd02056a3ed52bf06c202e87b748200320682871b1801985050587ec2d51\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Proposal.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ErrInvalidChainId, ErrLengthMismatch } from \\\\\\\"../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\nlibrary Proposal {\\\\n /**\\\\n * @dev Error thrown when there is insufficient gas to execute a function.\\\\n */\\\\n error ErrInsufficientGas(bytes32 proposalHash);\\\\n\\\\n /**\\\\n * @dev Error thrown when an invalid expiry timestamp is provided.\\\\n */\\\\n error ErrInvalidExpiryTimestamp();\\\\n\\\\n /**\\\\n * @dev Error thrown when the proposal reverts when execute the internal call no. `callIndex` with revert message is `revertMsg`.\\\\n */\\\\n error ErrLooseProposalInternallyRevert(uint256 callIndex, bytes revertMsg);\\\\n\\\\n struct ProposalDetail {\\\\n // Nonce to make sure proposals are executed in order\\\\n uint256 nonce;\\\\n // Value 0: all chain should run this proposal\\\\n // Other values: only specific chain has to execute\\\\n uint256 chainId;\\\\n uint256 expiryTimestamp;\\\\n // The address that execute the proposal after the proposal passes.\\\\n // Leave this address as address(0) to auto-execute by the last valid vote.\\\\n address executor;\\\\n address[] targets;\\\\n uint256[] values;\\\\n bytes[] calldatas;\\\\n uint256[] gasAmounts;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"ProposalDetail(uint256 nonce,uint256 chainId,uint256 expiryTimestamp,address executor,address[] targets,uint256[] values,bytes[] calldatas,uint256[] gasAmounts)\\\\\\\");\\\\n bytes32 internal constant TYPE_HASH = 0x1b59eeec7c321899dc1e7a5b3d876c9a445dffc6d2f96ba842d7489908fdee12;\\\\n\\\\n /**\\\\n * @dev Validates the proposal.\\\\n */\\\\n function validate(ProposalDetail memory proposal, uint256 maxExpiryDuration) internal view {\\\\n if (\\\\n !(\\\\n proposal.targets.length > 0 && proposal.targets.length == proposal.values.length && proposal.targets.length == proposal.calldatas.length\\\\n && proposal.targets.length == proposal.gasAmounts.length\\\\n )\\\\n ) {\\\\n revert ErrLengthMismatch(msg.sig);\\\\n }\\\\n\\\\n if (proposal.expiryTimestamp > block.timestamp + maxExpiryDuration) {\\\\n revert ErrInvalidExpiryTimestamp();\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns struct hash of the proposal.\\\\n */\\\\n function hash(ProposalDetail memory proposal) internal pure returns (bytes32 digest_) {\\\\n uint256[] memory values = proposal.values;\\\\n address[] memory targets = proposal.targets;\\\\n bytes32[] memory calldataHashList = new bytes32[](proposal.calldatas.length);\\\\n uint256[] memory gasAmounts = proposal.gasAmounts;\\\\n\\\\n for (uint256 i; i < calldataHashList.length; ++i) {\\\\n calldataHashList[i] = keccak256(proposal.calldatas[i]);\\\\n }\\\\n\\\\n // return\\\\n // keccak256(\\\\n // abi.encode(\\\\n // TYPE_HASH,\\\\n // proposal.nonce,\\\\n // proposal.chainId,\\\\n // proposal.expiryTimestamp\\\\n // proposal.executor\\\\n // targetsHash,\\\\n // valuesHash,\\\\n // calldatasHash,\\\\n // gasAmountsHash\\\\n // )\\\\n // );\\\\n // /\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(proposal)) // proposal.nonce\\\\n mstore(add(ptr, 0x40), mload(add(proposal, 0x20))) // proposal.chainId\\\\n mstore(add(ptr, 0x60), mload(add(proposal, 0x40))) // proposal.expiryTimestamp\\\\n mstore(add(ptr, 0x80), mload(add(proposal, 0x60))) // proposal.executor\\\\n\\\\n let arrayHashed\\\\n arrayHashed := keccak256(add(targets, 32), mul(mload(targets), 32)) // targetsHash\\\\n mstore(add(ptr, 0xa0), arrayHashed)\\\\n arrayHashed := keccak256(add(values, 32), mul(mload(values), 32)) // valuesHash\\\\n mstore(add(ptr, 0xc0), arrayHashed)\\\\n arrayHashed := keccak256(add(calldataHashList, 32), mul(mload(calldataHashList), 32)) // calldatasHash\\\\n mstore(add(ptr, 0xe0), arrayHashed)\\\\n arrayHashed := keccak256(add(gasAmounts, 32), mul(mload(gasAmounts), 32)) // gasAmountsHash\\\\n mstore(add(ptr, 0x100), arrayHashed)\\\\n digest_ := keccak256(ptr, 0x120)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is auto-executed on the last valid vote.\\\\n */\\\\n function isAutoExecute(ProposalDetail memory proposal) internal pure returns (bool) {\\\\n return proposal.executor == address(0);\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns whether the proposal is executable for the current chain.\\\\n *\\\\n * @notice Does not check whether the call result is successful or not. Please use `execute` instead.\\\\n *\\\\n */\\\\n function executable(ProposalDetail memory proposal) internal view returns (bool result) {\\\\n return proposal.chainId == 0 || proposal.chainId == block.chainid;\\\\n }\\\\n\\\\n /**\\\\n * @dev Executes the proposal.\\\\n */\\\\n function execute(ProposalDetail memory proposal) internal returns (bool[] memory successCalls, bytes[] memory returnDatas) {\\\\n if (!executable(proposal)) revert ErrInvalidChainId(msg.sig, proposal.chainId, block.chainid);\\\\n\\\\n successCalls = new bool[](proposal.targets.length);\\\\n returnDatas = new bytes[](proposal.targets.length);\\\\n for (uint256 i = 0; i < proposal.targets.length; ++i) {\\\\n if (gasleft() <= proposal.gasAmounts[i]) revert ErrInsufficientGas(hash(proposal));\\\\n\\\\n (successCalls[i], returnDatas[i]) = proposal.targets[i].call{ value: proposal.values[i], gas: proposal.gasAmounts[i] }(proposal.calldatas[i]);\\\\n\\\\n if (!successCalls[i]) {\\\\n revert ErrLooseProposalInternallyRevert(i, returnDatas[i]);\\\\n }\\\\n }\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x0ef21852c8a90ebf3ec4d4cc11acd9b6aa1fd932fb6858b2f6cdd3722fab6cb1\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/libraries/Transfer.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport \\\\\\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\\\\\";\\\\nimport \\\\\\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\\\\\";\\\\nimport \\\\\\\"./LibTokenInfo.sol\\\\\\\";\\\\nimport \\\\\\\"./LibTokenOwner.sol\\\\\\\";\\\\n\\\\nlibrary Transfer {\\\\n using ECDSA for bytes32;\\\\n using LibTokenOwner for TokenOwner;\\\\n using LibTokenInfo for TokenInfo;\\\\n\\\\n enum Kind {\\\\n Deposit,\\\\n Withdrawal\\\\n }\\\\n\\\\n struct Request {\\\\n // For deposit request: Recipient address on Ronin network\\\\n // For withdrawal request: Recipient address on mainchain network\\\\n address recipientAddr;\\\\n // Token address to deposit/withdraw\\\\n // Value 0: native token\\\\n address tokenAddr;\\\\n TokenInfo info;\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts the transfer request into the deposit receipt.\\\\n */\\\\n function into_deposit_receipt(\\\\n Request memory _request,\\\\n address _requester,\\\\n uint256 _id,\\\\n address _roninTokenAddr,\\\\n uint256 _roninChainId\\\\n ) internal view returns (Receipt memory _receipt) {\\\\n _receipt.id = _id;\\\\n _receipt.kind = Kind.Deposit;\\\\n _receipt.mainchain.addr = _requester;\\\\n _receipt.mainchain.tokenAddr = _request.tokenAddr;\\\\n _receipt.mainchain.chainId = block.chainid;\\\\n _receipt.ronin.addr = _request.recipientAddr;\\\\n _receipt.ronin.tokenAddr = _roninTokenAddr;\\\\n _receipt.ronin.chainId = _roninChainId;\\\\n _receipt.info = _request.info;\\\\n }\\\\n\\\\n /**\\\\n * @dev Converts the transfer request into the withdrawal receipt.\\\\n */\\\\n function into_withdrawal_receipt(\\\\n Request memory _request,\\\\n address _requester,\\\\n uint256 _id,\\\\n address _mainchainTokenAddr,\\\\n uint256 _mainchainId\\\\n ) internal view returns (Receipt memory _receipt) {\\\\n _receipt.id = _id;\\\\n _receipt.kind = Kind.Withdrawal;\\\\n _receipt.ronin.addr = _requester;\\\\n _receipt.ronin.tokenAddr = _request.tokenAddr;\\\\n _receipt.ronin.chainId = block.chainid;\\\\n _receipt.mainchain.addr = _request.recipientAddr;\\\\n _receipt.mainchain.tokenAddr = _mainchainTokenAddr;\\\\n _receipt.mainchain.chainId = _mainchainId;\\\\n _receipt.info = _request.info;\\\\n }\\\\n\\\\n struct Receipt {\\\\n uint256 id;\\\\n Kind kind;\\\\n TokenOwner mainchain;\\\\n TokenOwner ronin;\\\\n TokenInfo info;\\\\n }\\\\n\\\\n // keccak256(\\\\\\\"Receipt(uint256 id,uint8 kind,TokenOwner mainchain,TokenOwner ronin,TokenInfo info)TokenInfo(uint8 erc,uint256 id,uint256 quantity)TokenOwner(address addr,address tokenAddr,uint256 chainId)\\\\\\\");\\\\n bytes32 public constant TYPE_HASH = 0xb9d1fe7c9deeec5dc90a2f47ff1684239519f2545b2228d3d91fb27df3189eea;\\\\n\\\\n /**\\\\n * @dev Returns token info struct hash.\\\\n */\\\\n function hash(Receipt memory _receipt) internal pure returns (bytes32 digest) {\\\\n bytes32 hashedReceiptMainchain = _receipt.mainchain.hash();\\\\n bytes32 hashedReceiptRonin = _receipt.ronin.hash();\\\\n bytes32 hashedReceiptInfo = _receipt.info.hash();\\\\n\\\\n /*\\\\n * return\\\\n * keccak256(\\\\n * abi.encode(\\\\n * TYPE_HASH,\\\\n * _receipt.id,\\\\n * _receipt.kind,\\\\n * Token.hash(_receipt.mainchain),\\\\n * Token.hash(_receipt.ronin),\\\\n * Token.hash(_receipt.info)\\\\n * )\\\\n * );\\\\n */\\\\n assembly {\\\\n let ptr := mload(0x40)\\\\n mstore(ptr, TYPE_HASH)\\\\n mstore(add(ptr, 0x20), mload(_receipt)) // _receipt.id\\\\n mstore(add(ptr, 0x40), mload(add(_receipt, 0x20))) // _receipt.kind\\\\n mstore(add(ptr, 0x60), hashedReceiptMainchain)\\\\n mstore(add(ptr, 0x80), hashedReceiptRonin)\\\\n mstore(add(ptr, 0xa0), hashedReceiptInfo)\\\\n digest := keccak256(ptr, 0xc0)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Returns the receipt digest.\\\\n */\\\\n function receiptDigest(bytes32 _domainSeparator, bytes32 _receiptHash) internal pure returns (bytes32) {\\\\n return _domainSeparator.toTypedDataHash(_receiptHash);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x652c72f4e9aeffed1be05759c84c538a416d2c264deef9af4c53de0a1ad04ee4\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/ronin/gateway/RoninBridgeManager.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType, RoleAccess, ErrUnauthorized, BridgeManager } from \\\\\\\"../../extensions/bridge-operator-governance/BridgeManager.sol\\\\\\\";\\\\nimport {\\\\n Ballot,\\\\n GlobalProposal,\\\\n Proposal,\\\\n CommonGovernanceProposal,\\\\n GovernanceProposal\\\\n} from \\\\\\\"../../extensions/sequential-governance/governance-proposal/GovernanceProposal.sol\\\\\\\";\\\\nimport {\\\\n CoreGovernance,\\\\n GlobalCoreGovernance,\\\\n GlobalGovernanceProposal\\\\n} from \\\\\\\"../../extensions/sequential-governance/governance-proposal/GlobalGovernanceProposal.sol\\\\\\\";\\\\nimport { IRoninGatewayV3 } from \\\\\\\"../../interfaces/IRoninGatewayV3.sol\\\\\\\";\\\\nimport { MinimumWithdrawal } from \\\\\\\"../../extensions/MinimumWithdrawal.sol\\\\\\\";\\\\nimport { TokenStandard } from \\\\\\\"../../libraries/LibTokenInfo.sol\\\\\\\";\\\\nimport { VoteStatusConsumer } from \\\\\\\"../../interfaces/consumers/VoteStatusConsumer.sol\\\\\\\";\\\\nimport \\\\\\\"../../utils/CommonErrors.sol\\\\\\\";\\\\n\\\\ncontract RoninBridgeManager is BridgeManager, GovernanceProposal, GlobalGovernanceProposal {\\\\n using Proposal for Proposal.ProposalDetail;\\\\n using GlobalProposal for GlobalProposal.GlobalProposalDetail;\\\\n\\\\n function hotfix__mapToken_setMinimumThresholds_registerCallbacks(address newGwImpl) external onlyProxyAdmin {\\\\n require(block.chainid == 2020, \\\\\\\"Only on ronin-mainnet\\\\\\\");\\\\n\\\\n address gw = 0x0CF8fF40a508bdBc39fBe1Bb679dCBa64E65C7Df;\\\\n\\\\n (bool success,) = gw.call(abi.encodeWithSignature(\\\\\\\"upgradeTo(address)\\\\\\\", newGwImpl));\\\\n require(success, \\\\\\\"C0\\\\\\\");\\\\n\\\\n address[] memory unmapRoninTokens = new address[](1);\\\\n uint256[] memory unmapChainIds = new uint256[](1);\\\\n unmapRoninTokens[0] = 0xC13948b5325c11279F5B6cBA67957581d374E0F0;\\\\n unmapChainIds[0] = 1;\\\\n (success,) = gw.call(\\\\n abi.encodeWithSignature(\\\\\\\"functionDelegateCall(bytes)\\\\\\\", abi.encodeCall(IRoninGatewayV3.unmapTokens, (unmapRoninTokens, unmapChainIds)))\\\\n );\\\\n require(success, \\\\\\\"C3\\\\\\\");\\\\n\\\\n address[] memory roninTokens = new address[](1);\\\\n address[] memory mainchainTokens = new address[](1);\\\\n uint256[] memory chainIds = new uint256[](1);\\\\n TokenStandard[] memory standards = new TokenStandard[](1);\\\\n uint256[] memory withdrawalThresholds = new uint256[](1);\\\\n\\\\n roninTokens[0] = 0x7E73630F81647bCFD7B1F2C04c1C662D17d4577e;\\\\n mainchainTokens[0] = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599;\\\\n chainIds[0] = 1;\\\\n standards[0] = TokenStandard.ERC20;\\\\n withdrawalThresholds[0] = 0.000167 * 10 ** 8;\\\\n\\\\n (success,) = gw.call(\\\\n abi.encodeWithSignature(\\\\\\\"functionDelegateCall(bytes)\\\\\\\", abi.encodeCall(IRoninGatewayV3.mapTokens, (roninTokens, mainchainTokens, chainIds, standards)))\\\\n );\\\\n require(success, \\\\\\\"C1\\\\\\\");\\\\n\\\\n (success,) = gw.call(\\\\n abi.encodeWithSignature(\\\\\\\"functionDelegateCall(bytes)\\\\\\\", abi.encodeCall(MinimumWithdrawal.setMinimumThresholds, (mainchainTokens, withdrawalThresholds)))\\\\n );\\\\n require(success, \\\\\\\"C2\\\\\\\");\\\\n\\\\n address[] memory callbacks = new address[](1);\\\\n callbacks[0] = 0x273cdA3AFE17eB7BcB028b058382A9010ae82B24; // Bridge Slash contract\\\\n _registerCallbacks(callbacks);\\\\n }\\\\n\\\\n /**\\\\n * CURRENT NETWORK\\\\n */\\\\n\\\\n /**\\\\n * @dev See `CoreGovernance-_proposeProposal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function propose(\\\\n uint256 chainId,\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n address[] calldata targets,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts\\\\n ) external onlyGovernor {\\\\n _proposeProposalStruct(\\\\n Proposal.ProposalDetail({\\\\n nonce: _createVotingRound(chainId),\\\\n chainId: chainId,\\\\n expiryTimestamp: expiryTimestamp,\\\\n executor: executor,\\\\n targets: targets,\\\\n values: values,\\\\n calldatas: calldatas,\\\\n gasAmounts: gasAmounts\\\\n }),\\\\n msg.sender\\\\n );\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_proposeProposalStructAndCastVotes`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n * - The proposal is for the current network.\\\\n *\\\\n */\\\\n function proposeProposalStructAndCastVotes(\\\\n Proposal.ProposalDetail calldata _proposal,\\\\n Ballot.VoteType[] calldata _supports,\\\\n Signature[] calldata _signatures\\\\n ) external onlyGovernor {\\\\n _proposeProposalStructAndCastVotes(_proposal, _supports, _signatures, msg.sender);\\\\n }\\\\n\\\\n /**\\\\n * @dev Proposes and casts vote for a proposal on the current network.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n * - The proposal is for the current network.\\\\n *\\\\n */\\\\n function proposeProposalForCurrentNetwork(\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n address[] calldata targets,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts,\\\\n Ballot.VoteType support\\\\n ) external onlyGovernor {\\\\n Proposal.ProposalDetail memory proposal = Proposal.ProposalDetail({\\\\n nonce: _createVotingRound(block.chainid),\\\\n chainId: block.chainid,\\\\n expiryTimestamp: expiryTimestamp,\\\\n executor: executor,\\\\n targets: targets,\\\\n values: values,\\\\n calldatas: calldatas,\\\\n gasAmounts: gasAmounts\\\\n });\\\\n _proposeProposalStruct(proposal, msg.sender);\\\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\\\n }\\\\n\\\\n /**\\\\n * @dev Casts vote for a proposal on the current network.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function castProposalVoteForCurrentNetwork(Proposal.ProposalDetail calldata proposal, Ballot.VoteType support) external onlyGovernor {\\\\n _castProposalVoteForCurrentNetwork(msg.sender, proposal, support);\\\\n }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_castProposalBySignatures`.\\\\n */\\\\n function castProposalBySignatures(Proposal.ProposalDetail calldata proposal, Ballot.VoteType[] calldata supports_, Signature[] calldata signatures) external {\\\\n _castProposalBySignatures(proposal, supports_, signatures);\\\\n }\\\\n\\\\n /**\\\\n * GLOBAL NETWORK\\\\n */\\\\n\\\\n /**\\\\n * @dev See `CoreGovernance-_proposeGlobal`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function proposeGlobal(\\\\n uint256 expiryTimestamp,\\\\n address executor,\\\\n GlobalProposal.TargetOption[] calldata targetOptions,\\\\n uint256[] calldata values,\\\\n bytes[] calldata calldatas,\\\\n uint256[] calldata gasAmounts\\\\n ) external onlyGovernor { }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_proposeGlobalProposalStructAndCastVotes`.\\\\n *\\\\n * Requirements:\\\\n * - The method caller is governor.\\\\n *\\\\n */\\\\n function proposeGlobalProposalStructAndCastVotes(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external onlyGovernor { }\\\\n\\\\n /**\\\\n * @dev See `GovernanceProposal-_castGlobalProposalBySignatures`.\\\\n */\\\\n function castGlobalProposalBySignatures(\\\\n GlobalProposal.GlobalProposalDetail calldata globalProposal,\\\\n Ballot.VoteType[] calldata supports_,\\\\n Signature[] calldata signatures\\\\n ) external { }\\\\n\\\\n /**\\\\n * COMMON METHODS\\\\n */\\\\n\\\\n /**\\\\n * @dev See {CoreGovernance-_executeWithCaller}.\\\\n */\\\\n function execute(Proposal.ProposalDetail calldata proposal) external { }\\\\n\\\\n /**\\\\n * @dev See {GlobalCoreGovernance-_executeWithCaller}.\\\\n */\\\\n function executeGlobal(GlobalProposal.GlobalProposalDetail calldata globalProposal) external { }\\\\n\\\\n /**\\\\n * @dev Internal function to get the chain type of the contract.\\\\n * @return The chain type, indicating the type of the chain the contract operates on (e.g., RoninChain).\\\\n */\\\\n function _getChainType() internal pure override returns (ChainType) {\\\\n return ChainType.RoninChain;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the total weights of all governors.\\\\n * @return The total weights of all governors combined.\\\\n */\\\\n function _getTotalWeight() internal view virtual override returns (uint256) {\\\\n return getTotalWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the minimum vote weight required for governance actions.\\\\n * @return The minimum vote weight required for governance actions.\\\\n */\\\\n function _getMinimumVoteWeight() internal view virtual override returns (uint256) {\\\\n return minimumVoteWeight();\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to get the vote weight of a specific governor.\\\\n * @param _governor The address of the governor to get the vote weight for.\\\\n * @return The vote weight of the specified governor.\\\\n */\\\\n function _getWeight(address _governor) internal view virtual override returns (uint256) {\\\\n return _getGovernorWeight(_governor);\\\\n }\\\\n\\\\n function _proposalDomainSeparator() internal view override returns (bytes32) {\\\\n return DOMAIN_SEPARATOR;\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x066432106b12e7439ca06147b4f86a432cb9def83deee0a87bc7b4210ce8a5c8\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/Types.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { LibTUint256Slot } from \\\\\\\"./operations/LibTUint256Slot.sol\\\\\\\";\\\\n\\\\ntype TUint256Slot is bytes32;\\\\n\\\\nusing {\\\\n LibTUint256Slot.add,\\\\n LibTUint256Slot.sub,\\\\n LibTUint256Slot.mul,\\\\n LibTUint256Slot.div,\\\\n LibTUint256Slot.load,\\\\n LibTUint256Slot.store,\\\\n LibTUint256Slot.addAssign,\\\\n LibTUint256Slot.subAssign,\\\\n LibTUint256Slot.preDecrement,\\\\n LibTUint256Slot.postDecrement,\\\\n LibTUint256Slot.preIncrement,\\\\n LibTUint256Slot.postIncrement\\\\n} for TUint256Slot global;\\\\n\\\",\\\"keccak256\\\":\\\"0x20ab58f1c9ae4936f9dd9891d064301d78ef508c1dd2ce0c19a7b5b81d530e36\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/types/operations/LibTUint256Slot.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.17;\\\\n\\\\nimport { TUint256Slot } from \\\\\\\"../Types.sol\\\\\\\";\\\\n\\\\n/**\\\\n * @title LibTUint256Slot\\\\n * @dev Library for handling unsigned 256-bit integers.\\\\n */\\\\nlibrary LibTUint256Slot {\\\\n /// @dev value is equal to bytes4(keccak256(\\\\\\\"Panic(uint256)\\\\\\\"))\\\\n /// @dev see: https://github.com/foundry-rs/forge-std/blob/master/src/StdError.sol\\\\n uint256 private constant PANIC_ERROR_SIGNATURE = 0x4e487b71;\\\\n /// @dev error code for {Arithmetic over/underflow} error\\\\n uint256 private constant ARITHMETIC_ERROR_CODE = 0x11;\\\\n /// @dev error code for {Division or modulo by 0} error\\\\n uint256 private constant DIVISION_ERROR_CODE = 0x12;\\\\n\\\\n /**\\\\n * @dev Loads the value of the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @return val The loaded value.\\\\n */\\\\n function load(TUint256Slot self) internal view returns (uint256 val) {\\\\n assembly {\\\\n val := sload(self)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Stores a value into the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to be stored.\\\\n */\\\\n function store(TUint256Slot self, uint256 other) internal {\\\\n assembly {\\\\n sstore(self, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Multiplies the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to multiply by.\\\\n * @return res The resulting value after multiplication.\\\\n */\\\\n function mul(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n if iszero(iszero(storedVal)) {\\\\n res := mul(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if iszero(eq(other, div(res, storedVal))) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Divides the TUint256Slot variable by a given value.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to divide by.\\\\n * @return res The resulting value after division.\\\\n */\\\\n function div(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n // revert if divide by zero\\\\n if iszero(other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, DIVISION_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n res := div(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction.\\\\n */\\\\n function sub(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n\\\\n // Underflow check\\\\n if lt(storedVal, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n\\\\n res := sub(storedVal, other)\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition.\\\\n */\\\\n function add(TUint256Slot self, uint256 other) internal view returns (uint256 res) {\\\\n assembly {\\\\n let storedVal := sload(self)\\\\n res := add(storedVal, other)\\\\n\\\\n // Overflow check\\\\n if lt(res, other) {\\\\n // Store 4 bytes the function selector of Panic(uint256)\\\\n // Equivalent to revert Panic(uint256)\\\\n mstore(0x00, PANIC_ERROR_SIGNATURE)\\\\n // Store 4 bytes of division error code in the next slot\\\\n mstore(0x20, ARITHMETIC_ERROR_CODE)\\\\n // Revert 36 bytes of error starting from 0x1c\\\\n revert(0x1c, 0x24)\\\\n }\\\\n }\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after incrementing.\\\\n */\\\\n function preIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = addAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Increments the TUint256Slot variable by 1 and returns the original value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The original value before incrementing.\\\\n */\\\\n function postIncrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res + 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value after decrementing.\\\\n */\\\\n function preDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = subAssign(self, 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Decrements the TUint256Slot variable by 1 and returns the new value.\\\\n * @param self The TUint256Slot variable.\\\\n * @return res The resulting value before decrementing.\\\\n */\\\\n function postDecrement(TUint256Slot self) internal returns (uint256 res) {\\\\n res = load(self);\\\\n store(self, res - 1);\\\\n }\\\\n\\\\n /**\\\\n * @dev Adds a given value to the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to add.\\\\n * @return res The resulting value after addition and storage.\\\\n */\\\\n function addAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = add(self, other));\\\\n }\\\\n\\\\n /**\\\\n * @dev Subtracts a given value from the TUint256Slot variable and stores the result.\\\\n * @param self The TUint256Slot variable.\\\\n * @param other The value to subtract.\\\\n * @return res The resulting value after subtraction and storage.\\\\n */\\\\n function subAssign(TUint256Slot self, uint256 other) internal returns (uint256 res) {\\\\n store(self, res = sub(self, other));\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xe10c089459baf373494d76b00e582d49f6e43c500ab0f1657d53afc2fa472cbb\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/CommonErrors.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { ContractType } from \\\\\\\"./ContractType.sol\\\\\\\";\\\\nimport { RoleAccess } from \\\\\\\"./RoleAccess.sol\\\\\\\";\\\\n\\\\nerror ErrSyncTooFarPeriod(uint256 period, uint256 latestRewardedPeriod);\\\\n/**\\\\n * @dev Error thrown when an address is expected to be an already created externally owned account (EOA).\\\\n * This error indicates that the provided address is invalid for certain contract operations that require already created EOA.\\\\n */\\\\nerror ErrAddressIsNotCreatedEOA(address addr, bytes32 codehash);\\\\n/**\\\\n * @dev Error raised when a bridge operator update operation fails.\\\\n * @param bridgeOperator The address of the bridge operator that failed to update.\\\\n */\\\\nerror ErrBridgeOperatorUpdateFailed(address bridgeOperator);\\\\n/**\\\\n * @dev Error thrown when attempting to add a bridge operator that already exists in the contract.\\\\n * This error indicates that the provided bridge operator address is already registered as a bridge operator in the contract.\\\\n */\\\\nerror ErrBridgeOperatorAlreadyExisted(address bridgeOperator);\\\\n/**\\\\n * @dev The error indicating an unsupported interface.\\\\n * @param interfaceId The bytes4 interface identifier that is not supported.\\\\n * @param addr The address where the unsupported interface was encountered.\\\\n */\\\\nerror ErrUnsupportedInterface(bytes4 interfaceId, address addr);\\\\n/**\\\\n * @dev Error thrown when the return data from a callback function is invalid.\\\\n * @param callbackFnSig The signature of the callback function that returned invalid data.\\\\n * @param register The address of the register where the callback function was invoked.\\\\n * @param returnData The invalid return data received from the callback function.\\\\n */\\\\nerror ErrInvalidReturnData(bytes4 callbackFnSig, address register, bytes returnData);\\\\n/**\\\\n * @dev Error of set to non-contract.\\\\n */\\\\nerror ErrZeroCodeContract(address addr);\\\\n/**\\\\n * @dev Error indicating that arguments are invalid.\\\\n */\\\\nerror ErrInvalidArguments(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that given address is null when it should not.\\\\n */\\\\nerror ErrZeroAddress(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that the provided threshold is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that the invalid threshold applies to.\\\\n */\\\\nerror ErrInvalidThreshold(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function can only be called by the contract itself.\\\\n * @param msgSig The function signature (bytes4) that can only be called by the contract itself.\\\\n */\\\\nerror ErrOnlySelfCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n * @param expectedRole The role required to perform the function.\\\\n */\\\\nerror ErrUnauthorized(bytes4 msgSig, RoleAccess expectedRole);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4) that the caller is unauthorized to perform.\\\\n */\\\\nerror ErrUnauthorizedCall(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the caller is unauthorized to perform a specific function.\\\\n * @param msgSig The function signature (bytes4).\\\\n * @param expectedContractType The contract type required to perform the function.\\\\n * @param actual The actual address that called to the function.\\\\n */\\\\nerror ErrUnexpectedInternalCall(bytes4 msgSig, ContractType expectedContractType, address actual);\\\\n\\\\n/**\\\\n * @dev Error indicating that an array is empty when it should contain elements.\\\\n */\\\\nerror ErrEmptyArray();\\\\n\\\\n/**\\\\n * @dev Error indicating a mismatch in the length of input parameters or arrays for a specific function.\\\\n * @param msgSig The function signature (bytes4) that has a length mismatch.\\\\n */\\\\nerror ErrLengthMismatch(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a proxy call to an external contract has failed.\\\\n * @param msgSig The function signature (bytes4) of the proxy call that failed.\\\\n * @param extCallSig The function signature (bytes4) of the external contract call that failed.\\\\n */\\\\nerror ErrProxyCallFailed(bytes4 msgSig, bytes4 extCallSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a function tried to call a precompiled contract that is not allowed.\\\\n * @param msgSig The function signature (bytes4) that attempted to call a precompiled contract.\\\\n */\\\\nerror ErrCallPrecompiled(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a native token transfer has failed.\\\\n * @param msgSig The function signature (bytes4) of the token transfer that failed.\\\\n */\\\\nerror ErrNativeTransferFailed(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that an order is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid order.\\\\n */\\\\nerror ErrInvalidOrder(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the chain ID is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid chain ID.\\\\n * @param actual Current chain ID that executing function.\\\\n * @param expected Expected chain ID required for the tx to success.\\\\n */\\\\nerror ErrInvalidChainId(bytes4 msgSig, uint256 actual, uint256 expected);\\\\n\\\\n/**\\\\n * @dev Error indicating that a vote type is not supported.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an unsupported vote type.\\\\n */\\\\nerror ErrUnsupportedVoteType(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that the proposal nonce is invalid.\\\\n * @param msgSig The function signature (bytes4) of the operation that encountered an invalid proposal nonce.\\\\n */\\\\nerror ErrInvalidProposalNonce(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a voter has already voted.\\\\n * @param voter The address of the voter who has already voted.\\\\n */\\\\nerror ErrAlreadyVoted(address voter);\\\\n\\\\n/**\\\\n * @dev Error indicating that a signature is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid signature.\\\\n */\\\\nerror ErrInvalidSignatures(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a relay call has failed.\\\\n * @param msgSig The function signature (bytes4) of the relay call that failed.\\\\n */\\\\nerror ErrRelayFailed(bytes4 msgSig);\\\\n/**\\\\n * @dev Error indicating that a vote weight is invalid for a specific function signature.\\\\n * @param msgSig The function signature (bytes4) that encountered an invalid vote weight.\\\\n */\\\\nerror ErrInvalidVoteWeight(bytes4 msgSig);\\\\n\\\\n/**\\\\n * @dev Error indicating that a query was made for an outdated bridge operator set.\\\\n */\\\\nerror ErrQueryForOutdatedBridgeOperatorSet();\\\\n\\\\n/**\\\\n * @dev Error indicating that a request is invalid.\\\\n */\\\\nerror ErrInvalidRequest();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token standard is invalid.\\\\n */\\\\nerror ErrInvalidTokenStandard();\\\\n\\\\n/**\\\\n * @dev Error indicating that a token is not supported.\\\\n */\\\\nerror ErrUnsupportedToken();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt kind is invalid.\\\\n */\\\\nerror ErrInvalidReceiptKind();\\\\n\\\\n/**\\\\n * @dev Error indicating that a receipt is invalid.\\\\n */\\\\nerror ErrInvalidReceipt();\\\\n\\\\n/**\\\\n * @dev Error indicating that an address is not payable.\\\\n */\\\\nerror ErrNonpayableAddress(address);\\\\n\\\\n/**\\\\n * @dev Error indicating that the period is already processed, i.e. scattered reward.\\\\n */\\\\nerror ErrPeriodAlreadyProcessed(uint256 requestingPeriod, uint256 latestPeriod);\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid vote hash is provided.\\\\n */\\\\nerror ErrInvalidVoteHash();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an empty vote.\\\\n */\\\\nerror ErrQueryForEmptyVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for an expired vote.\\\\n */\\\\nerror ErrQueryForExpiredVote();\\\\n\\\\n/**\\\\n * @dev Error thrown when querying for a non-existent vote.\\\\n */\\\\nerror ErrQueryForNonExistentVote();\\\\n\\\\n/**\\\\n * @dev Error indicating that the method is only called once per block.\\\\n */\\\\nerror ErrOncePerBlock();\\\\n\\\\n/**\\\\n * @dev Error of method caller must be coinbase\\\\n */\\\\nerror ErrCallerMustBeCoinbase();\\\\n\\\\n/**\\\\n * @dev Error thrown when an invalid proposal is encountered.\\\\n * @param actual The actual value of the proposal.\\\\n * @param expected The expected value of the proposal.\\\\n */\\\\nerror ErrInvalidProposal(bytes32 actual, bytes32 expected);\\\\n\\\\n/**\\\\n * @dev Error of proposal is not approved for executing.\\\\n */\\\\nerror ErrProposalNotApproved();\\\\n\\\\n/**\\\\n * @dev Error of the caller is not the specified executor.\\\\n */\\\\nerror ErrInvalidExecutor();\\\\n\\\\n/**\\\\n * @dev Error of the `caller` to relay is not the specified `executor`.\\\\n */\\\\nerror ErrNonExecutorCannotRelay(address executor, address caller);\\\\n\\\",\\\"keccak256\\\":\\\"0x0d9e2fd98f6b704273faad707ed9eadbd4c79551ee3f902bff5b29213a204679\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/ContractType.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum ContractType {\\\\n UNKNOWN, // 0\\\\n PAUSE_ENFORCER, // 1\\\\n BRIDGE, // 2\\\\n BRIDGE_TRACKING, // 3\\\\n GOVERNANCE_ADMIN, // 4\\\\n MAINTENANCE, // 5\\\\n SLASH_INDICATOR, // 6\\\\n STAKING_VESTING, // 7\\\\n VALIDATOR, // 8\\\\n STAKING, // 9\\\\n RONIN_TRUSTED_ORGANIZATION, // 10\\\\n BRIDGE_MANAGER, // 11\\\\n BRIDGE_SLASH, // 12\\\\n BRIDGE_REWARD, // 13\\\\n FAST_FINALITY_TRACKING, // 14\\\\n PROFILE // 15\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0xec088aa939cd885dbe84e944942d7ea674e1fff8802c1f2ae5d8e84e4578357d\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/IdentityGuard.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nimport { AddressArrayUtils } from \\\\\\\"../libraries/AddressArrayUtils.sol\\\\\\\";\\\\nimport { IERC165 } from \\\\\\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\\\\\";\\\\nimport { TransparentUpgradeableProxyV2 } from \\\\\\\"../extensions/TransparentUpgradeableProxyV2.sol\\\\\\\";\\\\nimport { ErrAddressIsNotCreatedEOA, ErrZeroAddress, ErrOnlySelfCall, ErrZeroCodeContract, ErrUnsupportedInterface } from \\\\\\\"./CommonErrors.sol\\\\\\\";\\\\n\\\\nabstract contract IdentityGuard {\\\\n using AddressArrayUtils for address[];\\\\n\\\\n /// @dev value is equal to keccak256(abi.encode())\\\\n /// @dev see: https://eips.ethereum.org/EIPS/eip-1052\\\\n bytes32 internal constant CREATED_ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\\\\n\\\\n /**\\\\n * @dev Modifier to restrict functions to only be called by this contract.\\\\n * @dev Reverts if the caller is not this contract.\\\\n */\\\\n modifier onlySelfCall() virtual {\\\\n _requireSelfCall();\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Modifier to ensure that the elements in the `arr` array are non-duplicates.\\\\n * It calls the internal `_checkDuplicate` function to perform the duplicate check.\\\\n *\\\\n * Requirements:\\\\n * - The elements in the `arr` array must not contain any duplicates.\\\\n */\\\\n modifier nonDuplicate(address[] memory arr) virtual {\\\\n _requireNonDuplicate(arr);\\\\n _;\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal method to check the method caller.\\\\n * @dev Reverts if the method caller is not this contract.\\\\n */\\\\n function _requireSelfCall() internal view virtual {\\\\n if (msg.sender != address(this)) revert ErrOnlySelfCall(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to check if a contract address has code.\\\\n * @param addr The address of the contract to check.\\\\n * @dev Throws an error if the contract address has no code.\\\\n */\\\\n function _requireHasCode(address addr) internal view {\\\\n if (addr.code.length == 0) revert ErrZeroCodeContract(addr);\\\\n }\\\\n\\\\n /**\\\\n * @dev Checks if an address is zero and reverts if it is.\\\\n * @param addr The address to check.\\\\n */\\\\n function _requireNonZeroAddress(address addr) internal pure {\\\\n if (addr == address(0)) revert ErrZeroAddress(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Check if arr is empty and revert if it is.\\\\n * Checks if an array contains any duplicate addresses and reverts if duplicates are found.\\\\n * @param arr The array of addresses to check.\\\\n */\\\\n function _requireNonDuplicate(address[] memory arr) internal pure {\\\\n if (arr.hasDuplicate()) revert AddressArrayUtils.ErrDuplicated(msg.sig);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the provided address is a created externally owned account (EOA).\\\\n * This internal function is used to ensure that the provided address is a valid externally owned account (EOA).\\\\n * It checks the codehash of the address against a predefined constant to confirm that the address is a created EOA.\\\\n * @notice This method only works with non-state EOA accounts\\\\n */\\\\n function _requireCreatedEOA(address addr) internal view {\\\\n _requireNonZeroAddress(addr);\\\\n bytes32 codehash = addr.codehash;\\\\n if (codehash != CREATED_ACCOUNT_HASH) revert ErrAddressIsNotCreatedEOA(addr, codehash);\\\\n }\\\\n\\\\n /**\\\\n * @dev Internal function to require that the specified contract supports the given interface. This method handle in\\\\n * both case that the callee is either or not the proxy admin of the caller. If the contract does not support the\\\\n * interface `interfaceId` or EIP165, a revert with the corresponding error message is triggered.\\\\n *\\\\n * @param contractAddr The address of the contract to check for interface support.\\\\n * @param interfaceId The interface ID to check for support.\\\\n */\\\\n function _requireSupportsInterface(address contractAddr, bytes4 interfaceId) internal view {\\\\n bytes memory supportsInterfaceParams = abi.encodeCall(IERC165.supportsInterface, (interfaceId));\\\\n (bool success, bytes memory returnOrRevertData) = contractAddr.staticcall(supportsInterfaceParams);\\\\n if (!success) {\\\\n (success, returnOrRevertData) = contractAddr.staticcall(abi.encodeCall(TransparentUpgradeableProxyV2.functionDelegateCall, (supportsInterfaceParams)));\\\\n if (!success) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n if (!abi.decode(returnOrRevertData, (bool))) revert ErrUnsupportedInterface(interfaceId, contractAddr);\\\\n }\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x546ab4c9cdb0e7f8e650f140349225305ba1d0706dcaceeb9180c96aa765da59\\\",\\\"license\\\":\\\"MIT\\\"},\\\"src/utils/RoleAccess.sol\\\":{\\\"content\\\":\\\"// SPDX-License-Identifier: MIT\\\\npragma solidity ^0.8.0;\\\\n\\\\nenum RoleAccess {\\\\n UNKNOWN, // 0\\\\n ADMIN, // 1\\\\n COINBASE, // 2\\\\n GOVERNOR, // 3\\\\n CANDIDATE_ADMIN, // 4\\\\n WITHDRAWAL_MIGRATOR, // 5\\\\n __DEPRECATED_BRIDGE_OPERATOR, // 6\\\\n BLOCK_PRODUCER, // 7\\\\n VALIDATOR_CANDIDATE, // 8\\\\n CONSENSUS, // 9\\\\n TREASURY // 10\\\\n\\\\n}\\\\n\\\",\\\"keccak256\\\":\\\"0x671ff40dd874c508c4b3879a580996c7987fc018669256f47151e420a55c0e51\\\",\\\"license\\\":\\\"MIT\\\"}},\\\"version\\\":1}\"", + "nonce": 41, "storageLayout": { "storage": [ { - "astId": 52029, + "astId": 52534, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "_initialized", "offset": 0, @@ -448,7 +435,7 @@ "type": "t_uint8" }, { - "astId": 52032, + "astId": 52537, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "_initializing", "offset": 1, @@ -456,7 +443,7 @@ "type": "t_bool" }, { - "astId": 67500, + "astId": 110493, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "DOMAIN_SEPARATOR", "offset": 0, @@ -464,7 +451,7 @@ "type": "t_bytes32" }, { - "astId": 69549, + "astId": 112542, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "round", "offset": 0, @@ -472,15 +459,15 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 69557, + "astId": 112550, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "vote", "offset": 0, "slot": "3", - "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)69487_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)112480_storage))" }, { - "astId": 69559, + "astId": 112552, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "_proposalExpiryDuration", "offset": 0, @@ -488,12 +475,12 @@ "type": "t_uint256" }, { - "astId": 70281, + "astId": 113274, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "_targetOptionsMap", "offset": 0, "slot": "5", - "type": "t_mapping(t_enum(TargetOption)74353,t_address)" + "type": "t_mapping(t_enum(TargetOption)117385,t_address)" } ], "types": { @@ -518,12 +505,12 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_enum(TargetOption)74353": { + "t_enum(TargetOption)117385": { "encoding": "inplace", "label": "enum GlobalProposal.TargetOption", "numberOfBytes": "1" }, - "t_enum(VoteStatus)73297": { + "t_enum(VoteStatus)116329": { "encoding": "inplace", "label": "enum VoteStatusConsumer.VoteStatus", "numberOfBytes": "1" @@ -535,33 +522,33 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_address,t_struct(Signature)73288_storage)": { + "t_mapping(t_address,t_struct(Signature)116320_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct SignatureConsumer.Signature)", "numberOfBytes": "32", - "value": "t_struct(Signature)73288_storage" + "value": "t_struct(Signature)116320_storage" }, - "t_mapping(t_enum(TargetOption)74353,t_address)": { + "t_mapping(t_enum(TargetOption)117385,t_address)": { "encoding": "mapping", - "key": "t_enum(TargetOption)74353", + "key": "t_enum(TargetOption)117385", "label": "mapping(enum GlobalProposal.TargetOption => address)", "numberOfBytes": "32", "value": "t_address" }, - "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)69487_storage))": { + "t_mapping(t_uint256,t_mapping(t_uint256,t_struct(ProposalVote)112480_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(uint256 => struct CoreGovernance.ProposalVote))", "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(ProposalVote)69487_storage)" + "value": "t_mapping(t_uint256,t_struct(ProposalVote)112480_storage)" }, - "t_mapping(t_uint256,t_struct(ProposalVote)69487_storage)": { + "t_mapping(t_uint256,t_struct(ProposalVote)112480_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct CoreGovernance.ProposalVote)", "numberOfBytes": "32", - "value": "t_struct(ProposalVote)69487_storage" + "value": "t_struct(ProposalVote)112480_storage" }, "t_mapping(t_uint256,t_uint256)": { "encoding": "mapping", @@ -570,21 +557,21 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(ProposalVote)69487_storage": { + "t_struct(ProposalVote)112480_storage": { "encoding": "inplace", "label": "struct CoreGovernance.ProposalVote", "numberOfBytes": "288", "members": [ { - "astId": 69463, + "astId": 112456, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "status", "offset": 0, "slot": "0", - "type": "t_enum(VoteStatus)73297" + "type": "t_enum(VoteStatus)116329" }, { - "astId": 69465, + "astId": 112458, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "hash", "offset": 0, @@ -592,7 +579,7 @@ "type": "t_bytes32" }, { - "astId": 69467, + "astId": 112460, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "againstVoteWeight", "offset": 0, @@ -600,7 +587,7 @@ "type": "t_uint256" }, { - "astId": 69469, + "astId": 112462, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "forVoteWeight", "offset": 0, @@ -608,7 +595,7 @@ "type": "t_uint256" }, { - "astId": 69472, + "astId": 112465, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "forVoteds", "offset": 0, @@ -616,7 +603,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 69475, + "astId": 112468, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "againstVoteds", "offset": 0, @@ -624,7 +611,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 69477, + "astId": 112470, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "expiryTimestamp", "offset": 0, @@ -632,15 +619,15 @@ "type": "t_uint256" }, { - "astId": 69482, + "astId": 112475, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "sig", "offset": 0, "slot": "7", - "type": "t_mapping(t_address,t_struct(Signature)73288_storage)" + "type": "t_mapping(t_address,t_struct(Signature)116320_storage)" }, { - "astId": 69486, + "astId": 112479, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "voted", "offset": 0, @@ -649,13 +636,13 @@ } ] }, - "t_struct(Signature)73288_storage": { + "t_struct(Signature)116320_storage": { "encoding": "inplace", "label": "struct SignatureConsumer.Signature", "numberOfBytes": "96", "members": [ { - "astId": 73283, + "astId": 116315, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "v", "offset": 0, @@ -663,7 +650,7 @@ "type": "t_uint8" }, { - "astId": 73285, + "astId": 116317, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "r", "offset": 0, @@ -671,7 +658,7 @@ "type": "t_bytes32" }, { - "astId": 73287, + "astId": 116319, "contract": "src/ronin/gateway/RoninBridgeManager.sol:RoninBridgeManager", "label": "s", "offset": 0, @@ -692,7 +679,7 @@ } } }, - "timestamp": 1722328222, + "timestamp": 1722925217, "userdoc": { "version": 1, "kind": "user",